@maiaos/cli 0.1.0-canary.10 → 0.1.0-canary.100
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/LICENSE +21 -0
- package/README.md +21 -15
- package/dist/address-space/address-space.js +21 -2
- package/dist/address-space/index.js +1 -1
- package/dist/agents/client.d.ts +48 -27
- package/dist/agents/client.js +10 -3
- package/dist/agents/commands.d.ts +1 -0
- package/dist/agents/commands.js +24 -2
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.js +1 -1
- package/dist/agents/input.js +6 -0
- package/dist/agents/output/format.js +11 -0
- package/dist/agents/tree/tree.js +16 -4
- package/dist/bin/maia.NOTICES.txt +1 -1
- package/dist/bin/maia.cdx.json +70 -19
- package/dist/bin/maia.mjs +1 -1
- package/dist/board/client.d.ts +27 -0
- package/dist/board/client.js +40 -0
- package/dist/board/commands.d.ts +28 -0
- package/dist/board/commands.js +52 -0
- package/dist/board/index.d.ts +3 -0
- package/dist/board/index.js +3 -0
- package/dist/board/input.js +339 -0
- package/dist/board/output/format.js +175 -0
- package/dist/board/output/index.js +2 -0
- package/dist/board/plan.js +47 -0
- package/dist/board/tree/index.js +2 -0
- package/dist/board/tree/tree.js +161 -0
- package/dist/cli/cli.d.ts +11 -3
- package/dist/cli/cli.js +215 -12
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/log-level.d.ts +11 -0
- package/dist/cli/log-level.js +14 -0
- package/dist/command-line/context.d.ts +25 -7
- package/dist/command-line/emit/index.d.ts +4 -0
- package/dist/command-line/emit/index.js +4 -0
- package/dist/command-line/{output.d.ts → emit/output.d.ts} +7 -3
- package/dist/command-line/{output.js → emit/output.js} +13 -5
- package/dist/command-line/{rows.d.ts → emit/rows.d.ts} +2 -0
- package/dist/command-line/{rows.js → emit/rows.js} +6 -0
- package/dist/command-line/index.d.ts +6 -6
- package/dist/command-line/index.js +5 -6
- package/dist/command-line/input/arguments.d.ts +6 -0
- package/dist/command-line/input/arguments.js +20 -0
- package/dist/command-line/input/index.d.ts +3 -2
- package/dist/command-line/input/index.js +3 -2
- package/dist/command-line/input/manager-options.d.ts +10 -0
- package/dist/command-line/input/manager-options.js +38 -0
- package/dist/command-line/input/prompt.d.ts +1 -0
- package/dist/command-line/input/prompt.js +1 -0
- package/dist/command-line/two-phase/index.d.ts +2 -0
- package/dist/command-line/two-phase/index.js +2 -0
- package/dist/command-line/{two-phase.d.ts → two-phase/two-phase.d.ts} +14 -14
- package/dist/command-line/{two-phase.js → two-phase/two-phase.js} +11 -11
- package/dist/command-receipt/command.js +1 -1
- package/dist/command-tree/commands.d.ts +1 -1
- package/dist/command-tree/commands.js +1 -5
- package/dist/command-tree/deprecated.d.ts +2 -0
- package/dist/command-tree/deprecated.js +29 -0
- package/dist/command-tree/grammar.js +2 -0
- package/dist/command-tree/help.d.ts +2 -2
- package/dist/command-tree/help.js +13 -15
- package/dist/command-tree/index.d.ts +1 -0
- package/dist/command-tree/index.js +1 -0
- package/dist/command-tree/local.js +27 -7
- package/dist/command-tree/placeholder.js +1 -1
- package/dist/command-tree/row.d.ts +1 -0
- package/dist/command-tree/tree.d.ts +2 -1
- package/dist/command-tree/tree.js +35 -4
- package/dist/connection/client.d.ts +72 -18
- package/dist/connection/client.js +1 -0
- package/dist/connection/executors/executors.d.ts +18 -0
- package/dist/connection/executors/executors.js +95 -0
- package/dist/connection/executors/index.d.ts +2 -0
- package/dist/connection/executors/index.js +2 -0
- package/dist/connection/executors/reading.js +22 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +1 -0
- package/dist/connection/input.js +4 -4
- package/dist/connection/login.d.ts +1 -1
- package/dist/connection/login.js +4 -3
- package/dist/connection/output/format.js +6 -3
- package/dist/connection/output/index.d.ts +1 -1
- package/dist/connection/output/index.js +1 -1
- package/dist/connection/resolve.d.ts +5 -0
- package/dist/connection/setup-file.js +227 -0
- package/dist/connection/setup-project.js +138 -0
- package/dist/connection/system.js +126 -61
- package/dist/connection/tree/tree.js +179 -10
- package/dist/container/client.d.ts +2 -0
- package/dist/events/commands.js +65 -0
- package/dist/events/index.js +2 -0
- package/dist/events/tree/index.js +2 -0
- package/dist/events/tree/tree.js +17 -0
- package/dist/fleet/fleet.d.ts +7 -8
- package/dist/fleet/fleet.js +18 -6
- package/dist/fleet/index.d.ts +1 -1
- package/dist/fleet/index.js +1 -1
- package/dist/github/client.d.ts +189 -0
- package/dist/github/client.js +16 -0
- package/dist/github/commands.d.ts +17 -0
- package/dist/github/commands.js +81 -0
- package/dist/github/index.d.ts +3 -0
- package/dist/github/index.js +3 -0
- package/dist/github/input.js +114 -0
- package/dist/github/output/format.js +78 -0
- package/dist/github/output/index.js +2 -0
- package/dist/github/tree/index.js +2 -0
- package/dist/github/tree/tree.js +28 -0
- package/dist/goal/client.d.ts +246 -0
- package/dist/goal/client.js +13 -0
- package/dist/goal/commands.d.ts +22 -0
- package/dist/goal/commands.js +110 -0
- package/dist/goal/index.d.ts +4 -0
- package/dist/goal/index.js +4 -0
- package/dist/goal/input.js +118 -0
- package/dist/goal/output/format.js +29 -0
- package/dist/goal/output/index.js +2 -0
- package/dist/goal/pause.d.ts +16 -0
- package/dist/goal/pause.js +91 -0
- package/dist/goal/tree/index.js +2 -0
- package/dist/goal/tree/tree.js +49 -0
- package/dist/hold/client.d.ts +2 -0
- package/dist/hold/tree/tree.js +2 -2
- package/dist/import/batch/batch.js +196 -0
- package/dist/import/batch/index.js +3 -0
- package/dist/import/batch/manifest.js +108 -0
- package/dist/import/client.d.ts +3 -3
- package/dist/import/client.js +1 -1
- package/dist/import/commands.d.ts +2 -0
- package/dist/import/commands.js +104 -18
- package/dist/import/detach.d.ts +12 -0
- package/dist/import/detach.js +70 -0
- package/dist/import/index.d.ts +2 -1
- package/dist/import/index.js +2 -1
- package/dist/import/input.js +68 -11
- package/dist/import/output.js +57 -8
- package/dist/inbox/client.d.ts +310 -0
- package/dist/inbox/client.js +15 -0
- package/dist/inbox/index.d.ts +2 -0
- package/dist/inbox/index.js +2 -0
- package/dist/integration/client.d.ts +607 -1
- package/dist/integration/client.js +41 -1
- package/dist/integration/commands.d.ts +16 -0
- package/dist/integration/commands.js +93 -10
- package/dist/integration/index.d.ts +1 -1
- package/dist/integration/index.js +1 -1
- package/dist/local-node/client.d.ts +13 -1
- package/dist/local-node/client.js +191 -235
- package/dist/local-node/index.d.ts +1 -1
- package/dist/local-node/index.js +1 -1
- package/dist/local-node/launch/index.d.ts +2 -0
- package/dist/local-node/launch/index.js +2 -0
- package/dist/local-node/launch/launch.d.ts +19 -0
- package/dist/local-node/launch/launch.js +60 -0
- package/dist/login/commands.js +7 -1
- package/dist/login/gateway.js +36 -13
- package/dist/login/menu.js +2 -1
- package/dist/login/vendor-account.js +3 -2
- package/dist/login/vendor-input.js +5 -4
- package/dist/mcp/calls.js +47 -222
- package/dist/mcp/routing.d.ts +3 -2
- package/dist/mcp/routing.js +39 -8
- package/dist/mcp/server.d.ts +10 -1
- package/dist/mcp/server.js +16 -6
- package/dist/migrate/classes.js +158 -0
- package/dist/migrate/commands.js +46 -0
- package/dist/migrate/format.js +199 -0
- package/dist/migrate/index.js +2 -0
- package/dist/migrate/item.js +59 -0
- package/dist/migrate/plan.js +79 -0
- package/dist/migrate/tree/index.js +2 -0
- package/dist/migrate/tree/tree.js +23 -0
- package/dist/node-update/client.d.ts +17 -0
- package/dist/node-update/client.js +27 -0
- package/dist/node-update/commands.d.ts +20 -0
- package/dist/node-update/commands.js +150 -0
- package/dist/node-update/index.d.ts +4 -0
- package/dist/node-update/index.js +4 -0
- package/dist/node-update/output.d.ts +12 -0
- package/dist/node-update/output.js +165 -0
- package/dist/node-update/tree/index.js +2 -0
- package/dist/node-update/tree/tree.js +73 -0
- package/dist/pairing/client.d.ts +13 -0
- package/dist/pairing/client.js +36 -0
- package/dist/pairing/commands.d.ts +15 -0
- package/dist/pairing/commands.js +131 -0
- package/dist/pairing/index.d.ts +4 -0
- package/dist/pairing/index.js +4 -0
- package/dist/pairing/output.d.ts +12 -0
- package/dist/pairing/output.js +53 -0
- package/dist/pairing/tree/index.js +2 -0
- package/dist/pairing/tree/tree.js +35 -0
- package/dist/panel/client.d.ts +9 -0
- package/dist/panel/client.js +24 -0
- package/dist/panel/commands.d.ts +19 -0
- package/dist/panel/commands.js +112 -0
- package/dist/panel/index.d.ts +3 -0
- package/dist/panel/index.js +3 -0
- package/dist/panel/tree/index.js +2 -0
- package/dist/panel/tree/tree.js +14 -0
- package/dist/port-lease/client.d.ts +3 -0
- package/dist/principal/client.d.ts +9 -0
- package/dist/principal/client.js +7 -0
- package/dist/principal/commands.d.ts +14 -0
- package/dist/principal/commands.js +84 -0
- package/dist/principal/index.d.ts +4 -0
- package/dist/principal/index.js +4 -0
- package/dist/principal/output.d.ts +8 -0
- package/dist/principal/output.js +43 -0
- package/dist/principal/tree/index.js +2 -0
- package/dist/principal/tree/tree.js +31 -0
- package/dist/project-guard/client.d.ts +13 -0
- package/dist/project-guard/input.js +15 -1
- package/dist/project-guard/output/format.js +5 -0
- package/dist/project-instructions/client.d.ts +56 -0
- package/dist/project-instructions/client.js +7 -0
- package/dist/project-instructions/commands.d.ts +13 -0
- package/dist/project-instructions/commands.js +89 -0
- package/dist/project-instructions/index.d.ts +3 -0
- package/dist/project-instructions/index.js +3 -0
- package/dist/project-instructions/input.js +33 -0
- package/dist/project-instructions/output/format.js +22 -0
- package/dist/project-instructions/output/index.js +2 -0
- package/dist/project-knowledge/change.js +22 -0
- package/dist/project-knowledge/client.d.ts +127 -0
- package/dist/project-knowledge/client.js +17 -0
- package/dist/project-knowledge/commands.d.ts +14 -0
- package/dist/project-knowledge/commands.js +100 -0
- package/dist/project-knowledge/index.d.ts +3 -0
- package/dist/project-knowledge/index.js +3 -0
- package/dist/project-knowledge/input.js +32 -0
- package/dist/project-knowledge/output/format.js +64 -0
- package/dist/project-knowledge/output/index.js +2 -0
- package/dist/project-knowledge/sources.js +108 -0
- package/dist/project-knowledge/upload.js +27 -0
- package/dist/project-workspace/discover.d.ts +11 -0
- package/dist/project-workspace/discover.js +48 -0
- package/dist/project-workspace/git-reads.d.ts +12 -0
- package/dist/project-workspace/git-reads.js +71 -0
- package/dist/project-workspace/index.d.ts +2 -0
- package/dist/project-workspace/index.js +2 -0
- package/dist/project-workspace/metadata-client.d.ts +2 -0
- package/dist/project-workspace/output/human.js +1 -1
- package/dist/project-workspace/tree/tree.js +105 -5
- package/dist/reach/client.d.ts +9 -0
- package/dist/reach/client.js +7 -0
- package/dist/reach/commands.d.ts +14 -0
- package/dist/reach/commands.js +72 -0
- package/dist/reach/index.d.ts +3 -0
- package/dist/reach/index.js +3 -0
- package/dist/reach/output.js +41 -0
- package/dist/reach/tree/index.js +2 -0
- package/dist/reach/tree/tree.js +28 -0
- package/dist/reference/resolve.js +2 -1
- package/dist/remote-node/client.d.ts +85 -0
- package/dist/remote-node/commands.d.ts +1 -0
- package/dist/remote-node/commands.js +61 -18
- package/dist/remote-node/connector.d.ts +16 -0
- package/dist/remote-node/connector.js +10 -3
- package/dist/remote-node/index.d.ts +1 -1
- package/dist/remote-node/index.js +1 -1
- package/dist/remote-node/lifecycle.js +66 -0
- package/dist/remote-node/reachability.js +31 -18
- package/dist/remote-node/reading.js +31 -0
- package/dist/remote-node/text.js +68 -5
- package/dist/remote-node/tree/tree.js +26 -3
- package/dist/routine/client.d.ts +547 -13
- package/dist/routine/client.js +19 -1
- package/dist/routine/commands.d.ts +5 -0
- package/dist/routine/commands.js +73 -15
- package/dist/routine/index.d.ts +2 -1
- package/dist/routine/index.js +2 -1
- package/dist/routine/input.js +66 -3
- package/dist/routine/output/format.js +80 -19
- package/dist/routine/output/index.js +1 -1
- package/dist/routine/portable/import-files.js +74 -0
- package/dist/routine/portable/import-output.js +21 -0
- package/dist/routine/portable/import.js +274 -0
- package/dist/routine/portable/index.js +3 -0
- package/dist/routine/portable/portable.js +185 -0
- package/dist/routine/tree/tree.js +80 -8
- package/dist/routine/trigger/commands.d.ts +20 -0
- package/dist/routine/trigger/commands.js +74 -0
- package/dist/routine/trigger/format.js +42 -0
- package/dist/routine/trigger/index.d.ts +2 -0
- package/dist/routine/trigger/index.js +2 -0
- package/dist/routine/trigger/input.js +81 -0
- package/dist/run-ledger/client.d.ts +47 -0
- package/dist/secret/client.d.ts +39 -0
- package/dist/secret/client.js +6 -0
- package/dist/secret/commands.d.ts +12 -0
- package/dist/secret/commands.js +91 -0
- package/dist/secret/index.d.ts +3 -0
- package/dist/secret/index.js +3 -0
- package/dist/secret/input.js +22 -0
- package/dist/secret/output/format.js +10 -0
- package/dist/secret/output/index.js +2 -0
- package/dist/secret/tree/index.js +2 -0
- package/dist/secret/tree/tree.js +16 -0
- package/dist/session/agent-permission.d.ts +3 -2
- package/dist/session/approval/client.d.ts +9 -5
- package/dist/session/approval/client.js +2 -2
- package/dist/session/approval/commands.d.ts +8 -0
- package/dist/session/approval/commands.js +267 -21
- package/dist/session/approval/index.d.ts +1 -1
- package/dist/session/approval/index.js +1 -1
- package/dist/session/approval/output/format.js +53 -1
- package/dist/session/approval/output/index.js +1 -1
- package/dist/session/attach-render.js +6 -0
- package/dist/session/attach.d.ts +1 -1
- package/dist/session/attach.js +7 -2
- package/dist/session/client.d.ts +19 -13
- package/dist/session/client.js +39 -19
- package/dist/session/coding-client.d.ts +2 -0
- package/dist/session/coding-client.js +1 -2
- package/dist/session/coding-commands.js +24 -7
- package/dist/session/command/commands.js +109 -0
- package/dist/session/command/index.js +2 -0
- package/dist/session/commands.d.ts +6 -1
- package/dist/session/commands.js +417 -73
- package/dist/session/create-tasks.js +24 -51
- package/dist/session/creation/creation.js +51 -0
- package/dist/session/creation/index.js +2 -0
- package/dist/session/fork/fork.js +135 -0
- package/dist/session/fork/index.js +2 -0
- package/dist/session/git-status.d.ts +11 -0
- package/dist/session/git-status.js +30 -0
- package/dist/session/index.d.ts +4 -3
- package/dist/session/index.js +3 -2
- package/dist/session/interaction/client.d.ts +3 -0
- package/dist/session/move/index.js +2 -0
- package/dist/session/move/move.js +439 -0
- package/dist/session/output/held.js +28 -0
- package/dist/session/output/human.js +73 -10
- package/dist/session/output/tasks.js +68 -7
- package/dist/session/setup/index.js +2 -0
- package/dist/session/setup/setup.js +69 -0
- package/dist/session/spawn/caps.js +128 -0
- package/dist/session/spawn/index.js +5 -0
- package/dist/session/spawn/spawn.js +203 -0
- package/dist/session/spawn/standing.js +62 -0
- package/dist/session/spawn/supervision.js +62 -0
- package/dist/session/switch/index.js +2 -0
- package/dist/session/switch/switch.js +103 -0
- package/dist/session/tree/tree.js +372 -32
- package/dist/session/turn/attachments.js +54 -0
- package/dist/session/turn/client.d.ts +9 -1
- package/dist/session/turn/client.js +20 -1
- package/dist/session/turn/commands.d.ts +8 -1
- package/dist/session/turn/commands.js +253 -36
- package/dist/session/turn/index.d.ts +3 -3
- package/dist/session/turn/index.js +1 -1
- package/dist/session/turn/output.d.ts +34 -2
- package/dist/session/turn/output.js +52 -2
- package/dist/skills-sync/client.d.ts +9 -0
- package/dist/skills-sync/client.js +7 -0
- package/dist/skills-sync/commands.d.ts +15 -0
- package/dist/skills-sync/commands.js +241 -0
- package/dist/skills-sync/index.d.ts +3 -0
- package/dist/skills-sync/index.js +3 -0
- package/dist/skills-sync/output.js +168 -0
- package/dist/skills-sync/set-file.js +23 -0
- package/dist/skills-sync/tree/index.js +2 -0
- package/dist/skills-sync/tree/tree.js +38 -0
- package/dist/status/client.d.ts +21 -3
- package/dist/status/command.js +6 -3
- package/dist/status/doctor.d.ts +5 -1
- package/dist/status/doctor.js +14 -7
- package/dist/status/output/compact.d.ts +3 -0
- package/dist/status/output/compact.js +17 -7
- package/dist/status/output/human.js +25 -0
- package/dist/team-workspace/client.d.ts +1 -0
- package/dist/terminal/control-commands.js +26 -9
- package/dist/terminal/keys.js +62 -0
- package/dist/terminal/output/compact-list.js +3 -0
- package/dist/terminal/output/human.js +2 -2
- package/dist/terminal/tree/tree.js +1 -1
- package/dist/text-input/index.js +2 -0
- package/dist/text-input/text-input.js +35 -0
- package/dist/webhooks/client.d.ts +157 -0
- package/dist/webhooks/client.js +8 -0
- package/dist/webhooks/commands.d.ts +17 -0
- package/dist/webhooks/commands.js +76 -0
- package/dist/webhooks/index.d.ts +3 -0
- package/dist/webhooks/index.js +3 -0
- package/dist/webhooks/input.js +125 -0
- package/dist/webhooks/output/format.js +75 -0
- package/dist/webhooks/output/index.js +2 -0
- package/dist/webhooks/tree/index.js +2 -0
- package/dist/webhooks/tree/tree.js +49 -0
- package/guidance/maia-cli/SKILL.md +1 -1
- package/guidance/maia-node/SKILL.md +54 -0
- package/guidance/maia-orchestration/SKILL.md +1 -2
- package/guidance/maia-sessions/SKILL.md +110 -0
- package/package.json +7 -6
- package/dist/address-space/address-space.d.ts +0 -38
- package/dist/address-space/index.d.ts +0 -2
- package/dist/agents/input.d.ts +0 -130
- package/dist/agents/output/format.d.ts +0 -8
- package/dist/agents/output/index.d.ts +0 -2
- package/dist/agents/tree/index.d.ts +0 -2
- package/dist/agents/tree/tree.d.ts +0 -3
- package/dist/bootstrap/exit.d.ts +0 -14
- package/dist/bootstrap/exit.js +0 -42
- package/dist/bootstrap/index.d.ts +0 -3
- package/dist/bootstrap/index.js +0 -3
- package/dist/bootstrap/process.d.ts +0 -5
- package/dist/bootstrap/process.js +0 -23
- package/dist/bootstrap/run.d.ts +0 -25
- package/dist/bootstrap/run.js +0 -95
- package/dist/bootstrap/stdio.d.ts +0 -4
- package/dist/bootstrap/stdio.js +0 -9
- package/dist/cli/environment.d.ts +0 -8
- package/dist/cli/services.d.ts +0 -4
- package/dist/command-line/context.js +0 -2
- package/dist/command-line/input/stdin-stream.d.ts +0 -4
- package/dist/command-line/json-decoder.d.ts +0 -3
- package/dist/command-receipt/command.d.ts +0 -4
- package/dist/command-receipt/compact-list.d.ts +0 -20
- package/dist/command-receipt/index.d.ts +0 -3
- package/dist/command-tree/completion.d.ts +0 -6
- package/dist/command-tree/local.d.ts +0 -3
- package/dist/command-tree/row.js +0 -2
- package/dist/connection/access/format.d.ts +0 -8
- package/dist/connection/access/input.d.ts +0 -53
- package/dist/connection/input.d.ts +0 -50
- package/dist/connection/signin.d.ts +0 -4
- package/dist/connection/tree/index.d.ts +0 -2
- package/dist/connection/tree/tree.d.ts +0 -3
- package/dist/container/output/format.d.ts +0 -11
- package/dist/container/output/index.d.ts +0 -2
- package/dist/context/client.d.ts +0 -7
- package/dist/context/commands.d.ts +0 -3
- package/dist/context/index.d.ts +0 -3
- package/dist/dashboard/cockpit-client.d.ts +0 -6
- package/dist/dashboard/cockpit-client.js +0 -27
- package/dist/dashboard/cockpits.d.ts +0 -29
- package/dist/dashboard/cockpits.js +0 -65
- package/dist/dashboard/dashboard.d.ts +0 -7
- package/dist/dashboard/draw.d.ts +0 -15
- package/dist/dashboard/frame.d.ts +0 -4
- package/dist/dashboard/index.d.ts +0 -2
- package/dist/dashboard/modes.d.ts +0 -5
- package/dist/dashboard/node-connection.d.ts +0 -15
- package/dist/dashboard/node-connection.js +0 -51
- package/dist/dashboard/pi-tui.d.ts +0 -6
- package/dist/dashboard/status-bar.d.ts +0 -4
- package/dist/dashboard/terminal.d.ts +0 -53
- package/dist/dashboard/tree-model.d.ts +0 -28
- package/dist/dashboard/tree.d.ts +0 -10
- package/dist/development/cli.d.ts +0 -3
- package/dist/development/cli.js +0 -44
- package/dist/execution/tree/index.d.ts +0 -2
- package/dist/execution/tree/tree.d.ts +0 -3
- package/dist/hold/output/format.d.ts +0 -11
- package/dist/hold/output/index.d.ts +0 -2
- package/dist/hold/tree/index.d.ts +0 -2
- package/dist/hold/tree/tree.d.ts +0 -3
- package/dist/import/input.d.ts +0 -16
- package/dist/import/output.d.ts +0 -6
- package/dist/integration/output.d.ts +0 -22
- package/dist/login/failure.d.ts +0 -3
- package/dist/login/gateway.d.ts +0 -12
- package/dist/login/menu.d.ts +0 -4
- package/dist/login/output/format.d.ts +0 -16
- package/dist/login/output/index.d.ts +0 -2
- package/dist/login/vendor-account.d.ts +0 -95
- package/dist/login/vendor-input.d.ts +0 -14
- package/dist/mcp/calls.d.ts +0 -8
- package/dist/orchestration/output/compact-aggregate.d.ts +0 -121
- package/dist/orchestration/output/compact-run-list.d.ts +0 -20
- package/dist/orchestration/output/human.d.ts +0 -80
- package/dist/orchestration/output/index.d.ts +0 -4
- package/dist/orchestration/tree/index.d.ts +0 -2
- package/dist/orchestration/tree/tree.d.ts +0 -3
- package/dist/port-lease/input.d.ts +0 -65
- package/dist/port-lease/output/format.d.ts +0 -11
- package/dist/port-lease/output/index.d.ts +0 -2
- package/dist/presentation/output/format.d.ts +0 -11
- package/dist/presentation/output/index.d.ts +0 -3
- package/dist/project-guard/input.d.ts +0 -18
- package/dist/project-guard/output/format.d.ts +0 -11
- package/dist/project-guard/output/index.d.ts +0 -2
- package/dist/project-workspace/output/human.d.ts +0 -139
- package/dist/project-workspace/output/index.d.ts +0 -3
- package/dist/project-workspace/output/metadata.d.ts +0 -11
- package/dist/project-workspace/tree/index.d.ts +0 -2
- package/dist/project-workspace/tree/tree.d.ts +0 -3
- package/dist/provider/client.d.ts +0 -6
- package/dist/provider/commands.d.ts +0 -3
- package/dist/provider/index.d.ts +0 -3
- package/dist/reference/commands.d.ts +0 -3
- package/dist/reference/index.d.ts +0 -3
- package/dist/reference/resolve.d.ts +0 -31
- package/dist/reference/tree/index.d.ts +0 -2
- package/dist/reference/tree/tree.d.ts +0 -3
- package/dist/remote-node/reachability.d.ts +0 -64
- package/dist/remote-node/text.d.ts +0 -10
- package/dist/remote-node/tree/index.d.ts +0 -2
- package/dist/remote-node/tree/tree.d.ts +0 -3
- package/dist/routine/input.d.ts +0 -28
- package/dist/routine/output/format.d.ts +0 -23
- package/dist/routine/output/index.d.ts +0 -2
- package/dist/routine/tree/index.d.ts +0 -2
- package/dist/routine/tree/tree.d.ts +0 -3
- package/dist/run-ledger/input.d.ts +0 -42
- package/dist/run-ledger/output/format.d.ts +0 -11
- package/dist/run-ledger/output/index.d.ts +0 -2
- package/dist/session/approval/output/format.d.ts +0 -23
- package/dist/session/approval/output/index.d.ts +0 -2
- package/dist/session/attach-render.d.ts +0 -16
- package/dist/session/create-tasks.d.ts +0 -20
- package/dist/session/interaction/input.d.ts +0 -15
- package/dist/session/interaction/output/format.d.ts +0 -11
- package/dist/session/interaction/output/index.d.ts +0 -2
- package/dist/session/output/diff.d.ts +0 -3
- package/dist/session/output/failure.d.ts +0 -11
- package/dist/session/output/human.d.ts +0 -113
- package/dist/session/output/index.d.ts +0 -6
- package/dist/session/output/observe.d.ts +0 -4
- package/dist/session/output/tasks.d.ts +0 -34
- package/dist/session/task-file.d.ts +0 -5
- package/dist/session/tree/index.d.ts +0 -2
- package/dist/session/tree/tree.d.ts +0 -3
- package/dist/team-workspace/ceremony.d.ts +0 -19
- package/dist/team-workspace/confirmation.d.ts +0 -4
- package/dist/team-workspace/dependencies.js +0 -2
- package/dist/team-workspace/output.d.ts +0 -15
- package/dist/terminal/arguments.d.ts +0 -13
- package/dist/terminal/output/compact-list.d.ts +0 -148
- package/dist/terminal/output/human.d.ts +0 -42
- package/dist/terminal/output/index.d.ts +0 -3
- package/dist/terminal/tree/index.d.ts +0 -2
- package/dist/terminal/tree/tree.d.ts +0 -3
- /package/dist/command-line/{json-decoder.js → emit/json-decoder.js} +0 -0
- /package/dist/command-line/{json.d.ts → emit/json.d.ts} +0 -0
- /package/dist/command-line/{json.js → emit/json.js} +0 -0
package/dist/cli/cli.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as Cause from "effect/Cause";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as References from "effect/References";
|
|
3
4
|
import { argumentsAreBounded, CliArgumentError, LOCAL_NODE, parseArguments, readGlobalValue, reportError, writeSuccess, } from "../command-line/index.js";
|
|
4
|
-
import { createHelpTree, createNodeHelp, findNode, formatNodeHelp, formatRootHelp, isNodeBacked, REFERENCE_USAGE, unknownPathMessage, usageHint, } from "../command-tree/index.js";
|
|
5
|
+
import { createHelpTree, createNodeHelp, currentOptionSpellings, findNode, formatNodeHelp, formatRootHelp, isNodeBacked, REFERENCE_USAGE, unknownPathMessage, usageHint, } from "../command-tree/index.js";
|
|
5
6
|
const createArgumentError = (message) => ({
|
|
6
7
|
code: "invalid_argument",
|
|
7
8
|
message,
|
|
@@ -34,6 +35,15 @@ const NO_ENVIRONMENT = {};
|
|
|
34
35
|
const readEnvironment = (leaf) => isNodeBacked(leaf)
|
|
35
36
|
? Effect.flatMap(Effect.promise(() => import("./environment.js")), (module) => module.environmentOptions)
|
|
36
37
|
: Effect.succeed(NO_ENVIRONMENT);
|
|
38
|
+
const atConfiguredLogLevel = (source, context, program) => source === undefined
|
|
39
|
+
? program
|
|
40
|
+
: source.pipe(Effect.flatMap((configured) => configured.ok
|
|
41
|
+
? Effect.provideService(program, References.MinimumLogLevel, configured.level)
|
|
42
|
+
: Effect.sync(() => reportError({
|
|
43
|
+
code: "configuration_invalid",
|
|
44
|
+
message: configured.message,
|
|
45
|
+
retryable: false,
|
|
46
|
+
}, context))));
|
|
37
47
|
const fromEnvironment = (option, value) => value === undefined || value === ""
|
|
38
48
|
? undefined
|
|
39
49
|
: readGlobalValue(option, value);
|
|
@@ -44,12 +54,15 @@ const checkGlobalOptions = (parsed, leaf, remote) => {
|
|
|
44
54
|
: "Option '--node' is supported only by Node-backed commands.");
|
|
45
55
|
if (parsed.profile !== undefined && !isNodeBacked(leaf))
|
|
46
56
|
throw new CliArgumentError("Option '--profile' is supported only by Node-backed commands.");
|
|
57
|
+
if (parsed.json && leaf.json === false)
|
|
58
|
+
throw new CliArgumentError(`'maia ${leaf.path.join(" ")}' does not take the global '--json'; ${leaf.forms.some((form) => form.usage.includes("--json-events"))
|
|
59
|
+
? "use '--json-events' with print mode"
|
|
60
|
+
: "omit it"}.`);
|
|
47
61
|
};
|
|
48
62
|
const noInputFrom = (value) => value !== undefined && value !== "" && value !== "0";
|
|
49
63
|
const resolveOptions = (parsed, leaf, environment) => {
|
|
50
64
|
const nodeBacked = isNodeBacked(leaf);
|
|
51
65
|
const remote = nodeBacked && leaf.remote !== false;
|
|
52
|
-
checkGlobalOptions(parsed, leaf, remote);
|
|
53
66
|
const node = parsed.node ??
|
|
54
67
|
(remote ? fromEnvironment("--node", environment.node) : undefined);
|
|
55
68
|
const profile = parsed.profile ??
|
|
@@ -77,7 +90,11 @@ const resolveInvocationDependencies = (source, parsed, scope) => {
|
|
|
77
90
|
: source(parsed.profile, { name, scope });
|
|
78
91
|
};
|
|
79
92
|
const nodeBinder = (source, profile, scope) => typeof source === "function" && scope !== undefined
|
|
80
|
-
? {
|
|
93
|
+
? {
|
|
94
|
+
bindNode: (name) => name === LOCAL_NODE
|
|
95
|
+
? source(profile)
|
|
96
|
+
: source(profile, { name, scope }),
|
|
97
|
+
}
|
|
81
98
|
: {};
|
|
82
99
|
const commandContext = (input, parsed, scope) => ({
|
|
83
100
|
...nodeBinder(input.dependencies, parsed.profile, scope),
|
|
@@ -104,7 +121,7 @@ const reportFailures = (effect, context, tokens) => effect.pipe(Effect.catchDefe
|
|
|
104
121
|
? Effect.interrupt
|
|
105
122
|
: Effect.sync(() => reportFailure(Cause.squash(cause), context, tokens))));
|
|
106
123
|
const isHelpInvocation = (parsed) => parsed.help || parsed.tokens[0] === undefined || parsed.tokens[0] === "help";
|
|
107
|
-
const
|
|
124
|
+
const helpNode = (parsed) => {
|
|
108
125
|
const strict = parsed.tokens[0] === "help";
|
|
109
126
|
const end = parsed.tokens.indexOf("--");
|
|
110
127
|
const tokens = end === -1 ? parsed.tokens : parsed.tokens.slice(0, end);
|
|
@@ -112,6 +129,10 @@ const runHelp = (input, parsed) => Effect.sync(() => {
|
|
|
112
129
|
const { consumed, node } = findNode(path);
|
|
113
130
|
if (consumed < path.length && (strict || node.forms.length === 0))
|
|
114
131
|
throw new CliArgumentError(unknownPathMessage(path));
|
|
132
|
+
return node;
|
|
133
|
+
};
|
|
134
|
+
const runHelp = (input, parsed) => Effect.sync(() => {
|
|
135
|
+
const node = helpNode(parsed);
|
|
115
136
|
const root = node.path.length === 0;
|
|
116
137
|
writeSuccess(root
|
|
117
138
|
? createHelpTree(input.version)
|
|
@@ -123,7 +144,17 @@ const findLeaf = (typed) => {
|
|
|
123
144
|
const { consumed, node } = findNode(tokens);
|
|
124
145
|
if (node.forms.length === 0)
|
|
125
146
|
throw new CliArgumentError(unknownPathMessage(tokens));
|
|
126
|
-
return {
|
|
147
|
+
return {
|
|
148
|
+
leaf: node,
|
|
149
|
+
rest: currentOptionSpellings(node.path, tokens.slice(consumed)),
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
export const resolveCommand = (parsed) => {
|
|
153
|
+
if (isHelpInvocation(parsed))
|
|
154
|
+
return { node: helpNode(parsed), rest: [] };
|
|
155
|
+
const { leaf, rest } = findLeaf(parsed.tokens);
|
|
156
|
+
checkGlobalOptions(parsed, leaf, isNodeBacked(leaf) && leaf.remote !== false);
|
|
157
|
+
return { node: leaf, rest };
|
|
127
158
|
};
|
|
128
159
|
const leafProgram = (leaf, rest, context) => {
|
|
129
160
|
const reference = leaf.run;
|
|
@@ -167,14 +198,14 @@ const runParsed = (input, parsed) => {
|
|
|
167
198
|
if (isHelpInvocation(parsed))
|
|
168
199
|
return runHelp(input, parsed);
|
|
169
200
|
return Effect.gen(function* () {
|
|
170
|
-
const { leaf, rest } =
|
|
201
|
+
const { node: leaf, rest } = resolveCommand(parsed);
|
|
171
202
|
const resolved = resolveOptions(parsed, leaf, yield* readEnvironment(leaf));
|
|
172
203
|
if (parsed.node === undefined &&
|
|
173
204
|
resolved.node !== undefined &&
|
|
174
205
|
!parsed.json)
|
|
175
206
|
input.io.stderr(`node: ${resolved.node} (MAIA_NODE)\n`);
|
|
176
207
|
const run = (scope) => Effect.suspend(() => runResolved(leaf, rest, commandContext(input, resolved, scope)));
|
|
177
|
-
return yield* Effect.scoped(Effect.flatMap(Effect.scope, run));
|
|
208
|
+
return yield* atConfiguredLogLevel(isNodeBacked(leaf) ? input.logLevel : undefined, { io: input.io, json: parsed.json }, Effect.scoped(Effect.flatMap(Effect.scope, run)));
|
|
178
209
|
});
|
|
179
210
|
};
|
|
180
211
|
const executeCli = (input) => Effect.suspend(() => {
|
|
@@ -184,10 +215,11 @@ const executeCli = (input) => Effect.suspend(() => {
|
|
|
184
215
|
const { parsed } = invocation;
|
|
185
216
|
return reportFailures(runParsed(input, parsed), { io: input.io, json: parsed.json }, parsed.tokens);
|
|
186
217
|
});
|
|
187
|
-
export const makeCli = (dependencies) => (arguments_, version, io) => executeCli({
|
|
218
|
+
export const makeCli = (dependencies, logLevel) => (arguments_, version, io) => executeCli({
|
|
188
219
|
arguments_,
|
|
189
220
|
dependencies,
|
|
190
221
|
io,
|
|
222
|
+
logLevel,
|
|
191
223
|
version,
|
|
192
224
|
});
|
|
193
225
|
const loadProjectWorkspace = () => import("../project-workspace/index.js");
|
|
@@ -209,11 +241,26 @@ const loadPresentation = () => import("../presentation/index.js");
|
|
|
209
241
|
const loadMcp = () => import("../mcp/index.js");
|
|
210
242
|
const loadPortLease = () => import("../port-lease/index.js");
|
|
211
243
|
const loadApproval = () => import("../session/approval/index.js");
|
|
244
|
+
const loadInbox = () => import("../inbox/index.js");
|
|
212
245
|
const loadRemoteNode = () => import("../remote-node/index.js");
|
|
213
246
|
const loadRunLedger = () => import("../run-ledger/index.js");
|
|
247
|
+
const loadBoard = () => import("../board/index.js");
|
|
214
248
|
const loadProjectGuard = () => import("../project-guard/index.js");
|
|
249
|
+
const loadProjectInstructions = () => import("../project-instructions/index.js");
|
|
250
|
+
const loadSecret = () => import("../secret/index.js");
|
|
251
|
+
const loadProjectKnowledge = () => import("../project-knowledge/index.js");
|
|
215
252
|
const loadAgents = () => import("../agents/index.js");
|
|
253
|
+
const loadWebhooks = () => import("../webhooks/index.js");
|
|
254
|
+
const loadGithub = () => import("../github/index.js");
|
|
255
|
+
const loadGoal = () => import("../goal/index.js");
|
|
256
|
+
const loadPairing = () => import("../pairing/index.js");
|
|
257
|
+
const loadPrincipal = () => import("../principal/index.js");
|
|
258
|
+
const loadNodeUpdate = () => import("../node-update/index.js");
|
|
259
|
+
const loadSkillsSync = () => import("../skills-sync/index.js");
|
|
260
|
+
const loadPanel = () => import("../panel/index.js");
|
|
261
|
+
const loadReach = () => import("../reach/index.js");
|
|
216
262
|
const loadLocalNode = () => import("../local-node/index.js");
|
|
263
|
+
const loadLaunch = () => import("../local-node/launch/index.js");
|
|
217
264
|
const loadBootstrap = () => import("../team-workspace/index.js");
|
|
218
265
|
const lazyDependencies = (load, makeClient, binding) => Object.fromEntries(binding.names.map((name) => [
|
|
219
266
|
name,
|
|
@@ -250,6 +297,22 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
250
297
|
"statusClaudeCodeIntegration",
|
|
251
298
|
"applyClaudeCodeIntegration",
|
|
252
299
|
"removeClaudeCodeIntegration",
|
|
300
|
+
"planMaiaAgentIntegration",
|
|
301
|
+
"statusMaiaAgentIntegration",
|
|
302
|
+
"applyMaiaAgentIntegration",
|
|
303
|
+
"removeMaiaAgentIntegration",
|
|
304
|
+
"planPiIntegration",
|
|
305
|
+
"statusPiIntegration",
|
|
306
|
+
"applyPiIntegration",
|
|
307
|
+
"removePiIntegration",
|
|
308
|
+
"planAntigravityIntegration",
|
|
309
|
+
"statusAntigravityIntegration",
|
|
310
|
+
"applyAntigravityIntegration",
|
|
311
|
+
"removeAntigravityIntegration",
|
|
312
|
+
"planGrokCliIntegration",
|
|
313
|
+
"statusGrokCliIntegration",
|
|
314
|
+
"applyGrokCliIntegration",
|
|
315
|
+
"removeGrokCliIntegration",
|
|
253
316
|
],
|
|
254
317
|
}),
|
|
255
318
|
...lazyDependencies(loadConnection, (module, node) => module.makeConnectionClient(node), {
|
|
@@ -262,6 +325,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
262
325
|
"listConnectionGrants",
|
|
263
326
|
"listConnectionPools",
|
|
264
327
|
"listConnections",
|
|
328
|
+
"listInstalledHarnesses",
|
|
265
329
|
"previewConnectionGrant",
|
|
266
330
|
"previewConnectionPool",
|
|
267
331
|
"listConnectionModels",
|
|
@@ -323,6 +387,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
323
387
|
...binding,
|
|
324
388
|
names: [
|
|
325
389
|
"listRoutines",
|
|
390
|
+
"listRoutineRuns",
|
|
326
391
|
"showRoutine",
|
|
327
392
|
"previewRoutineCreate",
|
|
328
393
|
"confirmRoutineCreate",
|
|
@@ -332,6 +397,14 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
332
397
|
"confirmRoutineDisable",
|
|
333
398
|
"previewRoutineRun",
|
|
334
399
|
"confirmRoutineRun",
|
|
400
|
+
"previewRoutineUpdate",
|
|
401
|
+
"confirmRoutineUpdate",
|
|
402
|
+
"previewRoutineMove",
|
|
403
|
+
"confirmRoutineMove",
|
|
404
|
+
"listRoutineTriggers",
|
|
405
|
+
"previewRoutineTriggerCreate",
|
|
406
|
+
"confirmRoutineTriggerCreate",
|
|
407
|
+
"disableRoutineTrigger",
|
|
335
408
|
],
|
|
336
409
|
}),
|
|
337
410
|
...lazyDependencies(() => import("../project-workspace/index.js"), (module, node) => module.makeProjectMetadataClient(node), {
|
|
@@ -446,10 +519,13 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
446
519
|
...binding,
|
|
447
520
|
names: [
|
|
448
521
|
"cancelTurn",
|
|
522
|
+
"editQueuedTurn",
|
|
449
523
|
"interruptTurn",
|
|
450
524
|
"listTurnQueue",
|
|
525
|
+
"promoteQueuedTurn",
|
|
451
526
|
"sendTurn",
|
|
452
527
|
"showTurn",
|
|
528
|
+
"showTurnAttachmentPolicy",
|
|
453
529
|
"waitTurns",
|
|
454
530
|
],
|
|
455
531
|
}),
|
|
@@ -458,6 +534,16 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
458
534
|
...binding,
|
|
459
535
|
names: ["listApprovals", "respondToApproval", "showApproval"],
|
|
460
536
|
}),
|
|
537
|
+
...lazyDependencies(loadInbox, (module, node) => module.makeInboxClient(node), {
|
|
538
|
+
...binding,
|
|
539
|
+
names: [
|
|
540
|
+
"listInbox",
|
|
541
|
+
"respondToInboxItem",
|
|
542
|
+
"settleInboxItem",
|
|
543
|
+
"showInboxItem",
|
|
544
|
+
"snoozeInboxItem",
|
|
545
|
+
],
|
|
546
|
+
}),
|
|
461
547
|
...lazyDependencies(loadPortLease, (module, node) => module.makePortLeaseClient(node), {
|
|
462
548
|
...binding,
|
|
463
549
|
names: [
|
|
@@ -478,19 +564,133 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
478
564
|
"showRunLedgerTask",
|
|
479
565
|
],
|
|
480
566
|
}),
|
|
567
|
+
...lazyDependencies(loadBoard, (module, node) => module.makeBoardClient(node), {
|
|
568
|
+
...binding,
|
|
569
|
+
names: [
|
|
570
|
+
"assignBoardTask",
|
|
571
|
+
"cancelBoardTask",
|
|
572
|
+
"claimBoardTask",
|
|
573
|
+
"completeBoardTask",
|
|
574
|
+
"createBoardTask",
|
|
575
|
+
"failBoardTask",
|
|
576
|
+
"listBoardTasks",
|
|
577
|
+
"planBoardTasks",
|
|
578
|
+
"postBoardMessage",
|
|
579
|
+
"promoteBoardThread",
|
|
580
|
+
"readBoardPath",
|
|
581
|
+
"releaseBoardTask",
|
|
582
|
+
"renewBoardTask",
|
|
583
|
+
"reopenBoardTask",
|
|
584
|
+
"replaceBoardTaskNeeds",
|
|
585
|
+
"replyToBoardMessage",
|
|
586
|
+
"showBoardTask",
|
|
587
|
+
"showBoardThread",
|
|
588
|
+
],
|
|
589
|
+
}),
|
|
481
590
|
...lazyDependencies(loadProjectGuard, (module, node) => module.makeProjectGuardClient(node), {
|
|
482
591
|
...binding,
|
|
483
592
|
names: ["confirmProjectGuard", "previewProjectGuard", "showProjectGuard"],
|
|
484
593
|
}),
|
|
594
|
+
...lazyDependencies(loadProjectInstructions, (module, node) => module.makeProjectInstructionsClient(node), {
|
|
595
|
+
...binding,
|
|
596
|
+
names: [
|
|
597
|
+
"confirmProjectInstructionsChange",
|
|
598
|
+
"previewProjectInstructionsChange",
|
|
599
|
+
"showProjectInstructions",
|
|
600
|
+
],
|
|
601
|
+
}),
|
|
602
|
+
...lazyDependencies(loadSecret, (module, node) => module.makeSecretClient(node), { ...binding, names: ["confirmSecretSet", "previewSecretSet"] }),
|
|
603
|
+
...lazyDependencies(loadProjectKnowledge, (module, node) => module.makeProjectKnowledgeClient(node), {
|
|
604
|
+
...binding,
|
|
605
|
+
names: [
|
|
606
|
+
"commitProjectKnowledgeAdd",
|
|
607
|
+
"confirmProjectKnowledgeAdd",
|
|
608
|
+
"confirmProjectKnowledgeRemove",
|
|
609
|
+
"listProjectKnowledge",
|
|
610
|
+
"previewProjectKnowledgeAdd",
|
|
611
|
+
"previewProjectKnowledgeRemove",
|
|
612
|
+
"sendProjectKnowledgeChunk",
|
|
613
|
+
],
|
|
614
|
+
}),
|
|
485
615
|
...lazyDependencies(loadAgents, (module, node) => module.makeAgentsClient(node), {
|
|
486
616
|
...binding,
|
|
487
617
|
names: [
|
|
488
618
|
"confirmAgentChange",
|
|
619
|
+
"detectAgents",
|
|
489
620
|
"listAgents",
|
|
490
621
|
"previewAgentChange",
|
|
491
622
|
"showAgent",
|
|
492
623
|
],
|
|
493
624
|
}),
|
|
625
|
+
...lazyDependencies(loadWebhooks, (module, node) => module.makeWebhooksClient(node), {
|
|
626
|
+
...binding,
|
|
627
|
+
names: [
|
|
628
|
+
"confirmWebhookChange",
|
|
629
|
+
"listWebhookDeliveries",
|
|
630
|
+
"listWebhooks",
|
|
631
|
+
"previewWebhookChange",
|
|
632
|
+
],
|
|
633
|
+
}),
|
|
634
|
+
...lazyDependencies(loadGithub, (module, node) => module.makeGithubCliClient(node), {
|
|
635
|
+
...binding,
|
|
636
|
+
names: [
|
|
637
|
+
"createGithubConnection",
|
|
638
|
+
"linkPullRequest",
|
|
639
|
+
"revokeGithubConnection",
|
|
640
|
+
"showGithubConnections",
|
|
641
|
+
"showPullRequestStatus",
|
|
642
|
+
"watchPullRequest",
|
|
643
|
+
],
|
|
644
|
+
}),
|
|
645
|
+
...lazyDependencies(loadGoal, (module, node) => module.makeGoalCliClient(node), {
|
|
646
|
+
...binding,
|
|
647
|
+
names: [
|
|
648
|
+
"clearGoal",
|
|
649
|
+
"markGoal",
|
|
650
|
+
"setGoal",
|
|
651
|
+
"showGoal",
|
|
652
|
+
"transitionGoal",
|
|
653
|
+
"updateGoal",
|
|
654
|
+
],
|
|
655
|
+
}),
|
|
656
|
+
...lazyDependencies(loadPairing, (module, node) => module.makePairingClient(node), {
|
|
657
|
+
...binding,
|
|
658
|
+
names: [
|
|
659
|
+
"confirmPairing",
|
|
660
|
+
"previewPairing",
|
|
661
|
+
"redeemPairing",
|
|
662
|
+
"showPairings",
|
|
663
|
+
],
|
|
664
|
+
}),
|
|
665
|
+
...lazyDependencies(loadPrincipal, (module, node) => module.makePrincipalClient(node), {
|
|
666
|
+
...binding,
|
|
667
|
+
names: ["confirmPrincipal", "previewPrincipal", "showPrincipals"],
|
|
668
|
+
}),
|
|
669
|
+
...lazyDependencies(loadNodeUpdate, (module, node) => module.makeNodeUpdateClient(node), {
|
|
670
|
+
...binding,
|
|
671
|
+
names: [
|
|
672
|
+
"checkNodeUpdate",
|
|
673
|
+
"confirmNodeUpdateApply",
|
|
674
|
+
"confirmNodeUpdateRollback",
|
|
675
|
+
"getNodeUpdatePolicy",
|
|
676
|
+
"pauseNodeUpdate",
|
|
677
|
+
"previewNodeUpdateApply",
|
|
678
|
+
"previewNodeUpdateRollback",
|
|
679
|
+
"resumeNodeUpdate",
|
|
680
|
+
"setNodeUpdatePolicy",
|
|
681
|
+
"showNodeUpdate",
|
|
682
|
+
"showNodeUpdateStatus",
|
|
683
|
+
],
|
|
684
|
+
}),
|
|
685
|
+
...lazyDependencies(loadSkillsSync, (module, node) => module.makeSkillsSyncClient(node), {
|
|
686
|
+
...binding,
|
|
687
|
+
names: ["confirmSkillsSync", "previewSkillsSync", "showSkillsSync"],
|
|
688
|
+
}),
|
|
689
|
+
...lazyDependencies(loadPanel, (module, node) => module.makePanelClient(node), { ...binding, names: ["openBrowser", "panelAddress"] }),
|
|
690
|
+
...lazyDependencies(loadReach, (module, node) => module.makeReachClient(node), {
|
|
691
|
+
...binding,
|
|
692
|
+
names: ["confirmReach", "previewReach", "showReach"],
|
|
693
|
+
}),
|
|
494
694
|
...lazyDependencies(loadRemoteNode, (module, node) => module.makeRemoteNodeClient(node), {
|
|
495
695
|
...binding,
|
|
496
696
|
names: [
|
|
@@ -512,20 +712,22 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
512
712
|
names: ["callCoordinatorTool", "serveMcp"],
|
|
513
713
|
}),
|
|
514
714
|
...lazyDependencies(loadStatus, (module, node) => module.makeStatusClient(node), { ...binding, names: ["createMonitorBootstrap", "readStatus"] }),
|
|
715
|
+
startLocalNode: (profile, version) => Effect.flatMap(Effect.promise(loadLaunch), (module) => module.startLocalNode(profile, version)),
|
|
515
716
|
});
|
|
516
|
-
const remoteConnector = (remote, local) => {
|
|
717
|
+
const remoteConnector = (remote, local, ssh) => {
|
|
517
718
|
const cache = {};
|
|
518
719
|
return (options) => Effect.promise(loadRemoteNode).pipe(Effect.flatMap((module) => {
|
|
519
720
|
cache.connector ??= module.makeRemoteNodeConnector({
|
|
520
721
|
...(local === undefined ? {} : { local }),
|
|
521
722
|
name: remote.name,
|
|
522
723
|
scope: remote.scope,
|
|
724
|
+
...(ssh === undefined ? {} : { ssh }),
|
|
523
725
|
});
|
|
524
726
|
return cache.connector(options);
|
|
525
727
|
}));
|
|
526
728
|
};
|
|
527
729
|
const remoteSignIn = (remote, binding) => (connection) => Effect.promise(loadRemoteNode).pipe(Effect.flatMap((module) => module.remoteVendorLogin({ ...binding, name: remote.name })(connection)));
|
|
528
|
-
export const makeCliDependencies = (connector) => (profile, remote) => {
|
|
730
|
+
export const makeCliDependencies = (connector, ssh) => (profile, remote) => {
|
|
529
731
|
const binding = {
|
|
530
732
|
...(connector === undefined ? {} : { connector }),
|
|
531
733
|
...(profile === undefined ? {} : { profile }),
|
|
@@ -535,11 +737,12 @@ export const makeCliDependencies = (connector) => (profile, remote) => {
|
|
|
535
737
|
: {
|
|
536
738
|
...makeDefaultCliDependencies({
|
|
537
739
|
...binding,
|
|
538
|
-
connector: remoteConnector(remote, connector),
|
|
740
|
+
connector: remoteConnector(remote, connector, ssh),
|
|
539
741
|
remote: true,
|
|
540
742
|
}),
|
|
541
743
|
runVendorLogin: remoteSignIn(remote, binding),
|
|
542
744
|
};
|
|
543
745
|
};
|
|
544
|
-
|
|
746
|
+
const loadConfiguredLogLevel = Effect.promise(() => import("./log-level.js")).pipe(Effect.flatMap((module) => module.configuredLogLevel));
|
|
747
|
+
export const runCli = makeCli(makeCliDependencies(), loadConfiguredLogLevel);
|
|
545
748
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type CliDependencies, type CliDependencyResolver, type CliErrorOutput, type CliHelpResult, type CliIo, type CliStatusResult, type CliSuccessOutput, type CliSuccessResult, type CliVersionResult, makeCli, makeCliDependencies, runCli, } from "./cli.js";
|
|
1
|
+
export { type CliDependencies, type CliDependencyResolver, type CliErrorOutput, type CliHelpResult, type CliIo, type CliStatusResult, type CliSuccessOutput, type CliSuccessResult, type CliVersionResult, makeCli, makeCliDependencies, resolveCommand, runCli, } from "./cli.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cli/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { makeCli, makeCliDependencies, runCli, } from "./cli.js";
|
|
1
|
+
export { makeCli, makeCliDependencies, resolveCommand, runCli, } from "./cli.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type { LogLevel } from "effect/LogLevel";
|
|
3
|
+
export type ConfiguredLogLevel = {
|
|
4
|
+
readonly level: LogLevel;
|
|
5
|
+
readonly ok: true;
|
|
6
|
+
} | {
|
|
7
|
+
readonly message: string;
|
|
8
|
+
readonly ok: false;
|
|
9
|
+
};
|
|
10
|
+
export declare const configuredLogLevel: Effect.Effect<ConfiguredLogLevel>;
|
|
11
|
+
//# sourceMappingURL=log-level.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
|
|
2
|
+
import { minimumLogLevel, readMaiaConfig } from "@maiaos/agent/config";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
export const configuredLogLevel = readMaiaConfig.pipe(Effect.match({
|
|
5
|
+
onFailure: (error) => ({
|
|
6
|
+
message: error.message,
|
|
7
|
+
ok: false,
|
|
8
|
+
}),
|
|
9
|
+
onSuccess: (config) => ({
|
|
10
|
+
level: minimumLogLevel(config),
|
|
11
|
+
ok: true,
|
|
12
|
+
}),
|
|
13
|
+
}), Effect.provide(NodeFileSystem.layer));
|
|
14
|
+
//# sourceMappingURL=log-level.js.map
|
|
@@ -1,36 +1,51 @@
|
|
|
1
|
-
import type { AgentPermissionConfirmParameters, AgentPermissionConfirmResult, AgentPermissionPreviewParameters, AgentPermissionPreviewResult, ExecutionCatalogGetResult, ExecutionCommandRunResult, ExecutionFileReadResult, ExecutionPlacementCreateResult, ExecutionPlacementShowResult, ExecutionRelocationApplyResult, ExecutionRelocationPlanResult, ExecutionRelocationReconcileResult, ExecutionRelocationShowResult, ExecutionWorktreeCheckpointCreateResult, ExecutionWorktreeCheckpointShowResult, ExecutionWorktreeCreateResult, ExecutionWorktreeImportResult, ExecutionWorktreeReconcileResult, ExecutionWorktreeRemoveApplyResult, ExecutionWorktreeRemovePlanResult, ExecutionWorktreeStatusResult, InvocationContextShowResult, LiveTerminalCloseResult, LiveTerminalControllerAcquireResult, LiveTerminalControllerReleaseResult, LiveTerminalControllerRequestResult, LiveTerminalControllerRequestShowResult, LiveTerminalResizeResult, LiveTerminalSignalResult, LiveTerminalWriteResult, LocalNodeStatusResult, MonitorBootstrapCreateResult, OrchestrationDispatchSettleTerminalResult, OrchestrationDispatchShowResult, OrchestrationInboxAckResult, OrchestrationInboxCheckResult, OrchestrationQuestionCancelResult, OrchestrationQuestionOpenResult, OrchestrationQuestionReplyResult, OrchestrationRunCreateResult, OrchestrationRunListResult, OrchestrationRunShowResult, OrchestrationTaskListResult, OrchestrationTaskShowResult, ProjectContextListResult, ProjectContextRecordResult, ProjectContextShowResult, ProjectListResult, ProjectRegisterResult, ProjectShowResult, ProviderPoolListResult, ReceiptGetResult, ReceiptListParameters, ReceiptListResult, SessionArchiveResult, SessionCreateResult, SessionDiffResult, SessionEventsListResult, SessionInboxAckResult, SessionInboxCheckResult, SessionListResult, SessionMessageSendResult, SessionObserveResult, SessionResumeResult, SessionShowResult, SessionStartResult, SessionStopResult, TerminalCreateResult, TerminalEventsListResult, TerminalListResult, TerminalReadResult, TerminalShowResult, TurnCancelResult, TurnInterruptResult, TurnQueueListResult, TurnSendResult, TurnShowResult, TurnWaitResult, WorkspaceContextShowResult, WorkspaceExecutionConfigureResult, WorkspaceExecutionShowResult, WorkspaceListResult, WorkspaceMembershipAttachResult, WorkspaceRepositoryAttachResult, WorkspaceSelectResult, WorkspaceShowResult } from "@maiaos/sdk";
|
|
1
|
+
import type { AgentPermissionConfirmParameters, AgentPermissionConfirmResult, AgentPermissionPreviewParameters, AgentPermissionPreviewResult, ExecutionCatalogGetResult, ExecutionCommandRunResult, ExecutionFileReadResult, ExecutionPlacementCreateResult, ExecutionPlacementShowResult, ExecutionRelocationApplyResult, ExecutionRelocationPlanResult, ExecutionRelocationReconcileResult, ExecutionRelocationShowResult, ExecutionWorktreeCheckpointCreateResult, ExecutionWorktreeCheckpointShowResult, ExecutionWorktreeCreateResult, ExecutionWorktreeImportResult, ExecutionWorktreeReconcileResult, ExecutionWorktreeRemoveApplyResult, ExecutionWorktreeRemovePlanResult, ExecutionWorktreeStatusResult, InvocationContextShowResult, LiveTerminalCloseResult, LiveTerminalControllerAcquireResult, LiveTerminalControllerReleaseResult, LiveTerminalControllerRequestResult, LiveTerminalControllerRequestShowResult, LiveTerminalResizeResult, LiveTerminalSignalResult, LiveTerminalWriteResult, LocalNodeStatusResult, MonitorBootstrapCreateResult, OrchestrationDispatchSettleTerminalResult, OrchestrationDispatchShowResult, OrchestrationInboxAckResult, OrchestrationInboxCheckResult, OrchestrationQuestionCancelResult, OrchestrationQuestionOpenResult, OrchestrationQuestionReplyResult, OrchestrationRunCreateResult, OrchestrationRunListResult, OrchestrationRunShowResult, OrchestrationTaskListResult, OrchestrationTaskShowResult, ProjectContextListResult, ProjectContextRecordResult, ProjectContextShowResult, ProjectListResult, ProjectRegisterResult, ProjectShowResult, ProviderPoolListResult, ReceiptGetResult, ReceiptListParameters, ReceiptListResult, SessionArchiveResult, SessionCreateResult, SessionDiffResult, SessionEventsListResult, SessionInboxAckResult, SessionInboxCheckResult, SessionListResult, SessionMessageSendResult, SessionObserveResult, SessionResumeResult, SessionShowResult, SessionStartResult, SessionStopResult, TerminalCreateResult, TerminalEventsListResult, TerminalListResult, TerminalReadResult, TerminalShowResult, TurnAttachmentPolicyResult, TurnCancelResult, TurnInterruptResult, TurnQueueEditResult, TurnQueueListResult, TurnQueuePromoteResult, TurnSendResult, TurnShowResult, TurnWaitResult, WorkspaceContextShowResult, WorkspaceExecutionConfigureResult, WorkspaceExecutionShowResult, WorkspaceListResult, WorkspaceMembershipAttachResult, WorkspaceRepositoryAttachResult, WorkspaceSelectResult, WorkspaceShowResult } from "@maiaos/sdk";
|
|
2
2
|
import type * as Crypto from "effect/Crypto";
|
|
3
3
|
import type * as Effect from "effect/Effect";
|
|
4
4
|
import type { AgentsCliDependencies } from "../agents/index.js";
|
|
5
|
+
import type { BoardCliDependencies } from "../board/index.js";
|
|
5
6
|
import type { ConnectionCliDependencies, VendorLogin } from "../connection/index.js";
|
|
6
7
|
import type { ContainerCliDependencies } from "../container/index.js";
|
|
7
8
|
import type { ApplyExecutionRelocationInput, PlanExecutionRelocationInput, ReconcileExecutionRelocationInput } from "../execution/index.js";
|
|
9
|
+
import type { GithubCliDependencies } from "../github/index.js";
|
|
10
|
+
import type { GoalCliDependencies } from "../goal/index.js";
|
|
8
11
|
import type { HoldCliDependencies } from "../hold/index.js";
|
|
9
12
|
import type { DiscoveryCliDependencies } from "../import/index.js";
|
|
13
|
+
import type { InboxCliDependencies } from "../inbox/index.js";
|
|
10
14
|
import type { IntegrationCliDependencies } from "../integration/index.js";
|
|
11
15
|
import type { CliNodeCall, CliNodeEffect } from "../local-node/index.js";
|
|
16
|
+
import type { StartLocalNode } from "../local-node/launch/index.js";
|
|
12
17
|
import type { AgentProviderAccess } from "../login/index.js";
|
|
13
18
|
import type { McpCliDependencies } from "../mcp/index.js";
|
|
19
|
+
import type { NodeUpdateCliDependencies } from "../node-update/index.js";
|
|
14
20
|
import type { makeOrchestrationClient } from "../orchestration/index.js";
|
|
21
|
+
import type { PairingCliDependencies } from "../pairing/index.js";
|
|
22
|
+
import type { PanelCliDependencies } from "../panel/index.js";
|
|
15
23
|
import type { PortLeaseCliDependencies } from "../port-lease/index.js";
|
|
16
24
|
import type { PresentationCliDependencies } from "../presentation/index.js";
|
|
25
|
+
import type { PrincipalCliDependencies } from "../principal/index.js";
|
|
17
26
|
import type { ProjectGuardCliDependencies } from "../project-guard/index.js";
|
|
27
|
+
import type { ProjectInstructionsCliDependencies } from "../project-instructions/index.js";
|
|
28
|
+
import type { ProjectKnowledgeCliDependencies } from "../project-knowledge/index.js";
|
|
18
29
|
import type { AttachRepositoryInput, AttachWorkspaceMembershipInput, ConfigureWorkspaceExecutionInput, CreateExecutionCheckpointInput, CreateExecutionPlacementInput, CreateExecutionWorktreeInput, ImportExecutionWorktreeInput, ProjectMetadataCliDependencies, ReadExecutionFileInput, ReconcileExecutionWorktreeInput, RecordProjectContextInput, RegisterProjectInput, RemoveExecutionWorktreeInput, RunExecutionCommandInput, SelectWorkspaceInput } from "../project-workspace/index.js";
|
|
30
|
+
import type { ReachCliDependencies } from "../reach/index.js";
|
|
19
31
|
import type { RemoteNodeCliDependencies, SshLayer } from "../remote-node/index.js";
|
|
20
32
|
import type { RoutineCliDependencies } from "../routine/index.js";
|
|
21
33
|
import type { RunLedgerCliDependencies } from "../run-ledger/index.js";
|
|
34
|
+
import type { SecretCliDependencies } from "../secret/index.js";
|
|
22
35
|
import type { ApprovalCliDependencies } from "../session/approval/index.js";
|
|
23
|
-
import type { ArchiveSessionInput, AttachSessionInput, CreateSessionInput, DiffSessionInput, ListSessionsInput, makeSessionClient, SessionAttachStream, StartSessionInput } from "../session/index.js";
|
|
36
|
+
import type { ArchiveSessionInput, AttachSessionInput, CreateSessionInput, DiffSessionInput, ListSessionsInput, makeSessionClient, ResumeSessionInput, SessionAttachStream, StartSessionInput } from "../session/index.js";
|
|
24
37
|
import type { InteractionCliDependencies } from "../session/interaction/index.js";
|
|
25
|
-
import type { CancelTurnInput, InterruptTurnInput, SendTurnInput, WaitTurnsInput } from "../session/turn/index.js";
|
|
38
|
+
import type { CancelTurnInput, EditTurnInput, InterruptTurnInput, SendTurnInput, WaitTurnsInput } from "../session/turn/index.js";
|
|
39
|
+
import type { SkillsSyncCliDependencies } from "../skills-sync/index.js";
|
|
26
40
|
import type { BootstrapCliDependencies } from "../team-workspace/index.js";
|
|
27
41
|
import type { CreateTerminalInput, makeTerminalClient } from "../terminal/index.js";
|
|
42
|
+
import type { WebhooksCliDependencies } from "../webhooks/index.js";
|
|
43
|
+
import type { CliIo, CliResolution } from "./emit/index.js";
|
|
28
44
|
import type { CliArgumentError } from "./input/index.js";
|
|
29
|
-
import type { CliIo, CliResolution } from "./output.js";
|
|
30
45
|
type OrchestrationClient = ReturnType<typeof makeOrchestrationClient>;
|
|
31
46
|
type SessionClient = ReturnType<typeof makeSessionClient>;
|
|
32
47
|
type TerminalClient = ReturnType<typeof makeTerminalClient>;
|
|
33
|
-
export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDependencies & BootstrapCliDependencies & ConnectionCliDependencies & ContainerCliDependencies & HoldCliDependencies & DiscoveryCliDependencies & IntegrationCliDependencies & PresentationCliDependencies & McpCliDependencies & InteractionCliDependencies & PortLeaseCliDependencies & ProjectGuardCliDependencies & ProjectMetadataCliDependencies & RemoteNodeCliDependencies & RoutineCliDependencies & RunLedgerCliDependencies> & {
|
|
48
|
+
export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDependencies & BoardCliDependencies & BootstrapCliDependencies & ConnectionCliDependencies & ContainerCliDependencies & GithubCliDependencies & GoalCliDependencies & HoldCliDependencies & InboxCliDependencies & DiscoveryCliDependencies & IntegrationCliDependencies & PresentationCliDependencies & McpCliDependencies & NodeUpdateCliDependencies & InteractionCliDependencies & PairingCliDependencies & PanelCliDependencies & PortLeaseCliDependencies & PrincipalCliDependencies & ProjectGuardCliDependencies & ProjectInstructionsCliDependencies & ProjectKnowledgeCliDependencies & ProjectMetadataCliDependencies & ReachCliDependencies & RemoteNodeCliDependencies & RoutineCliDependencies & RunLedgerCliDependencies & SecretCliDependencies & SkillsSyncCliDependencies & WebhooksCliDependencies> & {
|
|
34
49
|
readonly acknowledgeAttachedSessionDelivery?: (input: Parameters<SessionClient["acknowledgeAttachedSessionDelivery"]>[0]) => CliNodeEffect<SessionInboxAckResult>;
|
|
35
50
|
readonly acknowledgeRunDelivery: (input: Parameters<OrchestrationClient["acknowledgeRunDelivery"]>[0]) => CliNodeEffect<OrchestrationInboxAckResult>;
|
|
36
51
|
readonly acquireTerminalController: (input: Parameters<TerminalClient["acquireTerminalController"]>[0]) => CliNodeEffect<LiveTerminalControllerAcquireResult>;
|
|
@@ -57,6 +72,7 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
57
72
|
readonly createSession: (input: CreateSessionInput) => CliNodeEffect<SessionCreateResult>;
|
|
58
73
|
readonly createTerminal: (input: CreateTerminalInput) => CliNodeEffect<TerminalCreateResult>;
|
|
59
74
|
readonly diffSession?: (input: DiffSessionInput) => CliNodeEffect<SessionDiffResult>;
|
|
75
|
+
readonly editQueuedTurn?: (input: EditTurnInput) => CliNodeEffect<TurnQueueEditResult>;
|
|
60
76
|
readonly getReceipt: (commandId: string) => CliNodeEffect<ReceiptGetResult>;
|
|
61
77
|
readonly importExecutionWorktree?: (input: ImportExecutionWorktreeInput) => CliNodeEffect<ExecutionWorktreeImportResult>;
|
|
62
78
|
readonly interruptTurn: (input: InterruptTurnInput) => CliNodeEffect<TurnInterruptResult>;
|
|
@@ -112,6 +128,7 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
112
128
|
readonly planExecutionWorktreeRemove?: (workspaceId: string) => CliNodeEffect<ExecutionWorktreeRemovePlanResult>;
|
|
113
129
|
readonly planSessions?: SessionClient["planSessions"];
|
|
114
130
|
readonly previewAgentPermission?: (input: AgentPermissionPreviewParameters) => CliNodeEffect<AgentPermissionPreviewResult>;
|
|
131
|
+
readonly promoteQueuedTurn?: (input: CancelTurnInput) => CliNodeEffect<TurnQueuePromoteResult>;
|
|
115
132
|
readonly readExecutionCatalog?: () => CliNodeEffect<ExecutionCatalogGetResult>;
|
|
116
133
|
readonly readExecutionFile?: (input: ReadExecutionFileInput) => CliNodeEffect<ExecutionFileReadResult>;
|
|
117
134
|
readonly readStatus: () => Effect.Effect<LocalNodeStatusResult, unknown, Crypto.Crypto>;
|
|
@@ -129,7 +146,7 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
129
146
|
readonly replyRunQuestion: (input: Parameters<OrchestrationClient["replyRunQuestion"]>[0]) => CliNodeEffect<OrchestrationQuestionReplyResult>;
|
|
130
147
|
readonly requestTerminalController: (input: Parameters<TerminalClient["requestTerminalController"]>[0]) => CliNodeEffect<LiveTerminalControllerRequestResult>;
|
|
131
148
|
readonly resizeTerminal: (input: Parameters<TerminalClient["resizeTerminal"]>[0]) => CliNodeEffect<LiveTerminalResizeResult>;
|
|
132
|
-
readonly resumeSession?: (input:
|
|
149
|
+
readonly resumeSession?: (input: ResumeSessionInput) => CliNodeEffect<SessionResumeResult>;
|
|
133
150
|
readonly runAgent?: (arguments_: readonly string[], io: CliIo) => Effect.Effect<number, unknown>;
|
|
134
151
|
readonly runExecutionCommand?: (input: RunExecutionCommandInput) => CliNodeEffect<ExecutionCommandRunResult>;
|
|
135
152
|
readonly runSessions?: SessionClient["runSessions"];
|
|
@@ -159,11 +176,13 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
159
176
|
readonly showTerminal: (terminalId: string) => CliNodeEffect<TerminalShowResult>;
|
|
160
177
|
readonly showTerminalControllerRequest: (input: Parameters<TerminalClient["showTerminalControllerRequest"]>[0]) => CliNodeEffect<LiveTerminalControllerRequestShowResult>;
|
|
161
178
|
readonly showTurn: (turnId: string) => CliNodeEffect<TurnShowResult>;
|
|
179
|
+
readonly showTurnAttachmentPolicy?: (sessionId: string) => CliNodeEffect<TurnAttachmentPolicyResult>;
|
|
162
180
|
readonly showWorkspace: (workspaceId: string) => CliNodeEffect<WorkspaceShowResult>;
|
|
163
181
|
readonly showWorkspaceContext?: () => CliNodeEffect<WorkspaceContextShowResult>;
|
|
164
182
|
readonly showWorkspaceExecution?: (workspaceId: string) => CliNodeEffect<WorkspaceExecutionShowResult>;
|
|
165
183
|
readonly signalTerminal: (input: Parameters<TerminalClient["signalTerminal"]>[0]) => CliNodeEffect<LiveTerminalSignalResult>;
|
|
166
184
|
readonly sshLayer?: SshLayer;
|
|
185
|
+
readonly startLocalNode?: StartLocalNode;
|
|
167
186
|
readonly startSession: (input: StartSessionInput) => CliNodeEffect<SessionStartResult>;
|
|
168
187
|
readonly stopSession?: (input: StartSessionInput) => CliNodeEffect<SessionStopResult>;
|
|
169
188
|
readonly waitSession?: SessionClient["waitSession"];
|
|
@@ -172,7 +191,6 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
172
191
|
};
|
|
173
192
|
export type CliServices = Crypto.Crypto;
|
|
174
193
|
export type CommandEffect = Effect.Effect<number, CliArgumentError, CliServices>;
|
|
175
|
-
export declare const LOCAL_NODE = "local";
|
|
176
194
|
export type CommandContext = {
|
|
177
195
|
readonly bindNode?: (name: string) => CliDependencies;
|
|
178
196
|
readonly dependencies: CliDependencies;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { decodeJsonText, jsonLine } from "./json.js";
|
|
2
|
+
export { type CliCommandOutput, type CliErrorOutput, type CliIo, type CliResolution, type CliSuccessOutput, type CliSuccessResult, exitCodeOf, type NodeResultPresenter, type OutputContext, reportError, writeNodeResult, writeSuccess, } from "./output.js";
|
|
3
|
+
export { block, cell, type CliTable, fields, formatRows, labelCells, tab, withNextPage, withPrunedHistory, } from "./rows.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { decodeJsonText, jsonLine } from "./json.js";
|
|
2
|
+
export { exitCodeOf, reportError, writeNodeResult, writeSuccess, } from "./output.js";
|
|
3
|
+
export { block, cell, fields, formatRows, labelCells, tab, withNextPage, withPrunedHistory, } from "./rows.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { NodeHolding } from "@maiaos/client-core/cockpit";
|
|
2
2
|
import type { ProtocolError } from "@maiaos/sdk";
|
|
3
3
|
import type * as Effect from "effect/Effect";
|
|
4
|
-
import type { CliMutationRecovery, CliNodeResult } from "
|
|
5
|
-
import type { BoundedStdinRequest, CliArgumentError, PromptOptions } from "
|
|
4
|
+
import type { CliMutationRecovery, CliNodeResult } from "../../local-node/index.js";
|
|
5
|
+
import type { BoundedStdinRequest, CliArgumentError, PromptOptions } from "../input/index.js";
|
|
6
6
|
export type CliIo = {
|
|
7
7
|
readonly cwd?: string;
|
|
8
8
|
readonly interactive?: boolean;
|
|
9
9
|
readonly prompt?: (question: string, options?: PromptOptions) => Effect.Effect<string | undefined>;
|
|
10
10
|
readonly stderr: (text: string) => void;
|
|
11
11
|
readonly stdin?: (request: BoundedStdinRequest) => Effect.Effect<string, CliArgumentError>;
|
|
12
|
+
readonly stdinIsTerminal?: boolean;
|
|
12
13
|
readonly stdout: (text: string) => void;
|
|
13
14
|
};
|
|
14
15
|
export type CliSuccessResult = {
|
|
@@ -46,6 +47,7 @@ export type OutputContext = {
|
|
|
46
47
|
readonly resolved?: readonly CliResolution[];
|
|
47
48
|
};
|
|
48
49
|
type ErrorContext = OutputContext & {
|
|
50
|
+
readonly hint?: string;
|
|
49
51
|
readonly nodes?: readonly NodeHolding[];
|
|
50
52
|
readonly notFoundHint?: string;
|
|
51
53
|
readonly recovery?: CliMutationRecovery;
|
|
@@ -55,10 +57,12 @@ export type CliCommandOutput = CliSuccessResult;
|
|
|
55
57
|
export declare const writeSuccess: <TResult extends CliCommandOutput>(result: TResult, { error, io, json, ok, resolved }: OutputContext, human: (result: TResult) => string) => void;
|
|
56
58
|
export declare const reportError: (error: ProtocolError, context: ErrorContext) => number;
|
|
57
59
|
export declare const exitCodeOf: (error: ProtocolError) => number;
|
|
60
|
+
type RefusalHint = (error: ProtocolError) => string | undefined;
|
|
58
61
|
export type NodeResultPresenter<TValue, TResult extends CliCommandOutput> = {
|
|
62
|
+
readonly refusalHint?: RefusalHint;
|
|
59
63
|
readonly toResult: (value: TValue) => TResult;
|
|
60
64
|
readonly toText: (result: TResult) => string;
|
|
61
65
|
};
|
|
62
|
-
export declare const writeNodeResult: <TValue, TResult extends CliCommandOutput>(result: CliNodeResult<TValue>, context: OutputContext, { toResult, toText }: NodeResultPresenter<TValue, TResult>) => number;
|
|
66
|
+
export declare const writeNodeResult: <TValue, TResult extends CliCommandOutput>(result: CliNodeResult<TValue>, context: OutputContext, { refusalHint, toResult, toText }: NodeResultPresenter<TValue, TResult>) => number;
|
|
63
67
|
export {};
|
|
64
68
|
//# sourceMappingURL=output.d.ts.map
|