@maiaos/cli 0.1.0-canary.10 → 0.1.0-canary.101
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 +227 -15
- package/dist/cli/environment.js +1 -0
- 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 +5 -0
- package/dist/command-line/emit/index.js +5 -0
- package/dist/command-line/{output.d.ts → emit/output.d.ts} +9 -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/emit/tone.d.ts +8 -0
- package/dist/command-line/emit/tone.js +15 -0
- package/dist/command-line/index.d.ts +7 -6
- package/dist/command-line/index.js +6 -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 +2 -0
- package/dist/command-line/input/prompt.js +2 -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 +145 -65
- 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
|
|
4
|
-
import {
|
|
3
|
+
import * as References from "effect/References";
|
|
4
|
+
import { argumentsAreBounded, CliArgumentError, colorOn, LOCAL_NODE, parseArguments, readGlobalValue, reportError, writeSuccess, } from "../command-line/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;
|
|
@@ -163,18 +194,27 @@ const runResolved = (leaf, rest, context) => {
|
|
|
163
194
|
};
|
|
164
195
|
return withCliServices(Effect.flatMap(Effect.promise(() => import("../address-space/index.js")), (module) => module.routeLeaf(context, routed, prepared)));
|
|
165
196
|
};
|
|
197
|
+
const withColor = (input, { environment, leaf, parsed, }) => ({
|
|
198
|
+
...input,
|
|
199
|
+
io: {
|
|
200
|
+
...input.io,
|
|
201
|
+
color: isNodeBacked(leaf) && colorOn(parsed.json, environment, input.io),
|
|
202
|
+
},
|
|
203
|
+
});
|
|
166
204
|
const runParsed = (input, parsed) => {
|
|
167
205
|
if (isHelpInvocation(parsed))
|
|
168
206
|
return runHelp(input, parsed);
|
|
169
207
|
return Effect.gen(function* () {
|
|
170
|
-
const { leaf, rest } =
|
|
171
|
-
const
|
|
208
|
+
const { node: leaf, rest } = resolveCommand(parsed);
|
|
209
|
+
const environment = yield* readEnvironment(leaf);
|
|
210
|
+
const resolved = resolveOptions(parsed, leaf, environment);
|
|
172
211
|
if (parsed.node === undefined &&
|
|
173
212
|
resolved.node !== undefined &&
|
|
174
213
|
!parsed.json)
|
|
175
214
|
input.io.stderr(`node: ${resolved.node} (MAIA_NODE)\n`);
|
|
176
|
-
const
|
|
177
|
-
|
|
215
|
+
const invocation = withColor(input, { environment, leaf, parsed });
|
|
216
|
+
const run = (scope) => Effect.suspend(() => runResolved(leaf, rest, commandContext(invocation, resolved, scope)));
|
|
217
|
+
return yield* atConfiguredLogLevel(isNodeBacked(leaf) ? input.logLevel : undefined, { io: input.io, json: parsed.json }, Effect.scoped(Effect.flatMap(Effect.scope, run)));
|
|
178
218
|
});
|
|
179
219
|
};
|
|
180
220
|
const executeCli = (input) => Effect.suspend(() => {
|
|
@@ -184,10 +224,11 @@ const executeCli = (input) => Effect.suspend(() => {
|
|
|
184
224
|
const { parsed } = invocation;
|
|
185
225
|
return reportFailures(runParsed(input, parsed), { io: input.io, json: parsed.json }, parsed.tokens);
|
|
186
226
|
});
|
|
187
|
-
export const makeCli = (dependencies) => (arguments_, version, io) => executeCli({
|
|
227
|
+
export const makeCli = (dependencies, logLevel) => (arguments_, version, io) => executeCli({
|
|
188
228
|
arguments_,
|
|
189
229
|
dependencies,
|
|
190
230
|
io,
|
|
231
|
+
logLevel,
|
|
191
232
|
version,
|
|
192
233
|
});
|
|
193
234
|
const loadProjectWorkspace = () => import("../project-workspace/index.js");
|
|
@@ -209,11 +250,26 @@ const loadPresentation = () => import("../presentation/index.js");
|
|
|
209
250
|
const loadMcp = () => import("../mcp/index.js");
|
|
210
251
|
const loadPortLease = () => import("../port-lease/index.js");
|
|
211
252
|
const loadApproval = () => import("../session/approval/index.js");
|
|
253
|
+
const loadInbox = () => import("../inbox/index.js");
|
|
212
254
|
const loadRemoteNode = () => import("../remote-node/index.js");
|
|
213
255
|
const loadRunLedger = () => import("../run-ledger/index.js");
|
|
256
|
+
const loadBoard = () => import("../board/index.js");
|
|
214
257
|
const loadProjectGuard = () => import("../project-guard/index.js");
|
|
258
|
+
const loadProjectInstructions = () => import("../project-instructions/index.js");
|
|
259
|
+
const loadSecret = () => import("../secret/index.js");
|
|
260
|
+
const loadProjectKnowledge = () => import("../project-knowledge/index.js");
|
|
215
261
|
const loadAgents = () => import("../agents/index.js");
|
|
262
|
+
const loadWebhooks = () => import("../webhooks/index.js");
|
|
263
|
+
const loadGithub = () => import("../github/index.js");
|
|
264
|
+
const loadGoal = () => import("../goal/index.js");
|
|
265
|
+
const loadPairing = () => import("../pairing/index.js");
|
|
266
|
+
const loadPrincipal = () => import("../principal/index.js");
|
|
267
|
+
const loadNodeUpdate = () => import("../node-update/index.js");
|
|
268
|
+
const loadSkillsSync = () => import("../skills-sync/index.js");
|
|
269
|
+
const loadPanel = () => import("../panel/index.js");
|
|
270
|
+
const loadReach = () => import("../reach/index.js");
|
|
216
271
|
const loadLocalNode = () => import("../local-node/index.js");
|
|
272
|
+
const loadLaunch = () => import("../local-node/launch/index.js");
|
|
217
273
|
const loadBootstrap = () => import("../team-workspace/index.js");
|
|
218
274
|
const lazyDependencies = (load, makeClient, binding) => Object.fromEntries(binding.names.map((name) => [
|
|
219
275
|
name,
|
|
@@ -250,6 +306,22 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
250
306
|
"statusClaudeCodeIntegration",
|
|
251
307
|
"applyClaudeCodeIntegration",
|
|
252
308
|
"removeClaudeCodeIntegration",
|
|
309
|
+
"planMaiaAgentIntegration",
|
|
310
|
+
"statusMaiaAgentIntegration",
|
|
311
|
+
"applyMaiaAgentIntegration",
|
|
312
|
+
"removeMaiaAgentIntegration",
|
|
313
|
+
"planPiIntegration",
|
|
314
|
+
"statusPiIntegration",
|
|
315
|
+
"applyPiIntegration",
|
|
316
|
+
"removePiIntegration",
|
|
317
|
+
"planAntigravityIntegration",
|
|
318
|
+
"statusAntigravityIntegration",
|
|
319
|
+
"applyAntigravityIntegration",
|
|
320
|
+
"removeAntigravityIntegration",
|
|
321
|
+
"planGrokCliIntegration",
|
|
322
|
+
"statusGrokCliIntegration",
|
|
323
|
+
"applyGrokCliIntegration",
|
|
324
|
+
"removeGrokCliIntegration",
|
|
253
325
|
],
|
|
254
326
|
}),
|
|
255
327
|
...lazyDependencies(loadConnection, (module, node) => module.makeConnectionClient(node), {
|
|
@@ -262,6 +334,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
262
334
|
"listConnectionGrants",
|
|
263
335
|
"listConnectionPools",
|
|
264
336
|
"listConnections",
|
|
337
|
+
"listInstalledHarnesses",
|
|
265
338
|
"previewConnectionGrant",
|
|
266
339
|
"previewConnectionPool",
|
|
267
340
|
"listConnectionModels",
|
|
@@ -323,6 +396,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
323
396
|
...binding,
|
|
324
397
|
names: [
|
|
325
398
|
"listRoutines",
|
|
399
|
+
"listRoutineRuns",
|
|
326
400
|
"showRoutine",
|
|
327
401
|
"previewRoutineCreate",
|
|
328
402
|
"confirmRoutineCreate",
|
|
@@ -332,6 +406,14 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
332
406
|
"confirmRoutineDisable",
|
|
333
407
|
"previewRoutineRun",
|
|
334
408
|
"confirmRoutineRun",
|
|
409
|
+
"previewRoutineUpdate",
|
|
410
|
+
"confirmRoutineUpdate",
|
|
411
|
+
"previewRoutineMove",
|
|
412
|
+
"confirmRoutineMove",
|
|
413
|
+
"listRoutineTriggers",
|
|
414
|
+
"previewRoutineTriggerCreate",
|
|
415
|
+
"confirmRoutineTriggerCreate",
|
|
416
|
+
"disableRoutineTrigger",
|
|
335
417
|
],
|
|
336
418
|
}),
|
|
337
419
|
...lazyDependencies(() => import("../project-workspace/index.js"), (module, node) => module.makeProjectMetadataClient(node), {
|
|
@@ -446,10 +528,13 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
446
528
|
...binding,
|
|
447
529
|
names: [
|
|
448
530
|
"cancelTurn",
|
|
531
|
+
"editQueuedTurn",
|
|
449
532
|
"interruptTurn",
|
|
450
533
|
"listTurnQueue",
|
|
534
|
+
"promoteQueuedTurn",
|
|
451
535
|
"sendTurn",
|
|
452
536
|
"showTurn",
|
|
537
|
+
"showTurnAttachmentPolicy",
|
|
453
538
|
"waitTurns",
|
|
454
539
|
],
|
|
455
540
|
}),
|
|
@@ -458,6 +543,16 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
458
543
|
...binding,
|
|
459
544
|
names: ["listApprovals", "respondToApproval", "showApproval"],
|
|
460
545
|
}),
|
|
546
|
+
...lazyDependencies(loadInbox, (module, node) => module.makeInboxClient(node), {
|
|
547
|
+
...binding,
|
|
548
|
+
names: [
|
|
549
|
+
"listInbox",
|
|
550
|
+
"respondToInboxItem",
|
|
551
|
+
"settleInboxItem",
|
|
552
|
+
"showInboxItem",
|
|
553
|
+
"snoozeInboxItem",
|
|
554
|
+
],
|
|
555
|
+
}),
|
|
461
556
|
...lazyDependencies(loadPortLease, (module, node) => module.makePortLeaseClient(node), {
|
|
462
557
|
...binding,
|
|
463
558
|
names: [
|
|
@@ -478,19 +573,133 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
478
573
|
"showRunLedgerTask",
|
|
479
574
|
],
|
|
480
575
|
}),
|
|
576
|
+
...lazyDependencies(loadBoard, (module, node) => module.makeBoardClient(node), {
|
|
577
|
+
...binding,
|
|
578
|
+
names: [
|
|
579
|
+
"assignBoardTask",
|
|
580
|
+
"cancelBoardTask",
|
|
581
|
+
"claimBoardTask",
|
|
582
|
+
"completeBoardTask",
|
|
583
|
+
"createBoardTask",
|
|
584
|
+
"failBoardTask",
|
|
585
|
+
"listBoardTasks",
|
|
586
|
+
"planBoardTasks",
|
|
587
|
+
"postBoardMessage",
|
|
588
|
+
"promoteBoardThread",
|
|
589
|
+
"readBoardPath",
|
|
590
|
+
"releaseBoardTask",
|
|
591
|
+
"renewBoardTask",
|
|
592
|
+
"reopenBoardTask",
|
|
593
|
+
"replaceBoardTaskNeeds",
|
|
594
|
+
"replyToBoardMessage",
|
|
595
|
+
"showBoardTask",
|
|
596
|
+
"showBoardThread",
|
|
597
|
+
],
|
|
598
|
+
}),
|
|
481
599
|
...lazyDependencies(loadProjectGuard, (module, node) => module.makeProjectGuardClient(node), {
|
|
482
600
|
...binding,
|
|
483
601
|
names: ["confirmProjectGuard", "previewProjectGuard", "showProjectGuard"],
|
|
484
602
|
}),
|
|
603
|
+
...lazyDependencies(loadProjectInstructions, (module, node) => module.makeProjectInstructionsClient(node), {
|
|
604
|
+
...binding,
|
|
605
|
+
names: [
|
|
606
|
+
"confirmProjectInstructionsChange",
|
|
607
|
+
"previewProjectInstructionsChange",
|
|
608
|
+
"showProjectInstructions",
|
|
609
|
+
],
|
|
610
|
+
}),
|
|
611
|
+
...lazyDependencies(loadSecret, (module, node) => module.makeSecretClient(node), { ...binding, names: ["confirmSecretSet", "previewSecretSet"] }),
|
|
612
|
+
...lazyDependencies(loadProjectKnowledge, (module, node) => module.makeProjectKnowledgeClient(node), {
|
|
613
|
+
...binding,
|
|
614
|
+
names: [
|
|
615
|
+
"commitProjectKnowledgeAdd",
|
|
616
|
+
"confirmProjectKnowledgeAdd",
|
|
617
|
+
"confirmProjectKnowledgeRemove",
|
|
618
|
+
"listProjectKnowledge",
|
|
619
|
+
"previewProjectKnowledgeAdd",
|
|
620
|
+
"previewProjectKnowledgeRemove",
|
|
621
|
+
"sendProjectKnowledgeChunk",
|
|
622
|
+
],
|
|
623
|
+
}),
|
|
485
624
|
...lazyDependencies(loadAgents, (module, node) => module.makeAgentsClient(node), {
|
|
486
625
|
...binding,
|
|
487
626
|
names: [
|
|
488
627
|
"confirmAgentChange",
|
|
628
|
+
"detectAgents",
|
|
489
629
|
"listAgents",
|
|
490
630
|
"previewAgentChange",
|
|
491
631
|
"showAgent",
|
|
492
632
|
],
|
|
493
633
|
}),
|
|
634
|
+
...lazyDependencies(loadWebhooks, (module, node) => module.makeWebhooksClient(node), {
|
|
635
|
+
...binding,
|
|
636
|
+
names: [
|
|
637
|
+
"confirmWebhookChange",
|
|
638
|
+
"listWebhookDeliveries",
|
|
639
|
+
"listWebhooks",
|
|
640
|
+
"previewWebhookChange",
|
|
641
|
+
],
|
|
642
|
+
}),
|
|
643
|
+
...lazyDependencies(loadGithub, (module, node) => module.makeGithubCliClient(node), {
|
|
644
|
+
...binding,
|
|
645
|
+
names: [
|
|
646
|
+
"createGithubConnection",
|
|
647
|
+
"linkPullRequest",
|
|
648
|
+
"revokeGithubConnection",
|
|
649
|
+
"showGithubConnections",
|
|
650
|
+
"showPullRequestStatus",
|
|
651
|
+
"watchPullRequest",
|
|
652
|
+
],
|
|
653
|
+
}),
|
|
654
|
+
...lazyDependencies(loadGoal, (module, node) => module.makeGoalCliClient(node), {
|
|
655
|
+
...binding,
|
|
656
|
+
names: [
|
|
657
|
+
"clearGoal",
|
|
658
|
+
"markGoal",
|
|
659
|
+
"setGoal",
|
|
660
|
+
"showGoal",
|
|
661
|
+
"transitionGoal",
|
|
662
|
+
"updateGoal",
|
|
663
|
+
],
|
|
664
|
+
}),
|
|
665
|
+
...lazyDependencies(loadPairing, (module, node) => module.makePairingClient(node), {
|
|
666
|
+
...binding,
|
|
667
|
+
names: [
|
|
668
|
+
"confirmPairing",
|
|
669
|
+
"previewPairing",
|
|
670
|
+
"redeemPairing",
|
|
671
|
+
"showPairings",
|
|
672
|
+
],
|
|
673
|
+
}),
|
|
674
|
+
...lazyDependencies(loadPrincipal, (module, node) => module.makePrincipalClient(node), {
|
|
675
|
+
...binding,
|
|
676
|
+
names: ["confirmPrincipal", "previewPrincipal", "showPrincipals"],
|
|
677
|
+
}),
|
|
678
|
+
...lazyDependencies(loadNodeUpdate, (module, node) => module.makeNodeUpdateClient(node), {
|
|
679
|
+
...binding,
|
|
680
|
+
names: [
|
|
681
|
+
"checkNodeUpdate",
|
|
682
|
+
"confirmNodeUpdateApply",
|
|
683
|
+
"confirmNodeUpdateRollback",
|
|
684
|
+
"getNodeUpdatePolicy",
|
|
685
|
+
"pauseNodeUpdate",
|
|
686
|
+
"previewNodeUpdateApply",
|
|
687
|
+
"previewNodeUpdateRollback",
|
|
688
|
+
"resumeNodeUpdate",
|
|
689
|
+
"setNodeUpdatePolicy",
|
|
690
|
+
"showNodeUpdate",
|
|
691
|
+
"showNodeUpdateStatus",
|
|
692
|
+
],
|
|
693
|
+
}),
|
|
694
|
+
...lazyDependencies(loadSkillsSync, (module, node) => module.makeSkillsSyncClient(node), {
|
|
695
|
+
...binding,
|
|
696
|
+
names: ["confirmSkillsSync", "previewSkillsSync", "showSkillsSync"],
|
|
697
|
+
}),
|
|
698
|
+
...lazyDependencies(loadPanel, (module, node) => module.makePanelClient(node), { ...binding, names: ["openBrowser", "panelAddress"] }),
|
|
699
|
+
...lazyDependencies(loadReach, (module, node) => module.makeReachClient(node), {
|
|
700
|
+
...binding,
|
|
701
|
+
names: ["confirmReach", "previewReach", "showReach"],
|
|
702
|
+
}),
|
|
494
703
|
...lazyDependencies(loadRemoteNode, (module, node) => module.makeRemoteNodeClient(node), {
|
|
495
704
|
...binding,
|
|
496
705
|
names: [
|
|
@@ -512,20 +721,22 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
512
721
|
names: ["callCoordinatorTool", "serveMcp"],
|
|
513
722
|
}),
|
|
514
723
|
...lazyDependencies(loadStatus, (module, node) => module.makeStatusClient(node), { ...binding, names: ["createMonitorBootstrap", "readStatus"] }),
|
|
724
|
+
startLocalNode: (profile, version) => Effect.flatMap(Effect.promise(loadLaunch), (module) => module.startLocalNode(profile, version)),
|
|
515
725
|
});
|
|
516
|
-
const remoteConnector = (remote, local) => {
|
|
726
|
+
const remoteConnector = (remote, local, ssh) => {
|
|
517
727
|
const cache = {};
|
|
518
728
|
return (options) => Effect.promise(loadRemoteNode).pipe(Effect.flatMap((module) => {
|
|
519
729
|
cache.connector ??= module.makeRemoteNodeConnector({
|
|
520
730
|
...(local === undefined ? {} : { local }),
|
|
521
731
|
name: remote.name,
|
|
522
732
|
scope: remote.scope,
|
|
733
|
+
...(ssh === undefined ? {} : { ssh }),
|
|
523
734
|
});
|
|
524
735
|
return cache.connector(options);
|
|
525
736
|
}));
|
|
526
737
|
};
|
|
527
738
|
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) => {
|
|
739
|
+
export const makeCliDependencies = (connector, ssh) => (profile, remote) => {
|
|
529
740
|
const binding = {
|
|
530
741
|
...(connector === undefined ? {} : { connector }),
|
|
531
742
|
...(profile === undefined ? {} : { profile }),
|
|
@@ -535,11 +746,12 @@ export const makeCliDependencies = (connector) => (profile, remote) => {
|
|
|
535
746
|
: {
|
|
536
747
|
...makeDefaultCliDependencies({
|
|
537
748
|
...binding,
|
|
538
|
-
connector: remoteConnector(remote, connector),
|
|
749
|
+
connector: remoteConnector(remote, connector, ssh),
|
|
539
750
|
remote: true,
|
|
540
751
|
}),
|
|
541
752
|
runVendorLogin: remoteSignIn(remote, binding),
|
|
542
753
|
};
|
|
543
754
|
};
|
|
544
|
-
|
|
755
|
+
const loadConfiguredLogLevel = Effect.promise(() => import("./log-level.js")).pipe(Effect.flatMap((module) => module.configuredLogLevel));
|
|
756
|
+
export const runCli = makeCli(makeCliDependencies(), loadConfiguredLogLevel);
|
|
545
757
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli/environment.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as Option from "effect/Option";
|
|
|
4
4
|
const readVariable = (name) => Effect.map(Effect.orElseSucceed(Config.option(Config.String(name)), Option.none), (value) => Option.getOrUndefined(value));
|
|
5
5
|
export const environmentOptions = Effect.gen(function* () {
|
|
6
6
|
return {
|
|
7
|
+
noColor: yield* readVariable("NO_COLOR"),
|
|
7
8
|
node: yield* readVariable("MAIA_NODE"),
|
|
8
9
|
noInput: yield* readVariable("MAIA_NO_INPUT"),
|
|
9
10
|
profile: yield* readVariable("MAIA_PROFILE"),
|
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,5 @@
|
|
|
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
|
+
export { colorOn, toneText } from "./tone.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
+
export { colorOn, toneText } from "./tone.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,15 +1,18 @@
|
|
|
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
|
+
readonly color?: boolean;
|
|
7
8
|
readonly cwd?: string;
|
|
8
9
|
readonly interactive?: boolean;
|
|
9
10
|
readonly prompt?: (question: string, options?: PromptOptions) => Effect.Effect<string | undefined>;
|
|
10
11
|
readonly stderr: (text: string) => void;
|
|
11
12
|
readonly stdin?: (request: BoundedStdinRequest) => Effect.Effect<string, CliArgumentError>;
|
|
13
|
+
readonly stdinIsTerminal?: boolean;
|
|
12
14
|
readonly stdout: (text: string) => void;
|
|
15
|
+
readonly stdoutIsTerminal?: boolean;
|
|
13
16
|
};
|
|
14
17
|
export type CliSuccessResult = {
|
|
15
18
|
readonly command: string;
|
|
@@ -46,6 +49,7 @@ export type OutputContext = {
|
|
|
46
49
|
readonly resolved?: readonly CliResolution[];
|
|
47
50
|
};
|
|
48
51
|
type ErrorContext = OutputContext & {
|
|
52
|
+
readonly hint?: string;
|
|
49
53
|
readonly nodes?: readonly NodeHolding[];
|
|
50
54
|
readonly notFoundHint?: string;
|
|
51
55
|
readonly recovery?: CliMutationRecovery;
|
|
@@ -55,10 +59,12 @@ export type CliCommandOutput = CliSuccessResult;
|
|
|
55
59
|
export declare const writeSuccess: <TResult extends CliCommandOutput>(result: TResult, { error, io, json, ok, resolved }: OutputContext, human: (result: TResult) => string) => void;
|
|
56
60
|
export declare const reportError: (error: ProtocolError, context: ErrorContext) => number;
|
|
57
61
|
export declare const exitCodeOf: (error: ProtocolError) => number;
|
|
62
|
+
type RefusalHint = (error: ProtocolError) => string | undefined;
|
|
58
63
|
export type NodeResultPresenter<TValue, TResult extends CliCommandOutput> = {
|
|
64
|
+
readonly refusalHint?: RefusalHint;
|
|
59
65
|
readonly toResult: (value: TValue) => TResult;
|
|
60
66
|
readonly toText: (result: TResult) => string;
|
|
61
67
|
};
|
|
62
|
-
export declare const writeNodeResult: <TValue, TResult extends CliCommandOutput>(result: CliNodeResult<TValue>, context: OutputContext, { toResult, toText }: NodeResultPresenter<TValue, TResult>) => number;
|
|
68
|
+
export declare const writeNodeResult: <TValue, TResult extends CliCommandOutput>(result: CliNodeResult<TValue>, context: OutputContext, { refusalHint, toResult, toText }: NodeResultPresenter<TValue, TResult>) => number;
|
|
63
69
|
export {};
|
|
64
70
|
//# sourceMappingURL=output.d.ts.map
|