@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,1484 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Experimental TypeScript API for the draft ACP v2 protocol.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* ACP v2 is still a draft. Its wire protocol and this API may change
|
|
6
|
+
* incompatibly in any SDK release. The stable package entry point remains ACP
|
|
7
|
+
* v1; consumers must opt in through
|
|
8
|
+
* `@agentclientprotocol/sdk/experimental/v2`.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @experimental
|
|
12
|
+
*/
|
|
13
|
+
import * as schema from "./schema/index.js";
|
|
14
|
+
import * as validate from "./schema/zod.gen.js";
|
|
15
|
+
import * as guards from "./schema/guards.gen.js";
|
|
16
|
+
import { ndJsonStream as createJsonStream } from "../stream.js";
|
|
17
|
+
// Runtime narrowing helpers for extensible unions, exposed as companion values
|
|
18
|
+
// that merge (declaration merging) with the like-named types — e.g.
|
|
19
|
+
// `CreateElicitationResponse.isAccept(response)`. See schema/guards.gen.ts.
|
|
20
|
+
//
|
|
21
|
+
// Listed explicitly (not `export *`) so each value+type pair merges rather than
|
|
22
|
+
// colliding with the `export type *` above. The guards.gen re-export test
|
|
23
|
+
// asserts this list stays in sync as new extensible unions are added.
|
|
24
|
+
export { AuthMethod, AvailableCommandInput, ContentBlock, CreateElicitationRequest, CreateElicitationResponse, DiffChange, ElicitationPropertySchema, McpServer, MultiSelectItems, NesSuggestion, PlanUpdateContent, ReplayFrom, RequestPermissionOutcome, RequestPermissionSubject, SessionConfigOption, SessionUpdate, SetSessionConfigOptionRequest, StateUpdate, ToolCallContent, } from "./schema/guards.gen.js";
|
|
25
|
+
export { AGENT_METHODS, CLIENT_METHODS, PROTOCOL_METHODS, PROTOCOL_VERSION, } from "./schema/index.js";
|
|
26
|
+
/**
|
|
27
|
+
* Creates an experimental draft ACP v2 stream from newline-delimited JSON.
|
|
28
|
+
*
|
|
29
|
+
* Individual and batch JSON-RPC messages are accepted by default.
|
|
30
|
+
*
|
|
31
|
+
* @experimental
|
|
32
|
+
*/
|
|
33
|
+
export function ndJsonStream(output, input) {
|
|
34
|
+
return createJsonStream(output, input);
|
|
35
|
+
}
|
|
36
|
+
export { RequestError } from "../jsonrpc.js";
|
|
37
|
+
export { AgentProtocolRouter, agentProtocolRouter, } from "../protocol-router.js";
|
|
38
|
+
import { batchNotification as jsonRpcBatchNotification, batchRequest as jsonRpcBatchRequest, Connection, Handled, HandlerRegistration, requestBatchSize, RequestError, } from "../jsonrpc.js";
|
|
39
|
+
export function batchRequest(method, params, mapResponseOrOptions, options) {
|
|
40
|
+
const request = typeof mapResponseOrOptions === "function"
|
|
41
|
+
? jsonRpcBatchRequest(method, params, mapResponseOrOptions, options)
|
|
42
|
+
: jsonRpcBatchRequest(method, params, mapResponseOrOptions);
|
|
43
|
+
return request;
|
|
44
|
+
}
|
|
45
|
+
export function batchNotification(method, params) {
|
|
46
|
+
return jsonRpcBatchNotification(method, params);
|
|
47
|
+
}
|
|
48
|
+
function emptyObjectResponse(response) {
|
|
49
|
+
return response ?? {};
|
|
50
|
+
}
|
|
51
|
+
const knownProtocolMethods = new Set([
|
|
52
|
+
...Object.values(schema.AGENT_METHODS),
|
|
53
|
+
...Object.values(schema.CLIENT_METHODS),
|
|
54
|
+
...Object.values(schema.PROTOCOL_METHODS),
|
|
55
|
+
]);
|
|
56
|
+
function assertV2MethodDirection(method, builtIns, kind, allowProtocolNotification = false) {
|
|
57
|
+
if (Object.hasOwn(builtIns, method) ||
|
|
58
|
+
(allowProtocolNotification &&
|
|
59
|
+
method === schema.PROTOCOL_METHODS.cancel_request)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (knownProtocolMethods.has(method)) {
|
|
63
|
+
throw new TypeError(`ACP v2 ${kind} method '${method}' is not valid in this direction`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function assertUnrecognizedV2Method(method, kind) {
|
|
67
|
+
if (knownProtocolMethods.has(method)) {
|
|
68
|
+
throw new TypeError(`Cannot replace the built-in ACP v2 ${kind} parser for '${method}'`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function assertV2BatchMethods(entries, requestMethods, notificationMethods) {
|
|
72
|
+
for (const entry of entries) {
|
|
73
|
+
assertV2MethodDirection(entry.method, entry.kind === "request" ? requestMethods : notificationMethods, entry.kind, entry.kind === "notification");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function parseV2InitializeRequest(params) {
|
|
77
|
+
const request = validate.zInitializeRequest.parse(params);
|
|
78
|
+
if (request.protocolVersion !== schema.PROTOCOL_VERSION) {
|
|
79
|
+
throw RequestError.invalidParams({
|
|
80
|
+
expectedProtocolVersion: schema.PROTOCOL_VERSION,
|
|
81
|
+
receivedProtocolVersion: request.protocolVersion,
|
|
82
|
+
}, `The v2 API only supports protocol version ${schema.PROTOCOL_VERSION}`);
|
|
83
|
+
}
|
|
84
|
+
return structuredClone(request);
|
|
85
|
+
}
|
|
86
|
+
function normalizeOutgoingV2InitializeRequest(params) {
|
|
87
|
+
const request = typeof params === "object" && params !== null && !Array.isArray(params)
|
|
88
|
+
? params
|
|
89
|
+
: {};
|
|
90
|
+
return parseV2InitializeRequest({
|
|
91
|
+
...request,
|
|
92
|
+
protocolVersion: schema.PROTOCOL_VERSION,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function mapV2InitializeResponse(response) {
|
|
96
|
+
const parsed = validate.zInitializeResponse.parse(response);
|
|
97
|
+
if (parsed.protocolVersion !== schema.PROTOCOL_VERSION) {
|
|
98
|
+
throw RequestError.invalidRequest({
|
|
99
|
+
expectedProtocolVersion: schema.PROTOCOL_VERSION,
|
|
100
|
+
receivedProtocolVersion: parsed.protocolVersion,
|
|
101
|
+
}, `The v2 API only supports protocol version ${schema.PROTOCOL_VERSION}`);
|
|
102
|
+
}
|
|
103
|
+
return structuredClone(parsed);
|
|
104
|
+
}
|
|
105
|
+
function cloneInitialization(initialization) {
|
|
106
|
+
return structuredClone(initialization);
|
|
107
|
+
}
|
|
108
|
+
function deferred() {
|
|
109
|
+
let resolve;
|
|
110
|
+
let reject;
|
|
111
|
+
const promise = new Promise((resolvePromise, rejectPromise) => {
|
|
112
|
+
resolve = resolvePromise;
|
|
113
|
+
reject = rejectPromise;
|
|
114
|
+
});
|
|
115
|
+
return { promise, resolve, reject };
|
|
116
|
+
}
|
|
117
|
+
class InitializationState {
|
|
118
|
+
phase = "uninitialized";
|
|
119
|
+
request;
|
|
120
|
+
barrier = deferred();
|
|
121
|
+
constructor() {
|
|
122
|
+
void this.barrier.promise.catch(() => { });
|
|
123
|
+
}
|
|
124
|
+
get status() {
|
|
125
|
+
return this.phase;
|
|
126
|
+
}
|
|
127
|
+
get initialized() {
|
|
128
|
+
return this.barrier.promise.then(cloneInitialization);
|
|
129
|
+
}
|
|
130
|
+
begin(request) {
|
|
131
|
+
if (this.phase !== "uninitialized") {
|
|
132
|
+
throw RequestError.invalidRequest("ACP v2 initialize may only be requested once per connection");
|
|
133
|
+
}
|
|
134
|
+
const requestSnapshot = structuredClone(request);
|
|
135
|
+
this.request = requestSnapshot;
|
|
136
|
+
this.phase = "initializing";
|
|
137
|
+
}
|
|
138
|
+
complete(response) {
|
|
139
|
+
if (this.phase !== "initializing" || !this.request) {
|
|
140
|
+
throw RequestError.invalidRequest("ACP v2 initialization is not in progress");
|
|
141
|
+
}
|
|
142
|
+
const initialization = {
|
|
143
|
+
request: structuredClone(this.request),
|
|
144
|
+
response: structuredClone(response),
|
|
145
|
+
};
|
|
146
|
+
this.phase = "initialized";
|
|
147
|
+
this.barrier.resolve(initialization);
|
|
148
|
+
}
|
|
149
|
+
fail(error) {
|
|
150
|
+
if (this.phase === "uninitialized" || this.phase === "initializing") {
|
|
151
|
+
this.phase = "failed";
|
|
152
|
+
this.request = undefined;
|
|
153
|
+
this.barrier.reject(error ??
|
|
154
|
+
RequestError.invalidRequest("ACP v2 connection initialization failed"));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
waitUntilInitialized(method) {
|
|
158
|
+
if (this.phase === "initialized") {
|
|
159
|
+
return Promise.resolve();
|
|
160
|
+
}
|
|
161
|
+
if (this.phase === "initializing") {
|
|
162
|
+
return this.barrier.promise.then(() => { });
|
|
163
|
+
}
|
|
164
|
+
return Promise.reject(initializationUnavailable(method));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const initializationStates = new WeakMap();
|
|
168
|
+
function initializationState(cx) {
|
|
169
|
+
let state = initializationStates.get(cx);
|
|
170
|
+
if (!state) {
|
|
171
|
+
state = new InitializationState();
|
|
172
|
+
initializationStates.set(cx, state);
|
|
173
|
+
if (cx.signal.aborted) {
|
|
174
|
+
state.fail(cx.signal.reason);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
cx.signal.addEventListener("abort", () => state?.fail(cx.signal.reason), {
|
|
178
|
+
once: true,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return state;
|
|
183
|
+
}
|
|
184
|
+
function initializationUnavailable(method) {
|
|
185
|
+
return RequestError.invalidRequest(`ACP v2 connection must be initialized before '${method}'`);
|
|
186
|
+
}
|
|
187
|
+
async function blockUninitializedIncoming(message, state) {
|
|
188
|
+
const error = initializationUnavailable(message.method);
|
|
189
|
+
state.fail(error);
|
|
190
|
+
return rejectIncoming(message, error);
|
|
191
|
+
}
|
|
192
|
+
async function rejectIncoming(message, error) {
|
|
193
|
+
if (message.kind === "request") {
|
|
194
|
+
await message.responder.respondWithError(error);
|
|
195
|
+
}
|
|
196
|
+
return Handled.yes();
|
|
197
|
+
}
|
|
198
|
+
function agentInitializationGuard() {
|
|
199
|
+
return {
|
|
200
|
+
async handleMessage(message, cx) {
|
|
201
|
+
const state = initializationState(cx);
|
|
202
|
+
if (message.kind === "notification" &&
|
|
203
|
+
message.method === schema.PROTOCOL_METHODS.cancel_request) {
|
|
204
|
+
return state.status === "initializing" || state.status === "initialized"
|
|
205
|
+
? Handled.yes()
|
|
206
|
+
: blockUninitializedIncoming(message, state);
|
|
207
|
+
}
|
|
208
|
+
if (message.kind === "request" &&
|
|
209
|
+
message.method === schema.AGENT_METHODS.initialize) {
|
|
210
|
+
if (state.status !== "uninitialized") {
|
|
211
|
+
return rejectIncoming(message, RequestError.invalidRequest("ACP v2 initialize may only be requested once per connection"));
|
|
212
|
+
}
|
|
213
|
+
const batchSize = requestBatchSize(message.responder);
|
|
214
|
+
if (batchSize !== undefined && batchSize !== 1) {
|
|
215
|
+
const error = RequestError.invalidRequest("ACP v2 initialize must be the only entry in its batch");
|
|
216
|
+
state.fail(error);
|
|
217
|
+
return rejectIncoming(message, error);
|
|
218
|
+
}
|
|
219
|
+
let request;
|
|
220
|
+
try {
|
|
221
|
+
request = parseV2InitializeRequest(message.params);
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
state.fail(error);
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
state.begin(request);
|
|
228
|
+
return Handled.no(message);
|
|
229
|
+
}
|
|
230
|
+
if (state.status === "initialized") {
|
|
231
|
+
return Handled.no(message);
|
|
232
|
+
}
|
|
233
|
+
if (state.status === "initializing") {
|
|
234
|
+
await state.waitUntilInitialized(message.method);
|
|
235
|
+
return Handled.no(message);
|
|
236
|
+
}
|
|
237
|
+
return blockUninitializedIncoming(message, state);
|
|
238
|
+
},
|
|
239
|
+
describe: () => "agent-initialization",
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function clientInitializationGuard() {
|
|
243
|
+
return {
|
|
244
|
+
async handleMessage(message, cx) {
|
|
245
|
+
const state = initializationState(cx);
|
|
246
|
+
if (message.kind === "notification" &&
|
|
247
|
+
message.method === schema.PROTOCOL_METHODS.cancel_request) {
|
|
248
|
+
return state.status === "initializing" || state.status === "initialized"
|
|
249
|
+
? Handled.yes()
|
|
250
|
+
: blockUninitializedIncoming(message, state);
|
|
251
|
+
}
|
|
252
|
+
if (state.status === "initialized") {
|
|
253
|
+
return Handled.no(message);
|
|
254
|
+
}
|
|
255
|
+
if (state.status === "initializing") {
|
|
256
|
+
await state.waitUntilInitialized(message.method);
|
|
257
|
+
return Handled.no(message);
|
|
258
|
+
}
|
|
259
|
+
return blockUninitializedIncoming(message, state);
|
|
260
|
+
},
|
|
261
|
+
describe: () => "client-initialization",
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function parseRequestResponse(spec, response) {
|
|
265
|
+
return parseParams(spec.response, response);
|
|
266
|
+
}
|
|
267
|
+
function normalizeV2Batch(entries, requestSpecs, onInitializeResponse) {
|
|
268
|
+
return entries.map((entry) => {
|
|
269
|
+
if (entry.kind !== "request") {
|
|
270
|
+
return entry;
|
|
271
|
+
}
|
|
272
|
+
const spec = requestSpecs[entry.method];
|
|
273
|
+
const mapResponse = entry.mapResponse;
|
|
274
|
+
return {
|
|
275
|
+
...entry,
|
|
276
|
+
mapResponse: spec
|
|
277
|
+
? (response) => {
|
|
278
|
+
const parsed = parseRequestResponse(spec, response);
|
|
279
|
+
if (onInitializeResponse &&
|
|
280
|
+
entry.method === schema.AGENT_METHODS.initialize) {
|
|
281
|
+
onInitializeResponse(parsed);
|
|
282
|
+
}
|
|
283
|
+
return mapResponse ? mapResponse(parsed) : parsed;
|
|
284
|
+
}
|
|
285
|
+
: mapResponse,
|
|
286
|
+
};
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function isStream(value) {
|
|
290
|
+
return (typeof value === "object" &&
|
|
291
|
+
value !== null &&
|
|
292
|
+
"readable" in value &&
|
|
293
|
+
"writable" in value);
|
|
294
|
+
}
|
|
295
|
+
function memoryStreamPair() {
|
|
296
|
+
const leftToRight = new TransformStream();
|
|
297
|
+
const rightToLeft = new TransformStream();
|
|
298
|
+
return [
|
|
299
|
+
{
|
|
300
|
+
readable: rightToLeft.readable,
|
|
301
|
+
writable: leftToRight.writable,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
readable: leftToRight.readable,
|
|
305
|
+
writable: rightToLeft.writable,
|
|
306
|
+
},
|
|
307
|
+
];
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* ACP method-name constants for the experimental draft v2 API.
|
|
311
|
+
*
|
|
312
|
+
* Use these with `onRequest(...)`, `onNotification(...)`, `request(...)`, and
|
|
313
|
+
* `notify(...)` when you want literal-string type inference without spelling
|
|
314
|
+
* protocol strings inline.
|
|
315
|
+
*
|
|
316
|
+
* @experimental
|
|
317
|
+
*/
|
|
318
|
+
export const methods = {
|
|
319
|
+
agent: {
|
|
320
|
+
initialize: schema.AGENT_METHODS.initialize,
|
|
321
|
+
auth: {
|
|
322
|
+
login: schema.AGENT_METHODS.auth_login,
|
|
323
|
+
logout: schema.AGENT_METHODS.auth_logout,
|
|
324
|
+
},
|
|
325
|
+
providers: {
|
|
326
|
+
list: schema.AGENT_METHODS.providers_list,
|
|
327
|
+
set: schema.AGENT_METHODS.providers_set,
|
|
328
|
+
disable: schema.AGENT_METHODS.providers_disable,
|
|
329
|
+
},
|
|
330
|
+
session: {
|
|
331
|
+
new: schema.AGENT_METHODS.session_new,
|
|
332
|
+
list: schema.AGENT_METHODS.session_list,
|
|
333
|
+
delete: schema.AGENT_METHODS.session_delete,
|
|
334
|
+
fork: schema.AGENT_METHODS.session_fork,
|
|
335
|
+
resume: schema.AGENT_METHODS.session_resume,
|
|
336
|
+
close: schema.AGENT_METHODS.session_close,
|
|
337
|
+
setConfigOption: schema.AGENT_METHODS.session_set_config_option,
|
|
338
|
+
prompt: schema.AGENT_METHODS.session_prompt,
|
|
339
|
+
cancel: schema.AGENT_METHODS.session_cancel,
|
|
340
|
+
},
|
|
341
|
+
mcp: {
|
|
342
|
+
message: schema.AGENT_METHODS.mcp_message,
|
|
343
|
+
},
|
|
344
|
+
nes: {
|
|
345
|
+
start: schema.AGENT_METHODS.nes_start,
|
|
346
|
+
suggest: schema.AGENT_METHODS.nes_suggest,
|
|
347
|
+
accept: schema.AGENT_METHODS.nes_accept,
|
|
348
|
+
reject: schema.AGENT_METHODS.nes_reject,
|
|
349
|
+
close: schema.AGENT_METHODS.nes_close,
|
|
350
|
+
},
|
|
351
|
+
document: {
|
|
352
|
+
didOpen: schema.AGENT_METHODS.document_did_open,
|
|
353
|
+
didChange: schema.AGENT_METHODS.document_did_change,
|
|
354
|
+
didClose: schema.AGENT_METHODS.document_did_close,
|
|
355
|
+
didSave: schema.AGENT_METHODS.document_did_save,
|
|
356
|
+
didFocus: schema.AGENT_METHODS.document_did_focus,
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
client: {
|
|
360
|
+
session: {
|
|
361
|
+
requestPermission: schema.CLIENT_METHODS.session_request_permission,
|
|
362
|
+
update: schema.CLIENT_METHODS.session_update,
|
|
363
|
+
},
|
|
364
|
+
mcp: {
|
|
365
|
+
connect: schema.CLIENT_METHODS.mcp_connect,
|
|
366
|
+
message: schema.CLIENT_METHODS.mcp_message,
|
|
367
|
+
disconnect: schema.CLIENT_METHODS.mcp_disconnect,
|
|
368
|
+
},
|
|
369
|
+
elicitation: {
|
|
370
|
+
create: schema.CLIENT_METHODS.elicitation_create,
|
|
371
|
+
complete: schema.CLIENT_METHODS.elicitation_complete,
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
protocol: {
|
|
375
|
+
cancelRequest: schema.PROTOCOL_METHODS.cancel_request,
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
const startActiveSession = Symbol("startActiveSession");
|
|
379
|
+
class AcpContext {
|
|
380
|
+
cx;
|
|
381
|
+
currentRequestId;
|
|
382
|
+
/** @internal */
|
|
383
|
+
constructor(cx, currentRequestId) {
|
|
384
|
+
this.cx = cx;
|
|
385
|
+
this.currentRequestId = currentRequestId;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Validated initialize exchange, once this connection is initialized.
|
|
389
|
+
*/
|
|
390
|
+
get initialized() {
|
|
391
|
+
return initializationState(this.cx).initialized;
|
|
392
|
+
}
|
|
393
|
+
/** @internal */
|
|
394
|
+
get initializationLifecycle() {
|
|
395
|
+
return initializationState(this.cx);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* JSON-RPC id of the request currently being handled.
|
|
399
|
+
*
|
|
400
|
+
* This is `undefined` for notification handlers and for contexts created
|
|
401
|
+
* outside an inbound request, such as `connect(...)` and `connectWith(...)`.
|
|
402
|
+
*/
|
|
403
|
+
get requestId() {
|
|
404
|
+
return this.currentRequestId;
|
|
405
|
+
}
|
|
406
|
+
/** @internal */
|
|
407
|
+
get connectionContext() {
|
|
408
|
+
return this.cx;
|
|
409
|
+
}
|
|
410
|
+
/** @internal */
|
|
411
|
+
sendRequest(method, params, mapResponse, options) {
|
|
412
|
+
return this.cx.sendRequest(method, params, mapResponse, options);
|
|
413
|
+
}
|
|
414
|
+
/** @internal */
|
|
415
|
+
sendNotification(method, params) {
|
|
416
|
+
return this.cx.sendNotification(method, params);
|
|
417
|
+
}
|
|
418
|
+
/** @internal */
|
|
419
|
+
sendBatch(entries) {
|
|
420
|
+
return this.cx.sendBatch(entries);
|
|
421
|
+
}
|
|
422
|
+
/** @internal */
|
|
423
|
+
addDynamicHandler(handler) {
|
|
424
|
+
return this.cx.addDynamicHandler(handler);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Experimental draft ACP v2 context passed to agent-side handlers.
|
|
429
|
+
*
|
|
430
|
+
* Agents use this context to call client-side ACP methods while handling
|
|
431
|
+
* requests such as `session/prompt`.
|
|
432
|
+
*
|
|
433
|
+
* @experimental
|
|
434
|
+
*/
|
|
435
|
+
export class AgentContext extends AcpContext {
|
|
436
|
+
constructor(cx, requestId) {
|
|
437
|
+
super(cx, requestId);
|
|
438
|
+
}
|
|
439
|
+
/** @internal */
|
|
440
|
+
static create(cx, requestId) {
|
|
441
|
+
return new AgentContext(cx, requestId);
|
|
442
|
+
}
|
|
443
|
+
request(method, params, options) {
|
|
444
|
+
assertV2MethodDirection(method, clientRequestSpecsByMethod, "request");
|
|
445
|
+
const spec = clientRequestSpecsByMethod[method];
|
|
446
|
+
return this.initializationLifecycle
|
|
447
|
+
.waitUntilInitialized(method)
|
|
448
|
+
.then(() => this.sendRequest(method, params, spec ? (response) => parseRequestResponse(spec, response) : undefined, options));
|
|
449
|
+
}
|
|
450
|
+
notify(method, params) {
|
|
451
|
+
assertV2MethodDirection(method, clientNotificationSpecsByMethod, "notification", true);
|
|
452
|
+
return this.initializationLifecycle
|
|
453
|
+
.waitUntilInitialized(method)
|
|
454
|
+
.then(() => this.sendNotification(method, params));
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Sends requests and notifications to the client as one JSON-RPC batch.
|
|
458
|
+
*/
|
|
459
|
+
batch(entries) {
|
|
460
|
+
assertV2BatchMethods(entries, clientRequestSpecsByMethod, clientNotificationSpecsByMethod);
|
|
461
|
+
return this.initializationLifecycle
|
|
462
|
+
.waitUntilInitialized("batch")
|
|
463
|
+
.then(() => this.sendBatch(normalizeV2Batch(entries, clientRequestSpecsByMethod)));
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Experimental draft ACP v2 context used by clients to call agent-side ACP
|
|
468
|
+
* methods.
|
|
469
|
+
*
|
|
470
|
+
* `connectWith` passes a `ClientContext` to the callback. Client handlers also
|
|
471
|
+
* receive one as `ctx.agent` when they need to call back into the agent.
|
|
472
|
+
*
|
|
473
|
+
* @experimental
|
|
474
|
+
*/
|
|
475
|
+
export class ClientContext extends AcpContext {
|
|
476
|
+
closeOnInitializationFailure;
|
|
477
|
+
constructor(cx, requestId, closeOnInitializationFailure) {
|
|
478
|
+
super(cx, requestId);
|
|
479
|
+
this.closeOnInitializationFailure = closeOnInitializationFailure;
|
|
480
|
+
}
|
|
481
|
+
/** @internal */
|
|
482
|
+
static create(cx, requestId, closeOnInitializationFailure) {
|
|
483
|
+
return new ClientContext(cx, requestId, closeOnInitializationFailure);
|
|
484
|
+
}
|
|
485
|
+
/** @internal */
|
|
486
|
+
[startActiveSession](params, options) {
|
|
487
|
+
return this.request(schema.AGENT_METHODS.session_new, params, options).then((response) => this.attachSession(response));
|
|
488
|
+
}
|
|
489
|
+
buildSession(cwdOrRequest) {
|
|
490
|
+
if (typeof cwdOrRequest === "string") {
|
|
491
|
+
return SessionBuilder.create(this, {
|
|
492
|
+
cwd: cwdOrRequest,
|
|
493
|
+
mcpServers: [],
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
return SessionBuilder.create(this, cwdOrRequest);
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Builds active-session helpers around a `session/new` response.
|
|
500
|
+
*/
|
|
501
|
+
attachSession(response) {
|
|
502
|
+
const updates = new AsyncQueue();
|
|
503
|
+
const activePrompts = new Set();
|
|
504
|
+
const activeSessionQueue = {
|
|
505
|
+
enqueue: (value) => updates.enqueue(value),
|
|
506
|
+
reject: (error) => updates.reject(error),
|
|
507
|
+
clearErrors: () => updates.clearErrors(),
|
|
508
|
+
fail: (error) => updates.fail(error),
|
|
509
|
+
next: () => updates.next(),
|
|
510
|
+
nextAfter: (cursor, signal) => updates.nextAfter(cursor, signal),
|
|
511
|
+
beginPrompt: () => {
|
|
512
|
+
const prompt = {
|
|
513
|
+
updateCursor: updates.cursor(),
|
|
514
|
+
overlapController: new AbortController(),
|
|
515
|
+
};
|
|
516
|
+
if (activePrompts.size > 0) {
|
|
517
|
+
const error = new Error("readText() cannot attribute updates across overlapping prompts; use nextUpdate() instead");
|
|
518
|
+
for (const activePrompt of activePrompts) {
|
|
519
|
+
activePrompt.overlapController.abort(error);
|
|
520
|
+
}
|
|
521
|
+
prompt.overlapController.abort(error);
|
|
522
|
+
}
|
|
523
|
+
activePrompts.add(prompt);
|
|
524
|
+
return prompt;
|
|
525
|
+
},
|
|
526
|
+
cancelPrompt: (prompt) => activePrompts.delete(prompt),
|
|
527
|
+
isAwaitingPromptCompletion: () => activePrompts.size > 0,
|
|
528
|
+
completePrompt: () => {
|
|
529
|
+
activePrompts.clear();
|
|
530
|
+
},
|
|
531
|
+
};
|
|
532
|
+
const closeSignal = this.connectionContext.signal;
|
|
533
|
+
const failUpdatesOnClose = () => {
|
|
534
|
+
updates.fail(closeSignal.reason ?? new Error("ACP connection closed"));
|
|
535
|
+
};
|
|
536
|
+
if (closeSignal.aborted) {
|
|
537
|
+
failUpdatesOnClose();
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
closeSignal.addEventListener("abort", failUpdatesOnClose);
|
|
541
|
+
}
|
|
542
|
+
const sessionRegistration = sessionUpdateRouter(this.connectionContext).attach(response, activeSessionQueue);
|
|
543
|
+
const closeRegistration = new HandlerRegistration(() => {
|
|
544
|
+
closeSignal.removeEventListener("abort", failUpdatesOnClose);
|
|
545
|
+
});
|
|
546
|
+
return ActiveSession.create(this, response, activeSessionQueue, [
|
|
547
|
+
sessionRegistration,
|
|
548
|
+
closeRegistration,
|
|
549
|
+
]);
|
|
550
|
+
}
|
|
551
|
+
request(method, params, options) {
|
|
552
|
+
assertV2MethodDirection(method, agentRequestSpecsByMethod, "request");
|
|
553
|
+
const spec = agentRequestSpecsByMethod[method];
|
|
554
|
+
const state = this.initializationLifecycle;
|
|
555
|
+
if (method === schema.AGENT_METHODS.initialize) {
|
|
556
|
+
const request = normalizeOutgoingV2InitializeRequest(params);
|
|
557
|
+
state.begin(request);
|
|
558
|
+
let response;
|
|
559
|
+
try {
|
|
560
|
+
response = this.sendRequest(method, request, (value) => {
|
|
561
|
+
const parsed = parseRequestResponse(spec, value);
|
|
562
|
+
state.complete(parsed);
|
|
563
|
+
return parsed;
|
|
564
|
+
}, options);
|
|
565
|
+
}
|
|
566
|
+
catch (error) {
|
|
567
|
+
state.fail(error);
|
|
568
|
+
this.closeOnInitializationFailure?.(error);
|
|
569
|
+
throw error;
|
|
570
|
+
}
|
|
571
|
+
void response.catch((error) => {
|
|
572
|
+
if (state.status !== "initialized") {
|
|
573
|
+
state.fail(error);
|
|
574
|
+
this.closeOnInitializationFailure?.(error);
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
return response;
|
|
578
|
+
}
|
|
579
|
+
return state
|
|
580
|
+
.waitUntilInitialized(method)
|
|
581
|
+
.then(() => this.sendRequest(method, params, spec ? (response) => parseRequestResponse(spec, response) : undefined, options));
|
|
582
|
+
}
|
|
583
|
+
notify(method, params) {
|
|
584
|
+
assertV2MethodDirection(method, agentNotificationSpecsByMethod, "notification", true);
|
|
585
|
+
return this.initializationLifecycle
|
|
586
|
+
.waitUntilInitialized(method)
|
|
587
|
+
.then(() => this.sendNotification(method, params));
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Sends requests and notifications to the agent as one JSON-RPC batch.
|
|
591
|
+
*/
|
|
592
|
+
batch(entries) {
|
|
593
|
+
assertV2BatchMethods(entries, agentRequestSpecsByMethod, agentNotificationSpecsByMethod);
|
|
594
|
+
const initializeEntries = entries.filter((entry) => entry.kind === "request" &&
|
|
595
|
+
entry.method === schema.AGENT_METHODS.initialize);
|
|
596
|
+
if (initializeEntries.length > 0) {
|
|
597
|
+
if (entries.length !== 1 || initializeEntries.length !== 1) {
|
|
598
|
+
return Promise.reject(RequestError.invalidRequest("ACP v2 initialize must be the only entry in its batch"));
|
|
599
|
+
}
|
|
600
|
+
const state = this.initializationLifecycle;
|
|
601
|
+
const request = normalizeOutgoingV2InitializeRequest(initializeEntries[0].params);
|
|
602
|
+
state.begin(request);
|
|
603
|
+
const normalizedEntries = [
|
|
604
|
+
{ ...initializeEntries[0], params: request },
|
|
605
|
+
];
|
|
606
|
+
let response;
|
|
607
|
+
try {
|
|
608
|
+
response = this.sendBatch(normalizeV2Batch(normalizedEntries, agentRequestSpecsByMethod, (value) => state.complete(value)));
|
|
609
|
+
}
|
|
610
|
+
catch (error) {
|
|
611
|
+
state.fail(error);
|
|
612
|
+
this.closeOnInitializationFailure?.(error);
|
|
613
|
+
throw error;
|
|
614
|
+
}
|
|
615
|
+
void response.catch((error) => {
|
|
616
|
+
if (state.status !== "initialized") {
|
|
617
|
+
state.fail(error);
|
|
618
|
+
this.closeOnInitializationFailure?.(error);
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
return response;
|
|
622
|
+
}
|
|
623
|
+
return this.initializationLifecycle
|
|
624
|
+
.waitUntilInitialized("batch")
|
|
625
|
+
.then(() => this.sendBatch(normalizeV2Batch(entries, agentRequestSpecsByMethod)));
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
class AcpConnectionHandle {
|
|
629
|
+
connection;
|
|
630
|
+
constructor(connection) {
|
|
631
|
+
this.connection = connection;
|
|
632
|
+
}
|
|
633
|
+
get initialized() {
|
|
634
|
+
return initializationState(this.connection.getContext()).initialized;
|
|
635
|
+
}
|
|
636
|
+
get signal() {
|
|
637
|
+
return this.connection.signal;
|
|
638
|
+
}
|
|
639
|
+
get closed() {
|
|
640
|
+
return this.connection.closed;
|
|
641
|
+
}
|
|
642
|
+
close(error) {
|
|
643
|
+
this.connection.close(error);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
class AgentConnectionHandle extends AcpConnectionHandle {
|
|
647
|
+
connectHandlers;
|
|
648
|
+
client;
|
|
649
|
+
didStartConnectHandlers = false;
|
|
650
|
+
constructor(connection, connectHandlers = []) {
|
|
651
|
+
super(connection);
|
|
652
|
+
this.connectHandlers = connectHandlers;
|
|
653
|
+
this.client = AgentContext.create(connection.getContext());
|
|
654
|
+
}
|
|
655
|
+
/** @internal */
|
|
656
|
+
startConnectHandlers() {
|
|
657
|
+
if (this.didStartConnectHandlers) {
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
this.didStartConnectHandlers = true;
|
|
661
|
+
runConnectHandlers(this, this.connectHandlers);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
class ClientConnectionHandle extends AcpConnectionHandle {
|
|
665
|
+
connectHandlers;
|
|
666
|
+
agent;
|
|
667
|
+
didStartConnectHandlers = false;
|
|
668
|
+
constructor(connection, connectHandlers = []) {
|
|
669
|
+
super(connection);
|
|
670
|
+
this.connectHandlers = connectHandlers;
|
|
671
|
+
this.agent = ClientContext.create(connection.getContext(), undefined, (error) => connection.close(error));
|
|
672
|
+
}
|
|
673
|
+
/** @internal */
|
|
674
|
+
startConnectHandlers() {
|
|
675
|
+
if (this.didStartConnectHandlers) {
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
this.didStartConnectHandlers = true;
|
|
679
|
+
runConnectHandlers(this, this.connectHandlers);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
function agentConnection(connection, connectHandlers = []) {
|
|
683
|
+
return new AgentConnectionHandle(connection, connectHandlers);
|
|
684
|
+
}
|
|
685
|
+
function clientConnection(connection, connectHandlers = []) {
|
|
686
|
+
return new ClientConnectionHandle(connection, connectHandlers);
|
|
687
|
+
}
|
|
688
|
+
class AsyncQueue {
|
|
689
|
+
values = [];
|
|
690
|
+
waiters = [];
|
|
691
|
+
failed = false;
|
|
692
|
+
failure;
|
|
693
|
+
nextSequence = 0;
|
|
694
|
+
enqueue(value) {
|
|
695
|
+
if (this.failed) {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
const sequence = this.nextSequence++;
|
|
699
|
+
const waiter = this.waiters.shift();
|
|
700
|
+
if (waiter) {
|
|
701
|
+
waiter.resolve(value);
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
this.values.push({ kind: "value", value, sequence });
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
reject(error) {
|
|
708
|
+
if (this.failed) {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
const sequence = this.nextSequence++;
|
|
712
|
+
if (this.waiters.length > 0) {
|
|
713
|
+
for (const waiter of this.waiters.splice(0)) {
|
|
714
|
+
waiter.reject(error);
|
|
715
|
+
}
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
this.values.push({ kind: "error", error, sequence });
|
|
719
|
+
}
|
|
720
|
+
clearErrors() {
|
|
721
|
+
this.values = this.values.filter((entry) => entry.kind === "value");
|
|
722
|
+
}
|
|
723
|
+
cursor() {
|
|
724
|
+
return this.nextSequence;
|
|
725
|
+
}
|
|
726
|
+
nextAfter(cursor, signal) {
|
|
727
|
+
if (signal?.aborted) {
|
|
728
|
+
return Promise.reject(signal.reason);
|
|
729
|
+
}
|
|
730
|
+
while (this.values[0] && this.values[0].sequence < cursor) {
|
|
731
|
+
this.values.shift();
|
|
732
|
+
}
|
|
733
|
+
return this.next(signal);
|
|
734
|
+
}
|
|
735
|
+
fail(error) {
|
|
736
|
+
if (this.failed) {
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
this.failed = true;
|
|
740
|
+
this.failure = error;
|
|
741
|
+
for (const waiter of this.waiters.splice(0)) {
|
|
742
|
+
waiter.reject(error);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
next(signal) {
|
|
746
|
+
if (signal?.aborted) {
|
|
747
|
+
return Promise.reject(signal.reason);
|
|
748
|
+
}
|
|
749
|
+
if (this.values.length > 0) {
|
|
750
|
+
const entry = this.values.shift();
|
|
751
|
+
if (entry.kind === "error") {
|
|
752
|
+
return Promise.reject(entry.error);
|
|
753
|
+
}
|
|
754
|
+
return Promise.resolve(entry.value);
|
|
755
|
+
}
|
|
756
|
+
if (this.failed) {
|
|
757
|
+
return Promise.reject(this.failure);
|
|
758
|
+
}
|
|
759
|
+
return new Promise((resolve, reject) => {
|
|
760
|
+
const cleanup = () => {
|
|
761
|
+
signal?.removeEventListener("abort", onAbort);
|
|
762
|
+
};
|
|
763
|
+
const waiter = {
|
|
764
|
+
resolve: (value) => {
|
|
765
|
+
cleanup();
|
|
766
|
+
resolve(value);
|
|
767
|
+
},
|
|
768
|
+
reject: (error) => {
|
|
769
|
+
cleanup();
|
|
770
|
+
reject(error);
|
|
771
|
+
},
|
|
772
|
+
};
|
|
773
|
+
const onAbort = () => {
|
|
774
|
+
const index = this.waiters.indexOf(waiter);
|
|
775
|
+
if (index >= 0) {
|
|
776
|
+
this.waiters.splice(index, 1);
|
|
777
|
+
}
|
|
778
|
+
waiter.reject(signal?.reason);
|
|
779
|
+
};
|
|
780
|
+
this.waiters.push(waiter);
|
|
781
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
782
|
+
if (signal?.aborted) {
|
|
783
|
+
onAbort();
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
function cloneNewSessionRequest(request) {
|
|
789
|
+
return structuredClone(request);
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Experimental draft ACP v2 builder for creating an `ActiveSession`.
|
|
793
|
+
*
|
|
794
|
+
* Start from `ctx.buildSession("/absolute/cwd")` for the common case, or
|
|
795
|
+
* pass a full `NewSessionRequest` to `ctx.buildSession(...)` when the session
|
|
796
|
+
* needs MCP servers, `_meta`, or additional request fields. All paths in ACP
|
|
797
|
+
* payloads should be absolute.
|
|
798
|
+
*
|
|
799
|
+
* @experimental
|
|
800
|
+
*/
|
|
801
|
+
export class SessionBuilder {
|
|
802
|
+
cx;
|
|
803
|
+
request;
|
|
804
|
+
constructor(cx, request) {
|
|
805
|
+
this.cx = cx;
|
|
806
|
+
this.request = cloneNewSessionRequest(request);
|
|
807
|
+
}
|
|
808
|
+
/** @internal */
|
|
809
|
+
static create(cx, request) {
|
|
810
|
+
return new SessionBuilder(cx, request);
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Returns the `session/new` request that will be sent.
|
|
814
|
+
*
|
|
815
|
+
* The returned object is a defensive copy, so mutating it does not change the
|
|
816
|
+
* builder.
|
|
817
|
+
*/
|
|
818
|
+
toRequest() {
|
|
819
|
+
return cloneNewSessionRequest(this.request);
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Replaces the additional workspace roots for this session.
|
|
823
|
+
*
|
|
824
|
+
* `additionalDirectories` expand the session's file-system scope without
|
|
825
|
+
* changing `cwd`. Each path should be absolute.
|
|
826
|
+
*/
|
|
827
|
+
withAdditionalDirectories(additionalDirectories) {
|
|
828
|
+
this.request = {
|
|
829
|
+
...this.request,
|
|
830
|
+
additionalDirectories: [...additionalDirectories],
|
|
831
|
+
};
|
|
832
|
+
return this;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Adds one MCP server to the `session/new` request.
|
|
836
|
+
*/
|
|
837
|
+
withMcpServer(mcpServer) {
|
|
838
|
+
this.request = {
|
|
839
|
+
...this.request,
|
|
840
|
+
mcpServers: [
|
|
841
|
+
...(this.request.mcpServers ?? []),
|
|
842
|
+
structuredClone(mcpServer),
|
|
843
|
+
],
|
|
844
|
+
};
|
|
845
|
+
return this;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* Starts the session and returns an `ActiveSession` for prompting and reading
|
|
849
|
+
* updates.
|
|
850
|
+
*
|
|
851
|
+
* Call `dispose()` on the returned session when you no longer need update
|
|
852
|
+
* routing, or use `withSession(...)` to scope disposal automatically.
|
|
853
|
+
*/
|
|
854
|
+
async start(options) {
|
|
855
|
+
return this.cx[startActiveSession](this.toRequest(), options);
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Starts the session, runs `op`, and disposes the active-session update
|
|
859
|
+
* routing when `op` finishes or throws.
|
|
860
|
+
*/
|
|
861
|
+
async withSession(op) {
|
|
862
|
+
const session = await this.start();
|
|
863
|
+
try {
|
|
864
|
+
return await op(session);
|
|
865
|
+
}
|
|
866
|
+
finally {
|
|
867
|
+
session.dispose();
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Experimental draft ACP v2 convenience wrapper for an active session.
|
|
873
|
+
*
|
|
874
|
+
* An active session routes `session/update` notifications for one session ID
|
|
875
|
+
* into an async queue. Use `prompt(...)` to send user content, then read updates
|
|
876
|
+
* with `nextUpdate()` until a `stop` message is returned.
|
|
877
|
+
*
|
|
878
|
+
* @experimental
|
|
879
|
+
*/
|
|
880
|
+
export class ActiveSession {
|
|
881
|
+
cx;
|
|
882
|
+
sessionResponse;
|
|
883
|
+
updates;
|
|
884
|
+
registrations;
|
|
885
|
+
latestPrompt;
|
|
886
|
+
constructor(cx, sessionResponse, updates, registrations) {
|
|
887
|
+
this.cx = cx;
|
|
888
|
+
this.sessionResponse = sessionResponse;
|
|
889
|
+
this.updates = updates;
|
|
890
|
+
this.registrations = registrations;
|
|
891
|
+
}
|
|
892
|
+
/** @internal */
|
|
893
|
+
static create(cx, sessionResponse, updates, registrations) {
|
|
894
|
+
return new ActiveSession(cx, sessionResponse, updates, registrations);
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Session ID returned by `session/new`.
|
|
898
|
+
*/
|
|
899
|
+
get sessionId() {
|
|
900
|
+
return this.sessionResponse.sessionId;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* Configuration options returned when the session was created, if provided.
|
|
904
|
+
*/
|
|
905
|
+
get configOptions() {
|
|
906
|
+
return this.sessionResponse.configOptions;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Metadata returned when the session was created.
|
|
910
|
+
*/
|
|
911
|
+
get meta() {
|
|
912
|
+
return this.sessionResponse._meta;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Full response returned by `session/new`.
|
|
916
|
+
*/
|
|
917
|
+
get newSessionResponse() {
|
|
918
|
+
return this.sessionResponse;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Sends a prompt to this session.
|
|
922
|
+
*
|
|
923
|
+
* Strings are converted to one text content block. A single content block is
|
|
924
|
+
* wrapped in an array. The returned promise resolves with the inserted user
|
|
925
|
+
* message's ID once the agent inserts it into the ACP conversation. Completion
|
|
926
|
+
* is reported separately by an idle `state_update`, which is queued as a
|
|
927
|
+
* `stop` message for `nextUpdate()`.
|
|
928
|
+
*/
|
|
929
|
+
prompt(prompt, options) {
|
|
930
|
+
this.updates.clearErrors();
|
|
931
|
+
const activePrompt = this.updates.beginPrompt();
|
|
932
|
+
this.latestPrompt = activePrompt;
|
|
933
|
+
const response = this.cx.request(schema.AGENT_METHODS.session_prompt, {
|
|
934
|
+
sessionId: this.sessionId,
|
|
935
|
+
prompt: this.promptBlocks(prompt),
|
|
936
|
+
}, options);
|
|
937
|
+
void response.catch((error) => {
|
|
938
|
+
if (this.updates.cancelPrompt(activePrompt)) {
|
|
939
|
+
this.updates.reject(error);
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
return response;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Reads the next update or stop message for this session.
|
|
946
|
+
*/
|
|
947
|
+
nextUpdate() {
|
|
948
|
+
return this.updates.next();
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Reads agent text until the current prompt turn stops.
|
|
952
|
+
*
|
|
953
|
+
* Updates queued before the most recent call to `prompt(...)` are skipped.
|
|
954
|
+
* Call prompts serially, after the preceding turn reports `stop`: session
|
|
955
|
+
* updates do not carry a prompt ID and cannot be attributed across overlapping
|
|
956
|
+
* prompt requests. Use `nextUpdate()` when coordinating requests directly.
|
|
957
|
+
*
|
|
958
|
+
* Full `agent_message` updates replace content for their `messageId`, while
|
|
959
|
+
* `agent_message_chunk` updates append to it. Non-text content and other
|
|
960
|
+
* update types are ignored; use `nextUpdate()` when you need them.
|
|
961
|
+
*/
|
|
962
|
+
async readText() {
|
|
963
|
+
const activePrompt = this.latestPrompt;
|
|
964
|
+
const updateCursor = activePrompt?.updateCursor;
|
|
965
|
+
const messageOrder = [];
|
|
966
|
+
const messageContent = new Map();
|
|
967
|
+
const ensureMessage = (messageId) => {
|
|
968
|
+
let content = messageContent.get(messageId);
|
|
969
|
+
if (!content) {
|
|
970
|
+
content = [];
|
|
971
|
+
messageOrder.push(messageId);
|
|
972
|
+
messageContent.set(messageId, content);
|
|
973
|
+
}
|
|
974
|
+
return content;
|
|
975
|
+
};
|
|
976
|
+
for (;;) {
|
|
977
|
+
const message = updateCursor === undefined
|
|
978
|
+
? await this.nextUpdate()
|
|
979
|
+
: await this.updates.nextAfter(updateCursor, activePrompt?.overlapController.signal);
|
|
980
|
+
if (message.kind === "stop") {
|
|
981
|
+
return messageOrder
|
|
982
|
+
.flatMap((messageId) => messageContent.get(messageId) ?? [])
|
|
983
|
+
.filter(guards.ContentBlock.isText)
|
|
984
|
+
.map((content) => content.text)
|
|
985
|
+
.join("");
|
|
986
|
+
}
|
|
987
|
+
const { update } = message;
|
|
988
|
+
if (guards.SessionUpdate.isAgentMessage(update)) {
|
|
989
|
+
ensureMessage(update.messageId);
|
|
990
|
+
if (update.content !== undefined) {
|
|
991
|
+
messageContent.set(update.messageId, update.content ?? []);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
else if (guards.SessionUpdate.isAgentMessageChunk(update)) {
|
|
995
|
+
ensureMessage(update.messageId).push(update.content);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* Stops routing updates to this active-session helper.
|
|
1001
|
+
*
|
|
1002
|
+
* This does not close the ACP session on the agent. Use `ClientContext`
|
|
1003
|
+
* session lifecycle methods when the protocol session itself should be closed
|
|
1004
|
+
* or deleted.
|
|
1005
|
+
*/
|
|
1006
|
+
dispose() {
|
|
1007
|
+
for (const registration of this.registrations.splice(0)) {
|
|
1008
|
+
registration.dispose();
|
|
1009
|
+
}
|
|
1010
|
+
this.updates.fail(new Error("Active session disposed"));
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Supports explicit resource management with `using`.
|
|
1014
|
+
*/
|
|
1015
|
+
[Symbol.dispose]() {
|
|
1016
|
+
this.dispose();
|
|
1017
|
+
}
|
|
1018
|
+
promptBlocks(prompt) {
|
|
1019
|
+
if (typeof prompt === "string") {
|
|
1020
|
+
return [{ type: "text", text: prompt }];
|
|
1021
|
+
}
|
|
1022
|
+
if (Array.isArray(prompt)) {
|
|
1023
|
+
return prompt;
|
|
1024
|
+
}
|
|
1025
|
+
return [prompt];
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
function parseParams(parser, params) {
|
|
1029
|
+
if (!parser) {
|
|
1030
|
+
return params;
|
|
1031
|
+
}
|
|
1032
|
+
if (typeof parser === "function") {
|
|
1033
|
+
return parser(params);
|
|
1034
|
+
}
|
|
1035
|
+
return parser.parse(params);
|
|
1036
|
+
}
|
|
1037
|
+
function requestSpec(method, params, response, serializeResponse) {
|
|
1038
|
+
return { method, params, response, serializeResponse };
|
|
1039
|
+
}
|
|
1040
|
+
function notificationSpec(method, params) {
|
|
1041
|
+
return { method, params };
|
|
1042
|
+
}
|
|
1043
|
+
function registerAppRequest(builder, spec, context, handler, lifecycle) {
|
|
1044
|
+
builder.onReceiveRequest(spec.method, (params) => parseParams(spec.params, params), async (params, responder, cx) => {
|
|
1045
|
+
try {
|
|
1046
|
+
const response = await handler(context(params, cx, responder.signal, responder.id));
|
|
1047
|
+
const sentResponse = spec.serializeResponse
|
|
1048
|
+
? spec.serializeResponse(response)
|
|
1049
|
+
: response;
|
|
1050
|
+
await responder.respond(sentResponse);
|
|
1051
|
+
lifecycle?.afterResponse(params, sentResponse, cx);
|
|
1052
|
+
}
|
|
1053
|
+
catch (error) {
|
|
1054
|
+
lifecycle?.onError(cx, error);
|
|
1055
|
+
throw error;
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
function registerAppNotification(builder, spec, context, handler) {
|
|
1060
|
+
builder.onReceiveNotification(spec.method, (params) => parseParams(spec.params, params), (params, cx) => handler(context(params, cx, cx.signal)));
|
|
1061
|
+
}
|
|
1062
|
+
function specsByMethod(specs) {
|
|
1063
|
+
const byMethod = Object.create(null);
|
|
1064
|
+
for (const spec of Object.values(specs)) {
|
|
1065
|
+
byMethod[spec.method] = spec;
|
|
1066
|
+
}
|
|
1067
|
+
return byMethod;
|
|
1068
|
+
}
|
|
1069
|
+
const agentRequestSpecs = {
|
|
1070
|
+
initialize: requestSpec(schema.AGENT_METHODS.initialize, parseV2InitializeRequest, mapV2InitializeResponse, mapV2InitializeResponse),
|
|
1071
|
+
loginAuth: requestSpec(schema.AGENT_METHODS.auth_login, validate.zLoginAuthRequest, validate.zLoginAuthResponse, emptyObjectResponse),
|
|
1072
|
+
unstable_listProviders: requestSpec(schema.AGENT_METHODS.providers_list, validate.zListProvidersRequest, validate.zListProvidersResponse),
|
|
1073
|
+
unstable_setProvider: requestSpec(schema.AGENT_METHODS.providers_set, validate.zSetProviderRequest, validate.zSetProviderResponse, emptyObjectResponse),
|
|
1074
|
+
unstable_disableProvider: requestSpec(schema.AGENT_METHODS.providers_disable, validate.zDisableProviderRequest, validate.zDisableProviderResponse, emptyObjectResponse),
|
|
1075
|
+
newSession: requestSpec(schema.AGENT_METHODS.session_new, validate.zNewSessionRequest, validate.zNewSessionResponse),
|
|
1076
|
+
setSessionConfigOption: requestSpec(schema.AGENT_METHODS.session_set_config_option, validate.zSetSessionConfigOptionRequest, validate.zSetSessionConfigOptionResponse),
|
|
1077
|
+
prompt: requestSpec(schema.AGENT_METHODS.session_prompt, validate.zPromptRequest, validate.zPromptResponse),
|
|
1078
|
+
unstable_messageMcp: requestSpec(schema.AGENT_METHODS.mcp_message, validate.zMessageMcpRequest, validate.zMessageMcpResponse),
|
|
1079
|
+
listSessions: requestSpec(schema.AGENT_METHODS.session_list, validate.zListSessionsRequest, validate.zListSessionsResponse),
|
|
1080
|
+
deleteSession: requestSpec(schema.AGENT_METHODS.session_delete, validate.zDeleteSessionRequest, validate.zDeleteSessionResponse, emptyObjectResponse),
|
|
1081
|
+
unstable_forkSession: requestSpec(schema.AGENT_METHODS.session_fork, validate.zForkSessionRequest, validate.zForkSessionResponse),
|
|
1082
|
+
resumeSession: requestSpec(schema.AGENT_METHODS.session_resume, validate.zResumeSessionRequest, validate.zResumeSessionResponse),
|
|
1083
|
+
closeSession: requestSpec(schema.AGENT_METHODS.session_close, validate.zCloseSessionRequest, validate.zCloseSessionResponse, emptyObjectResponse),
|
|
1084
|
+
logoutAuth: requestSpec(schema.AGENT_METHODS.auth_logout, validate.zLogoutAuthRequest, validate.zLogoutAuthResponse, emptyObjectResponse),
|
|
1085
|
+
unstable_startNes: requestSpec(schema.AGENT_METHODS.nes_start, validate.zStartNesRequest, validate.zStartNesResponse),
|
|
1086
|
+
unstable_suggestNes: requestSpec(schema.AGENT_METHODS.nes_suggest, validate.zSuggestNesRequest, validate.zSuggestNesResponse),
|
|
1087
|
+
unstable_closeNes: requestSpec(schema.AGENT_METHODS.nes_close, validate.zCloseNesRequest, validate.zCloseNesResponse, emptyObjectResponse),
|
|
1088
|
+
};
|
|
1089
|
+
const agentNotificationSpecs = {
|
|
1090
|
+
cancelSession: notificationSpec(schema.AGENT_METHODS.session_cancel, validate.zCancelSessionNotification),
|
|
1091
|
+
unstable_messageMcp: notificationSpec(schema.AGENT_METHODS.mcp_message, validate.zMessageMcpNotification),
|
|
1092
|
+
unstable_didOpenDocument: notificationSpec(schema.AGENT_METHODS.document_did_open, validate.zDidOpenDocumentNotification),
|
|
1093
|
+
unstable_didChangeDocument: notificationSpec(schema.AGENT_METHODS.document_did_change, validate.zDidChangeDocumentNotification),
|
|
1094
|
+
unstable_didCloseDocument: notificationSpec(schema.AGENT_METHODS.document_did_close, validate.zDidCloseDocumentNotification),
|
|
1095
|
+
unstable_didSaveDocument: notificationSpec(schema.AGENT_METHODS.document_did_save, validate.zDidSaveDocumentNotification),
|
|
1096
|
+
unstable_didFocusDocument: notificationSpec(schema.AGENT_METHODS.document_did_focus, validate.zDidFocusDocumentNotification),
|
|
1097
|
+
unstable_acceptNes: notificationSpec(schema.AGENT_METHODS.nes_accept, validate.zAcceptNesNotification),
|
|
1098
|
+
unstable_rejectNes: notificationSpec(schema.AGENT_METHODS.nes_reject, validate.zRejectNesNotification),
|
|
1099
|
+
};
|
|
1100
|
+
const clientRequestSpecs = {
|
|
1101
|
+
requestPermission: requestSpec(schema.CLIENT_METHODS.session_request_permission, validate.zRequestPermissionRequest, validate.zRequestPermissionResponse),
|
|
1102
|
+
unstable_connectMcp: requestSpec(schema.CLIENT_METHODS.mcp_connect, validate.zConnectMcpRequest, validate.zConnectMcpResponse),
|
|
1103
|
+
unstable_messageMcp: requestSpec(schema.CLIENT_METHODS.mcp_message, validate.zMessageMcpRequest, validate.zMessageMcpResponse),
|
|
1104
|
+
unstable_disconnectMcp: requestSpec(schema.CLIENT_METHODS.mcp_disconnect, validate.zDisconnectMcpRequest, validate.zDisconnectMcpResponse, emptyObjectResponse),
|
|
1105
|
+
createElicitation: requestSpec(schema.CLIENT_METHODS.elicitation_create, validate.zCreateElicitationRequest, validate.zCreateElicitationResponse),
|
|
1106
|
+
};
|
|
1107
|
+
const clientNotificationSpecs = {
|
|
1108
|
+
sessionUpdate: notificationSpec(schema.CLIENT_METHODS.session_update, validate.zUpdateSessionNotification),
|
|
1109
|
+
unstable_messageMcp: notificationSpec(schema.CLIENT_METHODS.mcp_message, validate.zMessageMcpNotification),
|
|
1110
|
+
completeElicitation: notificationSpec(schema.CLIENT_METHODS.elicitation_complete, validate.zCompleteElicitationNotification),
|
|
1111
|
+
};
|
|
1112
|
+
const agentRequestSpecsByMethod = specsByMethod(agentRequestSpecs);
|
|
1113
|
+
const agentNotificationSpecsByMethod = specsByMethod(agentNotificationSpecs);
|
|
1114
|
+
const clientRequestSpecsByMethod = specsByMethod(clientRequestSpecs);
|
|
1115
|
+
const clientNotificationSpecsByMethod = specsByMethod(clientNotificationSpecs);
|
|
1116
|
+
function agentRequestContext(params, client, signal, requestId) {
|
|
1117
|
+
return {
|
|
1118
|
+
params,
|
|
1119
|
+
requestId,
|
|
1120
|
+
signal,
|
|
1121
|
+
client,
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
function agentNotificationContext(params, client, signal) {
|
|
1125
|
+
return {
|
|
1126
|
+
params,
|
|
1127
|
+
signal,
|
|
1128
|
+
client,
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
function clientRequestContext(params, agent, signal, requestId) {
|
|
1132
|
+
return {
|
|
1133
|
+
params,
|
|
1134
|
+
requestId,
|
|
1135
|
+
signal,
|
|
1136
|
+
agent,
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
function clientNotificationContext(params, agent, signal) {
|
|
1140
|
+
return {
|
|
1141
|
+
params,
|
|
1142
|
+
signal,
|
|
1143
|
+
agent,
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
class SessionUpdateRouter {
|
|
1147
|
+
activeSessions = new Map();
|
|
1148
|
+
handleMessage(message) {
|
|
1149
|
+
if (message.kind !== "notification" ||
|
|
1150
|
+
message.method !== schema.CLIENT_METHODS.session_update) {
|
|
1151
|
+
return Handled.no(message);
|
|
1152
|
+
}
|
|
1153
|
+
const notification = validate.zUpdateSessionNotification.parse(message.params);
|
|
1154
|
+
const { update } = notification;
|
|
1155
|
+
const isIdle = guards.SessionUpdate.isStateUpdate(update) &&
|
|
1156
|
+
guards.StateUpdate.isIdle(update);
|
|
1157
|
+
const activeSessions = this.activeSessions.get(notification.sessionId);
|
|
1158
|
+
if (activeSessions && activeSessions.size > 0) {
|
|
1159
|
+
for (const session of activeSessions) {
|
|
1160
|
+
if (isIdle && session.isAwaitingPromptCompletion()) {
|
|
1161
|
+
session.completePrompt();
|
|
1162
|
+
session.enqueue({
|
|
1163
|
+
kind: "stop",
|
|
1164
|
+
notification,
|
|
1165
|
+
update,
|
|
1166
|
+
stopReason: update.stopReason,
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
else {
|
|
1170
|
+
session.enqueue({
|
|
1171
|
+
kind: "session_update",
|
|
1172
|
+
notification,
|
|
1173
|
+
update,
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
return Handled.no(message);
|
|
1179
|
+
}
|
|
1180
|
+
attach(response, updates) {
|
|
1181
|
+
const sessions = this.activeSessions.get(response.sessionId) ??
|
|
1182
|
+
new Set();
|
|
1183
|
+
sessions.add(updates);
|
|
1184
|
+
this.activeSessions.set(response.sessionId, sessions);
|
|
1185
|
+
return new HandlerRegistration(() => {
|
|
1186
|
+
sessions.delete(updates);
|
|
1187
|
+
if (sessions.size === 0) {
|
|
1188
|
+
this.activeSessions.delete(response.sessionId);
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
const sessionUpdateRouters = new WeakMap();
|
|
1194
|
+
function sessionUpdateRouter(cx) {
|
|
1195
|
+
let router = sessionUpdateRouters.get(cx);
|
|
1196
|
+
if (!router) {
|
|
1197
|
+
router = new SessionUpdateRouter();
|
|
1198
|
+
sessionUpdateRouters.set(cx, router);
|
|
1199
|
+
}
|
|
1200
|
+
return router;
|
|
1201
|
+
}
|
|
1202
|
+
function runConnectHandlers(connection, handlers) {
|
|
1203
|
+
for (const handler of handlers) {
|
|
1204
|
+
let result;
|
|
1205
|
+
try {
|
|
1206
|
+
result = handler(connection);
|
|
1207
|
+
}
|
|
1208
|
+
catch (error) {
|
|
1209
|
+
connection.close(error);
|
|
1210
|
+
throw error;
|
|
1211
|
+
}
|
|
1212
|
+
void Promise.resolve(result).catch((error) => {
|
|
1213
|
+
connection.close(error);
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
const appBuilder = Symbol("appBuilder");
|
|
1218
|
+
const runAgentConnectHandlers = Symbol("runAgentConnectHandlers");
|
|
1219
|
+
const runClientConnectHandlers = Symbol("runClientConnectHandlers");
|
|
1220
|
+
function bridgeConnectionClose(source, peer) {
|
|
1221
|
+
void source.closed.then(async () => {
|
|
1222
|
+
if (initializationState(source.getContext()).status === "initialized") {
|
|
1223
|
+
await peer.initialized.catch(() => { });
|
|
1224
|
+
}
|
|
1225
|
+
peer.close(source.signal.reason);
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Creates an agent-side app for the experimental draft ACP v2 API.
|
|
1230
|
+
*
|
|
1231
|
+
* Register request and notification handlers by ACP method name, then call
|
|
1232
|
+
* `connect(stream)` to serve an ACP client.
|
|
1233
|
+
*
|
|
1234
|
+
* @experimental
|
|
1235
|
+
*/
|
|
1236
|
+
export function agent(options) {
|
|
1237
|
+
return new AgentApp(options);
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Agent-side app builder for the experimental draft ACP v2 API.
|
|
1241
|
+
*
|
|
1242
|
+
* Methods on this class register typed request or notification handlers and
|
|
1243
|
+
* return `this`, so apps can be built with a fluent chain. Handler params are
|
|
1244
|
+
* parsed with the generated ACP schemas before your handler runs, and thrown
|
|
1245
|
+
* errors are converted to JSON-RPC errors by the connection layer.
|
|
1246
|
+
*
|
|
1247
|
+
* @experimental
|
|
1248
|
+
*/
|
|
1249
|
+
export class AgentApp {
|
|
1250
|
+
builder = Connection.builder();
|
|
1251
|
+
connectHandlers = [];
|
|
1252
|
+
hasInitializeHandler = false;
|
|
1253
|
+
constructor(options = {}) {
|
|
1254
|
+
this.builder.withHandler(agentInitializationGuard());
|
|
1255
|
+
if (options.name) {
|
|
1256
|
+
this.builder.name(options.name);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
/** @internal */
|
|
1260
|
+
[appBuilder]() {
|
|
1261
|
+
this.assertInitializeHandler();
|
|
1262
|
+
return this.builder;
|
|
1263
|
+
}
|
|
1264
|
+
/** @internal */
|
|
1265
|
+
[runAgentConnectHandlers](connection) {
|
|
1266
|
+
runConnectHandlers(connection, this.connectHandlers);
|
|
1267
|
+
}
|
|
1268
|
+
connect(target, options = {}) {
|
|
1269
|
+
return this.connectConnection(target, options).connection;
|
|
1270
|
+
}
|
|
1271
|
+
connectWith(target, op) {
|
|
1272
|
+
const { rawConnection, connection } = this.connectConnection(target);
|
|
1273
|
+
return rawConnection.runUntil(() => op(connection.client));
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Registers a handler that runs when this agent app opens a connection.
|
|
1277
|
+
*
|
|
1278
|
+
* Use this for connection-scoped work that needs to call client-side ACP
|
|
1279
|
+
* methods outside an inbound request handler.
|
|
1280
|
+
*/
|
|
1281
|
+
onConnect(handler) {
|
|
1282
|
+
this.connectHandlers.push(handler);
|
|
1283
|
+
return this;
|
|
1284
|
+
}
|
|
1285
|
+
onRequest(method, handlerOrParams, handler) {
|
|
1286
|
+
if (handler) {
|
|
1287
|
+
assertUnrecognizedV2Method(method, "request");
|
|
1288
|
+
return this.request({ method, params: handlerOrParams }, handler);
|
|
1289
|
+
}
|
|
1290
|
+
const spec = agentRequestSpecsByMethod[method];
|
|
1291
|
+
if (!spec) {
|
|
1292
|
+
throw new Error(`Unknown ACP request method '${method}'. Pass a params parser for custom methods.`);
|
|
1293
|
+
}
|
|
1294
|
+
if (method === schema.AGENT_METHODS.initialize) {
|
|
1295
|
+
this.hasInitializeHandler = true;
|
|
1296
|
+
}
|
|
1297
|
+
return this.request(spec, handlerOrParams);
|
|
1298
|
+
}
|
|
1299
|
+
onNotification(method, handlerOrParams, handler) {
|
|
1300
|
+
if (handler) {
|
|
1301
|
+
assertUnrecognizedV2Method(method, "notification");
|
|
1302
|
+
return this.notification({ method, params: handlerOrParams }, handler);
|
|
1303
|
+
}
|
|
1304
|
+
const spec = agentNotificationSpecsByMethod[method];
|
|
1305
|
+
if (!spec) {
|
|
1306
|
+
throw new Error(`Unknown ACP notification method '${method}'. Pass a params parser for custom methods.`);
|
|
1307
|
+
}
|
|
1308
|
+
return this.notification(spec, handlerOrParams);
|
|
1309
|
+
}
|
|
1310
|
+
request(spec, handler) {
|
|
1311
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId) => agentRequestContext(params, AgentContext.create(cx, requestId), signal, requestId), handler, spec.method === schema.AGENT_METHODS.initialize
|
|
1312
|
+
? {
|
|
1313
|
+
afterResponse: (_params, response, cx) => {
|
|
1314
|
+
initializationState(cx).complete(response);
|
|
1315
|
+
},
|
|
1316
|
+
onError: (cx, error) => initializationState(cx).fail(error),
|
|
1317
|
+
}
|
|
1318
|
+
: undefined);
|
|
1319
|
+
return this;
|
|
1320
|
+
}
|
|
1321
|
+
notification(spec, handler) {
|
|
1322
|
+
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
1323
|
+
return this;
|
|
1324
|
+
}
|
|
1325
|
+
connectConnection(target, options = {}) {
|
|
1326
|
+
this.assertInitializeHandler();
|
|
1327
|
+
if (isStream(target)) {
|
|
1328
|
+
const state = this.openStreamConnection(target);
|
|
1329
|
+
if (!options.deferConnectHandlers) {
|
|
1330
|
+
this[runAgentConnectHandlers](state.connection);
|
|
1331
|
+
}
|
|
1332
|
+
return state;
|
|
1333
|
+
}
|
|
1334
|
+
const [thisStream, peerStream] = memoryStreamPair();
|
|
1335
|
+
const peerRawConnection = target[appBuilder]().connect(peerStream);
|
|
1336
|
+
const peerConnection = clientConnection(peerRawConnection);
|
|
1337
|
+
const state = this.openStreamConnection(thisStream);
|
|
1338
|
+
bridgeConnectionClose(state.rawConnection, peerConnection);
|
|
1339
|
+
bridgeConnectionClose(peerRawConnection, state.connection);
|
|
1340
|
+
try {
|
|
1341
|
+
target[runClientConnectHandlers](peerConnection);
|
|
1342
|
+
this[runAgentConnectHandlers](state.connection);
|
|
1343
|
+
}
|
|
1344
|
+
catch (error) {
|
|
1345
|
+
peerConnection.close(error);
|
|
1346
|
+
state.connection.close(error);
|
|
1347
|
+
throw error;
|
|
1348
|
+
}
|
|
1349
|
+
return state;
|
|
1350
|
+
}
|
|
1351
|
+
openStreamConnection(stream) {
|
|
1352
|
+
const rawConnection = this.builder.connect(stream);
|
|
1353
|
+
return {
|
|
1354
|
+
rawConnection,
|
|
1355
|
+
connection: agentConnection(rawConnection, this.connectHandlers),
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
assertInitializeHandler() {
|
|
1359
|
+
if (!this.hasInitializeHandler) {
|
|
1360
|
+
throw new Error("AgentApp requires an initialize request handler before connecting");
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* Creates a client-side app for the experimental draft ACP v2 API.
|
|
1366
|
+
*
|
|
1367
|
+
* Register request and notification handlers by ACP method name, then use
|
|
1368
|
+
* `connectWith(...)` to run the workflow that calls agent-side methods.
|
|
1369
|
+
*
|
|
1370
|
+
* @experimental
|
|
1371
|
+
*/
|
|
1372
|
+
export function client(options) {
|
|
1373
|
+
return new ClientApp(options);
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Client-side app builder for the experimental draft ACP v2 API.
|
|
1377
|
+
*
|
|
1378
|
+
* Methods on this class register typed client handlers and return `this`, so
|
|
1379
|
+
* apps can be built with a fluent chain. `connectWith(...)` is the usual entry
|
|
1380
|
+
* point for clients because it provides a `ClientContext` for calling
|
|
1381
|
+
* agent-side requests and session helpers.
|
|
1382
|
+
*
|
|
1383
|
+
* @experimental
|
|
1384
|
+
*/
|
|
1385
|
+
export class ClientApp {
|
|
1386
|
+
builder = Connection.builder();
|
|
1387
|
+
connectHandlers = [];
|
|
1388
|
+
constructor(options = {}) {
|
|
1389
|
+
if (options.name) {
|
|
1390
|
+
this.builder.name(options.name);
|
|
1391
|
+
}
|
|
1392
|
+
this.builder.withHandler(clientInitializationGuard());
|
|
1393
|
+
this.builder.withHandler({
|
|
1394
|
+
handleMessage: (message, cx) => sessionUpdateRouter(cx).handleMessage(message),
|
|
1395
|
+
describe: () => "client-session-update-router",
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
/** @internal */
|
|
1399
|
+
[appBuilder]() {
|
|
1400
|
+
return this.builder;
|
|
1401
|
+
}
|
|
1402
|
+
/** @internal */
|
|
1403
|
+
[runClientConnectHandlers](connection) {
|
|
1404
|
+
runConnectHandlers(connection, this.connectHandlers);
|
|
1405
|
+
}
|
|
1406
|
+
connect(target) {
|
|
1407
|
+
return this.connectConnection(target).connection;
|
|
1408
|
+
}
|
|
1409
|
+
connectWith(target, op) {
|
|
1410
|
+
const { rawConnection, connection } = this.connectConnection(target);
|
|
1411
|
+
return rawConnection.runUntil(() => op(connection.agent));
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* Registers a handler that runs when this client app opens a connection.
|
|
1415
|
+
*
|
|
1416
|
+
* Use this for connection-scoped work that needs to call agent-side ACP
|
|
1417
|
+
* methods outside an inbound request handler.
|
|
1418
|
+
*/
|
|
1419
|
+
onConnect(handler) {
|
|
1420
|
+
this.connectHandlers.push(handler);
|
|
1421
|
+
return this;
|
|
1422
|
+
}
|
|
1423
|
+
onRequest(method, handlerOrParams, handler) {
|
|
1424
|
+
if (handler) {
|
|
1425
|
+
assertUnrecognizedV2Method(method, "request");
|
|
1426
|
+
return this.request({ method, params: handlerOrParams }, handler);
|
|
1427
|
+
}
|
|
1428
|
+
const spec = clientRequestSpecsByMethod[method];
|
|
1429
|
+
if (!spec) {
|
|
1430
|
+
throw new Error(`Unknown ACP request method '${method}'. Pass a params parser for custom methods.`);
|
|
1431
|
+
}
|
|
1432
|
+
return this.request(spec, handlerOrParams);
|
|
1433
|
+
}
|
|
1434
|
+
onNotification(method, handlerOrParams, handler) {
|
|
1435
|
+
if (handler) {
|
|
1436
|
+
assertUnrecognizedV2Method(method, "notification");
|
|
1437
|
+
return this.notification({ method, params: handlerOrParams }, handler);
|
|
1438
|
+
}
|
|
1439
|
+
const spec = clientNotificationSpecsByMethod[method];
|
|
1440
|
+
if (!spec) {
|
|
1441
|
+
throw new Error(`Unknown ACP notification method '${method}'. Pass a params parser for custom methods.`);
|
|
1442
|
+
}
|
|
1443
|
+
return this.notification(spec, handlerOrParams);
|
|
1444
|
+
}
|
|
1445
|
+
request(spec, handler) {
|
|
1446
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId) => clientRequestContext(params, ClientContext.create(cx, requestId), signal, requestId), handler);
|
|
1447
|
+
return this;
|
|
1448
|
+
}
|
|
1449
|
+
notification(spec, handler) {
|
|
1450
|
+
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
1451
|
+
return this;
|
|
1452
|
+
}
|
|
1453
|
+
connectConnection(target) {
|
|
1454
|
+
if (isStream(target)) {
|
|
1455
|
+
const state = this.openStreamConnection(target);
|
|
1456
|
+
this[runClientConnectHandlers](state.connection);
|
|
1457
|
+
return state;
|
|
1458
|
+
}
|
|
1459
|
+
const [thisStream, peerStream] = memoryStreamPair();
|
|
1460
|
+
const peerRawConnection = target[appBuilder]().connect(peerStream);
|
|
1461
|
+
const peerConnection = agentConnection(peerRawConnection);
|
|
1462
|
+
const state = this.openStreamConnection(thisStream);
|
|
1463
|
+
bridgeConnectionClose(state.rawConnection, peerConnection);
|
|
1464
|
+
bridgeConnectionClose(peerRawConnection, state.connection);
|
|
1465
|
+
try {
|
|
1466
|
+
target[runAgentConnectHandlers](peerConnection);
|
|
1467
|
+
this[runClientConnectHandlers](state.connection);
|
|
1468
|
+
}
|
|
1469
|
+
catch (error) {
|
|
1470
|
+
peerConnection.close(error);
|
|
1471
|
+
state.connection.close(error);
|
|
1472
|
+
throw error;
|
|
1473
|
+
}
|
|
1474
|
+
return state;
|
|
1475
|
+
}
|
|
1476
|
+
openStreamConnection(stream) {
|
|
1477
|
+
const rawConnection = this.builder.connect(stream);
|
|
1478
|
+
return {
|
|
1479
|
+
rawConnection,
|
|
1480
|
+
connection: clientConnection(rawConnection, this.connectHandlers),
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
//# sourceMappingURL=acp.js.map
|