feat(agents): scaffold workspace on agent add and register#487
Conversation
- Add IAgentWorkspaceScaffolder + AgentWorkspaceScaffolder wrapping BotNexusHome.GetAgentDirectory - Register as singleton in DI - Call from AgentsController.Register (best-effort, non-fatal) - Call from AgentCommands.ExecuteAddAsync and ExecuteWizardAsync (CLI) - 13 new tests covering workspace creation, scaffold files, idempotency, sad paths Closes #331
Farnsworth Review -- PR #487CI: All checks passing Test coverage: 13 tests covering workspace creation, scaffold files, idempotency, sad paths, CLI resilience to scaffold failure. All 1649 gateway + 86 CLI pass. Design notes: LGTM. Ready to merge. |
|
CI: All checks passing LGTM - ready to merge. |
sytone
left a comment
There was a problem hiding this comment.
Farnsworth Review — PR #487
CI: ✅ All checks passing
Merge conflicts: ✅ Clean (MERGEABLE)
Conventional commit title: ✅ feat(agents): scaffold workspace on agent add and register
Test coverage:
- ✅ 13 tests (scaffolder called on register, best-effort non-fatal, CLI add wizard)
- 1649/1649 pass
Spec completeness vs #331: Delegates to BotNexusHome.GetAgentDirectory existing mechanism — correct approach, avoids duplicating templates. Both AgentsController.Register and CLI wizard paths covered.
LGTM. Ready to merge.
|
Closing as part of a planned hard-reset of the in-flight branch set so the new domain-model refactor can land on a clean trunk. Audit verdict: keep Rationale: Workspace lifecycle; orthogonal. The new plan (in session state) reshapes core types: Citizen (User+Agent union), Vogen-generated value objects, ThreadId removed in favour of composite ChannelAddress, mark-not-delete compaction, centralised If this work is still wanted, refile as a new issue/PR against the post-refactor contracts. |
Closes #331
Changes
New:
IAgentWorkspaceScaffolder+AgentWorkspaceScaffolderBotNexus.Gateway.ContractsBotNexusHome.GetAgentDirectorywhich provisions workspace from embedded assembly templates on first accessAgentsController.RegisterIAgentWorkspaceScaffolder(backward compatible)ScaffoldAsyncafter config is saved — best-effort, non-fatal (logs warning on failure)AgentCommands(CLI)ExecuteAddAsyncandExecuteWizardAsyncnow callBotNexusHome.GetAgentDirectorydirectly (same scaffold trigger) after config saveagent addcommandTests (13 new)
AgentWorkspaceScaffolderTests: workspace dir created, scaffold files present, idempotent, returns correct path, sad pathsAgentCommandsScaffoldTests:agent addcreates workspace dir, creates scaffold files, resilient to scaffold failureAll 1649 gateway + 86 CLI + 206 CodingAgent tests pass.