From 3aa9760eadf483ec0de618016a8d782f3e3d2c4e Mon Sep 17 00:00:00 2001 From: Virgil Date: Mon, 30 Mar 2026 21:52:40 +0000 Subject: [PATCH] fix(ax): continue AX comment cleanup Co-Authored-By: Virgil --- cmd/core-agent/commands.go | 9 +++------ pkg/agentic/commands.go | 3 ++- pkg/agentic/commands_forge.go | 3 ++- pkg/agentic/commands_workspace.go | 3 ++- pkg/brain/provider.go | 8 +++----- pkg/brain/register.go | 8 +++----- pkg/monitor/register.go | 7 +++---- pkg/runner/runner.go | 9 ++++----- pkg/setup/service.go | 16 +++++----------- 9 files changed, 27 insertions(+), 39 deletions(-) diff --git a/cmd/core-agent/commands.go b/cmd/core-agent/commands.go index 8351559..07153c1 100644 --- a/cmd/core-agent/commands.go +++ b/cmd/core-agent/commands.go @@ -67,12 +67,9 @@ func applyLogLevel(args []string) []string { return cleaned } -// registerApplicationCommands adds application-level CLI commands (version, check, env). -// These are not owned by any service — they're the binary's own commands. -// -// core-agent version — build info -// core-agent check — health check -// core-agent env — environment variables +// c.Command("version", core.Command{Description: "Print version and build info", Action: commands.version}) +// c.Command("check", core.Command{Description: "Verify workspace, deps, and config", Action: commands.check}) +// c.Command("env", core.Command{Description: "Show all core.Env() keys and values", Action: commands.env}) func registerApplicationCommands(c *core.Core) { commands := applicationCommandSet{core: c} diff --git a/pkg/agentic/commands.go b/pkg/agentic/commands.go index bd7bc33..c0ec9f6 100644 --- a/pkg/agentic/commands.go +++ b/pkg/agentic/commands.go @@ -11,7 +11,8 @@ import ( core "dappco.re/go/core" ) -// registerCommands adds agentic CLI commands to Core's command tree. +// c.Command("run/task", core.Command{Description: "Run a single task end-to-end", Action: s.cmdRunTask}) +// c.Command("prep", core.Command{Description: "Prepare a workspace: clone repo, build prompt", Action: s.cmdPrep}) func (s *PrepSubsystem) registerCommands(ctx context.Context) { s.startupContext = ctx c := s.Core() diff --git a/pkg/agentic/commands_forge.go b/pkg/agentic/commands_forge.go index 847c599..ff3d1ba 100644 --- a/pkg/agentic/commands_forge.go +++ b/pkg/agentic/commands_forge.go @@ -86,7 +86,8 @@ func parseForgeArgs(options core.Options) (org, repo string, num int64) { func fmtIndex(n int64) string { return strconv.FormatInt(n, 10) } -// registerForgeCommands adds Forge API commands to Core's command tree. +// c.Command("issue/get", core.Command{Description: "Get a Forge issue", Action: s.cmdIssueGet}) +// c.Command("pr/merge", core.Command{Description: "Merge a Forge PR", Action: s.cmdPRMerge}) func (s *PrepSubsystem) registerForgeCommands() { c := s.Core() c.Command("issue/get", core.Command{Description: "Get a Forge issue", Action: s.cmdIssueGet}) diff --git a/pkg/agentic/commands_workspace.go b/pkg/agentic/commands_workspace.go index b1f7ff3..7adb1b2 100644 --- a/pkg/agentic/commands_workspace.go +++ b/pkg/agentic/commands_workspace.go @@ -10,7 +10,8 @@ import ( core "dappco.re/go/core" ) -// registerWorkspaceCommands adds workspace management commands. +// c.Command("workspace/list", core.Command{Description: "List all agent workspaces with status", Action: s.cmdWorkspaceList}) +// c.Command("workspace/dispatch", core.Command{Description: "Dispatch an agent to work on a repo task", Action: s.cmdWorkspaceDispatch}) func (s *PrepSubsystem) registerWorkspaceCommands() { c := s.Core() c.Command("workspace/list", core.Command{Description: "List all agent workspaces with status", Action: s.cmdWorkspaceList}) diff --git a/pkg/brain/provider.go b/pkg/brain/provider.go index 735d495..40a9252 100644 --- a/pkg/brain/provider.go +++ b/pkg/brain/provider.go @@ -12,10 +12,8 @@ import ( "github.com/gin-gonic/gin" ) -// BrainProvider exposes the same OpenBrain bridge over HTTP routes and WS events. -// -// provider := brain.NewProvider(bridge, hub) -// core.Println(provider.BasePath()) // "/api/brain" +// provider := brain.NewProvider(bridge, hub) +// core.Println(provider.BasePath()) // "/api/brain" type BrainProvider struct { bridge *ide.Bridge hub *ws.Hub @@ -47,7 +45,7 @@ func NewProvider(bridge *ide.Bridge, hub *ws.Hub) *BrainProvider { } } -// name := p.Name() // "brain" +// name := p.Name() // "brain" func (p *BrainProvider) Name() string { return "brain" } // BasePath shows where the provider mounts its routes. diff --git a/pkg/brain/register.go b/pkg/brain/register.go index 008dcdd..770a18b 100644 --- a/pkg/brain/register.go +++ b/pkg/brain/register.go @@ -6,11 +6,9 @@ import ( core "dappco.re/go/core" ) -// Register exposes the direct OpenBrain subsystem through `core.WithService`. -// -// c := core.New(core.WithService(brain.Register)) -// subsystem, _ := core.ServiceFor[*brain.DirectSubsystem](c, "brain") -// core.Println(subsystem.Name()) // "brain" +// c := core.New(core.WithService(brain.Register)) +// subsystem, _ := core.ServiceFor[*brain.DirectSubsystem](c, "brain") +// core.Println(subsystem.Name()) // "brain" func Register(c *core.Core) core.Result { subsystem := NewDirect() return core.Result{Value: subsystem, OK: true} diff --git a/pkg/monitor/register.go b/pkg/monitor/register.go index 6a307b5..9ca3b1e 100644 --- a/pkg/monitor/register.go +++ b/pkg/monitor/register.go @@ -6,10 +6,9 @@ import ( core "dappco.re/go/core" ) -// Register wires the monitor service into Core and lets HandleIPCEvents auto-register. -// -// c := core.New(core.WithService(monitor.Register)) -// service, _ := core.ServiceFor[*monitor.Subsystem](c, "monitor") +// c := core.New(core.WithService(monitor.Register)) +// service, _ := core.ServiceFor[*monitor.Subsystem](c, "monitor") +// core.Println(service.Name()) // "monitor" func Register(c *core.Core) core.Result { service := New(Options{}) service.ServiceRuntime = core.NewServiceRuntime(c, Options{}) diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index e66908e..d254405 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -43,9 +43,8 @@ type channelSender interface { ChannelSend(ctx context.Context, channel string, data any) } -// New creates a runner service. -// -// service := runner.New() +// service := runner.New() +// service.TrackWorkspace("core/go-io/task-5", &runner.WorkspaceStatus{Status: "running", Agent: "codex"}) func New() *Service { return &Service{ backoff: make(map[string]time.Time), @@ -54,8 +53,8 @@ func New() *Service { } } -// c := core.New(core.WithService(runner.Register)) -// service, _ := core.ServiceFor[*runner.Service](c, "runner") +// c := core.New(core.WithService(runner.Register)) +// service, _ := core.ServiceFor[*runner.Service](c, "runner") func Register(coreApp *core.Core) core.Result { service := New() service.ServiceRuntime = core.NewServiceRuntime(coreApp, Options{}) diff --git a/pkg/setup/service.go b/pkg/setup/service.go index fbbc1a4..2516d94 100644 --- a/pkg/setup/service.go +++ b/pkg/setup/service.go @@ -8,23 +8,17 @@ import ( core "dappco.re/go/core" ) -// RuntimeOptions carries service-level setup configuration. -// -// options := setup.RuntimeOptions{} +// options := setup.RuntimeOptions{} type RuntimeOptions struct{} -// Service exposes workspace setup through Core service registration. -// -// c := core.New(core.WithService(setup.Register)) -// service, _ := core.ServiceFor[*setup.Service](c, "setup") +// c := core.New(core.WithService(setup.Register)) +// service, _ := core.ServiceFor[*setup.Service](c, "setup") type Service struct { *core.ServiceRuntime[RuntimeOptions] } -// Register wires the setup service into Core. -// -// c := core.New(core.WithService(setup.Register)) -// service, _ := core.ServiceFor[*setup.Service](c, "setup") +// c := core.New(core.WithService(setup.Register)) +// service, _ := core.ServiceFor[*setup.Service](c, "setup") func Register(c *core.Core) core.Result { service := &Service{ ServiceRuntime: core.NewServiceRuntime(c, RuntimeOptions{}),