@maiaos/cli 0.1.0-canary.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -0
- package/dist/address-space/address-space.d.ts +38 -0
- package/dist/address-space/address-space.js +130 -0
- package/dist/address-space/index.d.ts +2 -0
- package/dist/address-space/index.js +2 -0
- package/dist/agents/client.d.ts +171 -0
- package/dist/agents/client.js +8 -0
- package/dist/agents/commands.d.ts +7 -0
- package/dist/agents/commands.js +65 -0
- package/dist/agents/index.d.ts +3 -0
- package/dist/agents/index.js +3 -0
- package/dist/agents/input.d.ts +130 -0
- package/dist/agents/input.js +99 -0
- package/dist/agents/output/format.d.ts +8 -0
- package/dist/agents/output/format.js +47 -0
- package/dist/agents/output/index.d.ts +2 -0
- package/dist/agents/output/index.js +2 -0
- package/dist/agents/tree/index.d.ts +2 -0
- package/dist/agents/tree/index.js +2 -0
- package/dist/agents/tree/tree.d.ts +3 -0
- package/dist/agents/tree/tree.js +43 -0
- package/dist/bin/maia.NOTICES.txt +59 -0
- package/dist/bin/maia.cdx.json +168 -0
- package/dist/bin/maia.mjs +2 -0
- package/dist/bootstrap/exit.d.ts +14 -0
- package/dist/bootstrap/exit.js +42 -0
- package/dist/bootstrap/index.d.ts +3 -0
- package/dist/bootstrap/index.js +3 -0
- package/dist/bootstrap/process.d.ts +5 -0
- package/dist/bootstrap/process.js +23 -0
- package/dist/bootstrap/run.d.ts +25 -0
- package/dist/bootstrap/run.js +95 -0
- package/dist/bootstrap/stdio.d.ts +4 -0
- package/dist/bootstrap/stdio.js +9 -0
- package/dist/cli/cli.d.ts +17 -0
- package/dist/cli/cli.js +545 -0
- package/dist/cli/environment.d.ts +8 -0
- package/dist/cli/environment.js +12 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/services.d.ts +4 -0
- package/dist/cli/services.js +4 -0
- package/dist/command-line/context.d.ts +188 -0
- package/dist/command-line/context.js +2 -0
- package/dist/command-line/index.d.ts +7 -0
- package/dist/command-line/index.js +7 -0
- package/dist/command-line/input/arguments.d.ts +62 -0
- package/dist/command-line/input/arguments.js +232 -0
- package/dist/command-line/input/index.d.ts +4 -0
- package/dist/command-line/input/index.js +4 -0
- package/dist/command-line/input/prompt.d.ts +8 -0
- package/dist/command-line/input/prompt.js +44 -0
- package/dist/command-line/input/stdin-stream.d.ts +4 -0
- package/dist/command-line/input/stdin-stream.js +3 -0
- package/dist/command-line/input/stdin.d.ts +12 -0
- package/dist/command-line/input/stdin.js +24 -0
- package/dist/command-line/json-decoder.d.ts +3 -0
- package/dist/command-line/json-decoder.js +3 -0
- package/dist/command-line/json.d.ts +4 -0
- package/dist/command-line/json.js +27 -0
- package/dist/command-line/output.d.ts +64 -0
- package/dist/command-line/output.js +113 -0
- package/dist/command-line/rows.d.ts +12 -0
- package/dist/command-line/rows.js +41 -0
- package/dist/command-line/two-phase.d.ts +62 -0
- package/dist/command-line/two-phase.js +173 -0
- package/dist/command-receipt/command.d.ts +4 -0
- package/dist/command-receipt/command.js +59 -0
- package/dist/command-receipt/compact-list.d.ts +20 -0
- package/dist/command-receipt/compact-list.js +29 -0
- package/dist/command-receipt/index.d.ts +3 -0
- package/dist/command-receipt/index.js +3 -0
- package/dist/command-tree/commands.d.ts +17 -0
- package/dist/command-tree/commands.js +41 -0
- package/dist/command-tree/completion.d.ts +6 -0
- package/dist/command-tree/completion.js +36 -0
- package/dist/command-tree/grammar.d.ts +18 -0
- package/dist/command-tree/grammar.js +160 -0
- package/dist/command-tree/help.d.ts +62 -0
- package/dist/command-tree/help.js +220 -0
- package/dist/command-tree/index.d.ts +8 -0
- package/dist/command-tree/index.js +6 -0
- package/dist/command-tree/local.d.ts +3 -0
- package/dist/command-tree/local.js +138 -0
- package/dist/command-tree/placeholder.d.ts +4 -0
- package/dist/command-tree/placeholder.js +5 -0
- package/dist/command-tree/row.d.ts +31 -0
- package/dist/command-tree/row.js +2 -0
- package/dist/command-tree/suggest.d.ts +3 -0
- package/dist/command-tree/suggest.js +81 -0
- package/dist/command-tree/tree.d.ts +35 -0
- package/dist/command-tree/tree.js +140 -0
- package/dist/connection/access/client.d.ts +13 -0
- package/dist/connection/access/client.js +19 -0
- package/dist/connection/access/commands.d.ts +6 -0
- package/dist/connection/access/commands.js +60 -0
- package/dist/connection/access/format.d.ts +8 -0
- package/dist/connection/access/format.js +61 -0
- package/dist/connection/access/index.d.ts +3 -0
- package/dist/connection/access/index.js +3 -0
- package/dist/connection/access/input.d.ts +53 -0
- package/dist/connection/access/input.js +83 -0
- package/dist/connection/client.d.ts +790 -0
- package/dist/connection/client.js +36 -0
- package/dist/connection/commands.d.ts +15 -0
- package/dist/connection/commands.js +118 -0
- package/dist/connection/index.d.ts +8 -0
- package/dist/connection/index.js +8 -0
- package/dist/connection/input.d.ts +50 -0
- package/dist/connection/input.js +90 -0
- package/dist/connection/login.d.ts +13 -0
- package/dist/connection/login.js +69 -0
- package/dist/connection/output/format.d.ts +32 -0
- package/dist/connection/output/format.js +94 -0
- package/dist/connection/output/index.d.ts +2 -0
- package/dist/connection/output/index.js +2 -0
- package/dist/connection/resolve.d.ts +60 -0
- package/dist/connection/resolve.js +30 -0
- package/dist/connection/signin.d.ts +4 -0
- package/dist/connection/signin.js +32 -0
- package/dist/connection/system.d.ts +5 -0
- package/dist/connection/system.js +294 -0
- package/dist/connection/tree/index.d.ts +2 -0
- package/dist/connection/tree/index.js +2 -0
- package/dist/connection/tree/tree.d.ts +3 -0
- package/dist/connection/tree/tree.js +260 -0
- package/dist/container/client.d.ts +142 -0
- package/dist/container/client.js +11 -0
- package/dist/container/commands.d.ts +7 -0
- package/dist/container/commands.js +100 -0
- package/dist/container/index.d.ts +3 -0
- package/dist/container/index.js +3 -0
- package/dist/container/output/format.d.ts +11 -0
- package/dist/container/output/format.js +27 -0
- package/dist/container/output/index.d.ts +2 -0
- package/dist/container/output/index.js +2 -0
- package/dist/context/client.d.ts +7 -0
- package/dist/context/client.js +21 -0
- package/dist/context/commands.d.ts +3 -0
- package/dist/context/commands.js +27 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.js +3 -0
- package/dist/dashboard/cockpit-client.d.ts +6 -0
- package/dist/dashboard/cockpit-client.js +27 -0
- package/dist/dashboard/cockpits.d.ts +29 -0
- package/dist/dashboard/cockpits.js +65 -0
- package/dist/dashboard/dashboard.d.ts +7 -0
- package/dist/dashboard/dashboard.js +47 -0
- package/dist/dashboard/draw.d.ts +15 -0
- package/dist/dashboard/draw.js +30 -0
- package/dist/dashboard/frame.d.ts +4 -0
- package/dist/dashboard/frame.js +15 -0
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.js +2 -0
- package/dist/dashboard/modes.d.ts +5 -0
- package/dist/dashboard/modes.js +16 -0
- package/dist/dashboard/node-connection.d.ts +15 -0
- package/dist/dashboard/node-connection.js +51 -0
- package/dist/dashboard/pi-tui.d.ts +6 -0
- package/dist/dashboard/pi-tui.js +35 -0
- package/dist/dashboard/status-bar.d.ts +4 -0
- package/dist/dashboard/status-bar.js +60 -0
- package/dist/dashboard/terminal.d.ts +53 -0
- package/dist/dashboard/terminal.js +165 -0
- package/dist/dashboard/tree-model.d.ts +28 -0
- package/dist/dashboard/tree-model.js +97 -0
- package/dist/dashboard/tree.d.ts +10 -0
- package/dist/dashboard/tree.js +76 -0
- package/dist/development/cli.d.ts +3 -0
- package/dist/development/cli.js +44 -0
- package/dist/execution/client.d.ts +25 -0
- package/dist/execution/client.js +24 -0
- package/dist/execution/index.d.ts +3 -0
- package/dist/execution/index.js +3 -0
- package/dist/execution/relocation.d.ts +6 -0
- package/dist/execution/relocation.js +123 -0
- package/dist/execution/tree/index.d.ts +2 -0
- package/dist/execution/tree/index.js +2 -0
- package/dist/execution/tree/tree.d.ts +3 -0
- package/dist/execution/tree/tree.js +137 -0
- package/dist/fleet/fleet.d.ts +70 -0
- package/dist/fleet/fleet.js +91 -0
- package/dist/fleet/index.d.ts +2 -0
- package/dist/fleet/index.js +2 -0
- package/dist/hold/client.d.ts +137 -0
- package/dist/hold/client.js +12 -0
- package/dist/hold/commands.d.ts +5 -0
- package/dist/hold/commands.js +91 -0
- package/dist/hold/index.d.ts +3 -0
- package/dist/hold/index.js +3 -0
- package/dist/hold/output/format.d.ts +11 -0
- package/dist/hold/output/format.js +25 -0
- package/dist/hold/output/index.d.ts +2 -0
- package/dist/hold/output/index.js +2 -0
- package/dist/hold/tree/index.d.ts +2 -0
- package/dist/hold/tree/index.js +2 -0
- package/dist/hold/tree/tree.d.ts +3 -0
- package/dist/hold/tree/tree.js +97 -0
- package/dist/import/client.d.ts +14 -0
- package/dist/import/client.js +16 -0
- package/dist/import/commands.d.ts +5 -0
- package/dist/import/commands.js +75 -0
- package/dist/import/index.d.ts +3 -0
- package/dist/import/index.js +3 -0
- package/dist/import/input.d.ts +16 -0
- package/dist/import/input.js +92 -0
- package/dist/import/output.d.ts +6 -0
- package/dist/import/output.js +37 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/integration/client.d.ts +1284 -0
- package/dist/integration/client.js +24 -0
- package/dist/integration/commands.d.ts +10 -0
- package/dist/integration/commands.js +104 -0
- package/dist/integration/index.d.ts +3 -0
- package/dist/integration/index.js +3 -0
- package/dist/integration/output.d.ts +22 -0
- package/dist/integration/output.js +20 -0
- package/dist/local-node/call.d.ts +7 -0
- package/dist/local-node/call.js +13 -0
- package/dist/local-node/client.d.ts +72 -0
- package/dist/local-node/client.js +253 -0
- package/dist/local-node/index.d.ts +4 -0
- package/dist/local-node/index.js +4 -0
- package/dist/local-node/wait.d.ts +10 -0
- package/dist/local-node/wait.js +17 -0
- package/dist/login/agent-provider.d.ts +20 -0
- package/dist/login/agent-provider.js +109 -0
- package/dist/login/commands.d.ts +4 -0
- package/dist/login/commands.js +94 -0
- package/dist/login/failure.d.ts +3 -0
- package/dist/login/failure.js +14 -0
- package/dist/login/gateway.d.ts +12 -0
- package/dist/login/gateway.js +71 -0
- package/dist/login/index.d.ts +3 -0
- package/dist/login/index.js +2 -0
- package/dist/login/menu.d.ts +4 -0
- package/dist/login/menu.js +105 -0
- package/dist/login/output/format.d.ts +16 -0
- package/dist/login/output/format.js +31 -0
- package/dist/login/output/index.d.ts +2 -0
- package/dist/login/output/index.js +2 -0
- package/dist/login/vendor-account.d.ts +95 -0
- package/dist/login/vendor-account.js +75 -0
- package/dist/login/vendor-input.d.ts +14 -0
- package/dist/login/vendor-input.js +36 -0
- package/dist/mcp/calls.d.ts +8 -0
- package/dist/mcp/calls.js +236 -0
- package/dist/mcp/commands.d.ts +12 -0
- package/dist/mcp/commands.js +47 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/routing.d.ts +24 -0
- package/dist/mcp/routing.js +188 -0
- package/dist/mcp/server.d.ts +20 -0
- package/dist/mcp/server.js +80 -0
- package/dist/orchestration/client.d.ts +78 -0
- package/dist/orchestration/client.js +89 -0
- package/dist/orchestration/commands.d.ts +14 -0
- package/dist/orchestration/commands.js +312 -0
- package/dist/orchestration/index.d.ts +3 -0
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/output/compact-aggregate.d.ts +121 -0
- package/dist/orchestration/output/compact-aggregate.js +110 -0
- package/dist/orchestration/output/compact-run-list.d.ts +20 -0
- package/dist/orchestration/output/compact-run-list.js +16 -0
- package/dist/orchestration/output/human.d.ts +80 -0
- package/dist/orchestration/output/human.js +252 -0
- package/dist/orchestration/output/index.d.ts +4 -0
- package/dist/orchestration/output/index.js +4 -0
- package/dist/orchestration/tree/index.d.ts +2 -0
- package/dist/orchestration/tree/index.js +2 -0
- package/dist/orchestration/tree/tree.d.ts +3 -0
- package/dist/orchestration/tree/tree.js +142 -0
- package/dist/port-lease/client.d.ts +160 -0
- package/dist/port-lease/client.js +11 -0
- package/dist/port-lease/commands.d.ts +6 -0
- package/dist/port-lease/commands.js +17 -0
- package/dist/port-lease/index.d.ts +3 -0
- package/dist/port-lease/index.js +3 -0
- package/dist/port-lease/input.d.ts +65 -0
- package/dist/port-lease/input.js +67 -0
- package/dist/port-lease/output/format.d.ts +11 -0
- package/dist/port-lease/output/format.js +24 -0
- package/dist/port-lease/output/index.d.ts +2 -0
- package/dist/port-lease/output/index.js +2 -0
- package/dist/presentation/client.d.ts +10 -0
- package/dist/presentation/client.js +9 -0
- package/dist/presentation/commands.d.ts +6 -0
- package/dist/presentation/commands.js +78 -0
- package/dist/presentation/index.d.ts +4 -0
- package/dist/presentation/index.js +3 -0
- package/dist/presentation/output/format.d.ts +11 -0
- package/dist/presentation/output/format.js +33 -0
- package/dist/presentation/output/index.d.ts +3 -0
- package/dist/presentation/output/index.js +2 -0
- package/dist/project-guard/client.d.ts +88 -0
- package/dist/project-guard/client.js +7 -0
- package/dist/project-guard/commands.d.ts +4 -0
- package/dist/project-guard/commands.js +48 -0
- package/dist/project-guard/index.d.ts +3 -0
- package/dist/project-guard/index.js +3 -0
- package/dist/project-guard/input.d.ts +18 -0
- package/dist/project-guard/input.js +47 -0
- package/dist/project-guard/output/format.d.ts +11 -0
- package/dist/project-guard/output/format.js +35 -0
- package/dist/project-guard/output/index.d.ts +2 -0
- package/dist/project-guard/output/index.js +2 -0
- package/dist/project-workspace/client.d.ts +86 -0
- package/dist/project-workspace/client.js +159 -0
- package/dist/project-workspace/commands.d.ts +30 -0
- package/dist/project-workspace/commands.js +710 -0
- package/dist/project-workspace/index.d.ts +5 -0
- package/dist/project-workspace/index.js +5 -0
- package/dist/project-workspace/metadata-client.d.ts +99 -0
- package/dist/project-workspace/metadata-client.js +8 -0
- package/dist/project-workspace/metadata-commands.d.ts +4 -0
- package/dist/project-workspace/metadata-commands.js +56 -0
- package/dist/project-workspace/output/human.d.ts +139 -0
- package/dist/project-workspace/output/human.js +115 -0
- package/dist/project-workspace/output/index.d.ts +3 -0
- package/dist/project-workspace/output/index.js +3 -0
- package/dist/project-workspace/output/metadata.d.ts +11 -0
- package/dist/project-workspace/output/metadata.js +17 -0
- package/dist/project-workspace/tree/index.d.ts +2 -0
- package/dist/project-workspace/tree/index.js +2 -0
- package/dist/project-workspace/tree/tree.d.ts +3 -0
- package/dist/project-workspace/tree/tree.js +212 -0
- package/dist/provider/client.d.ts +6 -0
- package/dist/provider/client.js +5 -0
- package/dist/provider/commands.d.ts +3 -0
- package/dist/provider/commands.js +38 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.js +3 -0
- package/dist/reference/commands.d.ts +3 -0
- package/dist/reference/commands.js +41 -0
- package/dist/reference/index.d.ts +3 -0
- package/dist/reference/index.js +3 -0
- package/dist/reference/resolve.d.ts +31 -0
- package/dist/reference/resolve.js +304 -0
- package/dist/reference/tree/index.d.ts +2 -0
- package/dist/reference/tree/index.js +2 -0
- package/dist/reference/tree/tree.d.ts +3 -0
- package/dist/reference/tree/tree.js +17 -0
- package/dist/remote-node/client.d.ts +338 -0
- package/dist/remote-node/client.js +17 -0
- package/dist/remote-node/commands.d.ts +15 -0
- package/dist/remote-node/commands.js +342 -0
- package/dist/remote-node/connector.d.ts +67 -0
- package/dist/remote-node/connector.js +143 -0
- package/dist/remote-node/index.d.ts +4 -0
- package/dist/remote-node/index.js +4 -0
- package/dist/remote-node/reachability.d.ts +64 -0
- package/dist/remote-node/reachability.js +44 -0
- package/dist/remote-node/text.d.ts +10 -0
- package/dist/remote-node/text.js +111 -0
- package/dist/remote-node/tree/index.d.ts +2 -0
- package/dist/remote-node/tree/index.js +2 -0
- package/dist/remote-node/tree/tree.d.ts +3 -0
- package/dist/remote-node/tree/tree.js +71 -0
- package/dist/routine/client.d.ts +398 -0
- package/dist/routine/client.js +28 -0
- package/dist/routine/commands.d.ts +9 -0
- package/dist/routine/commands.js +109 -0
- package/dist/routine/index.d.ts +3 -0
- package/dist/routine/index.js +3 -0
- package/dist/routine/input.d.ts +28 -0
- package/dist/routine/input.js +44 -0
- package/dist/routine/output/format.d.ts +23 -0
- package/dist/routine/output/format.js +83 -0
- package/dist/routine/output/index.d.ts +2 -0
- package/dist/routine/output/index.js +2 -0
- package/dist/routine/tree/index.d.ts +2 -0
- package/dist/routine/tree/index.js +2 -0
- package/dist/routine/tree/tree.d.ts +3 -0
- package/dist/routine/tree/tree.js +70 -0
- package/dist/run-ledger/client.d.ts +358 -0
- package/dist/run-ledger/client.js +13 -0
- package/dist/run-ledger/commands.d.ts +8 -0
- package/dist/run-ledger/commands.js +19 -0
- package/dist/run-ledger/index.d.ts +3 -0
- package/dist/run-ledger/index.js +3 -0
- package/dist/run-ledger/input.d.ts +42 -0
- package/dist/run-ledger/input.js +107 -0
- package/dist/run-ledger/output/format.d.ts +11 -0
- package/dist/run-ledger/output/format.js +49 -0
- package/dist/run-ledger/output/index.d.ts +2 -0
- package/dist/run-ledger/output/index.js +2 -0
- package/dist/session/agent-permission.d.ts +63 -0
- package/dist/session/agent-permission.js +20 -0
- package/dist/session/approval/client.d.ts +117 -0
- package/dist/session/approval/client.js +7 -0
- package/dist/session/approval/commands.d.ts +7 -0
- package/dist/session/approval/commands.js +145 -0
- package/dist/session/approval/index.d.ts +3 -0
- package/dist/session/approval/index.js +3 -0
- package/dist/session/approval/output/format.d.ts +23 -0
- package/dist/session/approval/output/format.js +33 -0
- package/dist/session/approval/output/index.d.ts +2 -0
- package/dist/session/approval/output/index.js +2 -0
- package/dist/session/attach-client.d.ts +16 -0
- package/dist/session/attach-client.js +17 -0
- package/dist/session/attach-render.d.ts +16 -0
- package/dist/session/attach-render.js +162 -0
- package/dist/session/attach.d.ts +5 -0
- package/dist/session/attach.js +120 -0
- package/dist/session/client.d.ts +140 -0
- package/dist/session/client.js +129 -0
- package/dist/session/coding-client.d.ts +16 -0
- package/dist/session/coding-client.js +15 -0
- package/dist/session/coding-commands.d.ts +4 -0
- package/dist/session/coding-commands.js +50 -0
- package/dist/session/commands.d.ts +14 -0
- package/dist/session/commands.js +585 -0
- package/dist/session/create-tasks.d.ts +20 -0
- package/dist/session/create-tasks.js +128 -0
- package/dist/session/index.d.ts +9 -0
- package/dist/session/index.js +8 -0
- package/dist/session/interaction/client.d.ts +347 -0
- package/dist/session/interaction/client.js +15 -0
- package/dist/session/interaction/commands.d.ts +7 -0
- package/dist/session/interaction/commands.js +101 -0
- package/dist/session/interaction/index.d.ts +3 -0
- package/dist/session/interaction/index.js +3 -0
- package/dist/session/interaction/input.d.ts +15 -0
- package/dist/session/interaction/input.js +46 -0
- package/dist/session/interaction/output/format.d.ts +11 -0
- package/dist/session/interaction/output/format.js +4 -0
- package/dist/session/interaction/output/index.d.ts +2 -0
- package/dist/session/interaction/output/index.js +2 -0
- package/dist/session/output/diff.d.ts +3 -0
- package/dist/session/output/diff.js +23 -0
- package/dist/session/output/failure.d.ts +11 -0
- package/dist/session/output/failure.js +17 -0
- package/dist/session/output/human.d.ts +113 -0
- package/dist/session/output/human.js +82 -0
- package/dist/session/output/index.d.ts +6 -0
- package/dist/session/output/index.js +6 -0
- package/dist/session/output/observe.d.ts +4 -0
- package/dist/session/output/observe.js +46 -0
- package/dist/session/output/tasks.d.ts +34 -0
- package/dist/session/output/tasks.js +48 -0
- package/dist/session/rename.d.ts +3 -0
- package/dist/session/rename.js +37 -0
- package/dist/session/task-file.d.ts +5 -0
- package/dist/session/task-file.js +23 -0
- package/dist/session/tree/index.d.ts +2 -0
- package/dist/session/tree/index.js +2 -0
- package/dist/session/tree/tree.d.ts +3 -0
- package/dist/session/tree/tree.js +368 -0
- package/dist/session/turn/client.d.ts +28 -0
- package/dist/session/turn/client.js +51 -0
- package/dist/session/turn/commands.d.ts +8 -0
- package/dist/session/turn/commands.js +185 -0
- package/dist/session/turn/index.d.ts +4 -0
- package/dist/session/turn/index.js +3 -0
- package/dist/session/turn/output.d.ts +47 -0
- package/dist/session/turn/output.js +61 -0
- package/dist/status/client.d.ts +124 -0
- package/dist/status/client.js +5 -0
- package/dist/status/command.d.ts +4 -0
- package/dist/status/command.js +40 -0
- package/dist/status/doctor.d.ts +15 -0
- package/dist/status/doctor.js +111 -0
- package/dist/status/index.d.ts +5 -0
- package/dist/status/index.js +4 -0
- package/dist/status/output/compact.d.ts +32 -0
- package/dist/status/output/compact.js +49 -0
- package/dist/status/output/human.d.ts +7 -0
- package/dist/status/output/human.js +87 -0
- package/dist/status/output/index.d.ts +3 -0
- package/dist/status/output/index.js +3 -0
- package/dist/team-workspace/ceremony.d.ts +19 -0
- package/dist/team-workspace/ceremony.js +141 -0
- package/dist/team-workspace/client.d.ts +58 -0
- package/dist/team-workspace/client.js +6 -0
- package/dist/team-workspace/commands.d.ts +3 -0
- package/dist/team-workspace/commands.js +85 -0
- package/dist/team-workspace/confirmation.d.ts +4 -0
- package/dist/team-workspace/confirmation.js +8 -0
- package/dist/team-workspace/dependencies.d.ts +8 -0
- package/dist/team-workspace/dependencies.js +2 -0
- package/dist/team-workspace/index.d.ts +6 -0
- package/dist/team-workspace/index.js +5 -0
- package/dist/team-workspace/launcher.d.ts +17 -0
- package/dist/team-workspace/launcher.js +30 -0
- package/dist/team-workspace/output.d.ts +15 -0
- package/dist/team-workspace/output.js +28 -0
- package/dist/team-workspace/terminal.d.ts +9 -0
- package/dist/team-workspace/terminal.js +46 -0
- package/dist/terminal/arguments.d.ts +13 -0
- package/dist/terminal/arguments.js +79 -0
- package/dist/terminal/client.d.ts +83 -0
- package/dist/terminal/client.js +71 -0
- package/dist/terminal/commands.d.ts +7 -0
- package/dist/terminal/commands.js +143 -0
- package/dist/terminal/control-commands.d.ts +10 -0
- package/dist/terminal/control-commands.js +212 -0
- package/dist/terminal/index.d.ts +4 -0
- package/dist/terminal/index.js +4 -0
- package/dist/terminal/output/compact-list.d.ts +148 -0
- package/dist/terminal/output/compact-list.js +153 -0
- package/dist/terminal/output/human.d.ts +42 -0
- package/dist/terminal/output/human.js +55 -0
- package/dist/terminal/output/index.d.ts +3 -0
- package/dist/terminal/output/index.js +3 -0
- package/dist/terminal/tree/index.d.ts +2 -0
- package/dist/terminal/tree/index.js +2 -0
- package/dist/terminal/tree/tree.d.ts +3 -0
- package/dist/terminal/tree/tree.js +104 -0
- package/guidance/maia-cli/SKILL.md +58 -0
- package/guidance/maia-orchestration/SKILL.md +54 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @maiaos/cli
|
|
2
|
+
|
|
3
|
+
The `maia` command-line tool and MCP server for Maia OS: start, drive, observe
|
|
4
|
+
and stop swarms of AI coding agents (Claude Code and Codex workers) from a
|
|
5
|
+
terminal, a script or another agent.
|
|
6
|
+
|
|
7
|
+
> **Pre-release.** npm carries only `canary` builds (nightlies are historical; none are built since D-185), which are
|
|
8
|
+
> not release-qualified. No stable release exists
|
|
9
|
+
> ([D-132](https://github.com/vllnt/maia/blob/main/docs/decisions.md#d-132)).
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- Node.js 24.22.1.
|
|
14
|
+
- A running [Maia Node](https://github.com/vllnt/maia/blob/main/services/node/README.md).
|
|
15
|
+
- Claude Code or the Codex CLI, for workers.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm add -g @maiaos/cli@canary
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
From a source checkout, `pnpm dev:cli` installs `maia` for that checkout and
|
|
24
|
+
`pnpm maia <args>` runs it without installing. See the
|
|
25
|
+
[quick start](https://github.com/vllnt/maia#quick-start).
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
maia status # the Node reports ready
|
|
31
|
+
maia --json project list
|
|
32
|
+
maia --json project register . --name app --command-id project-1
|
|
33
|
+
maia --json session create --project <project-id> --executor codex-cli --base HEAD --message 'Fix the build' --command-id create-1
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`--json` prints one bounded JSON result for scripts and LLMs. A mutation takes
|
|
37
|
+
a command ID you choose; retry with the same one and the Node replays the first
|
|
38
|
+
result instead of acting twice. `maia help` lists every command, `maia help
|
|
39
|
+
--json` describes them, and `maia doctor` checks the installation, the Node and
|
|
40
|
+
the accounts.
|
|
41
|
+
|
|
42
|
+
`maia mcp` serves the same operations as MCP tools over stdio, and `maia agent`
|
|
43
|
+
runs Maia's own coding agent.
|
|
44
|
+
|
|
45
|
+
## Status
|
|
46
|
+
|
|
47
|
+
**Source candidate.** Every Node-facing command goes through
|
|
48
|
+
[`@maiaos/sdk`](https://github.com/vllnt/maia/blob/main/packages/sdk/README.md),
|
|
49
|
+
and many command families are release-disabled; `maia help --json` reports
|
|
50
|
+
each command's availability. The first-owner bootstrap of a Node
|
|
51
|
+
(`maia node bootstrap`) is a source candidate and release-disabled; see
|
|
52
|
+
[team Workspaces and Control Nodes](https://github.com/vllnt/maia/blob/main/docs/team-workspaces-and-control-nodes.md).
|
|
53
|
+
|
|
54
|
+
## Links
|
|
55
|
+
|
|
56
|
+
- [CLI reference](https://github.com/vllnt/maia/blob/main/docs/reference/cli.md):
|
|
57
|
+
grammar, JSON output and exit codes
|
|
58
|
+
- [Normative contracts](https://github.com/vllnt/maia/blob/main/docs/reference/contracts.md)
|
|
59
|
+
- [Security policy](https://github.com/vllnt/maia/blob/main/SECURITY.md)
|
|
60
|
+
- [Repository](https://github.com/vllnt/maia)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RouteKind } from "@maiaos/client-core/cockpit";
|
|
2
|
+
import { type CliCommandOutput, type CliDependencies, type CliTable, type CommandContext, type CommandEffect } from "../command-line/index.js";
|
|
3
|
+
import { type LeafRoute } from "../command-tree/index.js";
|
|
4
|
+
import { type HeldId, type ListedNode, type NodeAnswer } from "../fleet/index.js";
|
|
5
|
+
import type { CliNodeEffect, CliNodeResult } from "../local-node/index.js";
|
|
6
|
+
export declare const onHolder: (context: CommandContext, held: HeldId, run: (bound: CommandContext) => CommandEffect) => CommandEffect;
|
|
7
|
+
type InputRoute = {
|
|
8
|
+
readonly idOf: (input: object) => unknown;
|
|
9
|
+
readonly kind: RouteKind;
|
|
10
|
+
};
|
|
11
|
+
export declare const onInputHolder: (context: CommandContext, { idOf, kind }: InputRoute, run: (bound: CommandContext) => CommandEffect) => CommandEffect;
|
|
12
|
+
export type RoutedLeaf = {
|
|
13
|
+
readonly argument: LeafRoute;
|
|
14
|
+
readonly tokens: readonly string[];
|
|
15
|
+
readonly usage: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const routeLeaf: (context: CommandContext, { argument, tokens, usage }: RoutedLeaf, run: (bound: CommandContext) => CommandEffect) => CommandEffect;
|
|
18
|
+
export declare const nodeLines: (nodes: readonly ListedNode[]) => string;
|
|
19
|
+
export declare const formatMerged: <TItem extends {
|
|
20
|
+
readonly node: string;
|
|
21
|
+
}>({ items, nodes, }: {
|
|
22
|
+
readonly items: readonly TItem[];
|
|
23
|
+
readonly nodes: readonly ListedNode[];
|
|
24
|
+
}, row: (item: TItem) => string, { empty, headers }: CliTable) => string;
|
|
25
|
+
export declare const writeMerged: <TResult extends CliCommandOutput & {
|
|
26
|
+
readonly result: {
|
|
27
|
+
readonly nodes: readonly ListedNode[];
|
|
28
|
+
};
|
|
29
|
+
}>(context: CommandContext, output: TResult, text: (output: TResult) => string) => number;
|
|
30
|
+
type ListSpec<TList> = {
|
|
31
|
+
readonly merged: (answers: readonly NodeAnswer<TList>[]) => number;
|
|
32
|
+
readonly paged: boolean;
|
|
33
|
+
readonly read: (dependencies: CliDependencies) => CliNodeEffect<TList>;
|
|
34
|
+
readonly sole: (result: CliNodeResult<TList>) => number;
|
|
35
|
+
};
|
|
36
|
+
export declare const listEach: <TList>(context: CommandContext, { merged, paged, read, sole }: ListSpec<TList>) => CommandEffect;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=address-space.d.ts.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Result from "effect/Result";
|
|
3
|
+
import { cell, CliArgumentError, exitCodeOf, formatRows, LOCAL_NODE, peekStdin, reportError, writeSuccess, } from "../command-line/index.js";
|
|
4
|
+
import { ROUTE_ARGUMENT } from "../command-tree/index.js";
|
|
5
|
+
import { askEach, failureOf, fleetNodes, holderIn, refused, routes, } from "../fleet/index.js";
|
|
6
|
+
import { argumentValue } from "../reference/index.js";
|
|
7
|
+
const addressSpace = (context) => {
|
|
8
|
+
const { bindNode, dependencies, node } = context;
|
|
9
|
+
return fleetNodes({
|
|
10
|
+
bind: bindNode &&
|
|
11
|
+
((name) => ({ ...context, dependencies: bindNode(name), node: name })),
|
|
12
|
+
chosen: node !== undefined,
|
|
13
|
+
listRemoteNodes: dependencies.listRemoteNodes,
|
|
14
|
+
local: { node: node ?? LOCAL_NODE, reach: context },
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const readEach = (context, read, paged) => Effect.flatMap(addressSpace(context), (space) => {
|
|
18
|
+
if (!space.ok)
|
|
19
|
+
return Effect.succeed(space);
|
|
20
|
+
if (paged && space.value.length > 1)
|
|
21
|
+
return Effect.succeed(refused("invalid_argument", "A cursor pages one Node: pass '--node <name>' with '--after'."));
|
|
22
|
+
return Effect.map(askEach(space.value, (bound) => read(bound.dependencies)), (value) => ({ ok: true, value }));
|
|
23
|
+
});
|
|
24
|
+
const LOCAL_NAMES = "Names and prefixes resolve on this machine's Node; pass --node <name> or use an exact ID.";
|
|
25
|
+
const onAddressedNode = (context, run) => Effect.flatMap(addressSpace(context), (space) => run(space.ok && space.value.length > 1
|
|
26
|
+
? { ...context, notFoundHint: LOCAL_NAMES }
|
|
27
|
+
: context));
|
|
28
|
+
const PROBES = {
|
|
29
|
+
approval: (dependencies, approvalId) => dependencies.showApproval?.({ approvalId }) ??
|
|
30
|
+
Effect.die(new Error("Missing approval client.")),
|
|
31
|
+
command: (dependencies, id) => dependencies.getReceipt(id),
|
|
32
|
+
project: (dependencies, id) => dependencies.showProject(id),
|
|
33
|
+
routine: (dependencies, routineId) => dependencies.showRoutine?.({ routineId }) ??
|
|
34
|
+
Effect.die(new Error("Missing routine client.")),
|
|
35
|
+
session: (dependencies, id) => dependencies.showSession(id),
|
|
36
|
+
terminal: (dependencies, id) => dependencies.showTerminal(id),
|
|
37
|
+
turn: (dependencies, id) => dependencies.showTurn(id),
|
|
38
|
+
workspace: (dependencies, id) => dependencies.showWorkspace(id),
|
|
39
|
+
};
|
|
40
|
+
const isRouteKind = (word) => Object.hasOwn(PROBES, word);
|
|
41
|
+
const CHOOSE_NODE = "pass --node <name>";
|
|
42
|
+
const findHolder = (context, nodes, held) => Effect.map(holderIn(nodes, held, {
|
|
43
|
+
choose: CHOOSE_NODE,
|
|
44
|
+
probe: (bound) => PROBES[held.kind](bound.dependencies, held.id),
|
|
45
|
+
}), (holder) => Result.isSuccess(holder)
|
|
46
|
+
? holder.success
|
|
47
|
+
: reportError(holder.failure.error, {
|
|
48
|
+
...context,
|
|
49
|
+
nodes: holder.failure.holdings,
|
|
50
|
+
}));
|
|
51
|
+
export const onHolder = (context, held, run) => Effect.gen(function* () {
|
|
52
|
+
if (!routes(held))
|
|
53
|
+
return yield* onAddressedNode(context, run);
|
|
54
|
+
const space = yield* addressSpace(context);
|
|
55
|
+
if (!space.ok)
|
|
56
|
+
return reportError(space.error, context);
|
|
57
|
+
const [only, ...others] = space.value;
|
|
58
|
+
if (only !== undefined && others.length === 0)
|
|
59
|
+
return yield* run(only.reach);
|
|
60
|
+
const holder = yield* findHolder(context, space.value, held);
|
|
61
|
+
if (typeof holder === "number")
|
|
62
|
+
return holder;
|
|
63
|
+
if (!context.json)
|
|
64
|
+
context.io.stderr(`node: ${holder.node} (holds ${held.id})\n`);
|
|
65
|
+
const resolution = {
|
|
66
|
+
argument: "--node",
|
|
67
|
+
id: holder.node,
|
|
68
|
+
kind: "node",
|
|
69
|
+
match: "id",
|
|
70
|
+
reference: held.id,
|
|
71
|
+
};
|
|
72
|
+
return yield* run({
|
|
73
|
+
...holder.reach,
|
|
74
|
+
node: holder.node,
|
|
75
|
+
resolved: [...(holder.reach.resolved ?? []), resolution],
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
export const onInputHolder = (context, { idOf, kind }, run) => context.node !== undefined || context.bindNode === undefined
|
|
79
|
+
? run(context)
|
|
80
|
+
: Effect.flatMap(peekStdin(context), ({ context: replayed, input }) => {
|
|
81
|
+
const id = typeof input === "object" && input !== null ? idOf(input) : undefined;
|
|
82
|
+
return typeof id === "string"
|
|
83
|
+
? onHolder(replayed, { id, kind }, run)
|
|
84
|
+
: run(replayed);
|
|
85
|
+
});
|
|
86
|
+
export const routeLeaf = (context, { argument, tokens, usage }, run) => {
|
|
87
|
+
const names = [argument].flat();
|
|
88
|
+
const kinds = names.map((name) => ROUTE_ARGUMENT.exec(name)?.[1] ?? "");
|
|
89
|
+
if (!kinds.every(isRouteKind))
|
|
90
|
+
return Effect.die(new Error(`No route kind for ${names.join(" or ")}.`));
|
|
91
|
+
return Effect.flatMap(Effect.forEach(names, (name) => argumentValue(usage, tokens, name)), (values) => {
|
|
92
|
+
if (values.filter((value) => value !== undefined).length > 1)
|
|
93
|
+
return Effect.fail(new CliArgumentError(`Give one of ${names.join(" or ")}.`));
|
|
94
|
+
const index = values.findIndex((value) => value !== undefined);
|
|
95
|
+
const [id, kind] = [values[index], kinds[index]];
|
|
96
|
+
return id === undefined || kind === undefined
|
|
97
|
+
? run(context)
|
|
98
|
+
: onHolder(context, { id, kind }, run);
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
export const nodeLines = (nodes) => nodes
|
|
102
|
+
.map(({ error, nextCursor, node }) => {
|
|
103
|
+
if (error !== undefined)
|
|
104
|
+
return `error: ${node}: ${cell(error.message)}\n`;
|
|
105
|
+
return nextCursor === undefined
|
|
106
|
+
? ""
|
|
107
|
+
: `next: --node ${node} --after ${nextCursor}\n`;
|
|
108
|
+
})
|
|
109
|
+
.join("");
|
|
110
|
+
export const formatMerged = ({ items, nodes, }, row, { empty, headers }) => `${formatRows(items, (item) => `${item.node}\t${row(item)}`, {
|
|
111
|
+
empty,
|
|
112
|
+
headers: ["NODE", ...headers],
|
|
113
|
+
})}${nodeLines(nodes)}`;
|
|
114
|
+
export const writeMerged = (context, output, text) => {
|
|
115
|
+
const failed = failureOf(output.result.nodes);
|
|
116
|
+
writeSuccess(output, {
|
|
117
|
+
...context,
|
|
118
|
+
...(failed === undefined ? { ok: true } : { error: failed, ok: false }),
|
|
119
|
+
}, text);
|
|
120
|
+
return failed === undefined ? 0 : exitCodeOf(failed);
|
|
121
|
+
};
|
|
122
|
+
export const listEach = (context, { merged, paged, read, sole }) => Effect.map(readEach(context, read, paged), (answers) => {
|
|
123
|
+
if (!answers.ok)
|
|
124
|
+
return reportError(answers.error, context);
|
|
125
|
+
const [only, ...others] = answers.value;
|
|
126
|
+
return only !== undefined && others.length === 0
|
|
127
|
+
? sole(only.result)
|
|
128
|
+
: merged(answers.value);
|
|
129
|
+
});
|
|
130
|
+
//# sourceMappingURL=address-space.js.map
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { type AgentsChangeConfirmParameters, type AgentsChangePreviewParameters, type AgentsListParameters, type AgentsShowParameters } from "@maiaos/sdk";
|
|
2
|
+
import type { CliNodeOperations } from "../local-node/index.js";
|
|
3
|
+
export declare const makeAgentsClient: (node: CliNodeOperations) => {
|
|
4
|
+
confirmAgentChange: (input: AgentsChangeConfirmParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
5
|
+
readonly actorId: string;
|
|
6
|
+
readonly agent: {
|
|
7
|
+
readonly contentDigest: string;
|
|
8
|
+
readonly createdAt: string;
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly projectId: string;
|
|
11
|
+
readonly revision: string;
|
|
12
|
+
readonly schemaVersion: "maia.agent/v1";
|
|
13
|
+
readonly spec: {
|
|
14
|
+
readonly accountableActorId: string;
|
|
15
|
+
readonly connectionId?: string | undefined;
|
|
16
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
17
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
18
|
+
readonly homeSessionId?: string | undefined;
|
|
19
|
+
readonly instruction: string;
|
|
20
|
+
readonly managerAgentId?: string | undefined;
|
|
21
|
+
readonly model?: string | undefined;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly placement: "local";
|
|
24
|
+
};
|
|
25
|
+
readonly state: "active" | "disabled";
|
|
26
|
+
readonly updatedAt: string;
|
|
27
|
+
};
|
|
28
|
+
readonly commandId: string;
|
|
29
|
+
readonly delivery: "duplicate" | "new";
|
|
30
|
+
readonly inputDigest: string;
|
|
31
|
+
readonly kind: "create" | "disable" | "revise";
|
|
32
|
+
readonly method: "agents.change.confirm";
|
|
33
|
+
readonly receipt: {
|
|
34
|
+
readonly actorId: string;
|
|
35
|
+
readonly aggregateRevision: string;
|
|
36
|
+
readonly commandId: string;
|
|
37
|
+
readonly createdAt: string;
|
|
38
|
+
readonly eventCursor: string;
|
|
39
|
+
readonly method: string;
|
|
40
|
+
readonly receiptId: string;
|
|
41
|
+
readonly schemaVersion: 1;
|
|
42
|
+
readonly state: "succeeded";
|
|
43
|
+
readonly target: {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly type: string;
|
|
46
|
+
};
|
|
47
|
+
readonly updatedAt: string;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
listAgents: (input: AgentsListParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
51
|
+
readonly items: readonly {
|
|
52
|
+
readonly contentDigest: string;
|
|
53
|
+
readonly createdAt: string;
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly projectId: string;
|
|
56
|
+
readonly revision: string;
|
|
57
|
+
readonly schemaVersion: "maia.agent/v1";
|
|
58
|
+
readonly spec: {
|
|
59
|
+
readonly accountableActorId: string;
|
|
60
|
+
readonly connectionId?: string | undefined;
|
|
61
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
62
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
63
|
+
readonly homeSessionId?: string | undefined;
|
|
64
|
+
readonly instruction: string;
|
|
65
|
+
readonly managerAgentId?: string | undefined;
|
|
66
|
+
readonly model?: string | undefined;
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly placement: "local";
|
|
69
|
+
};
|
|
70
|
+
readonly state: "active" | "disabled";
|
|
71
|
+
readonly updatedAt: string;
|
|
72
|
+
}[];
|
|
73
|
+
readonly method: "agents.list";
|
|
74
|
+
readonly nextCursor?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
previewAgentChange: (input: AgentsChangePreviewParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
77
|
+
readonly change: {
|
|
78
|
+
readonly kind: "create";
|
|
79
|
+
readonly projectId: string;
|
|
80
|
+
readonly spec: {
|
|
81
|
+
readonly accountableActorId: string;
|
|
82
|
+
readonly connectionId?: string | undefined;
|
|
83
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
84
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
85
|
+
readonly homeSessionId?: string | undefined;
|
|
86
|
+
readonly instruction: string;
|
|
87
|
+
readonly managerAgentId?: string | undefined;
|
|
88
|
+
readonly model?: string | undefined;
|
|
89
|
+
readonly name: string;
|
|
90
|
+
readonly placement: "local";
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
readonly agentId: string;
|
|
94
|
+
readonly expectedRevision: string;
|
|
95
|
+
readonly kind: "revise";
|
|
96
|
+
readonly spec: {
|
|
97
|
+
readonly accountableActorId: string;
|
|
98
|
+
readonly connectionId?: string | undefined;
|
|
99
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
100
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
101
|
+
readonly homeSessionId?: string | undefined;
|
|
102
|
+
readonly instruction: string;
|
|
103
|
+
readonly managerAgentId?: string | undefined;
|
|
104
|
+
readonly model?: string | undefined;
|
|
105
|
+
readonly name: string;
|
|
106
|
+
readonly placement: "local";
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
readonly agentId: string;
|
|
110
|
+
readonly expectedRevision: string;
|
|
111
|
+
readonly kind: "disable";
|
|
112
|
+
};
|
|
113
|
+
readonly commandId: string;
|
|
114
|
+
readonly inputDigest: string;
|
|
115
|
+
readonly proof: string;
|
|
116
|
+
readonly actorId: string;
|
|
117
|
+
readonly agentId: string;
|
|
118
|
+
readonly current?: {
|
|
119
|
+
readonly contentDigest: string;
|
|
120
|
+
readonly createdAt: string;
|
|
121
|
+
readonly id: string;
|
|
122
|
+
readonly projectId: string;
|
|
123
|
+
readonly revision: string;
|
|
124
|
+
readonly schemaVersion: "maia.agent/v1";
|
|
125
|
+
readonly spec: {
|
|
126
|
+
readonly accountableActorId: string;
|
|
127
|
+
readonly connectionId?: string | undefined;
|
|
128
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
129
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
130
|
+
readonly homeSessionId?: string | undefined;
|
|
131
|
+
readonly instruction: string;
|
|
132
|
+
readonly managerAgentId?: string | undefined;
|
|
133
|
+
readonly model?: string | undefined;
|
|
134
|
+
readonly name: string;
|
|
135
|
+
readonly placement: "local";
|
|
136
|
+
};
|
|
137
|
+
readonly state: "active" | "disabled";
|
|
138
|
+
readonly updatedAt: string;
|
|
139
|
+
} | undefined;
|
|
140
|
+
readonly expiresAt: string;
|
|
141
|
+
readonly issuedAt: string;
|
|
142
|
+
readonly method: "agents.change.preview";
|
|
143
|
+
}>;
|
|
144
|
+
showAgent: (input: AgentsShowParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
145
|
+
readonly agent: {
|
|
146
|
+
readonly contentDigest: string;
|
|
147
|
+
readonly createdAt: string;
|
|
148
|
+
readonly id: string;
|
|
149
|
+
readonly projectId: string;
|
|
150
|
+
readonly revision: string;
|
|
151
|
+
readonly schemaVersion: "maia.agent/v1";
|
|
152
|
+
readonly spec: {
|
|
153
|
+
readonly accountableActorId: string;
|
|
154
|
+
readonly connectionId?: string | undefined;
|
|
155
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
156
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
157
|
+
readonly homeSessionId?: string | undefined;
|
|
158
|
+
readonly instruction: string;
|
|
159
|
+
readonly managerAgentId?: string | undefined;
|
|
160
|
+
readonly model?: string | undefined;
|
|
161
|
+
readonly name: string;
|
|
162
|
+
readonly placement: "local";
|
|
163
|
+
};
|
|
164
|
+
readonly state: "active" | "disabled";
|
|
165
|
+
readonly updatedAt: string;
|
|
166
|
+
};
|
|
167
|
+
readonly method: "agents.show";
|
|
168
|
+
}>;
|
|
169
|
+
};
|
|
170
|
+
export type AgentsCliDependencies = ReturnType<typeof makeAgentsClient>;
|
|
171
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { agentsChangeConfirmParametersSchema, agentsChangePreviewParametersSchema, agentsListParametersSchema, agentsShowParametersSchema, } from "@maiaos/sdk";
|
|
2
|
+
export const makeAgentsClient = (node) => ({
|
|
3
|
+
confirmAgentChange: (input) => node.runValidatedNodeOperation(input, agentsChangeConfirmParametersSchema, (client, parameters, options) => client.confirmAgentChange(parameters, options), { commandId: input.commandId }),
|
|
4
|
+
listAgents: (input) => node.runValidatedNodeOperation(input, agentsListParametersSchema, (client, parameters, options) => client.listAgents(parameters, options)),
|
|
5
|
+
previewAgentChange: (input) => node.runValidatedNodeOperation(input, agentsChangePreviewParametersSchema, (client, parameters, options) => client.previewAgentChange(parameters, options)),
|
|
6
|
+
showAgent: (input) => node.runValidatedNodeOperation(input, agentsShowParametersSchema, (client, parameters, options) => client.showAgent(parameters, options)),
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CommandContext, type CommandEffect } from "../command-line/index.js";
|
|
2
|
+
export declare const runAgentsList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
3
|
+
export declare const runAgentsShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
4
|
+
export declare const runAgentsCreate: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
5
|
+
export declare const runAgentsRevise: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
6
|
+
export declare const runAgentsDisable: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
7
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { agentsChangeConfirmParametersSchema, } from "@maiaos/sdk";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { CliArgumentError, confirmParameters, parseOptions, readTwoPhaseMode, requirePositionals, runTwoPhase, TWO_PHASE_FLAGS, writeNodeResult, } from "../command-line/index.js";
|
|
4
|
+
import { AGENT_OPTIONS, readAgentsList, readAgentsShow, readCreateChange, readDisableChange, readReviseChange, } from "./input.js";
|
|
5
|
+
import { formatAgentsResult } from "./output/index.js";
|
|
6
|
+
const write = (context) => (result) => writeNodeResult(result, context, {
|
|
7
|
+
toResult: (value) => ({ command: value.method, result: value }),
|
|
8
|
+
toText: formatAgentsResult,
|
|
9
|
+
});
|
|
10
|
+
export const runAgentsList = (tokens, context) => Effect.gen(function* () {
|
|
11
|
+
const list = context.dependencies.listAgents;
|
|
12
|
+
if (list === undefined)
|
|
13
|
+
return yield* Effect.die(new Error("Missing Agents client."));
|
|
14
|
+
return write(context)(yield* list(readAgentsList(tokens)));
|
|
15
|
+
});
|
|
16
|
+
export const runAgentsShow = (tokens, context) => Effect.gen(function* () {
|
|
17
|
+
const show = context.dependencies.showAgent;
|
|
18
|
+
if (show === undefined)
|
|
19
|
+
return yield* Effect.die(new Error("Missing Agents client."));
|
|
20
|
+
return write(context)(yield* show(readAgentsShow(tokens)));
|
|
21
|
+
});
|
|
22
|
+
const describe = (preview) => formatAgentsResult({ command: preview.method, result: preview });
|
|
23
|
+
const confirmOwnKind = (kind, confirm) => (preview) => Effect.flatMap(confirmParameters(agentsChangeConfirmParametersSchema, preview, [
|
|
24
|
+
"agentId",
|
|
25
|
+
"current",
|
|
26
|
+
]), (parameters) => parameters.change.kind === kind
|
|
27
|
+
? confirm(parameters)
|
|
28
|
+
: Effect.fail(new CliArgumentError(`The piped preview is a ${parameters.change.kind} change; confirm it with 'maia agents ${parameters.change.kind} --confirm-stdin'.`)));
|
|
29
|
+
const runChange = (tokens, context, spec) => Effect.gen(function* () {
|
|
30
|
+
const parsed = parseOptions(tokens, spec.options, new Set(TWO_PHASE_FLAGS));
|
|
31
|
+
const mode = readTwoPhaseMode(parsed.flags, context);
|
|
32
|
+
if (mode === "confirm-stdin")
|
|
33
|
+
requirePositionals(parsed.positionals, 0);
|
|
34
|
+
const { confirmAgentChange, previewAgentChange } = context.dependencies;
|
|
35
|
+
if (confirmAgentChange === undefined || previewAgentChange === undefined)
|
|
36
|
+
return yield* new CliArgumentError("Agent changes are unavailable.");
|
|
37
|
+
return yield* runTwoPhase({
|
|
38
|
+
confirm: confirmOwnKind(spec.kind, confirmAgentChange),
|
|
39
|
+
context,
|
|
40
|
+
mode,
|
|
41
|
+
preview: () => Effect.flatMap(spec.read(parsed), previewAgentChange),
|
|
42
|
+
prompt: { describe, question: spec.question },
|
|
43
|
+
writeConfirm: write(context),
|
|
44
|
+
writePreview: write(context),
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
export const runAgentsCreate = (tokens, context) => runChange(tokens, context, {
|
|
48
|
+
kind: "create",
|
|
49
|
+
options: AGENT_OPTIONS.create,
|
|
50
|
+
question: "Create this Agent?",
|
|
51
|
+
read: readCreateChange,
|
|
52
|
+
});
|
|
53
|
+
export const runAgentsRevise = (tokens, context) => runChange(tokens, context, {
|
|
54
|
+
kind: "revise",
|
|
55
|
+
options: AGENT_OPTIONS.revise,
|
|
56
|
+
question: "Revise this Agent?",
|
|
57
|
+
read: readReviseChange,
|
|
58
|
+
});
|
|
59
|
+
export const runAgentsDisable = (tokens, context) => runChange(tokens, context, {
|
|
60
|
+
kind: "disable",
|
|
61
|
+
options: AGENT_OPTIONS.disable,
|
|
62
|
+
question: "Disable this Agent for good?",
|
|
63
|
+
read: readDisableChange,
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type AgentsListParameters, type AgentsShowParameters } from "@maiaos/sdk";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { type ParsedOptions } from "../command-line/index.js";
|
|
4
|
+
export declare const AGENT_OPTIONS: {
|
|
5
|
+
readonly create: Set<string>;
|
|
6
|
+
readonly disable: Set<string>;
|
|
7
|
+
readonly list: Set<string>;
|
|
8
|
+
readonly revise: Set<string>;
|
|
9
|
+
readonly show: Set<string>;
|
|
10
|
+
};
|
|
11
|
+
export declare const readAgentsList: (tokens: readonly string[]) => AgentsListParameters;
|
|
12
|
+
export declare const readAgentsShow: (tokens: readonly string[]) => AgentsShowParameters;
|
|
13
|
+
export declare const readCreateChange: (parsed: ParsedOptions) => Effect.Effect<{
|
|
14
|
+
change: {
|
|
15
|
+
readonly kind: "create";
|
|
16
|
+
readonly projectId: string;
|
|
17
|
+
readonly spec: {
|
|
18
|
+
readonly accountableActorId: string;
|
|
19
|
+
readonly connectionId?: string | undefined;
|
|
20
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
21
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
22
|
+
readonly homeSessionId?: string | undefined;
|
|
23
|
+
readonly instruction: string;
|
|
24
|
+
readonly managerAgentId?: string | undefined;
|
|
25
|
+
readonly model?: string | undefined;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly placement: "local";
|
|
28
|
+
};
|
|
29
|
+
} | {
|
|
30
|
+
readonly agentId: string;
|
|
31
|
+
readonly expectedRevision: string;
|
|
32
|
+
readonly kind: "revise";
|
|
33
|
+
readonly spec: {
|
|
34
|
+
readonly accountableActorId: string;
|
|
35
|
+
readonly connectionId?: string | undefined;
|
|
36
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
37
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
38
|
+
readonly homeSessionId?: string | undefined;
|
|
39
|
+
readonly instruction: string;
|
|
40
|
+
readonly managerAgentId?: string | undefined;
|
|
41
|
+
readonly model?: string | undefined;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly placement: "local";
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
readonly agentId: string;
|
|
47
|
+
readonly expectedRevision: string;
|
|
48
|
+
readonly kind: "disable";
|
|
49
|
+
};
|
|
50
|
+
commandId: string;
|
|
51
|
+
}, never, import("effect/Crypto").Crypto>;
|
|
52
|
+
export declare const readReviseChange: (parsed: ParsedOptions) => Effect.Effect<{
|
|
53
|
+
change: {
|
|
54
|
+
readonly kind: "create";
|
|
55
|
+
readonly projectId: string;
|
|
56
|
+
readonly spec: {
|
|
57
|
+
readonly accountableActorId: string;
|
|
58
|
+
readonly connectionId?: string | undefined;
|
|
59
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
60
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
61
|
+
readonly homeSessionId?: string | undefined;
|
|
62
|
+
readonly instruction: string;
|
|
63
|
+
readonly managerAgentId?: string | undefined;
|
|
64
|
+
readonly model?: string | undefined;
|
|
65
|
+
readonly name: string;
|
|
66
|
+
readonly placement: "local";
|
|
67
|
+
};
|
|
68
|
+
} | {
|
|
69
|
+
readonly agentId: string;
|
|
70
|
+
readonly expectedRevision: string;
|
|
71
|
+
readonly kind: "revise";
|
|
72
|
+
readonly spec: {
|
|
73
|
+
readonly accountableActorId: string;
|
|
74
|
+
readonly connectionId?: string | undefined;
|
|
75
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
76
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
77
|
+
readonly homeSessionId?: string | undefined;
|
|
78
|
+
readonly instruction: string;
|
|
79
|
+
readonly managerAgentId?: string | undefined;
|
|
80
|
+
readonly model?: string | undefined;
|
|
81
|
+
readonly name: string;
|
|
82
|
+
readonly placement: "local";
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
readonly agentId: string;
|
|
86
|
+
readonly expectedRevision: string;
|
|
87
|
+
readonly kind: "disable";
|
|
88
|
+
};
|
|
89
|
+
commandId: string;
|
|
90
|
+
}, never, import("effect/Crypto").Crypto>;
|
|
91
|
+
export declare const readDisableChange: (parsed: ParsedOptions) => Effect.Effect<{
|
|
92
|
+
change: {
|
|
93
|
+
readonly kind: "create";
|
|
94
|
+
readonly projectId: string;
|
|
95
|
+
readonly spec: {
|
|
96
|
+
readonly accountableActorId: string;
|
|
97
|
+
readonly connectionId?: string | undefined;
|
|
98
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
99
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
100
|
+
readonly homeSessionId?: string | undefined;
|
|
101
|
+
readonly instruction: string;
|
|
102
|
+
readonly managerAgentId?: string | undefined;
|
|
103
|
+
readonly model?: string | undefined;
|
|
104
|
+
readonly name: string;
|
|
105
|
+
readonly placement: "local";
|
|
106
|
+
};
|
|
107
|
+
} | {
|
|
108
|
+
readonly agentId: string;
|
|
109
|
+
readonly expectedRevision: string;
|
|
110
|
+
readonly kind: "revise";
|
|
111
|
+
readonly spec: {
|
|
112
|
+
readonly accountableActorId: string;
|
|
113
|
+
readonly connectionId?: string | undefined;
|
|
114
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
115
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
116
|
+
readonly homeSessionId?: string | undefined;
|
|
117
|
+
readonly instruction: string;
|
|
118
|
+
readonly managerAgentId?: string | undefined;
|
|
119
|
+
readonly model?: string | undefined;
|
|
120
|
+
readonly name: string;
|
|
121
|
+
readonly placement: "local";
|
|
122
|
+
};
|
|
123
|
+
} | {
|
|
124
|
+
readonly agentId: string;
|
|
125
|
+
readonly expectedRevision: string;
|
|
126
|
+
readonly kind: "disable";
|
|
127
|
+
};
|
|
128
|
+
commandId: string;
|
|
129
|
+
}, never, import("effect/Crypto").Crypto>;
|
|
130
|
+
//# sourceMappingURL=input.d.ts.map
|