refactor(agentic): add namespaced command aliases
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
7a034ccbe8
commit
9f1315d1a8
3 changed files with 14 additions and 0 deletions
|
|
@ -19,11 +19,15 @@ func (s *PrepSubsystem) registerCommands(ctx context.Context) {
|
|||
s.startupContext = ctx
|
||||
c := s.Core()
|
||||
c.Command("run/task", core.Command{Description: "Run a single task end-to-end", Action: s.cmdRunTask})
|
||||
c.Command("agentic:run/task", core.Command{Description: "Run a single task end-to-end", Action: s.cmdRunTask})
|
||||
c.Command("run/flow", core.Command{Description: "Show a flow definition from disk or the embedded library", Action: s.cmdRunFlow})
|
||||
c.Command("agentic:run/flow", core.Command{Description: "Show a flow definition from disk or the embedded library", Action: s.cmdRunFlow})
|
||||
c.Command("flow/preview", core.Command{Description: "Preview a flow definition with optional variable substitution", Action: s.cmdFlowPreview})
|
||||
c.Command("agentic:flow/preview", core.Command{Description: "Preview a flow definition with optional variable substitution", Action: s.cmdFlowPreview})
|
||||
c.Command("dispatch/sync", core.Command{Description: "Dispatch a single task synchronously and block until it completes", Action: s.cmdDispatchSync})
|
||||
c.Command("agentic:dispatch/sync", core.Command{Description: "Dispatch a single task synchronously and block until it completes", Action: s.cmdDispatchSync})
|
||||
c.Command("run/orchestrator", core.Command{Description: "Run the queue orchestrator (standalone, no MCP)", Action: s.cmdOrchestrator})
|
||||
c.Command("agentic:run/orchestrator", core.Command{Description: "Run the queue orchestrator (standalone, no MCP)", Action: s.cmdOrchestrator})
|
||||
c.Command("dispatch", core.Command{Description: "Dispatch queued agents", Action: s.cmdDispatch})
|
||||
c.Command("agentic:dispatch", core.Command{Description: "Dispatch queued agents", Action: s.cmdDispatch})
|
||||
c.Command("dispatch/start", core.Command{Description: "Start the dispatch queue runner", Action: s.cmdDispatchStart})
|
||||
|
|
@ -82,6 +86,7 @@ func (s *PrepSubsystem) registerCommands(ctx context.Context) {
|
|||
c.Command("prompt/version", core.Command{Description: "Read the current prompt snapshot for a workspace", Action: s.cmdPromptVersion})
|
||||
c.Command("agentic:prompt/version", core.Command{Description: "Read the current prompt snapshot for a workspace", Action: s.cmdPromptVersion})
|
||||
c.Command("extract", core.Command{Description: "Extract data from agent output or scaffold a workspace template", Action: s.cmdExtract})
|
||||
c.Command("agentic:extract", core.Command{Description: "Extract data from agent output or scaffold a workspace template", Action: s.cmdExtract})
|
||||
s.registerPlanCommands()
|
||||
s.registerCommitCommands()
|
||||
s.registerSessionCommands()
|
||||
|
|
|
|||
|
|
@ -1528,11 +1528,15 @@ func TestCommands_RegisterCommands_Good_AllRegistered(t *testing.T) {
|
|||
|
||||
cmds := c.Commands()
|
||||
assert.Contains(t, cmds, "run/task")
|
||||
assert.Contains(t, cmds, "agentic:run/task")
|
||||
assert.Contains(t, cmds, "run/flow")
|
||||
assert.Contains(t, cmds, "agentic:run/flow")
|
||||
assert.Contains(t, cmds, "flow/preview")
|
||||
assert.Contains(t, cmds, "agentic:flow/preview")
|
||||
assert.Contains(t, cmds, "dispatch/sync")
|
||||
assert.Contains(t, cmds, "agentic:dispatch/sync")
|
||||
assert.Contains(t, cmds, "run/orchestrator")
|
||||
assert.Contains(t, cmds, "agentic:run/orchestrator")
|
||||
assert.Contains(t, cmds, "dispatch")
|
||||
assert.Contains(t, cmds, "agentic:dispatch")
|
||||
assert.Contains(t, cmds, "dispatch/start")
|
||||
|
|
@ -1573,8 +1577,11 @@ func TestCommands_RegisterCommands_Good_AllRegistered(t *testing.T) {
|
|||
assert.Contains(t, cmds, "agentic:prompt_version")
|
||||
assert.Contains(t, cmds, "prompt/version")
|
||||
assert.Contains(t, cmds, "extract")
|
||||
assert.Contains(t, cmds, "agentic:extract")
|
||||
assert.Contains(t, cmds, "lang/detect")
|
||||
assert.Contains(t, cmds, "agentic:lang/detect")
|
||||
assert.Contains(t, cmds, "lang/list")
|
||||
assert.Contains(t, cmds, "agentic:lang/list")
|
||||
assert.Contains(t, cmds, "epic")
|
||||
assert.Contains(t, cmds, "agentic:epic")
|
||||
assert.Contains(t, cmds, "plan")
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@ type LanguageListInput struct{}
|
|||
func (s *PrepSubsystem) registerLanguageCommands() {
|
||||
c := s.Core()
|
||||
c.Command("lang/detect", core.Command{Description: "Detect the primary language for a workspace or repository", Action: s.cmdLangDetect})
|
||||
c.Command("agentic:lang/detect", core.Command{Description: "Detect the primary language for a workspace or repository", Action: s.cmdLangDetect})
|
||||
c.Command("lang/list", core.Command{Description: "List supported language identifiers", Action: s.cmdLangList})
|
||||
c.Command("agentic:lang/list", core.Command{Description: "List supported language identifiers", Action: s.cmdLangList})
|
||||
}
|
||||
|
||||
// result := c.Command("lang/detect").Run(ctx, core.NewOptions(core.Option{Key: "path", Value: "."}))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue