feat(agent-runtime): add CLI composition flows (Phase 4)#513
Conversation
Implement corvus agent build/run/new subcommands backed by corvus-composer. - Add composer.rs module with handle_composer_command dispatcher - Wire AgentCompositionCommands enum into the Agent CLI subcommand - handle_build_command: validates manifest, checks capabilities, scaffolds output dir - handle_run_command: validates + checks platform constraints, stubs boot-time run - handle_new_command: generates TOML manifest from chat-bot/support-bot/code-assistant templates - Add 15 unit tests covering templates, new-command validation, build/run happy/error paths, and sandbox platform availability - Legacy 'corvus agent' interactive loop preserved via optional subcommand Part of issue #481 (Phase 4: CLI composition flows).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Contributor ReportUser: @yacosta738
Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-11 to 2026-04-11 |
Related Issues
Part of #430 (epic), closes #481 (Phase 4: CLI composition flows)
Summary
Implements Phase 4 of the capability-based architecture: CLI composition flows that let operators build, run, and scaffold agents from TOML manifests.
What changed:
src/composer.rs— new module withhandle_composer_commanddispatcher and three handlers:handle_build_command: loads and validates manifest viaAgentComposer, checks capability availability against the registered registries, scaffolds output directoryhandle_run_command: validates manifest + platform constraints (sandbox availability), stubs boot-time run with a clear "not yet implemented" error pointing tobuildhandle_new_command: generates a ready-to-use TOML manifest from three built-in templates (chat-bot,support-bot,code-assistant)src/main.rs—Commands::Agentextended with an optionalAgentCompositionCommandssubcommand (build,run,new); legacy interactive loop is fully preserved when no subcommand is givensrc/lib.rs— addedpub mod composerand renamed the re-export fromcomposertocorvus_composerto avoid the name collisionWhat did NOT change:
corvus agentwithout subcommands behaves identically to beforecorvus-composercrate internals changedTested Information
cargo clippy --all-targets -- -D warnings→ cleancargo fmt -- --check→ cleancargo test --lib→ 3493 tests, 0 failurescomposer::testscovering:handle_new_commandvalidation: empty name, slash in name, unknown template, file creationhandle_build_command: happy path with temp manifest, missing manifest errorhandle_run_command: "not yet implemented" error, missing manifest errorcheck_sandbox_availability:nonealways available, unknown sandbox rejected, Linux-only sandboxes unavailable on non-LinuxDocumentation Impact
--helpoutput; no external APIs or configuration schemas changed.Breaking Changes
None. The
corvus agentcommand is fully backward-compatible.Checklist