@microvac/adapter-utils 0.0.0-stage → 0.1.0-rc.14
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 +69 -2
- package/dist/acpx-engine/accounting-model.d.ts +7 -0
- package/dist/acpx-engine/accounting-model.d.ts.map +1 -0
- package/dist/acpx-engine/accounting-model.js +12 -0
- package/dist/acpx-engine/accounting-model.js.map +1 -0
- package/dist/acpx-engine/accounting-model.test.d.ts +2 -0
- package/dist/acpx-engine/accounting-model.test.d.ts.map +1 -0
- package/dist/acpx-engine/accounting-model.test.js +28 -0
- package/dist/acpx-engine/accounting-model.test.js.map +1 -0
- package/dist/acpx-engine/cli.d.ts +2 -0
- package/dist/acpx-engine/cli.d.ts.map +1 -0
- package/dist/acpx-engine/cli.js +128 -0
- package/dist/acpx-engine/cli.js.map +1 -0
- package/dist/acpx-engine/constants.d.ts +28 -0
- package/dist/acpx-engine/constants.d.ts.map +1 -0
- package/dist/acpx-engine/constants.js +74 -0
- package/dist/acpx-engine/constants.js.map +1 -0
- package/dist/acpx-engine/ephemeral-session-environment.d.ts +4 -0
- package/dist/acpx-engine/ephemeral-session-environment.d.ts.map +1 -0
- package/dist/acpx-engine/ephemeral-session-environment.js +45 -0
- package/dist/acpx-engine/ephemeral-session-environment.js.map +1 -0
- package/dist/acpx-engine/ephemeral-session-environment.test.d.ts +2 -0
- package/dist/acpx-engine/ephemeral-session-environment.test.d.ts.map +1 -0
- package/dist/acpx-engine/ephemeral-session-environment.test.js +219 -0
- package/dist/acpx-engine/ephemeral-session-environment.test.js.map +1 -0
- package/dist/acpx-engine/execute-identity.test.d.ts +2 -0
- package/dist/acpx-engine/execute-identity.test.d.ts.map +1 -0
- package/dist/acpx-engine/execute-identity.test.js +218 -0
- package/dist/acpx-engine/execute-identity.test.js.map +1 -0
- package/dist/acpx-engine/execute.d.ts +366 -0
- package/dist/acpx-engine/execute.d.ts.map +1 -0
- package/dist/acpx-engine/execute.js +5021 -0
- package/dist/acpx-engine/execute.js.map +1 -0
- package/dist/acpx-engine/execute.test.d.ts +2 -0
- package/dist/acpx-engine/execute.test.d.ts.map +1 -0
- package/dist/acpx-engine/execute.test.js +8269 -0
- package/dist/acpx-engine/execute.test.js.map +1 -0
- package/dist/acpx-engine/filesystem-protocol.test.d.ts +2 -0
- package/dist/acpx-engine/filesystem-protocol.test.d.ts.map +1 -0
- package/dist/acpx-engine/filesystem-protocol.test.js +96 -0
- package/dist/acpx-engine/filesystem-protocol.test.js.map +1 -0
- package/dist/acpx-engine/index.d.ts +6 -0
- package/dist/acpx-engine/index.d.ts.map +1 -0
- package/dist/acpx-engine/index.js +6 -0
- package/dist/acpx-engine/index.js.map +1 -0
- package/dist/acpx-engine/local-process-control.d.ts +5 -0
- package/dist/acpx-engine/local-process-control.d.ts.map +1 -0
- package/dist/acpx-engine/local-process-control.js +39 -0
- package/dist/acpx-engine/local-process-control.js.map +1 -0
- package/dist/acpx-engine/local-process-control.test.d.ts +2 -0
- package/dist/acpx-engine/local-process-control.test.d.ts.map +1 -0
- package/dist/acpx-engine/local-process-control.test.js +38 -0
- package/dist/acpx-engine/local-process-control.test.js.map +1 -0
- package/dist/acpx-engine/operator-stop.test.d.ts +2 -0
- package/dist/acpx-engine/operator-stop.test.d.ts.map +1 -0
- package/dist/acpx-engine/operator-stop.test.js +107 -0
- package/dist/acpx-engine/operator-stop.test.js.map +1 -0
- package/dist/acpx-engine/remote-spawn-smoke.test.d.ts +2 -0
- package/dist/acpx-engine/remote-spawn-smoke.test.d.ts.map +1 -0
- package/dist/acpx-engine/remote-spawn-smoke.test.js +152 -0
- package/dist/acpx-engine/remote-spawn-smoke.test.js.map +1 -0
- package/dist/acpx-engine/run-contracts.d.ts +414 -0
- package/dist/acpx-engine/run-contracts.d.ts.map +1 -0
- package/dist/acpx-engine/run-contracts.js +20 -0
- package/dist/acpx-engine/run-contracts.js.map +1 -0
- package/dist/acpx-engine/run-contracts.test.d.ts +2 -0
- package/dist/acpx-engine/run-contracts.test.d.ts.map +1 -0
- package/dist/acpx-engine/run-contracts.test.js +57 -0
- package/dist/acpx-engine/run-contracts.test.js.map +1 -0
- package/dist/acpx-engine/run-coordinator.d.ts +57 -0
- package/dist/acpx-engine/run-coordinator.d.ts.map +1 -0
- package/dist/acpx-engine/run-coordinator.js +63 -0
- package/dist/acpx-engine/run-coordinator.js.map +1 -0
- package/dist/acpx-engine/run-coordinator.test.d.ts +2 -0
- package/dist/acpx-engine/run-coordinator.test.d.ts.map +1 -0
- package/dist/acpx-engine/run-coordinator.test.js +160 -0
- package/dist/acpx-engine/run-coordinator.test.js.map +1 -0
- package/dist/acpx-engine/run-fault-matrix.test.d.ts +2 -0
- package/dist/acpx-engine/run-fault-matrix.test.d.ts.map +1 -0
- package/dist/acpx-engine/run-fault-matrix.test.js +877 -0
- package/dist/acpx-engine/run-fault-matrix.test.js.map +1 -0
- package/dist/acpx-engine/run-resource-ledger.d.ts +30 -0
- package/dist/acpx-engine/run-resource-ledger.d.ts.map +1 -0
- package/dist/acpx-engine/run-resource-ledger.js +148 -0
- package/dist/acpx-engine/run-resource-ledger.js.map +1 -0
- package/dist/acpx-engine/run-resource-ledger.test.d.ts +2 -0
- package/dist/acpx-engine/run-resource-ledger.test.d.ts.map +1 -0
- package/dist/acpx-engine/run-resource-ledger.test.js +154 -0
- package/dist/acpx-engine/run-resource-ledger.test.js.map +1 -0
- package/dist/acpx-engine/run-site-host.d.ts +78 -0
- package/dist/acpx-engine/run-site-host.d.ts.map +1 -0
- package/dist/acpx-engine/run-site-host.js +65 -0
- package/dist/acpx-engine/run-site-host.js.map +1 -0
- package/dist/acpx-engine/run-site-host.test.d.ts +2 -0
- package/dist/acpx-engine/run-site-host.test.d.ts.map +1 -0
- package/dist/acpx-engine/run-site-host.test.js +98 -0
- package/dist/acpx-engine/run-site-host.test.js.map +1 -0
- package/dist/acpx-engine/run-site-sandbox.d.ts +155 -0
- package/dist/acpx-engine/run-site-sandbox.d.ts.map +1 -0
- package/dist/acpx-engine/run-site-sandbox.js +285 -0
- package/dist/acpx-engine/run-site-sandbox.js.map +1 -0
- package/dist/acpx-engine/run-site-sandbox.test.d.ts +2 -0
- package/dist/acpx-engine/run-site-sandbox.test.d.ts.map +1 -0
- package/dist/acpx-engine/run-site-sandbox.test.js +307 -0
- package/dist/acpx-engine/run-site-sandbox.test.js.map +1 -0
- package/dist/acpx-engine/session-codec.d.ts +3 -0
- package/dist/acpx-engine/session-codec.d.ts.map +1 -0
- package/dist/acpx-engine/session-codec.js +50 -0
- package/dist/acpx-engine/session-codec.js.map +1 -0
- package/dist/acpx-engine/session-reuse-store.d.ts +62 -0
- package/dist/acpx-engine/session-reuse-store.d.ts.map +1 -0
- package/dist/acpx-engine/session-reuse-store.js +134 -0
- package/dist/acpx-engine/session-reuse-store.js.map +1 -0
- package/dist/acpx-engine/session-reuse-store.test.d.ts +2 -0
- package/dist/acpx-engine/session-reuse-store.test.d.ts.map +1 -0
- package/dist/acpx-engine/session-reuse-store.test.js +134 -0
- package/dist/acpx-engine/session-reuse-store.test.js.map +1 -0
- package/dist/acpx-engine/settlement-sequence.d.ts +77 -0
- package/dist/acpx-engine/settlement-sequence.d.ts.map +1 -0
- package/dist/acpx-engine/settlement-sequence.js +119 -0
- package/dist/acpx-engine/settlement-sequence.js.map +1 -0
- package/dist/acpx-engine/settlement-sequence.test.d.ts +2 -0
- package/dist/acpx-engine/settlement-sequence.test.d.ts.map +1 -0
- package/dist/acpx-engine/settlement-sequence.test.js +272 -0
- package/dist/acpx-engine/settlement-sequence.test.js.map +1 -0
- package/dist/acpx-engine/spawn-smoke.test.d.ts +2 -0
- package/dist/acpx-engine/spawn-smoke.test.d.ts.map +1 -0
- package/dist/acpx-engine/spawn-smoke.test.js +193 -0
- package/dist/acpx-engine/spawn-smoke.test.js.map +1 -0
- package/dist/acpx-engine/startup-cancellation.d.ts +9 -0
- package/dist/acpx-engine/startup-cancellation.d.ts.map +1 -0
- package/dist/acpx-engine/startup-cancellation.js +97 -0
- package/dist/acpx-engine/startup-cancellation.js.map +1 -0
- package/dist/acpx-engine/startup-cancellation.test.d.ts +2 -0
- package/dist/acpx-engine/startup-cancellation.test.d.ts.map +1 -0
- package/dist/acpx-engine/startup-cancellation.test.js +115 -0
- package/dist/acpx-engine/startup-cancellation.test.js.map +1 -0
- package/dist/acpx-engine/startup-timing.d.ts +433 -0
- package/dist/acpx-engine/startup-timing.d.ts.map +1 -0
- package/dist/acpx-engine/startup-timing.js +631 -0
- package/dist/acpx-engine/startup-timing.js.map +1 -0
- package/dist/acpx-engine/startup-timing.test.d.ts +2 -0
- package/dist/acpx-engine/startup-timing.test.d.ts.map +1 -0
- package/dist/acpx-engine/startup-timing.test.js +619 -0
- package/dist/acpx-engine/startup-timing.test.js.map +1 -0
- package/dist/acpx-engine/stock-runtime-options.d.ts +37 -0
- package/dist/acpx-engine/stock-runtime-options.d.ts.map +1 -0
- package/dist/acpx-engine/stock-runtime-options.js +101 -0
- package/dist/acpx-engine/stock-runtime-options.js.map +1 -0
- package/dist/acpx-engine/stock-runtime-options.test.d.ts +2 -0
- package/dist/acpx-engine/stock-runtime-options.test.d.ts.map +1 -0
- package/dist/acpx-engine/stock-runtime-options.test.js +91 -0
- package/dist/acpx-engine/stock-runtime-options.test.js.map +1 -0
- package/dist/acpx-engine/terminal-session-failure.d.ts +48 -0
- package/dist/acpx-engine/terminal-session-failure.d.ts.map +1 -0
- package/dist/acpx-engine/terminal-session-failure.js +123 -0
- package/dist/acpx-engine/terminal-session-failure.js.map +1 -0
- package/dist/acpx-engine/terminal-session-failure.test.d.ts +2 -0
- package/dist/acpx-engine/terminal-session-failure.test.d.ts.map +1 -0
- package/dist/acpx-engine/terminal-session-failure.test.js +150 -0
- package/dist/acpx-engine/terminal-session-failure.test.js.map +1 -0
- package/dist/acpx-engine/turn-sequence.d.ts +54 -0
- package/dist/acpx-engine/turn-sequence.d.ts.map +1 -0
- package/dist/acpx-engine/turn-sequence.js +75 -0
- package/dist/acpx-engine/turn-sequence.js.map +1 -0
- package/dist/acpx-engine/turn-sequence.test.d.ts +2 -0
- package/dist/acpx-engine/turn-sequence.test.d.ts.map +1 -0
- package/dist/acpx-engine/turn-sequence.test.js +177 -0
- package/dist/acpx-engine/turn-sequence.test.js.map +1 -0
- package/dist/acpx-engine/ui.d.ts +3 -0
- package/dist/acpx-engine/ui.d.ts.map +1 -0
- package/dist/acpx-engine/ui.js +162 -0
- package/dist/acpx-engine/ui.js.map +1 -0
- package/dist/agent-observability.d.ts +25 -0
- package/dist/agent-observability.d.ts.map +1 -0
- package/dist/agent-observability.js +92 -0
- package/dist/agent-observability.js.map +1 -0
- package/dist/agent-observability.test.d.ts +2 -0
- package/dist/agent-observability.test.d.ts.map +1 -0
- package/dist/agent-observability.test.js +127 -0
- package/dist/agent-observability.test.js.map +1 -0
- package/dist/api-billing-type.d.ts +5 -0
- package/dist/api-billing-type.d.ts.map +1 -0
- package/dist/api-billing-type.js +16 -0
- package/dist/api-billing-type.js.map +1 -0
- package/dist/api-billing-type.test.d.ts +2 -0
- package/dist/api-billing-type.test.d.ts.map +1 -0
- package/dist/api-billing-type.test.js +20 -0
- package/dist/api-billing-type.test.js.map +1 -0
- package/dist/billing.d.ts +9 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +39 -0
- package/dist/billing.js.map +1 -0
- package/dist/billing.test.d.ts +2 -0
- package/dist/billing.test.d.ts.map +1 -0
- package/dist/billing.test.js +30 -0
- package/dist/billing.test.js.map +1 -0
- package/dist/bridge-transport-contract.d.ts +43 -0
- package/dist/bridge-transport-contract.d.ts.map +1 -0
- package/dist/bridge-transport-contract.js +33 -0
- package/dist/bridge-transport-contract.js.map +1 -0
- package/dist/chat-file-delivery.d.ts +10 -0
- package/dist/chat-file-delivery.d.ts.map +1 -0
- package/dist/chat-file-delivery.js +39 -0
- package/dist/chat-file-delivery.js.map +1 -0
- package/dist/chat-file-delivery.test.d.ts +2 -0
- package/dist/chat-file-delivery.test.d.ts.map +1 -0
- package/dist/chat-file-delivery.test.js +92 -0
- package/dist/chat-file-delivery.test.js.map +1 -0
- package/dist/codex-observability-home.d.ts +7 -0
- package/dist/codex-observability-home.d.ts.map +1 -0
- package/dist/codex-observability-home.js +75 -0
- package/dist/codex-observability-home.js.map +1 -0
- package/dist/codex-observability-profile.d.ts +16 -0
- package/dist/codex-observability-profile.d.ts.map +1 -0
- package/dist/codex-observability-profile.js +51 -0
- package/dist/codex-observability-profile.js.map +1 -0
- package/dist/codex-shell-environment.d.ts +6 -0
- package/dist/codex-shell-environment.d.ts.map +1 -0
- package/dist/codex-shell-environment.js +32 -0
- package/dist/codex-shell-environment.js.map +1 -0
- package/dist/codex-shell-environment.test.d.ts +2 -0
- package/dist/codex-shell-environment.test.d.ts.map +1 -0
- package/dist/codex-shell-environment.test.js +49 -0
- package/dist/codex-shell-environment.test.js.map +1 -0
- package/dist/command-managed-runtime.d.ts +178 -0
- package/dist/command-managed-runtime.d.ts.map +1 -0
- package/dist/command-managed-runtime.js +486 -0
- package/dist/command-managed-runtime.js.map +1 -0
- package/dist/command-managed-runtime.test.d.ts +2 -0
- package/dist/command-managed-runtime.test.d.ts.map +1 -0
- package/dist/command-managed-runtime.test.js +900 -0
- package/dist/command-managed-runtime.test.js.map +1 -0
- package/dist/command-redaction.d.ts +32 -0
- package/dist/command-redaction.d.ts.map +1 -0
- package/dist/command-redaction.js +280 -0
- package/dist/command-redaction.js.map +1 -0
- package/dist/command-redaction.test.d.ts +2 -0
- package/dist/command-redaction.test.d.ts.map +1 -0
- package/dist/command-redaction.test.js +297 -0
- package/dist/command-redaction.test.js.map +1 -0
- package/dist/connection-failure.d.ts +33 -0
- package/dist/connection-failure.d.ts.map +1 -0
- package/dist/connection-failure.js +43 -0
- package/dist/connection-failure.js.map +1 -0
- package/dist/connection-failure.test.d.ts +2 -0
- package/dist/connection-failure.test.d.ts.map +1 -0
- package/dist/connection-failure.test.js +94 -0
- package/dist/connection-failure.test.js.map +1 -0
- package/dist/directory-merge-lock-diagnostics.d.ts +24 -0
- package/dist/directory-merge-lock-diagnostics.d.ts.map +1 -0
- package/dist/directory-merge-lock-diagnostics.js +54 -0
- package/dist/directory-merge-lock-diagnostics.js.map +1 -0
- package/dist/directory-merge-lock-diagnostics.test.d.ts +2 -0
- package/dist/directory-merge-lock-diagnostics.test.d.ts.map +1 -0
- package/dist/directory-merge-lock-diagnostics.test.js +44 -0
- package/dist/directory-merge-lock-diagnostics.test.js.map +1 -0
- package/dist/directory-merge-lock.test.d.ts +2 -0
- package/dist/directory-merge-lock.test.d.ts.map +1 -0
- package/dist/directory-merge-lock.test.js +168 -0
- package/dist/directory-merge-lock.test.js.map +1 -0
- package/dist/duplex-frame-codec.d.ts +124 -0
- package/dist/duplex-frame-codec.d.ts.map +1 -0
- package/dist/duplex-frame-codec.js +134 -0
- package/dist/duplex-frame-codec.js.map +1 -0
- package/dist/duplex-frame-codec.test.d.ts +2 -0
- package/dist/duplex-frame-codec.test.d.ts.map +1 -0
- package/dist/duplex-frame-codec.test.js +172 -0
- package/dist/duplex-frame-codec.test.js.map +1 -0
- package/dist/duplex-observability.d.ts +220 -0
- package/dist/duplex-observability.d.ts.map +1 -0
- package/dist/duplex-observability.js +248 -0
- package/dist/duplex-observability.js.map +1 -0
- package/dist/duplex-observability.test.d.ts +2 -0
- package/dist/duplex-observability.test.d.ts.map +1 -0
- package/dist/duplex-observability.test.js +55 -0
- package/dist/duplex-observability.test.js.map +1 -0
- package/dist/env-bindings.d.ts +17 -0
- package/dist/env-bindings.d.ts.map +1 -0
- package/dist/env-bindings.js +98 -0
- package/dist/env-bindings.js.map +1 -0
- package/dist/env-bindings.test.d.ts +2 -0
- package/dist/env-bindings.test.d.ts.map +1 -0
- package/dist/env-bindings.test.js +66 -0
- package/dist/env-bindings.test.js.map +1 -0
- package/dist/exclude-patterns.d.ts +13 -0
- package/dist/exclude-patterns.d.ts.map +1 -0
- package/dist/exclude-patterns.js +37 -0
- package/dist/exclude-patterns.js.map +1 -0
- package/dist/execution-phase.d.ts +10 -0
- package/dist/execution-phase.d.ts.map +1 -0
- package/dist/execution-phase.js +27 -0
- package/dist/execution-phase.js.map +1 -0
- package/dist/execution-phase.test.d.ts +2 -0
- package/dist/execution-phase.test.d.ts.map +1 -0
- package/dist/execution-phase.test.js +26 -0
- package/dist/execution-phase.test.js.map +1 -0
- package/dist/execution-target-sandbox.test.d.ts +2 -0
- package/dist/execution-target-sandbox.test.d.ts.map +1 -0
- package/dist/execution-target-sandbox.test.js +5599 -0
- package/dist/execution-target-sandbox.test.js.map +1 -0
- package/dist/execution-target-stdin-race.test.d.ts +2 -0
- package/dist/execution-target-stdin-race.test.d.ts.map +1 -0
- package/dist/execution-target-stdin-race.test.js +2166 -0
- package/dist/execution-target-stdin-race.test.js.map +1 -0
- package/dist/execution-target.d.ts +604 -0
- package/dist/execution-target.d.ts.map +1 -0
- package/dist/execution-target.js +4018 -0
- package/dist/execution-target.js.map +1 -0
- package/dist/execution-target.test.d.ts +2 -0
- package/dist/execution-target.test.d.ts.map +1 -0
- package/dist/execution-target.test.js +404 -0
- package/dist/execution-target.test.js.map +1 -0
- package/dist/git-shallow-import-budget.test.d.ts +2 -0
- package/dist/git-shallow-import-budget.test.d.ts.map +1 -0
- package/dist/git-shallow-import-budget.test.js +72 -0
- package/dist/git-shallow-import-budget.test.js.map +1 -0
- package/dist/git-workspace-sync.d.ts +224 -0
- package/dist/git-workspace-sync.d.ts.map +1 -0
- package/dist/git-workspace-sync.js +1081 -0
- package/dist/git-workspace-sync.js.map +1 -0
- package/dist/git-workspace-sync.test.d.ts +2 -0
- package/dist/git-workspace-sync.test.d.ts.map +1 -0
- package/dist/git-workspace-sync.test.js +1262 -0
- package/dist/git-workspace-sync.test.js.map +1 -0
- package/dist/github-launcher-environment.test.d.ts +2 -0
- package/dist/github-launcher-environment.test.d.ts.map +1 -0
- package/dist/github-launcher-environment.test.js +557 -0
- package/dist/github-launcher-environment.test.js.map +1 -0
- package/dist/github-launcher.d.ts +12 -0
- package/dist/github-launcher.d.ts.map +1 -0
- package/dist/github-launcher.js +240 -0
- package/dist/github-launcher.js.map +1 -0
- package/dist/github-launcher.test.d.ts +2 -0
- package/dist/github-launcher.test.d.ts.map +1 -0
- package/dist/github-launcher.test.js +608 -0
- package/dist/github-launcher.test.js.map +1 -0
- package/dist/http2-bridge-server.d.ts +464 -0
- package/dist/http2-bridge-server.d.ts.map +1 -0
- package/dist/http2-bridge-server.js +1086 -0
- package/dist/http2-bridge-server.js.map +1 -0
- package/dist/http2-bridge-server.test.d.ts +2 -0
- package/dist/http2-bridge-server.test.d.ts.map +1 -0
- package/dist/http2-bridge-server.test.js +2183 -0
- package/dist/http2-bridge-server.test.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/local-process-sandbox.d.ts +41 -0
- package/dist/local-process-sandbox.d.ts.map +1 -0
- package/dist/local-process-sandbox.js +432 -0
- package/dist/local-process-sandbox.js.map +1 -0
- package/dist/local-process-sandbox.test.d.ts +2 -0
- package/dist/local-process-sandbox.test.d.ts.map +1 -0
- package/dist/local-process-sandbox.test.js +399 -0
- package/dist/local-process-sandbox.test.js.map +1 -0
- package/dist/log-redaction.d.ts +9 -0
- package/dist/log-redaction.d.ts.map +1 -0
- package/dist/log-redaction.js +88 -0
- package/dist/log-redaction.js.map +1 -0
- package/dist/login-capability.d.ts +88 -0
- package/dist/login-capability.d.ts.map +1 -0
- package/dist/login-capability.js +78 -0
- package/dist/login-capability.js.map +1 -0
- package/dist/login-capability.test.d.ts +2 -0
- package/dist/login-capability.test.d.ts.map +1 -0
- package/dist/login-capability.test.js +78 -0
- package/dist/login-capability.test.js.map +1 -0
- package/dist/login-pty-transport.d.ts +80 -0
- package/dist/login-pty-transport.d.ts.map +1 -0
- package/dist/login-pty-transport.js +75 -0
- package/dist/login-pty-transport.js.map +1 -0
- package/dist/login-pty-transport.test.d.ts +2 -0
- package/dist/login-pty-transport.test.d.ts.map +1 -0
- package/dist/login-pty-transport.test.js +185 -0
- package/dist/login-pty-transport.test.js.map +1 -0
- package/dist/login-runner-lifecycle.d.ts +70 -0
- package/dist/login-runner-lifecycle.d.ts.map +1 -0
- package/dist/login-runner-lifecycle.js +52 -0
- package/dist/login-runner-lifecycle.js.map +1 -0
- package/dist/login-runner-lifecycle.test.d.ts +2 -0
- package/dist/login-runner-lifecycle.test.d.ts.map +1 -0
- package/dist/login-runner-lifecycle.test.js +122 -0
- package/dist/login-runner-lifecycle.test.js.map +1 -0
- package/dist/managed-ai-runtime-env.d.ts +4 -0
- package/dist/managed-ai-runtime-env.d.ts.map +1 -0
- package/dist/managed-ai-runtime-env.js +47 -0
- package/dist/managed-ai-runtime-env.js.map +1 -0
- package/dist/managed-clone-staging.test.d.ts +2 -0
- package/dist/managed-clone-staging.test.d.ts.map +1 -0
- package/dist/managed-clone-staging.test.js +167 -0
- package/dist/managed-clone-staging.test.js.map +1 -0
- package/dist/mcp-isolation.integration.test.d.ts +2 -0
- package/dist/mcp-isolation.integration.test.d.ts.map +1 -0
- package/dist/mcp-isolation.integration.test.js +202 -0
- package/dist/mcp-isolation.integration.test.js.map +1 -0
- package/dist/model-facing-history.d.ts +10 -0
- package/dist/model-facing-history.d.ts.map +1 -0
- package/dist/model-facing-history.js +44 -0
- package/dist/model-facing-history.js.map +1 -0
- package/dist/model-facing-history.test.d.ts +2 -0
- package/dist/model-facing-history.test.d.ts.map +1 -0
- package/dist/model-facing-history.test.js +27 -0
- package/dist/model-facing-history.test.js.map +1 -0
- package/dist/openrouter-attribution.d.ts +2 -0
- package/dist/openrouter-attribution.d.ts.map +1 -0
- package/dist/openrouter-attribution.js +2 -0
- package/dist/openrouter-attribution.js.map +1 -0
- package/dist/paperclip-runner-lifecycle-default.test.d.ts +2 -0
- package/dist/paperclip-runner-lifecycle-default.test.d.ts.map +1 -0
- package/dist/paperclip-runner-lifecycle-default.test.js +30 -0
- package/dist/paperclip-runner-lifecycle-default.test.js.map +1 -0
- package/dist/paperclip-runner-permissions.d.ts +182 -0
- package/dist/paperclip-runner-permissions.d.ts.map +1 -0
- package/dist/paperclip-runner-permissions.js +205 -0
- package/dist/paperclip-runner-permissions.js.map +1 -0
- package/dist/paperclip-runner-permissions.test.d.ts +2 -0
- package/dist/paperclip-runner-permissions.test.d.ts.map +1 -0
- package/dist/paperclip-runner-permissions.test.js +104 -0
- package/dist/paperclip-runner-permissions.test.js.map +1 -0
- package/dist/prompt-sections.test.d.ts +2 -0
- package/dist/prompt-sections.test.d.ts.map +1 -0
- package/dist/prompt-sections.test.js +53 -0
- package/dist/prompt-sections.test.js.map +1 -0
- package/dist/provider-stopped-boundary.d.ts +7 -0
- package/dist/provider-stopped-boundary.d.ts.map +1 -0
- package/dist/provider-stopped-boundary.js +22 -0
- package/dist/provider-stopped-boundary.js.map +1 -0
- package/dist/provider-stopped-boundary.test.d.ts +2 -0
- package/dist/provider-stopped-boundary.test.d.ts.map +1 -0
- package/dist/provider-stopped-boundary.test.js +76 -0
- package/dist/provider-stopped-boundary.test.js.map +1 -0
- package/dist/published-exports.test.d.ts +2 -0
- package/dist/published-exports.test.d.ts.map +1 -0
- package/dist/published-exports.test.js +17 -0
- package/dist/published-exports.test.js.map +1 -0
- package/dist/remote-execution-env.d.ts +3 -0
- package/dist/remote-execution-env.d.ts.map +1 -0
- package/dist/remote-execution-env.js +56 -0
- package/dist/remote-execution-env.js.map +1 -0
- package/dist/remote-managed-runtime.d.ts +52 -0
- package/dist/remote-managed-runtime.d.ts.map +1 -0
- package/dist/remote-managed-runtime.js +265 -0
- package/dist/remote-managed-runtime.js.map +1 -0
- package/dist/remote-managed-runtime.test.d.ts +2 -0
- package/dist/remote-managed-runtime.test.d.ts.map +1 -0
- package/dist/remote-managed-runtime.test.js +425 -0
- package/dist/remote-managed-runtime.test.js.map +1 -0
- package/dist/remote-pid-lock.d.ts +3 -0
- package/dist/remote-pid-lock.d.ts.map +1 -0
- package/dist/remote-pid-lock.js +35 -0
- package/dist/remote-pid-lock.js.map +1 -0
- package/dist/remote-text-file-sync.d.ts +41 -0
- package/dist/remote-text-file-sync.d.ts.map +1 -0
- package/dist/remote-text-file-sync.js +103 -0
- package/dist/remote-text-file-sync.js.map +1 -0
- package/dist/runner-connectivity.d.ts +61 -0
- package/dist/runner-connectivity.d.ts.map +1 -0
- package/dist/runner-connectivity.js +81 -0
- package/dist/runner-connectivity.js.map +1 -0
- package/dist/runner-connectivity.test.d.ts +2 -0
- package/dist/runner-connectivity.test.d.ts.map +1 -0
- package/dist/runner-connectivity.test.js +183 -0
- package/dist/runner-connectivity.test.js.map +1 -0
- package/dist/runtime-progress.d.ts +48 -0
- package/dist/runtime-progress.d.ts.map +1 -0
- package/dist/runtime-progress.js +99 -0
- package/dist/runtime-progress.js.map +1 -0
- package/dist/runtime-progress.test.d.ts +2 -0
- package/dist/runtime-progress.test.d.ts.map +1 -0
- package/dist/runtime-progress.test.js +240 -0
- package/dist/runtime-progress.test.js.map +1 -0
- package/dist/sandbox-callback-bridge-body.d.ts +12 -0
- package/dist/sandbox-callback-bridge-body.d.ts.map +1 -0
- package/dist/sandbox-callback-bridge-body.js +39 -0
- package/dist/sandbox-callback-bridge-body.js.map +1 -0
- package/dist/sandbox-callback-bridge-body.test.d.ts +2 -0
- package/dist/sandbox-callback-bridge-body.test.d.ts.map +1 -0
- package/dist/sandbox-callback-bridge-body.test.js +31 -0
- package/dist/sandbox-callback-bridge-body.test.js.map +1 -0
- package/dist/sandbox-callback-bridge.d.ts +249 -0
- package/dist/sandbox-callback-bridge.d.ts.map +1 -0
- package/dist/sandbox-callback-bridge.js +2309 -0
- package/dist/sandbox-callback-bridge.js.map +1 -0
- package/dist/sandbox-callback-bridge.test.d.ts +2 -0
- package/dist/sandbox-callback-bridge.test.d.ts.map +1 -0
- package/dist/sandbox-callback-bridge.test.js +3434 -0
- package/dist/sandbox-callback-bridge.test.js.map +1 -0
- package/dist/sandbox-callback-context-routes.test.d.ts +2 -0
- package/dist/sandbox-callback-context-routes.test.d.ts.map +1 -0
- package/dist/sandbox-callback-context-routes.test.js +40 -0
- package/dist/sandbox-callback-context-routes.test.js.map +1 -0
- package/dist/sandbox-file-sync.test.d.ts +2 -0
- package/dist/sandbox-file-sync.test.d.ts.map +1 -0
- package/dist/sandbox-file-sync.test.js +419 -0
- package/dist/sandbox-file-sync.test.js.map +1 -0
- package/dist/sandbox-install-command.d.ts +2 -0
- package/dist/sandbox-install-command.d.ts.map +1 -0
- package/dist/sandbox-install-command.js +47 -0
- package/dist/sandbox-install-command.js.map +1 -0
- package/dist/sandbox-install-command.test.d.ts +2 -0
- package/dist/sandbox-install-command.test.d.ts.map +1 -0
- package/dist/sandbox-install-command.test.js +22 -0
- package/dist/sandbox-install-command.test.js.map +1 -0
- package/dist/sandbox-managed-deletions.test.d.ts +2 -0
- package/dist/sandbox-managed-deletions.test.d.ts.map +1 -0
- package/dist/sandbox-managed-deletions.test.js +85 -0
- package/dist/sandbox-managed-deletions.test.js.map +1 -0
- package/dist/sandbox-managed-runtime.d.ts +465 -0
- package/dist/sandbox-managed-runtime.d.ts.map +1 -0
- package/dist/sandbox-managed-runtime.js +1801 -0
- package/dist/sandbox-managed-runtime.js.map +1 -0
- package/dist/sandbox-managed-runtime.test.d.ts +2 -0
- package/dist/sandbox-managed-runtime.test.d.ts.map +1 -0
- package/dist/sandbox-managed-runtime.test.js +3824 -0
- package/dist/sandbox-managed-runtime.test.js.map +1 -0
- package/dist/sandbox-managed-seed.test.d.ts +2 -0
- package/dist/sandbox-managed-seed.test.d.ts.map +1 -0
- package/dist/sandbox-managed-seed.test.js +223 -0
- package/dist/sandbox-managed-seed.test.js.map +1 -0
- package/dist/sandbox-run-log-stream.d.ts +44 -0
- package/dist/sandbox-run-log-stream.d.ts.map +1 -0
- package/dist/sandbox-run-log-stream.js +203 -0
- package/dist/sandbox-run-log-stream.js.map +1 -0
- package/dist/sandbox-shell.d.ts +3 -0
- package/dist/sandbox-shell.d.ts.map +1 -0
- package/dist/sandbox-shell.js +7 -0
- package/dist/sandbox-shell.js.map +1 -0
- package/dist/server-utils-env.test.d.ts +2 -0
- package/dist/server-utils-env.test.d.ts.map +1 -0
- package/dist/server-utils-env.test.js +15 -0
- package/dist/server-utils-env.test.js.map +1 -0
- package/dist/server-utils.d.ts +691 -0
- package/dist/server-utils.d.ts.map +1 -0
- package/dist/server-utils.js +3479 -0
- package/dist/server-utils.js.map +1 -0
- package/dist/server-utils.test.d.ts +2 -0
- package/dist/server-utils.test.d.ts.map +1 -0
- package/dist/server-utils.test.js +3571 -0
- package/dist/server-utils.test.js.map +1 -0
- package/dist/session-compaction.d.ts +25 -0
- package/dist/session-compaction.d.ts.map +1 -0
- package/dist/session-compaction.js +166 -0
- package/dist/session-compaction.js.map +1 -0
- package/dist/sigv4-presigned-url.d.ts +7 -0
- package/dist/sigv4-presigned-url.d.ts.map +1 -0
- package/dist/sigv4-presigned-url.js +119 -0
- package/dist/sigv4-presigned-url.js.map +1 -0
- package/dist/skill-library-manifest.d.ts +6 -0
- package/dist/skill-library-manifest.d.ts.map +1 -0
- package/dist/skill-library-manifest.js +53 -0
- package/dist/skill-library-manifest.js.map +1 -0
- package/dist/skill-library-manifest.test.d.ts +2 -0
- package/dist/skill-library-manifest.test.d.ts.map +1 -0
- package/dist/skill-library-manifest.test.js +84 -0
- package/dist/skill-library-manifest.test.js.map +1 -0
- package/dist/skills-staging-follow-symlinks.test.d.ts +2 -0
- package/dist/skills-staging-follow-symlinks.test.d.ts.map +1 -0
- package/dist/skills-staging-follow-symlinks.test.js +126 -0
- package/dist/skills-staging-follow-symlinks.test.js.map +1 -0
- package/dist/ssh-auth.test.d.ts +2 -0
- package/dist/ssh-auth.test.d.ts.map +1 -0
- package/dist/ssh-auth.test.js +20 -0
- package/dist/ssh-auth.test.js.map +1 -0
- package/dist/ssh-command-managed.test.d.ts +2 -0
- package/dist/ssh-command-managed.test.d.ts.map +1 -0
- package/dist/ssh-command-managed.test.js +136 -0
- package/dist/ssh-command-managed.test.js.map +1 -0
- package/dist/ssh-conversation-state.d.ts +22 -0
- package/dist/ssh-conversation-state.d.ts.map +1 -0
- package/dist/ssh-conversation-state.js +36 -0
- package/dist/ssh-conversation-state.js.map +1 -0
- package/dist/ssh-export-stream.test.d.ts +2 -0
- package/dist/ssh-export-stream.test.d.ts.map +1 -0
- package/dist/ssh-export-stream.test.js +104 -0
- package/dist/ssh-export-stream.test.js.map +1 -0
- package/dist/ssh-export.test.d.ts +2 -0
- package/dist/ssh-export.test.d.ts.map +1 -0
- package/dist/ssh-export.test.js +102 -0
- package/dist/ssh-export.test.js.map +1 -0
- package/dist/ssh-fixture.test.d.ts +2 -0
- package/dist/ssh-fixture.test.d.ts.map +1 -0
- package/dist/ssh-fixture.test.js +1107 -0
- package/dist/ssh-fixture.test.js.map +1 -0
- package/dist/ssh-tailscale.test.d.ts +2 -0
- package/dist/ssh-tailscale.test.d.ts.map +1 -0
- package/dist/ssh-tailscale.test.js +58 -0
- package/dist/ssh-tailscale.test.js.map +1 -0
- package/dist/ssh.d.ts +138 -0
- package/dist/ssh.d.ts.map +1 -0
- package/dist/ssh.js +1868 -0
- package/dist/ssh.js.map +1 -0
- package/dist/startup-reuse.d.ts +38 -0
- package/dist/startup-reuse.d.ts.map +1 -0
- package/dist/startup-reuse.js +90 -0
- package/dist/startup-reuse.js.map +1 -0
- package/dist/startup-reuse.test.d.ts +2 -0
- package/dist/startup-reuse.test.d.ts.map +1 -0
- package/dist/startup-reuse.test.js +71 -0
- package/dist/startup-reuse.test.js.map +1 -0
- package/dist/sync-operation-schedule.d.ts +17 -0
- package/dist/sync-operation-schedule.d.ts.map +1 -0
- package/dist/sync-operation-schedule.js +66 -0
- package/dist/sync-operation-schedule.js.map +1 -0
- package/dist/sync-operation-schedule.test.d.ts +2 -0
- package/dist/sync-operation-schedule.test.d.ts.map +1 -0
- package/dist/sync-operation-schedule.test.js +130 -0
- package/dist/sync-operation-schedule.test.js.map +1 -0
- package/dist/test-fixtures/follow-up-after-swarm-wake.d.ts +45 -0
- package/dist/test-fixtures/follow-up-after-swarm-wake.d.ts.map +1 -0
- package/dist/test-fixtures/follow-up-after-swarm-wake.js +80 -0
- package/dist/test-fixtures/follow-up-after-swarm-wake.js.map +1 -0
- package/dist/test-fixtures/prompt-context.d.ts +54 -0
- package/dist/test-fixtures/prompt-context.d.ts.map +1 -0
- package/dist/test-fixtures/prompt-context.js +55 -0
- package/dist/test-fixtures/prompt-context.js.map +1 -0
- package/dist/test-support/mcp-isolation-harness.d.ts +23 -0
- package/dist/test-support/mcp-isolation-harness.d.ts.map +1 -0
- package/dist/test-support/mcp-isolation-harness.js +67 -0
- package/dist/test-support/mcp-isolation-harness.js.map +1 -0
- package/dist/types.d.ts +910 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/usage-checkpoint.d.ts +11 -0
- package/dist/usage-checkpoint.d.ts.map +1 -0
- package/dist/usage-checkpoint.js +165 -0
- package/dist/usage-checkpoint.js.map +1 -0
- package/dist/usage-checkpoint.test.d.ts +2 -0
- package/dist/usage-checkpoint.test.d.ts.map +1 -0
- package/dist/usage-checkpoint.test.js +131 -0
- package/dist/usage-checkpoint.test.js.map +1 -0
- package/dist/workspace-checkpoint-capture.test.d.ts +2 -0
- package/dist/workspace-checkpoint-capture.test.d.ts.map +1 -0
- package/dist/workspace-checkpoint-capture.test.js +232 -0
- package/dist/workspace-checkpoint-capture.test.js.map +1 -0
- package/dist/workspace-checkpoint.d.ts +16 -0
- package/dist/workspace-checkpoint.d.ts.map +1 -0
- package/dist/workspace-checkpoint.js +236 -0
- package/dist/workspace-checkpoint.js.map +1 -0
- package/dist/workspace-checkpoint.test.d.ts +2 -0
- package/dist/workspace-checkpoint.test.d.ts.map +1 -0
- package/dist/workspace-checkpoint.test.js +588 -0
- package/dist/workspace-checkpoint.test.js.map +1 -0
- package/dist/workspace-git-stream.d.ts +19 -0
- package/dist/workspace-git-stream.d.ts.map +1 -0
- package/dist/workspace-git-stream.js +99 -0
- package/dist/workspace-git-stream.js.map +1 -0
- package/dist/workspace-git-stream.test.d.ts +2 -0
- package/dist/workspace-git-stream.test.d.ts.map +1 -0
- package/dist/workspace-git-stream.test.js +71 -0
- package/dist/workspace-git-stream.test.js.map +1 -0
- package/dist/workspace-manifest.d.ts +61 -0
- package/dist/workspace-manifest.d.ts.map +1 -0
- package/dist/workspace-manifest.js +257 -0
- package/dist/workspace-manifest.js.map +1 -0
- package/dist/workspace-manifest.test.d.ts +2 -0
- package/dist/workspace-manifest.test.d.ts.map +1 -0
- package/dist/workspace-manifest.test.js +160 -0
- package/dist/workspace-manifest.test.js.map +1 -0
- package/dist/workspace-restore-diagnostics.d.ts +41 -0
- package/dist/workspace-restore-diagnostics.d.ts.map +1 -0
- package/dist/workspace-restore-diagnostics.js +265 -0
- package/dist/workspace-restore-diagnostics.js.map +1 -0
- package/dist/workspace-restore-diagnostics.test.d.ts +2 -0
- package/dist/workspace-restore-diagnostics.test.d.ts.map +1 -0
- package/dist/workspace-restore-diagnostics.test.js +294 -0
- package/dist/workspace-restore-diagnostics.test.js.map +1 -0
- package/dist/workspace-restore-merge.d.ts +126 -0
- package/dist/workspace-restore-merge.d.ts.map +1 -0
- package/dist/workspace-restore-merge.js +768 -0
- package/dist/workspace-restore-merge.js.map +1 -0
- package/dist/workspace-restore-merge.test.d.ts +2 -0
- package/dist/workspace-restore-merge.test.d.ts.map +1 -0
- package/dist/workspace-restore-merge.test.js +805 -0
- package/dist/workspace-restore-merge.test.js.map +1 -0
- package/dist/workspace-restore-result.d.ts +6 -0
- package/dist/workspace-restore-result.d.ts.map +1 -0
- package/dist/workspace-restore-result.js +72 -0
- package/dist/workspace-restore-result.js.map +1 -0
- package/dist/workspace-restore-result.test.d.ts +2 -0
- package/dist/workspace-restore-result.test.d.ts.map +1 -0
- package/dist/workspace-restore-result.test.js +74 -0
- package/dist/workspace-restore-result.test.js.map +1 -0
- package/dist/workspace-restore-teardown.d.ts +29 -0
- package/dist/workspace-restore-teardown.d.ts.map +1 -0
- package/dist/workspace-restore-teardown.js +36 -0
- package/dist/workspace-restore-teardown.js.map +1 -0
- package/dist/workspace-restore-teardown.test.d.ts +2 -0
- package/dist/workspace-restore-teardown.test.d.ts.map +1 -0
- package/dist/workspace-restore-teardown.test.js +104 -0
- package/dist/workspace-restore-teardown.test.js.map +1 -0
- package/dist/workspace-restore-unchanged.test.d.ts +2 -0
- package/dist/workspace-restore-unchanged.test.d.ts.map +1 -0
- package/dist/workspace-restore-unchanged.test.js +143 -0
- package/dist/workspace-restore-unchanged.test.js.map +1 -0
- package/dist/workspace-seed-cache.d.ts +41 -0
- package/dist/workspace-seed-cache.d.ts.map +1 -0
- package/dist/workspace-seed-cache.js +354 -0
- package/dist/workspace-seed-cache.js.map +1 -0
- package/dist/workspace-seed-cache.test.d.ts +2 -0
- package/dist/workspace-seed-cache.test.d.ts.map +1 -0
- package/dist/workspace-seed-cache.test.js +522 -0
- package/dist/workspace-seed-cache.test.js.map +1 -0
- package/dist/workspace-seed-reuse.test.d.ts +2 -0
- package/dist/workspace-seed-reuse.test.d.ts.map +1 -0
- package/dist/workspace-seed-reuse.test.js +274 -0
- package/dist/workspace-seed-reuse.test.js.map +1 -0
- package/dist/workspace-snapshot-concurrency.test.d.ts +2 -0
- package/dist/workspace-snapshot-concurrency.test.d.ts.map +1 -0
- package/dist/workspace-snapshot-concurrency.test.js +165 -0
- package/dist/workspace-snapshot-concurrency.test.js.map +1 -0
- package/dist/workspace-snapshot-thread-limit.test.d.ts +2 -0
- package/dist/workspace-snapshot-thread-limit.test.d.ts.map +1 -0
- package/dist/workspace-snapshot-thread-limit.test.js +84 -0
- package/dist/workspace-snapshot-thread-limit.test.js.map +1 -0
- package/dist/workspace-snapshot-thread-worker.d.ts +2 -0
- package/dist/workspace-snapshot-thread-worker.d.ts.map +1 -0
- package/dist/workspace-snapshot-thread-worker.js +28 -0
- package/dist/workspace-snapshot-thread-worker.js.map +1 -0
- package/dist/workspace-snapshot-thread.d.ts +27 -0
- package/dist/workspace-snapshot-thread.d.ts.map +1 -0
- package/dist/workspace-snapshot-thread.js +77 -0
- package/dist/workspace-snapshot-thread.js.map +1 -0
- package/dist/workspace-snapshot-thread.test.d.ts +2 -0
- package/dist/workspace-snapshot-thread.test.d.ts.map +1 -0
- package/dist/workspace-snapshot-thread.test.js +140 -0
- package/dist/workspace-snapshot-thread.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/LICENSE +191 -0
- package/node_modules/@agentclientprotocol/sdk/README.md +77 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1637 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1729 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +5093 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.d.ts +277 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js +898 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js +666 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.d.ts +26 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js +96 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js +77 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js +232 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js +132 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.d.ts +9 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +229 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js +86 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js +117 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js +88 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.d.ts +35 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js +473 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js +1380 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.d.ts +604 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +1082 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js +917 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.d.ts +24 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js +71 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js +45 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.d.ts +563 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.js +106 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.d.ts +1261 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.js +4 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.d.ts +962 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.js +526 -0
- package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.d.ts +17 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js +457 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js +586 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +43 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +467 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js +592 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.d.ts +11 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js +60 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js +72 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +305 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +355 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +39 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +40 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +5438 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js +3 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +15955 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +2827 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.d.ts +31 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js +117 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js +93 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js +261 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js +536 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.d.ts +7 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js +136 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js +106 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js +1310 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.d.ts +82 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js +414 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js +1646 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.d.ts +6 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js +114 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js +126 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream-limits.d.ts +15 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream-limits.js +58 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream-limits.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.d.ts +38 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js +119 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js +195 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.d.ts +8 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js +51 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.d.ts +24 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js +163 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.d.ts +9 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js +74 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/until.d.ts +5 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/until.js +14 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/until.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +961 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +1451 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +1423 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +1084 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +1157 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +30 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +31 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +5672 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js +3 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +37653 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +2952 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.d.ts +14 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js +485 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.d.ts +54 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js +253 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js +836 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.d.ts +19 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js +78 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js +42 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/package.json +110 -0
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +7852 -0
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +8814 -0
- package/node_modules/@clack/core/LICENSE +9 -0
- package/node_modules/@clack/core/README.md +22 -0
- package/node_modules/@clack/core/dist/index.d.mts +505 -0
- package/node_modules/@clack/core/dist/index.mjs +1006 -0
- package/node_modules/@clack/core/package.json +64 -0
- package/node_modules/@clack/prompts/LICENSE +9 -0
- package/node_modules/@clack/prompts/README.md +396 -0
- package/node_modules/@clack/prompts/dist/index.d.mts +950 -0
- package/node_modules/@clack/prompts/dist/index.mjs +1448 -0
- package/node_modules/@clack/prompts/package.json +67 -0
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +1772 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +22 -0
- package/node_modules/@openclaw/fs-safe/README.md +383 -0
- package/node_modules/@openclaw/fs-safe/SECURITY.md +45 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +307 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +43 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +19 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +89 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +99 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +100 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +56 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.js +131 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +307 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +85 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +119 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +241 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +291 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +127 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +203 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +96 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +267 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +152 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +149 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.js +329 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.js +17 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +52 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +248 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/config.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-link.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-link.js +170 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-metadata.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +126 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +204 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +244 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.js +143 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/create.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/create.js +398 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +374 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +96 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +139 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +46 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +286 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +65 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +197 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +323 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +126 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication-types.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +264 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.js +33 -0
- package/node_modules/@openclaw/fs-safe/dist/exact-identity.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/exact-identity.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/exclusive-create.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/exclusive-create.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +78 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +192 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +298 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +75 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +349 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +284 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +286 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +198 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +356 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +67 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +202 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +116 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +345 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +132 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +359 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-write-lease.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.js +138 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +285 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +178 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.js +427 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/hardlink-fallback.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +149 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/index.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +105 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +150 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +368 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +65 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +44 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +210 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +49 -0
- package/node_modules/@openclaw/fs-safe/dist/json.js +305 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +30 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +224 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +323 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +59 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/native-guidance.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-guidance.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-move-fallback.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/native-noreplace.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-noreplace.js +55 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +111 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +76 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +220 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +290 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +202 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +62 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +62 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.js +421 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file-metadata.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file-metadata.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +516 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +285 -0
- package/node_modules/@openclaw/fs-safe/dist/native-stat-identity.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-stat-identity.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/native-status.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-status.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/native.js +311 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +48 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +110 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/output.js +145 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +137 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +181 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +394 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +192 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +203 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +380 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +52 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +131 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +419 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +205 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +118 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +212 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +74 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +301 -0
- package/node_modules/@openclaw/fs-safe/dist/pipe.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/pipe.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +352 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +370 -0
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +152 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +371 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.js +102 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +17 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +102 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +313 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +276 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +228 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +172 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +89 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +229 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +51 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +223 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +176 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +237 -0
- package/node_modules/@openclaw/fs-safe/dist/root-copy.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-copy.js +128 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +30 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +97 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +586 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +229 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +462 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +138 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +156 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +98 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-open-batch-sync.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-open-batch-sync.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +216 -0
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +119 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +1496 -0
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +258 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +252 -0
- package/node_modules/@openclaw/fs-safe/dist/root-native-creation-path.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/root-native-creation-path.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +85 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +188 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +134 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +452 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +58 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +291 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-native.js +390 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +468 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +48 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +236 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +65 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +302 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +89 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +115 -0
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +76 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +30 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +338 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +304 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +188 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +110 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +333 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +471 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +48 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +112 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +64 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +356 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +187 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +79 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +230 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +62 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +68 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +296 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +177 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +65 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +57 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/store.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +109 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +251 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +387 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +146 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +344 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +489 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.js +59 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +249 -0
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.js +250 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +365 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.js +236 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +167 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +385 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +57 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +62 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.js +667 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-appcontainer.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-appcontainer.js +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +90 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +140 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +433 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +117 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-test-hooks.js +51 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +15 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +285 -0
- package/node_modules/@openclaw/fs-safe/docs/archive.md +879 -0
- package/node_modules/@openclaw/fs-safe/docs/assets/readme-banner.jpg +0 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +635 -0
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +392 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +204 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +445 -0
- package/node_modules/@openclaw/fs-safe/docs/copy.md +357 -0
- package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
- package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +500 -0
- package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
- package/node_modules/@openclaw/fs-safe/docs/entry-publication.md +146 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +316 -0
- package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +404 -0
- package/node_modules/@openclaw/fs-safe/docs/filename.md +110 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +171 -0
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +112 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +58 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +216 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +251 -0
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +245 -0
- package/node_modules/@openclaw/fs-safe/docs/json.md +229 -0
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +149 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +207 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +48 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +209 -0
- package/node_modules/@openclaw/fs-safe/docs/native.md +657 -0
- package/node_modules/@openclaw/fs-safe/docs/output.md +195 -0
- package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +84 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +163 -0
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +204 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +222 -0
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +428 -0
- package/node_modules/@openclaw/fs-safe/docs/pipe.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/platform-capabilities.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +201 -0
- package/node_modules/@openclaw/fs-safe/docs/queue-link-free-design.md +237 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +174 -0
- package/node_modules/@openclaw/fs-safe/docs/reading.md +256 -0
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +195 -0
- package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +413 -0
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +322 -0
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +112 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +428 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +659 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +219 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +144 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +810 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +444 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +123 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +178 -0
- package/node_modules/@openclaw/fs-safe/docs/walk.md +314 -0
- package/node_modules/@openclaw/fs-safe/docs/watch.md +394 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +959 -0
- package/node_modules/@openclaw/fs-safe/package.json +219 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +32 -0
- package/node_modules/acpx/LICENSE +21 -0
- package/node_modules/acpx/README.md +142 -0
- package/node_modules/acpx/dist/agent-registry-CxpAF3nI.js +844 -0
- package/node_modules/acpx/dist/agent-registry-CxpAF3nI.js.map +1 -0
- package/node_modules/acpx/dist/agent-registry.d.ts +69 -0
- package/node_modules/acpx/dist/agent-registry.d.ts.map +1 -0
- package/node_modules/acpx/dist/agent-registry.js +1 -0
- package/node_modules/acpx/dist/cli-DeYZhjw6.js +187 -0
- package/node_modules/acpx/dist/cli-DeYZhjw6.js.map +1 -0
- package/node_modules/acpx/dist/cli.d.ts +9 -0
- package/node_modules/acpx/dist/cli.d.ts.map +1 -0
- package/node_modules/acpx/dist/cli.js +2573 -0
- package/node_modules/acpx/dist/cli.js.map +1 -0
- package/node_modules/acpx/dist/client-BqZW_W14.d.ts +217 -0
- package/node_modules/acpx/dist/client-BqZW_W14.d.ts.map +1 -0
- package/node_modules/acpx/dist/flows-Bxlp6H8u.js +2541 -0
- package/node_modules/acpx/dist/flows-Bxlp6H8u.js.map +1 -0
- package/node_modules/acpx/dist/flows.d.ts +344 -0
- package/node_modules/acpx/dist/flows.d.ts.map +1 -0
- package/node_modules/acpx/dist/flows.js +1 -0
- package/node_modules/acpx/dist/invocation-options-8lEkbe7g.js +349 -0
- package/node_modules/acpx/dist/invocation-options-8lEkbe7g.js.map +1 -0
- package/node_modules/acpx/dist/ipc-CQUNQ8QQ.js +5304 -0
- package/node_modules/acpx/dist/ipc-CQUNQ8QQ.js.map +1 -0
- package/node_modules/acpx/dist/output-C_T39Ap1.js +1055 -0
- package/node_modules/acpx/dist/output-C_T39Ap1.js.map +1 -0
- package/node_modules/acpx/dist/queue-owner-runtime-ucHvXJ33.js +8387 -0
- package/node_modules/acpx/dist/queue-owner-runtime-ucHvXJ33.js.map +1 -0
- package/node_modules/acpx/dist/runtime.d.ts +899 -0
- package/node_modules/acpx/dist/runtime.d.ts.map +1 -0
- package/node_modules/acpx/dist/runtime.js +2896 -0
- package/node_modules/acpx/dist/runtime.js.map +1 -0
- package/node_modules/acpx/dist/session-options-D9KL7-d8.d.ts +371 -0
- package/node_modules/acpx/dist/session-options-D9KL7-d8.d.ts.map +1 -0
- package/node_modules/acpx/dist/session-watch-D0YvKsnQ.js +75 -0
- package/node_modules/acpx/dist/session-watch-D0YvKsnQ.js.map +1 -0
- package/node_modules/acpx/dist/watch-CXy2A5VY.js +84 -0
- package/node_modules/acpx/dist/watch-CXy2A5VY.js.map +1 -0
- package/node_modules/acpx/package.json +131 -0
- package/node_modules/acpx/skills/acpx/SKILL.md +722 -0
- package/node_modules/b4a/LICENSE +201 -0
- package/node_modules/b4a/README.md +153 -0
- package/node_modules/b4a/browser.js +546 -0
- package/node_modules/b4a/index.d.ts +144 -0
- package/node_modules/b4a/index.js +193 -0
- package/node_modules/b4a/lib/ascii.js +31 -0
- package/node_modules/b4a/lib/base64.js +64 -0
- package/node_modules/b4a/lib/hex.js +51 -0
- package/node_modules/b4a/lib/latin1.js +31 -0
- package/node_modules/b4a/lib/utf16le.js +40 -0
- package/node_modules/b4a/lib/utf8.js +144 -0
- package/node_modules/b4a/package.json +54 -0
- package/node_modules/b4a/react-native.js +5 -0
- package/node_modules/b4a/runtime.d.ts +14 -0
- package/node_modules/bare-buffer/CMakeLists.txt +20 -0
- package/node_modules/bare-buffer/LICENSE +201 -0
- package/node_modules/bare-buffer/README.md +30 -0
- package/node_modules/bare-buffer/binding.c +2041 -0
- package/node_modules/bare-buffer/binding.js +1 -0
- package/node_modules/bare-buffer/global.d.ts +21 -0
- package/node_modules/bare-buffer/global.js +6 -0
- package/node_modules/bare-buffer/index.d.ts +769 -0
- package/node_modules/bare-buffer/index.js +1339 -0
- package/node_modules/bare-buffer/lib/ascii.js +36 -0
- package/node_modules/bare-buffer/lib/base64.js +25 -0
- package/node_modules/bare-buffer/lib/base64url.js +25 -0
- package/node_modules/bare-buffer/lib/checked.js +23 -0
- package/node_modules/bare-buffer/lib/constants.d.ts +7 -0
- package/node_modules/bare-buffer/lib/constants.js +3 -0
- package/node_modules/bare-buffer/lib/hex.js +20 -0
- package/node_modules/bare-buffer/lib/latin1.js +14 -0
- package/node_modules/bare-buffer/lib/utf16le.js +20 -0
- package/node_modules/bare-buffer/lib/utf8.js +18 -0
- package/node_modules/bare-buffer/package.json +59 -0
- package/node_modules/bare-buffer/prebuilds/android-arm/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/android-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/android-ia32/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/android-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/darwin-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/darwin-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/ios-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/ios-arm64-simulator/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/ios-x64-simulator/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/linux-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/linux-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/win32-arm64/bare-buffer.bare +0 -0
- package/node_modules/bare-buffer/prebuilds/win32-x64/bare-buffer.bare +0 -0
- package/node_modules/bare-events/LICENSE +201 -0
- package/node_modules/bare-events/README.md +29 -0
- package/node_modules/bare-events/global.d.ts +15 -0
- package/node_modules/bare-events/global.js +5 -0
- package/node_modules/bare-events/index.d.ts +246 -0
- package/node_modules/bare-events/index.js +423 -0
- package/node_modules/bare-events/lib/errors.js +23 -0
- package/node_modules/bare-events/package.json +63 -0
- package/node_modules/bare-events/web.d.ts +108 -0
- package/node_modules/bare-events/web.js +417 -0
- package/node_modules/bare-fs/CMakeLists.txt +13 -0
- package/node_modules/bare-fs/LICENSE +201 -0
- package/node_modules/bare-fs/README.md +33 -0
- package/node_modules/bare-fs/binding.c +3055 -0
- package/node_modules/bare-fs/binding.js +1 -0
- package/node_modules/bare-fs/index.d.ts +1504 -0
- package/node_modules/bare-fs/index.js +2902 -0
- package/node_modules/bare-fs/lib/constants.d.ts +50 -0
- package/node_modules/bare-fs/lib/constants.js +49 -0
- package/node_modules/bare-fs/lib/errors.d.ts +13 -0
- package/node_modules/bare-fs/lib/errors.js +55 -0
- package/node_modules/bare-fs/lib/queue.js +29 -0
- package/node_modules/bare-fs/package.json +74 -0
- package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/promises.d.ts +480 -0
- package/node_modules/bare-fs/promises.js +119 -0
- package/node_modules/bare-path/CMakeLists.txt +13 -0
- package/node_modules/bare-path/LICENSE +201 -0
- package/node_modules/bare-path/NOTICE +28 -0
- package/node_modules/bare-path/README.md +27 -0
- package/node_modules/bare-path/binding.c +127 -0
- package/node_modules/bare-path/binding.js +1 -0
- package/node_modules/bare-path/index.d.ts +91 -0
- package/node_modules/bare-path/index.js +9 -0
- package/node_modules/bare-path/lib/constants.js +11 -0
- package/node_modules/bare-path/lib/posix.js +263 -0
- package/node_modules/bare-path/lib/shared.js +81 -0
- package/node_modules/bare-path/lib/win32.js +564 -0
- package/node_modules/bare-path/package.json +47 -0
- package/node_modules/bare-path/prebuilds/android-arm/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/android-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/android-ia32/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/android-x64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/darwin-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/darwin-x64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/ios-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/ios-arm64-simulator/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/ios-x64-simulator/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/linux-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/linux-x64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/win32-arm64/bare-path.bare +0 -0
- package/node_modules/bare-path/prebuilds/win32-x64/bare-path.bare +0 -0
- package/node_modules/bare-stream/LICENSE +201 -0
- package/node_modules/bare-stream/README.md +354 -0
- package/node_modules/bare-stream/global.d.ts +31 -0
- package/node_modules/bare-stream/global.js +15 -0
- package/node_modules/bare-stream/index.d.ts +235 -0
- package/node_modules/bare-stream/index.js +493 -0
- package/node_modules/bare-stream/package.json +75 -0
- package/node_modules/bare-stream/promises.js +3 -0
- package/node_modules/bare-stream/web.d.ts +152 -0
- package/node_modules/bare-stream/web.js +607 -0
- package/node_modules/bare-url/CMakeLists.txt +36 -0
- package/node_modules/bare-url/LICENSE +201 -0
- package/node_modules/bare-url/README.md +37 -0
- package/node_modules/bare-url/binding.c +465 -0
- package/node_modules/bare-url/binding.js +1 -0
- package/node_modules/bare-url/global.d.ts +24 -0
- package/node_modules/bare-url/global.js +2 -0
- package/node_modules/bare-url/index.d.ts +115 -0
- package/node_modules/bare-url/index.js +734 -0
- package/node_modules/bare-url/lib/errors.d.ts +10 -0
- package/node_modules/bare-url/lib/errors.js +37 -0
- package/node_modules/bare-url/lib/url-search-params.d.ts +66 -0
- package/node_modules/bare-url/lib/url-search-params.js +291 -0
- package/node_modules/bare-url/package.json +55 -0
- package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1146 -0
- package/node_modules/commander/index.js +21 -0
- package/node_modules/commander/lib/argument.js +147 -0
- package/node_modules/commander/lib/command.js +2803 -0
- package/node_modules/commander/lib/error.js +36 -0
- package/node_modules/commander/lib/help.js +735 -0
- package/node_modules/commander/lib/option.js +377 -0
- package/node_modules/commander/lib/suggestSimilar.js +99 -0
- package/node_modules/commander/package-support.json +19 -0
- package/node_modules/commander/package.json +65 -0
- package/node_modules/commander/typings/index.d.ts +1116 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/esbuild/LICENSE.md +21 -0
- package/node_modules/esbuild/README.md +3 -0
- package/node_modules/esbuild/bin/esbuild +223 -0
- package/node_modules/esbuild/install.js +300 -0
- package/node_modules/esbuild/lib/main.d.ts +720 -0
- package/node_modules/esbuild/lib/main.js +2536 -0
- package/node_modules/esbuild/package.json +74 -0
- package/node_modules/events-universal/LICENSE +201 -0
- package/node_modules/events-universal/README.md +17 -0
- package/node_modules/events-universal/bare.js +1 -0
- package/node_modules/events-universal/default.js +1 -0
- package/node_modules/events-universal/index.js +1 -0
- package/node_modules/events-universal/package.json +39 -0
- package/node_modules/events-universal/react-native.js +1 -0
- package/node_modules/fast-fifo/LICENSE +21 -0
- package/node_modules/fast-fifo/README.md +78 -0
- package/node_modules/fast-fifo/fixed-size.js +39 -0
- package/node_modules/fast-fifo/index.js +48 -0
- package/node_modules/fast-fifo/package.json +28 -0
- package/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/index.js +111 -0
- package/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
- package/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
- package/node_modules/fast-string-truncated-width/license +21 -0
- package/node_modules/fast-string-truncated-width/package.json +35 -0
- package/node_modules/fast-string-truncated-width/readme.md +59 -0
- package/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-width/dist/index.js +14 -0
- package/node_modules/fast-string-width/license +21 -0
- package/node_modules/fast-string-width/package.json +34 -0
- package/node_modules/fast-string-width/readme.md +42 -0
- package/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/node_modules/fast-wrap-ansi/README.md +26 -0
- package/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/node_modules/fast-wrap-ansi/lib/main.js +218 -0
- package/node_modules/fast-wrap-ansi/package.json +51 -0
- package/node_modules/immediate/LICENSE.txt +20 -0
- package/node_modules/immediate/README.md +93 -0
- package/node_modules/immediate/dist/immediate.js +75 -0
- package/node_modules/immediate/dist/immediate.min.js +1 -0
- package/node_modules/immediate/lib/browser.js +69 -0
- package/node_modules/immediate/lib/index.js +73 -0
- package/node_modules/immediate/package.json +42 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jszip/.codeclimate.yml +16 -0
- package/node_modules/jszip/.editorconfig +8 -0
- package/node_modules/jszip/.eslintrc.js +43 -0
- package/node_modules/jszip/.github/FUNDING.yml +1 -0
- package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
- package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
- package/node_modules/jszip/.github/workflows/main.yml +55 -0
- package/node_modules/jszip/CHANGES.md +210 -0
- package/node_modules/jszip/LICENSE.markdown +651 -0
- package/node_modules/jszip/README.markdown +33 -0
- package/node_modules/jszip/dist/jszip.js +11586 -0
- package/node_modules/jszip/dist/jszip.min.js +13 -0
- package/node_modules/jszip/index.d.ts +344 -0
- package/node_modules/jszip/lib/base64.js +106 -0
- package/node_modules/jszip/lib/compressedObject.js +74 -0
- package/node_modules/jszip/lib/compressions.js +14 -0
- package/node_modules/jszip/lib/crc32.js +77 -0
- package/node_modules/jszip/lib/defaults.js +11 -0
- package/node_modules/jszip/lib/external.js +18 -0
- package/node_modules/jszip/lib/flate.js +85 -0
- package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
- package/node_modules/jszip/lib/generate/index.js +57 -0
- package/node_modules/jszip/lib/index.js +55 -0
- package/node_modules/jszip/lib/license_header.js +11 -0
- package/node_modules/jszip/lib/load.js +88 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
- package/node_modules/jszip/lib/nodejsUtils.js +57 -0
- package/node_modules/jszip/lib/object.js +384 -0
- package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
- package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
- package/node_modules/jszip/lib/reader/DataReader.js +116 -0
- package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
- package/node_modules/jszip/lib/reader/StringReader.js +38 -0
- package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
- package/node_modules/jszip/lib/reader/readerFor.js +28 -0
- package/node_modules/jszip/lib/signature.js +7 -0
- package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
- package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
- package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
- package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
- package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
- package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
- package/node_modules/jszip/lib/support.js +38 -0
- package/node_modules/jszip/lib/utf8.js +275 -0
- package/node_modules/jszip/lib/utils.js +510 -0
- package/node_modules/jszip/lib/zipEntries.js +261 -0
- package/node_modules/jszip/lib/zipEntry.js +293 -0
- package/node_modules/jszip/lib/zipObject.js +133 -0
- package/node_modules/jszip/package.json +67 -0
- package/node_modules/jszip/sponsors.md +21 -0
- package/node_modules/jszip/tsconfig.json +101 -0
- package/node_modules/jszip/vendor/FileSaver.js +247 -0
- package/node_modules/lie/README.md +62 -0
- package/node_modules/lie/dist/lie.js +350 -0
- package/node_modules/lie/dist/lie.min.js +1 -0
- package/node_modules/lie/dist/lie.polyfill.js +358 -0
- package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
- package/node_modules/lie/lib/browser.js +273 -0
- package/node_modules/lie/lib/index.js +298 -0
- package/node_modules/lie/license.md +7 -0
- package/node_modules/lie/lie.d.ts +244 -0
- package/node_modules/lie/package.json +69 -0
- package/node_modules/lie/polyfill.js +4 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +191 -0
- package/node_modules/pako/dist/pako.js +6818 -0
- package/node_modules/pako/dist/pako.min.js +1 -0
- package/node_modules/pako/dist/pako_deflate.js +3997 -0
- package/node_modules/pako/dist/pako_deflate.min.js +1 -0
- package/node_modules/pako/dist/pako_inflate.js +3300 -0
- package/node_modules/pako/dist/pako_inflate.min.js +1 -0
- package/node_modules/pako/index.js +14 -0
- package/node_modules/pako/lib/deflate.js +400 -0
- package/node_modules/pako/lib/inflate.js +423 -0
- package/node_modules/pako/lib/utils/common.js +105 -0
- package/node_modules/pako/lib/utils/strings.js +187 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +1874 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +345 -0
- package/node_modules/pako/lib/zlib/inflate.js +1556 -0
- package/node_modules/pako/lib/zlib/inftrees.js +343 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1222 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +44 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/readable-stream/.travis.yml +34 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +58 -0
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +52 -0
- package/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/readable-stream/readable-browser.js +7 -0
- package/node_modules/readable-stream/readable.js +19 -0
- package/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/readable-stream/writable.js +8 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/setimmediate/LICENSE.txt +20 -0
- package/node_modules/setimmediate/package.json +30 -0
- package/node_modules/setimmediate/setImmediate.js +186 -0
- package/node_modules/sisteransi/dist/index.d.ts +33 -0
- package/node_modules/sisteransi/dist/index.js +57 -0
- package/node_modules/sisteransi/license +21 -0
- package/node_modules/sisteransi/package.json +45 -0
- package/node_modules/sisteransi/readme.md +126 -0
- package/node_modules/skillflag/LICENSE +21 -0
- package/node_modules/skillflag/README.md +44 -0
- package/node_modules/skillflag/dist/bin/skill-install.d.ts +3 -0
- package/node_modules/skillflag/dist/bin/skill-install.d.ts.map +1 -0
- package/node_modules/skillflag/dist/bin/skill-install.js +6 -0
- package/node_modules/skillflag/dist/bin/skill-install.js.map +1 -0
- package/node_modules/skillflag/dist/bin/skillflag.d.ts +3 -0
- package/node_modules/skillflag/dist/bin/skillflag.d.ts.map +1 -0
- package/node_modules/skillflag/dist/bin/skillflag.js +25 -0
- package/node_modules/skillflag/dist/bin/skillflag.js.map +1 -0
- package/node_modules/skillflag/dist/core/digest.d.ts +2 -0
- package/node_modules/skillflag/dist/core/digest.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/digest.js +15 -0
- package/node_modules/skillflag/dist/core/digest.js.map +1 -0
- package/node_modules/skillflag/dist/core/errors.d.ts +6 -0
- package/node_modules/skillflag/dist/core/errors.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/errors.js +13 -0
- package/node_modules/skillflag/dist/core/errors.js.map +1 -0
- package/node_modules/skillflag/dist/core/export.d.ts +2 -0
- package/node_modules/skillflag/dist/core/export.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/export.js +28 -0
- package/node_modules/skillflag/dist/core/export.js.map +1 -0
- package/node_modules/skillflag/dist/core/list.d.ts +21 -0
- package/node_modules/skillflag/dist/core/list.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/list.js +71 -0
- package/node_modules/skillflag/dist/core/list.js.map +1 -0
- package/node_modules/skillflag/dist/core/paths.d.ts +15 -0
- package/node_modules/skillflag/dist/core/paths.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/paths.js +149 -0
- package/node_modules/skillflag/dist/core/paths.js.map +1 -0
- package/node_modules/skillflag/dist/core/show.d.ts +2 -0
- package/node_modules/skillflag/dist/core/show.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/show.js +8 -0
- package/node_modules/skillflag/dist/core/show.js.map +1 -0
- package/node_modules/skillflag/dist/core/skillflag.d.ts +3 -0
- package/node_modules/skillflag/dist/core/skillflag.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/skillflag.js +2 -0
- package/node_modules/skillflag/dist/core/skillflag.js.map +1 -0
- package/node_modules/skillflag/dist/core/tar.d.ts +16 -0
- package/node_modules/skillflag/dist/core/tar.d.ts.map +1 -0
- package/node_modules/skillflag/dist/core/tar.js +140 -0
- package/node_modules/skillflag/dist/core/tar.js.map +1 -0
- package/node_modules/skillflag/dist/index.d.ts +5 -0
- package/node_modules/skillflag/dist/index.d.ts.map +1 -0
- package/node_modules/skillflag/dist/index.js +3 -0
- package/node_modules/skillflag/dist/index.js.map +1 -0
- package/node_modules/skillflag/dist/install/cli.d.ts +57 -0
- package/node_modules/skillflag/dist/install/cli.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/cli.js +653 -0
- package/node_modules/skillflag/dist/install/cli.js.map +1 -0
- package/node_modules/skillflag/dist/install/copy.d.ts +2 -0
- package/node_modules/skillflag/dist/install/copy.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/copy.js +19 -0
- package/node_modules/skillflag/dist/install/copy.js.map +1 -0
- package/node_modules/skillflag/dist/install/errors.d.ts +6 -0
- package/node_modules/skillflag/dist/install/errors.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/errors.js +13 -0
- package/node_modules/skillflag/dist/install/errors.js.map +1 -0
- package/node_modules/skillflag/dist/install/extract.d.ts +3 -0
- package/node_modules/skillflag/dist/install/extract.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/extract.js +76 -0
- package/node_modules/skillflag/dist/install/extract.js.map +1 -0
- package/node_modules/skillflag/dist/install/install.d.ts +21 -0
- package/node_modules/skillflag/dist/install/install.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/install.js +35 -0
- package/node_modules/skillflag/dist/install/install.js.map +1 -0
- package/node_modules/skillflag/dist/install/resolve.d.ts +12 -0
- package/node_modules/skillflag/dist/install/resolve.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/resolve.js +119 -0
- package/node_modules/skillflag/dist/install/resolve.js.map +1 -0
- package/node_modules/skillflag/dist/install/validate.d.ts +7 -0
- package/node_modules/skillflag/dist/install/validate.d.ts.map +1 -0
- package/node_modules/skillflag/dist/install/validate.js +28 -0
- package/node_modules/skillflag/dist/install/validate.js.map +1 -0
- package/node_modules/skillflag/dist/shared/frontmatter.d.ts +2 -0
- package/node_modules/skillflag/dist/shared/frontmatter.d.ts.map +1 -0
- package/node_modules/skillflag/dist/shared/frontmatter.js +28 -0
- package/node_modules/skillflag/dist/shared/frontmatter.js.map +1 -0
- package/node_modules/skillflag/dist/skillflag.d.ts +29 -0
- package/node_modules/skillflag/dist/skillflag.d.ts.map +1 -0
- package/node_modules/skillflag/dist/skillflag.js +230 -0
- package/node_modules/skillflag/dist/skillflag.js.map +1 -0
- package/node_modules/skillflag/dist/utils/collections.d.ts +3 -0
- package/node_modules/skillflag/dist/utils/collections.d.ts.map +1 -0
- package/node_modules/skillflag/dist/utils/collections.js +18 -0
- package/node_modules/skillflag/dist/utils/collections.js.map +1 -0
- package/node_modules/skillflag/package.json +78 -0
- package/node_modules/skillflag/skills/skillflag/SKILL.md +144 -0
- package/node_modules/streamx/LICENSE +21 -0
- package/node_modules/streamx/README.md +550 -0
- package/node_modules/streamx/index.d.ts +198 -0
- package/node_modules/streamx/index.js +1314 -0
- package/node_modules/streamx/lib/errors.d.ts +13 -0
- package/node_modules/streamx/lib/errors.js +47 -0
- package/node_modules/streamx/package.json +51 -0
- package/node_modules/streamx/runtime.d.ts +55 -0
- package/node_modules/string_decoder/.travis.yml +50 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +31 -0
- package/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-stream/README.md +183 -0
- package/node_modules/tar-stream/constants.js +14 -0
- package/node_modules/tar-stream/extract.js +439 -0
- package/node_modules/tar-stream/headers.js +322 -0
- package/node_modules/tar-stream/index.d.ts +60 -0
- package/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-stream/pack.js +287 -0
- package/node_modules/tar-stream/package.json +50 -0
- package/node_modules/teex/LICENSE +21 -0
- package/node_modules/teex/README.md +31 -0
- package/node_modules/teex/example.js +16 -0
- package/node_modules/teex/index.js +52 -0
- package/node_modules/teex/package.json +26 -0
- package/node_modules/teex/test.js +68 -0
- package/node_modules/text-decoder/LICENSE +201 -0
- package/node_modules/text-decoder/README.md +36 -0
- package/node_modules/text-decoder/index.js +64 -0
- package/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
- package/node_modules/text-decoder/lib/utf8-decoder.js +185 -0
- package/node_modules/text-decoder/package.json +39 -0
- package/node_modules/tsx/LICENSE +21 -0
- package/node_modules/tsx/README.md +32 -0
- package/node_modules/tsx/dist/cjs/api/index.cjs +2 -0
- package/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
- package/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
- package/node_modules/tsx/dist/cjs/api/index.mjs +2 -0
- package/node_modules/tsx/dist/cjs/index.cjs +1 -0
- package/node_modules/tsx/dist/cli.mjs +55 -0
- package/node_modules/tsx/dist/client-XItNFmsq.cjs +1 -0
- package/node_modules/tsx/dist/esm/api/index.cjs +2 -0
- package/node_modules/tsx/dist/esm/api/index.d.cts +37 -0
- package/node_modules/tsx/dist/esm/api/index.d.mts +37 -0
- package/node_modules/tsx/dist/esm/api/index.mjs +2 -0
- package/node_modules/tsx/dist/esm/index.mjs +2 -0
- package/node_modules/tsx/dist/index-Bqjv9TxC.mjs +1 -0
- package/node_modules/tsx/dist/index-DE3OBZuV.mjs +14 -0
- package/node_modules/tsx/dist/lexer-CGfpMDSb.cjs +3 -0
- package/node_modules/tsx/dist/lexer-CanA6ArK.mjs +3 -0
- package/node_modules/tsx/dist/loader.mjs +2 -0
- package/node_modules/tsx/dist/package-Dj0mHsMt.mjs +1 -0
- package/node_modules/tsx/dist/patch-repl.cjs +1 -0
- package/node_modules/tsx/dist/preflight.cjs +1 -0
- package/node_modules/tsx/dist/register-B1c7OH6V.cjs +23 -0
- package/node_modules/tsx/dist/register-nyXW-TH3.mjs +2 -0
- package/node_modules/tsx/dist/repl.mjs +4 -0
- package/node_modules/tsx/dist/require-CBjy4Foe.mjs +10 -0
- package/node_modules/tsx/dist/require-CVaYn9z3.cjs +1 -0
- package/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
- package/node_modules/tsx/dist/temporary-directory-Du7LpLp9.mjs +1 -0
- package/node_modules/tsx/package.json +70 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +218 -0
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +52 -0
- package/node_modules/zod/index.d.cts +3 -0
- package/node_modules/zod/index.d.ts +3 -0
- package/node_modules/zod/index.js +7 -0
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +147 -0
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +340 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +586 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +128 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +206 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +431 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +114 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +922 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +33 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +78 -0
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +97 -0
- package/node_modules/zod/src/v4/classic/external.ts +57 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +20 -0
- package/node_modules/zod/src/v4/classic/parse.ts +88 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +291 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +402 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +89 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +604 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +316 -0
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +455 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +305 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +917 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +1108 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +391 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +958 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +334 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +262 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +349 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +401 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +1006 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +366 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +497 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +144 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +184 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +885 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +707 -0
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +693 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +153 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1440 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +124 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +812 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +511 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +310 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1875 -0
- package/node_modules/zod/src/v4/core/checks.ts +1266 -0
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +230 -0
- package/node_modules/zod/src/v4/core/doc.ts +52 -0
- package/node_modules/zod/src/v4/core/errors.ts +543 -0
- package/node_modules/zod/src/v4/core/index.ts +19 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +309 -0
- package/node_modules/zod/src/v4/core/regexes.ts +217 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +5226 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
- package/node_modules/zod/src/v4/core/util.ts +1293 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +120 -0
- package/node_modules/zod/src/v4/locales/az.ts +116 -0
- package/node_modules/zod/src/v4/locales/be.ts +188 -0
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +121 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +123 -0
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +121 -0
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +136 -0
- package/node_modules/zod/src/v4/locales/eo.ts +123 -0
- package/node_modules/zod/src/v4/locales/es.ts +145 -0
- package/node_modules/zod/src/v4/locales/fa.ts +131 -0
- package/node_modules/zod/src/v4/locales/fi.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr.ts +139 -0
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +253 -0
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +122 -0
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +120 -0
- package/node_modules/zod/src/v4/locales/index.ts +63 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +121 -0
- package/node_modules/zod/src/v4/locales/ja.ts +119 -0
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +126 -0
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +123 -0
- package/node_modules/zod/src/v4/locales/ms.ts +120 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +121 -0
- package/node_modules/zod/src/v4/locales/ota.ts +122 -0
- package/node_modules/zod/src/v4/locales/pl.ts +123 -0
- package/node_modules/zod/src/v4/locales/ps.ts +131 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +159 -0
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +188 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +123 -0
- package/node_modules/zod/src/v4/locales/sv.ts +124 -0
- package/node_modules/zod/src/v4/locales/ta.ts +123 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +124 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +116 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +124 -0
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +122 -0
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
- package/node_modules/zod/src/v4/mini/checks.ts +33 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +52 -0
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +16 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +190 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +158 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +30 -0
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +41 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +1146 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +109 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +292 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +341 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +396 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +167 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +143 -0
- package/node_modules/zod/v3/errors.cjs +36 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +41 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +156 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +52 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +21 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3798 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3697 -0
- package/node_modules/zod/v4/classic/checks.cjs +53 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +66 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +80 -0
- package/node_modules/zod/v4/classic/compat.d.cts +48 -0
- package/node_modules/zod/v4/classic/compat.d.ts +48 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +102 -0
- package/node_modules/zod/v4/classic/errors.d.cts +29 -0
- package/node_modules/zod/v4/classic/errors.d.ts +29 -0
- package/node_modules/zod/v4/classic/errors.js +57 -0
- package/node_modules/zod/v4/classic/external.cjs +97 -0
- package/node_modules/zod/v4/classic/external.d.cts +19 -0
- package/node_modules/zod/v4/classic/external.d.ts +19 -0
- package/node_modules/zod/v4/classic/external.js +17 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +52 -0
- package/node_modules/zod/v4/classic/index.d.cts +3 -0
- package/node_modules/zod/v4/classic/index.d.ts +3 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +68 -0
- package/node_modules/zod/v4/classic/iso.d.cts +7 -0
- package/node_modules/zod/v4/classic/iso.d.ts +7 -0
- package/node_modules/zod/v4/classic/iso.js +15 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +63 -0
- package/node_modules/zod/v4/classic/parse.d.cts +44 -0
- package/node_modules/zod/v4/classic/parse.d.ts +44 -0
- package/node_modules/zod/v4/classic/parse.js +16 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
- package/node_modules/zod/v4/classic/schemas.js +1535 -0
- package/node_modules/zod/v4/core/api.cjs +1269 -0
- package/node_modules/zod/v4/core/api.d.cts +335 -0
- package/node_modules/zod/v4/core/api.d.ts +335 -0
- package/node_modules/zod/v4/core/api.js +1107 -0
- package/node_modules/zod/v4/core/checks.cjs +561 -0
- package/node_modules/zod/v4/core/checks.d.cts +294 -0
- package/node_modules/zod/v4/core/checks.d.ts +294 -0
- package/node_modules/zod/v4/core/checks.js +516 -0
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +167 -0
- package/node_modules/zod/v4/core/core.d.cts +82 -0
- package/node_modules/zod/v4/core/core.d.ts +82 -0
- package/node_modules/zod/v4/core/core.js +141 -0
- package/node_modules/zod/v4/core/doc.cjs +61 -0
- package/node_modules/zod/v4/core/doc.d.cts +16 -0
- package/node_modules/zod/v4/core/doc.d.ts +16 -0
- package/node_modules/zod/v4/core/doc.js +38 -0
- package/node_modules/zod/v4/core/errors.cjs +317 -0
- package/node_modules/zod/v4/core/errors.d.cts +225 -0
- package/node_modules/zod/v4/core/errors.d.ts +225 -0
- package/node_modules/zod/v4/core/errors.js +267 -0
- package/node_modules/zod/v4/core/index.cjs +70 -0
- package/node_modules/zod/v4/core/index.d.cts +19 -0
- package/node_modules/zod/v4/core/index.d.ts +19 -0
- package/node_modules/zod/v4/core/index.js +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +21 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +233 -0
- package/node_modules/zod/v4/core/parse.d.cts +52 -0
- package/node_modules/zod/v4/core/parse.d.ts +52 -0
- package/node_modules/zod/v4/core/parse.js +175 -0
- package/node_modules/zod/v4/core/regexes.cjs +209 -0
- package/node_modules/zod/v4/core/regexes.d.cts +90 -0
- package/node_modules/zod/v4/core/regexes.d.ts +90 -0
- package/node_modules/zod/v4/core/regexes.js +156 -0
- package/node_modules/zod/v4/core/registries.cjs +75 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2699 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1275 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1275 -0
- package/node_modules/zod/v4/core/schemas.js +2636 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.js +651 -0
- package/node_modules/zod/v4/core/util.cjs +964 -0
- package/node_modules/zod/v4/core/util.d.cts +280 -0
- package/node_modules/zod/v4/core/util.d.ts +280 -0
- package/node_modules/zod/v4/core/util.js +873 -0
- package/node_modules/zod/v4/core/versions.cjs +27 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +51 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +4 -0
- package/node_modules/zod/v4/locales/ar.cjs +138 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +111 -0
- package/node_modules/zod/v4/locales/az.cjs +137 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +110 -0
- package/node_modules/zod/v4/locales/be.cjs +195 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +168 -0
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +139 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +112 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +143 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +116 -0
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +140 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +113 -0
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +152 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +125 -0
- package/node_modules/zod/v4/locales/eo.cjs +141 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +114 -0
- package/node_modules/zod/v4/locales/es.cjs +163 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +136 -0
- package/node_modules/zod/v4/locales/fa.cjs +146 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +119 -0
- package/node_modules/zod/v4/locales/fi.cjs +144 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +117 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +112 -0
- package/node_modules/zod/v4/locales/fr.cjs +156 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +129 -0
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +248 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +221 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +140 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +113 -0
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +138 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +111 -0
- package/node_modules/zod/v4/locales/index.cjs +152 -0
- package/node_modules/zod/v4/locales/index.d.cts +63 -0
- package/node_modules/zod/v4/locales/index.d.ts +63 -0
- package/node_modules/zod/v4/locales/index.js +63 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +140 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +113 -0
- package/node_modules/zod/v4/locales/ja.cjs +139 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +112 -0
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +143 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +116 -0
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +141 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +114 -0
- package/node_modules/zod/v4/locales/ms.cjs +139 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +112 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +142 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +115 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +140 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +113 -0
- package/node_modules/zod/v4/locales/ota.cjs +141 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +114 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +141 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +114 -0
- package/node_modules/zod/v4/locales/ps.cjs +146 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +119 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +169 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +142 -0
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +195 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +168 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +141 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +114 -0
- package/node_modules/zod/v4/locales/sv.cjs +142 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +115 -0
- package/node_modules/zod/v4/locales/ta.cjs +142 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +115 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +142 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +115 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +137 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +110 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +142 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +115 -0
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +140 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +113 -0
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +114 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +112 -0
- package/node_modules/zod/v4/mini/checks.cjs +54 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +71 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +95 -0
- package/node_modules/zod/v4/mini/external.d.cts +16 -0
- package/node_modules/zod/v4/mini/external.d.ts +16 -0
- package/node_modules/zod/v4/mini/external.js +16 -0
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +51 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +83 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +37 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
- package/node_modules/zod/v4/mini/schemas.js +1002 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +51 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +73 -4
|
@@ -0,0 +1,2573 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { c as __exportAll, n as getTextErrorRemediationHints, o as toTimerMilliseconds, t as createOutputFormatter } from "./output-C_T39Ap1.js";
|
|
3
|
+
import { C as renderArgvIdentity, i as DEFAULT_AGENT_NAME, l as normalizeAgentName$1, s as listBuiltInAgents } from "./agent-registry-CxpAF3nI.js";
|
|
4
|
+
import { A as findSession, At as EXIT_CODES, C as textPrompt, Ct as exitCodeForOutputErrorCode, Et as normalizeOutputError, F as normalizeName, G as normalizeAgentSessionId, H as canonicalAgentCommand, It as AcpxOperationalError, Mt as OUTPUT_FORMATS, N as listSessions, O as absolutePath, Rt as AgentSpawnError, St as isProcessAlive, U as serializeSessionRecordForDisk, V as parseSessionRecord, _t as sessionEventLockPath, b as mergePromptSourceWithText, c as probeQueueOwnerHealth, dt as boundedEventMaxSegments, ft as defaultSessionEventLog, gt as sessionEventActivePath, j as findSessionByDirectoryWalk, k as findGitRepositoryRoot, v as PromptInputValidationError, x as parsePromptSource, xt as _usingCtx, yt as writePrivateFile, z as writeSessionRecord } from "./ipc-CQUNQ8QQ.js";
|
|
5
|
+
import { ct as listSessionEvents, d as flushPerfMetricsCapture, dt as TimeoutError, f as installPerfMetricsCapture, i as runOnce, lt as isLegacyZedCodexAcpInvocation, n as runSessionQueueOwner, ot as acquireSessionImport, s as DISCARD_OUTPUT_FORMATTER, st as acquireSessionScope, tt as getAcpxVersion, u as buildQueueOwnerArgOverride, ut as InterruptedError } from "./queue-owner-runtime-ucHvXJ33.js";
|
|
6
|
+
import { C as resolvePermissionMode, E as resolveSessionsListFlags, S as resolveOutputPolicy, T as resolveSessionNameFromFlags, _ as parseSessionName, a as addGlobalFlags, b as resolveAgentInvocation, c as addSessionOption, d as parseDaysOlderThan, f as parseHistoryLimit, g as parsePruneBeforeDate, h as parseOutputFormat$1, i as addExecConfigOption, m as parseNonEmptyValue, n as sessionConnectionOptions, o as addPromptInputOption, p as parseMaxTurns, r as sessionOptionsFromGlobalFlags, s as addSessionNameOption, t as resolvePermissionPolicyFromFlags, u as parseAllowedTools, v as parseTimeoutSeconds, w as resolvePromptFlags, x as resolveGlobalFlags, y as parseTtlSeconds } from "./invocation-options-8lEkbe7g.js";
|
|
7
|
+
import { realpathSync } from "node:fs";
|
|
8
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import { Command, CommanderError, InvalidArgumentError, Option } from "commander";
|
|
11
|
+
import fs$1 from "node:fs/promises";
|
|
12
|
+
import os from "node:os";
|
|
13
|
+
import { ZodError, z } from "zod";
|
|
14
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
15
|
+
import { text } from "node:stream/consumers";
|
|
16
|
+
import { performance } from "node:perf_hooks";
|
|
17
|
+
// src/cli-public.ts
|
|
18
|
+
function configurePublicCli(options) {
|
|
19
|
+
const builtInAgents = options.listBuiltInAgents(options.config.agents);
|
|
20
|
+
for (const agentName of builtInAgents) options.registerAgentCommand(options.program, agentName, options.config);
|
|
21
|
+
options.registerDefaultCommands(options.program, options.config);
|
|
22
|
+
const scan = options.detectAgentToken(options.argv);
|
|
23
|
+
if (!scan.hasAgentOverride && scan.token && !options.topLevelVerbs.has(scan.token) && !builtInAgents.includes(scan.token)) options.registerAgentCommand(options.program, scan.token, options.config);
|
|
24
|
+
options.program.helpCommand(true);
|
|
25
|
+
options.program.argument("[prompt...]", "Prompt text").action(async function(promptParts) {
|
|
26
|
+
if (promptParts.length === 0 && process.stdin.isTTY) {
|
|
27
|
+
if (options.requestedJsonStrict) throw new InvalidArgumentError("Prompt is required (pass as argument, --file, or pipe via stdin)");
|
|
28
|
+
this.outputHelp();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
await options.handlePromptAction(this, promptParts);
|
|
32
|
+
});
|
|
33
|
+
options.program.addHelpText("after", `
|
|
34
|
+
Examples:
|
|
35
|
+
acpx pi "review recent changes"
|
|
36
|
+
acpx openclaw exec "summarize active session state"
|
|
37
|
+
acpx codex sessions new
|
|
38
|
+
acpx codex "fix the tests"
|
|
39
|
+
acpx codex prompt "fix the tests"
|
|
40
|
+
acpx codex --no-wait "queue follow-up task"
|
|
41
|
+
acpx codex exec "what does this repo do"
|
|
42
|
+
acpx codex cancel
|
|
43
|
+
acpx codex set-mode plan
|
|
44
|
+
acpx codex set model 'gpt-5.2[high]'
|
|
45
|
+
acpx codex -s backend "fix the API"
|
|
46
|
+
acpx codex sessions
|
|
47
|
+
acpx codex sessions new --name backend
|
|
48
|
+
acpx codex sessions ensure --name backend
|
|
49
|
+
acpx codex sessions close backend
|
|
50
|
+
acpx codex status
|
|
51
|
+
acpx config show
|
|
52
|
+
acpx config init
|
|
53
|
+
acpx --ttl 30 codex "investigate flaky tests"
|
|
54
|
+
acpx claude "refactor auth"
|
|
55
|
+
acpx --agent ./my-custom-server "do something"`);
|
|
56
|
+
}
|
|
57
|
+
// src/session/export.ts
|
|
58
|
+
var SessionExportError = class extends AcpxOperationalError {
|
|
59
|
+
code;
|
|
60
|
+
exitCode = 2;
|
|
61
|
+
constructor(message, code) {
|
|
62
|
+
super(message, {
|
|
63
|
+
outputCode: "USAGE",
|
|
64
|
+
detailCode: code,
|
|
65
|
+
origin: "cli"
|
|
66
|
+
});
|
|
67
|
+
this.code = code;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
function sessionLookupError(message, code) {
|
|
71
|
+
return new SessionExportError(message, code);
|
|
72
|
+
}
|
|
73
|
+
async function loadSessionRecord(sessionLookup) {
|
|
74
|
+
const cwd = path.resolve(sessionLookup.cwd ?? process.cwd());
|
|
75
|
+
const name = normalizeName(sessionLookup.name);
|
|
76
|
+
const active = await findSession({
|
|
77
|
+
agentCommand: sessionLookup.agentCommand,
|
|
78
|
+
cwd,
|
|
79
|
+
name
|
|
80
|
+
});
|
|
81
|
+
if (active) return active;
|
|
82
|
+
return (await listSessions()).find((session) => {
|
|
83
|
+
if (session.agentCommand !== sessionLookup.agentCommand || session.cwd !== cwd) return false;
|
|
84
|
+
if (name == null) return session.name == null;
|
|
85
|
+
return session.name === name;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function parseEventLockPayload(raw) {
|
|
89
|
+
try {
|
|
90
|
+
const parsed = JSON.parse(raw);
|
|
91
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
92
|
+
const record = parsed;
|
|
93
|
+
return { pid: typeof record.pid === "number" ? record.pid : void 0 };
|
|
94
|
+
} catch {
|
|
95
|
+
return {};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async function hasLiveEventLock(recordId) {
|
|
99
|
+
try {
|
|
100
|
+
const payload = await fs$1.readFile(sessionEventLockPath(recordId), "utf8");
|
|
101
|
+
return isProcessAlive(parseEventLockPayload(payload).pid);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
if (error.code === "ENOENT") return false;
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async function isSessionActive(record) {
|
|
108
|
+
if (record.closed) return false;
|
|
109
|
+
return isProcessAlive(record.pid) || await hasLiveEventLock(record.acpxRecordId);
|
|
110
|
+
}
|
|
111
|
+
function cwdRelativeToHome(cwd, home) {
|
|
112
|
+
const relative = path.relative(home, cwd);
|
|
113
|
+
if (relative.length === 0) return ".";
|
|
114
|
+
if (relative.length > 0 && !relative.startsWith("..") && !path.isAbsolute(relative)) return relative;
|
|
115
|
+
return cwd;
|
|
116
|
+
}
|
|
117
|
+
function serializeSessionRecordForArchive(record, cwdRelative) {
|
|
118
|
+
const state = serializeSessionRecordForDisk(record);
|
|
119
|
+
state.cwd = cwdRelative;
|
|
120
|
+
if (state.event_log && typeof state.event_log === "object" && !Array.isArray(state.event_log)) state.event_log = {
|
|
121
|
+
...state.event_log,
|
|
122
|
+
active_path: ".stream.ndjson"
|
|
123
|
+
};
|
|
124
|
+
return state;
|
|
125
|
+
}
|
|
126
|
+
async function exportSession(sessionLookup, outputPath) {
|
|
127
|
+
const record = await loadSessionRecord(sessionLookup);
|
|
128
|
+
if (!record) throw sessionLookupError("session not found", "not-found");
|
|
129
|
+
if (await isSessionActive(record)) throw sessionLookupError("session is currently locked by a running queue owner; close it first with `acpx sessions close`", "session-locked");
|
|
130
|
+
const home = os.homedir();
|
|
131
|
+
const cwdRelative = cwdRelativeToHome(record.cwd, home);
|
|
132
|
+
const exported = {
|
|
133
|
+
format_version: 1,
|
|
134
|
+
exported_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
135
|
+
exported_by: "acpx",
|
|
136
|
+
session: {
|
|
137
|
+
record_id: record.acpxRecordId,
|
|
138
|
+
name: record.name ?? null,
|
|
139
|
+
agent: record.agentCommand,
|
|
140
|
+
agent_name: normalizeAgentName(sessionLookup.agentName),
|
|
141
|
+
cwd_relative: cwdRelative,
|
|
142
|
+
cwd_original: cwdRelative,
|
|
143
|
+
created_at: record.createdAt,
|
|
144
|
+
updated_at: record.lastUsedAt,
|
|
145
|
+
state: serializeSessionRecordForArchive(record, cwdRelative)
|
|
146
|
+
},
|
|
147
|
+
history: await listSessionEvents(record.acpxRecordId, record.eventLog.max_segments)
|
|
148
|
+
};
|
|
149
|
+
const target = await resolveExportTarget(outputPath);
|
|
150
|
+
await writePrivateFile(target, `${JSON.stringify(exported, null, 2)}\n`, { privateDirectory: false });
|
|
151
|
+
}
|
|
152
|
+
async function resolveExportTarget(filePath) {
|
|
153
|
+
for (let hops = 0; hops < 40; hops += 1) {
|
|
154
|
+
const stat = await fs$1.lstat(filePath).catch((error) => {
|
|
155
|
+
if (error.code === "ENOENT") return;
|
|
156
|
+
throw error;
|
|
157
|
+
});
|
|
158
|
+
if (!stat || stat.isFile()) return filePath;
|
|
159
|
+
if (!stat.isSymbolicLink()) throw new Error("Session export output must be a regular file");
|
|
160
|
+
const target = await fs$1.readlink(filePath);
|
|
161
|
+
filePath = path.isAbsolute(target) ? target : `${path.dirname(filePath)}${path.sep}${target}`;
|
|
162
|
+
}
|
|
163
|
+
throw new Error("Too many symbolic links in session export output");
|
|
164
|
+
}
|
|
165
|
+
function normalizeAgentName(agentName) {
|
|
166
|
+
const normalized = agentName?.trim().toLowerCase();
|
|
167
|
+
if (!normalized || normalized.length === 0) return;
|
|
168
|
+
return normalized === "factory-droid" || normalized === "factorydroid" ? "droid" : normalized;
|
|
169
|
+
}
|
|
170
|
+
// src/session/import.ts
|
|
171
|
+
const SUPPORTED_FORMAT_VERSION = 1;
|
|
172
|
+
const exportedSessionSchema = z.object({
|
|
173
|
+
format_version: z.literal(SUPPORTED_FORMAT_VERSION),
|
|
174
|
+
exported_at: z.string(),
|
|
175
|
+
exported_by: z.string(),
|
|
176
|
+
session: z.object({
|
|
177
|
+
record_id: z.string(),
|
|
178
|
+
name: z.string().nullable(),
|
|
179
|
+
agent: z.string(),
|
|
180
|
+
agent_name: z.string().optional(),
|
|
181
|
+
cwd_relative: z.string(),
|
|
182
|
+
cwd_original: z.string().optional(),
|
|
183
|
+
cwd_absolute_original: z.string().optional(),
|
|
184
|
+
created_at: z.string(),
|
|
185
|
+
updated_at: z.string(),
|
|
186
|
+
state: z.unknown()
|
|
187
|
+
}),
|
|
188
|
+
history: z.array(z.unknown())
|
|
189
|
+
});
|
|
190
|
+
var SessionImportError = class extends AcpxOperationalError {
|
|
191
|
+
code;
|
|
192
|
+
exitCode = 2;
|
|
193
|
+
constructor(message, code) {
|
|
194
|
+
super(message, {
|
|
195
|
+
outputCode: "USAGE",
|
|
196
|
+
detailCode: code,
|
|
197
|
+
origin: "cli"
|
|
198
|
+
});
|
|
199
|
+
this.code = code;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
function importError(message, code) {
|
|
203
|
+
return new SessionImportError(message, code);
|
|
204
|
+
}
|
|
205
|
+
function parseArchiveJson(raw) {
|
|
206
|
+
try {
|
|
207
|
+
return JSON.parse(raw);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
throw importError(`Invalid session export archive JSON: ${error instanceof Error ? error.message : String(error)}`, "invalid-archive");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function assertSupportedFormatVersion(parsed) {
|
|
213
|
+
const record = parsed && typeof parsed === "object" ? parsed : {};
|
|
214
|
+
if (record.format_version !== SUPPORTED_FORMAT_VERSION) throw importError(`Unsupported session export format_version ${String(record.format_version)}; supported version is ${SUPPORTED_FORMAT_VERSION}`, "unsupported-format-version");
|
|
215
|
+
}
|
|
216
|
+
function parseArchive(raw) {
|
|
217
|
+
const parsed = parseArchiveJson(raw);
|
|
218
|
+
assertSupportedFormatVersion(parsed);
|
|
219
|
+
try {
|
|
220
|
+
return exportedSessionSchema.parse(parsed);
|
|
221
|
+
} catch (error) {
|
|
222
|
+
if (error instanceof ZodError) throw importError(`Invalid session export archive: ${error.issues[0]?.message}`, "invalid-archive");
|
|
223
|
+
throw error;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
async function generateRecordId(sessionsDir) {
|
|
227
|
+
for (;;) {
|
|
228
|
+
const recordId = randomUUID();
|
|
229
|
+
const filePath = path.join(sessionsDir, `${encodeURIComponent(recordId)}.json`);
|
|
230
|
+
try {
|
|
231
|
+
await fs$1.access(filePath);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
if (error.code === "ENOENT") return recordId;
|
|
234
|
+
throw error;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function resolveImportedCwd(cwdRelative, newCwd) {
|
|
239
|
+
if (newCwd) return path.resolve(newCwd);
|
|
240
|
+
if (path.isAbsolute(cwdRelative)) return cwdRelative;
|
|
241
|
+
return path.join(os.homedir(), cwdRelative);
|
|
242
|
+
}
|
|
243
|
+
function resolveImportedName(parsed, requestedName) {
|
|
244
|
+
return requestedName ?? parsed.session.name ?? void 0;
|
|
245
|
+
}
|
|
246
|
+
function assertExpectedAgentCommand(parsed, sourceRecord, options) {
|
|
247
|
+
const expectedAgentCommand = options.expectedAgentCommand;
|
|
248
|
+
if (!expectedAgentCommand) return;
|
|
249
|
+
const expectedAgentName = normalizeAgentIdentity(options.expectedAgentName);
|
|
250
|
+
const archiveAgentName = normalizeAgentIdentity(parsed.session.agent_name);
|
|
251
|
+
const archiveCommandMatches = agentCommandMatchesExpected(parsed.session.agent, expectedAgentCommand, expectedAgentName);
|
|
252
|
+
const stateCommandMatches = agentCommandMatchesExpected(sourceRecord.agentCommand, expectedAgentCommand, expectedAgentName);
|
|
253
|
+
if (archiveCommandMatches && stateCommandMatches && archiveAgentNameMatches({
|
|
254
|
+
archiveAgentName,
|
|
255
|
+
expectedAgentName,
|
|
256
|
+
archiveCommand: parsed.session.agent,
|
|
257
|
+
stateCommand: sourceRecord.agentCommand,
|
|
258
|
+
expectedAgentCommand
|
|
259
|
+
})) {
|
|
260
|
+
sourceRecord.agentCommand = expectedAgentCommand;
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
throw importError("Session export archive agent does not match the requested agent", "agent-mismatch");
|
|
264
|
+
}
|
|
265
|
+
function archiveAgentNameMatches(params) {
|
|
266
|
+
if (params.archiveCommand === params.expectedAgentCommand && params.stateCommand === params.expectedAgentCommand) return true;
|
|
267
|
+
return params.archiveAgentName == null || params.expectedAgentName == null || params.archiveAgentName === params.expectedAgentName;
|
|
268
|
+
}
|
|
269
|
+
function normalizeAgentIdentity(agentName) {
|
|
270
|
+
const normalized = agentName?.trim().toLowerCase();
|
|
271
|
+
if (!normalized || normalized.length === 0) return;
|
|
272
|
+
return normalized === "factory-droid" || normalized === "factorydroid" ? "droid" : normalized;
|
|
273
|
+
}
|
|
274
|
+
function agentCommandMatchesExpected(archivedCommand, expectedAgentCommand, expectedAgentName) {
|
|
275
|
+
if (archivedCommand === expectedAgentCommand || canonicalAgentCommand(archivedCommand) === expectedAgentCommand) return true;
|
|
276
|
+
return expectedAgentName ? commandLooksLikeBuiltInAgent(archivedCommand, expectedAgentName) : false;
|
|
277
|
+
}
|
|
278
|
+
function commandLooksLikeBuiltInAgent(command, agentName) {
|
|
279
|
+
const normalized = command.trim();
|
|
280
|
+
switch (agentName) {
|
|
281
|
+
case "pi": return /(?:^|\s|=)pi-acp(?:@|\s|$)/.test(normalized);
|
|
282
|
+
case "codex": return /(?:^|\s|=)@agentclientprotocol\/codex-acp(?:@|\s|$)/.test(normalized);
|
|
283
|
+
case "claude": return /(?:^|\s|=)@agentclientprotocol\/claude-agent-acp(?:@|\s|$)/.test(normalized);
|
|
284
|
+
default: return false;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
async function assertDestinationScopeAvailable(record) {
|
|
288
|
+
if (!await findSession({
|
|
289
|
+
agentCommand: record.agentCommand,
|
|
290
|
+
cwd: record.cwd,
|
|
291
|
+
name: record.name
|
|
292
|
+
})) return;
|
|
293
|
+
throw importError("A session already exists for the import destination scope; pass --name or --cwd to import a separate copy", "session-scope-exists");
|
|
294
|
+
}
|
|
295
|
+
async function assertProviderSessionAvailable(record) {
|
|
296
|
+
if (!(await listSessions()).find((session) => session.acpSessionId === record.acpSessionId)) return;
|
|
297
|
+
throw importError("A local session already uses this provider session id; prune or remove the existing record before importing this archive", "session-provider-exists");
|
|
298
|
+
}
|
|
299
|
+
function buildImportedRecord(parsed, sourceRecord, options) {
|
|
300
|
+
const eventLog = {
|
|
301
|
+
...defaultSessionEventLog(options.newRecordId),
|
|
302
|
+
max_segment_bytes: sourceRecord.eventLog.max_segment_bytes,
|
|
303
|
+
max_segments: boundedEventMaxSegments(sourceRecord.eventLog.max_segments),
|
|
304
|
+
segment_count: parsed.history.length > 0 ? 1 : sourceRecord.eventLog.segment_count
|
|
305
|
+
};
|
|
306
|
+
return {
|
|
307
|
+
...sourceRecord,
|
|
308
|
+
acpxRecordId: options.newRecordId,
|
|
309
|
+
cwd: options.cwd,
|
|
310
|
+
name: resolveImportedName(parsed, options.name),
|
|
311
|
+
closed: false,
|
|
312
|
+
closedAt: void 0,
|
|
313
|
+
pid: void 0,
|
|
314
|
+
agentStartedAt: void 0,
|
|
315
|
+
lastAgentExitCode: void 0,
|
|
316
|
+
lastAgentExitSignal: void 0,
|
|
317
|
+
lastAgentExitAt: void 0,
|
|
318
|
+
lastAgentDisconnectReason: void 0,
|
|
319
|
+
eventLog,
|
|
320
|
+
importedFrom: {
|
|
321
|
+
recordId: parsed.session.record_id,
|
|
322
|
+
cwdOriginal: parsed.session.cwd_original ?? parsed.session.cwd_relative,
|
|
323
|
+
exportedBy: parsed.exported_by,
|
|
324
|
+
exportedAt: parsed.exported_at
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
async function importSession(archivePath, options = {}) {
|
|
329
|
+
try {
|
|
330
|
+
var _usingCtx$1 = _usingCtx();
|
|
331
|
+
const parsed = parseArchive(await fs$1.readFile(archivePath, "utf8"));
|
|
332
|
+
const sourceRecord = parseSessionRecord(parsed.session.state);
|
|
333
|
+
if (!sourceRecord) throw importError("Invalid session export archive: session.state is not a session record", "invalid-archive");
|
|
334
|
+
assertExpectedAgentCommand(parsed, sourceRecord, options);
|
|
335
|
+
const sessionsDir = path.join(os.homedir(), ".acpx", "sessions");
|
|
336
|
+
await fs$1.mkdir(sessionsDir, { recursive: true });
|
|
337
|
+
const cwd = resolveImportedCwd(parsed.session.cwd_relative, options.newCwd);
|
|
338
|
+
const newRecordId = await generateRecordId(sessionsDir);
|
|
339
|
+
const newRecord = buildImportedRecord(parsed, sourceRecord, {
|
|
340
|
+
newRecordId,
|
|
341
|
+
cwd,
|
|
342
|
+
name: options.name
|
|
343
|
+
});
|
|
344
|
+
_usingCtx$1.a(await acquireSessionScope({
|
|
345
|
+
agentCommand: newRecord.agentCommand,
|
|
346
|
+
cwd: absolutePath(newRecord.cwd),
|
|
347
|
+
name: normalizeName(newRecord.name)
|
|
348
|
+
}));
|
|
349
|
+
_usingCtx$1.a(await acquireSessionImport());
|
|
350
|
+
await assertDestinationScopeAvailable(newRecord);
|
|
351
|
+
await assertProviderSessionAvailable(newRecord);
|
|
352
|
+
if (parsed.history.length > 0) {
|
|
353
|
+
const history = parsed.history;
|
|
354
|
+
await writePrivateFile(sessionEventActivePath(newRecordId), `${history.map((entry) => JSON.stringify(entry)).join("\n")}\n`);
|
|
355
|
+
}
|
|
356
|
+
await writeSessionRecord(newRecord);
|
|
357
|
+
return {
|
|
358
|
+
record_id: newRecordId,
|
|
359
|
+
cwd
|
|
360
|
+
};
|
|
361
|
+
} catch (_) {
|
|
362
|
+
_usingCtx$1.e = _;
|
|
363
|
+
} finally {
|
|
364
|
+
await _usingCtx$1.d();
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
// src/cli/output/json-output.ts
|
|
368
|
+
function emitJsonResult(format, payload) {
|
|
369
|
+
if (format !== "json") return false;
|
|
370
|
+
process.stdout.write(`${JSON.stringify(payload)}\n`);
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
// src/cli/prompt-input.ts
|
|
374
|
+
async function readPromptInput(filePath, promptText, cwd, positionalLabel = "argument") {
|
|
375
|
+
try {
|
|
376
|
+
if (filePath) return await readPromptFile(filePath, promptText, cwd);
|
|
377
|
+
const joined = promptText.trim();
|
|
378
|
+
if (joined.length > 0) return textPrompt(joined);
|
|
379
|
+
if (process.stdin.isTTY) throw new InvalidArgumentError(`Prompt is required (pass as ${positionalLabel}, --file, or pipe via stdin)`);
|
|
380
|
+
const prompt = parsePromptSource(await text(process.stdin));
|
|
381
|
+
if (prompt.length === 0) throw new InvalidArgumentError("Prompt from stdin is empty");
|
|
382
|
+
return prompt;
|
|
383
|
+
} catch (error) {
|
|
384
|
+
if (error instanceof PromptInputValidationError) throw new InvalidArgumentError(error.message);
|
|
385
|
+
throw error;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
async function readPromptFile(filePath, promptText, cwd) {
|
|
389
|
+
const source = filePath === "-" ? await text(process.stdin) : await fs$1.readFile(path.resolve(cwd, filePath), "utf8");
|
|
390
|
+
const prompt = mergePromptSourceWithText(source, promptText);
|
|
391
|
+
if (prompt.length === 0) throw new InvalidArgumentError("Prompt from --file is empty");
|
|
392
|
+
return prompt;
|
|
393
|
+
}
|
|
394
|
+
// src/cli/command-handlers.ts
|
|
395
|
+
var NoSessionError = class extends Error {
|
|
396
|
+
constructor(message) {
|
|
397
|
+
super(message);
|
|
398
|
+
this.name = "NoSessionError";
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
let sessionModulePromise;
|
|
402
|
+
let outputModulePromise;
|
|
403
|
+
let outputRenderModulePromise;
|
|
404
|
+
function loadSessionModule() {
|
|
405
|
+
sessionModulePromise ??= import("./output-C_T39Ap1.js").then((n) => n.s);
|
|
406
|
+
return sessionModulePromise;
|
|
407
|
+
}
|
|
408
|
+
function loadOutputModule() {
|
|
409
|
+
outputModulePromise ??= import("./output-C_T39Ap1.js").then((n) => n.r);
|
|
410
|
+
return outputModulePromise;
|
|
411
|
+
}
|
|
412
|
+
function loadOutputRenderModule() {
|
|
413
|
+
outputRenderModulePromise ??= Promise.resolve().then(() => render_exports);
|
|
414
|
+
return outputRenderModulePromise;
|
|
415
|
+
}
|
|
416
|
+
function applyPermissionExitCode(result, quietOutput) {
|
|
417
|
+
const stats = result.permissionStats;
|
|
418
|
+
const deniedOrCancelled = stats.denied + stats.cancelled;
|
|
419
|
+
if (stats.requested > 0 && stats.approved === 0 && deniedOrCancelled > 0) {
|
|
420
|
+
process.exitCode = EXIT_CODES.PERMISSION_DENIED;
|
|
421
|
+
quietOutput?.onError({
|
|
422
|
+
code: "PERMISSION_DENIED",
|
|
423
|
+
origin: "runtime",
|
|
424
|
+
message: "Permission request denied or cancelled"
|
|
425
|
+
});
|
|
426
|
+
quietOutput?.flush();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function resolveCompatibleConfigId(agent, configId) {
|
|
430
|
+
if (isLegacyZedCodexAcpInvocation(agent.agentCommand) && configId === "thought_level") return "reasoning_effort";
|
|
431
|
+
return configId;
|
|
432
|
+
}
|
|
433
|
+
function resolveRequestedOutputPolicy(globalFlags) {
|
|
434
|
+
return {
|
|
435
|
+
...resolveOutputPolicy(globalFlags.format, globalFlags.jsonStrict === true),
|
|
436
|
+
suppressReads: globalFlags.suppressReads === true
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
function buildSessionStartOptions(params) {
|
|
440
|
+
return {
|
|
441
|
+
...sessionConnectionOptions(params.globalFlags, params.config),
|
|
442
|
+
agentCommand: params.agent.agentCommand,
|
|
443
|
+
agentArgv: params.agent.agentArgv,
|
|
444
|
+
cwd: params.agent.cwd,
|
|
445
|
+
name: params.flags.name,
|
|
446
|
+
resumeSessionId: params.flags.resumeSession,
|
|
447
|
+
permissionMode: params.permissionMode,
|
|
448
|
+
permissionPolicy: params.permissionPolicy,
|
|
449
|
+
sessionOptions: sessionOptionsFromGlobalFlags(params.globalFlags),
|
|
450
|
+
onModelWarning: params.globalFlags.jsonStrict ? void 0 : (message) => process.stderr.write(`[acpx] warning: ${message}\n`)
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
function resolveSessionListFilterCwd(flags, agentCwd) {
|
|
454
|
+
return flags.filterCwd ? path.resolve(agentCwd, flags.filterCwd) : void 0;
|
|
455
|
+
}
|
|
456
|
+
async function printLocalSessionsList(agentCommand, filterCwd, format) {
|
|
457
|
+
const [{ listSessionsForAgent }, { printSessionsByFormat }] = await Promise.all([loadSessionModule(), loadOutputRenderModule()]);
|
|
458
|
+
const sessions = await listSessionsForAgent(agentCommand);
|
|
459
|
+
printSessionsByFormat(filterCwd ? sessions.filter((session) => session.cwd === filterCwd) : sessions, format);
|
|
460
|
+
}
|
|
461
|
+
function missingScopedSessionMessage(agent, sessionName) {
|
|
462
|
+
return sessionName ? `No named session "${sessionName}" for cwd ${agent.cwd} and agent ${agent.agentName}` : `No cwd session for ${agent.cwd} and agent ${agent.agentName}`;
|
|
463
|
+
}
|
|
464
|
+
async function findScopedSessionOrThrow(agent, sessionName) {
|
|
465
|
+
const record = await findSession({
|
|
466
|
+
agentCommand: agent.agentCommand,
|
|
467
|
+
cwd: agent.cwd,
|
|
468
|
+
name: sessionName,
|
|
469
|
+
includeClosed: true
|
|
470
|
+
});
|
|
471
|
+
if (!record) throw new Error(missingScopedSessionMessage(agent, sessionName));
|
|
472
|
+
return record;
|
|
473
|
+
}
|
|
474
|
+
async function findRoutedSessionOrThrow(agentCommand, agentName, cwd, sessionName) {
|
|
475
|
+
const walkBoundary = findGitRepositoryRoot(cwd) ?? cwd;
|
|
476
|
+
const record = await findSessionByDirectoryWalk({
|
|
477
|
+
agentCommand,
|
|
478
|
+
cwd,
|
|
479
|
+
name: sessionName,
|
|
480
|
+
boundary: walkBoundary
|
|
481
|
+
});
|
|
482
|
+
if (record) return record;
|
|
483
|
+
throw new NoSessionError(`⚠ No acpx session found (searched up to ${walkBoundary}).\nCreate one: ${sessionName ? `acpx ${agentName} sessions new --name ${sessionName}` : `acpx ${agentName} sessions new`}`);
|
|
484
|
+
}
|
|
485
|
+
async function handlePrompt(explicitAgentName, promptParts, flags, command, config) {
|
|
486
|
+
const promptFlags = resolvePromptFlags(flags, command);
|
|
487
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
488
|
+
const outputPolicy = resolveRequestedOutputPolicy(globalFlags);
|
|
489
|
+
const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);
|
|
490
|
+
const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);
|
|
491
|
+
const prompt = await readPromptInput(promptFlags.file, promptParts.join(" "), globalFlags.cwd);
|
|
492
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
493
|
+
const [{ createOutputFormatter }, { printPromptSessionBanner, printQueuedPromptByFormat }, { sendSession }] = await Promise.all([
|
|
494
|
+
loadOutputModule(),
|
|
495
|
+
loadOutputRenderModule(),
|
|
496
|
+
loadSessionModule()
|
|
497
|
+
]);
|
|
498
|
+
const record = await findRoutedSessionOrThrow(agent.agentCommand, agent.agentName, agent.cwd, resolveSessionNameFromFlags(flags, command));
|
|
499
|
+
const outputFormatter = createOutputFormatter(outputPolicy.format, {
|
|
500
|
+
jsonContext: { sessionId: record.acpxRecordId },
|
|
501
|
+
suppressReads: outputPolicy.suppressReads
|
|
502
|
+
});
|
|
503
|
+
await printPromptSessionBanner(record, agent.cwd, outputPolicy.format, outputPolicy.jsonStrict);
|
|
504
|
+
const result = await sendSession({
|
|
505
|
+
...sessionConnectionOptions(globalFlags, config),
|
|
506
|
+
sessionId: record.acpxRecordId,
|
|
507
|
+
prompt,
|
|
508
|
+
mcpConfigPath: config.mcpConfigPath,
|
|
509
|
+
mcpConfigFingerprint: config.mcpConfigFingerprint,
|
|
510
|
+
permissionMode,
|
|
511
|
+
permissionPolicy,
|
|
512
|
+
outputFormatter,
|
|
513
|
+
errorEmissionPolicy: { queueErrorAlreadyEmitted: outputPolicy.queueErrorAlreadyEmitted },
|
|
514
|
+
suppressSdkConsoleErrors: outputPolicy.suppressSdkConsoleErrors,
|
|
515
|
+
ttlMs: globalFlags.ttl,
|
|
516
|
+
maxQueueDepth: config.queueMaxDepth,
|
|
517
|
+
promptRetries: globalFlags.promptRetries,
|
|
518
|
+
waitForCompletion: promptFlags.wait,
|
|
519
|
+
sessionOptions: sessionOptionsFromGlobalFlags(globalFlags)
|
|
520
|
+
});
|
|
521
|
+
if ("queued" in result) {
|
|
522
|
+
printQueuedPromptByFormat(result, outputPolicy.format);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
applyPermissionExitCode(result, outputPolicy.format === "quiet" ? outputFormatter : void 0);
|
|
526
|
+
if (globalFlags.verbose && result.loadError) process.stderr.write(`[acpx] session reconnect failed, started fresh session: ${result.loadError}\n`);
|
|
527
|
+
}
|
|
528
|
+
async function handleExec(explicitAgentName, promptParts, flags, command, config) {
|
|
529
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
530
|
+
if (config.disableExec) throw new AcpxOperationalError("exec subcommand is disabled by configuration (disableExec: true)", {
|
|
531
|
+
outputCode: "EXEC_DISABLED",
|
|
532
|
+
origin: "cli"
|
|
533
|
+
});
|
|
534
|
+
const outputPolicy = resolveRequestedOutputPolicy(globalFlags);
|
|
535
|
+
const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);
|
|
536
|
+
const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);
|
|
537
|
+
const prompt = await readPromptInput(resolvePromptFlags(flags, command).file, promptParts.join(" "), globalFlags.cwd);
|
|
538
|
+
const [{ createOutputFormatter }, { runOnce }] = await Promise.all([loadOutputModule(), loadSessionModule()]);
|
|
539
|
+
const outputFormatter = createOutputFormatter(outputPolicy.format, { suppressReads: outputPolicy.suppressReads });
|
|
540
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
541
|
+
applyPermissionExitCode(await runOnce({
|
|
542
|
+
...sessionConnectionOptions(globalFlags, config),
|
|
543
|
+
agentCommand: agent.agentCommand,
|
|
544
|
+
agentArgv: agent.agentArgv,
|
|
545
|
+
cwd: agent.cwd,
|
|
546
|
+
prompt,
|
|
547
|
+
permissionMode,
|
|
548
|
+
permissionPolicy,
|
|
549
|
+
outputFormatter,
|
|
550
|
+
errorEmissionPolicy: { queueErrorAlreadyEmitted: outputPolicy.queueErrorAlreadyEmitted },
|
|
551
|
+
suppressSdkConsoleErrors: outputPolicy.suppressSdkConsoleErrors,
|
|
552
|
+
promptRetries: globalFlags.promptRetries,
|
|
553
|
+
sessionOptions: sessionOptionsFromGlobalFlags(globalFlags),
|
|
554
|
+
configOptions: flags.configOption
|
|
555
|
+
}), outputPolicy.format === "quiet" ? outputFormatter : void 0);
|
|
556
|
+
}
|
|
557
|
+
function printCancelResultByFormat(result, format) {
|
|
558
|
+
if (emitJsonResult(format, {
|
|
559
|
+
action: "cancel_result",
|
|
560
|
+
acpxRecordId: result.sessionId || "unknown",
|
|
561
|
+
cancelled: result.cancelled
|
|
562
|
+
})) return;
|
|
563
|
+
process.stdout.write(result.cancelled ? "cancel requested\n" : "nothing to cancel\n");
|
|
564
|
+
}
|
|
565
|
+
function printSetModeResultByFormat(modeId, result, format) {
|
|
566
|
+
if (emitJsonResult(format, {
|
|
567
|
+
action: "mode_set",
|
|
568
|
+
modeId,
|
|
569
|
+
resumed: result.resumed,
|
|
570
|
+
acpxRecordId: result.record.acpxRecordId,
|
|
571
|
+
acpxSessionId: result.record.acpSessionId,
|
|
572
|
+
agentSessionId: result.record.agentSessionId
|
|
573
|
+
})) return;
|
|
574
|
+
process.stdout.write(format === "quiet" ? `${modeId}\n` : `mode set: ${modeId}\n`);
|
|
575
|
+
}
|
|
576
|
+
function printSetModelResultByFormat(modelId, result, format) {
|
|
577
|
+
if (emitJsonResult(format, {
|
|
578
|
+
action: "model_set",
|
|
579
|
+
modelId,
|
|
580
|
+
resumed: result.resumed,
|
|
581
|
+
acpxRecordId: result.record.acpxRecordId,
|
|
582
|
+
acpxSessionId: result.record.acpSessionId,
|
|
583
|
+
agentSessionId: result.record.agentSessionId
|
|
584
|
+
})) return;
|
|
585
|
+
process.stdout.write(format === "quiet" ? `${modelId}\n` : `model set: ${modelId}\n`);
|
|
586
|
+
}
|
|
587
|
+
function printSetConfigOptionResultByFormat(configId, value, result, format) {
|
|
588
|
+
const options = result.response?.configOptions;
|
|
589
|
+
const configOptions = Array.isArray(options) ? options : result.record.acpx?.config_options ?? [];
|
|
590
|
+
if (emitJsonResult(format, {
|
|
591
|
+
action: "config_set",
|
|
592
|
+
configId,
|
|
593
|
+
value,
|
|
594
|
+
resumed: result.resumed,
|
|
595
|
+
configOptions,
|
|
596
|
+
acpxRecordId: result.record.acpxRecordId,
|
|
597
|
+
acpxSessionId: result.record.acpSessionId,
|
|
598
|
+
agentSessionId: result.record.agentSessionId
|
|
599
|
+
})) return;
|
|
600
|
+
process.stdout.write(format === "quiet" ? `${value}\n` : `config set: ${configId}=${value} (${configOptions.length} options)\n`);
|
|
601
|
+
}
|
|
602
|
+
async function handleCancel(explicitAgentName, flags, command, config) {
|
|
603
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
604
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
605
|
+
const { cancelSessionPrompt } = await loadSessionModule();
|
|
606
|
+
const walkBoundary = findGitRepositoryRoot(agent.cwd) ?? agent.cwd;
|
|
607
|
+
const record = await findSessionByDirectoryWalk({
|
|
608
|
+
agentCommand: agent.agentCommand,
|
|
609
|
+
cwd: agent.cwd,
|
|
610
|
+
name: resolveSessionNameFromFlags(flags, command),
|
|
611
|
+
boundary: walkBoundary
|
|
612
|
+
});
|
|
613
|
+
if (!record) {
|
|
614
|
+
printCancelResultByFormat({
|
|
615
|
+
sessionId: "",
|
|
616
|
+
cancelled: false
|
|
617
|
+
}, globalFlags.format);
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
printCancelResultByFormat(await cancelSessionPrompt({
|
|
621
|
+
sessionId: record.acpxRecordId,
|
|
622
|
+
verbose: globalFlags.verbose
|
|
623
|
+
}), globalFlags.format);
|
|
624
|
+
}
|
|
625
|
+
async function handleSetMode(explicitAgentName, modeId, flags, command, config) {
|
|
626
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
627
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
628
|
+
const { setSessionMode } = await loadSessionModule();
|
|
629
|
+
const record = await findRoutedSessionOrThrow(agent.agentCommand, agent.agentName, agent.cwd, resolveSessionNameFromFlags(flags, command));
|
|
630
|
+
const result = await setSessionMode({
|
|
631
|
+
...sessionConnectionOptions(globalFlags, config),
|
|
632
|
+
sessionId: record.acpxRecordId,
|
|
633
|
+
modeId
|
|
634
|
+
});
|
|
635
|
+
if (globalFlags.verbose && result.loadError) process.stderr.write(`[acpx] session reconnect failed, started fresh session: ${result.loadError}\n`);
|
|
636
|
+
printSetModeResultByFormat(modeId, result, globalFlags.format);
|
|
637
|
+
}
|
|
638
|
+
async function handleSetModel(explicitAgentName, modelId, flags, command, config) {
|
|
639
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
640
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
641
|
+
const { setSessionModel } = await loadSessionModule();
|
|
642
|
+
const record = await findRoutedSessionOrThrow(agent.agentCommand, agent.agentName, agent.cwd, resolveSessionNameFromFlags(flags, command));
|
|
643
|
+
const result = await setSessionModel({
|
|
644
|
+
...sessionConnectionOptions(globalFlags, config),
|
|
645
|
+
sessionId: record.acpxRecordId,
|
|
646
|
+
modelId
|
|
647
|
+
});
|
|
648
|
+
if (globalFlags.verbose && result.loadError) process.stderr.write(`[acpx] session reconnect failed, started fresh session: ${result.loadError}\n`);
|
|
649
|
+
printSetModelResultByFormat(modelId, result, globalFlags.format);
|
|
650
|
+
}
|
|
651
|
+
async function handleSetConfigOption(explicitAgentName, configId, value, flags, command, config) {
|
|
652
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
653
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
654
|
+
if (configId === "model") {
|
|
655
|
+
await handleSetModel(explicitAgentName, value, flags, command, config);
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const resolvedConfigId = resolveCompatibleConfigId(agent, configId);
|
|
659
|
+
const { setSessionConfigOption } = await loadSessionModule();
|
|
660
|
+
const record = await findRoutedSessionOrThrow(agent.agentCommand, agent.agentName, agent.cwd, resolveSessionNameFromFlags(flags, command));
|
|
661
|
+
const result = await setSessionConfigOption({
|
|
662
|
+
...sessionConnectionOptions(globalFlags, config),
|
|
663
|
+
sessionId: record.acpxRecordId,
|
|
664
|
+
configId: resolvedConfigId,
|
|
665
|
+
value
|
|
666
|
+
});
|
|
667
|
+
if (globalFlags.verbose && result.loadError) process.stderr.write(`[acpx] session reconnect failed, started fresh session: ${result.loadError}\n`);
|
|
668
|
+
printSetConfigOptionResultByFormat(configId, value, result, globalFlags.format);
|
|
669
|
+
}
|
|
670
|
+
async function tryListAgentSessions(agent, flags, globalFlags, config) {
|
|
671
|
+
const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);
|
|
672
|
+
const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);
|
|
673
|
+
const { listAgentSessions } = await loadSessionModule();
|
|
674
|
+
try {
|
|
675
|
+
return await listAgentSessions({
|
|
676
|
+
...sessionConnectionOptions(globalFlags, config),
|
|
677
|
+
agentCommand: agent.agentCommand,
|
|
678
|
+
agentArgv: agent.agentArgv,
|
|
679
|
+
cwd: agent.cwd,
|
|
680
|
+
cursor: flags.cursor,
|
|
681
|
+
filterCwd: resolveSessionListFilterCwd(flags, agent.cwd),
|
|
682
|
+
permissionMode,
|
|
683
|
+
permissionPolicy
|
|
684
|
+
});
|
|
685
|
+
} catch (error) {
|
|
686
|
+
if (error instanceof AgentSpawnError) return "spawn-failed";
|
|
687
|
+
throw error;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
async function handleSessionsList(explicitAgentName, flags, command, config) {
|
|
691
|
+
const listFlags = resolveSessionsListFlags(flags, command);
|
|
692
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
693
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
694
|
+
const filterCwd = resolveSessionListFilterCwd(listFlags, agent.cwd);
|
|
695
|
+
if (listFlags.local) {
|
|
696
|
+
if (listFlags.cursor) throw new InvalidArgumentError("--cursor cannot be combined with --local");
|
|
697
|
+
await printLocalSessionsList(agent.agentCommand, filterCwd, globalFlags.format);
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
const [result, { printAgentSessionsByFormat }] = await Promise.all([tryListAgentSessions(agent, listFlags, globalFlags, config), loadOutputRenderModule()]);
|
|
701
|
+
if (!result || result === "spawn-failed") {
|
|
702
|
+
if (result !== "spawn-failed" && (listFlags.cursor || listFlags.filterCwd)) throw new Error(`Agent command "${agent.agentCommand}" does not advertise sessionCapabilities.list; cannot use agent-side session/list filters`);
|
|
703
|
+
await printLocalSessionsList(agent.agentCommand, void 0, globalFlags.format);
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
printAgentSessionsByFormat(result, globalFlags.format);
|
|
707
|
+
}
|
|
708
|
+
async function handleSessionsClose(explicitAgentName, sessionName, command, config) {
|
|
709
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
710
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
711
|
+
const [{ closeSession }, { printClosedSessionByFormat }] = await Promise.all([loadSessionModule(), loadOutputRenderModule()]);
|
|
712
|
+
const record = await findSession({
|
|
713
|
+
agentCommand: agent.agentCommand,
|
|
714
|
+
cwd: agent.cwd,
|
|
715
|
+
name: sessionName
|
|
716
|
+
});
|
|
717
|
+
if (!record) throw new Error(missingScopedSessionMessage(agent, sessionName));
|
|
718
|
+
printClosedSessionByFormat(await closeSession(record.acpxRecordId), globalFlags.format);
|
|
719
|
+
}
|
|
720
|
+
async function handleSessionsNew(explicitAgentName, flags, command, config) {
|
|
721
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
722
|
+
const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);
|
|
723
|
+
const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);
|
|
724
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
725
|
+
const [{ createSession, closeSession }, { printCreatedSessionBanner, printNewSessionByFormat }] = await Promise.all([loadSessionModule(), loadOutputRenderModule()]);
|
|
726
|
+
const replaced = await findSession({
|
|
727
|
+
agentCommand: agent.agentCommand,
|
|
728
|
+
cwd: agent.cwd,
|
|
729
|
+
name: flags.name
|
|
730
|
+
});
|
|
731
|
+
const resumesSameRecord = replaced != null && replaced.acpxRecordId === flags.resumeSession;
|
|
732
|
+
const created = await createSession(buildSessionStartOptions({
|
|
733
|
+
agent,
|
|
734
|
+
flags,
|
|
735
|
+
globalFlags,
|
|
736
|
+
config,
|
|
737
|
+
permissionMode,
|
|
738
|
+
permissionPolicy
|
|
739
|
+
}));
|
|
740
|
+
if (replaced) {
|
|
741
|
+
if (!resumesSameRecord) await closeSession(replaced.acpxRecordId);
|
|
742
|
+
if (globalFlags.verbose) process.stderr.write(`[acpx] soft-closed prior session: ${replaced.acpxRecordId}\n`);
|
|
743
|
+
}
|
|
744
|
+
printCreatedSessionBanner(created, agent.agentName, globalFlags.format, globalFlags.jsonStrict);
|
|
745
|
+
if (globalFlags.verbose) {
|
|
746
|
+
const scope = flags.name ? `named session "${flags.name}"` : "cwd session";
|
|
747
|
+
process.stderr.write(`[acpx] created ${scope}: ${created.acpxRecordId}\n`);
|
|
748
|
+
}
|
|
749
|
+
printNewSessionByFormat(created, replaced, globalFlags.format);
|
|
750
|
+
}
|
|
751
|
+
async function handleSessionsEnsure(explicitAgentName, flags, command, config) {
|
|
752
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
753
|
+
const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);
|
|
754
|
+
const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);
|
|
755
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
756
|
+
const [{ ensureSession }, { printCreatedSessionBanner, printEnsuredSessionByFormat }] = await Promise.all([loadSessionModule(), loadOutputRenderModule()]);
|
|
757
|
+
const result = await ensureSession(buildSessionStartOptions({
|
|
758
|
+
agent,
|
|
759
|
+
flags,
|
|
760
|
+
globalFlags,
|
|
761
|
+
config,
|
|
762
|
+
permissionMode,
|
|
763
|
+
permissionPolicy
|
|
764
|
+
}));
|
|
765
|
+
if (result.created) printCreatedSessionBanner(result.record, agent.agentName, globalFlags.format, globalFlags.jsonStrict);
|
|
766
|
+
printEnsuredSessionByFormat(result.record, result.created, globalFlags.format);
|
|
767
|
+
}
|
|
768
|
+
function userContentToText(content) {
|
|
769
|
+
if ("Text" in content) return content.Text;
|
|
770
|
+
if ("Mention" in content) return content.Mention.content;
|
|
771
|
+
if ("Image" in content) return `[image] ${content.Image.mime_type || "image"}`;
|
|
772
|
+
if ("Audio" in content) return `[audio] ${content.Audio.mime_type || "audio"}`;
|
|
773
|
+
return "";
|
|
774
|
+
}
|
|
775
|
+
function agentContentToText(content) {
|
|
776
|
+
if ("Text" in content) return content.Text;
|
|
777
|
+
if ("Thinking" in content) return content.Thinking.text;
|
|
778
|
+
if ("RedactedThinking" in content) return "[redacted_thinking]";
|
|
779
|
+
if ("ToolUse" in content) return `[tool:${content.ToolUse.name}]`;
|
|
780
|
+
return "";
|
|
781
|
+
}
|
|
782
|
+
function conversationHistoryEntries(record) {
|
|
783
|
+
const entries = [];
|
|
784
|
+
for (const message of record.messages) {
|
|
785
|
+
if (message === "Resume") continue;
|
|
786
|
+
if ("User" in message) {
|
|
787
|
+
const text = message.User.content.map((entry) => userContentToText(entry)).join(" ").trim();
|
|
788
|
+
if (!text) continue;
|
|
789
|
+
entries.push({
|
|
790
|
+
role: "user",
|
|
791
|
+
timestamp: record.updated_at,
|
|
792
|
+
textPreview: text
|
|
793
|
+
});
|
|
794
|
+
continue;
|
|
795
|
+
}
|
|
796
|
+
if ("Agent" in message) {
|
|
797
|
+
const text = message.Agent.content.map((entry) => agentContentToText(entry)).join(" ").trim();
|
|
798
|
+
if (!text) continue;
|
|
799
|
+
entries.push({
|
|
800
|
+
role: "assistant",
|
|
801
|
+
timestamp: record.updated_at,
|
|
802
|
+
textPreview: text
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
return entries;
|
|
807
|
+
}
|
|
808
|
+
function printSessionDetailsByFormat(record, format) {
|
|
809
|
+
if (format === "json") {
|
|
810
|
+
process.stdout.write(`${JSON.stringify(record)}\n`);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if (format === "quiet") {
|
|
814
|
+
process.stdout.write(`${record.acpxRecordId}\n`);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
for (const line of sessionDetailsLines(record)) process.stdout.write(`${line}\n`);
|
|
818
|
+
}
|
|
819
|
+
function sessionDetailsLines(record) {
|
|
820
|
+
return [
|
|
821
|
+
`id: ${record.acpxRecordId}`,
|
|
822
|
+
`sessionId: ${record.acpSessionId}`,
|
|
823
|
+
`agentSessionId: ${displayValue(record.agentSessionId)}`,
|
|
824
|
+
`agent: ${record.agentCommand}`,
|
|
825
|
+
`cwd: ${record.cwd}`,
|
|
826
|
+
`name: ${displayValue(record.name)}`,
|
|
827
|
+
`created: ${record.createdAt}`,
|
|
828
|
+
`lastActivity: ${record.lastUsedAt}`,
|
|
829
|
+
`lastPrompt: ${displayValue(record.lastPromptAt)}`,
|
|
830
|
+
`closed: ${record.closed ? "yes" : "no"}`,
|
|
831
|
+
`closedAt: ${displayValue(record.closedAt)}`,
|
|
832
|
+
`pid: ${displayValue(record.pid)}`,
|
|
833
|
+
`agentStartedAt: ${displayValue(record.agentStartedAt)}`,
|
|
834
|
+
`lastExitCode: ${displayValue(record.lastAgentExitCode)}`,
|
|
835
|
+
`lastExitSignal: ${displayValue(record.lastAgentExitSignal)}`,
|
|
836
|
+
`lastExitAt: ${displayValue(record.lastAgentExitAt)}`,
|
|
837
|
+
`disconnectReason: ${displayValue(record.lastAgentDisconnectReason)}`,
|
|
838
|
+
`historyEntries: ${conversationHistoryEntries(record).length}`
|
|
839
|
+
];
|
|
840
|
+
}
|
|
841
|
+
function displayValue(value) {
|
|
842
|
+
return value == null ? "-" : String(value);
|
|
843
|
+
}
|
|
844
|
+
function printSessionHistoryByFormat(record, limit, format) {
|
|
845
|
+
const history = conversationHistoryEntries(record);
|
|
846
|
+
const visible = limit === 0 ? history : history.slice(Math.max(0, history.length - limit));
|
|
847
|
+
if (format === "json") {
|
|
848
|
+
process.stdout.write(`${JSON.stringify({
|
|
849
|
+
id: record.acpxRecordId,
|
|
850
|
+
sessionId: record.acpSessionId,
|
|
851
|
+
limit,
|
|
852
|
+
count: visible.length,
|
|
853
|
+
entries: visible
|
|
854
|
+
})}\n`);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
if (format === "quiet") {
|
|
858
|
+
for (const entry of visible) process.stdout.write(`${entry.textPreview}\n`);
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
process.stdout.write(`session: ${record.acpxRecordId} (${visible.length}/${history.length} shown)\n`);
|
|
862
|
+
if (visible.length === 0) {
|
|
863
|
+
process.stdout.write("No history\n");
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
for (const entry of visible) process.stdout.write(`${entry.timestamp}\t${entry.role}\t${entry.textPreview}\n`);
|
|
867
|
+
}
|
|
868
|
+
async function handleSessionsShow(explicitAgentName, sessionName, command, config) {
|
|
869
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
870
|
+
printSessionDetailsByFormat(await findScopedSessionOrThrow(resolveAgentInvocation(explicitAgentName, globalFlags, config), sessionName), globalFlags.format);
|
|
871
|
+
}
|
|
872
|
+
async function handleSessionsHistory(explicitAgentName, sessionName, flags, command, config) {
|
|
873
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
874
|
+
printSessionHistoryByFormat(await findScopedSessionOrThrow(resolveAgentInvocation(explicitAgentName, globalFlags, config), sessionName), flags.limit, globalFlags.format);
|
|
875
|
+
}
|
|
876
|
+
async function handleSessionsWatch(explicitAgentName, flags, command, config) {
|
|
877
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
878
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
879
|
+
const sessionName = resolveSessionNameFromFlags({ session: flags.name }, command);
|
|
880
|
+
const scope = {
|
|
881
|
+
agentCommand: agent.agentCommand,
|
|
882
|
+
cwd: agent.cwd,
|
|
883
|
+
name: sessionName,
|
|
884
|
+
readOnly: true
|
|
885
|
+
};
|
|
886
|
+
const record = await findSession(scope) ?? await findSession({
|
|
887
|
+
...scope,
|
|
888
|
+
includeClosed: true
|
|
889
|
+
});
|
|
890
|
+
if (!record) throw new Error(missingScopedSessionMessage(agent, sessionName));
|
|
891
|
+
const { runSessionWatch } = await import("./session-watch-D0YvKsnQ.js");
|
|
892
|
+
await runSessionWatch(record, {
|
|
893
|
+
cursor: flags.cursor,
|
|
894
|
+
policy: resolveRequestedOutputPolicy(globalFlags)
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
async function handleSessionsExport(explicitAgentName, sessionName, flags, command, config) {
|
|
898
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
899
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
900
|
+
const cwd = flags.sourceCwd ? path.resolve(agent.cwd, flags.sourceCwd) : agent.cwd;
|
|
901
|
+
await exportSession({
|
|
902
|
+
agentName: globalFlags.agent ? void 0 : agent.agentName,
|
|
903
|
+
agentCommand: agent.agentCommand,
|
|
904
|
+
cwd,
|
|
905
|
+
name: sessionName
|
|
906
|
+
}, flags.output);
|
|
907
|
+
if (emitJsonResult(globalFlags.format, {
|
|
908
|
+
action: "session_exported",
|
|
909
|
+
output: flags.output
|
|
910
|
+
})) return;
|
|
911
|
+
if (globalFlags.format === "quiet") {
|
|
912
|
+
process.stdout.write(`${flags.output}\n`);
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
process.stdout.write(`exported session to ${flags.output}\n`);
|
|
916
|
+
}
|
|
917
|
+
async function handleSessionsImport(explicitAgentName, archivePath, flags, command, config) {
|
|
918
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
919
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
920
|
+
const result = await importSession(archivePath, {
|
|
921
|
+
name: flags.name,
|
|
922
|
+
newCwd: flags.destinationCwd ? path.resolve(globalFlags.cwd, flags.destinationCwd) : void 0,
|
|
923
|
+
expectedAgentName: globalFlags.agent ? void 0 : agent.agentName,
|
|
924
|
+
expectedAgentCommand: agent.agentCommand
|
|
925
|
+
});
|
|
926
|
+
if (emitJsonResult(globalFlags.format, {
|
|
927
|
+
action: "session_imported",
|
|
928
|
+
record_id: result.record_id,
|
|
929
|
+
cwd: result.cwd
|
|
930
|
+
})) return;
|
|
931
|
+
if (globalFlags.format === "quiet") {
|
|
932
|
+
process.stdout.write(`${result.record_id}\n`);
|
|
933
|
+
return;
|
|
934
|
+
}
|
|
935
|
+
process.stdout.write(`imported session ${result.record_id} at ${result.cwd}\n`);
|
|
936
|
+
}
|
|
937
|
+
async function handleSessionsPrune(explicitAgentName, flags, command, config) {
|
|
938
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
939
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
940
|
+
const [{ pruneSessions }, { printPruneResultByFormat }] = await Promise.all([loadSessionModule(), loadOutputRenderModule()]);
|
|
941
|
+
const olderThanMs = flags.olderThan != null ? flags.olderThan * 24 * 60 * 60 * 1e3 : void 0;
|
|
942
|
+
printPruneResultByFormat(await pruneSessions({
|
|
943
|
+
agentCommand: agent.agentCommand,
|
|
944
|
+
before: flags.before,
|
|
945
|
+
olderThanMs,
|
|
946
|
+
includeHistory: flags.includeHistory,
|
|
947
|
+
dryRun: flags.dryRun
|
|
948
|
+
}), globalFlags.format);
|
|
949
|
+
}
|
|
950
|
+
// src/cli/compare-args.ts
|
|
951
|
+
function addCompareOptions(command) {
|
|
952
|
+
return command.option("--cwd <dir>", "Target workspace").option("--approve-all", "Auto-approve all permission requests").option("--approve-reads", "Auto-approve read/search requests and prompt for writes").option("--deny-all", "Deny all permission requests").option("--timeout <seconds>", "Per-agent timeout in seconds", parseTimeoutSeconds).option("--format <fmt>", "Output format: text, json, quiet", parseOutputFormat$1).option("--json", "Alias for --format json").option("-f, --file <path>", "Read prompt text from file path (use - for stdin)", (value) => parseNonEmptyValue("Prompt file", value)).option("--prompt-file <path>", "Alias for --file", (value) => parseNonEmptyValue("Prompt file", value));
|
|
953
|
+
}
|
|
954
|
+
const VALUE_FLAGS = new Set(addCompareOptions(new Command()).options.filter((option) => option.required).flatMap((option) => [option.long, option.short].filter((flag) => flag !== void 0)));
|
|
955
|
+
function captureCompareOutputFlag(output, token, nextToken) {
|
|
956
|
+
if (token === "--json") output.json = true;
|
|
957
|
+
else if (token === "--format") output.format = nextToken;
|
|
958
|
+
else if (token.startsWith("--format=")) output.format = token.slice(9);
|
|
959
|
+
}
|
|
960
|
+
function scanCompareArgs(argv) {
|
|
961
|
+
let cwd;
|
|
962
|
+
const output = {};
|
|
963
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
964
|
+
const token = argv[index];
|
|
965
|
+
if (token === "--") return {
|
|
966
|
+
cwd,
|
|
967
|
+
...output,
|
|
968
|
+
promptTokens: argv.slice(index + 1)
|
|
969
|
+
};
|
|
970
|
+
if (token === "--cwd") cwd = argv[index + 1];
|
|
971
|
+
else if (token.startsWith("--cwd=")) cwd = token.slice(6);
|
|
972
|
+
captureCompareOutputFlag(output, token, argv[index + 1]);
|
|
973
|
+
if (VALUE_FLAGS.has(token)) index += 1;
|
|
974
|
+
}
|
|
975
|
+
return {
|
|
976
|
+
cwd,
|
|
977
|
+
...output
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
// src/cli/compare-command.ts
|
|
981
|
+
const DEFAULT_COMPARE_TIMEOUT_MS = 3e5;
|
|
982
|
+
const FINAL_MESSAGE_PREVIEW_CHARS = 200;
|
|
983
|
+
function asRecord$2(value) {
|
|
984
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
985
|
+
}
|
|
986
|
+
function numberField(source, keys) {
|
|
987
|
+
if (!source) return null;
|
|
988
|
+
for (const key of keys) {
|
|
989
|
+
const value = source[key];
|
|
990
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
991
|
+
}
|
|
992
|
+
return null;
|
|
993
|
+
}
|
|
994
|
+
function collapseWhitespace(value) {
|
|
995
|
+
return value.replace(/\s+/g, " ").trim();
|
|
996
|
+
}
|
|
997
|
+
function truncate(value, maxChars) {
|
|
998
|
+
if (value.length <= maxChars) return value;
|
|
999
|
+
return `${value.slice(0, Math.max(0, maxChars - 3))}...`;
|
|
1000
|
+
}
|
|
1001
|
+
function splitCompareArgs(args, filePath, promptTokens) {
|
|
1002
|
+
if (promptTokens !== void 0) {
|
|
1003
|
+
const agents = args.slice(0, args.length - promptTokens.length);
|
|
1004
|
+
if (agents.length === 0) throw new InvalidArgumentError("At least one agent is required");
|
|
1005
|
+
return {
|
|
1006
|
+
agents,
|
|
1007
|
+
promptText: promptTokens.join(" ")
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
if (filePath) {
|
|
1011
|
+
if (args.length === 0) throw new InvalidArgumentError("At least one agent is required");
|
|
1012
|
+
return {
|
|
1013
|
+
agents: args,
|
|
1014
|
+
promptText: ""
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
if (args.length < 2) throw new InvalidArgumentError("Usage: acpx compare <agent>... '<prompt>'");
|
|
1018
|
+
return {
|
|
1019
|
+
agents: args.slice(0, -1),
|
|
1020
|
+
promptText: args[args.length - 1] ?? ""
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
function captureUsage(update, capture) {
|
|
1024
|
+
const source = asRecord$2(asRecord$2(update._meta)?.usage) ?? update;
|
|
1025
|
+
capture.usage = {
|
|
1026
|
+
input_tokens: numberField(source, ["input_tokens", "inputTokens"]) ?? void 0,
|
|
1027
|
+
output_tokens: numberField(source, ["output_tokens", "outputTokens"]) ?? void 0,
|
|
1028
|
+
total_tokens: numberField(source, ["total_tokens", "totalTokens"]) ?? void 0
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
function captureSessionUpdate(notification, capture) {
|
|
1032
|
+
const update = asRecord$2(notification.update);
|
|
1033
|
+
if (!update) return;
|
|
1034
|
+
if (update.sessionUpdate === "agent_message_chunk") {
|
|
1035
|
+
const content = asRecord$2(update.content);
|
|
1036
|
+
if (content?.type === "text" && typeof content.text === "string") capture.finalMessage += content.text;
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1039
|
+
if (update.sessionUpdate === "usage_update") captureUsage(update, capture);
|
|
1040
|
+
}
|
|
1041
|
+
function rowStatusFromResult(result) {
|
|
1042
|
+
if (result.stopReason === "cancelled") return "cancelled";
|
|
1043
|
+
return result.permissionStats.denied + result.permissionStats.cancelled > 0 ? "permission_denied" : "ok";
|
|
1044
|
+
}
|
|
1045
|
+
function rowStatusFromError(error) {
|
|
1046
|
+
if (error instanceof TimeoutError) return "cancelled";
|
|
1047
|
+
const { code } = normalizeOutputError(error);
|
|
1048
|
+
return code === "PERMISSION_PROMPT_UNAVAILABLE" || code === "PERMISSION_DENIED" ? "permission_denied" : "error";
|
|
1049
|
+
}
|
|
1050
|
+
async function runAgentForCompare(params) {
|
|
1051
|
+
const capture = {
|
|
1052
|
+
finalMessage: "",
|
|
1053
|
+
usage: {},
|
|
1054
|
+
permissionStats: {
|
|
1055
|
+
requested: 0,
|
|
1056
|
+
approved: 0,
|
|
1057
|
+
denied: 0,
|
|
1058
|
+
cancelled: 0
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
const t0 = performance.now();
|
|
1062
|
+
let status;
|
|
1063
|
+
let stopReason = null;
|
|
1064
|
+
let error = null;
|
|
1065
|
+
let permissionStats;
|
|
1066
|
+
let meta;
|
|
1067
|
+
try {
|
|
1068
|
+
const agent = resolveAgentInvocation(params.agentName, params.globalFlags, params.config);
|
|
1069
|
+
const result = await runOnce({
|
|
1070
|
+
...sessionConnectionOptions(params.globalFlags, params.config),
|
|
1071
|
+
agentCommand: agent.agentCommand,
|
|
1072
|
+
agentArgv: agent.agentArgv,
|
|
1073
|
+
cwd: agent.cwd,
|
|
1074
|
+
prompt: params.prompt,
|
|
1075
|
+
permissionMode: params.permissionMode,
|
|
1076
|
+
permissionPolicy: params.permissionPolicy,
|
|
1077
|
+
outputFormatter: DISCARD_OUTPUT_FORMATTER,
|
|
1078
|
+
suppressSdkConsoleErrors: true,
|
|
1079
|
+
timeoutMs: params.globalFlags.timeout ?? DEFAULT_COMPARE_TIMEOUT_MS,
|
|
1080
|
+
promptRetries: params.globalFlags.promptRetries,
|
|
1081
|
+
sessionOptions: sessionOptionsFromGlobalFlags(params.globalFlags),
|
|
1082
|
+
onSessionUpdate: (notification) => captureSessionUpdate(notification, capture),
|
|
1083
|
+
onPermissionStats: (stats) => {
|
|
1084
|
+
capture.permissionStats = stats;
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
permissionStats = result.permissionStats;
|
|
1088
|
+
status = rowStatusFromResult(result);
|
|
1089
|
+
stopReason = result.stopReason;
|
|
1090
|
+
meta = result._meta;
|
|
1091
|
+
} catch (caught) {
|
|
1092
|
+
permissionStats = capture.permissionStats;
|
|
1093
|
+
status = rowStatusFromError(caught);
|
|
1094
|
+
error = truncate(collapseWhitespace(caught instanceof Error ? caught.message : String(caught)), FINAL_MESSAGE_PREVIEW_CHARS);
|
|
1095
|
+
}
|
|
1096
|
+
return {
|
|
1097
|
+
agent: params.agentName,
|
|
1098
|
+
status,
|
|
1099
|
+
stop_reason: stopReason,
|
|
1100
|
+
wall_ms: Math.round(performance.now() - t0),
|
|
1101
|
+
input_tokens: capture.usage.input_tokens ?? null,
|
|
1102
|
+
output_tokens: capture.usage.output_tokens ?? null,
|
|
1103
|
+
total_tokens: capture.usage.total_tokens ?? null,
|
|
1104
|
+
final_message: truncate(collapseWhitespace(capture.finalMessage), FINAL_MESSAGE_PREVIEW_CHARS),
|
|
1105
|
+
error,
|
|
1106
|
+
permission_requests: permissionStats.requested,
|
|
1107
|
+
permission_denied: permissionStats.denied + permissionStats.cancelled,
|
|
1108
|
+
...meta === void 0 ? {} : { _meta: meta }
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
function formatCell(value) {
|
|
1112
|
+
if (value == null || value === "") return "-";
|
|
1113
|
+
if (typeof value === "string") return collapseWhitespace(value);
|
|
1114
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
1115
|
+
return collapseWhitespace(JSON.stringify(value));
|
|
1116
|
+
}
|
|
1117
|
+
function renderTable(rows) {
|
|
1118
|
+
const headers = [
|
|
1119
|
+
"agent",
|
|
1120
|
+
"status",
|
|
1121
|
+
"wall_ms",
|
|
1122
|
+
"input",
|
|
1123
|
+
"output",
|
|
1124
|
+
"total",
|
|
1125
|
+
"permissions",
|
|
1126
|
+
"stop_reason",
|
|
1127
|
+
"final_message",
|
|
1128
|
+
"error"
|
|
1129
|
+
];
|
|
1130
|
+
const body = rows.map((row) => [
|
|
1131
|
+
row.agent,
|
|
1132
|
+
row.status,
|
|
1133
|
+
row.wall_ms,
|
|
1134
|
+
row.input_tokens,
|
|
1135
|
+
row.output_tokens,
|
|
1136
|
+
row.total_tokens,
|
|
1137
|
+
`${row.permission_denied}/${row.permission_requests}`,
|
|
1138
|
+
row.stop_reason,
|
|
1139
|
+
row.final_message,
|
|
1140
|
+
row.error
|
|
1141
|
+
]);
|
|
1142
|
+
const widths = headers.map((header, index) => Math.max(header.length, ...body.map((cells) => formatCell(cells[index]).length)));
|
|
1143
|
+
const formatRow = (cells) => cells.map((cell, index) => truncate(formatCell(cell), widths[index] ?? 24).padEnd(widths[index] ?? 24)).join(" ").trimEnd();
|
|
1144
|
+
return [
|
|
1145
|
+
formatRow(headers),
|
|
1146
|
+
widths.map((width) => "-".repeat(width)).join(" "),
|
|
1147
|
+
...body.map(formatRow)
|
|
1148
|
+
].join("\n");
|
|
1149
|
+
}
|
|
1150
|
+
function printRows(rows, format) {
|
|
1151
|
+
if (format === "json") {
|
|
1152
|
+
process.stdout.write(`${JSON.stringify(rows)}\n`);
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
if (format === "quiet") {
|
|
1156
|
+
for (const row of rows) process.stdout.write(`${row.agent}\t${row.status}\n`);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
process.stdout.write(`${renderTable(rows)}\n`);
|
|
1160
|
+
}
|
|
1161
|
+
function updateCompareExitCode(rows) {
|
|
1162
|
+
if (rows.some((row) => row.status === "error")) {
|
|
1163
|
+
process.exitCode = EXIT_CODES.ERROR;
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
if (rows.some((row) => row.status === "permission_denied")) {
|
|
1167
|
+
process.exitCode = EXIT_CODES.PERMISSION_DENIED;
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
if (rows.some((row) => row.status === "cancelled")) process.exitCode = EXIT_CODES.TIMEOUT;
|
|
1171
|
+
}
|
|
1172
|
+
async function runCompareAgents(agents, run) {
|
|
1173
|
+
const rows = [];
|
|
1174
|
+
let interrupted = false;
|
|
1175
|
+
const onInterrupt = () => {
|
|
1176
|
+
interrupted = true;
|
|
1177
|
+
};
|
|
1178
|
+
const signals = [
|
|
1179
|
+
"SIGINT",
|
|
1180
|
+
"SIGTERM",
|
|
1181
|
+
"SIGHUP"
|
|
1182
|
+
];
|
|
1183
|
+
for (const signal of signals) process.once(signal, onInterrupt);
|
|
1184
|
+
try {
|
|
1185
|
+
for (const agentName of agents) {
|
|
1186
|
+
if (interrupted) break;
|
|
1187
|
+
const row = await run(agentName);
|
|
1188
|
+
rows.push(interrupted ? {
|
|
1189
|
+
...row,
|
|
1190
|
+
status: "cancelled",
|
|
1191
|
+
error: "Interrupted"
|
|
1192
|
+
} : row);
|
|
1193
|
+
}
|
|
1194
|
+
} finally {
|
|
1195
|
+
for (const signal of signals) process.off(signal, onInterrupt);
|
|
1196
|
+
}
|
|
1197
|
+
return {
|
|
1198
|
+
rows,
|
|
1199
|
+
interrupted
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
function resolvePromptFile(flags) {
|
|
1203
|
+
if (flags.file && flags.promptFile && flags.file !== flags.promptFile) throw new InvalidArgumentError("Use only one prompt file flag: --file or --prompt-file");
|
|
1204
|
+
return flags.file ?? flags.promptFile;
|
|
1205
|
+
}
|
|
1206
|
+
function registerCompareCommand(program, config) {
|
|
1207
|
+
addCompareOptions(program.command("compare").description("Run one prompt across multiple agents and summarize the results").argument("<args...>", "Agents followed by prompt text, or agents with --file")).action(async function(args, flags) {
|
|
1208
|
+
if (config.disableExec) throw new Error("compare subcommand is disabled by configuration (disableExec: true)");
|
|
1209
|
+
const globalFlags = resolveGlobalFlags(this, config);
|
|
1210
|
+
if (flags.cwd !== void 0) globalFlags.cwd = path.resolve(flags.cwd);
|
|
1211
|
+
if (globalFlags.agent) throw new InvalidArgumentError("Do not combine compare with --agent; pass agent names");
|
|
1212
|
+
const outputPolicy = resolveOutputPolicy(globalFlags.format, globalFlags.jsonStrict === true);
|
|
1213
|
+
const promptFile = resolvePromptFile(flags);
|
|
1214
|
+
const { promptTokens } = scanCompareArgs(program.args.slice(1));
|
|
1215
|
+
const { agents, promptText } = splitCompareArgs(args, promptFile, promptTokens);
|
|
1216
|
+
const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);
|
|
1217
|
+
const prompt = await readPromptInput(promptFile, promptText, globalFlags.cwd, "final argument");
|
|
1218
|
+
const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);
|
|
1219
|
+
const { rows, interrupted } = await runCompareAgents(agents, async (agentName) => await runAgentForCompare({
|
|
1220
|
+
agentName,
|
|
1221
|
+
prompt,
|
|
1222
|
+
config,
|
|
1223
|
+
globalFlags,
|
|
1224
|
+
permissionMode,
|
|
1225
|
+
permissionPolicy
|
|
1226
|
+
}));
|
|
1227
|
+
printRows(rows, outputPolicy.format);
|
|
1228
|
+
if (interrupted) process.exitCode = EXIT_CODES.INTERRUPTED;
|
|
1229
|
+
else updateCompareExitCode(rows);
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
// src/mcp-servers.ts
|
|
1233
|
+
function asRecord$1(value) {
|
|
1234
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
1235
|
+
return value;
|
|
1236
|
+
}
|
|
1237
|
+
function parseNonEmptyString(value, path) {
|
|
1238
|
+
if (typeof value !== "string" || value.trim().length === 0) throw new Error(`Invalid ${path}: expected non-empty string`);
|
|
1239
|
+
return value.trim();
|
|
1240
|
+
}
|
|
1241
|
+
function parseString(value, path) {
|
|
1242
|
+
if (typeof value !== "string") throw new Error(`Invalid ${path}: expected string`);
|
|
1243
|
+
return value;
|
|
1244
|
+
}
|
|
1245
|
+
function parseNameValuePairs(value, path) {
|
|
1246
|
+
if (value == null) return [];
|
|
1247
|
+
if (!Array.isArray(value)) throw new Error(`Invalid ${path}: expected array`);
|
|
1248
|
+
const entries = [];
|
|
1249
|
+
for (const [index, rawEntry] of value.entries()) {
|
|
1250
|
+
const entry = asRecord$1(rawEntry);
|
|
1251
|
+
if (!entry) throw new Error(`Invalid ${path}[${index}]: expected object`);
|
|
1252
|
+
entries.push({
|
|
1253
|
+
name: parseNonEmptyString(entry.name, `${path}[${index}].name`),
|
|
1254
|
+
value: parseString(entry.value, `${path}[${index}].value`)
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
return entries;
|
|
1258
|
+
}
|
|
1259
|
+
function parseArgs(value, path) {
|
|
1260
|
+
if (value == null) return [];
|
|
1261
|
+
if (!Array.isArray(value)) throw new Error(`Invalid ${path}: expected array`);
|
|
1262
|
+
const args = [];
|
|
1263
|
+
for (const [index, rawArg] of value.entries()) args.push(parseString(rawArg, `${path}[${index}]`));
|
|
1264
|
+
return args;
|
|
1265
|
+
}
|
|
1266
|
+
function parseMeta(value, path) {
|
|
1267
|
+
if (value === void 0) return;
|
|
1268
|
+
if (value === null) return null;
|
|
1269
|
+
if (!asRecord$1(value)) throw new Error(`Invalid ${path}: expected object or null`);
|
|
1270
|
+
return value;
|
|
1271
|
+
}
|
|
1272
|
+
function parseServerType(rawType, path) {
|
|
1273
|
+
if (rawType === void 0) return "stdio";
|
|
1274
|
+
const parsedType = parseNonEmptyString(rawType, `${path}.type`);
|
|
1275
|
+
if (parsedType !== "http" && parsedType !== "sse" && parsedType !== "stdio") throw new Error(`Invalid ${path}.type: expected http, sse, or stdio`);
|
|
1276
|
+
return parsedType;
|
|
1277
|
+
}
|
|
1278
|
+
function parseHttpServer(serverRecord, path, type, name, _meta) {
|
|
1279
|
+
return {
|
|
1280
|
+
type,
|
|
1281
|
+
name,
|
|
1282
|
+
url: parseNonEmptyString(serverRecord.url, `${path}.url`),
|
|
1283
|
+
headers: parseNameValuePairs(serverRecord.headers, `${path}.headers`),
|
|
1284
|
+
_meta
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
function parseStdioServer(serverRecord, path, name, _meta) {
|
|
1288
|
+
return {
|
|
1289
|
+
name,
|
|
1290
|
+
command: parseNonEmptyString(serverRecord.command, `${path}.command`),
|
|
1291
|
+
args: parseArgs(serverRecord.args, `${path}.args`),
|
|
1292
|
+
env: parseNameValuePairs(serverRecord.env, `${path}.env`),
|
|
1293
|
+
_meta
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1296
|
+
function parseServer(rawServer, path) {
|
|
1297
|
+
const serverRecord = asRecord$1(rawServer);
|
|
1298
|
+
if (!serverRecord) throw new Error(`Invalid ${path}: expected object`);
|
|
1299
|
+
const name = parseNonEmptyString(serverRecord.name, `${path}.name`);
|
|
1300
|
+
const _meta = parseMeta(serverRecord._meta, `${path}._meta`);
|
|
1301
|
+
const typeValue = parseServerType(serverRecord.type, path);
|
|
1302
|
+
if (typeValue === "http" || typeValue === "sse") return parseHttpServer(serverRecord, path, typeValue, name, _meta);
|
|
1303
|
+
return parseStdioServer(serverRecord, path, name, _meta);
|
|
1304
|
+
}
|
|
1305
|
+
function parseMcpServers(value, sourcePath, fieldName = "mcpServers") {
|
|
1306
|
+
const fieldPath = `${fieldName} in ${sourcePath}`;
|
|
1307
|
+
if (!Array.isArray(value)) throw new Error(`Invalid ${fieldPath}: expected array`);
|
|
1308
|
+
const parsed = [];
|
|
1309
|
+
for (const [index, rawServer] of value.entries()) parsed.push(parseServer(rawServer, `${fieldName}[${index}] in ${sourcePath}`));
|
|
1310
|
+
return parsed;
|
|
1311
|
+
}
|
|
1312
|
+
function parseOptionalMcpServers(value, sourcePath, fieldName = "mcpServers") {
|
|
1313
|
+
if (value === void 0) return;
|
|
1314
|
+
return parseMcpServers(value, sourcePath, fieldName);
|
|
1315
|
+
}
|
|
1316
|
+
// src/cli/config.ts
|
|
1317
|
+
const DEFAULT_TTL_MS = 3e5;
|
|
1318
|
+
const DEFAULT_PERMISSION_MODE = "approve-reads";
|
|
1319
|
+
const DEFAULT_NON_INTERACTIVE_PERMISSION_POLICY = "deny";
|
|
1320
|
+
const DEFAULT_AUTH_POLICY = "skip";
|
|
1321
|
+
const DEFAULT_OUTPUT_FORMAT = "text";
|
|
1322
|
+
const DEFAULT_QUEUE_MAX_DEPTH = 16;
|
|
1323
|
+
const DEFAULT_DISABLE_EXEC = false;
|
|
1324
|
+
const VALID_PERMISSION_MODES = /* @__PURE__ */ new Set([
|
|
1325
|
+
"approve-all",
|
|
1326
|
+
"approve-reads",
|
|
1327
|
+
"deny-all"
|
|
1328
|
+
]);
|
|
1329
|
+
const VALID_NON_INTERACTIVE_PERMISSION_POLICIES = /* @__PURE__ */ new Set(["deny", "fail"]);
|
|
1330
|
+
const VALID_AUTH_POLICIES = /* @__PURE__ */ new Set(["skip", "fail"]);
|
|
1331
|
+
const VALID_OUTPUT_FORMATS = /* @__PURE__ */ new Set([
|
|
1332
|
+
"text",
|
|
1333
|
+
"json",
|
|
1334
|
+
"quiet"
|
|
1335
|
+
]);
|
|
1336
|
+
function defaultGlobalConfigPath() {
|
|
1337
|
+
return path.join(os.homedir(), ".acpx", "config.json");
|
|
1338
|
+
}
|
|
1339
|
+
function projectConfigPath(cwd) {
|
|
1340
|
+
return path.join(path.resolve(cwd), ".acpxrc.json");
|
|
1341
|
+
}
|
|
1342
|
+
function isObject(value) {
|
|
1343
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1344
|
+
}
|
|
1345
|
+
function parseTtlMs(value, sourcePath) {
|
|
1346
|
+
if (value == null) return;
|
|
1347
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new Error(`Invalid config ttl in ${sourcePath}: expected non-negative seconds`);
|
|
1348
|
+
const milliseconds = toTimerMilliseconds(value, true);
|
|
1349
|
+
if (milliseconds === void 0) throw new Error(`Invalid config ttl in ${sourcePath}: exceeds maximum supported timer delay`);
|
|
1350
|
+
return milliseconds;
|
|
1351
|
+
}
|
|
1352
|
+
function parseTimeoutMs(value, sourcePath) {
|
|
1353
|
+
if (value == null) return;
|
|
1354
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) throw new Error(`Invalid config timeout in ${sourcePath}: expected positive seconds or null`);
|
|
1355
|
+
const milliseconds = toTimerMilliseconds(value, false);
|
|
1356
|
+
if (milliseconds === void 0) throw new Error(`Invalid config timeout in ${sourcePath}: exceeds maximum supported timer delay`);
|
|
1357
|
+
return milliseconds;
|
|
1358
|
+
}
|
|
1359
|
+
function parseQueueMaxDepth(value, sourcePath) {
|
|
1360
|
+
if (value == null) return;
|
|
1361
|
+
if (!Number.isInteger(value) || value <= 0) throw new Error(`Invalid config queueMaxDepth in ${sourcePath}: expected positive integer`);
|
|
1362
|
+
return value;
|
|
1363
|
+
}
|
|
1364
|
+
function parsePermissionMode(value, sourcePath) {
|
|
1365
|
+
if (value == null) return;
|
|
1366
|
+
if (typeof value !== "string" || !VALID_PERMISSION_MODES.has(value)) throw new Error(`Invalid config defaultPermissions in ${sourcePath}: expected approve-all, approve-reads, or deny-all`);
|
|
1367
|
+
return value;
|
|
1368
|
+
}
|
|
1369
|
+
function parseNonInteractivePermissionPolicy(value, sourcePath) {
|
|
1370
|
+
if (value == null) return;
|
|
1371
|
+
if (typeof value !== "string" || !VALID_NON_INTERACTIVE_PERMISSION_POLICIES.has(value)) throw new Error(`Invalid config nonInteractivePermissions in ${sourcePath}: expected deny or fail`);
|
|
1372
|
+
return value;
|
|
1373
|
+
}
|
|
1374
|
+
function parseAuthPolicy(value, sourcePath) {
|
|
1375
|
+
if (value == null) return;
|
|
1376
|
+
if (typeof value !== "string" || !VALID_AUTH_POLICIES.has(value)) throw new Error(`Invalid config authPolicy in ${sourcePath}: expected skip or fail`);
|
|
1377
|
+
return value;
|
|
1378
|
+
}
|
|
1379
|
+
function parseOutputFormat(value, sourcePath) {
|
|
1380
|
+
if (value == null) return;
|
|
1381
|
+
if (typeof value !== "string" || !VALID_OUTPUT_FORMATS.has(value)) throw new Error(`Invalid config format in ${sourcePath}: expected text, json, or quiet`);
|
|
1382
|
+
return value;
|
|
1383
|
+
}
|
|
1384
|
+
function parseDefaultAgent(value, sourcePath) {
|
|
1385
|
+
if (value == null) return;
|
|
1386
|
+
if (typeof value !== "string" || value.trim().length === 0) throw new Error(`Invalid config defaultAgent in ${sourcePath}: expected non-empty string`);
|
|
1387
|
+
return normalizeAgentName$1(value);
|
|
1388
|
+
}
|
|
1389
|
+
function parseAgents(value, sourcePath) {
|
|
1390
|
+
if (value == null) return;
|
|
1391
|
+
if (!isObject(value)) throw new Error(`Invalid config agents in ${sourcePath}: expected object`);
|
|
1392
|
+
return Object.fromEntries(Object.entries(value).map(([name, raw]) => [normalizeAgentName$1(name), parseAgentEntry(raw, name, sourcePath)]));
|
|
1393
|
+
}
|
|
1394
|
+
function parseAgentEntry(raw, name, sourcePath) {
|
|
1395
|
+
if (!isObject(raw)) throw new Error(`Invalid config agents.${name} in ${sourcePath}: expected object with command`);
|
|
1396
|
+
return Object.prototype.hasOwnProperty.call(raw, "argv") ? parseArgvAgentEntry(raw, name, sourcePath) : parseLegacyAgentEntry(raw, name, sourcePath);
|
|
1397
|
+
}
|
|
1398
|
+
function parseArgvAgentEntry(raw, name, sourcePath) {
|
|
1399
|
+
if (Object.prototype.hasOwnProperty.call(raw, "command") || Object.prototype.hasOwnProperty.call(raw, "args")) throw new Error(`Invalid config agents.${name} in ${sourcePath}: use argv alone, not command or args`);
|
|
1400
|
+
const argv = parseAgentArgv(raw.argv, name, sourcePath);
|
|
1401
|
+
return {
|
|
1402
|
+
command: renderArgvIdentity(argv),
|
|
1403
|
+
argv
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
function parseLegacyAgentEntry(raw, name, sourcePath) {
|
|
1407
|
+
const command = raw.command;
|
|
1408
|
+
if (typeof command !== "string" || command.trim().length === 0) throw new Error(`Invalid config agents.${name}.command in ${sourcePath}: expected non-empty string`);
|
|
1409
|
+
const trimmedCommand = command.trim();
|
|
1410
|
+
if (!Object.prototype.hasOwnProperty.call(raw, "args")) return { command: trimmedCommand };
|
|
1411
|
+
if (/[\s'"]/u.test(trimmedCommand)) throw new Error(`Invalid config agents.${name}.command in ${sourcePath}: command must be an unquoted executable with no whitespace when args is present; migrate the complete launch to argv`);
|
|
1412
|
+
const args = parseAgentArgs(raw.args, name, sourcePath);
|
|
1413
|
+
return {
|
|
1414
|
+
command: args.length > 0 ? `${trimmedCommand} ${args.map(quoteCommandArg).join(" ")}` : trimmedCommand,
|
|
1415
|
+
argv: [trimmedCommand, ...args]
|
|
1416
|
+
};
|
|
1417
|
+
}
|
|
1418
|
+
function parseAgentArgv(value, agentName, sourcePath) {
|
|
1419
|
+
if (!Array.isArray(value) || value.length === 0) throw new Error(`Invalid config agents.${agentName}.argv in ${sourcePath}: expected non-empty array of strings`);
|
|
1420
|
+
const argv = value.map((arg, index) => {
|
|
1421
|
+
if (typeof arg !== "string") throw new Error(`Invalid config agents.${agentName}.argv[${index}] in ${sourcePath}: expected string`);
|
|
1422
|
+
return arg;
|
|
1423
|
+
});
|
|
1424
|
+
if (argv[0]?.length === 0) throw new Error(`Invalid config agents.${agentName}.argv[0] in ${sourcePath}: expected non-empty executable`);
|
|
1425
|
+
return argv;
|
|
1426
|
+
}
|
|
1427
|
+
function parseAgentArgs(value, agentName, sourcePath) {
|
|
1428
|
+
if (value == null) return [];
|
|
1429
|
+
if (!Array.isArray(value)) throw new Error(`Invalid config agents.${agentName}.args in ${sourcePath}: expected array of strings`);
|
|
1430
|
+
return value.map((arg, index) => {
|
|
1431
|
+
if (typeof arg !== "string") throw new Error(`Invalid config agents.${agentName}.args[${index}] in ${sourcePath}: expected string`);
|
|
1432
|
+
return arg;
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
function quoteCommandArg(value) {
|
|
1436
|
+
return JSON.stringify(value);
|
|
1437
|
+
}
|
|
1438
|
+
function parseAuth(value, sourcePath) {
|
|
1439
|
+
if (value == null) return;
|
|
1440
|
+
if (!isObject(value)) throw new Error(`Invalid config auth in ${sourcePath}: expected object`);
|
|
1441
|
+
const parsed = {};
|
|
1442
|
+
for (const [methodId, rawCredential] of Object.entries(value)) {
|
|
1443
|
+
if (typeof rawCredential !== "string" || rawCredential.trim().length === 0) throw new Error(`Invalid config auth.${methodId} in ${sourcePath}: expected non-empty string`);
|
|
1444
|
+
parsed[methodId] = rawCredential;
|
|
1445
|
+
}
|
|
1446
|
+
return parsed;
|
|
1447
|
+
}
|
|
1448
|
+
function parseDisableExec(value, sourcePath) {
|
|
1449
|
+
if (value == null) return;
|
|
1450
|
+
if (typeof value !== "boolean") throw new Error(`Invalid config disableExec in ${sourcePath}: expected boolean`);
|
|
1451
|
+
return value;
|
|
1452
|
+
}
|
|
1453
|
+
async function readConfigFile(filePath) {
|
|
1454
|
+
try {
|
|
1455
|
+
const payload = await fs$1.readFile(filePath, "utf8");
|
|
1456
|
+
let parsed;
|
|
1457
|
+
try {
|
|
1458
|
+
parsed = JSON.parse(payload);
|
|
1459
|
+
} catch (error) {
|
|
1460
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1461
|
+
throw new Error(`Invalid JSON in ${filePath}: ${reason}`, { cause: error });
|
|
1462
|
+
}
|
|
1463
|
+
if (!isObject(parsed)) throw new Error(`Invalid config in ${filePath}: expected top-level JSON object`);
|
|
1464
|
+
return parsed;
|
|
1465
|
+
} catch (error) {
|
|
1466
|
+
if (error.code === "ENOENT") return;
|
|
1467
|
+
throw error;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
async function loadExplicitMcpConfig(configuredPath) {
|
|
1471
|
+
if (!configuredPath) return;
|
|
1472
|
+
const config = await readConfigFile(configuredPath);
|
|
1473
|
+
if (config === void 0) throw new Error(`MCP config file not found: ${configuredPath}`);
|
|
1474
|
+
return config;
|
|
1475
|
+
}
|
|
1476
|
+
async function loadResolvedConfig(cwd, options = {}) {
|
|
1477
|
+
const globalPath = defaultGlobalConfigPath();
|
|
1478
|
+
const projectPath = projectConfigPath(cwd);
|
|
1479
|
+
const mcpConfigPath = options.mcpConfigPath ? path.resolve(cwd, options.mcpConfigPath) : void 0;
|
|
1480
|
+
const [globalConfig, projectConfig, mcpConfig] = await Promise.all([
|
|
1481
|
+
readConfigFile(globalPath),
|
|
1482
|
+
readConfigFile(projectPath),
|
|
1483
|
+
loadExplicitMcpConfig(mcpConfigPath)
|
|
1484
|
+
]);
|
|
1485
|
+
function resolveScalar(key, parse, fallback) {
|
|
1486
|
+
return parse(projectConfig?.[key], projectPath) ?? parse(globalConfig?.[key], globalPath) ?? fallback;
|
|
1487
|
+
}
|
|
1488
|
+
const scalar = {
|
|
1489
|
+
defaultAgent: resolveScalar("defaultAgent", parseDefaultAgent, DEFAULT_AGENT_NAME),
|
|
1490
|
+
defaultPermissions: resolveScalar("defaultPermissions", parsePermissionMode, DEFAULT_PERMISSION_MODE),
|
|
1491
|
+
nonInteractivePermissions: resolveScalar("nonInteractivePermissions", parseNonInteractivePermissionPolicy, DEFAULT_NON_INTERACTIVE_PERMISSION_POLICY),
|
|
1492
|
+
authPolicy: resolveScalar("authPolicy", parseAuthPolicy, DEFAULT_AUTH_POLICY),
|
|
1493
|
+
ttlMs: resolveScalar("ttl", parseTtlMs, DEFAULT_TTL_MS),
|
|
1494
|
+
timeoutMs: resolveTimeoutMs(projectConfig, projectPath, globalConfig, globalPath),
|
|
1495
|
+
queueMaxDepth: resolveScalar("queueMaxDepth", parseQueueMaxDepth, DEFAULT_QUEUE_MAX_DEPTH),
|
|
1496
|
+
format: resolveScalar("format", parseOutputFormat, DEFAULT_OUTPUT_FORMAT)
|
|
1497
|
+
};
|
|
1498
|
+
const agents = {
|
|
1499
|
+
...parseAgents(globalConfig?.agents, globalPath),
|
|
1500
|
+
...parseAgents(projectConfig?.agents, projectPath)
|
|
1501
|
+
};
|
|
1502
|
+
const auth = {
|
|
1503
|
+
...parseAuth(globalConfig?.auth, globalPath),
|
|
1504
|
+
...parseAuth(projectConfig?.auth, projectPath)
|
|
1505
|
+
};
|
|
1506
|
+
const mcpServers = resolveMcpServers(projectConfig, projectPath, globalConfig, globalPath, mcpConfig, mcpConfigPath);
|
|
1507
|
+
const disableExec = resolveScalar("disableExec", parseDisableExec, DEFAULT_DISABLE_EXEC);
|
|
1508
|
+
return {
|
|
1509
|
+
...scalar,
|
|
1510
|
+
agents,
|
|
1511
|
+
auth,
|
|
1512
|
+
disableExec,
|
|
1513
|
+
mcpServers,
|
|
1514
|
+
globalPath,
|
|
1515
|
+
projectPath,
|
|
1516
|
+
mcpConfigPath,
|
|
1517
|
+
mcpConfigFingerprint: mcpConfigPath ? createHash("sha256").update(JSON.stringify(mcpServers)).digest("hex") : void 0,
|
|
1518
|
+
hasGlobalConfig: globalConfig !== void 0,
|
|
1519
|
+
hasProjectConfig: projectConfig !== void 0
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
function hasConfigKey(config, key) {
|
|
1523
|
+
return config != null && Object.prototype.hasOwnProperty.call(config, key);
|
|
1524
|
+
}
|
|
1525
|
+
function resolveTimeoutMs(projectConfig, projectPath, globalConfig, globalPath) {
|
|
1526
|
+
if (hasConfigKey(projectConfig, "timeout")) return parseTimeoutMs(projectConfig?.timeout, projectPath);
|
|
1527
|
+
if (hasConfigKey(globalConfig, "timeout")) return parseTimeoutMs(globalConfig?.timeout, globalPath);
|
|
1528
|
+
}
|
|
1529
|
+
function resolveMcpServers(projectConfig, projectPath, globalConfig, globalPath, mcpConfig, mcpConfigPath) {
|
|
1530
|
+
if (mcpConfigPath) return parseMcpServers(mcpConfig?.mcpServers, mcpConfigPath);
|
|
1531
|
+
if (hasConfigKey(projectConfig, "mcpServers")) return parseMcpServers(projectConfig?.mcpServers, projectPath);
|
|
1532
|
+
if (hasConfigKey(globalConfig, "mcpServers")) return parseMcpServers(globalConfig?.mcpServers, globalPath);
|
|
1533
|
+
return [];
|
|
1534
|
+
}
|
|
1535
|
+
function toConfigDisplay(config) {
|
|
1536
|
+
const agents = Object.fromEntries(Object.entries(config.agents).map(([name, agent]) => [name, agent.argv ? { argv: [...agent.argv] } : { command: agent.command }]));
|
|
1537
|
+
return {
|
|
1538
|
+
defaultAgent: config.defaultAgent,
|
|
1539
|
+
defaultPermissions: config.defaultPermissions,
|
|
1540
|
+
nonInteractivePermissions: config.nonInteractivePermissions,
|
|
1541
|
+
authPolicy: config.authPolicy,
|
|
1542
|
+
ttl: config.ttlMs / 1e3,
|
|
1543
|
+
timeout: config.timeoutMs == null ? null : config.timeoutMs / 1e3,
|
|
1544
|
+
queueMaxDepth: config.queueMaxDepth,
|
|
1545
|
+
format: config.format,
|
|
1546
|
+
agents,
|
|
1547
|
+
authMethods: Object.keys(config.auth).toSorted(),
|
|
1548
|
+
disableExec: config.disableExec
|
|
1549
|
+
};
|
|
1550
|
+
}
|
|
1551
|
+
async function initGlobalConfigFile() {
|
|
1552
|
+
const configPath = defaultGlobalConfigPath();
|
|
1553
|
+
await fs$1.mkdir(path.dirname(configPath), {
|
|
1554
|
+
recursive: true,
|
|
1555
|
+
mode: 448
|
|
1556
|
+
});
|
|
1557
|
+
try {
|
|
1558
|
+
await fs$1.access(configPath);
|
|
1559
|
+
return {
|
|
1560
|
+
path: configPath,
|
|
1561
|
+
created: false
|
|
1562
|
+
};
|
|
1563
|
+
} catch {}
|
|
1564
|
+
const payload = {
|
|
1565
|
+
defaultAgent: DEFAULT_AGENT_NAME,
|
|
1566
|
+
defaultPermissions: "approve-all",
|
|
1567
|
+
nonInteractivePermissions: "deny",
|
|
1568
|
+
authPolicy: "skip",
|
|
1569
|
+
ttl: 300,
|
|
1570
|
+
timeout: null,
|
|
1571
|
+
queueMaxDepth: DEFAULT_QUEUE_MAX_DEPTH,
|
|
1572
|
+
format: "text",
|
|
1573
|
+
agents: {},
|
|
1574
|
+
auth: {}
|
|
1575
|
+
};
|
|
1576
|
+
try {
|
|
1577
|
+
await fs$1.writeFile(configPath, `${JSON.stringify(payload, null, 2)}\n`, {
|
|
1578
|
+
encoding: "utf8",
|
|
1579
|
+
flag: "wx",
|
|
1580
|
+
mode: 384
|
|
1581
|
+
});
|
|
1582
|
+
} catch (error) {
|
|
1583
|
+
if (error.code === "EEXIST") return {
|
|
1584
|
+
path: configPath,
|
|
1585
|
+
created: false
|
|
1586
|
+
};
|
|
1587
|
+
throw error;
|
|
1588
|
+
}
|
|
1589
|
+
return {
|
|
1590
|
+
path: configPath,
|
|
1591
|
+
created: true
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
// src/cli/config-command.ts
|
|
1595
|
+
async function handleConfigShow(command, config) {
|
|
1596
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
1597
|
+
const payload = {
|
|
1598
|
+
...toConfigDisplay(config),
|
|
1599
|
+
paths: {
|
|
1600
|
+
global: config.globalPath,
|
|
1601
|
+
project: config.projectPath,
|
|
1602
|
+
...config.mcpConfigPath ? { mcp: config.mcpConfigPath } : {}
|
|
1603
|
+
},
|
|
1604
|
+
loaded: {
|
|
1605
|
+
global: config.hasGlobalConfig,
|
|
1606
|
+
project: config.hasProjectConfig
|
|
1607
|
+
}
|
|
1608
|
+
};
|
|
1609
|
+
if (globalFlags.format === "json") {
|
|
1610
|
+
process.stdout.write(`${JSON.stringify(payload)}\n`);
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
1614
|
+
}
|
|
1615
|
+
async function handleConfigInit(command, config) {
|
|
1616
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
1617
|
+
const result = await initGlobalConfigFile();
|
|
1618
|
+
if (globalFlags.format === "json") {
|
|
1619
|
+
process.stdout.write(`${JSON.stringify({
|
|
1620
|
+
path: result.path,
|
|
1621
|
+
created: result.created
|
|
1622
|
+
})}\n`);
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1625
|
+
if (globalFlags.format === "quiet") {
|
|
1626
|
+
process.stdout.write(`${result.path}\n`);
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
if (result.created) {
|
|
1630
|
+
process.stdout.write(`Created ${result.path}\n`);
|
|
1631
|
+
return;
|
|
1632
|
+
}
|
|
1633
|
+
process.stdout.write(`Config already exists: ${result.path}\n`);
|
|
1634
|
+
}
|
|
1635
|
+
function registerConfigCommand(program, config) {
|
|
1636
|
+
const configCommand = program.command("config").description("Inspect and initialize acpx configuration");
|
|
1637
|
+
configCommand.command("show").description("Show resolved config").option("--format <fmt>", "Output format: text, json, quiet", parseOutputFormat$1).action(async function() {
|
|
1638
|
+
await handleConfigShow(this, config);
|
|
1639
|
+
});
|
|
1640
|
+
configCommand.command("init").description("Create global config template").option("--format <fmt>", "Output format: text, json, quiet", parseOutputFormat$1).action(async function() {
|
|
1641
|
+
await handleConfigInit(this, config);
|
|
1642
|
+
});
|
|
1643
|
+
configCommand.action(async function() {
|
|
1644
|
+
await handleConfigShow(this, config);
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
// src/cli/output/render.ts
|
|
1648
|
+
var render_exports = /* @__PURE__ */ __exportAll({
|
|
1649
|
+
agentSessionIdPayload: () => agentSessionIdPayload,
|
|
1650
|
+
classifySessionConnectionStatus: () => classifySessionConnectionStatus,
|
|
1651
|
+
formatPromptSessionBannerLine: () => formatPromptSessionBannerLine,
|
|
1652
|
+
printAgentSessionsByFormat: () => printAgentSessionsByFormat,
|
|
1653
|
+
printClosedSessionByFormat: () => printClosedSessionByFormat,
|
|
1654
|
+
printCreatedSessionBanner: () => printCreatedSessionBanner,
|
|
1655
|
+
printEnsuredSessionByFormat: () => printEnsuredSessionByFormat,
|
|
1656
|
+
printNewSessionByFormat: () => printNewSessionByFormat,
|
|
1657
|
+
printPromptSessionBanner: () => printPromptSessionBanner,
|
|
1658
|
+
printPruneResultByFormat: () => printPruneResultByFormat,
|
|
1659
|
+
printQueuedPromptByFormat: () => printQueuedPromptByFormat,
|
|
1660
|
+
printSessionsByFormat: () => printSessionsByFormat
|
|
1661
|
+
});
|
|
1662
|
+
function formatSessionLabel(record) {
|
|
1663
|
+
return record.name ?? "cwd";
|
|
1664
|
+
}
|
|
1665
|
+
function formatRoutedFrom(sessionCwd, currentCwd) {
|
|
1666
|
+
const relative = path.relative(sessionCwd, currentCwd);
|
|
1667
|
+
if (!relative || relative === ".") return;
|
|
1668
|
+
return relative.startsWith(".") ? relative : `.${path.sep}${relative}`;
|
|
1669
|
+
}
|
|
1670
|
+
function classifySessionConnectionStatus(health) {
|
|
1671
|
+
if (health.healthy) return "connected";
|
|
1672
|
+
return health.hasLease ? "needs reconnect" : "starting";
|
|
1673
|
+
}
|
|
1674
|
+
async function resolveSessionConnectionStatus(record) {
|
|
1675
|
+
return classifySessionConnectionStatus(await probeQueueOwnerHealth(record.acpxRecordId));
|
|
1676
|
+
}
|
|
1677
|
+
function printSessionsByFormat(sessions, format) {
|
|
1678
|
+
if (format === "json") {
|
|
1679
|
+
process.stdout.write(`${JSON.stringify(sessions)}\n`);
|
|
1680
|
+
return;
|
|
1681
|
+
}
|
|
1682
|
+
if (format === "quiet") {
|
|
1683
|
+
printQuietSessions(sessions);
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
if (sessions.length === 0) {
|
|
1687
|
+
process.stdout.write("No sessions\n");
|
|
1688
|
+
return;
|
|
1689
|
+
}
|
|
1690
|
+
for (const session of sessions) {
|
|
1691
|
+
const closedMarker = session.closed ? " [closed]" : "";
|
|
1692
|
+
process.stdout.write(`${session.acpxRecordId}${closedMarker}\t${session.name ?? "-"}\t${session.cwd}\t${session.lastUsedAt}\n`);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
function printQuietSessions(sessions) {
|
|
1696
|
+
for (const session of sessions) {
|
|
1697
|
+
const closedMarker = session.closed ? " [closed]" : "";
|
|
1698
|
+
process.stdout.write(`${session.acpxRecordId}${closedMarker}\n`);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
function printAgentSessionsByFormat(result, format) {
|
|
1702
|
+
if (format === "json") {
|
|
1703
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
1704
|
+
return;
|
|
1705
|
+
}
|
|
1706
|
+
if (format === "quiet") {
|
|
1707
|
+
printQuietAgentSessions(result);
|
|
1708
|
+
return;
|
|
1709
|
+
}
|
|
1710
|
+
printTextAgentSessions(result);
|
|
1711
|
+
}
|
|
1712
|
+
function printQuietAgentSessions(result) {
|
|
1713
|
+
for (const session of result.sessions) process.stdout.write(`${session.sessionId}\n`);
|
|
1714
|
+
}
|
|
1715
|
+
function printTextAgentSessions(result) {
|
|
1716
|
+
if (result.sessions.length === 0) process.stdout.write("No sessions\n");
|
|
1717
|
+
else for (const session of result.sessions) {
|
|
1718
|
+
const title = session.title ?? "-";
|
|
1719
|
+
const updatedAt = session.updatedAt ?? "-";
|
|
1720
|
+
const meta = session._meta ? JSON.stringify(session._meta) : "-";
|
|
1721
|
+
process.stdout.write(`${session.sessionId}\t${title}\t${session.cwd}\t${updatedAt}\t${meta}\n`);
|
|
1722
|
+
}
|
|
1723
|
+
if (result.nextCursor) process.stdout.write(`Next cursor: ${result.nextCursor}\n`);
|
|
1724
|
+
}
|
|
1725
|
+
function printClosedSessionByFormat(record, format) {
|
|
1726
|
+
if (emitJsonResult(format, {
|
|
1727
|
+
action: "session_closed",
|
|
1728
|
+
acpxRecordId: record.acpxRecordId,
|
|
1729
|
+
acpxSessionId: record.acpSessionId,
|
|
1730
|
+
agentSessionId: record.agentSessionId
|
|
1731
|
+
})) return;
|
|
1732
|
+
if (format === "quiet") return;
|
|
1733
|
+
process.stdout.write(`${record.acpxRecordId}\n`);
|
|
1734
|
+
}
|
|
1735
|
+
function printNewSessionByFormat(record, replaced, format) {
|
|
1736
|
+
if (emitJsonResult(format, {
|
|
1737
|
+
action: "session_ensured",
|
|
1738
|
+
created: true,
|
|
1739
|
+
acpxRecordId: record.acpxRecordId,
|
|
1740
|
+
acpxSessionId: record.acpSessionId,
|
|
1741
|
+
agentSessionId: record.agentSessionId,
|
|
1742
|
+
name: record.name,
|
|
1743
|
+
replacedSessionId: replaced?.acpxRecordId
|
|
1744
|
+
})) return;
|
|
1745
|
+
if (format === "quiet") {
|
|
1746
|
+
process.stdout.write(`${record.acpxRecordId}\n`);
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
if (replaced) {
|
|
1750
|
+
process.stdout.write(`${record.acpxRecordId}\t(replaced ${replaced.acpxRecordId})\n`);
|
|
1751
|
+
return;
|
|
1752
|
+
}
|
|
1753
|
+
process.stdout.write(`${record.acpxRecordId}\n`);
|
|
1754
|
+
}
|
|
1755
|
+
function printEnsuredSessionByFormat(record, created, format) {
|
|
1756
|
+
if (emitJsonResult(format, {
|
|
1757
|
+
action: "session_ensured",
|
|
1758
|
+
created,
|
|
1759
|
+
acpxRecordId: record.acpxRecordId,
|
|
1760
|
+
acpxSessionId: record.acpSessionId,
|
|
1761
|
+
agentSessionId: record.agentSessionId,
|
|
1762
|
+
name: record.name
|
|
1763
|
+
})) return;
|
|
1764
|
+
if (format === "quiet") {
|
|
1765
|
+
process.stdout.write(`${record.acpxRecordId}\n`);
|
|
1766
|
+
return;
|
|
1767
|
+
}
|
|
1768
|
+
const action = created ? "created" : "existing";
|
|
1769
|
+
process.stdout.write(`${record.acpxRecordId}\t(${action})\n`);
|
|
1770
|
+
}
|
|
1771
|
+
function printQueuedPromptByFormat(result, format) {
|
|
1772
|
+
if (emitJsonResult(format, {
|
|
1773
|
+
action: "prompt_queued",
|
|
1774
|
+
acpxRecordId: result.sessionId,
|
|
1775
|
+
requestId: result.requestId
|
|
1776
|
+
})) return;
|
|
1777
|
+
if (format === "quiet") return;
|
|
1778
|
+
process.stdout.write(`[queued] ${result.requestId}\n`);
|
|
1779
|
+
}
|
|
1780
|
+
function formatPromptSessionBannerLine(record, currentCwd, connectionStatus = "starting") {
|
|
1781
|
+
const label = formatSessionLabel(record);
|
|
1782
|
+
const normalizedSessionCwd = path.resolve(record.cwd);
|
|
1783
|
+
const normalizedCurrentCwd = path.resolve(currentCwd);
|
|
1784
|
+
const routedFrom = normalizedSessionCwd === normalizedCurrentCwd ? void 0 : formatRoutedFrom(normalizedSessionCwd, normalizedCurrentCwd);
|
|
1785
|
+
const status = connectionStatus;
|
|
1786
|
+
if (routedFrom) return `[acpx] session ${label} (${record.acpxRecordId}) · ${normalizedSessionCwd} (routed from ${routedFrom}) · agent ${status}`;
|
|
1787
|
+
return `[acpx] session ${label} (${record.acpxRecordId}) · ${normalizedSessionCwd} · agent ${status}`;
|
|
1788
|
+
}
|
|
1789
|
+
async function printPromptSessionBanner(record, currentCwd, format, jsonStrict = false) {
|
|
1790
|
+
if (format === "quiet" || jsonStrict && format === "json") return;
|
|
1791
|
+
const status = await resolveSessionConnectionStatus(record);
|
|
1792
|
+
process.stderr.write(`${formatPromptSessionBannerLine(record, currentCwd, status)}\n`);
|
|
1793
|
+
}
|
|
1794
|
+
function printCreatedSessionBanner(record, agentName, format, jsonStrict = false) {
|
|
1795
|
+
if (format === "quiet" || jsonStrict && format === "json") return;
|
|
1796
|
+
const label = formatSessionLabel(record);
|
|
1797
|
+
process.stderr.write(`[acpx] created session ${label} (${record.acpxRecordId})\n`);
|
|
1798
|
+
process.stderr.write(`[acpx] agent: ${agentName}\n`);
|
|
1799
|
+
process.stderr.write(`[acpx] cwd: ${record.cwd}\n`);
|
|
1800
|
+
}
|
|
1801
|
+
function formatBytes(bytes) {
|
|
1802
|
+
if (bytes >= 1073741824) return `${(bytes / 1073741824).toFixed(1)} GB`;
|
|
1803
|
+
if (bytes >= 1048576) return `${(bytes / 1048576).toFixed(1)} MB`;
|
|
1804
|
+
if (bytes >= 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
1805
|
+
return `${bytes} B`;
|
|
1806
|
+
}
|
|
1807
|
+
function printPruneResultByFormat(result, format) {
|
|
1808
|
+
const count = result.pruned.length;
|
|
1809
|
+
if (emitPruneJsonResult(result, format, count)) return;
|
|
1810
|
+
if (format === "quiet") {
|
|
1811
|
+
printQuietPruneResult(result.pruned);
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1814
|
+
if (count === 0) {
|
|
1815
|
+
process.stdout.write(result.dryRun ? "[DRY RUN] No sessions to prune\n" : "No sessions pruned\n");
|
|
1816
|
+
return;
|
|
1817
|
+
}
|
|
1818
|
+
process.stdout.write(`${formatPruneSummaryLine(result, count)}\n`);
|
|
1819
|
+
for (const record of result.pruned) {
|
|
1820
|
+
const label = record.name ? ` (${record.name})` : "";
|
|
1821
|
+
process.stdout.write(` ${record.acpxRecordId}${label}\t${record.closedAt ?? record.lastUsedAt}\n`);
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
function emitPruneJsonResult(result, format, count) {
|
|
1825
|
+
return emitJsonResult(format, {
|
|
1826
|
+
action: result.dryRun ? "sessions_prune_dry_run" : "sessions_pruned",
|
|
1827
|
+
dryRun: result.dryRun,
|
|
1828
|
+
count,
|
|
1829
|
+
bytesFreed: result.bytesFreed,
|
|
1830
|
+
pruned: result.pruned.map((r) => r.acpxRecordId)
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
function printQuietPruneResult(pruned) {
|
|
1834
|
+
for (const record of pruned) process.stdout.write(`${record.acpxRecordId}\n`);
|
|
1835
|
+
}
|
|
1836
|
+
function formatPruneSummaryLine(result, count) {
|
|
1837
|
+
const prefix = result.dryRun ? "[DRY RUN] Would prune" : "Pruned";
|
|
1838
|
+
const bytesSuffix = !result.dryRun && result.bytesFreed > 0 ? `, freed ${formatBytes(result.bytesFreed)}` : "";
|
|
1839
|
+
return `${prefix} ${count} session${count === 1 ? "" : "s"}${bytesSuffix}`;
|
|
1840
|
+
}
|
|
1841
|
+
function agentSessionIdPayload(agentSessionId) {
|
|
1842
|
+
const normalized = normalizeAgentSessionId(agentSessionId);
|
|
1843
|
+
if (!normalized) return {};
|
|
1844
|
+
return { agentSessionId: normalized };
|
|
1845
|
+
}
|
|
1846
|
+
// src/cli/status-command.ts
|
|
1847
|
+
function formatUptime(startedAt) {
|
|
1848
|
+
if (!startedAt) return;
|
|
1849
|
+
const startedMs = Date.parse(startedAt);
|
|
1850
|
+
if (!Number.isFinite(startedMs)) return;
|
|
1851
|
+
const elapsedMs = Math.max(0, Date.now() - startedMs);
|
|
1852
|
+
const seconds = Math.floor(elapsedMs / 1e3);
|
|
1853
|
+
const hours = Math.floor(seconds / 3600);
|
|
1854
|
+
const minutes = Math.floor(seconds % 3600 / 60);
|
|
1855
|
+
const remSeconds = seconds % 60;
|
|
1856
|
+
return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}:${remSeconds.toString().padStart(2, "0")}`;
|
|
1857
|
+
}
|
|
1858
|
+
function resolveStatusState(record, health) {
|
|
1859
|
+
if (health.healthy) return "running";
|
|
1860
|
+
if (health.hasLease) return "dead";
|
|
1861
|
+
if (record.lastAgentExitSignal || (record.lastAgentExitCode ?? 0) !== 0) return "dead";
|
|
1862
|
+
return "idle";
|
|
1863
|
+
}
|
|
1864
|
+
function statusSummary(state) {
|
|
1865
|
+
switch (state) {
|
|
1866
|
+
case "running": return "queue owner healthy";
|
|
1867
|
+
case "idle": return "session idle; queue owner will start on next prompt";
|
|
1868
|
+
case "dead": return "queue owner unavailable";
|
|
1869
|
+
}
|
|
1870
|
+
return "queue owner unavailable";
|
|
1871
|
+
}
|
|
1872
|
+
async function handleStatus(explicitAgentName, flags, command, config) {
|
|
1873
|
+
const globalFlags = resolveGlobalFlags(command, config);
|
|
1874
|
+
const agent = resolveAgentInvocation(explicitAgentName, globalFlags, config);
|
|
1875
|
+
const record = await findSession({
|
|
1876
|
+
agentCommand: agent.agentCommand,
|
|
1877
|
+
cwd: agent.cwd,
|
|
1878
|
+
name: resolveSessionNameFromFlags(flags, command)
|
|
1879
|
+
});
|
|
1880
|
+
if (!record) {
|
|
1881
|
+
printMissingStatus(globalFlags.format, agent.agentCommand);
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
await printSessionStatus(record, globalFlags.format);
|
|
1885
|
+
}
|
|
1886
|
+
function printMissingStatus(format, agentCommand) {
|
|
1887
|
+
if (emitJsonResult(format, {
|
|
1888
|
+
action: "status_snapshot",
|
|
1889
|
+
status: "no-session",
|
|
1890
|
+
summary: "no active session"
|
|
1891
|
+
})) return;
|
|
1892
|
+
if (format === "quiet") {
|
|
1893
|
+
process.stdout.write("no-session\n");
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
process.stdout.write("session: -\n");
|
|
1897
|
+
process.stdout.write(`agent: ${agentCommand}\n`);
|
|
1898
|
+
process.stdout.write("pid: -\n");
|
|
1899
|
+
process.stdout.write("status: no-session\n");
|
|
1900
|
+
process.stdout.write("model: -\n");
|
|
1901
|
+
process.stdout.write("mode: -\n");
|
|
1902
|
+
process.stdout.write("uptime: -\n");
|
|
1903
|
+
process.stdout.write("lastPromptTime: -\n");
|
|
1904
|
+
}
|
|
1905
|
+
async function printSessionStatus(record, format) {
|
|
1906
|
+
const health = await probeQueueOwnerHealth(record.acpxRecordId);
|
|
1907
|
+
const statusState = resolveStatusState(record, health);
|
|
1908
|
+
const payload = createStatusPayload(record, health, statusState);
|
|
1909
|
+
const running = statusState === "running";
|
|
1910
|
+
const dead = statusState === "dead";
|
|
1911
|
+
if (emitJsonResult(format, statusJsonPayload(record, payload, statusState, running, dead))) return;
|
|
1912
|
+
if (format === "quiet") {
|
|
1913
|
+
process.stdout.write(`${payload.status}\n`);
|
|
1914
|
+
return;
|
|
1915
|
+
}
|
|
1916
|
+
printTextStatus(payload, dead);
|
|
1917
|
+
}
|
|
1918
|
+
function createStatusPayload(record, health, statusState) {
|
|
1919
|
+
const running = statusState === "running";
|
|
1920
|
+
const acpx = statusAcpxFields(record);
|
|
1921
|
+
return {
|
|
1922
|
+
sessionId: record.acpxRecordId,
|
|
1923
|
+
agentCommand: record.agentCommand,
|
|
1924
|
+
pid: statusPid(health),
|
|
1925
|
+
status: statusState,
|
|
1926
|
+
model: acpx.model,
|
|
1927
|
+
mode: acpx.mode,
|
|
1928
|
+
availableModels: acpx.availableModels,
|
|
1929
|
+
uptime: running ? formatUptime(record.agentStartedAt) ?? null : null,
|
|
1930
|
+
lastPromptTime: record.lastPromptAt ?? null,
|
|
1931
|
+
exitCode: running ? null : record.lastAgentExitCode ?? null,
|
|
1932
|
+
signal: running ? null : record.lastAgentExitSignal ?? null,
|
|
1933
|
+
...agentSessionIdPayload(record.agentSessionId)
|
|
1934
|
+
};
|
|
1935
|
+
}
|
|
1936
|
+
function statusAcpxFields(record) {
|
|
1937
|
+
return {
|
|
1938
|
+
model: record.acpx?.current_model_id ?? null,
|
|
1939
|
+
mode: record.acpx?.current_mode_id ?? null,
|
|
1940
|
+
availableModels: record.acpx?.available_models ?? null
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
function statusPid(health) {
|
|
1944
|
+
if (health.pidAlive) return health.pid ?? null;
|
|
1945
|
+
return null;
|
|
1946
|
+
}
|
|
1947
|
+
function statusJsonPayload(record, payload, statusState, running, dead) {
|
|
1948
|
+
const result = {
|
|
1949
|
+
action: "status_snapshot",
|
|
1950
|
+
status: running ? "alive" : statusState,
|
|
1951
|
+
summary: statusSummary(statusState),
|
|
1952
|
+
acpxRecordId: record.acpxRecordId,
|
|
1953
|
+
acpxSessionId: record.acpSessionId,
|
|
1954
|
+
agentSessionId: record.agentSessionId
|
|
1955
|
+
};
|
|
1956
|
+
assignDefinedJsonField(result, "pid", payload.pid);
|
|
1957
|
+
assignDefinedJsonField(result, "model", payload.model);
|
|
1958
|
+
assignDefinedJsonField(result, "mode", payload.mode);
|
|
1959
|
+
assignDefinedJsonField(result, "availableModels", payload.availableModels);
|
|
1960
|
+
assignDefinedJsonField(result, "uptime", payload.uptime);
|
|
1961
|
+
assignDefinedJsonField(result, "lastPromptTime", payload.lastPromptTime);
|
|
1962
|
+
if (dead) {
|
|
1963
|
+
assignDefinedJsonField(result, "exitCode", payload.exitCode);
|
|
1964
|
+
assignDefinedJsonField(result, "signal", payload.signal);
|
|
1965
|
+
}
|
|
1966
|
+
return result;
|
|
1967
|
+
}
|
|
1968
|
+
function assignDefinedJsonField(target, key, value) {
|
|
1969
|
+
if (value !== null && value !== void 0) target[key] = value;
|
|
1970
|
+
}
|
|
1971
|
+
function printTextStatus(payload, dead) {
|
|
1972
|
+
process.stdout.write(`session: ${payload.sessionId}\n`);
|
|
1973
|
+
if ("agentSessionId" in payload) process.stdout.write(`agentSessionId: ${payload.agentSessionId}\n`);
|
|
1974
|
+
process.stdout.write(`agent: ${payload.agentCommand}\n`);
|
|
1975
|
+
process.stdout.write(`pid: ${payload.pid ?? "-"}\n`);
|
|
1976
|
+
process.stdout.write(`status: ${payload.status}\n`);
|
|
1977
|
+
process.stdout.write(`model: ${payload.model ?? "-"}\n`);
|
|
1978
|
+
process.stdout.write(`mode: ${payload.mode ?? "-"}\n`);
|
|
1979
|
+
process.stdout.write(`uptime: ${payload.uptime ?? "-"}\n`);
|
|
1980
|
+
process.stdout.write(`lastPromptTime: ${payload.lastPromptTime ?? "-"}\n`);
|
|
1981
|
+
if (dead) printDeadStatusDetails(payload);
|
|
1982
|
+
}
|
|
1983
|
+
function printDeadStatusDetails(payload) {
|
|
1984
|
+
process.stdout.write(`exitCode: ${payload.exitCode ?? "-"}\n`);
|
|
1985
|
+
process.stdout.write(`signal: ${payload.signal ?? "-"}\n`);
|
|
1986
|
+
}
|
|
1987
|
+
function registerStatusCommand(parent, explicitAgentName, config, description) {
|
|
1988
|
+
const statusCommand = parent.command("status").description(description);
|
|
1989
|
+
addSessionNameOption(statusCommand);
|
|
1990
|
+
statusCommand.action(async function(flags) {
|
|
1991
|
+
await handleStatus(explicitAgentName, flags, this, config);
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
// src/cli/command-registration.ts
|
|
1995
|
+
var LocalAttributeOption = class extends Option {
|
|
1996
|
+
localAttributeName;
|
|
1997
|
+
constructor(flags, description, localAttributeName) {
|
|
1998
|
+
super(flags, description);
|
|
1999
|
+
this.localAttributeName = localAttributeName;
|
|
2000
|
+
}
|
|
2001
|
+
attributeName() {
|
|
2002
|
+
return this.localAttributeName;
|
|
2003
|
+
}
|
|
2004
|
+
};
|
|
2005
|
+
function addSessionsListOptions(command) {
|
|
2006
|
+
return command.option("--local", "List local acpx session records instead of agent protocol sessions").option("--cursor <cursor>", "Opaque ACP session/list cursor", (value) => parseNonEmptyValue("Cursor", value)).option("--filter-cwd <dir>", "Filter agent sessions by working directory", (value) => parseNonEmptyValue("Filter cwd", value));
|
|
2007
|
+
}
|
|
2008
|
+
function registerSessionsCommand(parent, explicitAgentName, config) {
|
|
2009
|
+
const sessionsCommand = parent.command("sessions").description("List, ensure, create, or close sessions for this agent");
|
|
2010
|
+
addSessionsListOptions(sessionsCommand);
|
|
2011
|
+
sessionsCommand.action(async function(flags) {
|
|
2012
|
+
await handleSessionsList(explicitAgentName, flags, this, config);
|
|
2013
|
+
});
|
|
2014
|
+
addSessionsListOptions(sessionsCommand.command("list")).description("List sessions").action(async function(flags) {
|
|
2015
|
+
await handleSessionsList(explicitAgentName, flags, this, config);
|
|
2016
|
+
});
|
|
2017
|
+
sessionsCommand.command("new").description("Create a fresh session for current cwd").option("-s, --name <name>", "Session name", parseSessionName).option("--resume-session <id>", "Resume existing ACP session id", (value) => parseNonEmptyValue("Resume session id", value)).action(async function(flags) {
|
|
2018
|
+
await handleSessionsNew(explicitAgentName, flags, this, config);
|
|
2019
|
+
});
|
|
2020
|
+
sessionsCommand.command("ensure").description("Ensure a session exists for current cwd or ancestor").option("-s, --name <name>", "Session name", parseSessionName).option("--resume-session <id>", "Resume existing ACP session id", (value) => parseNonEmptyValue("Resume session id", value)).action(async function(flags) {
|
|
2021
|
+
await handleSessionsEnsure(explicitAgentName, flags, this, config);
|
|
2022
|
+
});
|
|
2023
|
+
sessionsCommand.command("close").description("Close session for current cwd").argument("[name]", "Session name", parseSessionName).action(async function(name) {
|
|
2024
|
+
await handleSessionsClose(explicitAgentName, name, this, config);
|
|
2025
|
+
});
|
|
2026
|
+
sessionsCommand.command("show").description("Show session metadata for current cwd").argument("[name]", "Session name", parseSessionName).action(async function(name) {
|
|
2027
|
+
await handleSessionsShow(explicitAgentName, name, this, config);
|
|
2028
|
+
});
|
|
2029
|
+
sessionsCommand.command("history").description("Show recent session history entries").argument("[name]", "Session name", parseSessionName).option("--limit <count>", `Maximum number of entries to show (default: 20)`, parseHistoryLimit, 20).action(async function(name, flags) {
|
|
2030
|
+
await handleSessionsHistory(explicitAgentName, name, flags, this, config);
|
|
2031
|
+
});
|
|
2032
|
+
sessionsCommand.command("read").description("Read full session history").argument("[name]", "Session name", parseSessionName).option("--tail <count>", "Show only the last N entries instead of all history", parseHistoryLimit).action(async function(name, flags) {
|
|
2033
|
+
await handleSessionsHistory(explicitAgentName, name, { limit: flags.tail ?? 0 }, this, config);
|
|
2034
|
+
});
|
|
2035
|
+
sessionsCommand.command("watch").description("Replay and follow session events without affecting the active turn").option("-s, --name <name>", "Session name", parseSessionName).option("--cursor <cursor>", "Resume after a session watch cursor", (value) => parseNonEmptyValue("Cursor", value)).action(async function(flags) {
|
|
2036
|
+
await handleSessionsWatch(explicitAgentName, flags, this, config);
|
|
2037
|
+
});
|
|
2038
|
+
sessionsCommand.command("export").description("Export a portable session archive").argument("[name]", "Session name", parseSessionName).requiredOption("--output <path>", "Output archive path", (value) => parseNonEmptyValue("Output path", value)).addOption(new LocalAttributeOption("--cwd <cwd>", "Session cwd to export", "sourceCwd").argParser((value) => parseNonEmptyValue("Session cwd", value))).action(async function(name, flags) {
|
|
2039
|
+
await handleSessionsExport(explicitAgentName, name, flags, this, config);
|
|
2040
|
+
});
|
|
2041
|
+
sessionsCommand.command("import").description("Import a portable session archive").argument("<archive-path>", "Archive path", (value) => parseNonEmptyValue("Archive path", value)).option("--name <name>", "Imported session name", parseSessionName).addOption(new LocalAttributeOption("--cwd <cwd>", "Imported session cwd", "destinationCwd").argParser((value) => parseNonEmptyValue("Imported session cwd", value))).action(async function(archivePath, flags) {
|
|
2042
|
+
await handleSessionsImport(explicitAgentName, archivePath, flags, this, config);
|
|
2043
|
+
});
|
|
2044
|
+
sessionsCommand.command("prune").description("Delete closed sessions and free disk space").option("--dry-run", "Preview what would be pruned without deleting anything").option("--before <date>", "Prune sessions closed before this date", parsePruneBeforeDate).option("--older-than <days>", "Prune sessions closed more than N days ago", parseDaysOlderThan).option("--include-history", "Also delete event stream files (.stream.ndjson)").action(async function(flags) {
|
|
2045
|
+
await handleSessionsPrune(explicitAgentName, flags, this, config);
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
2048
|
+
function registerSharedAgentSubcommands(parent, explicitAgentName, config, descriptions) {
|
|
2049
|
+
const promptCommand = parent.command("prompt").description(descriptions.prompt).argument("[prompt...]", "Prompt text").showHelpAfterError();
|
|
2050
|
+
addSessionOption(promptCommand);
|
|
2051
|
+
addPromptInputOption(promptCommand);
|
|
2052
|
+
promptCommand.action(async function(promptParts, flags) {
|
|
2053
|
+
await handlePrompt(explicitAgentName, promptParts, flags, this, config);
|
|
2054
|
+
});
|
|
2055
|
+
const execCommand = parent.command("exec").description(descriptions.exec).argument("[prompt...]", "Prompt text").showHelpAfterError();
|
|
2056
|
+
addPromptInputOption(execCommand);
|
|
2057
|
+
addExecConfigOption(execCommand);
|
|
2058
|
+
execCommand.action(async function(promptParts, flags) {
|
|
2059
|
+
await handleExec(explicitAgentName, promptParts, flags, this, config);
|
|
2060
|
+
});
|
|
2061
|
+
const cancelCommand = parent.command("cancel").description(descriptions.cancel);
|
|
2062
|
+
addSessionNameOption(cancelCommand);
|
|
2063
|
+
cancelCommand.action(async function(flags) {
|
|
2064
|
+
await handleCancel(explicitAgentName, flags, this, config);
|
|
2065
|
+
});
|
|
2066
|
+
const setModeCommand = parent.command("set-mode").description(descriptions.setMode).argument("<mode>", "Mode id", (value) => parseNonEmptyValue("Mode", value));
|
|
2067
|
+
addSessionNameOption(setModeCommand);
|
|
2068
|
+
setModeCommand.action(async function(modeId, flags) {
|
|
2069
|
+
await handleSetMode(explicitAgentName, modeId, flags, this, config);
|
|
2070
|
+
});
|
|
2071
|
+
const setConfigCommand = parent.command("set").description(descriptions.setConfig).argument("<key>", "Config option id", (value) => parseNonEmptyValue("Config option key", value)).argument("<value>", "Config option value", (value) => parseNonEmptyValue("Config option value", value));
|
|
2072
|
+
addSessionNameOption(setConfigCommand);
|
|
2073
|
+
setConfigCommand.action(async function(key, value, flags) {
|
|
2074
|
+
await handleSetConfigOption(explicitAgentName, key, value, flags, this, config);
|
|
2075
|
+
});
|
|
2076
|
+
registerStatusCommand(parent, explicitAgentName, config, descriptions.status);
|
|
2077
|
+
}
|
|
2078
|
+
function registerAgentCommand(program, agentName, config) {
|
|
2079
|
+
const agentCommand = program.command(agentName).description(`Use ${agentName} agent`).argument("[prompt...]", "Prompt text").enablePositionalOptions().passThroughOptions().showHelpAfterError();
|
|
2080
|
+
addSessionOption(agentCommand);
|
|
2081
|
+
addPromptInputOption(agentCommand);
|
|
2082
|
+
agentCommand.action(async function(promptParts, flags) {
|
|
2083
|
+
await handlePrompt(agentName, promptParts, flags, this, config);
|
|
2084
|
+
});
|
|
2085
|
+
registerSharedAgentSubcommands(agentCommand, agentName, config, {
|
|
2086
|
+
prompt: "Prompt using persistent session",
|
|
2087
|
+
exec: "One-shot prompt without saved session",
|
|
2088
|
+
cancel: "Cooperatively cancel current in-flight prompt",
|
|
2089
|
+
setMode: "Set session mode",
|
|
2090
|
+
setConfig: "Set session config option",
|
|
2091
|
+
status: "Show local status of current session agent process"
|
|
2092
|
+
});
|
|
2093
|
+
registerSessionsCommand(agentCommand, agentName, config);
|
|
2094
|
+
}
|
|
2095
|
+
function registerFlowCommand(program, config) {
|
|
2096
|
+
const runCommand = program.command("flow").description("Run multi-step ACP workflows from flow files").command("run").description("Run a flow file").argument("<file>", "Flow module path").option("--input-json <json>", "Flow input as JSON").option("--input-file <path>", "Read flow input JSON from file").option("--default-agent <name>", "Default agent profile for ACP nodes without profile", (value) => parseNonEmptyValue("Default agent", value)).action(async function(file, flags) {
|
|
2097
|
+
const { handleFlowRun } = await import("./cli-DeYZhjw6.js");
|
|
2098
|
+
await handleFlowRun(file, flags, this, config);
|
|
2099
|
+
});
|
|
2100
|
+
addExecConfigOption(runCommand, "Default ACP session config option for flow nodes (repeatable)");
|
|
2101
|
+
}
|
|
2102
|
+
function registerDefaultCommands(program, config) {
|
|
2103
|
+
registerSharedAgentSubcommands(program, void 0, config, {
|
|
2104
|
+
prompt: `Prompt using ${config.defaultAgent} by default`,
|
|
2105
|
+
exec: `One-shot prompt using ${config.defaultAgent} by default`,
|
|
2106
|
+
cancel: `Cancel active prompt for ${config.defaultAgent} by default`,
|
|
2107
|
+
setMode: `Set session mode for ${config.defaultAgent} by default`,
|
|
2108
|
+
setConfig: `Set session config option for ${config.defaultAgent} by default`,
|
|
2109
|
+
status: `Show local status for ${config.defaultAgent} by default`
|
|
2110
|
+
});
|
|
2111
|
+
registerSessionsCommand(program, void 0, config);
|
|
2112
|
+
registerConfigCommand(program, config);
|
|
2113
|
+
registerCompareCommand(program, config);
|
|
2114
|
+
registerFlowCommand(program, config);
|
|
2115
|
+
}
|
|
2116
|
+
// src/session/queue/owner-input.ts
|
|
2117
|
+
function asRecord(value) {
|
|
2118
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
2119
|
+
return value;
|
|
2120
|
+
}
|
|
2121
|
+
function parseQueueOwnerPayload(raw) {
|
|
2122
|
+
let parsed;
|
|
2123
|
+
try {
|
|
2124
|
+
parsed = JSON.parse(raw);
|
|
2125
|
+
} catch {
|
|
2126
|
+
throw new Error("queue owner payload must be valid JSON");
|
|
2127
|
+
}
|
|
2128
|
+
const record = asRecord(parsed);
|
|
2129
|
+
if (!record) throw new Error("queue owner payload must be an object");
|
|
2130
|
+
if (typeof record.sessionId !== "string" || record.sessionId.trim().length === 0) throw new Error("queue owner payload missing sessionId");
|
|
2131
|
+
if (record.permissionMode !== "approve-all" && record.permissionMode !== "approve-reads" && record.permissionMode !== "deny-all") throw new Error("queue owner payload has invalid permissionMode");
|
|
2132
|
+
const options = {
|
|
2133
|
+
sessionId: record.sessionId,
|
|
2134
|
+
permissionMode: record.permissionMode
|
|
2135
|
+
};
|
|
2136
|
+
assignQueueOwnerTransportOptions(options, record);
|
|
2137
|
+
assignQueueOwnerScalarOptions(options, record);
|
|
2138
|
+
assignQueueOwnerSessionOptions(options, record.sessionOptions);
|
|
2139
|
+
return options;
|
|
2140
|
+
}
|
|
2141
|
+
function assignQueueOwnerTransportOptions(options, record) {
|
|
2142
|
+
const parsedMcpServers = parseOptionalMcpServers(record.mcpServers, "queue owner payload");
|
|
2143
|
+
if (parsedMcpServers) options.mcpServers = parsedMcpServers;
|
|
2144
|
+
if (typeof record.mcpConfigPath === "string" && record.mcpConfigPath.length > 0) options.mcpConfigPath = record.mcpConfigPath;
|
|
2145
|
+
if (typeof record.mcpConfigFingerprint === "string" && record.mcpConfigFingerprint.length > 0) options.mcpConfigFingerprint = record.mcpConfigFingerprint;
|
|
2146
|
+
if (record.authCredentials && typeof record.authCredentials === "object") {
|
|
2147
|
+
const entries = Object.entries(record.authCredentials).filter(([, value]) => typeof value === "string");
|
|
2148
|
+
options.authCredentials = Object.fromEntries(entries);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
function assignQueueOwnerScalarOptions(options, record) {
|
|
2152
|
+
if (record.nonInteractivePermissions === "deny" || record.nonInteractivePermissions === "fail") options.nonInteractivePermissions = record.nonInteractivePermissions;
|
|
2153
|
+
if (record.authPolicy === "skip" || record.authPolicy === "fail") options.authPolicy = record.authPolicy;
|
|
2154
|
+
assignBooleanOption(options, "fs", record.fs);
|
|
2155
|
+
assignBooleanOption(options, "terminal", record.terminal);
|
|
2156
|
+
assignBooleanOption(options, "suppressSdkConsoleErrors", record.suppressSdkConsoleErrors);
|
|
2157
|
+
assignBooleanOption(options, "verbose", record.verbose);
|
|
2158
|
+
assignFiniteNumberOption(options, "ttlMs", record.ttlMs);
|
|
2159
|
+
assignRoundedNumberOption(options, "maxQueueDepth", record.maxQueueDepth, 1);
|
|
2160
|
+
assignRoundedNumberOption(options, "promptRetries", record.promptRetries, 0);
|
|
2161
|
+
}
|
|
2162
|
+
function assignBooleanOption(options, key, value) {
|
|
2163
|
+
if (typeof value === "boolean") options[key] = value;
|
|
2164
|
+
}
|
|
2165
|
+
function assignFiniteNumberOption(options, key, value) {
|
|
2166
|
+
if (typeof value === "number" && Number.isFinite(value)) options[key] = value;
|
|
2167
|
+
}
|
|
2168
|
+
function assignRoundedNumberOption(options, key, value, min) {
|
|
2169
|
+
if (typeof value === "number" && Number.isFinite(value)) options[key] = Math.max(min, Math.round(value));
|
|
2170
|
+
}
|
|
2171
|
+
function assignQueueOwnerSessionOptions(options, rawSessionOptions) {
|
|
2172
|
+
const sessionOpts = asRecord(rawSessionOptions);
|
|
2173
|
+
if (!sessionOpts) return;
|
|
2174
|
+
options.sessionOptions = {};
|
|
2175
|
+
assignSessionModel(options.sessionOptions, sessionOpts.model);
|
|
2176
|
+
assignSessionAllowedTools(options.sessionOptions, sessionOpts.allowedTools);
|
|
2177
|
+
assignSessionMaxTurns(options.sessionOptions, sessionOpts.maxTurns);
|
|
2178
|
+
assignSessionSystemPrompt(options.sessionOptions, sessionOpts.systemPrompt);
|
|
2179
|
+
assignSessionEnv(options.sessionOptions, sessionOpts.env);
|
|
2180
|
+
}
|
|
2181
|
+
function assignSessionModel(options, value) {
|
|
2182
|
+
if (typeof value === "string" && value.trim().length > 0) options.model = value;
|
|
2183
|
+
}
|
|
2184
|
+
function assignSessionAllowedTools(options, value) {
|
|
2185
|
+
if (Array.isArray(value)) options.allowedTools = value.filter((tool) => typeof tool === "string");
|
|
2186
|
+
}
|
|
2187
|
+
function assignSessionMaxTurns(options, value) {
|
|
2188
|
+
if (typeof value === "number" && Number.isFinite(value)) options.maxTurns = Math.max(1, Math.round(value));
|
|
2189
|
+
}
|
|
2190
|
+
function assignSessionSystemPrompt(options, value) {
|
|
2191
|
+
if (typeof value === "string") {
|
|
2192
|
+
options.systemPrompt = value;
|
|
2193
|
+
return;
|
|
2194
|
+
}
|
|
2195
|
+
const systemPrompt = asRecord(value);
|
|
2196
|
+
if (typeof systemPrompt?.append === "string") options.systemPrompt = { append: systemPrompt.append };
|
|
2197
|
+
}
|
|
2198
|
+
function assignSessionEnv(options, value) {
|
|
2199
|
+
const env = asRecord(value);
|
|
2200
|
+
if (!env) return;
|
|
2201
|
+
const entries = Object.entries(env).filter((entry) => typeof entry[1] === "string");
|
|
2202
|
+
if (entries.length > 0) options.env = Object.fromEntries(entries);
|
|
2203
|
+
}
|
|
2204
|
+
async function runQueueOwnerFromStdin() {
|
|
2205
|
+
const payload = await text(process.stdin);
|
|
2206
|
+
if (!payload) throw new Error("queue owner startup payload is empty");
|
|
2207
|
+
await runSessionQueueOwner(parseQueueOwnerPayload(payload));
|
|
2208
|
+
}
|
|
2209
|
+
// src/cli-core.ts
|
|
2210
|
+
const TOP_LEVEL_VERBS = /* @__PURE__ */ new Set([
|
|
2211
|
+
"prompt",
|
|
2212
|
+
"exec",
|
|
2213
|
+
"cancel",
|
|
2214
|
+
"compare",
|
|
2215
|
+
"flow",
|
|
2216
|
+
"set-mode",
|
|
2217
|
+
"set",
|
|
2218
|
+
"sessions",
|
|
2219
|
+
"status",
|
|
2220
|
+
"config",
|
|
2221
|
+
"help"
|
|
2222
|
+
]);
|
|
2223
|
+
const TOP_LEVEL_VERSION_VALUE_FLAG_VALUES = [
|
|
2224
|
+
"--agent",
|
|
2225
|
+
"--cwd",
|
|
2226
|
+
"--auth-policy",
|
|
2227
|
+
"--non-interactive-permissions",
|
|
2228
|
+
"--permission-policy",
|
|
2229
|
+
"--policy",
|
|
2230
|
+
"--format",
|
|
2231
|
+
"--model",
|
|
2232
|
+
"--allowed-tools",
|
|
2233
|
+
"--max-turns",
|
|
2234
|
+
"--system-prompt",
|
|
2235
|
+
"--append-system-prompt",
|
|
2236
|
+
"--prompt-retries",
|
|
2237
|
+
"--timeout",
|
|
2238
|
+
"--ttl",
|
|
2239
|
+
"--mcp-config"
|
|
2240
|
+
];
|
|
2241
|
+
const TOP_LEVEL_VERSION_VALUE_FLAGS = new Set(TOP_LEVEL_VERSION_VALUE_FLAG_VALUES);
|
|
2242
|
+
const TOP_LEVEL_VERSION_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
|
|
2243
|
+
"--approve-all",
|
|
2244
|
+
"--approve-reads",
|
|
2245
|
+
"--deny-all",
|
|
2246
|
+
"--suppress-reads",
|
|
2247
|
+
"--json-strict",
|
|
2248
|
+
"--no-fs",
|
|
2249
|
+
"--no-terminal",
|
|
2250
|
+
"--verbose"
|
|
2251
|
+
]);
|
|
2252
|
+
const AGENT_SCAN_VALUE_FLAG_VALUES = [...TOP_LEVEL_VERSION_VALUE_FLAG_VALUES, "--file"];
|
|
2253
|
+
const AGENT_SCAN_VALUE_FLAGS = new Set(AGENT_SCAN_VALUE_FLAG_VALUES);
|
|
2254
|
+
const AGENT_SCAN_BOOLEAN_FLAGS = new Set(TOP_LEVEL_VERSION_BOOLEAN_FLAGS);
|
|
2255
|
+
let skillflagModulePromise;
|
|
2256
|
+
function loadSkillflagModule() {
|
|
2257
|
+
skillflagModulePromise ??= import("skillflag");
|
|
2258
|
+
return skillflagModulePromise;
|
|
2259
|
+
}
|
|
2260
|
+
function shouldMaybeHandleSkillflag(argv) {
|
|
2261
|
+
return argv.some((token) => token === "--skill" || token.startsWith("--skill="));
|
|
2262
|
+
}
|
|
2263
|
+
function matchesLongFlagValue(token, flags) {
|
|
2264
|
+
for (const flag of flags) if (token.startsWith(`${flag}=`)) return true;
|
|
2265
|
+
return false;
|
|
2266
|
+
}
|
|
2267
|
+
function classifyAgentTokenFlag(token) {
|
|
2268
|
+
if (token === "--agent" || token.startsWith("--agent=")) return "agent-value";
|
|
2269
|
+
if (AGENT_SCAN_VALUE_FLAGS.has(token)) return "skip-next";
|
|
2270
|
+
if (AGENT_SCAN_BOOLEAN_FLAGS.has(token) || matchesLongFlagValue(token, AGENT_SCAN_VALUE_FLAGS) || token.startsWith("--json-strict=")) return "skip";
|
|
2271
|
+
return "unknown";
|
|
2272
|
+
}
|
|
2273
|
+
function scanAgentTokenStep(token, hasAgentOverride) {
|
|
2274
|
+
if (token === "--") return {
|
|
2275
|
+
result: { hasAgentOverride },
|
|
2276
|
+
indexDelta: 0
|
|
2277
|
+
};
|
|
2278
|
+
if (!token.startsWith("-") || token === "-") return {
|
|
2279
|
+
result: {
|
|
2280
|
+
token,
|
|
2281
|
+
hasAgentOverride
|
|
2282
|
+
},
|
|
2283
|
+
indexDelta: 0
|
|
2284
|
+
};
|
|
2285
|
+
const flagScan = classifyAgentTokenFlag(token);
|
|
2286
|
+
if (flagScan === "agent-value") return {
|
|
2287
|
+
indexDelta: token === "--agent" ? 1 : 0,
|
|
2288
|
+
hasAgentOverride: true
|
|
2289
|
+
};
|
|
2290
|
+
if (flagScan === "skip-next") return { indexDelta: 1 };
|
|
2291
|
+
if (flagScan === "skip") return { indexDelta: 0 };
|
|
2292
|
+
return {
|
|
2293
|
+
result: { hasAgentOverride },
|
|
2294
|
+
indexDelta: 0
|
|
2295
|
+
};
|
|
2296
|
+
}
|
|
2297
|
+
function detectAgentToken(argv) {
|
|
2298
|
+
let hasAgentOverride = false;
|
|
2299
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
2300
|
+
const token = argv[index];
|
|
2301
|
+
const step = scanAgentTokenStep(token, hasAgentOverride);
|
|
2302
|
+
if (step.result) return {
|
|
2303
|
+
...step.result,
|
|
2304
|
+
index
|
|
2305
|
+
};
|
|
2306
|
+
if (step.hasAgentOverride) hasAgentOverride = true;
|
|
2307
|
+
index += step.indexDelta;
|
|
2308
|
+
}
|
|
2309
|
+
return { hasAgentOverride };
|
|
2310
|
+
}
|
|
2311
|
+
function lastTopLevelFlagValue(argv, flag) {
|
|
2312
|
+
let value;
|
|
2313
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
2314
|
+
const token = argv[index];
|
|
2315
|
+
const scan = classifyTopLevelFlagScan(token);
|
|
2316
|
+
if (scan.stop) break;
|
|
2317
|
+
if (token === flag) value = argv[index + 1];
|
|
2318
|
+
else if (token.startsWith(`${flag}=`)) value = token.slice(flag.length + 1);
|
|
2319
|
+
if (scan.skipNext) index += 1;
|
|
2320
|
+
}
|
|
2321
|
+
return value;
|
|
2322
|
+
}
|
|
2323
|
+
function detectInitialCwd(argv) {
|
|
2324
|
+
const command = detectAgentToken(argv);
|
|
2325
|
+
if (command.token === "compare" && command.index !== void 0) {
|
|
2326
|
+
const { cwd } = scanCompareArgs(argv.slice(command.index + 1));
|
|
2327
|
+
if (cwd !== void 0) return path.resolve(cwd);
|
|
2328
|
+
}
|
|
2329
|
+
return path.resolve(lastTopLevelFlagValue(argv, "--cwd") ?? process.cwd());
|
|
2330
|
+
}
|
|
2331
|
+
function detectMcpConfigPath(argv, cwd) {
|
|
2332
|
+
const value = lastTopLevelFlagValue(argv, "--mcp-config");
|
|
2333
|
+
return value ? path.resolve(cwd, value) : void 0;
|
|
2334
|
+
}
|
|
2335
|
+
function detectRequestedOutputFormat(argv, fallback) {
|
|
2336
|
+
let detectedFormat;
|
|
2337
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
2338
|
+
const token = argv[index];
|
|
2339
|
+
const scan = classifyTopLevelFlagScan(token);
|
|
2340
|
+
if (scan.stop) break;
|
|
2341
|
+
if (isJsonStrictToken(token)) return "json";
|
|
2342
|
+
const format = readFormatFlagValue(token, argv[index + 1]);
|
|
2343
|
+
if (format) detectedFormat = format;
|
|
2344
|
+
if (scan.skipNext) index += 1;
|
|
2345
|
+
}
|
|
2346
|
+
return detectCompareOutputFormat(argv, detectedFormat, fallback);
|
|
2347
|
+
}
|
|
2348
|
+
function detectCompareOutputFormat(argv, rootFormat, fallback) {
|
|
2349
|
+
const command = detectAgentToken(argv);
|
|
2350
|
+
if (command.token !== "compare" || command.index === void 0) return rootFormat ?? fallback;
|
|
2351
|
+
const local = scanCompareArgs(argv.slice(command.index + 1));
|
|
2352
|
+
const localFormat = isOutputFormat(local.format) ? local.format : void 0;
|
|
2353
|
+
return local.json ? "json" : rootFormat ?? localFormat ?? fallback;
|
|
2354
|
+
}
|
|
2355
|
+
function classifyTopLevelFlagScan(token) {
|
|
2356
|
+
if (token === "--" || !token.startsWith("-") || token === "-") return {
|
|
2357
|
+
stop: true,
|
|
2358
|
+
skipNext: false
|
|
2359
|
+
};
|
|
2360
|
+
return {
|
|
2361
|
+
stop: false,
|
|
2362
|
+
skipNext: TOP_LEVEL_VERSION_VALUE_FLAGS.has(token)
|
|
2363
|
+
};
|
|
2364
|
+
}
|
|
2365
|
+
function readFormatFlagValue(token, nextToken) {
|
|
2366
|
+
const raw = token === "--format" ? nextToken : readInlineFlagValue(token, "--format");
|
|
2367
|
+
return isOutputFormat(raw) ? raw : void 0;
|
|
2368
|
+
}
|
|
2369
|
+
function readInlineFlagValue(token, flag) {
|
|
2370
|
+
if (!token.startsWith(`${flag}=`)) return;
|
|
2371
|
+
return token.slice(flag.length + 1).trim();
|
|
2372
|
+
}
|
|
2373
|
+
function isOutputFormat(value) {
|
|
2374
|
+
return typeof value === "string" && OUTPUT_FORMATS.includes(value);
|
|
2375
|
+
}
|
|
2376
|
+
function isJsonStrictToken(token) {
|
|
2377
|
+
return token === "--json-strict" || token.startsWith("--json-strict=");
|
|
2378
|
+
}
|
|
2379
|
+
function detectJsonStrict(argv) {
|
|
2380
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
2381
|
+
const token = argv[index];
|
|
2382
|
+
const scan = classifyTopLevelFlagScan(token);
|
|
2383
|
+
if (scan.stop) break;
|
|
2384
|
+
if (isJsonStrictToken(token)) return true;
|
|
2385
|
+
if (scan.skipNext) index += 1;
|
|
2386
|
+
}
|
|
2387
|
+
return false;
|
|
2388
|
+
}
|
|
2389
|
+
function shouldSkipTopLevelVersionToken(token) {
|
|
2390
|
+
return matchesLongFlagValue(token, TOP_LEVEL_VERSION_VALUE_FLAG_VALUES) || TOP_LEVEL_VERSION_BOOLEAN_FLAGS.has(token);
|
|
2391
|
+
}
|
|
2392
|
+
function topLevelVersionTokenDecision(token) {
|
|
2393
|
+
if (token === "--version" || token === "-V") return "version";
|
|
2394
|
+
if (!token.startsWith("-") || token === "-") return "stop";
|
|
2395
|
+
if (TOP_LEVEL_VERSION_VALUE_FLAGS.has(token)) return "skip-next";
|
|
2396
|
+
if (shouldSkipTopLevelVersionToken(token)) return "skip";
|
|
2397
|
+
return "stop";
|
|
2398
|
+
}
|
|
2399
|
+
function isTopLevelVersionRequest(argv) {
|
|
2400
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
2401
|
+
const token = argv[index];
|
|
2402
|
+
if (token === "--") return false;
|
|
2403
|
+
const decision = topLevelVersionTokenDecision(token);
|
|
2404
|
+
if (decision === "version") return true;
|
|
2405
|
+
if (decision === "stop") return false;
|
|
2406
|
+
if (decision === "skip-next") index += 1;
|
|
2407
|
+
}
|
|
2408
|
+
return false;
|
|
2409
|
+
}
|
|
2410
|
+
async function emitJsonErrorEvent(error) {
|
|
2411
|
+
const formatter = createOutputFormatter("json", {
|
|
2412
|
+
jsonContext: { sessionId: "unknown" },
|
|
2413
|
+
suppressReads: false
|
|
2414
|
+
});
|
|
2415
|
+
formatter.onError(error);
|
|
2416
|
+
formatter.flush();
|
|
2417
|
+
}
|
|
2418
|
+
function isOutputAlreadyEmitted(error) {
|
|
2419
|
+
if (!error || typeof error !== "object") return false;
|
|
2420
|
+
return error.outputAlreadyEmitted === true;
|
|
2421
|
+
}
|
|
2422
|
+
async function emitRequestedError(error, normalized, outputPolicy) {
|
|
2423
|
+
if (isOutputAlreadyEmitted(error)) return;
|
|
2424
|
+
if (outputPolicy.format === "json") {
|
|
2425
|
+
await emitJsonErrorEvent(normalized);
|
|
2426
|
+
return;
|
|
2427
|
+
}
|
|
2428
|
+
if (outputPolicy.format === "quiet") {
|
|
2429
|
+
const formatter = createOutputFormatter("quiet");
|
|
2430
|
+
formatter.onError(normalized);
|
|
2431
|
+
formatter.flush();
|
|
2432
|
+
return;
|
|
2433
|
+
}
|
|
2434
|
+
if (!outputPolicy.suppressNonJsonStderr) {
|
|
2435
|
+
process.stderr.write(`${normalized.message}\n`);
|
|
2436
|
+
if (outputPolicy.format === "text") for (const hint of getTextErrorRemediationHints(normalized)) process.stderr.write(`${hint}\n`);
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
async function handleQueueOwnerCommand(argv) {
|
|
2440
|
+
installPerfMetricsCapture({
|
|
2441
|
+
argv: argv.slice(2),
|
|
2442
|
+
role: argv[2] === "__queue-owner" ? "queue_owner" : "cli"
|
|
2443
|
+
});
|
|
2444
|
+
if (argv[2] !== "__queue-owner") return false;
|
|
2445
|
+
try {
|
|
2446
|
+
await runQueueOwnerFromStdin();
|
|
2447
|
+
return true;
|
|
2448
|
+
} catch (error) {
|
|
2449
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2450
|
+
process.stderr.write(`[acpx] queue owner failed: ${message}\n`);
|
|
2451
|
+
process.exit(EXIT_CODES.ERROR);
|
|
2452
|
+
return true;
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
async function maybeHandleSkillflag(argv) {
|
|
2456
|
+
if (!shouldMaybeHandleSkillflag(argv)) return;
|
|
2457
|
+
const { findSkillsRoot, maybeHandleSkillflag } = await loadSkillflagModule();
|
|
2458
|
+
await maybeHandleSkillflag(argv, {
|
|
2459
|
+
skillsRoot: findSkillsRoot(import.meta.url),
|
|
2460
|
+
includeBundledSkill: false
|
|
2461
|
+
});
|
|
2462
|
+
}
|
|
2463
|
+
function createProgram(requestedJsonStrict) {
|
|
2464
|
+
const program = new Command();
|
|
2465
|
+
program.name("acpx").description("Headless CLI client for the Agent Client Protocol").version(getAcpxVersion()).enablePositionalOptions().showHelpAfterError();
|
|
2466
|
+
if (requestedJsonStrict) program.configureOutput({
|
|
2467
|
+
writeOut: () => {},
|
|
2468
|
+
writeErr: () => {}
|
|
2469
|
+
});
|
|
2470
|
+
return program;
|
|
2471
|
+
}
|
|
2472
|
+
async function handleProgramParseError(error, requestedOutputPolicy) {
|
|
2473
|
+
if (error instanceof CommanderError) {
|
|
2474
|
+
if (error.code === "commander.helpDisplayed" || error.code === "commander.version" || error.code === "commander.help" && error.exitCode === 0) process.exit(EXIT_CODES.SUCCESS);
|
|
2475
|
+
const normalized = normalizeOutputError(error, {
|
|
2476
|
+
defaultCode: "USAGE",
|
|
2477
|
+
origin: "cli"
|
|
2478
|
+
});
|
|
2479
|
+
await emitRequestedError(error, normalized, requestedOutputPolicy);
|
|
2480
|
+
process.exit(exitCodeForOutputErrorCode(normalized.code));
|
|
2481
|
+
}
|
|
2482
|
+
if (error instanceof InterruptedError) process.exit(EXIT_CODES.INTERRUPTED);
|
|
2483
|
+
const normalized = normalizeOutputError(error, { origin: "cli" });
|
|
2484
|
+
await emitRequestedError(error, normalized, requestedOutputPolicy);
|
|
2485
|
+
process.exit(exitCodeForOutputErrorCode(normalized.code));
|
|
2486
|
+
}
|
|
2487
|
+
async function main(argv = process.argv) {
|
|
2488
|
+
const rawArgs = normalizeLifecycleScriptArgs(argv.slice(2));
|
|
2489
|
+
const normalizedArgv = [
|
|
2490
|
+
argv[0] ?? "node",
|
|
2491
|
+
argv[1] ?? "acpx",
|
|
2492
|
+
...rawArgs
|
|
2493
|
+
];
|
|
2494
|
+
if (await handleQueueOwnerCommand(argv)) return;
|
|
2495
|
+
if (isTopLevelVersionRequest(rawArgs)) {
|
|
2496
|
+
process.stdout.write(`${getAcpxVersion()}\n`);
|
|
2497
|
+
return;
|
|
2498
|
+
}
|
|
2499
|
+
await maybeHandleSkillflag(normalizedArgv);
|
|
2500
|
+
const requestedJsonStrict = detectJsonStrict(rawArgs);
|
|
2501
|
+
let requestedOutputPolicy = {
|
|
2502
|
+
...resolveOutputPolicy(detectRequestedOutputFormat(rawArgs, "text"), requestedJsonStrict),
|
|
2503
|
+
suppressReads: rawArgs.some((token) => token === "--suppress-reads")
|
|
2504
|
+
};
|
|
2505
|
+
try {
|
|
2506
|
+
const initialCwd = detectInitialCwd(rawArgs);
|
|
2507
|
+
const config = await loadResolvedConfig(initialCwd, { mcpConfigPath: detectMcpConfigPath(rawArgs, initialCwd) });
|
|
2508
|
+
requestedOutputPolicy = {
|
|
2509
|
+
...resolveOutputPolicy(detectRequestedOutputFormat(rawArgs, config.format), requestedJsonStrict),
|
|
2510
|
+
suppressReads: requestedOutputPolicy.suppressReads
|
|
2511
|
+
};
|
|
2512
|
+
const program = createProgram(requestedJsonStrict);
|
|
2513
|
+
addGlobalFlags(program);
|
|
2514
|
+
program.exitOverride((error) => {
|
|
2515
|
+
throw error;
|
|
2516
|
+
});
|
|
2517
|
+
configurePublicCli({
|
|
2518
|
+
program,
|
|
2519
|
+
argv: rawArgs,
|
|
2520
|
+
config,
|
|
2521
|
+
requestedJsonStrict,
|
|
2522
|
+
topLevelVerbs: TOP_LEVEL_VERBS,
|
|
2523
|
+
listBuiltInAgents,
|
|
2524
|
+
detectAgentToken,
|
|
2525
|
+
registerAgentCommand,
|
|
2526
|
+
registerDefaultCommands,
|
|
2527
|
+
handlePromptAction: async (command, promptParts) => {
|
|
2528
|
+
await handlePrompt(void 0, promptParts, {}, command, config);
|
|
2529
|
+
}
|
|
2530
|
+
});
|
|
2531
|
+
await program.parseAsync(normalizedArgv);
|
|
2532
|
+
} catch (error) {
|
|
2533
|
+
await handleProgramParseError(error, requestedOutputPolicy);
|
|
2534
|
+
} finally {
|
|
2535
|
+
flushPerfMetricsCapture();
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
function normalizeLifecycleScriptArgs(rawArgs) {
|
|
2539
|
+
if (rawArgs[0] === "--" && (process.env.npm_lifecycle_event || process.env.npm_lifecycle_script)) return rawArgs.slice(1);
|
|
2540
|
+
return rawArgs;
|
|
2541
|
+
}
|
|
2542
|
+
// src/cli/broken-pipe.ts
|
|
2543
|
+
function handleBrokenPipeError(error, mode, exit = (code) => process.exit(code)) {
|
|
2544
|
+
if (error.code !== "EPIPE") throw error;
|
|
2545
|
+
if (mode === "exit") exit(0);
|
|
2546
|
+
}
|
|
2547
|
+
function installBrokenPipeHandler(stream, mode) {
|
|
2548
|
+
stream.on("error", (error) => {
|
|
2549
|
+
handleBrokenPipeError(error, mode);
|
|
2550
|
+
});
|
|
2551
|
+
}
|
|
2552
|
+
// src/cli.ts
|
|
2553
|
+
function isCliEntrypoint(argv) {
|
|
2554
|
+
const entry = argv[1];
|
|
2555
|
+
if (!entry) return false;
|
|
2556
|
+
try {
|
|
2557
|
+
const resolved = pathToFileURL(realpathSync(entry)).href;
|
|
2558
|
+
return import.meta.url === resolved;
|
|
2559
|
+
} catch {
|
|
2560
|
+
return false;
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
if (isCliEntrypoint(process.argv)) {
|
|
2564
|
+
const isQueueOwner = process.argv[2] === "__queue-owner";
|
|
2565
|
+
installBrokenPipeHandler(process.stdout, "exit");
|
|
2566
|
+
installBrokenPipeHandler(process.stderr, isQueueOwner ? "ignore" : "exit");
|
|
2567
|
+
const queueOwnerArgOverride = buildQueueOwnerArgOverride(fileURLToPath(import.meta.url));
|
|
2568
|
+
if (queueOwnerArgOverride) process.env.ACPX_QUEUE_OWNER_ARGS ??= queueOwnerArgOverride;
|
|
2569
|
+
main(process.argv);
|
|
2570
|
+
}
|
|
2571
|
+
export { formatPromptSessionBannerLine, parseAllowedTools, parseMaxTurns, parseTtlSeconds };
|
|
2572
|
+
|
|
2573
|
+
//# sourceMappingURL=cli.js.map
|