@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
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { OrchestrationAggregate, OrchestrationDelivery, OrchestrationDispatchSettleTerminalResult, OrchestrationDispatchShowResult, OrchestrationInboxAckResult, OrchestrationQuestion, OrchestrationQuestionCancelResult, OrchestrationQuestionOpenResult, OrchestrationQuestionReplyResult, OrchestrationRunCreateResult, OrchestrationRunShowResult } from "@maiaos/sdk";
|
|
2
|
+
type ProtocolDispatch = OrchestrationDispatchShowResult["dispatch"];
|
|
3
|
+
type ProtocolReceipt = OrchestrationRunCreateResult["receipt"];
|
|
4
|
+
export type CliDispatchShowDispatch = {
|
|
5
|
+
readonly attemptId: ProtocolDispatch["attemptId"];
|
|
6
|
+
readonly failure?: Extract<ProtocolDispatch, {
|
|
7
|
+
readonly state: "failed";
|
|
8
|
+
}>["failure"];
|
|
9
|
+
readonly id: ProtocolDispatch["id"];
|
|
10
|
+
readonly revision: ProtocolDispatch["revision"];
|
|
11
|
+
readonly runId: ProtocolDispatch["runId"];
|
|
12
|
+
readonly state: ProtocolDispatch["state"];
|
|
13
|
+
readonly taskId: ProtocolDispatch["taskId"];
|
|
14
|
+
readonly terminalId: ProtocolDispatch["terminalId"];
|
|
15
|
+
};
|
|
16
|
+
type CliCompactMailbox = {
|
|
17
|
+
readonly id: OrchestrationAggregate["mailboxes"][number]["id"];
|
|
18
|
+
readonly owner: OrchestrationAggregate["mailboxes"][number]["owner"];
|
|
19
|
+
readonly revision: OrchestrationAggregate["mailboxes"][number]["revision"];
|
|
20
|
+
};
|
|
21
|
+
export type CliCompactQuestion = {
|
|
22
|
+
readonly answer?: Extract<OrchestrationQuestion, {
|
|
23
|
+
readonly state: "answered";
|
|
24
|
+
}>["answer"];
|
|
25
|
+
readonly body: OrchestrationQuestion["body"];
|
|
26
|
+
readonly id: OrchestrationQuestion["id"];
|
|
27
|
+
readonly revision: OrchestrationQuestion["revision"];
|
|
28
|
+
readonly state: OrchestrationQuestion["state"];
|
|
29
|
+
readonly subject: OrchestrationQuestion["subject"];
|
|
30
|
+
readonly taskId: OrchestrationQuestion["taskId"];
|
|
31
|
+
};
|
|
32
|
+
type CliCompactAggregate = {
|
|
33
|
+
readonly attempt: {
|
|
34
|
+
readonly id: OrchestrationAggregate["attempt"]["id"];
|
|
35
|
+
readonly revision: OrchestrationAggregate["attempt"]["revision"];
|
|
36
|
+
readonly state: OrchestrationAggregate["attempt"]["state"];
|
|
37
|
+
readonly taskId: OrchestrationAggregate["attempt"]["taskId"];
|
|
38
|
+
};
|
|
39
|
+
readonly dispatch: CliDispatchShowDispatch;
|
|
40
|
+
readonly mailboxes: readonly CliCompactMailbox[];
|
|
41
|
+
readonly question?: CliCompactQuestion;
|
|
42
|
+
readonly run: {
|
|
43
|
+
readonly dispatchTaskId: OrchestrationAggregate["run"]["dispatchTaskId"];
|
|
44
|
+
readonly id: OrchestrationAggregate["run"]["id"];
|
|
45
|
+
readonly revision: OrchestrationAggregate["run"]["revision"];
|
|
46
|
+
readonly rootTaskId: OrchestrationAggregate["run"]["rootTaskId"];
|
|
47
|
+
readonly state: OrchestrationAggregate["run"]["state"];
|
|
48
|
+
readonly terminalId: OrchestrationAggregate["run"]["terminalId"];
|
|
49
|
+
readonly workspaceId: OrchestrationAggregate["run"]["workspaceId"];
|
|
50
|
+
};
|
|
51
|
+
readonly taskCount: number;
|
|
52
|
+
};
|
|
53
|
+
export type CliCompactDelivery = {
|
|
54
|
+
readonly deliveryId: OrchestrationDelivery["id"];
|
|
55
|
+
readonly mailboxId: OrchestrationDelivery["mailboxId"];
|
|
56
|
+
readonly questionId?: string;
|
|
57
|
+
readonly sequence: OrchestrationDelivery["sequence"];
|
|
58
|
+
readonly subject: OrchestrationDelivery["message"]["subject"];
|
|
59
|
+
readonly type: OrchestrationDelivery["message"]["type"];
|
|
60
|
+
};
|
|
61
|
+
type CliCompactReceipt = {
|
|
62
|
+
readonly aggregateRevision: ProtocolReceipt["aggregateRevision"];
|
|
63
|
+
readonly commandId: ProtocolReceipt["commandId"];
|
|
64
|
+
readonly receiptId: ProtocolReceipt["receiptId"];
|
|
65
|
+
readonly state: ProtocolReceipt["state"];
|
|
66
|
+
readonly target: ProtocolReceipt["target"];
|
|
67
|
+
};
|
|
68
|
+
export type CliRunShowResult = {
|
|
69
|
+
readonly aggregate: CliCompactAggregate;
|
|
70
|
+
readonly command: "run.show";
|
|
71
|
+
};
|
|
72
|
+
export type CliRunCreateResult = {
|
|
73
|
+
readonly aggregate: CliCompactAggregate;
|
|
74
|
+
readonly command: "run.create";
|
|
75
|
+
readonly delivery: OrchestrationRunCreateResult["delivery"];
|
|
76
|
+
readonly initialDelivery: CliCompactDelivery;
|
|
77
|
+
readonly receipt: CliCompactReceipt;
|
|
78
|
+
};
|
|
79
|
+
export type CliQuestionOpenResult = {
|
|
80
|
+
readonly aggregate: CliCompactAggregate;
|
|
81
|
+
readonly command: "run.question.open";
|
|
82
|
+
readonly delivery: CliCompactDelivery;
|
|
83
|
+
readonly receipt: CliCompactReceipt;
|
|
84
|
+
};
|
|
85
|
+
export type CliQuestionReplyResult = {
|
|
86
|
+
readonly aggregate: CliCompactAggregate;
|
|
87
|
+
readonly command: "run.question.reply";
|
|
88
|
+
readonly delivery: CliCompactDelivery;
|
|
89
|
+
readonly receipt: CliCompactReceipt;
|
|
90
|
+
};
|
|
91
|
+
export type CliQuestionCancelResult = {
|
|
92
|
+
readonly aggregate: CliCompactAggregate;
|
|
93
|
+
readonly command: "run.question.cancel";
|
|
94
|
+
readonly receipt: CliCompactReceipt;
|
|
95
|
+
};
|
|
96
|
+
export type CliDispatchSettleResult = {
|
|
97
|
+
readonly aggregate: CliCompactAggregate;
|
|
98
|
+
readonly command: "run.dispatch.settle-terminal";
|
|
99
|
+
readonly delivery: CliCompactDelivery;
|
|
100
|
+
readonly receipt: CliCompactReceipt;
|
|
101
|
+
};
|
|
102
|
+
export type CliInboxAckResult = {
|
|
103
|
+
readonly command: "run.inbox.ack";
|
|
104
|
+
readonly delivery: CliCompactDelivery;
|
|
105
|
+
readonly mailboxId: OrchestrationInboxAckResult["mailbox"]["id"];
|
|
106
|
+
readonly mailboxRevision: OrchestrationInboxAckResult["mailbox"]["revision"];
|
|
107
|
+
readonly owner: OrchestrationInboxAckResult["mailbox"]["owner"];
|
|
108
|
+
readonly receipt: CliCompactReceipt;
|
|
109
|
+
readonly runId: OrchestrationInboxAckResult["mailbox"]["runId"];
|
|
110
|
+
};
|
|
111
|
+
export declare const projectDispatchShowDispatch: (dispatch: ProtocolDispatch) => CliDispatchShowDispatch;
|
|
112
|
+
export declare const projectOrchestrationAggregate: (aggregate: OrchestrationAggregate) => CliCompactAggregate;
|
|
113
|
+
export declare const projectRunShowResult: (value: OrchestrationRunShowResult) => CliRunShowResult;
|
|
114
|
+
export declare const projectRunCreateResult: (value: OrchestrationRunCreateResult) => CliRunCreateResult;
|
|
115
|
+
export declare const projectQuestionOpenResult: (value: OrchestrationQuestionOpenResult) => CliQuestionOpenResult;
|
|
116
|
+
export declare const projectQuestionReplyResult: (value: OrchestrationQuestionReplyResult) => CliQuestionReplyResult;
|
|
117
|
+
export declare const projectQuestionCancelResult: (value: OrchestrationQuestionCancelResult) => CliQuestionCancelResult;
|
|
118
|
+
export declare const projectDispatchSettleResult: (value: OrchestrationDispatchSettleTerminalResult) => CliDispatchSettleResult;
|
|
119
|
+
export declare const projectInboxAckResult: (value: OrchestrationInboxAckResult) => CliInboxAckResult;
|
|
120
|
+
export {};
|
|
121
|
+
//# sourceMappingURL=compact-aggregate.d.ts.map
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export const projectDispatchShowDispatch = (dispatch) => ({
|
|
2
|
+
attemptId: dispatch.attemptId,
|
|
3
|
+
...(dispatch.state === "failed" ? { failure: dispatch.failure } : {}),
|
|
4
|
+
id: dispatch.id,
|
|
5
|
+
revision: dispatch.revision,
|
|
6
|
+
runId: dispatch.runId,
|
|
7
|
+
state: dispatch.state,
|
|
8
|
+
taskId: dispatch.taskId,
|
|
9
|
+
terminalId: dispatch.terminalId,
|
|
10
|
+
});
|
|
11
|
+
const projectMailbox = (mailbox) => ({
|
|
12
|
+
id: mailbox.id,
|
|
13
|
+
owner: { id: mailbox.owner.id, kind: mailbox.owner.kind },
|
|
14
|
+
revision: mailbox.revision,
|
|
15
|
+
});
|
|
16
|
+
const projectQuestion = (question) => ({
|
|
17
|
+
...(question.state === "answered" ? { answer: question.answer } : {}),
|
|
18
|
+
body: question.body,
|
|
19
|
+
id: question.id,
|
|
20
|
+
revision: question.revision,
|
|
21
|
+
state: question.state,
|
|
22
|
+
subject: question.subject,
|
|
23
|
+
taskId: question.taskId,
|
|
24
|
+
});
|
|
25
|
+
export const projectOrchestrationAggregate = (aggregate) => ({
|
|
26
|
+
attempt: {
|
|
27
|
+
id: aggregate.attempt.id,
|
|
28
|
+
revision: aggregate.attempt.revision,
|
|
29
|
+
state: aggregate.attempt.state,
|
|
30
|
+
taskId: aggregate.attempt.taskId,
|
|
31
|
+
},
|
|
32
|
+
dispatch: projectDispatchShowDispatch(aggregate.dispatch),
|
|
33
|
+
mailboxes: [...aggregate.mailboxes]
|
|
34
|
+
.map(projectMailbox)
|
|
35
|
+
.sort((left, right) => left.owner.kind.localeCompare(right.owner.kind)),
|
|
36
|
+
...(aggregate.question === undefined
|
|
37
|
+
? {}
|
|
38
|
+
: { question: projectQuestion(aggregate.question) }),
|
|
39
|
+
run: {
|
|
40
|
+
dispatchTaskId: aggregate.run.dispatchTaskId,
|
|
41
|
+
id: aggregate.run.id,
|
|
42
|
+
revision: aggregate.run.revision,
|
|
43
|
+
rootTaskId: aggregate.run.rootTaskId,
|
|
44
|
+
state: aggregate.run.state,
|
|
45
|
+
terminalId: aggregate.run.terminalId,
|
|
46
|
+
workspaceId: aggregate.run.workspaceId,
|
|
47
|
+
},
|
|
48
|
+
taskCount: aggregate.tasks.length,
|
|
49
|
+
});
|
|
50
|
+
const projectOrchestrationDelivery = (delivery) => ({
|
|
51
|
+
deliveryId: delivery.id,
|
|
52
|
+
mailboxId: delivery.mailboxId,
|
|
53
|
+
...("questionId" in delivery.message
|
|
54
|
+
? { questionId: delivery.message.questionId }
|
|
55
|
+
: {}),
|
|
56
|
+
sequence: delivery.sequence,
|
|
57
|
+
subject: delivery.message.subject,
|
|
58
|
+
type: delivery.message.type,
|
|
59
|
+
});
|
|
60
|
+
const projectOrchestrationReceipt = (receipt) => ({
|
|
61
|
+
aggregateRevision: receipt.aggregateRevision,
|
|
62
|
+
commandId: receipt.commandId,
|
|
63
|
+
receiptId: receipt.receiptId,
|
|
64
|
+
state: receipt.state,
|
|
65
|
+
target: receipt.target,
|
|
66
|
+
});
|
|
67
|
+
export const projectRunShowResult = (value) => ({
|
|
68
|
+
aggregate: projectOrchestrationAggregate(value.aggregate),
|
|
69
|
+
command: "run.show",
|
|
70
|
+
});
|
|
71
|
+
export const projectRunCreateResult = (value) => ({
|
|
72
|
+
aggregate: projectOrchestrationAggregate(value.aggregate),
|
|
73
|
+
command: "run.create",
|
|
74
|
+
delivery: value.delivery,
|
|
75
|
+
initialDelivery: projectOrchestrationDelivery(value.initialDelivery),
|
|
76
|
+
receipt: projectOrchestrationReceipt(value.receipt),
|
|
77
|
+
});
|
|
78
|
+
export const projectQuestionOpenResult = (value) => ({
|
|
79
|
+
aggregate: projectOrchestrationAggregate(value.aggregate),
|
|
80
|
+
command: "run.question.open",
|
|
81
|
+
delivery: projectOrchestrationDelivery(value.delivery),
|
|
82
|
+
receipt: projectOrchestrationReceipt(value.receipt),
|
|
83
|
+
});
|
|
84
|
+
export const projectQuestionReplyResult = (value) => ({
|
|
85
|
+
aggregate: projectOrchestrationAggregate(value.aggregate),
|
|
86
|
+
command: "run.question.reply",
|
|
87
|
+
delivery: projectOrchestrationDelivery(value.delivery),
|
|
88
|
+
receipt: projectOrchestrationReceipt(value.receipt),
|
|
89
|
+
});
|
|
90
|
+
export const projectQuestionCancelResult = (value) => ({
|
|
91
|
+
aggregate: projectOrchestrationAggregate(value.aggregate),
|
|
92
|
+
command: "run.question.cancel",
|
|
93
|
+
receipt: projectOrchestrationReceipt(value.receipt),
|
|
94
|
+
});
|
|
95
|
+
export const projectDispatchSettleResult = (value) => ({
|
|
96
|
+
aggregate: projectOrchestrationAggregate(value.aggregate),
|
|
97
|
+
command: "run.dispatch.settle-terminal",
|
|
98
|
+
delivery: projectOrchestrationDelivery(value.delivery),
|
|
99
|
+
receipt: projectOrchestrationReceipt(value.receipt),
|
|
100
|
+
});
|
|
101
|
+
export const projectInboxAckResult = (value) => ({
|
|
102
|
+
command: "run.inbox.ack",
|
|
103
|
+
delivery: projectOrchestrationDelivery(value.delivery),
|
|
104
|
+
mailboxId: value.mailbox.id,
|
|
105
|
+
mailboxRevision: value.mailbox.revision,
|
|
106
|
+
owner: { id: value.mailbox.owner.id, kind: value.mailbox.owner.kind },
|
|
107
|
+
receipt: projectOrchestrationReceipt(value.receipt),
|
|
108
|
+
runId: value.mailbox.runId,
|
|
109
|
+
});
|
|
110
|
+
//# sourceMappingURL=compact-aggregate.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { OrchestrationRun, OrchestrationRunListResult } from "@maiaos/sdk";
|
|
2
|
+
type CliRunListItem = {
|
|
3
|
+
readonly dispatchTaskId: OrchestrationRun["dispatchTaskId"];
|
|
4
|
+
readonly id: OrchestrationRun["id"];
|
|
5
|
+
readonly revision: OrchestrationRun["revision"];
|
|
6
|
+
readonly rootTaskId: OrchestrationRun["rootTaskId"];
|
|
7
|
+
readonly state: OrchestrationRun["state"];
|
|
8
|
+
readonly terminalId: OrchestrationRun["terminalId"];
|
|
9
|
+
};
|
|
10
|
+
export type CliRunListResult = {
|
|
11
|
+
readonly command: "run.list";
|
|
12
|
+
readonly count: number;
|
|
13
|
+
readonly items: readonly CliRunListItem[];
|
|
14
|
+
readonly nextCursor?: OrchestrationRunListResult["nextCursor"];
|
|
15
|
+
readonly workspaceId: OrchestrationRun["workspaceId"];
|
|
16
|
+
};
|
|
17
|
+
export declare const projectRunListItem: (run: OrchestrationRun) => CliRunListItem;
|
|
18
|
+
export declare const projectRunListResult: (value: OrchestrationRunListResult, workspaceId: OrchestrationRun["workspaceId"]) => CliRunListResult;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=compact-run-list.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const projectRunListItem = (run) => ({
|
|
2
|
+
dispatchTaskId: run.dispatchTaskId,
|
|
3
|
+
id: run.id,
|
|
4
|
+
revision: run.revision,
|
|
5
|
+
rootTaskId: run.rootTaskId,
|
|
6
|
+
state: run.state,
|
|
7
|
+
terminalId: run.terminalId,
|
|
8
|
+
});
|
|
9
|
+
export const projectRunListResult = (value, workspaceId) => ({
|
|
10
|
+
command: "run.list",
|
|
11
|
+
count: value.items.length,
|
|
12
|
+
items: value.items.map(projectRunListItem),
|
|
13
|
+
...(value.nextCursor === undefined ? {} : { nextCursor: value.nextCursor }),
|
|
14
|
+
workspaceId: value.items[0]?.workspaceId ?? workspaceId,
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=compact-run-list.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { OrchestrationDispatchShowResult, OrchestrationInboxCheckResult, OrchestrationRunListResult, OrchestrationTaskListResult, OrchestrationTaskShowResult } from "@maiaos/sdk";
|
|
2
|
+
import { type CliIo } from "../../command-line/index.js";
|
|
3
|
+
import type { CliNodeResult } from "../../local-node/index.js";
|
|
4
|
+
import { type CliDispatchSettleResult, type CliDispatchShowDispatch, type CliInboxAckResult, type CliQuestionCancelResult, type CliQuestionOpenResult, type CliQuestionReplyResult, type CliRunCreateResult, type CliRunShowResult, projectDispatchSettleResult, projectInboxAckResult, projectQuestionCancelResult, projectQuestionOpenResult, projectQuestionReplyResult, projectRunCreateResult, projectRunShowResult } from "./compact-aggregate.js";
|
|
5
|
+
import { type CliRunListResult } from "./compact-run-list.js";
|
|
6
|
+
type OutputContext = {
|
|
7
|
+
readonly io: CliIo;
|
|
8
|
+
readonly json: boolean;
|
|
9
|
+
};
|
|
10
|
+
type CliInboxCheckItem = {
|
|
11
|
+
readonly body: OrchestrationInboxCheckResult["items"][number]["message"]["body"];
|
|
12
|
+
readonly deliveryId: OrchestrationInboxCheckResult["items"][number]["id"];
|
|
13
|
+
readonly mailboxId: OrchestrationInboxCheckResult["items"][number]["mailboxId"];
|
|
14
|
+
readonly sequence: OrchestrationInboxCheckResult["items"][number]["sequence"];
|
|
15
|
+
readonly subject: OrchestrationInboxCheckResult["items"][number]["message"]["subject"];
|
|
16
|
+
readonly type: OrchestrationInboxCheckResult["items"][number]["message"]["type"];
|
|
17
|
+
};
|
|
18
|
+
type CliInboxCheckResult = {
|
|
19
|
+
readonly command: "run.inbox.check";
|
|
20
|
+
readonly count: number;
|
|
21
|
+
readonly items: readonly CliInboxCheckItem[];
|
|
22
|
+
readonly mailboxId: OrchestrationInboxCheckResult["mailbox"]["id"];
|
|
23
|
+
readonly mailboxRevision: OrchestrationInboxCheckResult["mailbox"]["revision"];
|
|
24
|
+
readonly owner: OrchestrationInboxCheckResult["mailbox"]["owner"];
|
|
25
|
+
readonly runId: OrchestrationInboxCheckResult["mailbox"]["runId"];
|
|
26
|
+
};
|
|
27
|
+
type CliTaskListItem = {
|
|
28
|
+
readonly clientKey: OrchestrationTaskListResult["items"][number]["clientKey"];
|
|
29
|
+
readonly dependencyTaskIds: OrchestrationTaskListResult["items"][number]["dependencyTaskIds"];
|
|
30
|
+
readonly id: OrchestrationTaskListResult["items"][number]["id"];
|
|
31
|
+
readonly revision: OrchestrationTaskListResult["items"][number]["revision"];
|
|
32
|
+
readonly state: OrchestrationTaskListResult["items"][number]["state"];
|
|
33
|
+
};
|
|
34
|
+
type CliTaskListResult = {
|
|
35
|
+
readonly command: "run.task.list";
|
|
36
|
+
readonly count: number;
|
|
37
|
+
readonly items: readonly CliTaskListItem[];
|
|
38
|
+
readonly nextCursor?: OrchestrationTaskListResult["nextCursor"];
|
|
39
|
+
readonly runId: OrchestrationTaskListResult["runId"];
|
|
40
|
+
};
|
|
41
|
+
type CliTaskShowTask = {
|
|
42
|
+
readonly clientKey: OrchestrationTaskShowResult["task"]["clientKey"];
|
|
43
|
+
readonly dependencyTaskIds: OrchestrationTaskShowResult["task"]["dependencyTaskIds"];
|
|
44
|
+
readonly id: OrchestrationTaskShowResult["task"]["id"];
|
|
45
|
+
readonly objective: OrchestrationTaskShowResult["task"]["objective"];
|
|
46
|
+
readonly revision: OrchestrationTaskShowResult["task"]["revision"];
|
|
47
|
+
readonly runId: OrchestrationTaskShowResult["task"]["runId"];
|
|
48
|
+
readonly state: OrchestrationTaskShowResult["task"]["state"];
|
|
49
|
+
};
|
|
50
|
+
type CliTaskShowResult = {
|
|
51
|
+
readonly command: "run.task.show";
|
|
52
|
+
readonly task: CliTaskShowTask;
|
|
53
|
+
};
|
|
54
|
+
type CliDispatchShowResult = {
|
|
55
|
+
readonly command: "run.dispatch.show";
|
|
56
|
+
readonly dispatch: CliDispatchShowDispatch;
|
|
57
|
+
};
|
|
58
|
+
export type CliOrchestrationResult = CliDispatchSettleResult | CliDispatchShowResult | CliInboxAckResult | CliInboxCheckResult | CliQuestionCancelResult | CliQuestionOpenResult | CliQuestionReplyResult | CliRunCreateResult | CliRunListResult | CliRunShowResult | CliTaskListResult | CliTaskShowResult;
|
|
59
|
+
export declare const formatInboxAck: (result: CliInboxAckResult) => string;
|
|
60
|
+
export declare const formatRunList: (result: CliRunListResult) => string;
|
|
61
|
+
export declare const formatRunShow: (result: CliRunShowResult) => string;
|
|
62
|
+
export declare const formatRunCreate: (result: CliRunCreateResult) => string;
|
|
63
|
+
export declare const formatQuestionOpen: (result: CliQuestionOpenResult) => string;
|
|
64
|
+
export declare const formatQuestionCancel: (result: CliQuestionCancelResult) => string;
|
|
65
|
+
export declare const formatCompactOrchestration: (result: CliOrchestrationResult) => string;
|
|
66
|
+
type ProjectedWriter<TValue> = (result: CliNodeResult<TValue>, context: OutputContext) => number;
|
|
67
|
+
export declare const writeInboxAckResult: ProjectedWriter<Parameters<typeof projectInboxAckResult>[0]>;
|
|
68
|
+
export declare const writeInboxCheckResult: (result: CliNodeResult<OrchestrationInboxCheckResult>, context: OutputContext) => number;
|
|
69
|
+
export declare const writeRunListResult: (result: CliNodeResult<OrchestrationRunListResult>, context: OutputContext, workspaceId: string) => number;
|
|
70
|
+
export declare const writeTaskListResult: (result: CliNodeResult<OrchestrationTaskListResult>, context: OutputContext) => number;
|
|
71
|
+
export declare const writeTaskShowResult: (result: CliNodeResult<OrchestrationTaskShowResult>, context: OutputContext) => number;
|
|
72
|
+
export declare const writeDispatchShowResult: (result: CliNodeResult<OrchestrationDispatchShowResult>, context: OutputContext) => number;
|
|
73
|
+
export declare const writeRunShowResult: ProjectedWriter<Parameters<typeof projectRunShowResult>[0]>;
|
|
74
|
+
export declare const writeRunCreateResult: ProjectedWriter<Parameters<typeof projectRunCreateResult>[0]>;
|
|
75
|
+
export declare const writeQuestionOpenResult: ProjectedWriter<Parameters<typeof projectQuestionOpenResult>[0]>;
|
|
76
|
+
export declare const writeQuestionReplyResult: ProjectedWriter<Parameters<typeof projectQuestionReplyResult>[0]>;
|
|
77
|
+
export declare const writeQuestionCancelResult: ProjectedWriter<Parameters<typeof projectQuestionCancelResult>[0]>;
|
|
78
|
+
export declare const writeDispatchSettleResult: ProjectedWriter<Parameters<typeof projectDispatchSettleResult>[0]>;
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=human.d.ts.map
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { cell, formatRows, tab, withNextPage, writeNodeResult, } from "../../command-line/index.js";
|
|
2
|
+
import { projectDispatchSettleResult, projectDispatchShowDispatch, projectInboxAckResult, projectQuestionCancelResult, projectQuestionOpenResult, projectQuestionReplyResult, projectRunCreateResult, projectRunShowResult, } from "./compact-aggregate.js";
|
|
3
|
+
import { projectRunListResult, } from "./compact-run-list.js";
|
|
4
|
+
export const formatInboxAck = (result) => `${tab([
|
|
5
|
+
result.command,
|
|
6
|
+
result.receipt.commandId,
|
|
7
|
+
result.runId,
|
|
8
|
+
result.owner.kind,
|
|
9
|
+
result.owner.id,
|
|
10
|
+
result.mailboxRevision,
|
|
11
|
+
result.receipt.state,
|
|
12
|
+
])}\n${tab([
|
|
13
|
+
result.delivery.deliveryId,
|
|
14
|
+
result.delivery.sequence,
|
|
15
|
+
result.delivery.type,
|
|
16
|
+
cell(result.delivery.subject),
|
|
17
|
+
])}\n`;
|
|
18
|
+
const formatInboxCheck = (result) => {
|
|
19
|
+
const header = tab([
|
|
20
|
+
result.command,
|
|
21
|
+
result.runId,
|
|
22
|
+
result.owner.kind,
|
|
23
|
+
result.owner.id,
|
|
24
|
+
String(result.count),
|
|
25
|
+
result.mailboxRevision,
|
|
26
|
+
]);
|
|
27
|
+
if (result.items.length === 0)
|
|
28
|
+
return `${header}\n`;
|
|
29
|
+
return `${header}\n${result.items
|
|
30
|
+
.map((item) => tab([item.deliveryId, item.sequence, item.type, cell(item.subject)]))
|
|
31
|
+
.join("\n")}\n`;
|
|
32
|
+
};
|
|
33
|
+
export const formatRunList = (result) => withNextPage(formatRows(result.items, (item) => tab([
|
|
34
|
+
item.id,
|
|
35
|
+
item.state,
|
|
36
|
+
item.revision,
|
|
37
|
+
item.terminalId,
|
|
38
|
+
item.rootTaskId,
|
|
39
|
+
item.dispatchTaskId,
|
|
40
|
+
]), {
|
|
41
|
+
empty: "No runs.",
|
|
42
|
+
headers: [
|
|
43
|
+
"RUN",
|
|
44
|
+
"STATE",
|
|
45
|
+
"REVISION",
|
|
46
|
+
"TERMINAL",
|
|
47
|
+
"ROOT TASK",
|
|
48
|
+
"DISPATCH TASK",
|
|
49
|
+
],
|
|
50
|
+
}), result.nextCursor);
|
|
51
|
+
const formatTaskList = (result) => withNextPage(formatRows(result.items, (item) => tab([item.id, item.clientKey, item.state, item.revision]), { empty: "No tasks.", headers: ["TASK", "KEY", "STATE", "REVISION"] }), result.nextCursor);
|
|
52
|
+
const formatTaskShow = (result) => [
|
|
53
|
+
tab([
|
|
54
|
+
result.command,
|
|
55
|
+
result.task.runId,
|
|
56
|
+
result.task.id,
|
|
57
|
+
result.task.clientKey,
|
|
58
|
+
result.task.state,
|
|
59
|
+
result.task.revision,
|
|
60
|
+
]),
|
|
61
|
+
cell(result.task.objective),
|
|
62
|
+
"",
|
|
63
|
+
].join("\n");
|
|
64
|
+
const formatDispatchShow = (result) => {
|
|
65
|
+
const header = tab([
|
|
66
|
+
result.command,
|
|
67
|
+
result.dispatch.runId,
|
|
68
|
+
result.dispatch.id,
|
|
69
|
+
result.dispatch.taskId,
|
|
70
|
+
result.dispatch.state,
|
|
71
|
+
result.dispatch.revision,
|
|
72
|
+
]);
|
|
73
|
+
if (result.dispatch.state !== "failed" ||
|
|
74
|
+
result.dispatch.failure === undefined) {
|
|
75
|
+
return `${header}\n`;
|
|
76
|
+
}
|
|
77
|
+
return `${header}\n${result.dispatch.failure.code}\t${result.dispatch.failure.platform}\n`;
|
|
78
|
+
};
|
|
79
|
+
const formatFailedDispatchLine = (dispatch) => dispatch.state === "failed" && dispatch.failure !== undefined
|
|
80
|
+
? `${dispatch.failure.code}\t${dispatch.failure.platform}\n`
|
|
81
|
+
: "";
|
|
82
|
+
const formatMailboxLines = (mailboxes) => `${mailboxes.map((mailbox) => `${mailbox.owner.kind}\t${mailbox.id}\t${mailbox.revision}`).join("\n")}\n`;
|
|
83
|
+
const formatQuestionLines = (question) => {
|
|
84
|
+
if (question === undefined)
|
|
85
|
+
return "";
|
|
86
|
+
const lines = [
|
|
87
|
+
`${question.id}\t${question.state}\t${question.revision}`,
|
|
88
|
+
cell(question.subject),
|
|
89
|
+
cell(question.body),
|
|
90
|
+
];
|
|
91
|
+
if (question.state === "answered" && question.answer !== undefined) {
|
|
92
|
+
lines.push(cell(question.answer));
|
|
93
|
+
}
|
|
94
|
+
return `${lines.join("\n")}\n`;
|
|
95
|
+
};
|
|
96
|
+
const formatDeliveryLine = (delivery) => delivery === undefined
|
|
97
|
+
? ""
|
|
98
|
+
: `${delivery.deliveryId}\t${delivery.sequence}\t${delivery.type}\t${cell(delivery.subject)}\n`;
|
|
99
|
+
const formatCompactAggregateBody = (aggregate, delivery) => `${formatFailedDispatchLine(aggregate.dispatch)}${formatMailboxLines(aggregate.mailboxes)}${formatQuestionLines(aggregate.question)}${formatDeliveryLine(delivery)}`;
|
|
100
|
+
export const formatRunShow = (result) => `${tab([
|
|
101
|
+
result.command,
|
|
102
|
+
result.aggregate.run.id,
|
|
103
|
+
result.aggregate.run.state,
|
|
104
|
+
result.aggregate.run.revision,
|
|
105
|
+
result.aggregate.dispatch.id,
|
|
106
|
+
result.aggregate.dispatch.state,
|
|
107
|
+
result.aggregate.dispatch.revision,
|
|
108
|
+
])}\n${formatCompactAggregateBody(result.aggregate)}`;
|
|
109
|
+
export const formatRunCreate = (result) => `${tab([
|
|
110
|
+
result.command,
|
|
111
|
+
result.delivery,
|
|
112
|
+
result.receipt.commandId,
|
|
113
|
+
result.aggregate.run.id,
|
|
114
|
+
result.aggregate.run.revision,
|
|
115
|
+
result.aggregate.dispatch.id,
|
|
116
|
+
result.aggregate.dispatch.revision,
|
|
117
|
+
])}\n${formatCompactAggregateBody(result.aggregate, result.initialDelivery)}`;
|
|
118
|
+
const formatQuestionMutation = (result) => `${tab([
|
|
119
|
+
result.command,
|
|
120
|
+
result.receipt.commandId,
|
|
121
|
+
result.aggregate.run.id,
|
|
122
|
+
result.aggregate.question?.id ?? "",
|
|
123
|
+
result.aggregate.question?.revision ?? "",
|
|
124
|
+
result.aggregate.run.revision,
|
|
125
|
+
result.aggregate.dispatch.revision,
|
|
126
|
+
])}\n${formatCompactAggregateBody(result.aggregate, result.delivery)}`;
|
|
127
|
+
export const formatQuestionOpen = (result) => formatQuestionMutation(result);
|
|
128
|
+
const formatQuestionReply = (result) => formatQuestionMutation(result);
|
|
129
|
+
export const formatQuestionCancel = (result) => `${tab([
|
|
130
|
+
result.command,
|
|
131
|
+
result.receipt.commandId,
|
|
132
|
+
result.aggregate.run.id,
|
|
133
|
+
result.aggregate.run.revision,
|
|
134
|
+
result.aggregate.dispatch.revision,
|
|
135
|
+
])}\n${formatCompactAggregateBody(result.aggregate)}`;
|
|
136
|
+
const formatDispatchSettle = (result) => `${tab([
|
|
137
|
+
result.command,
|
|
138
|
+
result.receipt.commandId,
|
|
139
|
+
result.aggregate.run.id,
|
|
140
|
+
result.aggregate.dispatch.state,
|
|
141
|
+
result.aggregate.run.revision,
|
|
142
|
+
result.aggregate.dispatch.revision,
|
|
143
|
+
])}\n${formatCompactAggregateBody(result.aggregate, result.delivery)}`;
|
|
144
|
+
export const formatCompactOrchestration = (result) => {
|
|
145
|
+
if (result.command === "run.inbox.ack")
|
|
146
|
+
return formatInboxAck(result);
|
|
147
|
+
if (result.command === "run.inbox.check")
|
|
148
|
+
return formatInboxCheck(result);
|
|
149
|
+
if (result.command === "run.task.list")
|
|
150
|
+
return formatTaskList(result);
|
|
151
|
+
if (result.command === "run.task.show")
|
|
152
|
+
return formatTaskShow(result);
|
|
153
|
+
if (result.command === "run.dispatch.show")
|
|
154
|
+
return formatDispatchShow(result);
|
|
155
|
+
if (result.command === "run.show")
|
|
156
|
+
return formatRunShow(result);
|
|
157
|
+
if (result.command === "run.create")
|
|
158
|
+
return formatRunCreate(result);
|
|
159
|
+
if (result.command === "run.question.open")
|
|
160
|
+
return formatQuestionOpen(result);
|
|
161
|
+
if (result.command === "run.question.reply") {
|
|
162
|
+
return formatQuestionReply(result);
|
|
163
|
+
}
|
|
164
|
+
if (result.command === "run.question.cancel") {
|
|
165
|
+
return formatQuestionCancel(result);
|
|
166
|
+
}
|
|
167
|
+
if (result.command === "run.dispatch.settle-terminal") {
|
|
168
|
+
return formatDispatchSettle(result);
|
|
169
|
+
}
|
|
170
|
+
return formatRunList(result);
|
|
171
|
+
};
|
|
172
|
+
const projectInboxCheckItem = (delivery) => ({
|
|
173
|
+
body: delivery.message.body,
|
|
174
|
+
deliveryId: delivery.id,
|
|
175
|
+
mailboxId: delivery.mailboxId,
|
|
176
|
+
sequence: delivery.sequence,
|
|
177
|
+
subject: delivery.message.subject,
|
|
178
|
+
type: delivery.message.type,
|
|
179
|
+
});
|
|
180
|
+
const projectedResultWriter = (project) => (result, context) => writeNodeResult(result, context, {
|
|
181
|
+
toResult: project,
|
|
182
|
+
toText: formatCompactOrchestration,
|
|
183
|
+
});
|
|
184
|
+
export const writeInboxAckResult = projectedResultWriter(projectInboxAckResult);
|
|
185
|
+
export const writeInboxCheckResult = (result, context) => writeNodeResult(result, context, {
|
|
186
|
+
toResult: (value) => ({
|
|
187
|
+
command: "run.inbox.check",
|
|
188
|
+
count: value.items.length,
|
|
189
|
+
items: value.items.map(projectInboxCheckItem),
|
|
190
|
+
mailboxId: value.mailbox.id,
|
|
191
|
+
mailboxRevision: value.mailbox.revision,
|
|
192
|
+
owner: {
|
|
193
|
+
id: value.mailbox.owner.id,
|
|
194
|
+
kind: value.mailbox.owner.kind,
|
|
195
|
+
},
|
|
196
|
+
runId: value.mailbox.runId,
|
|
197
|
+
}),
|
|
198
|
+
toText: formatCompactOrchestration,
|
|
199
|
+
});
|
|
200
|
+
const projectTaskListItem = (task) => ({
|
|
201
|
+
clientKey: task.clientKey,
|
|
202
|
+
dependencyTaskIds: task.dependencyTaskIds,
|
|
203
|
+
id: task.id,
|
|
204
|
+
revision: task.revision,
|
|
205
|
+
state: task.state,
|
|
206
|
+
});
|
|
207
|
+
export const writeRunListResult = (result, context, workspaceId) => writeNodeResult(result, context, {
|
|
208
|
+
toResult: (value) => projectRunListResult(value, workspaceId),
|
|
209
|
+
toText: formatCompactOrchestration,
|
|
210
|
+
});
|
|
211
|
+
export const writeTaskListResult = (result, context) => writeNodeResult(result, context, {
|
|
212
|
+
toResult: (value) => ({
|
|
213
|
+
command: "run.task.list",
|
|
214
|
+
count: value.items.length,
|
|
215
|
+
items: value.items.map(projectTaskListItem),
|
|
216
|
+
...(value.nextCursor === undefined
|
|
217
|
+
? {}
|
|
218
|
+
: { nextCursor: value.nextCursor }),
|
|
219
|
+
runId: value.runId,
|
|
220
|
+
}),
|
|
221
|
+
toText: formatCompactOrchestration,
|
|
222
|
+
});
|
|
223
|
+
const projectTaskShowTask = (task) => ({
|
|
224
|
+
clientKey: task.clientKey,
|
|
225
|
+
dependencyTaskIds: task.dependencyTaskIds,
|
|
226
|
+
id: task.id,
|
|
227
|
+
objective: task.objective,
|
|
228
|
+
revision: task.revision,
|
|
229
|
+
runId: task.runId,
|
|
230
|
+
state: task.state,
|
|
231
|
+
});
|
|
232
|
+
export const writeTaskShowResult = (result, context) => writeNodeResult(result, context, {
|
|
233
|
+
toResult: (value) => ({
|
|
234
|
+
command: "run.task.show",
|
|
235
|
+
task: projectTaskShowTask(value.task),
|
|
236
|
+
}),
|
|
237
|
+
toText: formatCompactOrchestration,
|
|
238
|
+
});
|
|
239
|
+
export const writeDispatchShowResult = (result, context) => writeNodeResult(result, context, {
|
|
240
|
+
toResult: (value) => ({
|
|
241
|
+
command: "run.dispatch.show",
|
|
242
|
+
dispatch: projectDispatchShowDispatch(value.dispatch),
|
|
243
|
+
}),
|
|
244
|
+
toText: formatCompactOrchestration,
|
|
245
|
+
});
|
|
246
|
+
export const writeRunShowResult = projectedResultWriter(projectRunShowResult);
|
|
247
|
+
export const writeRunCreateResult = projectedResultWriter(projectRunCreateResult);
|
|
248
|
+
export const writeQuestionOpenResult = projectedResultWriter(projectQuestionOpenResult);
|
|
249
|
+
export const writeQuestionReplyResult = projectedResultWriter(projectQuestionReplyResult);
|
|
250
|
+
export const writeQuestionCancelResult = projectedResultWriter(projectQuestionCancelResult);
|
|
251
|
+
export const writeDispatchSettleResult = projectedResultWriter(projectDispatchSettleResult);
|
|
252
|
+
//# sourceMappingURL=human.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { type CliCompactDelivery, type CliCompactQuestion, type CliDispatchSettleResult, type CliDispatchShowDispatch, type CliInboxAckResult, type CliQuestionCancelResult, type CliQuestionOpenResult, type CliQuestionReplyResult, type CliRunCreateResult, type CliRunShowResult, projectDispatchSettleResult, projectDispatchShowDispatch, projectInboxAckResult, projectQuestionCancelResult, projectQuestionOpenResult, projectQuestionReplyResult, projectRunCreateResult, projectRunShowResult, } from "./compact-aggregate.js";
|
|
2
|
+
export { type CliRunListResult, projectRunListResult, } from "./compact-run-list.js";
|
|
3
|
+
export { type CliOrchestrationResult, formatCompactOrchestration, formatInboxAck, formatQuestionCancel, formatQuestionOpen, formatRunCreate, formatRunList, formatRunShow, writeDispatchSettleResult, writeDispatchShowResult, writeInboxAckResult, writeInboxCheckResult, writeQuestionCancelResult, writeQuestionOpenResult, writeQuestionReplyResult, writeRunCreateResult, writeRunListResult, writeRunShowResult, writeTaskListResult, writeTaskShowResult, } from "./human.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { projectDispatchSettleResult, projectDispatchShowDispatch, projectInboxAckResult, projectQuestionCancelResult, projectQuestionOpenResult, projectQuestionReplyResult, projectRunCreateResult, projectRunShowResult, } from "./compact-aggregate.js";
|
|
2
|
+
export { projectRunListResult, } from "./compact-run-list.js";
|
|
3
|
+
export { formatCompactOrchestration, formatInboxAck, formatQuestionCancel, formatQuestionOpen, formatRunCreate, formatRunList, formatRunShow, writeDispatchSettleResult, writeDispatchShowResult, writeInboxAckResult, writeInboxCheckResult, writeQuestionCancelResult, writeQuestionOpenResult, writeQuestionReplyResult, writeRunCreateResult, writeRunListResult, writeRunShowResult, writeTaskListResult, writeTaskShowResult, } from "./human.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|