ax(agentic): add platform command aliases

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 06:58:12 +00:00
parent 1dd6170dd4
commit e5472f6aa5
2 changed files with 38 additions and 0 deletions

View file

@ -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 {

View file

@ -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) {