@maiaos/cli 0.1.0-canary.7 → 0.1.0-canary.71
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 +22 -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 +208 -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 +21 -6
- 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 +13 -0
- package/dist/command-line/input/arguments.js +42 -10
- 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 +36 -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 +2 -2
- package/dist/connection/output/index.d.ts +1 -1
- package/dist/connection/output/index.js +1 -1
- package/dist/connection/resolve.d.ts +1 -0
- package/dist/connection/setup-file.js +161 -0
- package/dist/connection/system.js +93 -47
- package/dist/connection/tree/tree.js +150 -9
- 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 +457 -1
- package/dist/integration/client.js +31 -1
- package/dist/integration/commands.d.ts +12 -0
- package/dist/integration/commands.js +73 -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 +189 -234
- package/dist/local-node/index.d.ts +2 -1
- package/dist/local-node/index.js +2 -1
- package/dist/local-node/wait.d.ts +10 -0
- package/dist/local-node/wait.js +17 -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 -221
- package/dist/mcp/routing.d.ts +3 -2
- package/dist/mcp/routing.js +38 -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/git-reads.d.ts +12 -0
- package/dist/project-workspace/git-reads.js +71 -0
- package/dist/project-workspace/index.d.ts +1 -0
- package/dist/project-workspace/index.js +1 -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 +95 -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 +9 -2
- package/dist/remote-node/client.d.ts +85 -0
- package/dist/remote-node/commands.js +32 -17
- package/dist/remote-node/connector.d.ts +16 -0
- package/dist/remote-node/connector.js +10 -3
- 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 +14 -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 +272 -22
- 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.d.ts +1 -1
- package/dist/session/attach.js +7 -2
- package/dist/session/client.d.ts +23 -12
- package/dist/session/client.js +50 -18
- 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 +391 -62
- package/dist/session/create-tasks.js +10 -47
- 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 +64 -10
- package/dist/session/output/index.js +1 -1
- 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 +324 -29
- package/dist/session/turn/attachments.js +54 -0
- package/dist/session/turn/client.d.ts +3 -1
- package/dist/session/turn/client.js +13 -10
- package/dist/session/turn/commands.d.ts +5 -1
- package/dist/session/turn/commands.js +204 -36
- package/dist/session/turn/index.d.ts +2 -2
- package/dist/session/turn/index.js +1 -1
- package/dist/session/turn/output.d.ts +31 -1
- package/dist/session/turn/output.js +45 -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 +103 -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 -112
- 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,10 +241,24 @@ 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");
|
|
217
263
|
const loadBootstrap = () => import("../team-workspace/index.js");
|
|
218
264
|
const lazyDependencies = (load, makeClient, binding) => Object.fromEntries(binding.names.map((name) => [
|
|
@@ -250,6 +296,18 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
250
296
|
"statusClaudeCodeIntegration",
|
|
251
297
|
"applyClaudeCodeIntegration",
|
|
252
298
|
"removeClaudeCodeIntegration",
|
|
299
|
+
"planMaiaAgentIntegration",
|
|
300
|
+
"statusMaiaAgentIntegration",
|
|
301
|
+
"applyMaiaAgentIntegration",
|
|
302
|
+
"removeMaiaAgentIntegration",
|
|
303
|
+
"planPiIntegration",
|
|
304
|
+
"statusPiIntegration",
|
|
305
|
+
"applyPiIntegration",
|
|
306
|
+
"removePiIntegration",
|
|
307
|
+
"planAntigravityIntegration",
|
|
308
|
+
"statusAntigravityIntegration",
|
|
309
|
+
"applyAntigravityIntegration",
|
|
310
|
+
"removeAntigravityIntegration",
|
|
253
311
|
],
|
|
254
312
|
}),
|
|
255
313
|
...lazyDependencies(loadConnection, (module, node) => module.makeConnectionClient(node), {
|
|
@@ -262,6 +320,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
262
320
|
"listConnectionGrants",
|
|
263
321
|
"listConnectionPools",
|
|
264
322
|
"listConnections",
|
|
323
|
+
"listInstalledHarnesses",
|
|
265
324
|
"previewConnectionGrant",
|
|
266
325
|
"previewConnectionPool",
|
|
267
326
|
"listConnectionModels",
|
|
@@ -323,6 +382,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
323
382
|
...binding,
|
|
324
383
|
names: [
|
|
325
384
|
"listRoutines",
|
|
385
|
+
"listRoutineRuns",
|
|
326
386
|
"showRoutine",
|
|
327
387
|
"previewRoutineCreate",
|
|
328
388
|
"confirmRoutineCreate",
|
|
@@ -332,6 +392,14 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
332
392
|
"confirmRoutineDisable",
|
|
333
393
|
"previewRoutineRun",
|
|
334
394
|
"confirmRoutineRun",
|
|
395
|
+
"previewRoutineUpdate",
|
|
396
|
+
"confirmRoutineUpdate",
|
|
397
|
+
"previewRoutineMove",
|
|
398
|
+
"confirmRoutineMove",
|
|
399
|
+
"listRoutineTriggers",
|
|
400
|
+
"previewRoutineTriggerCreate",
|
|
401
|
+
"confirmRoutineTriggerCreate",
|
|
402
|
+
"disableRoutineTrigger",
|
|
335
403
|
],
|
|
336
404
|
}),
|
|
337
405
|
...lazyDependencies(() => import("../project-workspace/index.js"), (module, node) => module.makeProjectMetadataClient(node), {
|
|
@@ -419,6 +487,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
419
487
|
"sendAttachedSessionMessage",
|
|
420
488
|
"showExecutionRelocation",
|
|
421
489
|
"showSession",
|
|
490
|
+
"waitSession",
|
|
422
491
|
"startSession",
|
|
423
492
|
"stopSession",
|
|
424
493
|
],
|
|
@@ -449,6 +518,7 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
449
518
|
"listTurnQueue",
|
|
450
519
|
"sendTurn",
|
|
451
520
|
"showTurn",
|
|
521
|
+
"showTurnAttachmentPolicy",
|
|
452
522
|
"waitTurns",
|
|
453
523
|
],
|
|
454
524
|
}),
|
|
@@ -457,6 +527,16 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
457
527
|
...binding,
|
|
458
528
|
names: ["listApprovals", "respondToApproval", "showApproval"],
|
|
459
529
|
}),
|
|
530
|
+
...lazyDependencies(loadInbox, (module, node) => module.makeInboxClient(node), {
|
|
531
|
+
...binding,
|
|
532
|
+
names: [
|
|
533
|
+
"listInbox",
|
|
534
|
+
"respondToInboxItem",
|
|
535
|
+
"settleInboxItem",
|
|
536
|
+
"showInboxItem",
|
|
537
|
+
"snoozeInboxItem",
|
|
538
|
+
],
|
|
539
|
+
}),
|
|
460
540
|
...lazyDependencies(loadPortLease, (module, node) => module.makePortLeaseClient(node), {
|
|
461
541
|
...binding,
|
|
462
542
|
names: [
|
|
@@ -477,19 +557,133 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
477
557
|
"showRunLedgerTask",
|
|
478
558
|
],
|
|
479
559
|
}),
|
|
560
|
+
...lazyDependencies(loadBoard, (module, node) => module.makeBoardClient(node), {
|
|
561
|
+
...binding,
|
|
562
|
+
names: [
|
|
563
|
+
"assignBoardTask",
|
|
564
|
+
"cancelBoardTask",
|
|
565
|
+
"claimBoardTask",
|
|
566
|
+
"completeBoardTask",
|
|
567
|
+
"createBoardTask",
|
|
568
|
+
"failBoardTask",
|
|
569
|
+
"listBoardTasks",
|
|
570
|
+
"planBoardTasks",
|
|
571
|
+
"postBoardMessage",
|
|
572
|
+
"promoteBoardThread",
|
|
573
|
+
"readBoardPath",
|
|
574
|
+
"releaseBoardTask",
|
|
575
|
+
"renewBoardTask",
|
|
576
|
+
"reopenBoardTask",
|
|
577
|
+
"replaceBoardTaskNeeds",
|
|
578
|
+
"replyToBoardMessage",
|
|
579
|
+
"showBoardTask",
|
|
580
|
+
"showBoardThread",
|
|
581
|
+
],
|
|
582
|
+
}),
|
|
480
583
|
...lazyDependencies(loadProjectGuard, (module, node) => module.makeProjectGuardClient(node), {
|
|
481
584
|
...binding,
|
|
482
585
|
names: ["confirmProjectGuard", "previewProjectGuard", "showProjectGuard"],
|
|
483
586
|
}),
|
|
587
|
+
...lazyDependencies(loadProjectInstructions, (module, node) => module.makeProjectInstructionsClient(node), {
|
|
588
|
+
...binding,
|
|
589
|
+
names: [
|
|
590
|
+
"confirmProjectInstructionsChange",
|
|
591
|
+
"previewProjectInstructionsChange",
|
|
592
|
+
"showProjectInstructions",
|
|
593
|
+
],
|
|
594
|
+
}),
|
|
595
|
+
...lazyDependencies(loadSecret, (module, node) => module.makeSecretClient(node), { ...binding, names: ["confirmSecretSet", "previewSecretSet"] }),
|
|
596
|
+
...lazyDependencies(loadProjectKnowledge, (module, node) => module.makeProjectKnowledgeClient(node), {
|
|
597
|
+
...binding,
|
|
598
|
+
names: [
|
|
599
|
+
"commitProjectKnowledgeAdd",
|
|
600
|
+
"confirmProjectKnowledgeAdd",
|
|
601
|
+
"confirmProjectKnowledgeRemove",
|
|
602
|
+
"listProjectKnowledge",
|
|
603
|
+
"previewProjectKnowledgeAdd",
|
|
604
|
+
"previewProjectKnowledgeRemove",
|
|
605
|
+
"sendProjectKnowledgeChunk",
|
|
606
|
+
],
|
|
607
|
+
}),
|
|
484
608
|
...lazyDependencies(loadAgents, (module, node) => module.makeAgentsClient(node), {
|
|
485
609
|
...binding,
|
|
486
610
|
names: [
|
|
487
611
|
"confirmAgentChange",
|
|
612
|
+
"detectAgents",
|
|
488
613
|
"listAgents",
|
|
489
614
|
"previewAgentChange",
|
|
490
615
|
"showAgent",
|
|
491
616
|
],
|
|
492
617
|
}),
|
|
618
|
+
...lazyDependencies(loadWebhooks, (module, node) => module.makeWebhooksClient(node), {
|
|
619
|
+
...binding,
|
|
620
|
+
names: [
|
|
621
|
+
"confirmWebhookChange",
|
|
622
|
+
"listWebhookDeliveries",
|
|
623
|
+
"listWebhooks",
|
|
624
|
+
"previewWebhookChange",
|
|
625
|
+
],
|
|
626
|
+
}),
|
|
627
|
+
...lazyDependencies(loadGithub, (module, node) => module.makeGithubCliClient(node), {
|
|
628
|
+
...binding,
|
|
629
|
+
names: [
|
|
630
|
+
"createGithubConnection",
|
|
631
|
+
"linkPullRequest",
|
|
632
|
+
"revokeGithubConnection",
|
|
633
|
+
"showGithubConnections",
|
|
634
|
+
"showPullRequestStatus",
|
|
635
|
+
"watchPullRequest",
|
|
636
|
+
],
|
|
637
|
+
}),
|
|
638
|
+
...lazyDependencies(loadGoal, (module, node) => module.makeGoalCliClient(node), {
|
|
639
|
+
...binding,
|
|
640
|
+
names: [
|
|
641
|
+
"clearGoal",
|
|
642
|
+
"markGoal",
|
|
643
|
+
"setGoal",
|
|
644
|
+
"showGoal",
|
|
645
|
+
"transitionGoal",
|
|
646
|
+
"updateGoal",
|
|
647
|
+
],
|
|
648
|
+
}),
|
|
649
|
+
...lazyDependencies(loadPairing, (module, node) => module.makePairingClient(node), {
|
|
650
|
+
...binding,
|
|
651
|
+
names: [
|
|
652
|
+
"confirmPairing",
|
|
653
|
+
"previewPairing",
|
|
654
|
+
"redeemPairing",
|
|
655
|
+
"showPairings",
|
|
656
|
+
],
|
|
657
|
+
}),
|
|
658
|
+
...lazyDependencies(loadPrincipal, (module, node) => module.makePrincipalClient(node), {
|
|
659
|
+
...binding,
|
|
660
|
+
names: ["confirmPrincipal", "previewPrincipal", "showPrincipals"],
|
|
661
|
+
}),
|
|
662
|
+
...lazyDependencies(loadNodeUpdate, (module, node) => module.makeNodeUpdateClient(node), {
|
|
663
|
+
...binding,
|
|
664
|
+
names: [
|
|
665
|
+
"checkNodeUpdate",
|
|
666
|
+
"confirmNodeUpdateApply",
|
|
667
|
+
"confirmNodeUpdateRollback",
|
|
668
|
+
"getNodeUpdatePolicy",
|
|
669
|
+
"pauseNodeUpdate",
|
|
670
|
+
"previewNodeUpdateApply",
|
|
671
|
+
"previewNodeUpdateRollback",
|
|
672
|
+
"resumeNodeUpdate",
|
|
673
|
+
"setNodeUpdatePolicy",
|
|
674
|
+
"showNodeUpdate",
|
|
675
|
+
"showNodeUpdateStatus",
|
|
676
|
+
],
|
|
677
|
+
}),
|
|
678
|
+
...lazyDependencies(loadSkillsSync, (module, node) => module.makeSkillsSyncClient(node), {
|
|
679
|
+
...binding,
|
|
680
|
+
names: ["confirmSkillsSync", "previewSkillsSync", "showSkillsSync"],
|
|
681
|
+
}),
|
|
682
|
+
...lazyDependencies(loadPanel, (module, node) => module.makePanelClient(node), { ...binding, names: ["openBrowser", "panelAddress"] }),
|
|
683
|
+
...lazyDependencies(loadReach, (module, node) => module.makeReachClient(node), {
|
|
684
|
+
...binding,
|
|
685
|
+
names: ["confirmReach", "previewReach", "showReach"],
|
|
686
|
+
}),
|
|
493
687
|
...lazyDependencies(loadRemoteNode, (module, node) => module.makeRemoteNodeClient(node), {
|
|
494
688
|
...binding,
|
|
495
689
|
names: [
|
|
@@ -512,19 +706,20 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
512
706
|
}),
|
|
513
707
|
...lazyDependencies(loadStatus, (module, node) => module.makeStatusClient(node), { ...binding, names: ["createMonitorBootstrap", "readStatus"] }),
|
|
514
708
|
});
|
|
515
|
-
const remoteConnector = (remote, local) => {
|
|
709
|
+
const remoteConnector = (remote, local, ssh) => {
|
|
516
710
|
const cache = {};
|
|
517
711
|
return (options) => Effect.promise(loadRemoteNode).pipe(Effect.flatMap((module) => {
|
|
518
712
|
cache.connector ??= module.makeRemoteNodeConnector({
|
|
519
713
|
...(local === undefined ? {} : { local }),
|
|
520
714
|
name: remote.name,
|
|
521
715
|
scope: remote.scope,
|
|
716
|
+
...(ssh === undefined ? {} : { ssh }),
|
|
522
717
|
});
|
|
523
718
|
return cache.connector(options);
|
|
524
719
|
}));
|
|
525
720
|
};
|
|
526
721
|
const remoteSignIn = (remote, binding) => (connection) => Effect.promise(loadRemoteNode).pipe(Effect.flatMap((module) => module.remoteVendorLogin({ ...binding, name: remote.name })(connection)));
|
|
527
|
-
export const makeCliDependencies = (connector) => (profile, remote) => {
|
|
722
|
+
export const makeCliDependencies = (connector, ssh) => (profile, remote) => {
|
|
528
723
|
const binding = {
|
|
529
724
|
...(connector === undefined ? {} : { connector }),
|
|
530
725
|
...(profile === undefined ? {} : { profile }),
|
|
@@ -534,11 +729,12 @@ export const makeCliDependencies = (connector) => (profile, remote) => {
|
|
|
534
729
|
: {
|
|
535
730
|
...makeDefaultCliDependencies({
|
|
536
731
|
...binding,
|
|
537
|
-
connector: remoteConnector(remote, connector),
|
|
732
|
+
connector: remoteConnector(remote, connector, ssh),
|
|
538
733
|
remote: true,
|
|
539
734
|
}),
|
|
540
735
|
runVendorLogin: remoteSignIn(remote, binding),
|
|
541
736
|
};
|
|
542
737
|
};
|
|
543
|
-
|
|
738
|
+
const loadConfiguredLogLevel = Effect.promise(() => import("./log-level.js")).pipe(Effect.flatMap((module) => module.configuredLogLevel));
|
|
739
|
+
export const runCli = makeCli(makeCliDependencies(), loadConfiguredLogLevel);
|
|
544
740
|
//# 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,50 @@
|
|
|
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, TurnQueueListResult, 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";
|
|
12
16
|
import type { AgentProviderAccess } from "../login/index.js";
|
|
13
17
|
import type { McpCliDependencies } from "../mcp/index.js";
|
|
18
|
+
import type { NodeUpdateCliDependencies } from "../node-update/index.js";
|
|
14
19
|
import type { makeOrchestrationClient } from "../orchestration/index.js";
|
|
20
|
+
import type { PairingCliDependencies } from "../pairing/index.js";
|
|
21
|
+
import type { PanelCliDependencies } from "../panel/index.js";
|
|
15
22
|
import type { PortLeaseCliDependencies } from "../port-lease/index.js";
|
|
16
23
|
import type { PresentationCliDependencies } from "../presentation/index.js";
|
|
24
|
+
import type { PrincipalCliDependencies } from "../principal/index.js";
|
|
17
25
|
import type { ProjectGuardCliDependencies } from "../project-guard/index.js";
|
|
26
|
+
import type { ProjectInstructionsCliDependencies } from "../project-instructions/index.js";
|
|
27
|
+
import type { ProjectKnowledgeCliDependencies } from "../project-knowledge/index.js";
|
|
18
28
|
import type { AttachRepositoryInput, AttachWorkspaceMembershipInput, ConfigureWorkspaceExecutionInput, CreateExecutionCheckpointInput, CreateExecutionPlacementInput, CreateExecutionWorktreeInput, ImportExecutionWorktreeInput, ProjectMetadataCliDependencies, ReadExecutionFileInput, ReconcileExecutionWorktreeInput, RecordProjectContextInput, RegisterProjectInput, RemoveExecutionWorktreeInput, RunExecutionCommandInput, SelectWorkspaceInput } from "../project-workspace/index.js";
|
|
29
|
+
import type { ReachCliDependencies } from "../reach/index.js";
|
|
19
30
|
import type { RemoteNodeCliDependencies, SshLayer } from "../remote-node/index.js";
|
|
20
31
|
import type { RoutineCliDependencies } from "../routine/index.js";
|
|
21
32
|
import type { RunLedgerCliDependencies } from "../run-ledger/index.js";
|
|
33
|
+
import type { SecretCliDependencies } from "../secret/index.js";
|
|
22
34
|
import type { ApprovalCliDependencies } from "../session/approval/index.js";
|
|
23
|
-
import type { ArchiveSessionInput, AttachSessionInput, CreateSessionInput, DiffSessionInput, ListSessionsInput, makeSessionClient, SessionAttachStream, StartSessionInput } from "../session/index.js";
|
|
35
|
+
import type { ArchiveSessionInput, AttachSessionInput, CreateSessionInput, DiffSessionInput, ListSessionsInput, makeSessionClient, ResumeSessionInput, SessionAttachStream, StartSessionInput } from "../session/index.js";
|
|
24
36
|
import type { InteractionCliDependencies } from "../session/interaction/index.js";
|
|
25
37
|
import type { CancelTurnInput, InterruptTurnInput, SendTurnInput, WaitTurnsInput } from "../session/turn/index.js";
|
|
38
|
+
import type { SkillsSyncCliDependencies } from "../skills-sync/index.js";
|
|
26
39
|
import type { BootstrapCliDependencies } from "../team-workspace/index.js";
|
|
27
40
|
import type { CreateTerminalInput, makeTerminalClient } from "../terminal/index.js";
|
|
41
|
+
import type { WebhooksCliDependencies } from "../webhooks/index.js";
|
|
42
|
+
import type { CliIo, CliResolution } from "./emit/index.js";
|
|
28
43
|
import type { CliArgumentError } from "./input/index.js";
|
|
29
|
-
import type { CliIo, CliResolution } from "./output.js";
|
|
30
44
|
type OrchestrationClient = ReturnType<typeof makeOrchestrationClient>;
|
|
31
45
|
type SessionClient = ReturnType<typeof makeSessionClient>;
|
|
32
46
|
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> & {
|
|
47
|
+
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
48
|
readonly acknowledgeAttachedSessionDelivery?: (input: Parameters<SessionClient["acknowledgeAttachedSessionDelivery"]>[0]) => CliNodeEffect<SessionInboxAckResult>;
|
|
35
49
|
readonly acknowledgeRunDelivery: (input: Parameters<OrchestrationClient["acknowledgeRunDelivery"]>[0]) => CliNodeEffect<OrchestrationInboxAckResult>;
|
|
36
50
|
readonly acquireTerminalController: (input: Parameters<TerminalClient["acquireTerminalController"]>[0]) => CliNodeEffect<LiveTerminalControllerAcquireResult>;
|
|
@@ -129,7 +143,7 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
129
143
|
readonly replyRunQuestion: (input: Parameters<OrchestrationClient["replyRunQuestion"]>[0]) => CliNodeEffect<OrchestrationQuestionReplyResult>;
|
|
130
144
|
readonly requestTerminalController: (input: Parameters<TerminalClient["requestTerminalController"]>[0]) => CliNodeEffect<LiveTerminalControllerRequestResult>;
|
|
131
145
|
readonly resizeTerminal: (input: Parameters<TerminalClient["resizeTerminal"]>[0]) => CliNodeEffect<LiveTerminalResizeResult>;
|
|
132
|
-
readonly resumeSession?: (input:
|
|
146
|
+
readonly resumeSession?: (input: ResumeSessionInput) => CliNodeEffect<SessionResumeResult>;
|
|
133
147
|
readonly runAgent?: (arguments_: readonly string[], io: CliIo) => Effect.Effect<number, unknown>;
|
|
134
148
|
readonly runExecutionCommand?: (input: RunExecutionCommandInput) => CliNodeEffect<ExecutionCommandRunResult>;
|
|
135
149
|
readonly runSessions?: SessionClient["runSessions"];
|
|
@@ -159,6 +173,7 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
159
173
|
readonly showTerminal: (terminalId: string) => CliNodeEffect<TerminalShowResult>;
|
|
160
174
|
readonly showTerminalControllerRequest: (input: Parameters<TerminalClient["showTerminalControllerRequest"]>[0]) => CliNodeEffect<LiveTerminalControllerRequestShowResult>;
|
|
161
175
|
readonly showTurn: (turnId: string) => CliNodeEffect<TurnShowResult>;
|
|
176
|
+
readonly showTurnAttachmentPolicy?: (sessionId: string) => CliNodeEffect<TurnAttachmentPolicyResult>;
|
|
162
177
|
readonly showWorkspace: (workspaceId: string) => CliNodeEffect<WorkspaceShowResult>;
|
|
163
178
|
readonly showWorkspaceContext?: () => CliNodeEffect<WorkspaceContextShowResult>;
|
|
164
179
|
readonly showWorkspaceExecution?: (workspaceId: string) => CliNodeEffect<WorkspaceExecutionShowResult>;
|
|
@@ -166,12 +181,12 @@ export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDepende
|
|
|
166
181
|
readonly sshLayer?: SshLayer;
|
|
167
182
|
readonly startSession: (input: StartSessionInput) => CliNodeEffect<SessionStartResult>;
|
|
168
183
|
readonly stopSession?: (input: StartSessionInput) => CliNodeEffect<SessionStopResult>;
|
|
184
|
+
readonly waitSession?: SessionClient["waitSession"];
|
|
169
185
|
readonly waitTurns?: (input: WaitTurnsInput) => CliNodeEffect<TurnWaitResult>;
|
|
170
186
|
readonly writeTerminalInput: (input: Parameters<TerminalClient["writeTerminalInput"]>[0]) => CliNodeEffect<LiveTerminalWriteResult>;
|
|
171
187
|
};
|
|
172
188
|
export type CliServices = Crypto.Crypto;
|
|
173
189
|
export type CommandEffect = Effect.Effect<number, CliArgumentError, CliServices>;
|
|
174
|
-
export declare const LOCAL_NODE = "local";
|
|
175
190
|
export type CommandContext = {
|
|
176
191
|
readonly bindNode?: (name: string) => CliDependencies;
|
|
177
192
|
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
|