From e5472f6aa567a8eaf065251487f9ca9216f28bfb Mon Sep 17 00:00:00 2001 From: Virgil Date: Thu, 2 Apr 2026 06:58:12 +0000 Subject: [PATCH] ax(agentic): add platform command aliases Co-Authored-By: Virgil --- pkg/agentic/commands_platform.go | 27 +++++++++++++++++++++++++++ pkg/agentic/prep_test.go | 11 +++++++++++ 2 files changed, 38 insertions(+) diff --git a/pkg/agentic/commands_platform.go b/pkg/agentic/commands_platform.go index 3eb7bd5..d6f4ddf 100644 --- a/pkg/agentic/commands_platform.go +++ b/pkg/agentic/commands_platform.go @@ -9,35 +9,62 @@ import ( func (s *PrepSubsystem) registerPlatformCommands() { c := s.Core() c.Command("sync/push", core.Command{Description: "Push completed dispatch state to the platform API", Action: s.cmdSyncPush}) + c.Command("agentic:sync/push", core.Command{Description: "Push completed dispatch state to the platform API", Action: s.cmdSyncPush}) c.Command("sync/pull", core.Command{Description: "Pull shared fleet context from the platform API", Action: s.cmdSyncPull}) + c.Command("agentic:sync/pull", core.Command{Description: "Pull shared fleet context from the platform API", Action: s.cmdSyncPull}) c.Command("sync/status", core.Command{Description: "Show platform sync status for the current or named agent", Action: s.cmdSyncStatus}) + c.Command("agentic:sync/status", core.Command{Description: "Show platform sync status for the current or named agent", Action: s.cmdSyncStatus}) c.Command("auth/provision", core.Command{Description: "Provision a platform API key for an authenticated agent user", Action: s.cmdAuthProvision}) + c.Command("agentic:auth/provision", core.Command{Description: "Provision a platform API key for an authenticated agent user", Action: s.cmdAuthProvision}) c.Command("auth/revoke", core.Command{Description: "Revoke a platform API key", Action: s.cmdAuthRevoke}) + c.Command("agentic:auth/revoke", core.Command{Description: "Revoke a platform API key", Action: s.cmdAuthRevoke}) c.Command("message/send", core.Command{Description: "Send a direct message to another agent", Action: s.cmdMessageSend}) c.Command("messages/send", core.Command{Description: "Send a direct message to another agent", Action: s.cmdMessageSend}) + c.Command("agentic:message/send", core.Command{Description: "Send a direct message to another agent", Action: s.cmdMessageSend}) + c.Command("agentic:messages/send", core.Command{Description: "Send a direct message to another agent", Action: s.cmdMessageSend}) c.Command("message/inbox", core.Command{Description: "List direct messages for an agent", Action: s.cmdMessageInbox}) c.Command("messages/inbox", core.Command{Description: "List direct messages for an agent", Action: s.cmdMessageInbox}) + c.Command("agentic:message/inbox", core.Command{Description: "List direct messages for an agent", Action: s.cmdMessageInbox}) + c.Command("agentic:messages/inbox", core.Command{Description: "List direct messages for an agent", Action: s.cmdMessageInbox}) c.Command("message/conversation", core.Command{Description: "List a direct conversation between two agents", Action: s.cmdMessageConversation}) c.Command("messages/conversation", core.Command{Description: "List a direct conversation between two agents", Action: s.cmdMessageConversation}) + c.Command("agentic:message/conversation", core.Command{Description: "List a direct conversation between two agents", Action: s.cmdMessageConversation}) + c.Command("agentic:messages/conversation", core.Command{Description: "List a direct conversation between two agents", Action: s.cmdMessageConversation}) c.Command("fleet/register", core.Command{Description: "Register a fleet node with the platform API", Action: s.cmdFleetRegister}) + c.Command("agentic:fleet/register", core.Command{Description: "Register a fleet node with the platform API", Action: s.cmdFleetRegister}) c.Command("fleet/heartbeat", core.Command{Description: "Send a heartbeat for a registered fleet node", Action: s.cmdFleetHeartbeat}) + c.Command("agentic:fleet/heartbeat", core.Command{Description: "Send a heartbeat for a registered fleet node", Action: s.cmdFleetHeartbeat}) c.Command("fleet/deregister", core.Command{Description: "Deregister a fleet node from the platform API", Action: s.cmdFleetDeregister}) + c.Command("agentic:fleet/deregister", core.Command{Description: "Deregister a fleet node from the platform API", Action: s.cmdFleetDeregister}) c.Command("fleet/nodes", core.Command{Description: "List registered fleet nodes", Action: s.cmdFleetNodes}) + c.Command("agentic:fleet/nodes", core.Command{Description: "List registered fleet nodes", Action: s.cmdFleetNodes}) c.Command("fleet/task/assign", core.Command{Description: "Assign a task to a fleet node", Action: s.cmdFleetTaskAssign}) + c.Command("agentic:fleet/task/assign", core.Command{Description: "Assign a task to a fleet node", Action: s.cmdFleetTaskAssign}) c.Command("fleet/task/complete", core.Command{Description: "Complete a fleet task and report findings", Action: s.cmdFleetTaskComplete}) + c.Command("agentic:fleet/task/complete", core.Command{Description: "Complete a fleet task and report findings", Action: s.cmdFleetTaskComplete}) c.Command("fleet/task/next", core.Command{Description: "Ask the platform for the next fleet task", Action: s.cmdFleetTaskNext}) + c.Command("agentic:fleet/task/next", core.Command{Description: "Ask the platform for the next fleet task", Action: s.cmdFleetTaskNext}) c.Command("fleet/stats", core.Command{Description: "Show fleet activity statistics", Action: s.cmdFleetStats}) + c.Command("agentic:fleet/stats", core.Command{Description: "Show fleet activity statistics", Action: s.cmdFleetStats}) c.Command("fleet/events", core.Command{Description: "Read the next fleet event from the platform SSE stream, falling back to polling when needed", Action: s.cmdFleetEvents}) + c.Command("agentic:fleet/events", core.Command{Description: "Read the next fleet event from the platform SSE stream, falling back to polling when needed", Action: s.cmdFleetEvents}) c.Command("credits/award", core.Command{Description: "Award credits to a fleet node", Action: s.cmdCreditsAward}) + c.Command("agentic:credits/award", core.Command{Description: "Award credits to a fleet node", Action: s.cmdCreditsAward}) c.Command("credits/balance", core.Command{Description: "Show credit balance for a fleet node", Action: s.cmdCreditsBalance}) + c.Command("agentic:credits/balance", core.Command{Description: "Show credit balance for a fleet node", Action: s.cmdCreditsBalance}) c.Command("credits/history", core.Command{Description: "Show credit history for a fleet node", Action: s.cmdCreditsHistory}) + c.Command("agentic:credits/history", core.Command{Description: "Show credit history for a fleet node", Action: s.cmdCreditsHistory}) c.Command("subscription/detect", core.Command{Description: "Detect available provider capabilities", Action: s.cmdSubscriptionDetect}) + c.Command("agentic:subscription/detect", core.Command{Description: "Detect available provider capabilities", Action: s.cmdSubscriptionDetect}) c.Command("subscription/budget", core.Command{Description: "Show compute budget for a fleet node", Action: s.cmdSubscriptionBudget}) + c.Command("agentic:subscription/budget", core.Command{Description: "Show compute budget for a fleet node", Action: s.cmdSubscriptionBudget}) c.Command("subscription/budget/update", core.Command{Description: "Update compute budget for a fleet node", Action: s.cmdSubscriptionUpdateBudget}) c.Command("subscription/update-budget", core.Command{Description: "Update compute budget for a fleet node", Action: s.cmdSubscriptionUpdateBudget}) + c.Command("agentic:subscription/budget/update", core.Command{Description: "Update compute budget for a fleet node", Action: s.cmdSubscriptionUpdateBudget}) + c.Command("agentic:subscription/update-budget", core.Command{Description: "Update compute budget for a fleet node", Action: s.cmdSubscriptionUpdateBudget}) } func (s *PrepSubsystem) cmdAuthProvision(options core.Options) core.Result { diff --git a/pkg/agentic/prep_test.go b/pkg/agentic/prep_test.go index 265d381..ad367dd 100644 --- a/pkg/agentic/prep_test.go +++ b/pkg/agentic/prep_test.go @@ -668,16 +668,27 @@ func TestPrep_OnStartup_Good_RegistersPlatformCommandAlias(t *testing.T) { require.True(t, s.OnStartup(context.Background()).OK) assert.Contains(t, c.Commands(), "auth/provision") + assert.Contains(t, c.Commands(), "agentic:auth/provision") assert.Contains(t, c.Commands(), "auth/revoke") + assert.Contains(t, c.Commands(), "agentic:auth/revoke") assert.Contains(t, c.Commands(), "message/send") assert.Contains(t, c.Commands(), "messages/send") + assert.Contains(t, c.Commands(), "agentic:message/send") + assert.Contains(t, c.Commands(), "agentic:messages/send") assert.Contains(t, c.Commands(), "message/inbox") assert.Contains(t, c.Commands(), "messages/inbox") + assert.Contains(t, c.Commands(), "agentic:message/inbox") + assert.Contains(t, c.Commands(), "agentic:messages/inbox") assert.Contains(t, c.Commands(), "message/conversation") assert.Contains(t, c.Commands(), "messages/conversation") + assert.Contains(t, c.Commands(), "agentic:message/conversation") + assert.Contains(t, c.Commands(), "agentic:messages/conversation") assert.Contains(t, c.Commands(), "subscription/budget/update") assert.Contains(t, c.Commands(), "subscription/update-budget") + assert.Contains(t, c.Commands(), "agentic:subscription/budget/update") + assert.Contains(t, c.Commands(), "agentic:subscription/update-budget") assert.Contains(t, c.Commands(), "fleet/events") + assert.Contains(t, c.Commands(), "agentic:fleet/events") } func TestPrep_RegisterTools_Good_RegistersCompletionTool(t *testing.T) {