@tickernelz/paperclip-pro-adapter-utils 2026.925.0
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 +37 -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/composed-run-characterization.test.d.ts +2 -0
- package/dist/acpx-engine/composed-run-characterization.test.d.ts.map +1 -0
- package/dist/acpx-engine/composed-run-characterization.test.js +739 -0
- package/dist/acpx-engine/composed-run-characterization.test.js.map +1 -0
- package/dist/acpx-engine/constants.d.ts +20 -0
- package/dist/acpx-engine/constants.d.ts.map +1 -0
- package/dist/acpx-engine/constants.js +37 -0
- package/dist/acpx-engine/constants.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 +325 -0
- package/dist/acpx-engine/execute.d.ts.map +1 -0
- package/dist/acpx-engine/execute.js +4448 -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 +6694 -0
- package/dist/acpx-engine/execute.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 +151 -0
- package/dist/acpx-engine/remote-spawn-smoke.test.js.map +1 -0
- package/dist/acpx-engine/run-contracts.d.ts +413 -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 +829 -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 +73 -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 +142 -0
- package/dist/acpx-engine/run-site-sandbox.d.ts.map +1 -0
- package/dist/acpx-engine/run-site-sandbox.js +278 -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 +275 -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 +49 -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-characterization.test.d.ts +2 -0
- package/dist/acpx-engine/settlement-characterization.test.d.ts.map +1 -0
- package/dist/acpx-engine/settlement-characterization.test.js +880 -0
- package/dist/acpx-engine/settlement-characterization.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 +184 -0
- package/dist/acpx-engine/spawn-smoke.test.js.map +1 -0
- package/dist/acpx-engine/startup-cancellation.d.ts +8 -0
- package/dist/acpx-engine/startup-cancellation.d.ts.map +1 -0
- package/dist/acpx-engine/startup-cancellation.js +92 -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-characterization.test.d.ts +2 -0
- package/dist/acpx-engine/startup-characterization.test.d.ts.map +1 -0
- package/dist/acpx-engine/startup-characterization.test.js +742 -0
- package/dist/acpx-engine/startup-characterization.test.js.map +1 -0
- package/dist/acpx-engine/startup-timing.d.ts +419 -0
- package/dist/acpx-engine/startup-timing.d.ts.map +1 -0
- package/dist/acpx-engine/startup-timing.js +616 -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/turn-characterization.test.d.ts +2 -0
- package/dist/acpx-engine/turn-characterization.test.d.ts.map +1 -0
- package/dist/acpx-engine/turn-characterization.test.js +566 -0
- package/dist/acpx-engine/turn-characterization.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/billing.d.ts +2 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +16 -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 +14 -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 +38 -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/command-managed-runtime.d.ts +162 -0
- package/dist/command-managed-runtime.d.ts.map +1 -0
- package/dist/command-managed-runtime.js +456 -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 +908 -0
- package/dist/command-managed-runtime.test.js.map +1 -0
- package/dist/command-redaction.d.ts +15 -0
- package/dist/command-redaction.d.ts.map +1 -0
- package/dist/command-redaction.js +97 -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 +80 -0
- package/dist/command-redaction.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 +4 -0
- package/dist/exclude-patterns.d.ts.map +1 -0
- package/dist/exclude-patterns.js +26 -0
- package/dist/exclude-patterns.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 +6522 -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 +1842 -0
- package/dist/execution-target-stdin-race.test.js.map +1 -0
- package/dist/execution-target.d.ts +537 -0
- package/dist/execution-target.d.ts.map +1 -0
- package/dist/execution-target.js +3877 -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 +346 -0
- package/dist/execution-target.test.js.map +1 -0
- package/dist/git-workspace-sync.d.ts +193 -0
- package/dist/git-workspace-sync.d.ts.map +1 -0
- package/dist/git-workspace-sync.js +786 -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 +830 -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 +285 -0
- package/dist/github-launcher-environment.test.js.map +1 -0
- package/dist/github-launcher.d.ts +8 -0
- package/dist/github-launcher.d.ts.map +1 -0
- package/dist/github-launcher.js +127 -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 +166 -0
- package/dist/github-launcher.test.js.map +1 -0
- package/dist/http2-bridge-server.d.ts +465 -0
- package/dist/http2-bridge-server.d.ts.map +1 -0
- package/dist/http2-bridge-server.js +1087 -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 +2129 -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/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/paperclip-runner-permissions.d.ts +110 -0
- package/dist/paperclip-runner-permissions.d.ts.map +1 -0
- package/dist/paperclip-runner-permissions.js +150 -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 +47 -0
- package/dist/paperclip-runner-permissions.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 +2 -0
- package/dist/remote-execution-env.d.ts.map +1 -0
- package/dist/remote-execution-env.js +46 -0
- package/dist/remote-execution-env.js.map +1 -0
- package/dist/remote-managed-runtime.d.ts +45 -0
- package/dist/remote-managed-runtime.d.ts.map +1 -0
- package/dist/remote-managed-runtime.js +183 -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 +294 -0
- package/dist/remote-managed-runtime.test.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 +268 -0
- package/dist/sandbox-callback-bridge.d.ts.map +1 -0
- package/dist/sandbox-callback-bridge.js +2357 -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 +3253 -0
- package/dist/sandbox-callback-bridge.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-runtime.d.ts +417 -0
- package/dist/sandbox-managed-runtime.d.ts.map +1 -0
- package/dist/sandbox-managed-runtime.js +1337 -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 +3746 -0
- package/dist/sandbox-managed-runtime.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 +617 -0
- package/dist/server-utils.d.ts.map +1 -0
- package/dist/server-utils.js +3258 -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 +3047 -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 +165 -0
- package/dist/session-compaction.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-fixture.test.d.ts +2 -0
- package/dist/ssh-fixture.test.d.ts.map +1 -0
- package/dist/ssh-fixture.test.js +832 -0
- package/dist/ssh-fixture.test.js.map +1 -0
- package/dist/ssh.d.ts +124 -0
- package/dist/ssh.d.ts.map +1 -0
- package/dist/ssh.js +1667 -0
- package/dist/ssh.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-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 +780 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/workspace-restore-merge.d.ts +77 -0
- package/dist/workspace-restore-merge.d.ts.map +1 -0
- package/dist/workspace-restore-merge.js +396 -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 +438 -0
- package/dist/workspace-restore-merge.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 +34 -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 +71 -0
- package/dist/workspace-restore-teardown.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/LICENSE +191 -0
- package/node_modules/@agentclientprotocol/sdk/README.md +70 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1803 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1869 -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 +5036 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.d.ts +89 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js +490 -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 +507 -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 +221 -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 +112 -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 +33 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js +435 -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 +603 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +1076 -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 +22 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js +64 -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/node-adapter.d.ts +17 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js +426 -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 +499 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +37 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +474 -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 +535 -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 +69 -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 +82 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +183 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +207 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +51 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +6219 -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 +15215 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +3084 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.d.ts +30 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js +98 -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 +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js +88 -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 +53 -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 +992 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.d.ts +81 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js +386 -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 +1116 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.d.ts +4 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js +91 -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.d.ts +35 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js +115 -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/v2/acp.d.ts +957 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +1484 -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 +1287 -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 +946 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +1046 -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 +42 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +43 -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 +6208 -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 +33267 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +3199 -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 +357 -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 +13 -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 +104 -0
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +8967 -0
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +10242 -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 +503 -0
- package/node_modules/@clack/core/dist/index.mjs +1003 -0
- package/node_modules/@clack/core/package.json +63 -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 +949 -0
- package/node_modules/@clack/prompts/dist/index.mjs +1423 -0
- package/node_modules/@clack/prompts/package.json +67 -0
- package/node_modules/@esbuild/linux-x64/README.md +3 -0
- package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- package/node_modules/@esbuild/linux-x64/package.json +20 -0
- package/node_modules/acpx/LICENSE +21 -0
- package/node_modules/acpx/README.md +424 -0
- package/node_modules/acpx/dist/cli-CxsS1XQp.js +197 -0
- package/node_modules/acpx/dist/cli-CxsS1XQp.js.map +1 -0
- package/node_modules/acpx/dist/cli.d.ts +14 -0
- package/node_modules/acpx/dist/cli.d.ts.map +1 -0
- package/node_modules/acpx/dist/cli.js +2683 -0
- package/node_modules/acpx/dist/cli.js.map +1 -0
- package/node_modules/acpx/dist/client-DwNyFauq.d.ts +192 -0
- package/node_modules/acpx/dist/client-DwNyFauq.d.ts.map +1 -0
- package/node_modules/acpx/dist/flags-Bjq_XQ4-.js +260 -0
- package/node_modules/acpx/dist/flags-Bjq_XQ4-.js.map +1 -0
- package/node_modules/acpx/dist/flows-Db_LZKu9.js +1920 -0
- package/node_modules/acpx/dist/flows-Db_LZKu9.js.map +1 -0
- package/node_modules/acpx/dist/flows.d.ts +318 -0
- package/node_modules/acpx/dist/flows.d.ts.map +1 -0
- package/node_modules/acpx/dist/flows.js +2 -0
- package/node_modules/acpx/dist/live-checkpoint-ClPCSdrW.js +6210 -0
- package/node_modules/acpx/dist/live-checkpoint-ClPCSdrW.js.map +1 -0
- package/node_modules/acpx/dist/output-CjdF5rHk.js +4593 -0
- package/node_modules/acpx/dist/output-CjdF5rHk.js.map +1 -0
- package/node_modules/acpx/dist/runtime.d.ts +472 -0
- package/node_modules/acpx/dist/runtime.d.ts.map +1 -0
- package/node_modules/acpx/dist/runtime.js +1711 -0
- package/node_modules/acpx/dist/runtime.js.map +1 -0
- package/node_modules/acpx/dist/session-options-jkYbBxGE.d.ts +278 -0
- package/node_modules/acpx/dist/session-options-jkYbBxGE.d.ts.map +1 -0
- package/node_modules/acpx/package.json +129 -0
- package/node_modules/acpx/skills/acpx/SKILL.md +617 -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-events/LICENSE +201 -0
- package/node_modules/bare-events/README.md +25 -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 +89 -0
- package/node_modules/bare-events/index.js +397 -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 +79 -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 +2913 -0
- package/node_modules/bare-fs/binding.js +1 -0
- package/node_modules/bare-fs/index.d.ts +1502 -0
- package/node_modules/bare-fs/index.js +2855 -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/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 +19 -0
- package/node_modules/bare-path/binding.c +106 -0
- package/node_modules/bare-path/binding.js +1 -0
- package/node_modules/bare-path/index.d.ts +27 -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 +33 -0
- package/node_modules/bare-url/binding.c +422 -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 +96 -0
- package/node_modules/bare-url/index.js +676 -0
- package/node_modules/bare-url/lib/errors.d.ts +10 -0
- package/node_modules/bare-url/lib/errors.js +33 -0
- package/node_modules/bare-url/lib/url-search-params.d.ts +66 -0
- package/node_modules/bare-url/lib/url-search-params.js +276 -0
- package/node_modules/bare-url/package.json +54 -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 +1172 -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 +2790 -0
- package/node_modules/commander/lib/error.js +36 -0
- package/node_modules/commander/lib/help.js +731 -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 +64 -0
- package/node_modules/commander/typings/index.d.ts +1113 -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/sisteransi/license +21 -0
- package/node_modules/sisteransi/package.json +34 -0
- package/node_modules/sisteransi/readme.md +113 -0
- package/node_modules/sisteransi/src/index.js +58 -0
- package/node_modules/sisteransi/src/sisteransi.d.ts +35 -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/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 +418 -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/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 +264 -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 +342 -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 +190 -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 +2313 -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 +5192 -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 +1280 -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 +1908 -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 +1858 -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 +2669 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1273 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1273 -0
- package/node_modules/zod/v4/core/schemas.js +2606 -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 +949 -0
- package/node_modules/zod/v4/core/util.d.cts +278 -0
- package/node_modules/zod/v4/core/util.d.ts +278 -0
- package/node_modules/zod/v4/core/util.js +859 -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 +50 -0
|
@@ -0,0 +1,1869 @@
|
|
|
1
|
+
import * as schema from "./schema/index.js";
|
|
2
|
+
import * as validate from "./schema/zod.gen.js";
|
|
3
|
+
import { ndJsonStream as createJsonStream } from "./stream.js";
|
|
4
|
+
// Runtime narrowing helpers for extensible unions, exposed as companion values
|
|
5
|
+
// that merge (declaration merging) with the like-named types — e.g.
|
|
6
|
+
// `CreateElicitationResponse.isAccept(response)`. See schema/guards.gen.ts.
|
|
7
|
+
//
|
|
8
|
+
// Listed explicitly (not `export *`) so each value+type pair merges rather than
|
|
9
|
+
// colliding with the `export type *` above. The guards.gen re-export test
|
|
10
|
+
// asserts this list stays in sync as new extensible unions are added.
|
|
11
|
+
export { CreateElicitationRequest, CreateElicitationResponse, ElicitationPropertySchema, MultiSelectItems, } from "./schema/guards.gen.js";
|
|
12
|
+
export { AGENT_METHODS, CLIENT_METHODS, PROTOCOL_METHODS, PROTOCOL_VERSION, } from "./schema/index.js";
|
|
13
|
+
/**
|
|
14
|
+
* Creates a stable ACP v1 stream from newline-delimited JSON streams.
|
|
15
|
+
*
|
|
16
|
+
* @param output - The writable stream to send encoded messages to
|
|
17
|
+
* @param input - The readable stream to receive encoded messages from
|
|
18
|
+
* @returns A stream for bidirectional ACP v1 communication
|
|
19
|
+
*/
|
|
20
|
+
export function ndJsonStream(output, input) {
|
|
21
|
+
return createJsonStream(output, input);
|
|
22
|
+
}
|
|
23
|
+
export { RequestError } from "./jsonrpc.js";
|
|
24
|
+
import { Connection, Handled, HandlerRegistration } from "./jsonrpc.js";
|
|
25
|
+
function emptyObjectResponse(response) {
|
|
26
|
+
return response ?? {};
|
|
27
|
+
}
|
|
28
|
+
function isStream(value) {
|
|
29
|
+
return (typeof value === "object" &&
|
|
30
|
+
value !== null &&
|
|
31
|
+
"readable" in value &&
|
|
32
|
+
"writable" in value);
|
|
33
|
+
}
|
|
34
|
+
function memoryStreamPair() {
|
|
35
|
+
const leftToRight = new TransformStream();
|
|
36
|
+
const rightToLeft = new TransformStream();
|
|
37
|
+
return [
|
|
38
|
+
{
|
|
39
|
+
readable: rightToLeft.readable,
|
|
40
|
+
writable: leftToRight.writable,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
readable: leftToRight.readable,
|
|
44
|
+
writable: rightToLeft.writable,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* ACP method-name constants.
|
|
50
|
+
*
|
|
51
|
+
* Use these with `onRequest(...)`, `onNotification(...)`, `request(...)`, and
|
|
52
|
+
* `notify(...)` when you want literal-string type inference without spelling
|
|
53
|
+
* protocol strings inline.
|
|
54
|
+
*/
|
|
55
|
+
export const methods = {
|
|
56
|
+
agent: {
|
|
57
|
+
initialize: schema.AGENT_METHODS.initialize,
|
|
58
|
+
authenticate: schema.AGENT_METHODS.authenticate,
|
|
59
|
+
logout: schema.AGENT_METHODS.logout,
|
|
60
|
+
providers: {
|
|
61
|
+
list: schema.AGENT_METHODS.providers_list,
|
|
62
|
+
set: schema.AGENT_METHODS.providers_set,
|
|
63
|
+
disable: schema.AGENT_METHODS.providers_disable,
|
|
64
|
+
},
|
|
65
|
+
session: {
|
|
66
|
+
new: schema.AGENT_METHODS.session_new,
|
|
67
|
+
load: schema.AGENT_METHODS.session_load,
|
|
68
|
+
list: schema.AGENT_METHODS.session_list,
|
|
69
|
+
delete: schema.AGENT_METHODS.session_delete,
|
|
70
|
+
fork: schema.AGENT_METHODS.session_fork,
|
|
71
|
+
resume: schema.AGENT_METHODS.session_resume,
|
|
72
|
+
close: schema.AGENT_METHODS.session_close,
|
|
73
|
+
setMode: schema.AGENT_METHODS.session_set_mode,
|
|
74
|
+
setConfigOption: schema.AGENT_METHODS.session_set_config_option,
|
|
75
|
+
prompt: schema.AGENT_METHODS.session_prompt,
|
|
76
|
+
cancel: schema.AGENT_METHODS.session_cancel,
|
|
77
|
+
},
|
|
78
|
+
nes: {
|
|
79
|
+
start: schema.AGENT_METHODS.nes_start,
|
|
80
|
+
suggest: schema.AGENT_METHODS.nes_suggest,
|
|
81
|
+
accept: schema.AGENT_METHODS.nes_accept,
|
|
82
|
+
reject: schema.AGENT_METHODS.nes_reject,
|
|
83
|
+
close: schema.AGENT_METHODS.nes_close,
|
|
84
|
+
},
|
|
85
|
+
document: {
|
|
86
|
+
didOpen: schema.AGENT_METHODS.document_did_open,
|
|
87
|
+
didChange: schema.AGENT_METHODS.document_did_change,
|
|
88
|
+
didClose: schema.AGENT_METHODS.document_did_close,
|
|
89
|
+
didSave: schema.AGENT_METHODS.document_did_save,
|
|
90
|
+
didFocus: schema.AGENT_METHODS.document_did_focus,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
client: {
|
|
94
|
+
session: {
|
|
95
|
+
requestPermission: schema.CLIENT_METHODS.session_request_permission,
|
|
96
|
+
update: schema.CLIENT_METHODS.session_update,
|
|
97
|
+
},
|
|
98
|
+
fs: {
|
|
99
|
+
writeTextFile: schema.CLIENT_METHODS.fs_write_text_file,
|
|
100
|
+
readTextFile: schema.CLIENT_METHODS.fs_read_text_file,
|
|
101
|
+
},
|
|
102
|
+
terminal: {
|
|
103
|
+
create: schema.CLIENT_METHODS.terminal_create,
|
|
104
|
+
output: schema.CLIENT_METHODS.terminal_output,
|
|
105
|
+
release: schema.CLIENT_METHODS.terminal_release,
|
|
106
|
+
waitForExit: schema.CLIENT_METHODS.terminal_wait_for_exit,
|
|
107
|
+
kill: schema.CLIENT_METHODS.terminal_kill,
|
|
108
|
+
},
|
|
109
|
+
elicitation: {
|
|
110
|
+
create: schema.CLIENT_METHODS.elicitation_create,
|
|
111
|
+
complete: schema.CLIENT_METHODS.elicitation_complete,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
protocol: {
|
|
115
|
+
cancelRequest: schema.PROTOCOL_METHODS.cancel_request,
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
const startActiveSession = Symbol("startActiveSession");
|
|
119
|
+
class AcpContext {
|
|
120
|
+
cx;
|
|
121
|
+
currentRequestId;
|
|
122
|
+
/** @internal */
|
|
123
|
+
constructor(cx, currentRequestId) {
|
|
124
|
+
this.cx = cx;
|
|
125
|
+
this.currentRequestId = currentRequestId;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* JSON-RPC id of the request currently being handled.
|
|
129
|
+
*
|
|
130
|
+
* This is `undefined` for notification handlers and for contexts created
|
|
131
|
+
* outside an inbound request, such as `connect(...)` and `connectWith(...)`.
|
|
132
|
+
*/
|
|
133
|
+
get requestId() {
|
|
134
|
+
return this.currentRequestId;
|
|
135
|
+
}
|
|
136
|
+
/** @internal */
|
|
137
|
+
get connectionContext() {
|
|
138
|
+
return this.cx;
|
|
139
|
+
}
|
|
140
|
+
/** @internal */
|
|
141
|
+
sendRequest(method, params, mapResponse, options) {
|
|
142
|
+
return this.cx.sendRequest(method, params, mapResponse, options);
|
|
143
|
+
}
|
|
144
|
+
/** @internal */
|
|
145
|
+
sendNotification(method, params) {
|
|
146
|
+
return this.cx.sendNotification(method, params);
|
|
147
|
+
}
|
|
148
|
+
/** @internal */
|
|
149
|
+
addDynamicHandler(handler) {
|
|
150
|
+
return this.cx.addDynamicHandler(handler);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Context passed to agent-side handlers.
|
|
155
|
+
*
|
|
156
|
+
* Agents use this context to call client-side ACP methods while handling
|
|
157
|
+
* requests such as `session/prompt`.
|
|
158
|
+
*/
|
|
159
|
+
export class AgentContext extends AcpContext {
|
|
160
|
+
constructor(cx, requestId) {
|
|
161
|
+
super(cx, requestId);
|
|
162
|
+
}
|
|
163
|
+
/** @internal */
|
|
164
|
+
static create(cx, requestId) {
|
|
165
|
+
return new AgentContext(cx, requestId);
|
|
166
|
+
}
|
|
167
|
+
request(method, params, options) {
|
|
168
|
+
const spec = clientRequestSpecsByMethod[method];
|
|
169
|
+
return this.sendRequest(method, params, spec?.mapResponse, options);
|
|
170
|
+
}
|
|
171
|
+
notify(method, params) {
|
|
172
|
+
return this.sendNotification(method, params);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Context used by clients to call agent-side ACP methods.
|
|
177
|
+
*
|
|
178
|
+
* `connectWith` passes a `ClientContext` to the callback. Client handlers also
|
|
179
|
+
* receive one as `ctx.agent` when they need to call back into the agent.
|
|
180
|
+
*/
|
|
181
|
+
export class ClientContext extends AcpContext {
|
|
182
|
+
constructor(cx, requestId) {
|
|
183
|
+
super(cx, requestId);
|
|
184
|
+
}
|
|
185
|
+
/** @internal */
|
|
186
|
+
static create(cx, requestId) {
|
|
187
|
+
return new ClientContext(cx, requestId);
|
|
188
|
+
}
|
|
189
|
+
/** @internal */
|
|
190
|
+
[startActiveSession](params, options) {
|
|
191
|
+
return this.sendRequest(schema.AGENT_METHODS.session_new, params, (response) => this.attachSession(response), options);
|
|
192
|
+
}
|
|
193
|
+
buildSession(cwdOrRequest) {
|
|
194
|
+
if (typeof cwdOrRequest === "string") {
|
|
195
|
+
return SessionBuilder.create(this, {
|
|
196
|
+
cwd: cwdOrRequest,
|
|
197
|
+
mcpServers: [],
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return SessionBuilder.create(this, cwdOrRequest);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Builds active-session helpers around a `session/new` response.
|
|
204
|
+
*/
|
|
205
|
+
attachSession(response) {
|
|
206
|
+
const updates = new AsyncQueue();
|
|
207
|
+
const closeSignal = this.connectionContext.signal;
|
|
208
|
+
const failUpdatesOnClose = () => {
|
|
209
|
+
updates.fail(closeSignal.reason ?? new Error("ACP connection closed"));
|
|
210
|
+
};
|
|
211
|
+
if (closeSignal.aborted) {
|
|
212
|
+
failUpdatesOnClose();
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
closeSignal.addEventListener("abort", failUpdatesOnClose);
|
|
216
|
+
}
|
|
217
|
+
const sessionRegistration = sessionUpdateRouter(this.connectionContext).attach(response, updates);
|
|
218
|
+
const closeRegistration = new HandlerRegistration(() => {
|
|
219
|
+
closeSignal.removeEventListener("abort", failUpdatesOnClose);
|
|
220
|
+
});
|
|
221
|
+
return ActiveSession.create(this, response, updates, [
|
|
222
|
+
sessionRegistration,
|
|
223
|
+
closeRegistration,
|
|
224
|
+
]);
|
|
225
|
+
}
|
|
226
|
+
request(method, params, options) {
|
|
227
|
+
const spec = agentRequestSpecsByMethod[method];
|
|
228
|
+
return this.sendRequest(method, params, spec?.mapResponse, options);
|
|
229
|
+
}
|
|
230
|
+
notify(method, params) {
|
|
231
|
+
return this.sendNotification(method, params);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
class AcpConnectionHandle {
|
|
235
|
+
connection;
|
|
236
|
+
constructor(connection) {
|
|
237
|
+
this.connection = connection;
|
|
238
|
+
}
|
|
239
|
+
get signal() {
|
|
240
|
+
return this.connection.signal;
|
|
241
|
+
}
|
|
242
|
+
get closed() {
|
|
243
|
+
return this.connection.closed;
|
|
244
|
+
}
|
|
245
|
+
close(error) {
|
|
246
|
+
this.connection.close(error);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
class AgentConnectionHandle extends AcpConnectionHandle {
|
|
250
|
+
connectHandlers;
|
|
251
|
+
client;
|
|
252
|
+
didStartConnectHandlers = false;
|
|
253
|
+
constructor(connection, connectHandlers = []) {
|
|
254
|
+
super(connection);
|
|
255
|
+
this.connectHandlers = connectHandlers;
|
|
256
|
+
this.client = AgentContext.create(connection.getContext());
|
|
257
|
+
}
|
|
258
|
+
/** @internal */
|
|
259
|
+
startConnectHandlers() {
|
|
260
|
+
if (this.didStartConnectHandlers) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
this.didStartConnectHandlers = true;
|
|
264
|
+
runConnectHandlers(this, this.connectHandlers);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
class ClientConnectionHandle extends AcpConnectionHandle {
|
|
268
|
+
connectHandlers;
|
|
269
|
+
agent;
|
|
270
|
+
didStartConnectHandlers = false;
|
|
271
|
+
constructor(connection, connectHandlers = []) {
|
|
272
|
+
super(connection);
|
|
273
|
+
this.connectHandlers = connectHandlers;
|
|
274
|
+
this.agent = ClientContext.create(connection.getContext());
|
|
275
|
+
}
|
|
276
|
+
/** @internal */
|
|
277
|
+
startConnectHandlers() {
|
|
278
|
+
if (this.didStartConnectHandlers) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
this.didStartConnectHandlers = true;
|
|
282
|
+
runConnectHandlers(this, this.connectHandlers);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function agentConnection(connection, connectHandlers = []) {
|
|
286
|
+
return new AgentConnectionHandle(connection, connectHandlers);
|
|
287
|
+
}
|
|
288
|
+
function clientConnection(connection, connectHandlers = []) {
|
|
289
|
+
return new ClientConnectionHandle(connection, connectHandlers);
|
|
290
|
+
}
|
|
291
|
+
class AsyncQueue {
|
|
292
|
+
values = [];
|
|
293
|
+
waiters = [];
|
|
294
|
+
failed = false;
|
|
295
|
+
failure;
|
|
296
|
+
enqueue(value) {
|
|
297
|
+
if (this.failed) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
const waiter = this.waiters.shift();
|
|
301
|
+
if (waiter) {
|
|
302
|
+
waiter.resolve(value);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
this.values.push({ kind: "value", value });
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
reject(error) {
|
|
309
|
+
if (this.failed) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (this.waiters.length > 0) {
|
|
313
|
+
for (const waiter of this.waiters.splice(0)) {
|
|
314
|
+
waiter.reject(error);
|
|
315
|
+
}
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
this.values.push({ kind: "error", error });
|
|
319
|
+
}
|
|
320
|
+
clearErrors() {
|
|
321
|
+
this.values = this.values.filter((entry) => entry.kind === "value");
|
|
322
|
+
}
|
|
323
|
+
fail(error) {
|
|
324
|
+
if (this.failed) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
this.failed = true;
|
|
328
|
+
this.failure = error;
|
|
329
|
+
for (const waiter of this.waiters.splice(0)) {
|
|
330
|
+
waiter.reject(error);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
next() {
|
|
334
|
+
if (this.values.length > 0) {
|
|
335
|
+
const entry = this.values.shift();
|
|
336
|
+
if (entry.kind === "error") {
|
|
337
|
+
return Promise.reject(entry.error);
|
|
338
|
+
}
|
|
339
|
+
return Promise.resolve(entry.value);
|
|
340
|
+
}
|
|
341
|
+
if (this.failed) {
|
|
342
|
+
return Promise.reject(this.failure);
|
|
343
|
+
}
|
|
344
|
+
return new Promise((resolve, reject) => {
|
|
345
|
+
this.waiters.push({ resolve, reject });
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
function cloneNewSessionRequest(request) {
|
|
350
|
+
return {
|
|
351
|
+
...request,
|
|
352
|
+
additionalDirectories: request.additionalDirectories
|
|
353
|
+
? [...request.additionalDirectories]
|
|
354
|
+
: undefined,
|
|
355
|
+
mcpServers: [...request.mcpServers],
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Builder for creating an `ActiveSession`.
|
|
360
|
+
*
|
|
361
|
+
* Start from `ctx.buildSession("/absolute/cwd")` for the common case, or
|
|
362
|
+
* pass a full `NewSessionRequest` to `ctx.buildSession(...)` when the session
|
|
363
|
+
* needs MCP servers, `_meta`, or additional request fields. All paths in ACP
|
|
364
|
+
* payloads should be absolute.
|
|
365
|
+
*/
|
|
366
|
+
export class SessionBuilder {
|
|
367
|
+
cx;
|
|
368
|
+
request;
|
|
369
|
+
constructor(cx, request) {
|
|
370
|
+
this.cx = cx;
|
|
371
|
+
this.request = cloneNewSessionRequest(request);
|
|
372
|
+
}
|
|
373
|
+
/** @internal */
|
|
374
|
+
static create(cx, request) {
|
|
375
|
+
return new SessionBuilder(cx, request);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Returns the `session/new` request that will be sent.
|
|
379
|
+
*
|
|
380
|
+
* The returned object is a defensive copy, so mutating it does not change the
|
|
381
|
+
* builder.
|
|
382
|
+
*/
|
|
383
|
+
toRequest() {
|
|
384
|
+
return cloneNewSessionRequest(this.request);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Replaces the additional workspace roots for this session.
|
|
388
|
+
*
|
|
389
|
+
* `additionalDirectories` expand the session's file-system scope without
|
|
390
|
+
* changing `cwd`. Each path should be absolute.
|
|
391
|
+
*/
|
|
392
|
+
withAdditionalDirectories(additionalDirectories) {
|
|
393
|
+
this.request = {
|
|
394
|
+
...this.request,
|
|
395
|
+
additionalDirectories: [...additionalDirectories],
|
|
396
|
+
};
|
|
397
|
+
return this;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Adds one MCP server to the `session/new` request.
|
|
401
|
+
*/
|
|
402
|
+
withMcpServer(mcpServer) {
|
|
403
|
+
this.request = {
|
|
404
|
+
...this.request,
|
|
405
|
+
mcpServers: [...this.request.mcpServers, mcpServer],
|
|
406
|
+
};
|
|
407
|
+
return this;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Starts the session and returns an `ActiveSession` for prompting and reading
|
|
411
|
+
* updates.
|
|
412
|
+
*
|
|
413
|
+
* Call `dispose()` on the returned session when you no longer need update
|
|
414
|
+
* routing, or use `withSession(...)` to scope disposal automatically.
|
|
415
|
+
*/
|
|
416
|
+
async start(options) {
|
|
417
|
+
return this.cx[startActiveSession](this.toRequest(), options);
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Starts the session, runs `op`, and disposes the active-session update
|
|
421
|
+
* routing when `op` finishes or throws.
|
|
422
|
+
*/
|
|
423
|
+
async withSession(op) {
|
|
424
|
+
const session = await this.start();
|
|
425
|
+
try {
|
|
426
|
+
return await op(session);
|
|
427
|
+
}
|
|
428
|
+
finally {
|
|
429
|
+
session.dispose();
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Convenience wrapper for an active ACP session.
|
|
435
|
+
*
|
|
436
|
+
* An active session routes `session/update` notifications for one session ID
|
|
437
|
+
* into an async queue. Use `prompt(...)` to send user content, then read updates
|
|
438
|
+
* with `nextUpdate()` until a `stop` message is returned.
|
|
439
|
+
*/
|
|
440
|
+
export class ActiveSession {
|
|
441
|
+
cx;
|
|
442
|
+
sessionResponse;
|
|
443
|
+
updates;
|
|
444
|
+
registrations;
|
|
445
|
+
constructor(cx, sessionResponse, updates, registrations) {
|
|
446
|
+
this.cx = cx;
|
|
447
|
+
this.sessionResponse = sessionResponse;
|
|
448
|
+
this.updates = updates;
|
|
449
|
+
this.registrations = registrations;
|
|
450
|
+
}
|
|
451
|
+
/** @internal */
|
|
452
|
+
static create(cx, sessionResponse, updates, registrations) {
|
|
453
|
+
return new ActiveSession(cx, sessionResponse, updates, registrations);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Session ID returned by `session/new`.
|
|
457
|
+
*/
|
|
458
|
+
get sessionId() {
|
|
459
|
+
return this.sessionResponse.sessionId;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Mode state returned when the session was created, if the agent provided it.
|
|
463
|
+
*/
|
|
464
|
+
get modes() {
|
|
465
|
+
return this.sessionResponse.modes;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Metadata returned when the session was created.
|
|
469
|
+
*/
|
|
470
|
+
get meta() {
|
|
471
|
+
return this.sessionResponse._meta;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Full response returned by `session/new`.
|
|
475
|
+
*/
|
|
476
|
+
get newSessionResponse() {
|
|
477
|
+
return this.sessionResponse;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Sends a prompt to this session.
|
|
481
|
+
*
|
|
482
|
+
* Strings are converted to one text content block. A single content block is
|
|
483
|
+
* wrapped in an array. The returned promise resolves with the final
|
|
484
|
+
* `PromptResponse`, and the same completion is also queued as a `stop`
|
|
485
|
+
* message for `nextUpdate()`.
|
|
486
|
+
*/
|
|
487
|
+
prompt(prompt, options) {
|
|
488
|
+
this.updates.clearErrors();
|
|
489
|
+
const response = this.cx.request(schema.AGENT_METHODS.session_prompt, {
|
|
490
|
+
sessionId: this.sessionId,
|
|
491
|
+
prompt: this.promptBlocks(prompt),
|
|
492
|
+
}, options);
|
|
493
|
+
void response.then((value) => {
|
|
494
|
+
this.updates.enqueue({
|
|
495
|
+
kind: "stop",
|
|
496
|
+
response: value,
|
|
497
|
+
stopReason: value.stopReason,
|
|
498
|
+
});
|
|
499
|
+
}, (error) => {
|
|
500
|
+
this.updates.reject(error);
|
|
501
|
+
});
|
|
502
|
+
return response;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Reads the next update or stop message for this session.
|
|
506
|
+
*/
|
|
507
|
+
nextUpdate() {
|
|
508
|
+
return this.updates.next();
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Reads text chunks until the current prompt turn stops.
|
|
512
|
+
*
|
|
513
|
+
* Only `agent_message_chunk` updates with text content are appended. Other
|
|
514
|
+
* update types are ignored by this helper; use `nextUpdate()` when you need
|
|
515
|
+
* tool calls, plans, or the final `PromptResponse`.
|
|
516
|
+
*/
|
|
517
|
+
async readText() {
|
|
518
|
+
let output = "";
|
|
519
|
+
for (;;) {
|
|
520
|
+
const message = await this.nextUpdate();
|
|
521
|
+
if (message.kind === "stop") {
|
|
522
|
+
return output;
|
|
523
|
+
}
|
|
524
|
+
const { update } = message;
|
|
525
|
+
if (update.sessionUpdate === "agent_message_chunk" &&
|
|
526
|
+
update.content.type === "text") {
|
|
527
|
+
output += update.content.text;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Stops routing updates to this active-session helper.
|
|
533
|
+
*
|
|
534
|
+
* This does not close the ACP session on the agent. Use `ClientContext`
|
|
535
|
+
* session lifecycle methods when the protocol session itself should be closed
|
|
536
|
+
* or deleted.
|
|
537
|
+
*/
|
|
538
|
+
dispose() {
|
|
539
|
+
for (const registration of this.registrations.splice(0)) {
|
|
540
|
+
registration.dispose();
|
|
541
|
+
}
|
|
542
|
+
this.updates.fail(new Error("Active session disposed"));
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Supports explicit resource management with `using`.
|
|
546
|
+
*/
|
|
547
|
+
[Symbol.dispose]() {
|
|
548
|
+
this.dispose();
|
|
549
|
+
}
|
|
550
|
+
promptBlocks(prompt) {
|
|
551
|
+
if (typeof prompt === "string") {
|
|
552
|
+
return [{ type: "text", text: prompt }];
|
|
553
|
+
}
|
|
554
|
+
if (Array.isArray(prompt)) {
|
|
555
|
+
return prompt;
|
|
556
|
+
}
|
|
557
|
+
return [prompt];
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
function parseParams(parser, params) {
|
|
561
|
+
if (!parser) {
|
|
562
|
+
return params;
|
|
563
|
+
}
|
|
564
|
+
if (typeof parser === "function") {
|
|
565
|
+
return parser(params);
|
|
566
|
+
}
|
|
567
|
+
return parser.parse(params);
|
|
568
|
+
}
|
|
569
|
+
function requestSpec(method, params, mapResponse) {
|
|
570
|
+
return { method, params, mapResponse };
|
|
571
|
+
}
|
|
572
|
+
function notificationSpec(method, params) {
|
|
573
|
+
return { method, params };
|
|
574
|
+
}
|
|
575
|
+
function registerAppRequest(builder, spec, context, handler) {
|
|
576
|
+
builder.onReceiveRequest(spec.method, (params) => parseParams(spec.params, params), async (params, responder, cx) => {
|
|
577
|
+
const response = await handler(context(params, cx, responder.signal, responder.id));
|
|
578
|
+
await responder.respond((spec.mapResponse
|
|
579
|
+
? spec.mapResponse(response)
|
|
580
|
+
: response));
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
function registerAppNotification(builder, spec, context, handler) {
|
|
584
|
+
builder.onReceiveNotification(spec.method, (params) => parseParams(spec.params, params), (params, cx) => handler(context(params, cx, cx.signal)));
|
|
585
|
+
}
|
|
586
|
+
function specsByMethod(specs) {
|
|
587
|
+
const byMethod = {};
|
|
588
|
+
for (const spec of Object.values(specs)) {
|
|
589
|
+
byMethod[spec.method] = spec;
|
|
590
|
+
}
|
|
591
|
+
return byMethod;
|
|
592
|
+
}
|
|
593
|
+
const agentRequestSpecs = {
|
|
594
|
+
initialize: requestSpec(schema.AGENT_METHODS.initialize, validate.zInitializeRequest),
|
|
595
|
+
newSession: requestSpec(schema.AGENT_METHODS.session_new, validate.zNewSessionRequest),
|
|
596
|
+
loadSession: requestSpec(schema.AGENT_METHODS.session_load, validate.zLoadSessionRequest, emptyObjectResponse),
|
|
597
|
+
unstable_forkSession: requestSpec(schema.AGENT_METHODS.session_fork, validate.zForkSessionRequest),
|
|
598
|
+
listSessions: requestSpec(schema.AGENT_METHODS.session_list, validate.zListSessionsRequest),
|
|
599
|
+
deleteSession: requestSpec(schema.AGENT_METHODS.session_delete, validate.zDeleteSessionRequest, emptyObjectResponse),
|
|
600
|
+
resumeSession: requestSpec(schema.AGENT_METHODS.session_resume, validate.zResumeSessionRequest),
|
|
601
|
+
closeSession: requestSpec(schema.AGENT_METHODS.session_close, validate.zCloseSessionRequest, emptyObjectResponse),
|
|
602
|
+
setSessionMode: requestSpec(schema.AGENT_METHODS.session_set_mode, validate.zSetSessionModeRequest, emptyObjectResponse),
|
|
603
|
+
setSessionConfigOption: requestSpec(schema.AGENT_METHODS.session_set_config_option, validate.zSetSessionConfigOptionRequest),
|
|
604
|
+
authenticate: requestSpec(schema.AGENT_METHODS.authenticate, validate.zAuthenticateRequest, emptyObjectResponse),
|
|
605
|
+
unstable_listProviders: requestSpec(schema.AGENT_METHODS.providers_list, validate.zListProvidersRequest),
|
|
606
|
+
unstable_setProvider: requestSpec(schema.AGENT_METHODS.providers_set, validate.zSetProviderRequest, emptyObjectResponse),
|
|
607
|
+
unstable_disableProvider: requestSpec(schema.AGENT_METHODS.providers_disable, validate.zDisableProviderRequest, emptyObjectResponse),
|
|
608
|
+
logout: requestSpec(schema.AGENT_METHODS.logout, validate.zLogoutRequest, emptyObjectResponse),
|
|
609
|
+
prompt: requestSpec(schema.AGENT_METHODS.session_prompt, validate.zPromptRequest),
|
|
610
|
+
unstable_startNes: requestSpec(schema.AGENT_METHODS.nes_start, validate.zStartNesRequest),
|
|
611
|
+
unstable_suggestNes: requestSpec(schema.AGENT_METHODS.nes_suggest, validate.zSuggestNesRequest),
|
|
612
|
+
unstable_closeNes: requestSpec(schema.AGENT_METHODS.nes_close, validate.zCloseNesRequest, emptyObjectResponse),
|
|
613
|
+
};
|
|
614
|
+
const agentNotificationSpecs = {
|
|
615
|
+
cancel: notificationSpec(schema.AGENT_METHODS.session_cancel, validate.zCancelNotification),
|
|
616
|
+
unstable_didOpenDocument: notificationSpec(schema.AGENT_METHODS.document_did_open, validate.zDidOpenDocumentNotification),
|
|
617
|
+
unstable_didChangeDocument: notificationSpec(schema.AGENT_METHODS.document_did_change, validate.zDidChangeDocumentNotification),
|
|
618
|
+
unstable_didCloseDocument: notificationSpec(schema.AGENT_METHODS.document_did_close, validate.zDidCloseDocumentNotification),
|
|
619
|
+
unstable_didSaveDocument: notificationSpec(schema.AGENT_METHODS.document_did_save, validate.zDidSaveDocumentNotification),
|
|
620
|
+
unstable_didFocusDocument: notificationSpec(schema.AGENT_METHODS.document_did_focus, validate.zDidFocusDocumentNotification),
|
|
621
|
+
unstable_acceptNes: notificationSpec(schema.AGENT_METHODS.nes_accept, validate.zAcceptNesNotification),
|
|
622
|
+
unstable_rejectNes: notificationSpec(schema.AGENT_METHODS.nes_reject, validate.zRejectNesNotification),
|
|
623
|
+
};
|
|
624
|
+
const clientRequestSpecs = {
|
|
625
|
+
requestPermission: requestSpec(schema.CLIENT_METHODS.session_request_permission, validate.zRequestPermissionRequest),
|
|
626
|
+
writeTextFile: requestSpec(schema.CLIENT_METHODS.fs_write_text_file, validate.zWriteTextFileRequest, emptyObjectResponse),
|
|
627
|
+
readTextFile: requestSpec(schema.CLIENT_METHODS.fs_read_text_file, validate.zReadTextFileRequest),
|
|
628
|
+
createTerminal: requestSpec(schema.CLIENT_METHODS.terminal_create, validate.zCreateTerminalRequest),
|
|
629
|
+
terminalOutput: requestSpec(schema.CLIENT_METHODS.terminal_output, validate.zTerminalOutputRequest),
|
|
630
|
+
releaseTerminal: requestSpec(schema.CLIENT_METHODS.terminal_release, validate.zReleaseTerminalRequest, emptyObjectResponse),
|
|
631
|
+
waitForTerminalExit: requestSpec(schema.CLIENT_METHODS.terminal_wait_for_exit, validate.zWaitForTerminalExitRequest),
|
|
632
|
+
killTerminal: requestSpec(schema.CLIENT_METHODS.terminal_kill, validate.zKillTerminalRequest, emptyObjectResponse),
|
|
633
|
+
createElicitation: requestSpec(schema.CLIENT_METHODS.elicitation_create, validate.zCreateElicitationRequest),
|
|
634
|
+
};
|
|
635
|
+
const clientNotificationSpecs = {
|
|
636
|
+
sessionUpdate: notificationSpec(schema.CLIENT_METHODS.session_update, validate.zSessionNotification),
|
|
637
|
+
completeElicitation: notificationSpec(schema.CLIENT_METHODS.elicitation_complete, validate.zCompleteElicitationNotification),
|
|
638
|
+
};
|
|
639
|
+
const agentRequestSpecsByMethod = specsByMethod(agentRequestSpecs);
|
|
640
|
+
const agentNotificationSpecsByMethod = specsByMethod(agentNotificationSpecs);
|
|
641
|
+
const clientRequestSpecsByMethod = specsByMethod(clientRequestSpecs);
|
|
642
|
+
const clientNotificationSpecsByMethod = specsByMethod(clientNotificationSpecs);
|
|
643
|
+
function agentRequestContext(params, client, signal, requestId) {
|
|
644
|
+
return {
|
|
645
|
+
params,
|
|
646
|
+
requestId,
|
|
647
|
+
signal,
|
|
648
|
+
client,
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
function agentNotificationContext(params, client, signal) {
|
|
652
|
+
return {
|
|
653
|
+
params,
|
|
654
|
+
signal,
|
|
655
|
+
client,
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
function clientRequestContext(params, agent, signal, requestId) {
|
|
659
|
+
return {
|
|
660
|
+
params,
|
|
661
|
+
requestId,
|
|
662
|
+
signal,
|
|
663
|
+
agent,
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
function clientNotificationContext(params, agent, signal) {
|
|
667
|
+
return {
|
|
668
|
+
params,
|
|
669
|
+
signal,
|
|
670
|
+
agent,
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
class SessionUpdateRouter {
|
|
674
|
+
activeSessions = new Map();
|
|
675
|
+
handleMessage(message) {
|
|
676
|
+
if (message.kind !== "notification" ||
|
|
677
|
+
message.method !== schema.CLIENT_METHODS.session_update) {
|
|
678
|
+
return Handled.no(message);
|
|
679
|
+
}
|
|
680
|
+
const notification = validate.zSessionNotification.parse(message.params);
|
|
681
|
+
const update = {
|
|
682
|
+
kind: "session_update",
|
|
683
|
+
notification,
|
|
684
|
+
update: notification.update,
|
|
685
|
+
};
|
|
686
|
+
const activeSessions = this.activeSessions.get(notification.sessionId);
|
|
687
|
+
if (activeSessions && activeSessions.size > 0) {
|
|
688
|
+
for (const session of activeSessions) {
|
|
689
|
+
session.enqueue(update);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
return Handled.no(message);
|
|
693
|
+
}
|
|
694
|
+
attach(response, updates) {
|
|
695
|
+
const sessions = this.activeSessions.get(response.sessionId) ??
|
|
696
|
+
new Set();
|
|
697
|
+
sessions.add(updates);
|
|
698
|
+
this.activeSessions.set(response.sessionId, sessions);
|
|
699
|
+
return new HandlerRegistration(() => {
|
|
700
|
+
sessions.delete(updates);
|
|
701
|
+
if (sessions.size === 0) {
|
|
702
|
+
this.activeSessions.delete(response.sessionId);
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
const sessionUpdateRouters = new WeakMap();
|
|
708
|
+
function sessionUpdateRouter(cx) {
|
|
709
|
+
let router = sessionUpdateRouters.get(cx);
|
|
710
|
+
if (!router) {
|
|
711
|
+
router = new SessionUpdateRouter();
|
|
712
|
+
sessionUpdateRouters.set(cx, router);
|
|
713
|
+
}
|
|
714
|
+
return router;
|
|
715
|
+
}
|
|
716
|
+
function runConnectHandlers(connection, handlers) {
|
|
717
|
+
for (const handler of handlers) {
|
|
718
|
+
let result;
|
|
719
|
+
try {
|
|
720
|
+
result = handler(connection);
|
|
721
|
+
}
|
|
722
|
+
catch (error) {
|
|
723
|
+
connection.close(error);
|
|
724
|
+
throw error;
|
|
725
|
+
}
|
|
726
|
+
void Promise.resolve(result).catch((error) => {
|
|
727
|
+
connection.close(error);
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
const appBuilder = Symbol("appBuilder");
|
|
732
|
+
const runAgentConnectHandlers = Symbol("runAgentConnectHandlers");
|
|
733
|
+
const runClientConnectHandlers = Symbol("runClientConnectHandlers");
|
|
734
|
+
const stableConnectionOptions = { allowBatches: false };
|
|
735
|
+
/**
|
|
736
|
+
* Creates an agent-side app.
|
|
737
|
+
*
|
|
738
|
+
* Register request and notification handlers by ACP method name, then call
|
|
739
|
+
* `connect(stream)` to serve an ACP client.
|
|
740
|
+
*/
|
|
741
|
+
export function agent(options) {
|
|
742
|
+
return new AgentApp(options);
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Agent-side app builder.
|
|
746
|
+
*
|
|
747
|
+
* Methods on this class register typed request or notification handlers and
|
|
748
|
+
* return `this`, so apps can be built with a fluent chain. Handler params are
|
|
749
|
+
* parsed with the generated ACP schemas before your handler runs, and thrown
|
|
750
|
+
* errors are converted to JSON-RPC errors by the connection layer.
|
|
751
|
+
*/
|
|
752
|
+
export class AgentApp {
|
|
753
|
+
builder = Connection.builder();
|
|
754
|
+
connectHandlers = [];
|
|
755
|
+
constructor(options = {}) {
|
|
756
|
+
if (options.name) {
|
|
757
|
+
this.builder.name(options.name);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
/** @internal */
|
|
761
|
+
[appBuilder]() {
|
|
762
|
+
return this.builder;
|
|
763
|
+
}
|
|
764
|
+
/** @internal */
|
|
765
|
+
[runAgentConnectHandlers](connection) {
|
|
766
|
+
runConnectHandlers(connection, this.connectHandlers);
|
|
767
|
+
}
|
|
768
|
+
connect(target, options = {}) {
|
|
769
|
+
return this.connectConnection(target, options).connection;
|
|
770
|
+
}
|
|
771
|
+
connectWith(target, op) {
|
|
772
|
+
const { rawConnection, connection } = this.connectConnection(target);
|
|
773
|
+
return rawConnection.runUntil(() => op(connection.client));
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Registers a handler that runs when this agent app opens a connection.
|
|
777
|
+
*
|
|
778
|
+
* Use this for connection-scoped work that needs to call client-side ACP
|
|
779
|
+
* methods outside an inbound request handler.
|
|
780
|
+
*/
|
|
781
|
+
onConnect(handler) {
|
|
782
|
+
this.connectHandlers.push(handler);
|
|
783
|
+
return this;
|
|
784
|
+
}
|
|
785
|
+
onRequest(method, handlerOrParams, handler) {
|
|
786
|
+
if (handler) {
|
|
787
|
+
return this.request({ method, params: handlerOrParams }, handler);
|
|
788
|
+
}
|
|
789
|
+
const spec = agentRequestSpecsByMethod[method];
|
|
790
|
+
if (!spec) {
|
|
791
|
+
throw new Error(`Unknown ACP request method '${method}'. Pass a params parser for custom methods.`);
|
|
792
|
+
}
|
|
793
|
+
return this.request(spec, handlerOrParams);
|
|
794
|
+
}
|
|
795
|
+
onNotification(method, handlerOrParams, handler) {
|
|
796
|
+
if (handler) {
|
|
797
|
+
return this.notification({ method, params: handlerOrParams }, handler);
|
|
798
|
+
}
|
|
799
|
+
const spec = agentNotificationSpecsByMethod[method];
|
|
800
|
+
if (!spec) {
|
|
801
|
+
throw new Error(`Unknown ACP notification method '${method}'. Pass a params parser for custom methods.`);
|
|
802
|
+
}
|
|
803
|
+
return this.notification(spec, handlerOrParams);
|
|
804
|
+
}
|
|
805
|
+
request(spec, handler) {
|
|
806
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId) => agentRequestContext(params, AgentContext.create(cx, requestId), signal, requestId), handler);
|
|
807
|
+
return this;
|
|
808
|
+
}
|
|
809
|
+
notification(spec, handler) {
|
|
810
|
+
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
811
|
+
return this;
|
|
812
|
+
}
|
|
813
|
+
connectConnection(target, options = {}) {
|
|
814
|
+
if (isStream(target)) {
|
|
815
|
+
const state = this.openStreamConnection(target);
|
|
816
|
+
if (!options.deferConnectHandlers) {
|
|
817
|
+
this[runAgentConnectHandlers](state.connection);
|
|
818
|
+
}
|
|
819
|
+
return state;
|
|
820
|
+
}
|
|
821
|
+
const [thisStream, peerStream] = memoryStreamPair();
|
|
822
|
+
const peerRawConnection = target[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
823
|
+
const peerConnection = clientConnection(peerRawConnection);
|
|
824
|
+
const state = this.openStreamConnection(thisStream);
|
|
825
|
+
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
826
|
+
void peerRawConnection.closed.then(() => state.connection.close());
|
|
827
|
+
try {
|
|
828
|
+
target[runClientConnectHandlers](peerConnection);
|
|
829
|
+
this[runAgentConnectHandlers](state.connection);
|
|
830
|
+
}
|
|
831
|
+
catch (error) {
|
|
832
|
+
peerConnection.close(error);
|
|
833
|
+
state.connection.close(error);
|
|
834
|
+
throw error;
|
|
835
|
+
}
|
|
836
|
+
return state;
|
|
837
|
+
}
|
|
838
|
+
openStreamConnection(stream) {
|
|
839
|
+
const rawConnection = this.builder.connect(stream, stableConnectionOptions);
|
|
840
|
+
return {
|
|
841
|
+
rawConnection,
|
|
842
|
+
connection: agentConnection(rawConnection, this.connectHandlers),
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Creates a client-side app.
|
|
848
|
+
*
|
|
849
|
+
* Register request and notification handlers by ACP method name, then use
|
|
850
|
+
* `connectWith(...)` to run the workflow that calls agent-side methods.
|
|
851
|
+
*/
|
|
852
|
+
export function client(options) {
|
|
853
|
+
return new ClientApp(options);
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Client-side app builder.
|
|
857
|
+
*
|
|
858
|
+
* Methods on this class register typed client handlers and return `this`, so
|
|
859
|
+
* apps can be built with a fluent chain. `connectWith(...)` is the usual entry
|
|
860
|
+
* point for clients because it provides a `ClientContext` for calling
|
|
861
|
+
* agent-side requests and session helpers.
|
|
862
|
+
*/
|
|
863
|
+
export class ClientApp {
|
|
864
|
+
builder = Connection.builder();
|
|
865
|
+
connectHandlers = [];
|
|
866
|
+
constructor(options = {}) {
|
|
867
|
+
if (options.name) {
|
|
868
|
+
this.builder.name(options.name);
|
|
869
|
+
}
|
|
870
|
+
this.builder.withHandler({
|
|
871
|
+
handleMessage: (message, cx) => sessionUpdateRouter(cx).handleMessage(message),
|
|
872
|
+
describe: () => "client-session-update-router",
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
/** @internal */
|
|
876
|
+
[appBuilder]() {
|
|
877
|
+
return this.builder;
|
|
878
|
+
}
|
|
879
|
+
/** @internal */
|
|
880
|
+
[runClientConnectHandlers](connection) {
|
|
881
|
+
runConnectHandlers(connection, this.connectHandlers);
|
|
882
|
+
}
|
|
883
|
+
connect(target) {
|
|
884
|
+
return this.connectConnection(target).connection;
|
|
885
|
+
}
|
|
886
|
+
connectWith(target, op) {
|
|
887
|
+
const { rawConnection, connection } = this.connectConnection(target);
|
|
888
|
+
return rawConnection.runUntil(() => op(connection.agent));
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Registers a handler that runs when this client app opens a connection.
|
|
892
|
+
*
|
|
893
|
+
* Use this for connection-scoped work that needs to call agent-side ACP
|
|
894
|
+
* methods outside an inbound request handler.
|
|
895
|
+
*/
|
|
896
|
+
onConnect(handler) {
|
|
897
|
+
this.connectHandlers.push(handler);
|
|
898
|
+
return this;
|
|
899
|
+
}
|
|
900
|
+
onRequest(method, handlerOrParams, handler) {
|
|
901
|
+
if (handler) {
|
|
902
|
+
return this.request({ method, params: handlerOrParams }, handler);
|
|
903
|
+
}
|
|
904
|
+
const spec = clientRequestSpecsByMethod[method];
|
|
905
|
+
if (!spec) {
|
|
906
|
+
throw new Error(`Unknown ACP request method '${method}'. Pass a params parser for custom methods.`);
|
|
907
|
+
}
|
|
908
|
+
return this.request(spec, handlerOrParams);
|
|
909
|
+
}
|
|
910
|
+
onNotification(method, handlerOrParams, handler) {
|
|
911
|
+
if (handler) {
|
|
912
|
+
return this.notification({ method, params: handlerOrParams }, handler);
|
|
913
|
+
}
|
|
914
|
+
const spec = clientNotificationSpecsByMethod[method];
|
|
915
|
+
if (!spec) {
|
|
916
|
+
throw new Error(`Unknown ACP notification method '${method}'. Pass a params parser for custom methods.`);
|
|
917
|
+
}
|
|
918
|
+
return this.notification(spec, handlerOrParams);
|
|
919
|
+
}
|
|
920
|
+
request(spec, handler) {
|
|
921
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId) => clientRequestContext(params, ClientContext.create(cx, requestId), signal, requestId), handler);
|
|
922
|
+
return this;
|
|
923
|
+
}
|
|
924
|
+
notification(spec, handler) {
|
|
925
|
+
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
926
|
+
return this;
|
|
927
|
+
}
|
|
928
|
+
connectConnection(target) {
|
|
929
|
+
if (isStream(target)) {
|
|
930
|
+
const state = this.openStreamConnection(target);
|
|
931
|
+
this[runClientConnectHandlers](state.connection);
|
|
932
|
+
return state;
|
|
933
|
+
}
|
|
934
|
+
const [thisStream, peerStream] = memoryStreamPair();
|
|
935
|
+
const peerRawConnection = target[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
936
|
+
const peerConnection = agentConnection(peerRawConnection);
|
|
937
|
+
const state = this.openStreamConnection(thisStream);
|
|
938
|
+
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
939
|
+
void peerRawConnection.closed.then(() => state.connection.close());
|
|
940
|
+
try {
|
|
941
|
+
target[runAgentConnectHandlers](peerConnection);
|
|
942
|
+
this[runClientConnectHandlers](state.connection);
|
|
943
|
+
}
|
|
944
|
+
catch (error) {
|
|
945
|
+
peerConnection.close(error);
|
|
946
|
+
state.connection.close(error);
|
|
947
|
+
throw error;
|
|
948
|
+
}
|
|
949
|
+
return state;
|
|
950
|
+
}
|
|
951
|
+
openStreamConnection(stream) {
|
|
952
|
+
const rawConnection = this.builder.connect(stream, stableConnectionOptions);
|
|
953
|
+
return {
|
|
954
|
+
rawConnection,
|
|
955
|
+
connection: clientConnection(rawConnection, this.connectHandlers),
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
const legacyAgentRequestMethods = new Set([
|
|
960
|
+
schema.AGENT_METHODS.initialize,
|
|
961
|
+
schema.AGENT_METHODS.authenticate,
|
|
962
|
+
schema.AGENT_METHODS.providers_list,
|
|
963
|
+
schema.AGENT_METHODS.providers_set,
|
|
964
|
+
schema.AGENT_METHODS.providers_disable,
|
|
965
|
+
schema.AGENT_METHODS.session_new,
|
|
966
|
+
schema.AGENT_METHODS.session_load,
|
|
967
|
+
schema.AGENT_METHODS.session_set_mode,
|
|
968
|
+
schema.AGENT_METHODS.session_set_config_option,
|
|
969
|
+
schema.AGENT_METHODS.session_prompt,
|
|
970
|
+
schema.AGENT_METHODS.session_list,
|
|
971
|
+
schema.AGENT_METHODS.session_delete,
|
|
972
|
+
schema.AGENT_METHODS.session_fork,
|
|
973
|
+
schema.AGENT_METHODS.session_resume,
|
|
974
|
+
schema.AGENT_METHODS.session_close,
|
|
975
|
+
schema.AGENT_METHODS.logout,
|
|
976
|
+
schema.AGENT_METHODS.nes_start,
|
|
977
|
+
schema.AGENT_METHODS.nes_suggest,
|
|
978
|
+
schema.AGENT_METHODS.nes_close,
|
|
979
|
+
]);
|
|
980
|
+
const legacyAgentNotificationMethods = new Set([
|
|
981
|
+
schema.AGENT_METHODS.session_cancel,
|
|
982
|
+
schema.AGENT_METHODS.nes_accept,
|
|
983
|
+
schema.AGENT_METHODS.nes_reject,
|
|
984
|
+
schema.AGENT_METHODS.document_did_open,
|
|
985
|
+
schema.AGENT_METHODS.document_did_change,
|
|
986
|
+
schema.AGENT_METHODS.document_did_close,
|
|
987
|
+
schema.AGENT_METHODS.document_did_save,
|
|
988
|
+
schema.AGENT_METHODS.document_did_focus,
|
|
989
|
+
]);
|
|
990
|
+
const legacyClientRequestMethods = new Set([
|
|
991
|
+
schema.CLIENT_METHODS.session_request_permission,
|
|
992
|
+
schema.CLIENT_METHODS.fs_write_text_file,
|
|
993
|
+
schema.CLIENT_METHODS.fs_read_text_file,
|
|
994
|
+
schema.CLIENT_METHODS.terminal_create,
|
|
995
|
+
schema.CLIENT_METHODS.terminal_output,
|
|
996
|
+
schema.CLIENT_METHODS.terminal_release,
|
|
997
|
+
schema.CLIENT_METHODS.terminal_wait_for_exit,
|
|
998
|
+
schema.CLIENT_METHODS.terminal_kill,
|
|
999
|
+
schema.CLIENT_METHODS.elicitation_create,
|
|
1000
|
+
]);
|
|
1001
|
+
const legacyClientNotificationMethods = new Set([
|
|
1002
|
+
schema.CLIENT_METHODS.session_update,
|
|
1003
|
+
schema.CLIENT_METHODS.elicitation_complete,
|
|
1004
|
+
]);
|
|
1005
|
+
function legacyAgentApp(implementation) {
|
|
1006
|
+
const app = agent()
|
|
1007
|
+
.onRequest(schema.AGENT_METHODS.initialize, (ctx) => implementation.initialize(ctx.params))
|
|
1008
|
+
.onRequest(schema.AGENT_METHODS.session_new, (ctx) => implementation.newSession(ctx.params))
|
|
1009
|
+
.onRequest(schema.AGENT_METHODS.authenticate, async (ctx) => (await implementation.authenticate(ctx.params)) ?? {})
|
|
1010
|
+
.onRequest(schema.AGENT_METHODS.session_prompt, (ctx) => implementation.prompt(ctx.params))
|
|
1011
|
+
.onNotification(schema.AGENT_METHODS.session_cancel, (ctx) => implementation.cancel(ctx.params));
|
|
1012
|
+
if (implementation.loadSession) {
|
|
1013
|
+
app.onRequest(schema.AGENT_METHODS.session_load, (ctx) => implementation.loadSession(ctx.params));
|
|
1014
|
+
}
|
|
1015
|
+
if (implementation.listSessions) {
|
|
1016
|
+
app.onRequest(schema.AGENT_METHODS.session_list, (ctx) => implementation.listSessions(ctx.params));
|
|
1017
|
+
}
|
|
1018
|
+
if (implementation.deleteSession) {
|
|
1019
|
+
app.onRequest(schema.AGENT_METHODS.session_delete, async (ctx) => (await implementation.deleteSession(ctx.params)) ?? {});
|
|
1020
|
+
}
|
|
1021
|
+
if (implementation.unstable_forkSession) {
|
|
1022
|
+
app.onRequest(schema.AGENT_METHODS.session_fork, (ctx) => implementation.unstable_forkSession(ctx.params));
|
|
1023
|
+
}
|
|
1024
|
+
if (implementation.resumeSession) {
|
|
1025
|
+
app.onRequest(schema.AGENT_METHODS.session_resume, (ctx) => implementation.resumeSession(ctx.params));
|
|
1026
|
+
}
|
|
1027
|
+
if (implementation.closeSession) {
|
|
1028
|
+
app.onRequest(schema.AGENT_METHODS.session_close, async (ctx) => (await implementation.closeSession(ctx.params)) ?? {});
|
|
1029
|
+
}
|
|
1030
|
+
if (implementation.setSessionMode) {
|
|
1031
|
+
app.onRequest(schema.AGENT_METHODS.session_set_mode, async (ctx) => (await implementation.setSessionMode(ctx.params)) ?? {});
|
|
1032
|
+
}
|
|
1033
|
+
if (implementation.setSessionConfigOption) {
|
|
1034
|
+
app.onRequest(schema.AGENT_METHODS.session_set_config_option, (ctx) => implementation.setSessionConfigOption(ctx.params));
|
|
1035
|
+
}
|
|
1036
|
+
if (implementation.unstable_listProviders) {
|
|
1037
|
+
app.onRequest(schema.AGENT_METHODS.providers_list, (ctx) => implementation.unstable_listProviders(ctx.params));
|
|
1038
|
+
}
|
|
1039
|
+
if (implementation.unstable_setProvider) {
|
|
1040
|
+
app.onRequest(schema.AGENT_METHODS.providers_set, async (ctx) => (await implementation.unstable_setProvider(ctx.params)) ?? {});
|
|
1041
|
+
}
|
|
1042
|
+
if (implementation.unstable_disableProvider) {
|
|
1043
|
+
app.onRequest(schema.AGENT_METHODS.providers_disable, async (ctx) => (await implementation.unstable_disableProvider(ctx.params)) ?? {});
|
|
1044
|
+
}
|
|
1045
|
+
if (implementation.logout) {
|
|
1046
|
+
app.onRequest(schema.AGENT_METHODS.logout, async (ctx) => (await implementation.logout(ctx.params)) ?? {});
|
|
1047
|
+
}
|
|
1048
|
+
if (implementation.unstable_startNes) {
|
|
1049
|
+
app.onRequest(schema.AGENT_METHODS.nes_start, (ctx) => implementation.unstable_startNes(ctx.params));
|
|
1050
|
+
}
|
|
1051
|
+
if (implementation.unstable_suggestNes) {
|
|
1052
|
+
app.onRequest(schema.AGENT_METHODS.nes_suggest, (ctx) => implementation.unstable_suggestNes(ctx.params));
|
|
1053
|
+
}
|
|
1054
|
+
if (implementation.unstable_closeNes) {
|
|
1055
|
+
app.onRequest(schema.AGENT_METHODS.nes_close, async (ctx) => (await implementation.unstable_closeNes(ctx.params)) ?? {});
|
|
1056
|
+
}
|
|
1057
|
+
if (implementation.unstable_didOpenDocument) {
|
|
1058
|
+
app.onNotification(schema.AGENT_METHODS.document_did_open, (ctx) => implementation.unstable_didOpenDocument(ctx.params));
|
|
1059
|
+
}
|
|
1060
|
+
if (implementation.unstable_didChangeDocument) {
|
|
1061
|
+
app.onNotification(schema.AGENT_METHODS.document_did_change, (ctx) => implementation.unstable_didChangeDocument(ctx.params));
|
|
1062
|
+
}
|
|
1063
|
+
if (implementation.unstable_didCloseDocument) {
|
|
1064
|
+
app.onNotification(schema.AGENT_METHODS.document_did_close, (ctx) => implementation.unstable_didCloseDocument(ctx.params));
|
|
1065
|
+
}
|
|
1066
|
+
if (implementation.unstable_didSaveDocument) {
|
|
1067
|
+
app.onNotification(schema.AGENT_METHODS.document_did_save, (ctx) => implementation.unstable_didSaveDocument(ctx.params));
|
|
1068
|
+
}
|
|
1069
|
+
if (implementation.unstable_didFocusDocument) {
|
|
1070
|
+
app.onNotification(schema.AGENT_METHODS.document_did_focus, (ctx) => implementation.unstable_didFocusDocument(ctx.params));
|
|
1071
|
+
}
|
|
1072
|
+
if (implementation.unstable_acceptNes) {
|
|
1073
|
+
app.onNotification(schema.AGENT_METHODS.nes_accept, (ctx) => implementation.unstable_acceptNes(ctx.params));
|
|
1074
|
+
}
|
|
1075
|
+
if (implementation.unstable_rejectNes) {
|
|
1076
|
+
app.onNotification(schema.AGENT_METHODS.nes_reject, (ctx) => implementation.unstable_rejectNes(ctx.params));
|
|
1077
|
+
}
|
|
1078
|
+
if (implementation.extMethod) {
|
|
1079
|
+
app[appBuilder]().withHandler({
|
|
1080
|
+
handleMessage: async (message) => {
|
|
1081
|
+
if (message.kind !== "request" ||
|
|
1082
|
+
legacyAgentRequestMethods.has(message.method)) {
|
|
1083
|
+
return Handled.no(message);
|
|
1084
|
+
}
|
|
1085
|
+
await message.responder.respond(await implementation.extMethod(message.method, message.params));
|
|
1086
|
+
return Handled.yes();
|
|
1087
|
+
},
|
|
1088
|
+
describe: () => "legacy-agent-extension-request",
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
if (implementation.extNotification) {
|
|
1092
|
+
app[appBuilder]().withHandler({
|
|
1093
|
+
handleMessage: async (message) => {
|
|
1094
|
+
if (message.kind !== "notification" ||
|
|
1095
|
+
legacyAgentNotificationMethods.has(message.method)) {
|
|
1096
|
+
return Handled.no(message);
|
|
1097
|
+
}
|
|
1098
|
+
await implementation.extNotification(message.method, message.params);
|
|
1099
|
+
return Handled.yes();
|
|
1100
|
+
},
|
|
1101
|
+
describe: () => "legacy-agent-extension-notification",
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
return app;
|
|
1105
|
+
}
|
|
1106
|
+
function legacyClientApp(implementation) {
|
|
1107
|
+
const app = client()
|
|
1108
|
+
.onRequest(schema.CLIENT_METHODS.session_request_permission, (ctx) => implementation.requestPermission(ctx.params))
|
|
1109
|
+
.onNotification(schema.CLIENT_METHODS.session_update, (ctx) => implementation.sessionUpdate(ctx.params))
|
|
1110
|
+
.onRequest(schema.CLIENT_METHODS.fs_write_text_file, async (ctx) => (await implementation.writeTextFile?.(ctx.params)) ?? {})
|
|
1111
|
+
.onRequest(schema.CLIENT_METHODS.fs_read_text_file, async (ctx) => (await implementation.readTextFile?.(ctx.params)))
|
|
1112
|
+
.onRequest(schema.CLIENT_METHODS.terminal_create, async (ctx) => (await implementation.createTerminal?.(ctx.params)))
|
|
1113
|
+
.onRequest(schema.CLIENT_METHODS.terminal_output, async (ctx) => (await implementation.terminalOutput?.(ctx.params)))
|
|
1114
|
+
.onRequest(schema.CLIENT_METHODS.terminal_release, async (ctx) => (await implementation.releaseTerminal?.(ctx.params)) ?? {})
|
|
1115
|
+
.onRequest(schema.CLIENT_METHODS.terminal_wait_for_exit, async (ctx) => (await implementation.waitForTerminalExit?.(ctx.params)))
|
|
1116
|
+
.onRequest(schema.CLIENT_METHODS.terminal_kill, async (ctx) => (await implementation.killTerminal?.(ctx.params)) ?? {});
|
|
1117
|
+
if (implementation.createElicitation) {
|
|
1118
|
+
app.onRequest(schema.CLIENT_METHODS.elicitation_create, (ctx) => implementation.createElicitation(ctx.params));
|
|
1119
|
+
}
|
|
1120
|
+
if (implementation.completeElicitation) {
|
|
1121
|
+
app.onNotification(schema.CLIENT_METHODS.elicitation_complete, (ctx) => implementation.completeElicitation(ctx.params));
|
|
1122
|
+
}
|
|
1123
|
+
if (implementation.extMethod) {
|
|
1124
|
+
app[appBuilder]().withHandler({
|
|
1125
|
+
handleMessage: async (message) => {
|
|
1126
|
+
if (message.kind !== "request" ||
|
|
1127
|
+
legacyClientRequestMethods.has(message.method)) {
|
|
1128
|
+
return Handled.no(message);
|
|
1129
|
+
}
|
|
1130
|
+
await message.responder.respond(await implementation.extMethod(message.method, message.params));
|
|
1131
|
+
return Handled.yes();
|
|
1132
|
+
},
|
|
1133
|
+
describe: () => "legacy-client-extension-request",
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
if (implementation.extNotification) {
|
|
1137
|
+
app[appBuilder]().withHandler({
|
|
1138
|
+
handleMessage: async (message) => {
|
|
1139
|
+
if (message.kind !== "notification" ||
|
|
1140
|
+
legacyClientNotificationMethods.has(message.method)) {
|
|
1141
|
+
return Handled.no(message);
|
|
1142
|
+
}
|
|
1143
|
+
await implementation.extNotification(message.method, message.params);
|
|
1144
|
+
return Handled.yes();
|
|
1145
|
+
},
|
|
1146
|
+
describe: () => "legacy-client-extension-notification",
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
return app;
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* An agent-side connection to a client.
|
|
1153
|
+
*
|
|
1154
|
+
* This class provides the agent's view of an ACP connection, allowing
|
|
1155
|
+
* agents to communicate with clients. It implements the {@link Client} interface
|
|
1156
|
+
* to provide methods for requesting permissions, accessing the file system,
|
|
1157
|
+
* and sending session updates.
|
|
1158
|
+
*
|
|
1159
|
+
* See protocol docs: [Agent](https://agentclientprotocol.com/protocol/overview#agent)
|
|
1160
|
+
*
|
|
1161
|
+
* @deprecated Prefer {@link agent}, which registers typed handlers with a
|
|
1162
|
+
* single context object and supports direct app composition.
|
|
1163
|
+
*/
|
|
1164
|
+
export class AgentSideConnection {
|
|
1165
|
+
connection;
|
|
1166
|
+
/**
|
|
1167
|
+
* Creates a new agent-side connection to a client.
|
|
1168
|
+
*
|
|
1169
|
+
* This establishes the communication channel from the agent's perspective
|
|
1170
|
+
* following the ACP specification.
|
|
1171
|
+
*
|
|
1172
|
+
* @param toAgent - A function that creates an Agent handler to process incoming client requests
|
|
1173
|
+
* @param stream - The bidirectional message stream for communication. Typically created using
|
|
1174
|
+
* {@link ndJsonStream} for stdio-based connections.
|
|
1175
|
+
*
|
|
1176
|
+
* See protocol docs: [Communication Model](https://agentclientprotocol.com/protocol/overview#communication-model)
|
|
1177
|
+
*
|
|
1178
|
+
* @deprecated Prefer `agent({ name }).connect(stream)`.
|
|
1179
|
+
*/
|
|
1180
|
+
constructor(toAgent, stream) {
|
|
1181
|
+
this.connection = legacyAgentApp(toAgent(this))[appBuilder]()
|
|
1182
|
+
.connect(stream, stableConnectionOptions);
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Handles session update notifications from the agent.
|
|
1186
|
+
*
|
|
1187
|
+
* This is a notification endpoint (no response expected) that sends
|
|
1188
|
+
* real-time updates about session progress, including message chunks,
|
|
1189
|
+
* tool calls, and execution plans.
|
|
1190
|
+
*
|
|
1191
|
+
* Note: Clients SHOULD continue accepting tool call updates even after
|
|
1192
|
+
* sending a `session/cancel` notification, as the agent may send final
|
|
1193
|
+
* updates before responding with the cancelled stop reason.
|
|
1194
|
+
*
|
|
1195
|
+
* See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
|
|
1196
|
+
*/
|
|
1197
|
+
sessionUpdate(params) {
|
|
1198
|
+
return this.connection.sendNotification(schema.CLIENT_METHODS.session_update, params);
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Requests permission from the user for a tool call operation.
|
|
1202
|
+
*
|
|
1203
|
+
* Called by the agent when it needs user authorization before executing
|
|
1204
|
+
* a potentially sensitive operation. The client should present the options
|
|
1205
|
+
* to the user and return their decision.
|
|
1206
|
+
*
|
|
1207
|
+
* If the client cancels the prompt turn via `session/cancel`, it MUST
|
|
1208
|
+
* respond to this request with `RequestPermissionOutcome::Cancelled`.
|
|
1209
|
+
*
|
|
1210
|
+
* See protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)
|
|
1211
|
+
*/
|
|
1212
|
+
requestPermission(params) {
|
|
1213
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.session_request_permission, params);
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* Reads content from a text file in the client's file system.
|
|
1217
|
+
*
|
|
1218
|
+
* Only available if the client advertises the `fs.readTextFile` capability.
|
|
1219
|
+
* Allows the agent to access file contents within the client's environment.
|
|
1220
|
+
*
|
|
1221
|
+
* See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)
|
|
1222
|
+
*/
|
|
1223
|
+
readTextFile(params) {
|
|
1224
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.fs_read_text_file, params);
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Writes content to a text file in the client's file system.
|
|
1228
|
+
*
|
|
1229
|
+
* Only available if the client advertises the `fs.writeTextFile` capability.
|
|
1230
|
+
* Allows the agent to create or modify files within the client's environment.
|
|
1231
|
+
*
|
|
1232
|
+
* See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)
|
|
1233
|
+
*/
|
|
1234
|
+
writeTextFile(params) {
|
|
1235
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.fs_write_text_file, params, emptyObjectResponse);
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Executes a command in a new terminal.
|
|
1239
|
+
*
|
|
1240
|
+
* Returns a `TerminalHandle` that can be used to get output, wait for exit,
|
|
1241
|
+
* kill the command, or release the terminal.
|
|
1242
|
+
*
|
|
1243
|
+
* The terminal can also be embedded in tool calls by using its ID in
|
|
1244
|
+
* `ToolCallContent` with type "terminal".
|
|
1245
|
+
*
|
|
1246
|
+
* @param params - The terminal creation parameters
|
|
1247
|
+
* @returns A handle to control and monitor the terminal
|
|
1248
|
+
*/
|
|
1249
|
+
createTerminal(params) {
|
|
1250
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.terminal_create, params, (response) => TerminalHandle.create(response.terminalId, params.sessionId, this.connection));
|
|
1251
|
+
}
|
|
1252
|
+
/** Creates an elicitation to request input from the user. */
|
|
1253
|
+
createElicitation(params) {
|
|
1254
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.elicitation_create, params);
|
|
1255
|
+
}
|
|
1256
|
+
/** Notifies the client that a URL-based elicitation is complete. */
|
|
1257
|
+
completeElicitation(params) {
|
|
1258
|
+
return this.connection.sendNotification(schema.CLIENT_METHODS.elicitation_complete, params);
|
|
1259
|
+
}
|
|
1260
|
+
request(method, params, options) {
|
|
1261
|
+
const spec = clientRequestSpecsByMethod[method];
|
|
1262
|
+
return this.connection.sendRequest(method, params, spec?.mapResponse, options);
|
|
1263
|
+
}
|
|
1264
|
+
notify(method, params) {
|
|
1265
|
+
return this.connection.sendNotification(method, params);
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Extension method.
|
|
1269
|
+
*
|
|
1270
|
+
* @deprecated Use {@link request}.
|
|
1271
|
+
*/
|
|
1272
|
+
extMethod(method, params) {
|
|
1273
|
+
return this.request(method, params);
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Extension notification.
|
|
1277
|
+
*
|
|
1278
|
+
* @deprecated Use {@link notify}.
|
|
1279
|
+
*/
|
|
1280
|
+
extNotification(method, params) {
|
|
1281
|
+
return this.notify(method, params);
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* AbortSignal that aborts when the connection closes.
|
|
1285
|
+
*
|
|
1286
|
+
* This signal can be used to:
|
|
1287
|
+
* - Listen for connection closure: `connection.signal.addEventListener('abort', () => {...})`
|
|
1288
|
+
* - Check connection status synchronously: `if (connection.signal.aborted) {...}`
|
|
1289
|
+
* - Pass to other APIs (fetch, setTimeout) for automatic cancellation
|
|
1290
|
+
*
|
|
1291
|
+
* The connection closes when the underlying stream ends, either normally or due to an error.
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
* ```typescript
|
|
1295
|
+
* const connection = new AgentSideConnection(agent, stream);
|
|
1296
|
+
*
|
|
1297
|
+
* // Listen for closure
|
|
1298
|
+
* connection.signal.addEventListener('abort', () => {
|
|
1299
|
+
* console.log('Connection closed - performing cleanup');
|
|
1300
|
+
* });
|
|
1301
|
+
*
|
|
1302
|
+
* // Check status
|
|
1303
|
+
* if (connection.signal.aborted) {
|
|
1304
|
+
* console.log('Connection is already closed');
|
|
1305
|
+
* }
|
|
1306
|
+
*
|
|
1307
|
+
* // Pass to other APIs
|
|
1308
|
+
* fetch(url, { signal: connection.signal });
|
|
1309
|
+
* ```
|
|
1310
|
+
*/
|
|
1311
|
+
get signal() {
|
|
1312
|
+
return this.connection.signal;
|
|
1313
|
+
}
|
|
1314
|
+
/**
|
|
1315
|
+
* Promise that resolves when the connection closes.
|
|
1316
|
+
*
|
|
1317
|
+
* The connection closes when the underlying stream ends, either normally or due to an error.
|
|
1318
|
+
* Once closed, the connection cannot send or receive any more messages.
|
|
1319
|
+
*
|
|
1320
|
+
* This is useful for async/await style cleanup:
|
|
1321
|
+
*
|
|
1322
|
+
* @example
|
|
1323
|
+
* ```typescript
|
|
1324
|
+
* const connection = new AgentSideConnection(agent, stream);
|
|
1325
|
+
* await connection.closed;
|
|
1326
|
+
* console.log('Connection closed - performing cleanup');
|
|
1327
|
+
* ```
|
|
1328
|
+
*/
|
|
1329
|
+
get closed() {
|
|
1330
|
+
return this.connection.closed;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* Handle for controlling and monitoring a terminal created via `createTerminal`.
|
|
1335
|
+
*
|
|
1336
|
+
* Provides methods to:
|
|
1337
|
+
* - Get current output without waiting
|
|
1338
|
+
* - Wait for command completion
|
|
1339
|
+
* - Kill the running command
|
|
1340
|
+
* - Release terminal resources
|
|
1341
|
+
*
|
|
1342
|
+
* **Important:** Always call `release()` when done with the terminal to free resources.
|
|
1343
|
+
|
|
1344
|
+
* The terminal supports async disposal via `Symbol.asyncDispose` for automatic cleanup.
|
|
1345
|
+
|
|
1346
|
+
* You can use `await using` to ensure the terminal is automatically released when it
|
|
1347
|
+
* goes out of scope.
|
|
1348
|
+
*/
|
|
1349
|
+
export class TerminalHandle {
|
|
1350
|
+
/**
|
|
1351
|
+
* Terminal identifier returned by `terminal/create`.
|
|
1352
|
+
*/
|
|
1353
|
+
id;
|
|
1354
|
+
sessionId;
|
|
1355
|
+
connection;
|
|
1356
|
+
constructor(id, sessionId, conn) {
|
|
1357
|
+
this.id = id;
|
|
1358
|
+
this.sessionId = sessionId;
|
|
1359
|
+
this.connection = conn;
|
|
1360
|
+
}
|
|
1361
|
+
/** @internal */
|
|
1362
|
+
static create(id, sessionId, conn) {
|
|
1363
|
+
return new TerminalHandle(id, sessionId, conn);
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Gets the current terminal output without waiting for the command to exit.
|
|
1367
|
+
*/
|
|
1368
|
+
currentOutput() {
|
|
1369
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.terminal_output, {
|
|
1370
|
+
sessionId: this.sessionId,
|
|
1371
|
+
terminalId: this.id,
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Waits for the terminal command to complete and returns its exit status.
|
|
1376
|
+
*/
|
|
1377
|
+
waitForExit() {
|
|
1378
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.terminal_wait_for_exit, {
|
|
1379
|
+
sessionId: this.sessionId,
|
|
1380
|
+
terminalId: this.id,
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* Kills the terminal command without releasing the terminal.
|
|
1385
|
+
*
|
|
1386
|
+
* The terminal remains valid after killing, allowing you to:
|
|
1387
|
+
* - Get the final output with `currentOutput()`
|
|
1388
|
+
* - Check the exit status
|
|
1389
|
+
* - Release the terminal when done
|
|
1390
|
+
*
|
|
1391
|
+
* Useful for implementing timeouts or cancellation.
|
|
1392
|
+
*/
|
|
1393
|
+
kill() {
|
|
1394
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.terminal_kill, {
|
|
1395
|
+
sessionId: this.sessionId,
|
|
1396
|
+
terminalId: this.id,
|
|
1397
|
+
}, emptyObjectResponse);
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Releases the terminal and frees all associated resources.
|
|
1401
|
+
*
|
|
1402
|
+
* If the command is still running, it will be killed.
|
|
1403
|
+
* After release, the terminal ID becomes invalid and cannot be used
|
|
1404
|
+
* with other terminal methods.
|
|
1405
|
+
*
|
|
1406
|
+
* Tool calls that already reference this terminal will continue to
|
|
1407
|
+
* display its output.
|
|
1408
|
+
*
|
|
1409
|
+
* **Important:** Always call this method when done with the terminal.
|
|
1410
|
+
*/
|
|
1411
|
+
release() {
|
|
1412
|
+
return this.connection.sendRequest(schema.CLIENT_METHODS.terminal_release, {
|
|
1413
|
+
sessionId: this.sessionId,
|
|
1414
|
+
terminalId: this.id,
|
|
1415
|
+
}, emptyObjectResponse);
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Releases the terminal when used with `await using`.
|
|
1419
|
+
*/
|
|
1420
|
+
async [Symbol.asyncDispose]() {
|
|
1421
|
+
await this.release();
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* A client-side connection to an agent.
|
|
1426
|
+
*
|
|
1427
|
+
* This class provides the client's view of an ACP connection, allowing
|
|
1428
|
+
* clients (such as code editors) to communicate with agents. It implements
|
|
1429
|
+
* the {@link Agent} interface to provide methods for initializing sessions, sending
|
|
1430
|
+
* prompts, and managing the agent lifecycle.
|
|
1431
|
+
*
|
|
1432
|
+
* See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)
|
|
1433
|
+
*
|
|
1434
|
+
* @deprecated Prefer {@link client}, which registers typed handlers with a
|
|
1435
|
+
* single context object and supports `connectWith` and session helpers.
|
|
1436
|
+
*/
|
|
1437
|
+
export class ClientSideConnection {
|
|
1438
|
+
connection;
|
|
1439
|
+
/**
|
|
1440
|
+
* Creates a new client-side connection to an agent.
|
|
1441
|
+
*
|
|
1442
|
+
* This establishes the communication channel between a client and agent
|
|
1443
|
+
* following the ACP specification.
|
|
1444
|
+
*
|
|
1445
|
+
* @param toClient - A function that creates a Client handler to process incoming agent requests
|
|
1446
|
+
* @param stream - The bidirectional message stream for communication. Typically created using
|
|
1447
|
+
* {@link ndJsonStream} for stdio-based connections.
|
|
1448
|
+
*
|
|
1449
|
+
* See protocol docs: [Communication Model](https://agentclientprotocol.com/protocol/overview#communication-model)
|
|
1450
|
+
*
|
|
1451
|
+
* @deprecated Prefer `client({ name }).connectWith(stream, async (ctx) => ...)`.
|
|
1452
|
+
*/
|
|
1453
|
+
constructor(toClient, stream) {
|
|
1454
|
+
this.connection = legacyClientApp(toClient(this))[appBuilder]()
|
|
1455
|
+
.connect(stream, stableConnectionOptions);
|
|
1456
|
+
}
|
|
1457
|
+
/**
|
|
1458
|
+
* Establishes the connection with a client and negotiates protocol capabilities.
|
|
1459
|
+
*
|
|
1460
|
+
* This method is called once at the beginning of the connection to:
|
|
1461
|
+
* - Negotiate the protocol version to use
|
|
1462
|
+
* - Exchange capability information between client and agent
|
|
1463
|
+
* - Determine available authentication methods
|
|
1464
|
+
*
|
|
1465
|
+
* The agent should respond with its supported protocol version and capabilities.
|
|
1466
|
+
*
|
|
1467
|
+
* See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)
|
|
1468
|
+
*/
|
|
1469
|
+
initialize(params) {
|
|
1470
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.initialize, params);
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Creates a new conversation session with the agent.
|
|
1474
|
+
*
|
|
1475
|
+
* Sessions represent independent conversation contexts with their own history and state.
|
|
1476
|
+
*
|
|
1477
|
+
* The agent should:
|
|
1478
|
+
* - Create a new session context
|
|
1479
|
+
* - Connect to any specified MCP servers
|
|
1480
|
+
* - Return a unique session ID for future requests
|
|
1481
|
+
*
|
|
1482
|
+
* The request may include `additionalDirectories` to expand the session's filesystem
|
|
1483
|
+
* scope beyond `cwd` without changing the base for relative paths.
|
|
1484
|
+
*
|
|
1485
|
+
* May return an `auth_required` error if the agent requires authentication.
|
|
1486
|
+
*
|
|
1487
|
+
* See protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)
|
|
1488
|
+
*/
|
|
1489
|
+
newSession(params) {
|
|
1490
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_new, params);
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Loads an existing session to resume a previous conversation.
|
|
1494
|
+
*
|
|
1495
|
+
* This method is only available if the agent advertises the `loadSession` capability.
|
|
1496
|
+
*
|
|
1497
|
+
* The agent should:
|
|
1498
|
+
* - Restore the session context and conversation history
|
|
1499
|
+
* - Connect to the specified MCP servers
|
|
1500
|
+
* - Stream the entire conversation history back to the client via notifications
|
|
1501
|
+
*
|
|
1502
|
+
* The request may include `additionalDirectories` to set the complete list of
|
|
1503
|
+
* additional workspace roots for the loaded session.
|
|
1504
|
+
*
|
|
1505
|
+
* See protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)
|
|
1506
|
+
*/
|
|
1507
|
+
loadSession(params) {
|
|
1508
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_load, params, emptyObjectResponse);
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* **UNSTABLE**
|
|
1512
|
+
*
|
|
1513
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1514
|
+
*
|
|
1515
|
+
* Forks an existing session to create a new independent session.
|
|
1516
|
+
*
|
|
1517
|
+
* Creates a new session based on the context of an existing one, allowing
|
|
1518
|
+
* operations like generating summaries without affecting the original session's history.
|
|
1519
|
+
*
|
|
1520
|
+
* The request may include `additionalDirectories` to set the complete list of
|
|
1521
|
+
* additional workspace roots for the forked session.
|
|
1522
|
+
*
|
|
1523
|
+
* This method is only available if the agent advertises the `session.fork` capability.
|
|
1524
|
+
*
|
|
1525
|
+
* @experimental
|
|
1526
|
+
*/
|
|
1527
|
+
unstable_forkSession(params) {
|
|
1528
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_fork, params);
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Lists existing sessions from the agent.
|
|
1532
|
+
*
|
|
1533
|
+
* This method is only available if the agent advertises the `listSessions` capability.
|
|
1534
|
+
*
|
|
1535
|
+
* Returns a list of sessions with metadata like session ID, working directory,
|
|
1536
|
+
* title, and last update time. Supports filtering by working directory,
|
|
1537
|
+
* `additionalDirectories`, and cursor-based pagination.
|
|
1538
|
+
*/
|
|
1539
|
+
listSessions(params) {
|
|
1540
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_list, params);
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Deletes an existing session returned by `session/list`.
|
|
1544
|
+
*
|
|
1545
|
+
* This method is only available if the agent advertises the `sessionCapabilities.delete` capability.
|
|
1546
|
+
*/
|
|
1547
|
+
deleteSession(params) {
|
|
1548
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_delete, params, emptyObjectResponse);
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Resumes an existing session without returning previous messages.
|
|
1552
|
+
*
|
|
1553
|
+
* This method is only available if the agent advertises the `session.resume` capability.
|
|
1554
|
+
*
|
|
1555
|
+
* The agent should resume the session context, allowing the conversation to continue
|
|
1556
|
+
* without replaying the message history (unlike `session/load`).
|
|
1557
|
+
*
|
|
1558
|
+
* The request may include `additionalDirectories` to set the complete list of
|
|
1559
|
+
* additional workspace roots for the resumed session.
|
|
1560
|
+
*/
|
|
1561
|
+
resumeSession(params) {
|
|
1562
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_resume, params);
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Closes an active session and frees up any resources associated with it.
|
|
1566
|
+
*
|
|
1567
|
+
* This method is only available if the agent advertises the `session.close` capability.
|
|
1568
|
+
*
|
|
1569
|
+
* The agent must cancel any ongoing work (as if `session/cancel` was called)
|
|
1570
|
+
* and then free up any resources associated with the session.
|
|
1571
|
+
*/
|
|
1572
|
+
closeSession(params) {
|
|
1573
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_close, params, emptyObjectResponse);
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* Sets the operational mode for a session.
|
|
1577
|
+
*
|
|
1578
|
+
* Allows switching between different agent modes (e.g., "ask", "architect", "code")
|
|
1579
|
+
* that affect system prompts, tool availability, and permission behaviors.
|
|
1580
|
+
*
|
|
1581
|
+
* The mode must be one of the modes advertised in `availableModes` during session
|
|
1582
|
+
* creation or loading. Agents may also change modes autonomously and notify the
|
|
1583
|
+
* client via `current_mode_update` notifications.
|
|
1584
|
+
*
|
|
1585
|
+
* This method can be called at any time during a session, whether the Agent is
|
|
1586
|
+
* idle or actively generating a turn.
|
|
1587
|
+
*
|
|
1588
|
+
* See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
|
|
1589
|
+
*/
|
|
1590
|
+
setSessionMode(params) {
|
|
1591
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_set_mode, params, emptyObjectResponse);
|
|
1592
|
+
}
|
|
1593
|
+
/**
|
|
1594
|
+
* Set a configuration option for a given session.
|
|
1595
|
+
*
|
|
1596
|
+
* The response contains the full set of configuration options and their current values,
|
|
1597
|
+
* as changing one option may affect the available values or state of other options.
|
|
1598
|
+
*/
|
|
1599
|
+
setSessionConfigOption(params) {
|
|
1600
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_set_config_option, params);
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Authenticates the client using the specified authentication method.
|
|
1604
|
+
*
|
|
1605
|
+
* Called when the agent requires authentication before allowing session creation.
|
|
1606
|
+
* The client provides the authentication method ID that was advertised during initialization.
|
|
1607
|
+
*
|
|
1608
|
+
* After successful authentication, the client can proceed to create sessions with
|
|
1609
|
+
* `newSession` without receiving an `auth_required` error.
|
|
1610
|
+
*
|
|
1611
|
+
* See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)
|
|
1612
|
+
*/
|
|
1613
|
+
authenticate(params) {
|
|
1614
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.authenticate, params, emptyObjectResponse);
|
|
1615
|
+
}
|
|
1616
|
+
/**
|
|
1617
|
+
* **UNSTABLE**
|
|
1618
|
+
*
|
|
1619
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1620
|
+
*
|
|
1621
|
+
* Lists providers that can be configured by the client.
|
|
1622
|
+
*
|
|
1623
|
+
* This method is only available if the agent advertises the `providers` capability.
|
|
1624
|
+
*
|
|
1625
|
+
* @experimental
|
|
1626
|
+
*/
|
|
1627
|
+
unstable_listProviders(params) {
|
|
1628
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.providers_list, params);
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* **UNSTABLE**
|
|
1632
|
+
*
|
|
1633
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1634
|
+
*
|
|
1635
|
+
* Replaces the configuration for a provider.
|
|
1636
|
+
*
|
|
1637
|
+
* This method is only available if the agent advertises the `providers` capability.
|
|
1638
|
+
*
|
|
1639
|
+
* @experimental
|
|
1640
|
+
*/
|
|
1641
|
+
unstable_setProvider(params) {
|
|
1642
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.providers_set, params, emptyObjectResponse);
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* **UNSTABLE**
|
|
1646
|
+
*
|
|
1647
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1648
|
+
*
|
|
1649
|
+
* Disables a provider.
|
|
1650
|
+
*
|
|
1651
|
+
* This method is only available if the agent advertises the `providers` capability.
|
|
1652
|
+
*
|
|
1653
|
+
* @experimental
|
|
1654
|
+
*/
|
|
1655
|
+
unstable_disableProvider(params) {
|
|
1656
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.providers_disable, params, emptyObjectResponse);
|
|
1657
|
+
}
|
|
1658
|
+
/**
|
|
1659
|
+
* Logout of the current authentication method.
|
|
1660
|
+
*/
|
|
1661
|
+
logout(params) {
|
|
1662
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.logout, params, emptyObjectResponse);
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Processes a user prompt within a session.
|
|
1666
|
+
*
|
|
1667
|
+
* This method handles the whole lifecycle of a prompt:
|
|
1668
|
+
* - Receives user messages with optional context (files, images, etc.)
|
|
1669
|
+
* - Processes the prompt using language models
|
|
1670
|
+
* - Reports language model content and tool calls to the Clients
|
|
1671
|
+
* - Requests permission to run tools
|
|
1672
|
+
* - Executes any requested tool calls
|
|
1673
|
+
* - Returns when the turn is complete with a stop reason
|
|
1674
|
+
*
|
|
1675
|
+
* See protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)
|
|
1676
|
+
*/
|
|
1677
|
+
prompt(params) {
|
|
1678
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.session_prompt, params);
|
|
1679
|
+
}
|
|
1680
|
+
/**
|
|
1681
|
+
* Cancels ongoing operations for a session.
|
|
1682
|
+
*
|
|
1683
|
+
* This is a notification sent by the client to cancel an ongoing prompt turn.
|
|
1684
|
+
*
|
|
1685
|
+
* Upon receiving this notification, the Agent SHOULD:
|
|
1686
|
+
* - Stop all language model requests as soon as possible
|
|
1687
|
+
* - Abort all tool call invocations in progress
|
|
1688
|
+
* - Send any pending `session/update` notifications
|
|
1689
|
+
* - Respond to the original `session/prompt` request with `StopReason::Cancelled`
|
|
1690
|
+
*
|
|
1691
|
+
* See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)
|
|
1692
|
+
*/
|
|
1693
|
+
cancel(params) {
|
|
1694
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.session_cancel, params);
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1698
|
+
*
|
|
1699
|
+
* Starts a NES (Next Edit Suggestions) session.
|
|
1700
|
+
*
|
|
1701
|
+
* @experimental
|
|
1702
|
+
*/
|
|
1703
|
+
unstable_startNes(params) {
|
|
1704
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.nes_start, params);
|
|
1705
|
+
}
|
|
1706
|
+
/**
|
|
1707
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1708
|
+
*
|
|
1709
|
+
* Sends a NES suggestion request.
|
|
1710
|
+
*
|
|
1711
|
+
* @experimental
|
|
1712
|
+
*/
|
|
1713
|
+
unstable_suggestNes(params) {
|
|
1714
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.nes_suggest, params);
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1718
|
+
*
|
|
1719
|
+
* Closes a NES session.
|
|
1720
|
+
*
|
|
1721
|
+
* @experimental
|
|
1722
|
+
*/
|
|
1723
|
+
unstable_closeNes(params) {
|
|
1724
|
+
return this.connection.sendRequest(schema.AGENT_METHODS.nes_close, params, emptyObjectResponse);
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1728
|
+
*
|
|
1729
|
+
* Notifies the agent that a document was opened.
|
|
1730
|
+
*
|
|
1731
|
+
* @experimental
|
|
1732
|
+
*/
|
|
1733
|
+
unstable_didOpenDocument(params) {
|
|
1734
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.document_did_open, params);
|
|
1735
|
+
}
|
|
1736
|
+
/**
|
|
1737
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1738
|
+
*
|
|
1739
|
+
* Notifies the agent that a document was changed.
|
|
1740
|
+
*
|
|
1741
|
+
* @experimental
|
|
1742
|
+
*/
|
|
1743
|
+
unstable_didChangeDocument(params) {
|
|
1744
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.document_did_change, params);
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1748
|
+
*
|
|
1749
|
+
* Notifies the agent that a document was closed.
|
|
1750
|
+
*
|
|
1751
|
+
* @experimental
|
|
1752
|
+
*/
|
|
1753
|
+
unstable_didCloseDocument(params) {
|
|
1754
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.document_did_close, params);
|
|
1755
|
+
}
|
|
1756
|
+
/**
|
|
1757
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1758
|
+
*
|
|
1759
|
+
* Notifies the agent that a document was saved.
|
|
1760
|
+
*
|
|
1761
|
+
* @experimental
|
|
1762
|
+
*/
|
|
1763
|
+
unstable_didSaveDocument(params) {
|
|
1764
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.document_did_save, params);
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1768
|
+
*
|
|
1769
|
+
* Notifies the agent that a document received focus.
|
|
1770
|
+
*
|
|
1771
|
+
* @experimental
|
|
1772
|
+
*/
|
|
1773
|
+
unstable_didFocusDocument(params) {
|
|
1774
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.document_did_focus, params);
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1778
|
+
*
|
|
1779
|
+
* Notifies the agent that a NES suggestion was accepted.
|
|
1780
|
+
*
|
|
1781
|
+
* @experimental
|
|
1782
|
+
*/
|
|
1783
|
+
unstable_acceptNes(params) {
|
|
1784
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.nes_accept, params);
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1788
|
+
*
|
|
1789
|
+
* Notifies the agent that a NES suggestion was rejected.
|
|
1790
|
+
*
|
|
1791
|
+
* @experimental
|
|
1792
|
+
*/
|
|
1793
|
+
unstable_rejectNes(params) {
|
|
1794
|
+
return this.connection.sendNotification(schema.AGENT_METHODS.nes_reject, params);
|
|
1795
|
+
}
|
|
1796
|
+
request(method, params, options) {
|
|
1797
|
+
const spec = agentRequestSpecsByMethod[method];
|
|
1798
|
+
return this.connection.sendRequest(method, params, spec?.mapResponse, options);
|
|
1799
|
+
}
|
|
1800
|
+
notify(method, params) {
|
|
1801
|
+
return this.connection.sendNotification(method, params);
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* Extension method.
|
|
1805
|
+
*
|
|
1806
|
+
* @deprecated Use {@link request}.
|
|
1807
|
+
*/
|
|
1808
|
+
extMethod(method, params) {
|
|
1809
|
+
return this.request(method, params);
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* Extension notification.
|
|
1813
|
+
*
|
|
1814
|
+
* @deprecated Use {@link notify}.
|
|
1815
|
+
*/
|
|
1816
|
+
extNotification(method, params) {
|
|
1817
|
+
return this.notify(method, params);
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* AbortSignal that aborts when the connection closes.
|
|
1821
|
+
*
|
|
1822
|
+
* This signal can be used to:
|
|
1823
|
+
* - Listen for connection closure: `connection.signal.addEventListener('abort', () => {...})`
|
|
1824
|
+
* - Check connection status synchronously: `if (connection.signal.aborted) {...}`
|
|
1825
|
+
* - Pass to other APIs (fetch, setTimeout) for automatic cancellation
|
|
1826
|
+
*
|
|
1827
|
+
* The connection closes when the underlying stream ends, either normally or due to an error.
|
|
1828
|
+
*
|
|
1829
|
+
* @example
|
|
1830
|
+
* ```typescript
|
|
1831
|
+
* const connection = new ClientSideConnection(client, stream);
|
|
1832
|
+
*
|
|
1833
|
+
* // Listen for closure
|
|
1834
|
+
* connection.signal.addEventListener('abort', () => {
|
|
1835
|
+
* console.log('Connection closed - performing cleanup');
|
|
1836
|
+
* });
|
|
1837
|
+
*
|
|
1838
|
+
* // Check status
|
|
1839
|
+
* if (connection.signal.aborted) {
|
|
1840
|
+
* console.log('Connection is already closed');
|
|
1841
|
+
* }
|
|
1842
|
+
*
|
|
1843
|
+
* // Pass to other APIs
|
|
1844
|
+
* fetch(url, { signal: connection.signal });
|
|
1845
|
+
* ```
|
|
1846
|
+
*/
|
|
1847
|
+
get signal() {
|
|
1848
|
+
return this.connection.signal;
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* Promise that resolves when the connection closes.
|
|
1852
|
+
*
|
|
1853
|
+
* The connection closes when the underlying stream ends, either normally or due to an error.
|
|
1854
|
+
* Once closed, the connection cannot send or receive any more messages.
|
|
1855
|
+
*
|
|
1856
|
+
* This is useful for async/await style cleanup:
|
|
1857
|
+
*
|
|
1858
|
+
* @example
|
|
1859
|
+
* ```typescript
|
|
1860
|
+
* const connection = new ClientSideConnection(client, stream);
|
|
1861
|
+
* await connection.closed;
|
|
1862
|
+
* console.log('Connection closed - performing cleanup');
|
|
1863
|
+
* ```
|
|
1864
|
+
*/
|
|
1865
|
+
get closed() {
|
|
1866
|
+
return this.connection.closed;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
//# sourceMappingURL=acp.js.map
|