@maiaos/cli 0.1.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +287 -0
- package/dist/bin/maia.NOTICES.txt +59 -0
- package/dist/bin/maia.cdx.json +145 -0
- package/dist/bin/maia.mjs +2 -0
- package/dist/bootstrap/index.d.ts +3 -0
- package/dist/bootstrap/index.js +3 -0
- package/dist/bootstrap/process.d.ts +5 -0
- package/dist/bootstrap/process.js +45 -0
- package/dist/bootstrap/run.d.ts +25 -0
- package/dist/bootstrap/run.js +95 -0
- package/dist/bootstrap/stdio.d.ts +4 -0
- package/dist/bootstrap/stdio.js +9 -0
- package/dist/cli/cli.d.ts +17 -0
- package/dist/cli/cli.js +481 -0
- package/dist/cli/environment.d.ts +8 -0
- package/dist/cli/environment.js +12 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/services.d.ts +4 -0
- package/dist/cli/services.js +4 -0
- package/dist/command-line/context.d.ts +178 -0
- package/dist/command-line/context.js +2 -0
- package/dist/command-line/index.d.ts +7 -0
- package/dist/command-line/index.js +6 -0
- package/dist/command-line/input/arguments.d.ts +55 -0
- package/dist/command-line/input/arguments.js +220 -0
- package/dist/command-line/input/index.d.ts +4 -0
- package/dist/command-line/input/index.js +4 -0
- package/dist/command-line/input/prompt.d.ts +8 -0
- package/dist/command-line/input/prompt.js +44 -0
- package/dist/command-line/input/stdin-stream.d.ts +4 -0
- package/dist/command-line/input/stdin-stream.js +3 -0
- package/dist/command-line/input/stdin.d.ts +11 -0
- package/dist/command-line/input/stdin.js +23 -0
- package/dist/command-line/json-decoder.d.ts +3 -0
- package/dist/command-line/json-decoder.js +3 -0
- package/dist/command-line/json.d.ts +3 -0
- package/dist/command-line/json.js +4 -0
- package/dist/command-line/output.d.ts +57 -0
- package/dist/command-line/output.js +94 -0
- package/dist/command-line/rows.d.ts +10 -0
- package/dist/command-line/rows.js +32 -0
- package/dist/command-line/two-phase.d.ts +57 -0
- package/dist/command-line/two-phase.js +148 -0
- package/dist/command-receipt/command.d.ts +4 -0
- package/dist/command-receipt/command.js +59 -0
- package/dist/command-receipt/compact-list.d.ts +20 -0
- package/dist/command-receipt/compact-list.js +29 -0
- package/dist/command-receipt/index.d.ts +3 -0
- package/dist/command-receipt/index.js +3 -0
- package/dist/command-tree/commands.d.ts +17 -0
- package/dist/command-tree/commands.js +41 -0
- package/dist/command-tree/completion.d.ts +6 -0
- package/dist/command-tree/completion.js +36 -0
- package/dist/command-tree/grammar.d.ts +18 -0
- package/dist/command-tree/grammar.js +160 -0
- package/dist/command-tree/help.d.ts +62 -0
- package/dist/command-tree/help.js +219 -0
- package/dist/command-tree/index.d.ts +8 -0
- package/dist/command-tree/index.js +6 -0
- package/dist/command-tree/local.d.ts +3 -0
- package/dist/command-tree/local.js +126 -0
- package/dist/command-tree/placeholder.d.ts +3 -0
- package/dist/command-tree/placeholder.js +4 -0
- package/dist/command-tree/row.d.ts +29 -0
- package/dist/command-tree/row.js +2 -0
- package/dist/command-tree/suggest.d.ts +3 -0
- package/dist/command-tree/suggest.js +81 -0
- package/dist/command-tree/tree.d.ts +34 -0
- package/dist/command-tree/tree.js +124 -0
- package/dist/connection/client.d.ts +692 -0
- package/dist/connection/client.js +28 -0
- package/dist/connection/commands.d.ts +15 -0
- package/dist/connection/commands.js +118 -0
- package/dist/connection/index.d.ts +7 -0
- package/dist/connection/index.js +7 -0
- package/dist/connection/input.d.ts +50 -0
- package/dist/connection/input.js +90 -0
- package/dist/connection/login.d.ts +13 -0
- package/dist/connection/login.js +69 -0
- package/dist/connection/output/format.d.ts +32 -0
- package/dist/connection/output/format.js +94 -0
- package/dist/connection/output/index.d.ts +2 -0
- package/dist/connection/output/index.js +2 -0
- package/dist/connection/resolve.d.ts +60 -0
- package/dist/connection/resolve.js +30 -0
- package/dist/connection/signin.d.ts +4 -0
- package/dist/connection/signin.js +32 -0
- package/dist/connection/system.d.ts +4 -0
- package/dist/connection/system.js +190 -0
- package/dist/connection/tree/index.d.ts +2 -0
- package/dist/connection/tree/index.js +2 -0
- package/dist/connection/tree/tree.d.ts +3 -0
- package/dist/connection/tree/tree.js +209 -0
- package/dist/container/client.d.ts +142 -0
- package/dist/container/client.js +11 -0
- package/dist/container/commands.d.ts +7 -0
- package/dist/container/commands.js +100 -0
- package/dist/container/index.d.ts +3 -0
- package/dist/container/index.js +3 -0
- package/dist/container/output/format.d.ts +11 -0
- package/dist/container/output/format.js +28 -0
- package/dist/container/output/index.d.ts +2 -0
- package/dist/container/output/index.js +2 -0
- package/dist/context/client.d.ts +7 -0
- package/dist/context/client.js +21 -0
- package/dist/context/commands.d.ts +3 -0
- package/dist/context/commands.js +27 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.js +3 -0
- package/dist/development/cli.d.ts +3 -0
- package/dist/development/cli.js +44 -0
- package/dist/execution/client.d.ts +25 -0
- package/dist/execution/client.js +24 -0
- package/dist/execution/index.d.ts +3 -0
- package/dist/execution/index.js +3 -0
- package/dist/execution/relocation.d.ts +6 -0
- package/dist/execution/relocation.js +123 -0
- package/dist/execution/tree/index.d.ts +2 -0
- package/dist/execution/tree/index.js +2 -0
- package/dist/execution/tree/tree.d.ts +3 -0
- package/dist/execution/tree/tree.js +137 -0
- package/dist/hold/client.d.ts +137 -0
- package/dist/hold/client.js +12 -0
- package/dist/hold/commands.d.ts +5 -0
- package/dist/hold/commands.js +91 -0
- package/dist/hold/index.d.ts +3 -0
- package/dist/hold/index.js +3 -0
- package/dist/hold/output/format.d.ts +11 -0
- package/dist/hold/output/format.js +29 -0
- package/dist/hold/output/index.d.ts +2 -0
- package/dist/hold/output/index.js +2 -0
- package/dist/hold/tree/index.d.ts +2 -0
- package/dist/hold/tree/index.js +2 -0
- package/dist/hold/tree/tree.d.ts +3 -0
- package/dist/hold/tree/tree.js +96 -0
- package/dist/import/client.d.ts +14 -0
- package/dist/import/client.js +16 -0
- package/dist/import/commands.d.ts +5 -0
- package/dist/import/commands.js +76 -0
- package/dist/import/index.d.ts +3 -0
- package/dist/import/index.js +3 -0
- package/dist/import/input.d.ts +16 -0
- package/dist/import/input.js +92 -0
- package/dist/import/output.d.ts +6 -0
- package/dist/import/output.js +40 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/integration/client.d.ts +1284 -0
- package/dist/integration/client.js +24 -0
- package/dist/integration/commands.d.ts +10 -0
- package/dist/integration/commands.js +104 -0
- package/dist/integration/index.d.ts +3 -0
- package/dist/integration/index.js +3 -0
- package/dist/integration/output.d.ts +22 -0
- package/dist/integration/output.js +20 -0
- package/dist/local-node/call.d.ts +7 -0
- package/dist/local-node/call.js +13 -0
- package/dist/local-node/client.d.ts +67 -0
- package/dist/local-node/client.js +241 -0
- package/dist/local-node/index.d.ts +3 -0
- package/dist/local-node/index.js +3 -0
- package/dist/login/agent-provider.d.ts +20 -0
- package/dist/login/agent-provider.js +109 -0
- package/dist/login/commands.d.ts +4 -0
- package/dist/login/commands.js +93 -0
- package/dist/login/failure.d.ts +3 -0
- package/dist/login/failure.js +14 -0
- package/dist/login/gateway.d.ts +12 -0
- package/dist/login/gateway.js +71 -0
- package/dist/login/index.d.ts +3 -0
- package/dist/login/index.js +2 -0
- package/dist/login/menu.d.ts +4 -0
- package/dist/login/menu.js +105 -0
- package/dist/login/output/format.d.ts +16 -0
- package/dist/login/output/format.js +31 -0
- package/dist/login/output/index.d.ts +2 -0
- package/dist/login/output/index.js +2 -0
- package/dist/login/vendor-account.d.ts +95 -0
- package/dist/login/vendor-account.js +75 -0
- package/dist/login/vendor-input.d.ts +14 -0
- package/dist/login/vendor-input.js +36 -0
- package/dist/mcp/calls.d.ts +7 -0
- package/dist/mcp/calls.js +202 -0
- package/dist/mcp/commands.d.ts +9 -0
- package/dist/mcp/commands.js +21 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/server.d.ts +11 -0
- package/dist/mcp/server.js +57 -0
- package/dist/orchestration/client.d.ts +78 -0
- package/dist/orchestration/client.js +89 -0
- package/dist/orchestration/commands.d.ts +14 -0
- package/dist/orchestration/commands.js +312 -0
- package/dist/orchestration/index.d.ts +3 -0
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/output/compact-aggregate.d.ts +121 -0
- package/dist/orchestration/output/compact-aggregate.js +110 -0
- package/dist/orchestration/output/compact-run-list.d.ts +20 -0
- package/dist/orchestration/output/compact-run-list.js +16 -0
- package/dist/orchestration/output/human.d.ts +80 -0
- package/dist/orchestration/output/human.js +252 -0
- package/dist/orchestration/output/index.d.ts +4 -0
- package/dist/orchestration/output/index.js +4 -0
- package/dist/orchestration/tree/index.d.ts +2 -0
- package/dist/orchestration/tree/index.js +2 -0
- package/dist/orchestration/tree/tree.d.ts +3 -0
- package/dist/orchestration/tree/tree.js +142 -0
- package/dist/port-lease/client.d.ts +160 -0
- package/dist/port-lease/client.js +11 -0
- package/dist/port-lease/commands.d.ts +6 -0
- package/dist/port-lease/commands.js +17 -0
- package/dist/port-lease/index.d.ts +3 -0
- package/dist/port-lease/index.js +3 -0
- package/dist/port-lease/input.d.ts +65 -0
- package/dist/port-lease/input.js +67 -0
- package/dist/port-lease/output/format.d.ts +11 -0
- package/dist/port-lease/output/format.js +24 -0
- package/dist/port-lease/output/index.d.ts +2 -0
- package/dist/port-lease/output/index.js +2 -0
- package/dist/presentation/client.d.ts +10 -0
- package/dist/presentation/client.js +9 -0
- package/dist/presentation/commands.d.ts +6 -0
- package/dist/presentation/commands.js +78 -0
- package/dist/presentation/index.d.ts +4 -0
- package/dist/presentation/index.js +3 -0
- package/dist/presentation/output/format.d.ts +11 -0
- package/dist/presentation/output/format.js +32 -0
- package/dist/presentation/output/index.d.ts +3 -0
- package/dist/presentation/output/index.js +2 -0
- package/dist/project-guard/client.d.ts +88 -0
- package/dist/project-guard/client.js +7 -0
- package/dist/project-guard/commands.d.ts +4 -0
- package/dist/project-guard/commands.js +39 -0
- package/dist/project-guard/index.d.ts +3 -0
- package/dist/project-guard/index.js +3 -0
- package/dist/project-guard/input.d.ts +18 -0
- package/dist/project-guard/input.js +47 -0
- package/dist/project-guard/output/format.d.ts +11 -0
- package/dist/project-guard/output/format.js +35 -0
- package/dist/project-guard/output/index.d.ts +2 -0
- package/dist/project-guard/output/index.js +2 -0
- package/dist/project-workspace/client.d.ts +86 -0
- package/dist/project-workspace/client.js +159 -0
- package/dist/project-workspace/commands.d.ts +30 -0
- package/dist/project-workspace/commands.js +700 -0
- package/dist/project-workspace/index.d.ts +5 -0
- package/dist/project-workspace/index.js +5 -0
- package/dist/project-workspace/metadata-client.d.ts +99 -0
- package/dist/project-workspace/metadata-client.js +8 -0
- package/dist/project-workspace/metadata-commands.d.ts +4 -0
- package/dist/project-workspace/metadata-commands.js +56 -0
- package/dist/project-workspace/output/human.d.ts +126 -0
- package/dist/project-workspace/output/human.js +103 -0
- package/dist/project-workspace/output/index.d.ts +3 -0
- package/dist/project-workspace/output/index.js +3 -0
- package/dist/project-workspace/output/metadata.d.ts +11 -0
- package/dist/project-workspace/output/metadata.js +17 -0
- package/dist/project-workspace/tree/index.d.ts +2 -0
- package/dist/project-workspace/tree/index.js +2 -0
- package/dist/project-workspace/tree/tree.d.ts +3 -0
- package/dist/project-workspace/tree/tree.js +197 -0
- package/dist/provider/client.d.ts +6 -0
- package/dist/provider/client.js +5 -0
- package/dist/provider/commands.d.ts +3 -0
- package/dist/provider/commands.js +38 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.js +3 -0
- package/dist/reference/commands.d.ts +3 -0
- package/dist/reference/commands.js +39 -0
- package/dist/reference/index.d.ts +3 -0
- package/dist/reference/index.js +3 -0
- package/dist/reference/resolve.d.ts +29 -0
- package/dist/reference/resolve.js +294 -0
- package/dist/reference/tree/index.d.ts +2 -0
- package/dist/reference/tree/index.js +2 -0
- package/dist/reference/tree/tree.d.ts +3 -0
- package/dist/reference/tree/tree.js +17 -0
- package/dist/remote-node/client.d.ts +258 -0
- package/dist/remote-node/client.js +12 -0
- package/dist/remote-node/commands.d.ts +6 -0
- package/dist/remote-node/commands.js +264 -0
- package/dist/remote-node/connector.d.ts +59 -0
- package/dist/remote-node/connector.js +122 -0
- package/dist/remote-node/index.d.ts +4 -0
- package/dist/remote-node/index.js +4 -0
- package/dist/remote-node/reachability.d.ts +22 -0
- package/dist/remote-node/reachability.js +34 -0
- package/dist/remote-node/text.d.ts +9 -0
- package/dist/remote-node/text.js +64 -0
- package/dist/remote-node/tree/index.d.ts +2 -0
- package/dist/remote-node/tree/index.js +2 -0
- package/dist/remote-node/tree/tree.d.ts +3 -0
- package/dist/remote-node/tree/tree.js +51 -0
- package/dist/run-ledger/client.d.ts +358 -0
- package/dist/run-ledger/client.js +13 -0
- package/dist/run-ledger/commands.d.ts +8 -0
- package/dist/run-ledger/commands.js +19 -0
- package/dist/run-ledger/index.d.ts +3 -0
- package/dist/run-ledger/index.js +3 -0
- package/dist/run-ledger/input.d.ts +42 -0
- package/dist/run-ledger/input.js +107 -0
- package/dist/run-ledger/output/format.d.ts +11 -0
- package/dist/run-ledger/output/format.js +49 -0
- package/dist/run-ledger/output/index.d.ts +2 -0
- package/dist/run-ledger/output/index.js +2 -0
- package/dist/session/agent-permission.d.ts +63 -0
- package/dist/session/agent-permission.js +20 -0
- package/dist/session/approval/client.d.ts +117 -0
- package/dist/session/approval/client.js +7 -0
- package/dist/session/approval/commands.d.ts +7 -0
- package/dist/session/approval/commands.js +123 -0
- package/dist/session/approval/index.d.ts +3 -0
- package/dist/session/approval/index.js +3 -0
- package/dist/session/approval/output/format.d.ts +12 -0
- package/dist/session/approval/output/format.js +25 -0
- package/dist/session/approval/output/index.d.ts +2 -0
- package/dist/session/approval/output/index.js +2 -0
- package/dist/session/attach-client.d.ts +16 -0
- package/dist/session/attach-client.js +8 -0
- package/dist/session/attach-render.d.ts +16 -0
- package/dist/session/attach-render.js +154 -0
- package/dist/session/attach.d.ts +5 -0
- package/dist/session/attach.js +106 -0
- package/dist/session/client.d.ts +132 -0
- package/dist/session/client.js +128 -0
- package/dist/session/coding-client.d.ts +16 -0
- package/dist/session/coding-client.js +15 -0
- package/dist/session/coding-commands.d.ts +4 -0
- package/dist/session/coding-commands.js +50 -0
- package/dist/session/commands.d.ts +13 -0
- package/dist/session/commands.js +488 -0
- package/dist/session/create-tasks.d.ts +20 -0
- package/dist/session/create-tasks.js +110 -0
- package/dist/session/index.d.ts +9 -0
- package/dist/session/index.js +7 -0
- package/dist/session/interaction/client.d.ts +347 -0
- package/dist/session/interaction/client.js +15 -0
- package/dist/session/interaction/commands.d.ts +7 -0
- package/dist/session/interaction/commands.js +101 -0
- package/dist/session/interaction/index.d.ts +3 -0
- package/dist/session/interaction/index.js +3 -0
- package/dist/session/interaction/input.d.ts +15 -0
- package/dist/session/interaction/input.js +46 -0
- package/dist/session/interaction/output/format.d.ts +11 -0
- package/dist/session/interaction/output/format.js +3 -0
- package/dist/session/interaction/output/index.d.ts +2 -0
- package/dist/session/interaction/output/index.js +2 -0
- package/dist/session/output/diff.d.ts +3 -0
- package/dist/session/output/diff.js +30 -0
- package/dist/session/output/failure.d.ts +11 -0
- package/dist/session/output/failure.js +24 -0
- package/dist/session/output/human.d.ts +112 -0
- package/dist/session/output/human.js +71 -0
- package/dist/session/output/index.d.ts +6 -0
- package/dist/session/output/index.js +6 -0
- package/dist/session/output/observe.d.ts +4 -0
- package/dist/session/output/observe.js +46 -0
- package/dist/session/output/tasks.d.ts +19 -0
- package/dist/session/output/tasks.js +34 -0
- package/dist/session/rename.d.ts +3 -0
- package/dist/session/rename.js +37 -0
- package/dist/session/task-file.d.ts +5 -0
- package/dist/session/task-file.js +23 -0
- package/dist/session/tree/index.d.ts +2 -0
- package/dist/session/tree/index.js +2 -0
- package/dist/session/tree/tree.d.ts +3 -0
- package/dist/session/tree/tree.js +309 -0
- package/dist/session/turn/client.d.ts +25 -0
- package/dist/session/turn/client.js +40 -0
- package/dist/session/turn/commands.d.ts +6 -0
- package/dist/session/turn/commands.js +157 -0
- package/dist/session/turn/index.d.ts +4 -0
- package/dist/session/turn/index.js +3 -0
- package/dist/session/turn/output.d.ts +42 -0
- package/dist/session/turn/output.js +38 -0
- package/dist/status/client.d.ts +119 -0
- package/dist/status/client.js +5 -0
- package/dist/status/command.d.ts +4 -0
- package/dist/status/command.js +40 -0
- package/dist/status/doctor.d.ts +15 -0
- package/dist/status/doctor.js +111 -0
- package/dist/status/index.d.ts +5 -0
- package/dist/status/index.js +4 -0
- package/dist/status/output/compact.d.ts +31 -0
- package/dist/status/output/compact.js +46 -0
- package/dist/status/output/human.d.ts +7 -0
- package/dist/status/output/human.js +30 -0
- package/dist/status/output/index.d.ts +3 -0
- package/dist/status/output/index.js +3 -0
- package/dist/terminal/arguments.d.ts +13 -0
- package/dist/terminal/arguments.js +79 -0
- package/dist/terminal/client.d.ts +79 -0
- package/dist/terminal/client.js +68 -0
- package/dist/terminal/commands.d.ts +7 -0
- package/dist/terminal/commands.js +131 -0
- package/dist/terminal/control-commands.d.ts +10 -0
- package/dist/terminal/control-commands.js +212 -0
- package/dist/terminal/index.d.ts +4 -0
- package/dist/terminal/index.js +4 -0
- package/dist/terminal/output/compact-list.d.ts +147 -0
- package/dist/terminal/output/compact-list.js +152 -0
- package/dist/terminal/output/human.d.ts +59 -0
- package/dist/terminal/output/human.js +55 -0
- package/dist/terminal/output/index.d.ts +3 -0
- package/dist/terminal/output/index.js +3 -0
- package/dist/terminal/tree/index.d.ts +2 -0
- package/dist/terminal/tree/index.js +2 -0
- package/dist/terminal/tree/tree.d.ts +3 -0
- package/dist/terminal/tree/tree.js +104 -0
- package/guidance/maia-cli/SKILL.md +58 -0
- package/guidance/maia-orchestration/SKILL.md +54 -0
- package/package.json +76 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { type AttachRepositoryInput, type AttachWorkspaceMembershipInput, type CliNodeResult, type ConfigureWorkspaceExecutionInput, type CreateExecutionCheckpointInput, type CreateExecutionPlacementInput, type CreateExecutionWorktreeInput, type ImportExecutionWorktreeInput, makeProjectWorkspaceClient, type ReadExecutionFileInput, type ReconcileExecutionWorktreeInput, type RecordProjectContextInput, type RegisterProjectInput, type RemoveExecutionWorktreeInput, type RunExecutionCommandInput, type SelectWorkspaceInput, } from "./client.js";
|
|
2
|
+
export { runExecutionCatalogShow, runExecutionCheckpointCreate, runExecutionCheckpointShow, runExecutionCommandRun, runExecutionFileRead, runExecutionPlacementCreate, runExecutionPlacementShow, runExecutionWorktreeCreate, runExecutionWorktreeImport, runExecutionWorktreeReconcile, runExecutionWorktreeRemoveApply, runExecutionWorktreeRemovePlan, runExecutionWorktreeStatus, runProjectContextList, runProjectContextRecord, runProjectContextShow, runProjectList, runProjectRegister, runProjectShow, runWorkspaceContextShow, runWorkspaceExecutionClear, runWorkspaceExecutionSet, runWorkspaceExecutionShow, runWorkspaceList, runWorkspaceMembershipAttach, runWorkspaceRepositoryAttach, runWorkspaceSelect, runWorkspaceShow, } from "./commands.js";
|
|
3
|
+
export { makeProjectMetadataClient, type ProjectMetadataCliDependencies, } from "./metadata-client.js";
|
|
4
|
+
export { runProjectCreate, runProjectRename } from "./metadata-commands.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { makeProjectWorkspaceClient, } from "./client.js";
|
|
2
|
+
export { runExecutionCatalogShow, runExecutionCheckpointCreate, runExecutionCheckpointShow, runExecutionCommandRun, runExecutionFileRead, runExecutionPlacementCreate, runExecutionPlacementShow, runExecutionWorktreeCreate, runExecutionWorktreeImport, runExecutionWorktreeReconcile, runExecutionWorktreeRemoveApply, runExecutionWorktreeRemovePlan, runExecutionWorktreeStatus, runProjectContextList, runProjectContextRecord, runProjectContextShow, runProjectList, runProjectRegister, runProjectShow, runWorkspaceContextShow, runWorkspaceExecutionClear, runWorkspaceExecutionSet, runWorkspaceExecutionShow, runWorkspaceList, runWorkspaceMembershipAttach, runWorkspaceRepositoryAttach, runWorkspaceSelect, runWorkspaceShow, } from "./commands.js";
|
|
3
|
+
export { makeProjectMetadataClient, } from "./metadata-client.js";
|
|
4
|
+
export { runProjectCreate, runProjectRename } from "./metadata-commands.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type ProjectCreateConfirmParameters, type ProjectCreatePreviewParameters, type ProjectRenameConfirmParameters, type ProjectRenamePreviewParameters } from "@maiaos/sdk";
|
|
2
|
+
import type { CliNodeOperations } from "../local-node/index.js";
|
|
3
|
+
export declare const makeProjectMetadataClient: (node: CliNodeOperations) => {
|
|
4
|
+
confirmProjectCreate: (input: ProjectCreateConfirmParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
5
|
+
readonly actorId: string;
|
|
6
|
+
readonly commandId: string;
|
|
7
|
+
readonly containerId: string;
|
|
8
|
+
readonly delivery: "duplicate" | "new";
|
|
9
|
+
readonly inputDigest: string;
|
|
10
|
+
readonly project: {
|
|
11
|
+
readonly createdAt: string;
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly revision: string;
|
|
15
|
+
readonly schemaVersion: 1;
|
|
16
|
+
readonly updatedAt: string;
|
|
17
|
+
};
|
|
18
|
+
readonly receipt: {
|
|
19
|
+
readonly actorId: string;
|
|
20
|
+
readonly aggregateRevision: string;
|
|
21
|
+
readonly commandId: string;
|
|
22
|
+
readonly createdAt: string;
|
|
23
|
+
readonly eventCursor: string;
|
|
24
|
+
readonly method: string;
|
|
25
|
+
readonly receiptId: string;
|
|
26
|
+
readonly schemaVersion: 1;
|
|
27
|
+
readonly state: "succeeded";
|
|
28
|
+
readonly target: {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly type: string;
|
|
31
|
+
};
|
|
32
|
+
readonly updatedAt: string;
|
|
33
|
+
};
|
|
34
|
+
readonly containerRevision: string;
|
|
35
|
+
readonly expectedContainerRevision: string;
|
|
36
|
+
readonly method: "project.create.confirm";
|
|
37
|
+
}>;
|
|
38
|
+
confirmProjectRename: (input: ProjectRenameConfirmParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
39
|
+
readonly actorId: string;
|
|
40
|
+
readonly commandId: string;
|
|
41
|
+
readonly containerId: string;
|
|
42
|
+
readonly delivery: "duplicate" | "new";
|
|
43
|
+
readonly inputDigest: string;
|
|
44
|
+
readonly project: {
|
|
45
|
+
readonly createdAt: string;
|
|
46
|
+
readonly id: string;
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly revision: string;
|
|
49
|
+
readonly schemaVersion: 1;
|
|
50
|
+
readonly updatedAt: string;
|
|
51
|
+
};
|
|
52
|
+
readonly receipt: {
|
|
53
|
+
readonly actorId: string;
|
|
54
|
+
readonly aggregateRevision: string;
|
|
55
|
+
readonly commandId: string;
|
|
56
|
+
readonly createdAt: string;
|
|
57
|
+
readonly eventCursor: string;
|
|
58
|
+
readonly method: string;
|
|
59
|
+
readonly receiptId: string;
|
|
60
|
+
readonly schemaVersion: 1;
|
|
61
|
+
readonly state: "succeeded";
|
|
62
|
+
readonly target: {
|
|
63
|
+
readonly id: string;
|
|
64
|
+
readonly type: string;
|
|
65
|
+
};
|
|
66
|
+
readonly updatedAt: string;
|
|
67
|
+
};
|
|
68
|
+
readonly expectedRevision: string;
|
|
69
|
+
readonly method: "project.rename.confirm";
|
|
70
|
+
}>;
|
|
71
|
+
previewProjectCreate: (input: ProjectCreatePreviewParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
72
|
+
readonly commandId: string;
|
|
73
|
+
readonly containerId: string;
|
|
74
|
+
readonly expectedContainerRevision: string;
|
|
75
|
+
readonly name: string;
|
|
76
|
+
readonly inputDigest: string;
|
|
77
|
+
readonly proof: string;
|
|
78
|
+
readonly actorId: string;
|
|
79
|
+
readonly expiresAt: string;
|
|
80
|
+
readonly issuedAt: string;
|
|
81
|
+
readonly method: "project.create.preview";
|
|
82
|
+
readonly projectId: string;
|
|
83
|
+
}>;
|
|
84
|
+
previewProjectRename: (input: ProjectRenamePreviewParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
85
|
+
readonly commandId: string;
|
|
86
|
+
readonly containerId: string;
|
|
87
|
+
readonly expectedRevision: string;
|
|
88
|
+
readonly name: string;
|
|
89
|
+
readonly projectId: string;
|
|
90
|
+
readonly inputDigest: string;
|
|
91
|
+
readonly proof: string;
|
|
92
|
+
readonly actorId: string;
|
|
93
|
+
readonly expiresAt: string;
|
|
94
|
+
readonly issuedAt: string;
|
|
95
|
+
readonly method: "project.rename.preview";
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
export type ProjectMetadataCliDependencies = ReturnType<typeof makeProjectMetadataClient>;
|
|
99
|
+
//# sourceMappingURL=metadata-client.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { projectCreateConfirmParametersSchema, projectCreatePreviewParametersSchema, projectRenameConfirmParametersSchema, projectRenamePreviewParametersSchema, } from "@maiaos/sdk";
|
|
2
|
+
export const makeProjectMetadataClient = (node) => ({
|
|
3
|
+
confirmProjectCreate: (input) => node.runValidatedNodeOperation(input, projectCreateConfirmParametersSchema, (client, parameters, options) => client.confirmProjectCreate(parameters, options), { commandId: input.commandId }),
|
|
4
|
+
confirmProjectRename: (input) => node.runValidatedNodeOperation(input, projectRenameConfirmParametersSchema, (client, parameters, options) => client.confirmProjectRename(parameters, options), { commandId: input.commandId }),
|
|
5
|
+
previewProjectCreate: (input) => node.runValidatedNodeOperation(input, projectCreatePreviewParametersSchema, (client, parameters, options) => client.previewProjectCreate(parameters, options)),
|
|
6
|
+
previewProjectRename: (input) => node.runValidatedNodeOperation(input, projectRenamePreviewParametersSchema, (client, parameters, options) => client.previewProjectRename(parameters, options)),
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=metadata-client.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type CommandContext, type CommandEffect } from "../command-line/index.js";
|
|
2
|
+
export declare const runProjectCreate: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
3
|
+
export declare const runProjectRename: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
4
|
+
//# sourceMappingURL=metadata-commands.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { projectCreateConfirmParametersSchema, projectCreatePreviewParametersSchema, projectRenameConfirmParametersSchema, projectRenamePreviewParametersSchema, protocolErrorSchema, } from "@maiaos/sdk";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { CliArgumentError, reportError, runInputTwoPhase, writeSuccess, } from "../command-line/index.js";
|
|
4
|
+
import { formatProjectMetadataResult, } from "./output/index.js";
|
|
5
|
+
const recoveryFor = (code, parameters) => code === "outcome_unknown" &&
|
|
6
|
+
typeof parameters === "object" &&
|
|
7
|
+
parameters !== null &&
|
|
8
|
+
"commandId" in parameters &&
|
|
9
|
+
"proof" in parameters &&
|
|
10
|
+
typeof parameters.commandId === "string"
|
|
11
|
+
? { recovery: { commandId: parameters.commandId } }
|
|
12
|
+
: {};
|
|
13
|
+
const writeResponse = (response, parameters, context) => {
|
|
14
|
+
if (!response.ok) {
|
|
15
|
+
const error = protocolErrorSchema.parse(response.error);
|
|
16
|
+
return reportError({ ...error, message: "Project operation failed." }, {
|
|
17
|
+
...context,
|
|
18
|
+
...(response.recovery === undefined
|
|
19
|
+
? recoveryFor(error.code, parameters)
|
|
20
|
+
: { recovery: response.recovery }),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
writeSuccess({ command: response.value.method, result: response.value }, context, formatProjectMetadataResult);
|
|
24
|
+
return 0;
|
|
25
|
+
};
|
|
26
|
+
const reportFailure = (context) => (error) => Effect.sync(() => reportError({
|
|
27
|
+
code: error instanceof CliArgumentError
|
|
28
|
+
? "invalid_argument"
|
|
29
|
+
: "internal_error",
|
|
30
|
+
message: error instanceof CliArgumentError
|
|
31
|
+
? error.message
|
|
32
|
+
: "Project command failed.",
|
|
33
|
+
retryable: false,
|
|
34
|
+
}, context));
|
|
35
|
+
export const runProjectCreate = (tokens, context) => runInputTwoPhase({
|
|
36
|
+
confirm: context.dependencies.confirmProjectCreate,
|
|
37
|
+
confirmSchema: projectCreateConfirmParametersSchema,
|
|
38
|
+
context,
|
|
39
|
+
label: "Project input",
|
|
40
|
+
preview: context.dependencies.previewProjectCreate,
|
|
41
|
+
previewOnly: ["projectId"],
|
|
42
|
+
previewSchema: projectCreatePreviewParametersSchema,
|
|
43
|
+
tokens,
|
|
44
|
+
write: (result) => writeResponse(result, undefined, context),
|
|
45
|
+
}).pipe(Effect.catch(reportFailure(context)));
|
|
46
|
+
export const runProjectRename = (tokens, context) => runInputTwoPhase({
|
|
47
|
+
confirm: context.dependencies.confirmProjectRename,
|
|
48
|
+
confirmSchema: projectRenameConfirmParametersSchema,
|
|
49
|
+
context,
|
|
50
|
+
label: "Project input",
|
|
51
|
+
preview: context.dependencies.previewProjectRename,
|
|
52
|
+
previewSchema: projectRenamePreviewParametersSchema,
|
|
53
|
+
tokens,
|
|
54
|
+
write: (result) => writeResponse(result, undefined, context),
|
|
55
|
+
}).pipe(Effect.catch(reportFailure(context)));
|
|
56
|
+
//# sourceMappingURL=metadata-commands.js.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { ExecutionCatalogGetResult, ExecutionCommandRunResult, ExecutionFileReadResult, ExecutionPlacementCreateResult, ExecutionPlacementShowResult, ExecutionWorktreeCheckpointCreateResult, ExecutionWorktreeCheckpointShowResult, ExecutionWorktreeCreateResult, ExecutionWorktreeImportResult, ExecutionWorktreeReconcileResult, ExecutionWorktreeRemoveApplyResult, ExecutionWorktreeRemovePlanResult, ExecutionWorktreeStatusResult, ProjectContextListResult, ProjectContextRecordResult, ProjectContextShowResult, ProjectListResult, ProjectRegisterResult, ProjectShowResult, WorkspaceContextShowResult, WorkspaceExecutionConfigureResult, WorkspaceExecutionShowResult, WorkspaceListResult, WorkspaceMembershipAttachResult, WorkspaceRepositoryAttachResult, WorkspaceSelectResult, WorkspaceShowResult } from "@maiaos/sdk";
|
|
2
|
+
import { type CliIo } from "../../command-line/index.js";
|
|
3
|
+
import type { CliNodeResult } from "../../local-node/index.js";
|
|
4
|
+
export type CliExecutionResult = {
|
|
5
|
+
readonly command: "execution.catalog";
|
|
6
|
+
readonly result: ExecutionCatalogGetResult;
|
|
7
|
+
} | {
|
|
8
|
+
readonly command: "execution.checkpoint.create";
|
|
9
|
+
readonly result: ExecutionWorktreeCheckpointCreateResult;
|
|
10
|
+
} | {
|
|
11
|
+
readonly command: "execution.checkpoint.show";
|
|
12
|
+
readonly result: ExecutionWorktreeCheckpointShowResult;
|
|
13
|
+
} | {
|
|
14
|
+
readonly command: "execution.command.run";
|
|
15
|
+
readonly result: ExecutionCommandRunResult;
|
|
16
|
+
} | {
|
|
17
|
+
readonly command: "execution.file.read";
|
|
18
|
+
readonly result: ExecutionFileReadResult;
|
|
19
|
+
} | {
|
|
20
|
+
readonly command: "execution.placement.create";
|
|
21
|
+
readonly result: ExecutionPlacementCreateResult;
|
|
22
|
+
} | {
|
|
23
|
+
readonly command: "execution.placement.show";
|
|
24
|
+
readonly result: ExecutionPlacementShowResult;
|
|
25
|
+
} | {
|
|
26
|
+
readonly command: "execution.worktree.create";
|
|
27
|
+
readonly result: ExecutionWorktreeCreateResult;
|
|
28
|
+
} | {
|
|
29
|
+
readonly command: "execution.worktree.import";
|
|
30
|
+
readonly result: ExecutionWorktreeImportResult;
|
|
31
|
+
} | {
|
|
32
|
+
readonly command: "execution.worktree.reconcile";
|
|
33
|
+
readonly result: ExecutionWorktreeReconcileResult;
|
|
34
|
+
} | {
|
|
35
|
+
readonly command: "execution.worktree.remove.apply";
|
|
36
|
+
readonly result: ExecutionWorktreeRemoveApplyResult;
|
|
37
|
+
} | {
|
|
38
|
+
readonly command: "execution.worktree.remove.plan";
|
|
39
|
+
readonly result: ExecutionWorktreeRemovePlanResult;
|
|
40
|
+
} | {
|
|
41
|
+
readonly command: "execution.worktree.status";
|
|
42
|
+
readonly result: ExecutionWorktreeStatusResult;
|
|
43
|
+
};
|
|
44
|
+
export type CliProjectResult = {
|
|
45
|
+
readonly command: "project.context.list";
|
|
46
|
+
readonly result: ProjectContextListResult;
|
|
47
|
+
} | {
|
|
48
|
+
readonly command: "project.context.record";
|
|
49
|
+
readonly result: {
|
|
50
|
+
readonly delivery: ProjectContextRecordResult["delivery"];
|
|
51
|
+
readonly noteId: string;
|
|
52
|
+
readonly projectId: string;
|
|
53
|
+
readonly receipt: ProjectContextRecordResult["receipt"];
|
|
54
|
+
readonly sequence: string;
|
|
55
|
+
};
|
|
56
|
+
} | {
|
|
57
|
+
readonly command: "project.context.show";
|
|
58
|
+
readonly result: ProjectContextShowResult;
|
|
59
|
+
} | {
|
|
60
|
+
readonly command: "project.list";
|
|
61
|
+
readonly result: ProjectListResult;
|
|
62
|
+
} | {
|
|
63
|
+
readonly command: "project.register";
|
|
64
|
+
readonly result: {
|
|
65
|
+
readonly checkoutId: string;
|
|
66
|
+
readonly delivery: ProjectRegisterResult["delivery"];
|
|
67
|
+
readonly projectId: string;
|
|
68
|
+
readonly receipt: ProjectRegisterResult["receipt"];
|
|
69
|
+
readonly repositoryId: string;
|
|
70
|
+
readonly workspaceId: string;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
readonly command: "project.show";
|
|
74
|
+
readonly result: ProjectShowResult;
|
|
75
|
+
};
|
|
76
|
+
export type CliWorkspaceResult = {
|
|
77
|
+
readonly command: "workspace.context.show";
|
|
78
|
+
readonly result: WorkspaceContextShowResult;
|
|
79
|
+
} | {
|
|
80
|
+
readonly command: "workspace.execution.configure";
|
|
81
|
+
readonly result: {
|
|
82
|
+
readonly binding?: WorkspaceExecutionConfigureResult["binding"];
|
|
83
|
+
readonly delivery: WorkspaceExecutionConfigureResult["delivery"];
|
|
84
|
+
readonly receipt: WorkspaceExecutionConfigureResult["receipt"];
|
|
85
|
+
readonly resolution: WorkspaceExecutionConfigureResult["resolution"];
|
|
86
|
+
readonly workspaceId: string;
|
|
87
|
+
readonly workspaceRevision: string;
|
|
88
|
+
};
|
|
89
|
+
} | {
|
|
90
|
+
readonly command: "workspace.execution.show";
|
|
91
|
+
readonly result: WorkspaceExecutionShowResult;
|
|
92
|
+
} | {
|
|
93
|
+
readonly command: "workspace.list";
|
|
94
|
+
readonly result: WorkspaceListResult;
|
|
95
|
+
} | {
|
|
96
|
+
readonly command: "workspace.membership.attach";
|
|
97
|
+
readonly result: WorkspaceMembershipAttachResult;
|
|
98
|
+
} | {
|
|
99
|
+
readonly command: "workspace.repository.attach";
|
|
100
|
+
readonly result: {
|
|
101
|
+
readonly checkoutId: string;
|
|
102
|
+
readonly delivery: WorkspaceRepositoryAttachResult["delivery"];
|
|
103
|
+
readonly receipt: WorkspaceRepositoryAttachResult["receipt"];
|
|
104
|
+
readonly repositoryId: string;
|
|
105
|
+
readonly workspaceId: string;
|
|
106
|
+
readonly workspaceRevision: string;
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
readonly command: "workspace.select";
|
|
110
|
+
readonly result: WorkspaceSelectResult;
|
|
111
|
+
} | {
|
|
112
|
+
readonly command: "workspace.show";
|
|
113
|
+
readonly result: WorkspaceShowResult;
|
|
114
|
+
};
|
|
115
|
+
export declare const formatWorkspaceResult: (result: CliWorkspaceResult) => string;
|
|
116
|
+
export declare const formatProjectResult: (result: CliProjectResult) => string;
|
|
117
|
+
export declare const formatExecutionResult: (result: CliExecutionResult) => string;
|
|
118
|
+
type OutputContext = {
|
|
119
|
+
readonly io: CliIo;
|
|
120
|
+
readonly json: boolean;
|
|
121
|
+
};
|
|
122
|
+
export declare const writeProjectResult: <TValue>(result: CliNodeResult<TValue>, context: OutputContext, map: (value: TValue) => CliProjectResult) => number;
|
|
123
|
+
export declare const writeWorkspaceResult: <TValue>(result: CliNodeResult<TValue>, context: OutputContext, map: (value: TValue) => CliWorkspaceResult) => number;
|
|
124
|
+
export declare const writeExecutionResult: <TValue>(result: CliNodeResult<TValue>, context: OutputContext, map: (value: TValue) => CliExecutionResult) => number;
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=human.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { cell, formatRows, tab, writeNodeResult, } from "../../command-line/index.js";
|
|
2
|
+
const formatProjectList = (result) => formatRows(result.items, (project) => `${project.id}\t${cell(project.name)}\t${project.revision}`, {
|
|
3
|
+
empty: "No Projects. Register one with: maia project register <path>",
|
|
4
|
+
headers: ["PROJECT", "NAME", "REVISION"],
|
|
5
|
+
});
|
|
6
|
+
const formatProjectContextList = (result) => formatRows(result.items, (note) => `${note.id}\t${note.sequence}\t${cell(note.body)}`, { empty: "No context notes.", headers: ["NOTE", "SEQUENCE", "BODY"] });
|
|
7
|
+
const formatWorkspaceList = (result) => formatRows(result.items, (workspace) => `${workspace.id}\t${cell(workspace.name)}\t${workspace.kind}\t${workspace.revision}`, {
|
|
8
|
+
empty: "No Workspaces.",
|
|
9
|
+
headers: ["WORKSPACE", "NAME", "KIND", "REVISION"],
|
|
10
|
+
});
|
|
11
|
+
export const formatWorkspaceResult = (result) => {
|
|
12
|
+
switch (result.command) {
|
|
13
|
+
case "workspace.context.show":
|
|
14
|
+
return `${result.result.workspace.id}\t${result.result.workspace.revision}\t${result.result.context.contextRevision}\t${result.result.context.systemPromptInput.focus.projectId}\t${result.result.context.systemPromptInput.focus.repositoryId}\n`;
|
|
15
|
+
case "workspace.execution.configure":
|
|
16
|
+
return `${result.result.workspaceId}\t${result.result.workspaceRevision}\t${result.result.resolution.status}\t${result.result.resolution.reason}\n`;
|
|
17
|
+
case "workspace.execution.show":
|
|
18
|
+
return `${result.result.workspace.id}\t${result.result.workspace.revision}\t${result.result.resolution.status}\t${result.result.resolution.reason}\n`;
|
|
19
|
+
case "workspace.list":
|
|
20
|
+
return formatWorkspaceList(result.result);
|
|
21
|
+
case "workspace.membership.attach":
|
|
22
|
+
return `${result.result.membership.workspaceId}\t${result.result.workspace.revision}\t${result.result.context.contextRevision}\t${result.result.membership.projectId}\t${result.result.membership.repositoryId}\t${result.result.delivery}\t${result.result.receipt.receiptId}\n`;
|
|
23
|
+
case "workspace.repository.attach":
|
|
24
|
+
return `${result.result.repositoryId}\n`;
|
|
25
|
+
case "workspace.select":
|
|
26
|
+
return `${result.result.workspace.id}\t${result.result.workspace.revision}\t${result.result.context.contextRevision}\t${result.result.context.systemPromptInput.focus.projectId}\t${result.result.context.systemPromptInput.focus.repositoryId}\t${result.result.delivery}\t${result.result.receipt.receiptId}\n`;
|
|
27
|
+
case "workspace.show":
|
|
28
|
+
return `${result.result.workspace.id}\t${cell(result.result.workspace.name)}\t${result.result.workspace.revision}\n`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export const formatProjectResult = (result) => {
|
|
32
|
+
switch (result.command) {
|
|
33
|
+
case "project.register":
|
|
34
|
+
return `${tab([result.result.projectId, result.result.workspaceId, result.result.repositoryId])}\nnext: maia session create --workspace ${result.result.workspaceId} --executor codex-cli --message '<task>'\n`;
|
|
35
|
+
case "project.list":
|
|
36
|
+
return formatProjectList(result.result);
|
|
37
|
+
case "project.show":
|
|
38
|
+
return `${result.result.project.id}\t${cell(result.result.project.name)}\t${result.result.project.revision}\n`;
|
|
39
|
+
case "project.context.record":
|
|
40
|
+
return `${result.result.noteId}\n`;
|
|
41
|
+
case "project.context.list":
|
|
42
|
+
return formatProjectContextList(result.result);
|
|
43
|
+
case "project.context.show":
|
|
44
|
+
return `${result.result.note.id}\t${result.result.note.sequence}\t${cell(result.result.note.body)}\n`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const formatExecutionPlacement = (result) => {
|
|
48
|
+
const placement = result.result.placement;
|
|
49
|
+
return `${placement.id}\t${placement.kind}\t${placement.instanceId}\t${placement.revision}\t${placement.fencingEpoch}\n`;
|
|
50
|
+
};
|
|
51
|
+
const formatExecutionWorktree = (result) => {
|
|
52
|
+
switch (result.command) {
|
|
53
|
+
case "execution.worktree.create":
|
|
54
|
+
case "execution.worktree.import":
|
|
55
|
+
return `${result.result.workspace.id}\t${result.result.operation.id}\t${result.result.operation.state}\n`;
|
|
56
|
+
case "execution.worktree.status":
|
|
57
|
+
return `${result.result.workspace.id}\t${result.result.latestOperation.id}\t${result.result.latestOperation.state}\n`;
|
|
58
|
+
case "execution.worktree.reconcile":
|
|
59
|
+
case "execution.worktree.remove.apply":
|
|
60
|
+
return `${result.result.operation.id}\t${result.result.operation.state}\t${result.result.operation.cleanup}\n`;
|
|
61
|
+
case "execution.worktree.remove.plan":
|
|
62
|
+
return `${result.result.plan.id}\t${String(result.result.plan.eligible)}\t${String(result.result.plan.blockers.length)}\n`;
|
|
63
|
+
case "execution.checkpoint.create":
|
|
64
|
+
return `${result.result.operation.id}\t${result.result.operation.state}${result.result.checkpoint === undefined ? "" : `\t${result.result.checkpoint.id}`}\n`;
|
|
65
|
+
case "execution.checkpoint.show":
|
|
66
|
+
return `${result.result.checkpoint.id}\t${result.result.checkpoint.sourceRevision}\n`;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const formatExecutionCatalog = (result) => {
|
|
70
|
+
const [provider] = result.result.providers;
|
|
71
|
+
return `${provider.id}\t${provider.kind}\t${provider.binding}\t${provider.reason}\n`;
|
|
72
|
+
};
|
|
73
|
+
export const formatExecutionResult = (result) => {
|
|
74
|
+
if (result.command === "execution.catalog") {
|
|
75
|
+
return formatExecutionCatalog(result);
|
|
76
|
+
}
|
|
77
|
+
if (result.command === "execution.command.run") {
|
|
78
|
+
const operation = result.result.operation;
|
|
79
|
+
return `${operation.id}\t${operation.state}\t${operation.cleanup}\n`;
|
|
80
|
+
}
|
|
81
|
+
if (result.command === "execution.file.read") {
|
|
82
|
+
const operation = result.result.operation;
|
|
83
|
+
return `${operation.id}\t${operation.state}\n`;
|
|
84
|
+
}
|
|
85
|
+
if (result.command === "execution.placement.create" ||
|
|
86
|
+
result.command === "execution.placement.show") {
|
|
87
|
+
return formatExecutionPlacement(result);
|
|
88
|
+
}
|
|
89
|
+
return formatExecutionWorktree(result);
|
|
90
|
+
};
|
|
91
|
+
export const writeProjectResult = (result, context, map) => writeNodeResult(result, context, {
|
|
92
|
+
toResult: map,
|
|
93
|
+
toText: formatProjectResult,
|
|
94
|
+
});
|
|
95
|
+
export const writeWorkspaceResult = (result, context, map) => writeNodeResult(result, context, {
|
|
96
|
+
toResult: map,
|
|
97
|
+
toText: formatWorkspaceResult,
|
|
98
|
+
});
|
|
99
|
+
export const writeExecutionResult = (result, context, map) => writeNodeResult(result, context, {
|
|
100
|
+
toResult: map,
|
|
101
|
+
toText: formatExecutionResult,
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=human.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type CliExecutionResult, type CliProjectResult, type CliWorkspaceResult, formatExecutionResult, formatProjectResult, formatWorkspaceResult, writeExecutionResult, writeProjectResult, writeWorkspaceResult, } from "./human.js";
|
|
2
|
+
export { type CliProjectMetadataResult, formatProjectMetadataResult, isProjectMetadataResult, type ProjectMetadataResult, } from "./metadata.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { formatExecutionResult, formatProjectResult, formatWorkspaceResult, writeExecutionResult, writeProjectResult, writeWorkspaceResult, } from "./human.js";
|
|
2
|
+
export { formatProjectMetadataResult, isProjectMetadataResult, } from "./metadata.js";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ProjectCreateConfirmResult, ProjectCreatePreviewResult, ProjectRenameConfirmResult, ProjectRenamePreviewResult } from "@maiaos/sdk";
|
|
2
|
+
export type ProjectMetadataResult = ProjectCreateConfirmResult | ProjectCreatePreviewResult | ProjectRenameConfirmResult | ProjectRenamePreviewResult;
|
|
3
|
+
export type CliProjectMetadataResult = {
|
|
4
|
+
readonly command: ProjectMetadataResult["method"];
|
|
5
|
+
readonly result: ProjectMetadataResult;
|
|
6
|
+
};
|
|
7
|
+
export declare const isProjectMetadataResult: (result: {
|
|
8
|
+
readonly command: string;
|
|
9
|
+
}) => result is CliProjectMetadataResult;
|
|
10
|
+
export declare const formatProjectMetadataResult: ({ result, }: CliProjectMetadataResult) => string;
|
|
11
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const isProjectMetadataResult = (result) => result.command === "project.create.preview" ||
|
|
2
|
+
result.command === "project.create.confirm" ||
|
|
3
|
+
result.command === "project.rename.preview" ||
|
|
4
|
+
result.command === "project.rename.confirm";
|
|
5
|
+
const cell = (value) => value.replaceAll(/[\u0000-\u001F\u007F-\u009F]/gu, " ");
|
|
6
|
+
export const formatProjectMetadataResult = ({ result, }) => {
|
|
7
|
+
switch (result.method) {
|
|
8
|
+
case "project.create.preview":
|
|
9
|
+
return `${result.containerId}\t${result.expectedContainerRevision}\t${result.projectId}\t${cell(result.name)}\t${result.expiresAt}\n`;
|
|
10
|
+
case "project.rename.preview":
|
|
11
|
+
return `${result.containerId}\t${result.projectId}\t${result.expectedRevision}\t${cell(result.name)}\t${result.expiresAt}\n`;
|
|
12
|
+
case "project.create.confirm":
|
|
13
|
+
case "project.rename.confirm":
|
|
14
|
+
return `${result.project.id}\t${cell(result.project.name)}\t${result.project.revision}\t${result.receipt.receiptId}\t${result.delivery}\n`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=metadata.js.map
|