@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,1337 @@
|
|
|
1
|
+
import { execFile as execFileCallback } from "node:child_process";
|
|
2
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
+
import { constants as fsConstants, createReadStream, promises as fs, } from "node:fs";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { promisify } from "node:util";
|
|
7
|
+
import { buildRemoteGitDeltaBundleScript, isMissingGitPrerequisiteError, createImportedGitRef, createRemoteGitExportRef, deleteLocalGitRef, fetchGitBundleIntoLocalRef, GIT_ARCHIVE_EXCLUDES, integrateImportedGitHead, readGitWorkspaceSnapshot, ReferencedSourceIgnoreScanLimitExceededError, readReferencedSourceGitIgnoredPaths, resetLocalGitIndexToHead, withShallowGitWorkspaceClone, WORKSPACE_GIT_SCAN_SATURATED_CODE, } from "./git-workspace-sync.js";
|
|
8
|
+
import { captureDirectorySnapshot, mergeDirectoryWithBaseline, } from "./workspace-restore-merge.js";
|
|
9
|
+
import { createRuntimeProgressReporter, } from "./runtime-progress.js";
|
|
10
|
+
import { isRelativePathOrDescendant, shouldExcludePath } from "./exclude-patterns.js";
|
|
11
|
+
import { scheduleSyncOperations, SYNC_OPERATION_CONCURRENCY_LIMIT, } from "./sync-operation-schedule.js";
|
|
12
|
+
const execFile = promisify(execFileCallback);
|
|
13
|
+
const SANDBOX_WORKSPACE_HEAVY_DIR_NAMES = [
|
|
14
|
+
"node_modules",
|
|
15
|
+
"vendor",
|
|
16
|
+
"dist",
|
|
17
|
+
"build",
|
|
18
|
+
"out",
|
|
19
|
+
"coverage",
|
|
20
|
+
".next",
|
|
21
|
+
".turbo",
|
|
22
|
+
".cache",
|
|
23
|
+
];
|
|
24
|
+
const SANDBOX_WORKSPACE_HEAVY_DIR_EXCLUDES = SANDBOX_WORKSPACE_HEAVY_DIR_NAMES.flatMap((entry) => [
|
|
25
|
+
entry,
|
|
26
|
+
`${entry}/*`,
|
|
27
|
+
`*/${entry}`,
|
|
28
|
+
`*/${entry}/*`,
|
|
29
|
+
]);
|
|
30
|
+
/**
|
|
31
|
+
* The fixed, allowlisted failure categories a `failed`
|
|
32
|
+
* {@link ReferencedSourceIgnoreResolution} reports as `reason`. This is the
|
|
33
|
+
* ENTIRE vocabulary: no absolute host path, no basename, no opaque token, and
|
|
34
|
+
* no raw Git or tar stderr ever reaches `reason` — only one of these three
|
|
35
|
+
* stable strings, chosen once at the single construction point in
|
|
36
|
+
* `resolveReferencedSourceIgnore`. A `failed` resolution always prevents
|
|
37
|
+
* staging and is always re-resolved before its next use, so two different
|
|
38
|
+
* underlying failures colliding on the same category (e.g. a timeout and a
|
|
39
|
+
* malformed-output error both reporting `scanFailed`) never weakens the
|
|
40
|
+
* fail-closed decision.
|
|
41
|
+
*/
|
|
42
|
+
export const REFERENCED_SOURCE_IGNORE_FAILURE_REASONS = {
|
|
43
|
+
/** A Git read failed, timed out, was cancelled, or returned malformed output — including a saturated scan queue that never recovered after its retries. */
|
|
44
|
+
scanFailed: "git-ignore-scan-failed",
|
|
45
|
+
/** The parsed ignored-entry count or total UTF-8 byte size breached its bound (see `readReferencedSourceGitIgnoredPaths`). */
|
|
46
|
+
limitExceeded: "git-ignore-scan-limit-exceeded",
|
|
47
|
+
/** The referenced project's `localPath` is not a descendant of its own Git top level. */
|
|
48
|
+
toplevelNotDescendant: "git-toplevel-not-descendant",
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Escape tar `--exclude` glob metacharacters (`*`, `?`, `[`) in a literal
|
|
52
|
+
* path, so a Git-ignored path that happens to contain one of them is matched
|
|
53
|
+
* literally instead of as a pattern. Without this, a repository-controlled
|
|
54
|
+
* path containing e.g. `*` could exclude unrelated sibling files that
|
|
55
|
+
* happen to match the resulting glob. GNU tar and bsdtar both honor a
|
|
56
|
+
* backslash as a `fnmatch` escape character, so this is not command
|
|
57
|
+
* injection — `createTarballFromDirectory` and the SSH tar equivalent both
|
|
58
|
+
* pass `--exclude` values as argument-vector entries, never through a shell.
|
|
59
|
+
*/
|
|
60
|
+
export function escapeTarExcludeLiteral(entry) {
|
|
61
|
+
return entry.replace(/\\/g, "\\\\").replace(/([*?[])/g, "\\$1");
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The tar `--exclude` entries a referenced project's resolved ignore set
|
|
65
|
+
* contributes, on top of the fixed heavy-directory excludes every site
|
|
66
|
+
* already applies. Empty for `other` (today's fixed excludes are enough)
|
|
67
|
+
* and for `failed` (the project is not staged at all, so no exclude list
|
|
68
|
+
* matters).
|
|
69
|
+
*/
|
|
70
|
+
export function referencedSourceIgnoreExcludeEntries(resolution) {
|
|
71
|
+
return resolution.kind === "git" ? resolution.ignoredPaths.map(escapeTarExcludeLiteral) : [];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Compute the relative position of `localPath` under a Git `toplevel`
|
|
75
|
+
* directory, as a POSIX path with no leading or trailing slash. Returns `""`
|
|
76
|
+
* when `localPath` IS the toplevel. Returns `null` when the relation is not a
|
|
77
|
+
* plain descendant — `localPath` escapes upward from `toplevel`, resolves to
|
|
78
|
+
* an absolute/rooted result (a different filesystem root), or the two paths
|
|
79
|
+
* are otherwise not comparable. The caller treats `null` as a resolution
|
|
80
|
+
* failure (fail closed), never as "nothing to exclude".
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* Physical (symlink-resolved) form of a path, falling back to the plain
|
|
84
|
+
* resolved form when realpath fails (e.g. the path vanished mid-run — the
|
|
85
|
+
* downstream descendant check then fails closed on the string form).
|
|
86
|
+
* Git prints physical toplevels, so both sides of the descendant comparison
|
|
87
|
+
* must be physical too; comparing a logical path against a physical one makes
|
|
88
|
+
* any symlinked project or temp directory (macOS `/var` → `/private/var`)
|
|
89
|
+
* fail resolution spuriously.
|
|
90
|
+
*/
|
|
91
|
+
async function physicalPath(input) {
|
|
92
|
+
try {
|
|
93
|
+
return await fs.realpath(input);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return path.resolve(input);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function relativizeUnderGitToplevel(input) {
|
|
100
|
+
const toplevel = path.resolve(input.toplevel);
|
|
101
|
+
const localPath = path.resolve(input.localPath);
|
|
102
|
+
const relative = path.relative(toplevel, localPath);
|
|
103
|
+
if (relative === "")
|
|
104
|
+
return "";
|
|
105
|
+
if (path.isAbsolute(relative))
|
|
106
|
+
return null;
|
|
107
|
+
if (relative === ".." || relative.startsWith(`..${path.sep}`))
|
|
108
|
+
return null;
|
|
109
|
+
return relative.split(path.sep).join("/");
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Re-relativize root-relative ignored paths (as `readReferencedSourceGitIgnoredPaths`
|
|
113
|
+
* reports them, from the repository toplevel) to `offset`, the position of
|
|
114
|
+
* the referenced project's `localPath` under that toplevel. Keeps only the
|
|
115
|
+
* entries that are `offset` itself or a descendant of it — an ignored path
|
|
116
|
+
* elsewhere in the repository does not apply to this project's staged tree —
|
|
117
|
+
* and strips the `offset` prefix so the result matches the tar member
|
|
118
|
+
* namespace, which is `localPath`-relative.
|
|
119
|
+
*/
|
|
120
|
+
function reRelativizeIgnoredPathsToLocalPath(input) {
|
|
121
|
+
if (input.offset === "") {
|
|
122
|
+
return [...input.ignoredPaths];
|
|
123
|
+
}
|
|
124
|
+
const prefix = `${input.offset}/`;
|
|
125
|
+
return input.ignoredPaths
|
|
126
|
+
.filter((entry) => entry.startsWith(prefix))
|
|
127
|
+
.map((entry) => entry.slice(prefix.length))
|
|
128
|
+
.filter(Boolean);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Bounded backoff before each retry of a saturated Git scan: none before the
|
|
132
|
+
* first attempt, 1 second before the second, 2 seconds before the third. Three
|
|
133
|
+
* total attempts (the first plus these two retries) is a liveness parameter,
|
|
134
|
+
* not a security control — the retry only ever fires for the scheduler's
|
|
135
|
+
* typed saturation code (see {@link isWorkspaceGitScanSaturatedError}).
|
|
136
|
+
*/
|
|
137
|
+
const REFERENCED_SOURCE_IGNORE_SCAN_RETRY_DELAYS_MS = [1_000, 2_000];
|
|
138
|
+
async function delay(ms) {
|
|
139
|
+
await new Promise((resolve) => setTimeout(resolve, ms));
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* True only when `error` carries the workspace Git scan scheduler's typed
|
|
143
|
+
* saturation code on its `code` property. Matches the code alone, never
|
|
144
|
+
* message text — a message can change wording without changing meaning, and
|
|
145
|
+
* matching text would silently stop retrying (or start retrying the wrong
|
|
146
|
+
* failure) the moment it did.
|
|
147
|
+
*/
|
|
148
|
+
function isWorkspaceGitScanSaturatedError(error) {
|
|
149
|
+
return (typeof error === "object" &&
|
|
150
|
+
error !== null &&
|
|
151
|
+
"code" in error &&
|
|
152
|
+
error.code === WORKSPACE_GIT_SCAN_SATURATED_CODE);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Resolve a referenced project's Git-ignored paths ONCE, before any staging
|
|
156
|
+
* site runs. Called once per project (see `execute.ts`); the sandbox lane,
|
|
157
|
+
* the SSH lane, and the content-signature walk all consume this one result,
|
|
158
|
+
* so they can never apply a different exclusion set to the same project.
|
|
159
|
+
*
|
|
160
|
+
* Fails closed: a Git read error, a timeout, malformed output, a parse-bound
|
|
161
|
+
* breach, or a `localPath` that is not a plain descendant of its own Git
|
|
162
|
+
* toplevel all return `failed`, never an empty ignore list — an empty list
|
|
163
|
+
* means "resolved, nothing extra to exclude", which is a different claim than
|
|
164
|
+
* "the resolution did not run".
|
|
165
|
+
*
|
|
166
|
+
* Retries ONLY a saturated scan queue (the shared workspace Git operation
|
|
167
|
+
* scheduler rejecting before spawn because it is at capacity) — a liveness
|
|
168
|
+
* condition, not an integrity one. Three attempts total, with the bounded
|
|
169
|
+
* backoff in {@link REFERENCED_SOURCE_IGNORE_SCAN_RETRY_DELAYS_MS}, retried
|
|
170
|
+
* through the same registered scheduler every time. No direct-spawn fallback
|
|
171
|
+
* exists: bypassing the scheduler would defeat the process-wide concurrency
|
|
172
|
+
* limit it enforces. Every other failure — timeout, cancellation, an output
|
|
173
|
+
* limit, a permission error, malformed output, a real Git failure, or a bound
|
|
174
|
+
* breach — makes exactly one attempt and fails closed immediately.
|
|
175
|
+
*/
|
|
176
|
+
export async function resolveReferencedSourceIgnore(localPath) {
|
|
177
|
+
let scan = null;
|
|
178
|
+
let failureReason = null;
|
|
179
|
+
for (let attempt = 0; attempt <= REFERENCED_SOURCE_IGNORE_SCAN_RETRY_DELAYS_MS.length; attempt += 1) {
|
|
180
|
+
try {
|
|
181
|
+
scan = await readReferencedSourceGitIgnoredPaths(localPath);
|
|
182
|
+
failureReason = null;
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
failureReason = error instanceof ReferencedSourceIgnoreScanLimitExceededError
|
|
187
|
+
? REFERENCED_SOURCE_IGNORE_FAILURE_REASONS.limitExceeded
|
|
188
|
+
: REFERENCED_SOURCE_IGNORE_FAILURE_REASONS.scanFailed;
|
|
189
|
+
const isLastAttempt = attempt === REFERENCED_SOURCE_IGNORE_SCAN_RETRY_DELAYS_MS.length;
|
|
190
|
+
if (isLastAttempt || !isWorkspaceGitScanSaturatedError(error)) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
await delay(REFERENCED_SOURCE_IGNORE_SCAN_RETRY_DELAYS_MS[attempt]);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (failureReason !== null) {
|
|
197
|
+
return { kind: "failed", reason: failureReason };
|
|
198
|
+
}
|
|
199
|
+
if (!scan) {
|
|
200
|
+
return { kind: "other" };
|
|
201
|
+
}
|
|
202
|
+
const offset = relativizeUnderGitToplevel({
|
|
203
|
+
toplevel: await physicalPath(scan.toplevel),
|
|
204
|
+
localPath: await physicalPath(localPath),
|
|
205
|
+
});
|
|
206
|
+
if (offset === null) {
|
|
207
|
+
return { kind: "failed", reason: REFERENCED_SOURCE_IGNORE_FAILURE_REASONS.toplevelNotDescendant };
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
kind: "git",
|
|
211
|
+
ignoredPaths: reRelativizeIgnoredPathsToLocalPath({ ignoredPaths: scan.ignoredPaths, offset }),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Host-side complete-mediation guard for native sync operations. The orchestrator
|
|
216
|
+
* authors every `targetPath`, but the native transport crosses the host↔sandbox
|
|
217
|
+
* trust boundary, so we canonicalize and confine each mapping's source and target
|
|
218
|
+
* to an orchestrator-owned root before handing the operation to a provider.
|
|
219
|
+
* Absolute escapes and `..` traversal are rejected fail-closed. Sandbox and host
|
|
220
|
+
* paths on the server are POSIX.
|
|
221
|
+
*/
|
|
222
|
+
export function assertSyncOperationsConfined(operations, roots) {
|
|
223
|
+
const confine = (candidate, allowed, label) => {
|
|
224
|
+
const normalized = path.posix.normalize(candidate);
|
|
225
|
+
if (!path.posix.isAbsolute(normalized) || normalized === ".." || normalized.includes("/../") || normalized.endsWith("/..")) {
|
|
226
|
+
throw new Error(`sync operation ${label} path is not a confined absolute path: ${candidate}`);
|
|
227
|
+
}
|
|
228
|
+
const within = allowed.some((root) => {
|
|
229
|
+
const normalizedRoot = path.posix.normalize(root);
|
|
230
|
+
const prefix = normalizedRoot.endsWith("/") ? normalizedRoot : `${normalizedRoot}/`;
|
|
231
|
+
return normalized === normalizedRoot || normalized.startsWith(prefix);
|
|
232
|
+
});
|
|
233
|
+
if (!within) {
|
|
234
|
+
throw new Error(`sync operation ${label} path escapes its confinement root: ${candidate}`);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
for (const operation of operations) {
|
|
238
|
+
for (const mapping of operation.files) {
|
|
239
|
+
confine(mapping.sourcePath, roots.sourceRoots, "source");
|
|
240
|
+
confine(mapping.targetPath, roots.targetRoots, "target");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function asObject(value) {
|
|
245
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
246
|
+
? value
|
|
247
|
+
: {};
|
|
248
|
+
}
|
|
249
|
+
function asString(value) {
|
|
250
|
+
return typeof value === "string" ? value : "";
|
|
251
|
+
}
|
|
252
|
+
function asNumber(value) {
|
|
253
|
+
return typeof value === "number" ? value : Number(value);
|
|
254
|
+
}
|
|
255
|
+
function shellQuote(value) {
|
|
256
|
+
return `'${value.replace(/'/g, `'\"'\"'`)}'`;
|
|
257
|
+
}
|
|
258
|
+
function buildDefaultExtractRuntimeAssetCommand(input) {
|
|
259
|
+
return `rm -rf ${shellQuote(input.remoteAssetDir)} && ` +
|
|
260
|
+
`mkdir -p ${shellQuote(input.remoteAssetDir)} && ` +
|
|
261
|
+
`tar -xf ${shellQuote(input.remoteAssetTar)} -C ${shellQuote(input.remoteAssetDir)} && ` +
|
|
262
|
+
`rm -f ${shellQuote(input.remoteAssetTar)}`;
|
|
263
|
+
}
|
|
264
|
+
// Named builder (Security Condition C3): extract an uploaded workspace tarball
|
|
265
|
+
// into `workspaceRemoteDir`, then remove the tarball. When `wipeExceptNames` is
|
|
266
|
+
// present the target's direct children (except the preserved names) are removed
|
|
267
|
+
// before extraction (destroy-then-replace); when null the tarball is overlaid on
|
|
268
|
+
// top of the existing tree (e.g. a git overlay merge). Every path is
|
|
269
|
+
// shell-quoted; no untrusted value is concatenated into the shell (C1/C3).
|
|
270
|
+
function buildWorkspaceTarExtractCommand(input) {
|
|
271
|
+
// The wipe must also preserve any in-flight sync scratch tarball at the
|
|
272
|
+
// workspace root. A concurrent referenced-project upload stages a scratch
|
|
273
|
+
// tarball named `.paperclip-upload-<uuid>.tar` there. Without this preserve
|
|
274
|
+
// term the wipe unlinks the in-flight tarball and the later extract fails.
|
|
275
|
+
// The static pattern must agree with the daytona scratch prefix
|
|
276
|
+
// `SCRATCH_PREFIX` in
|
|
277
|
+
// `packages/plugins/sandbox-providers/daytona/src/file-sync.ts:80`.
|
|
278
|
+
// The term is a static literal; `preserveFindArgs` shell-quotes it, so the
|
|
279
|
+
// shell passes it to `find -name` as a pattern (Security Conditions C1/C3).
|
|
280
|
+
const wipe = input.wipeExceptNames
|
|
281
|
+
? ` && find ${shellQuote(input.workspaceRemoteDir)} -mindepth 1 -maxdepth 1 ` +
|
|
282
|
+
`${preserveFindArgs([...input.wipeExceptNames, ".paperclip-upload-*"])} -exec rm -rf -- {} +`
|
|
283
|
+
: "";
|
|
284
|
+
return (`mkdir -p ${shellQuote(input.workspaceRemoteDir)}${wipe} && ` +
|
|
285
|
+
`tar -xf ${shellQuote(input.remoteTar)} -C ${shellQuote(input.workspaceRemoteDir)} && ` +
|
|
286
|
+
`rm -f ${shellQuote(input.remoteTar)}`);
|
|
287
|
+
}
|
|
288
|
+
// Named builder (C3): remove paths deleted in the host git worktree from the
|
|
289
|
+
// sandbox workspace. Every path is shell-quoted; the caller supplies only
|
|
290
|
+
// already-confined relative paths from the git snapshot.
|
|
291
|
+
function buildRemoveDeletedPathsCommand(input) {
|
|
292
|
+
const quotedPaths = input.deletedPaths.map((entry) => shellQuote(entry)).join(" ");
|
|
293
|
+
return `cd ${shellQuote(input.remoteDir)} && rm -rf -- ${quotedPaths}`;
|
|
294
|
+
}
|
|
295
|
+
function buildUniqueStagingPath(input) {
|
|
296
|
+
return `${input.targetPath}${input.suffix}.${randomUUID()}`;
|
|
297
|
+
}
|
|
298
|
+
// The workspace stages under `<runtimeRootDir>/workspace-upload.tar` and, for a
|
|
299
|
+
// git-backed workspace, under `<runtimeRootDir>/git-workspace-upload.tar`. Each
|
|
300
|
+
// asset stages under `<runtimeRootDir>/<key>-upload.tar`, so an asset key equal to
|
|
301
|
+
// one of these stems resolves to the same remote archive path. Reserve the stems.
|
|
302
|
+
const RESERVED_RUNTIME_ASSET_KEYS = new Set(["workspace", "git-workspace"]);
|
|
303
|
+
// Reject an asset key before any path is built from it. An asset key becomes a
|
|
304
|
+
// remote directory (`<runtimeRootDir>/<key>`), a remote archive name
|
|
305
|
+
// (`<key>-upload.tar`), and a host temp file (`<key>.tar`). A path separator or
|
|
306
|
+
// `..` in the key escapes those roots. A reserved stem makes the asset archive
|
|
307
|
+
// share a path with the workspace archive; under concurrent sync the asset task
|
|
308
|
+
// and the workspace task then write or upload the same archive at the same time,
|
|
309
|
+
// which fails extraction nondeterministically or puts asset bytes in the
|
|
310
|
+
// workspace. Fail closed on both cases.
|
|
311
|
+
function assertRuntimeAssetKeyIsSafe(key) {
|
|
312
|
+
if (key.length === 0 || key.includes("/") || key.includes("\\") || key.includes("..")) {
|
|
313
|
+
throw new Error(`sandbox runtime asset key is not a simple path segment: ${key}`);
|
|
314
|
+
}
|
|
315
|
+
if (RESERVED_RUNTIME_ASSET_KEYS.has(key)) {
|
|
316
|
+
throw new Error(`sandbox runtime asset key collides with a reserved runtime archive name: ${key}`);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
export function parseSandboxRemoteExecutionSpec(value) {
|
|
320
|
+
const parsed = asObject(value);
|
|
321
|
+
const transport = asString(parsed.transport).trim();
|
|
322
|
+
const provider = asString(parsed.provider).trim();
|
|
323
|
+
const sandboxId = asString(parsed.sandboxId).trim();
|
|
324
|
+
const remoteCwd = asString(parsed.remoteCwd).trim();
|
|
325
|
+
const timeoutMs = asNumber(parsed.timeoutMs);
|
|
326
|
+
if (transport !== "sandbox" ||
|
|
327
|
+
provider.length === 0 ||
|
|
328
|
+
sandboxId.length === 0 ||
|
|
329
|
+
remoteCwd.length === 0 ||
|
|
330
|
+
!Number.isFinite(timeoutMs) ||
|
|
331
|
+
timeoutMs <= 0) {
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
return {
|
|
335
|
+
transport: "sandbox",
|
|
336
|
+
provider,
|
|
337
|
+
sandboxId,
|
|
338
|
+
remoteCwd,
|
|
339
|
+
timeoutMs,
|
|
340
|
+
apiKey: asString(parsed.apiKey).trim() || null,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
export function buildSandboxExecutionSessionIdentity(spec) {
|
|
344
|
+
if (!spec)
|
|
345
|
+
return null;
|
|
346
|
+
return {
|
|
347
|
+
transport: "sandbox",
|
|
348
|
+
provider: spec.provider,
|
|
349
|
+
sandboxId: spec.sandboxId,
|
|
350
|
+
remoteCwd: spec.remoteCwd,
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
export function sandboxExecutionSessionMatches(saved, current) {
|
|
354
|
+
const currentIdentity = buildSandboxExecutionSessionIdentity(current);
|
|
355
|
+
if (!currentIdentity)
|
|
356
|
+
return false;
|
|
357
|
+
const parsedSaved = asObject(saved);
|
|
358
|
+
return (asString(parsedSaved.transport) === currentIdentity.transport &&
|
|
359
|
+
asString(parsedSaved.provider) === currentIdentity.provider &&
|
|
360
|
+
asString(parsedSaved.sandboxId) === currentIdentity.sandboxId &&
|
|
361
|
+
asString(parsedSaved.remoteCwd) === currentIdentity.remoteCwd);
|
|
362
|
+
}
|
|
363
|
+
async function withTempDir(prefix, fn) {
|
|
364
|
+
const dir = await fs.mkdtemp(path.join(os.tmpdir(), prefix));
|
|
365
|
+
try {
|
|
366
|
+
return await fn(dir);
|
|
367
|
+
}
|
|
368
|
+
finally {
|
|
369
|
+
await fs.rm(dir, { recursive: true, force: true }).catch(() => undefined);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
async function sha256File(filePath) {
|
|
373
|
+
return await new Promise((resolveDigest, rejectDigest) => {
|
|
374
|
+
const digest = createHash("sha256");
|
|
375
|
+
const stream = createReadStream(filePath);
|
|
376
|
+
stream.on("data", (chunk) => digest.update(chunk));
|
|
377
|
+
stream.on("error", rejectDigest);
|
|
378
|
+
stream.on("end", () => resolveDigest(digest.digest("hex")));
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
async function copyDurableSeedArchive(input) {
|
|
382
|
+
const source = await fs.lstat(input.sourcePath);
|
|
383
|
+
if (source.isSymbolicLink() || !source.isFile()) {
|
|
384
|
+
throw new Error("workspace_durable_seed_invalid");
|
|
385
|
+
}
|
|
386
|
+
if (input.expectedSha256 &&
|
|
387
|
+
(await sha256File(input.sourcePath)) !== input.expectedSha256) {
|
|
388
|
+
throw new Error("workspace_durable_seed_digest_mismatch");
|
|
389
|
+
}
|
|
390
|
+
await fs.copyFile(input.sourcePath, input.targetPath);
|
|
391
|
+
}
|
|
392
|
+
async function persistDurableSeedArchive(input) {
|
|
393
|
+
const parent = path.dirname(input.targetPath);
|
|
394
|
+
await fs.mkdir(parent, { recursive: true, mode: 0o700 });
|
|
395
|
+
const parentStat = await fs.lstat(parent);
|
|
396
|
+
if (parentStat.isSymbolicLink() || !parentStat.isDirectory()) {
|
|
397
|
+
throw new Error("workspace_durable_seed_root_invalid");
|
|
398
|
+
}
|
|
399
|
+
const temporary = path.join(parent, `.${path.basename(input.targetPath)}.${randomUUID()}.tmp`);
|
|
400
|
+
try {
|
|
401
|
+
await fs.copyFile(input.sourcePath, temporary);
|
|
402
|
+
await fs.chmod(temporary, 0o600);
|
|
403
|
+
await fs.rename(temporary, input.targetPath);
|
|
404
|
+
}
|
|
405
|
+
finally {
|
|
406
|
+
await fs.rm(temporary, { force: true }).catch(() => undefined);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
async function execTar(args) {
|
|
410
|
+
await execFile("tar", args, {
|
|
411
|
+
env: {
|
|
412
|
+
...process.env,
|
|
413
|
+
COPYFILE_DISABLE: "1",
|
|
414
|
+
},
|
|
415
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
export async function createTarballFromDirectory(input) {
|
|
419
|
+
const excludeArgs = ["._*", ...(input.exclude ?? [])].flatMap((entry) => ["--exclude", entry]);
|
|
420
|
+
// Archive the directory's top-level entries BY NAME rather than ".". Archiving
|
|
421
|
+
// "." embeds a "./" self-entry whose mode/mtime tar then tries to restore onto
|
|
422
|
+
// the extraction target directory; that chmod/utime fails with "Operation not
|
|
423
|
+
// permitted" when the target is a directory the extracting (non-root) user does
|
|
424
|
+
// not own, e.g. an emptyDir mount in a hardened/gVisor sandbox pod. Enumerating
|
|
425
|
+
// entries avoids the self-entry entirely and is portable across GNU/BSD/busybox
|
|
426
|
+
// tar (no GNU-only --no-overwrite-dir needed). --exclude still filters nested
|
|
427
|
+
// matches and any named entry it matches.
|
|
428
|
+
const entries = (await fs.readdir(input.localDir)).sort((left, right) => left.localeCompare(right));
|
|
429
|
+
if (entries.length === 0) {
|
|
430
|
+
// A workspace can legitimately be empty (blank-workspace agent runs). Write a
|
|
431
|
+
// valid empty tar archive (1024-byte all-zero EOF marker) so extraction is a
|
|
432
|
+
// clean no-op rather than tar refusing to create an empty archive.
|
|
433
|
+
await fs.writeFile(input.archivePath, Buffer.alloc(1024));
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
await execTar([
|
|
437
|
+
"-c",
|
|
438
|
+
// Prevent macOS bsdtar from embedding LIBARCHIVE.xattr.* PAX extended
|
|
439
|
+
// headers for extended attributes (e.g. com.apple.provenance). GNU tar on
|
|
440
|
+
// Linux does not recognise these proprietary headers and fails extraction
|
|
441
|
+
// with "This does not look like a tar archive". COPYFILE_DISABLE=1 (set in
|
|
442
|
+
// execTar) already suppresses AppleDouble ._* sidecar files; --no-xattrs
|
|
443
|
+
// additionally suppresses the inline PAX xattr entries.
|
|
444
|
+
"--no-xattrs",
|
|
445
|
+
...(input.followSymlinks ? ["-h"] : []),
|
|
446
|
+
"-f",
|
|
447
|
+
input.archivePath,
|
|
448
|
+
"-C",
|
|
449
|
+
input.localDir,
|
|
450
|
+
...excludeArgs,
|
|
451
|
+
"--",
|
|
452
|
+
...entries,
|
|
453
|
+
]);
|
|
454
|
+
}
|
|
455
|
+
async function extractTarballToDirectory(input) {
|
|
456
|
+
await fs.mkdir(input.localDir, { recursive: true });
|
|
457
|
+
await execTar(["-xf", input.archivePath, "-C", input.localDir]);
|
|
458
|
+
}
|
|
459
|
+
async function walkDirectory(root, relative = "") {
|
|
460
|
+
const current = path.join(root, relative);
|
|
461
|
+
const entries = await fs.readdir(current, { withFileTypes: true }).catch(() => []);
|
|
462
|
+
const out = [];
|
|
463
|
+
for (const entry of entries) {
|
|
464
|
+
const nextRelative = relative ? path.posix.join(relative, entry.name) : entry.name;
|
|
465
|
+
out.push(nextRelative);
|
|
466
|
+
if (entry.isDirectory()) {
|
|
467
|
+
out.push(...(await walkDirectory(root, nextRelative)));
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
return out.sort((left, right) => right.length - left.length);
|
|
471
|
+
}
|
|
472
|
+
async function copyWorkspaceEntry(sourceRoot, targetRoot, relative) {
|
|
473
|
+
const sourcePath = path.join(sourceRoot, relative);
|
|
474
|
+
const targetPath = path.join(targetRoot, relative);
|
|
475
|
+
const stats = await fs.lstat(sourcePath);
|
|
476
|
+
if (stats.isDirectory()) {
|
|
477
|
+
await fs.mkdir(targetPath, { recursive: true });
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
481
|
+
await fs.rm(targetPath, { recursive: true, force: true }).catch(() => undefined);
|
|
482
|
+
if (stats.isSymbolicLink()) {
|
|
483
|
+
const linkTarget = await fs.readlink(sourcePath);
|
|
484
|
+
await fs.symlink(linkTarget, targetPath);
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
const stagedTargetPath = buildUniqueStagingPath({ targetPath, suffix: ".paperclip-copy" });
|
|
488
|
+
await fs.rm(stagedTargetPath, { recursive: true, force: true }).catch(() => undefined);
|
|
489
|
+
try {
|
|
490
|
+
await fs.copyFile(sourcePath, stagedTargetPath, fsConstants.COPYFILE_FICLONE).catch(async () => {
|
|
491
|
+
await fs.copyFile(sourcePath, stagedTargetPath);
|
|
492
|
+
});
|
|
493
|
+
await fs.chmod(stagedTargetPath, stats.mode);
|
|
494
|
+
await fs.rename(stagedTargetPath, targetPath);
|
|
495
|
+
}
|
|
496
|
+
finally {
|
|
497
|
+
await fs.rm(stagedTargetPath, { recursive: true, force: true }).catch(() => undefined);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
export async function mirrorDirectory(sourceDir, targetDir, options = {}) {
|
|
501
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
502
|
+
const preserveAbsent = new Set(options.preserveAbsent ?? []);
|
|
503
|
+
const shouldPreserveAbsent = (relative) => [...preserveAbsent].some((candidate) => isRelativePathOrDescendant(relative, candidate));
|
|
504
|
+
const sourceEntries = new Set(await walkDirectory(sourceDir));
|
|
505
|
+
const targetEntries = await walkDirectory(targetDir);
|
|
506
|
+
for (const relative of targetEntries) {
|
|
507
|
+
if (shouldPreserveAbsent(relative))
|
|
508
|
+
continue;
|
|
509
|
+
if (!sourceEntries.has(relative)) {
|
|
510
|
+
await fs.rm(path.join(targetDir, relative), { recursive: true, force: true }).catch(() => undefined);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
const entries = (await walkDirectory(sourceDir)).sort((left, right) => left.localeCompare(right));
|
|
514
|
+
for (const relative of entries) {
|
|
515
|
+
await copyWorkspaceEntry(sourceDir, targetDir, relative);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
async function copySelectedWorkspaceEntries(input) {
|
|
519
|
+
await fs.mkdir(input.targetDir, { recursive: true });
|
|
520
|
+
for (const relative of input.relativePaths) {
|
|
521
|
+
if (shouldExcludePath(relative, input.exclude))
|
|
522
|
+
continue;
|
|
523
|
+
const sourceStats = await fs.lstat(path.join(input.sourceDir, relative)).catch(() => null);
|
|
524
|
+
if (!sourceStats)
|
|
525
|
+
continue;
|
|
526
|
+
await copyWorkspaceEntry(input.sourceDir, input.targetDir, relative);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
function toBuffer(bytes) {
|
|
530
|
+
if (Buffer.isBuffer(bytes))
|
|
531
|
+
return bytes;
|
|
532
|
+
if (bytes instanceof ArrayBuffer)
|
|
533
|
+
return Buffer.from(bytes);
|
|
534
|
+
return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
535
|
+
}
|
|
536
|
+
// Sum `bytesTransferred` over a `SandboxSyncResult`. The result crosses the
|
|
537
|
+
// plugin boundary, so a provider can return anything: guard each value and
|
|
538
|
+
// treat a missing, non-finite, or negative number as 0.
|
|
539
|
+
function sumSyncResultBytes(result) {
|
|
540
|
+
return result.operations.reduce((total, operation) => {
|
|
541
|
+
const bytes = operation.bytesTransferred;
|
|
542
|
+
return Number.isFinite(bytes) && bytes > 0 ? total + bytes : total;
|
|
543
|
+
}, 0);
|
|
544
|
+
}
|
|
545
|
+
function tarExcludeFlags(exclude) {
|
|
546
|
+
return ["._*", ...(exclude ?? [])].map((entry) => `--exclude ${shellQuote(entry)}`).join(" ");
|
|
547
|
+
}
|
|
548
|
+
function createRemoteTarballFromDirectoryCommand(input) {
|
|
549
|
+
// Match the local archive path: name top-level entries explicitly so tar
|
|
550
|
+
// does not include a "." self-entry that it later tries to chmod/utime.
|
|
551
|
+
return [
|
|
552
|
+
`mkdir -p ${shellQuote(path.posix.dirname(input.archivePath))}`,
|
|
553
|
+
`cd ${shellQuote(input.remoteDir)}`,
|
|
554
|
+
"set -- *",
|
|
555
|
+
`if [ "$#" -eq 1 ] && [ "$1" = "*" ] && [ ! -e "$1" ] && [ ! -L "$1" ]; then set --; fi`,
|
|
556
|
+
`for entry in .[!.]* ..?*; do [ -e "$entry" ] || [ -L "$entry" ] || continue; set -- "$@" "$entry"; done`,
|
|
557
|
+
`if [ "$#" -eq 0 ]; then ` +
|
|
558
|
+
`dd if=/dev/zero of=${shellQuote(input.archivePath)} bs=1024 count=1; ` +
|
|
559
|
+
`else tar -cf ${shellQuote(input.archivePath)} ${tarExcludeFlags(input.exclude)} -- "$@"; fi`,
|
|
560
|
+
].join(" && ");
|
|
561
|
+
}
|
|
562
|
+
async function emitRuntimeStatus(sink, phase, message) {
|
|
563
|
+
if (!sink)
|
|
564
|
+
return;
|
|
565
|
+
await Promise.resolve(sink({ phase, message })).catch(() => undefined);
|
|
566
|
+
}
|
|
567
|
+
export function mergeExcludes(...groups) {
|
|
568
|
+
return [...new Set(groups.flatMap((group) => group ?? []))];
|
|
569
|
+
}
|
|
570
|
+
function preserveFindArgs(entries) {
|
|
571
|
+
return entries.map((entry) => `! -name ${shellQuote(entry)}`).join(" ");
|
|
572
|
+
}
|
|
573
|
+
// Bridge a single byte-level transfer to the throttled progress reporter. The
|
|
574
|
+
// transport reports decoded bytes via `options.onProgress`; the reporter turns
|
|
575
|
+
// them into a throttled, fully-formatted log line. `finish()` emits the terminal
|
|
576
|
+
// completion line (idempotent) once the transfer returns.
|
|
577
|
+
function makeTransferProgress(sink, phase, direction, label, runtimeStatus) {
|
|
578
|
+
if (!sink && !runtimeStatus?.sink) {
|
|
579
|
+
return { options: undefined, finish: async () => { } };
|
|
580
|
+
}
|
|
581
|
+
const reporter = createRuntimeProgressReporter({
|
|
582
|
+
sink: async (line) => {
|
|
583
|
+
await sink?.(line);
|
|
584
|
+
if (runtimeStatus?.sink) {
|
|
585
|
+
await emitRuntimeStatus(runtimeStatus.sink, runtimeStatus.phase, line.replace(/^\[paperclip\]\s*/, "").trim());
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
phase,
|
|
589
|
+
direction,
|
|
590
|
+
target: "sandbox",
|
|
591
|
+
label,
|
|
592
|
+
});
|
|
593
|
+
return {
|
|
594
|
+
options: {
|
|
595
|
+
onProgress: async (transferredBytes, totalBytes) => {
|
|
596
|
+
await reporter.report(transferredBytes, totalBytes);
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
finish: async (doneBytes, totalBytes) => {
|
|
600
|
+
await reporter.complete(doneBytes, totalBytes);
|
|
601
|
+
},
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
export async function prepareSandboxManagedRuntime(input) {
|
|
605
|
+
const workspaceRemoteDir = input.workspaceRemoteDir ?? input.spec.remoteCwd;
|
|
606
|
+
const runtimeRootDir = path.posix.join(workspaceRemoteDir, ".paperclip-runtime", input.adapterKey);
|
|
607
|
+
// A workspace directory that does not exist on this host has nothing to
|
|
608
|
+
// stage, no files for ignore rules to govern, and nothing to restore into —
|
|
609
|
+
// callers that only stage credential assets (the adapter env tests) hand
|
|
610
|
+
// the runtime a fresh path. Treat that one case as "do not sync" rather
|
|
611
|
+
// than letting the ignore scan or the staging walk die on ENOENT. Any other
|
|
612
|
+
// access failure still fails the preparation: a workspace that exists but
|
|
613
|
+
// cannot be read must not silently become an empty remote workspace.
|
|
614
|
+
const syncWorkspace = input.syncWorkspace !== false &&
|
|
615
|
+
(await fs.access(input.workspaceLocalDir).then(() => true, (error) => {
|
|
616
|
+
if (error.code === "ENOENT")
|
|
617
|
+
return false;
|
|
618
|
+
throw error;
|
|
619
|
+
}));
|
|
620
|
+
const workspaceInboundMode = input.workspaceInboundMode ?? "host_current";
|
|
621
|
+
const stageWorkspace = syncWorkspace && workspaceInboundMode !== "adopt_remote";
|
|
622
|
+
const prepareWorkspaceSeed = syncWorkspace &&
|
|
623
|
+
workspaceInboundMode === "adopt_remote" &&
|
|
624
|
+
input.workspaceDurableSeed !== undefined;
|
|
625
|
+
if (workspaceInboundMode === "durable_seed" && !input.workspaceDurableSeed) {
|
|
626
|
+
throw new Error("workspace_durable_seed_missing");
|
|
627
|
+
}
|
|
628
|
+
// Reject any unsafe asset key before an archive path or an asset directory is
|
|
629
|
+
// built from it. This runs before the git snapshot work so a bad key fails fast.
|
|
630
|
+
for (const asset of input.assets ?? []) {
|
|
631
|
+
assertRuntimeAssetKeyIsSafe(asset.key);
|
|
632
|
+
}
|
|
633
|
+
// Wrap a host-side staging sub-step or one scheduler task in its own span when
|
|
634
|
+
// the caller injects a runtime span runner. The runner defaults to a no-op, so
|
|
635
|
+
// a caller with no injected runner keeps the current control flow, and a
|
|
636
|
+
// throwing runner never changes it (see `createRuntimeSpanRunner`). The two
|
|
637
|
+
// pre-`pack` operations — the git enumeration and the baseline content-hash
|
|
638
|
+
// walk — parent under the `stage.sync` step, so they stop showing up as a
|
|
639
|
+
// hidden gap at the head of the step. Each inbound task (`stage.workspace`,
|
|
640
|
+
// `stage.asset.<key>`, `stage.project.<id>`) and each outbound restore task
|
|
641
|
+
// (`restore.workspace`, `restore.asset.<key>`) opens its own span, so two
|
|
642
|
+
// concurrent tasks produce overlapping spans and the `pack` span nests under
|
|
643
|
+
// `stage.workspace`. The outbound spans parent under the run's `sandbox.syncBack`
|
|
644
|
+
// span, because the teardown runs the restore inside that span.
|
|
645
|
+
const runStepSpan = (name, work) => input.runtimeSpan ? input.runtimeSpan(name, work) : work();
|
|
646
|
+
// The git enumeration (`git status --ignored`, the HEAD diffs, `ls-files`).
|
|
647
|
+
// It reads git's own bookkeeping to decide what to include/exclude, so it is
|
|
648
|
+
// usually fast, but on a large working tree the `--ignored` walk is not free.
|
|
649
|
+
const gitSnapshot = syncWorkspace
|
|
650
|
+
? input.workspaceGitSnapshot !== undefined
|
|
651
|
+
? input.workspaceGitSnapshot
|
|
652
|
+
: await runStepSpan("snapshot.git", () => readGitWorkspaceSnapshot(input.workspaceLocalDir))
|
|
653
|
+
: null;
|
|
654
|
+
// A selected subfolder has no cloneable Git snapshot, but its parent
|
|
655
|
+
// repository's ignore rules still govern which files may leave the host.
|
|
656
|
+
// Use the same bounded, path-relative resolver as referenced project trees.
|
|
657
|
+
const directoryIgnore = syncWorkspace && !gitSnapshot
|
|
658
|
+
? await resolveReferencedSourceIgnore(input.workspaceLocalDir)
|
|
659
|
+
: null;
|
|
660
|
+
if (directoryIgnore?.kind === "failed") {
|
|
661
|
+
throw new Error(`Workspace ignore scan failed: ${directoryIgnore.reason}`);
|
|
662
|
+
}
|
|
663
|
+
const gitIgnoredExcludes = gitSnapshot?.ignoredPaths
|
|
664
|
+
?? (directoryIgnore?.kind === "git" ? directoryIgnore.ignoredPaths : undefined);
|
|
665
|
+
const workspaceArchiveExclude = mergeExcludes(SANDBOX_WORKSPACE_HEAVY_DIR_EXCLUDES, [...GIT_ARCHIVE_EXCLUDES], input.workspaceExclude, gitIgnoredExcludes);
|
|
666
|
+
const restoreExclude = mergeExcludes(SANDBOX_WORKSPACE_HEAVY_DIR_EXCLUDES, [...GIT_ARCHIVE_EXCLUDES], [".paperclip-runtime"], input.preserveAbsentOnRestore, input.workspaceExclude, gitIgnoredExcludes);
|
|
667
|
+
const repositories = gitSnapshot?.repositories ?? [];
|
|
668
|
+
const workspaceRestoreExclude = mergeExcludes(restoreExclude, repositories.map((repo) => repo.path));
|
|
669
|
+
// The baseline "before" snapshot: a recursive walk of the whole workspace that
|
|
670
|
+
// `lstat`s every entry and SHA-256-hashes every file's bytes. This is the
|
|
671
|
+
// dominant cost in the pre-`pack` window — it reads the content of every
|
|
672
|
+
// non-excluded file, serially — so it earns its own span.
|
|
673
|
+
const baselineSnapshot = syncWorkspace
|
|
674
|
+
? (input.workspaceBaseline ??
|
|
675
|
+
(await runStepSpan("snapshot.baseline", () => captureDirectorySnapshot(input.workspaceLocalDir, {
|
|
676
|
+
exclude: restoreExclude,
|
|
677
|
+
}))))
|
|
678
|
+
: null;
|
|
679
|
+
// Every inbound staging step delegates to the provider through `client.syncIn`:
|
|
680
|
+
// the orchestrator no longer inlines `writeFile`+`run` or chooses a transport,
|
|
681
|
+
// and there is no `usesCustomProvision` native-diversion gate. `syncIn` is
|
|
682
|
+
// ALWAYS present in production — the command-managed client exposes a native
|
|
683
|
+
// transport (Daytona/Kubernetes `uploadFiles` + provider-executed post-upload
|
|
684
|
+
// commands) or a byte-identical base64-tar fallback that reproduces the prior
|
|
685
|
+
// `writeFile`+`run` sequence. Require it explicitly so a misconfigured client
|
|
686
|
+
// fails loud rather than silently skipping staging. `syncOut` stays optional
|
|
687
|
+
// (native-only) with a tar fallback on the restore path below.
|
|
688
|
+
const syncIn = input.client.syncIn;
|
|
689
|
+
if (typeof syncIn !== "function") {
|
|
690
|
+
throw new Error("prepareSandboxManagedRuntime requires a client that exposes syncIn " +
|
|
691
|
+
"(createCommandManagedRuntimeClient provides a native-or-fallback implementation).");
|
|
692
|
+
}
|
|
693
|
+
const nativeSyncOut = typeof input.client.syncOut === "function";
|
|
694
|
+
let syncOperationSeq = 0;
|
|
695
|
+
// Opaque, ordered, non-sensitive operation tokens — never a caller/asset id.
|
|
696
|
+
const nextSyncOperationId = () => `sync-op-${++syncOperationSeq}`;
|
|
697
|
+
// Remote directory of each additional (referenced) project that stages
|
|
698
|
+
// successfully, keyed by projectId. A project that fails to stage is absent.
|
|
699
|
+
const additionalSourceDirs = {};
|
|
700
|
+
// Each additional (referenced) project whose staging failed, paired with the
|
|
701
|
+
// failure message. Per-project failure isolation keeps the run and the other
|
|
702
|
+
// projects going; this list makes each failure a first-class, reported outcome.
|
|
703
|
+
const additionalSourceFailures = [];
|
|
704
|
+
// Additional projects stage as plain trees. Drop the heavy build/cache dirs a
|
|
705
|
+
// reference tree does not need, and `.git` — additional sources never carry
|
|
706
|
+
// git-history semantics (anchor-only). Each project also drops its OWN
|
|
707
|
+
// resolved Git-ignored paths (or keeps this fixed set as-is for a non-Git
|
|
708
|
+
// source) — see `resolveReferencedSourceIgnore` and the per-project merge
|
|
709
|
+
// below.
|
|
710
|
+
const additionalSourceBaseExclude = mergeExcludes(SANDBOX_WORKSPACE_HEAVY_DIR_EXCLUDES, [".git"]);
|
|
711
|
+
// Every delegated post-upload command (extract/wipe/remove-deleted/asset merge)
|
|
712
|
+
// must run under the run-specific timeout (`spec.timeoutMs`), not the provider
|
|
713
|
+
// sync client's default timeout — the two can differ, and before staging was
|
|
714
|
+
// routed through `syncIn` each of these ran via
|
|
715
|
+
// `client.run(cmd, { timeoutMs: spec.timeoutMs })`. When they mismatch, a
|
|
716
|
+
// command left without a `timeoutMs` outlives (or is killed under) the wrong
|
|
717
|
+
// limit. Stamp the run timeout onto every delegated command, preserving any
|
|
718
|
+
// command that already carries its own explicit timeout.
|
|
719
|
+
const withRunTimeout = (commands) => commands.map((command) => ({
|
|
720
|
+
...command,
|
|
721
|
+
timeoutMs: command.timeoutMs ?? input.spec.timeoutMs,
|
|
722
|
+
}));
|
|
723
|
+
await withTempDir("paperclip-sandbox-sync-", async (tempDir) => {
|
|
724
|
+
const preservedNames = new Set([
|
|
725
|
+
".paperclip-runtime",
|
|
726
|
+
...(gitSnapshot ? [".git"] : []),
|
|
727
|
+
...(input.preserveAbsentOnRestore ?? []),
|
|
728
|
+
]);
|
|
729
|
+
// Stage one source directory into an isolated remote subdirectory through the
|
|
730
|
+
// unified `syncIn` seam. Both the workspace/asset tar path and the additional
|
|
731
|
+
// (referenced) project path use it: build one `SandboxSyncOperation` from the
|
|
732
|
+
// caller's `files` mappings (a host tarball as a single `file` mapping, or a
|
|
733
|
+
// whole `directory` mapping), carry any extract/wipe/merge steps as ordered
|
|
734
|
+
// `postUploadCommands`, confine the operation's source and target to their
|
|
735
|
+
// own roots (fail-closed), and delegate to `syncIn` (native transfer, or the
|
|
736
|
+
// base64-tar fallback). `finish` emits the terminal progress line.
|
|
737
|
+
const stageConfinedSyncIn = async (params) => {
|
|
738
|
+
const operations = [{
|
|
739
|
+
operationId: nextSyncOperationId(),
|
|
740
|
+
files: params.files,
|
|
741
|
+
...(params.postUploadCommands
|
|
742
|
+
? { postUploadCommands: withRunTimeout(params.postUploadCommands) }
|
|
743
|
+
: {}),
|
|
744
|
+
}];
|
|
745
|
+
assertSyncOperationsConfined(operations, {
|
|
746
|
+
sourceRoots: params.sourceRoots,
|
|
747
|
+
targetRoots: params.targetRoots,
|
|
748
|
+
});
|
|
749
|
+
const upload = makeTransferProgress(input.onProgress, "Syncing", "to", params.progressLabel, { sink: input.onRuntimeProgress, phase: params.statusPhase });
|
|
750
|
+
const syncResult = await syncIn(operations);
|
|
751
|
+
// Prefer the transport's own byte total. It is the real count for a
|
|
752
|
+
// provider that has no host tarball to stat (a referenced project rides
|
|
753
|
+
// a `directory` mapping). Fall back to the caller-supplied count when
|
|
754
|
+
// the transport reports 0, so a provider that under-reports still
|
|
755
|
+
// shows the host-known workspace total.
|
|
756
|
+
const transferredBytes = sumSyncResultBytes(syncResult);
|
|
757
|
+
const reportedBytes = transferredBytes > 0 ? transferredBytes : params.progressBytes;
|
|
758
|
+
await upload.finish(reportedBytes, reportedBytes);
|
|
759
|
+
};
|
|
760
|
+
// Build the ordered inbound operation task list. Each task stages one inbound
|
|
761
|
+
// operation from start to end: it packs the bytes, confines the mappings, and
|
|
762
|
+
// uploads them. The shared scheduler starts the tasks. When the sync client
|
|
763
|
+
// permits concurrency, the scheduler keeps at most SYNC_OPERATION_CONCURRENCY_LIMIT
|
|
764
|
+
// tasks active. When the client does not permit concurrency, the scheduler runs
|
|
765
|
+
// one task at a time in this order. The scheduler settles every started task
|
|
766
|
+
// before it returns, so no upload outlives the coordinator and ACP never starts
|
|
767
|
+
// before the barrier.
|
|
768
|
+
const inboundTasks = [];
|
|
769
|
+
// A required-flag list, one entry per task and index-aligned with inboundTasks.
|
|
770
|
+
// The workspace and each asset are required operations: a rejection is fatal
|
|
771
|
+
// after the barrier. Each referenced project is a nonfatal operation: its task
|
|
772
|
+
// records its own failure and never rejects.
|
|
773
|
+
const inboundTaskIsRequired = [];
|
|
774
|
+
if (stageWorkspace || prepareWorkspaceSeed) {
|
|
775
|
+
inboundTaskIsRequired.push(true);
|
|
776
|
+
inboundTasks.push(() => runStepSpan("stage.workspace", async () => {
|
|
777
|
+
// A git-backed workspace and a plain workspace both stage through ONE
|
|
778
|
+
// confined `syncIn` operation. A git-backed workspace carries TWO host tars —
|
|
779
|
+
// the git-history clone and the working-tree overlay — as two `file` mappings
|
|
780
|
+
// on the SAME operation, with their extract commands as ordered
|
|
781
|
+
// `postUploadCommands`. One operation shares one mkdir, one confine guard, one
|
|
782
|
+
// `uploadFiles`, and one rename exec, so the second `syncIn` round trip is
|
|
783
|
+
// removed. Build the whole merged file set and command list BEFORE the confine
|
|
784
|
+
// guard runs (inside `stageConfinedSyncIn`); never append a mapping after it.
|
|
785
|
+
const workspaceFiles = [];
|
|
786
|
+
const workspacePostUploadCommands = [];
|
|
787
|
+
let workspaceUploadBytes = 0;
|
|
788
|
+
// Build both host tarballs (the git-history tar and the workspace-overlay
|
|
789
|
+
// tar) inside one host span named `pack`. This span makes the host pack
|
|
790
|
+
// time visible under the `stage.sync` step, where it is otherwise a hidden
|
|
791
|
+
// gap with no span. The transfer (`stageConfinedSyncIn`) runs after this
|
|
792
|
+
// span, so `pack` measures only the host tar-build cost. The runner
|
|
793
|
+
// defaults to a no-op, so a caller with no injected runner keeps the
|
|
794
|
+
// current behavior and control flow.
|
|
795
|
+
await runStepSpan("pack", async () => {
|
|
796
|
+
// 1. git-history tar (git-backed workspace only). Both tar targets live under
|
|
797
|
+
// `runtimeRootDir` (`.paperclip-runtime/<adapterKey>`). The git extract
|
|
798
|
+
// wipes the target tree EXCEPT `.paperclip-runtime`, so the overlay tar,
|
|
799
|
+
// which sits under `.paperclip-runtime`, survives to run its own extract.
|
|
800
|
+
if (gitSnapshot) {
|
|
801
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "git_sync", "Syncing git history to environment");
|
|
802
|
+
const gitTarPath = path.join(tempDir, "git-workspace.tar");
|
|
803
|
+
const remoteGitTar = path.posix.join(runtimeRootDir, "git-workspace-upload.tar");
|
|
804
|
+
if (workspaceInboundMode === "durable_seed") {
|
|
805
|
+
const durableGitArchive = input.workspaceDurableSeed?.gitArchivePath;
|
|
806
|
+
if (!durableGitArchive) {
|
|
807
|
+
throw new Error("workspace_durable_seed_git_missing");
|
|
808
|
+
}
|
|
809
|
+
await copyDurableSeedArchive({
|
|
810
|
+
sourcePath: durableGitArchive,
|
|
811
|
+
targetPath: gitTarPath,
|
|
812
|
+
expectedSha256: input.workspaceDurableSeed?.gitArchiveSha256,
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
await withShallowGitWorkspaceClone({
|
|
817
|
+
localDir: input.workspaceLocalDir,
|
|
818
|
+
snapshot: gitSnapshot,
|
|
819
|
+
}, async (cloneDir) => {
|
|
820
|
+
await createTarballFromDirectory({
|
|
821
|
+
localDir: cloneDir,
|
|
822
|
+
archivePath: gitTarPath,
|
|
823
|
+
exclude: [".paperclip-runtime"],
|
|
824
|
+
});
|
|
825
|
+
});
|
|
826
|
+
if (input.workspaceDurableSeed?.gitArchivePath) {
|
|
827
|
+
await persistDurableSeedArchive({
|
|
828
|
+
sourcePath: gitTarPath,
|
|
829
|
+
targetPath: input.workspaceDurableSeed.gitArchivePath,
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
workspaceFiles.push({
|
|
834
|
+
sourcePath: gitTarPath,
|
|
835
|
+
targetPath: remoteGitTar,
|
|
836
|
+
kind: "file",
|
|
837
|
+
access: "rw",
|
|
838
|
+
writablePath: workspaceRemoteDir,
|
|
839
|
+
});
|
|
840
|
+
workspacePostUploadCommands.push({
|
|
841
|
+
command: buildWorkspaceTarExtractCommand({
|
|
842
|
+
workspaceRemoteDir,
|
|
843
|
+
remoteTar: remoteGitTar,
|
|
844
|
+
wipeExceptNames: [".paperclip-runtime"],
|
|
845
|
+
}),
|
|
846
|
+
});
|
|
847
|
+
workspaceUploadBytes += (await fs.stat(gitTarPath)).size;
|
|
848
|
+
}
|
|
849
|
+
// 2. workspace-overlay tar. A git-backed overlay merges on top of the just
|
|
850
|
+
// extracted git tree (no wipe); a plain workspace wipes every child except
|
|
851
|
+
// the preserved names first. The extract runs AFTER the git extract.
|
|
852
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "config_sync", "Syncing workspace to environment");
|
|
853
|
+
const workspaceTarPath = path.join(tempDir, "workspace.tar");
|
|
854
|
+
if (workspaceInboundMode === "durable_seed") {
|
|
855
|
+
await copyDurableSeedArchive({
|
|
856
|
+
sourcePath: input.workspaceDurableSeed.workspaceArchivePath,
|
|
857
|
+
targetPath: workspaceTarPath,
|
|
858
|
+
expectedSha256: input.workspaceDurableSeed.workspaceArchiveSha256,
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
const workspaceArchiveDir = gitSnapshot
|
|
863
|
+
? path.join(tempDir, "workspace-overlay")
|
|
864
|
+
: input.workspaceLocalDir;
|
|
865
|
+
if (gitSnapshot) {
|
|
866
|
+
await copySelectedWorkspaceEntries({
|
|
867
|
+
sourceDir: input.workspaceLocalDir,
|
|
868
|
+
targetDir: workspaceArchiveDir,
|
|
869
|
+
relativePaths: gitSnapshot.overlayPaths,
|
|
870
|
+
exclude: workspaceArchiveExclude,
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
await createTarballFromDirectory({
|
|
874
|
+
localDir: workspaceArchiveDir,
|
|
875
|
+
archivePath: workspaceTarPath,
|
|
876
|
+
exclude: gitSnapshot ? undefined : workspaceArchiveExclude,
|
|
877
|
+
});
|
|
878
|
+
if (input.workspaceDurableSeed) {
|
|
879
|
+
await persistDurableSeedArchive({
|
|
880
|
+
sourcePath: workspaceTarPath,
|
|
881
|
+
targetPath: input.workspaceDurableSeed.workspaceArchivePath,
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
const remoteWorkspaceTar = path.posix.join(runtimeRootDir, "workspace-upload.tar");
|
|
886
|
+
workspaceFiles.push({
|
|
887
|
+
sourcePath: workspaceTarPath,
|
|
888
|
+
targetPath: remoteWorkspaceTar,
|
|
889
|
+
kind: "file",
|
|
890
|
+
access: "rw",
|
|
891
|
+
writablePath: workspaceRemoteDir,
|
|
892
|
+
});
|
|
893
|
+
workspacePostUploadCommands.push({
|
|
894
|
+
command: buildWorkspaceTarExtractCommand({
|
|
895
|
+
workspaceRemoteDir,
|
|
896
|
+
remoteTar: remoteWorkspaceTar,
|
|
897
|
+
wipeExceptNames: gitSnapshot ? null : [...preservedNames],
|
|
898
|
+
}),
|
|
899
|
+
});
|
|
900
|
+
// 3. Optional remove-deleted-paths command runs LAST, after both extracts.
|
|
901
|
+
if (gitSnapshot && gitSnapshot.deletedPaths.length > 0) {
|
|
902
|
+
workspacePostUploadCommands.push({
|
|
903
|
+
command: buildRemoveDeletedPathsCommand({
|
|
904
|
+
remoteDir: workspaceRemoteDir,
|
|
905
|
+
deletedPaths: gitSnapshot.deletedPaths,
|
|
906
|
+
}),
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
workspaceUploadBytes += (await fs.stat(workspaceTarPath)).size;
|
|
910
|
+
});
|
|
911
|
+
if (!stageWorkspace)
|
|
912
|
+
return;
|
|
913
|
+
// One confined `syncIn` for the whole merged workspace file set. The confine
|
|
914
|
+
// guard covers every mapping BEFORE any bytes upload (fail-closed): a source
|
|
915
|
+
// or target escape in EITHER tar mapping stops the upload of both.
|
|
916
|
+
await stageConfinedSyncIn({
|
|
917
|
+
files: workspaceFiles,
|
|
918
|
+
postUploadCommands: workspacePostUploadCommands,
|
|
919
|
+
sourceRoots: [tempDir],
|
|
920
|
+
targetRoots: [runtimeRootDir],
|
|
921
|
+
progressLabel: "workspace",
|
|
922
|
+
statusPhase: "config_sync",
|
|
923
|
+
progressBytes: workspaceUploadBytes,
|
|
924
|
+
});
|
|
925
|
+
}));
|
|
926
|
+
}
|
|
927
|
+
for (const asset of input.assets ?? []) {
|
|
928
|
+
inboundTaskIsRequired.push(true);
|
|
929
|
+
inboundTasks.push(() => runStepSpan(`stage.asset.${asset.key}`, async () => {
|
|
930
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "config_sync", "Syncing runtime assets to environment");
|
|
931
|
+
const remoteAssetDir = path.posix.join(runtimeRootDir, asset.key);
|
|
932
|
+
const remoteAssetTar = path.posix.join(runtimeRootDir, `${asset.key}-upload.tar`);
|
|
933
|
+
// Every asset — default OR custom-provisioned (e.g. an adapter credential
|
|
934
|
+
// merge) — rides one `syncIn` operation: the asset tar plus any staged
|
|
935
|
+
// helper files as `files` mappings, and the extract/merge command as the
|
|
936
|
+
// ordered post-upload command. There is no native-diversion gate; a
|
|
937
|
+
// custom-provisioned asset's bytes now ride native `uploadFiles` and its
|
|
938
|
+
// command runs as a provider-executed post-upload command.
|
|
939
|
+
const assetTarPath = path.join(tempDir, `${asset.key}.tar`);
|
|
940
|
+
await createTarballFromDirectory({
|
|
941
|
+
localDir: asset.localDir,
|
|
942
|
+
archivePath: assetTarPath,
|
|
943
|
+
followSymlinks: asset.followSymlinks,
|
|
944
|
+
exclude: asset.exclude,
|
|
945
|
+
});
|
|
946
|
+
const files = [
|
|
947
|
+
{ sourcePath: assetTarPath, targetPath: remoteAssetTar, kind: "file", access: "rw", writablePath: remoteAssetDir },
|
|
948
|
+
];
|
|
949
|
+
// Stage provision helper files (e.g. the merge scripts) into the temp dir
|
|
950
|
+
// and map them alongside the asset tar so they ride the same native upload.
|
|
951
|
+
for (const stageFile of asset.provision?.stageFiles ?? []) {
|
|
952
|
+
const safeName = stageFile.name;
|
|
953
|
+
if (/[\\/]|\.\.(\.|$)/.test(safeName) || safeName === "..") {
|
|
954
|
+
throw new Error(`provision stageFile.name must be a simple basename, got: ${safeName}`);
|
|
955
|
+
}
|
|
956
|
+
const stageBytes = typeof stageFile.contents === "string"
|
|
957
|
+
? Buffer.from(stageFile.contents)
|
|
958
|
+
: stageFile.contents;
|
|
959
|
+
const stageHostPath = path.join(tempDir, `${asset.key}.stage.${safeName}`);
|
|
960
|
+
await fs.writeFile(stageHostPath, stageBytes);
|
|
961
|
+
// A stage helper file (for example a merge script) is a read-only input
|
|
962
|
+
// that the provision command reads; the agent does not change it and does
|
|
963
|
+
// not keep it. So it is `access: "ro"` and never joins the writable set.
|
|
964
|
+
files.push({
|
|
965
|
+
sourcePath: stageHostPath,
|
|
966
|
+
targetPath: path.posix.join(runtimeRootDir, safeName),
|
|
967
|
+
kind: "file",
|
|
968
|
+
access: "ro",
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
const postUploadCommand = asset.provision?.postUploadCommand?.({
|
|
972
|
+
assetTarPath: remoteAssetTar,
|
|
973
|
+
assetDir: remoteAssetDir,
|
|
974
|
+
runtimeRootDir,
|
|
975
|
+
}) ?? buildDefaultExtractRuntimeAssetCommand({ remoteAssetDir, remoteAssetTar });
|
|
976
|
+
const assetTarSize = (await fs.stat(assetTarPath)).size;
|
|
977
|
+
await stageConfinedSyncIn({
|
|
978
|
+
files,
|
|
979
|
+
postUploadCommands: [{ command: postUploadCommand }],
|
|
980
|
+
sourceRoots: [tempDir],
|
|
981
|
+
targetRoots: [runtimeRootDir],
|
|
982
|
+
progressLabel: asset.key,
|
|
983
|
+
statusPhase: "config_sync",
|
|
984
|
+
progressBytes: assetTarSize,
|
|
985
|
+
});
|
|
986
|
+
}));
|
|
987
|
+
}
|
|
988
|
+
// Stage each referenced (additional) project as a plain, read-only tree in
|
|
989
|
+
// its OWN isolated remote directory (`project-<projectId>`). An additional
|
|
990
|
+
// project rides one confined `syncIn` directory mapping — a native directory
|
|
991
|
+
// transfer, or the base64-tar fallback — with source and target confined to
|
|
992
|
+
// their own roots. No workspace, git-history, or `.paperclip-runtime`
|
|
993
|
+
// semantics apply; those stay anchor-only. Per-project failure isolation: one
|
|
994
|
+
// project's confinement or sync failure logs a warning and is skipped, and
|
|
995
|
+
// the run plus the other projects continue. Only a project that stages
|
|
996
|
+
// successfully appears in `additionalSourceDirs`.
|
|
997
|
+
const additionalSourceList = input.additionalSources ?? [];
|
|
998
|
+
// Record each referenced-project failure in its input-order slot. Slot order
|
|
999
|
+
// keeps the failure list stable no matter the task completion order under
|
|
1000
|
+
// concurrency.
|
|
1001
|
+
const additionalFailureSlots = additionalSourceList.map(() => null);
|
|
1002
|
+
additionalSourceList.forEach((source, sourceIndex) => {
|
|
1003
|
+
inboundTaskIsRequired.push(false);
|
|
1004
|
+
inboundTasks.push(() => runStepSpan(`stage.project.${source.projectId}`, async () => {
|
|
1005
|
+
const { localPath, projectId, ignoreResolution } = source;
|
|
1006
|
+
const label = `project-${projectId}`;
|
|
1007
|
+
try {
|
|
1008
|
+
if (!path.posix.isAbsolute(localPath)) {
|
|
1009
|
+
throw new Error(`additional source localPath is not an absolute path: ${localPath}`);
|
|
1010
|
+
}
|
|
1011
|
+
if (projectId.length === 0 ||
|
|
1012
|
+
projectId.includes("/") ||
|
|
1013
|
+
projectId.includes("\\") ||
|
|
1014
|
+
projectId.includes("..")) {
|
|
1015
|
+
throw new Error(`additional source projectId is not a simple path segment: ${projectId}`);
|
|
1016
|
+
}
|
|
1017
|
+
// Fail closed: a project whose ignore resolution failed is not staged
|
|
1018
|
+
// at all. Shipping it with only the fixed heavy-directory excludes
|
|
1019
|
+
// would defeat the resolution's purpose.
|
|
1020
|
+
if (ignoreResolution.kind === "failed") {
|
|
1021
|
+
throw new Error(`referenced project ignore resolution failed: ${ignoreResolution.reason}`);
|
|
1022
|
+
}
|
|
1023
|
+
const remoteProjectDir = path.posix.join(runtimeRootDir, label);
|
|
1024
|
+
const exclude = mergeExcludes(additionalSourceBaseExclude, referencedSourceIgnoreExcludeEntries(ignoreResolution));
|
|
1025
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "config_sync", "Syncing referenced project to environment");
|
|
1026
|
+
await stageConfinedSyncIn({
|
|
1027
|
+
files: [{
|
|
1028
|
+
sourcePath: localPath,
|
|
1029
|
+
targetPath: remoteProjectDir,
|
|
1030
|
+
kind: "directory",
|
|
1031
|
+
exclude,
|
|
1032
|
+
access: "ro",
|
|
1033
|
+
}],
|
|
1034
|
+
sourceRoots: [localPath],
|
|
1035
|
+
targetRoots: [remoteProjectDir],
|
|
1036
|
+
progressLabel: label,
|
|
1037
|
+
statusPhase: "config_sync",
|
|
1038
|
+
progressBytes: 0,
|
|
1039
|
+
});
|
|
1040
|
+
additionalSourceDirs[projectId] = remoteProjectDir;
|
|
1041
|
+
}
|
|
1042
|
+
catch (error) {
|
|
1043
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1044
|
+
// Record the failure as a first-class per-project outcome so the run can count it in the
|
|
1045
|
+
// requested-vs-synced accounting and surface the reason on the run result and the run log.
|
|
1046
|
+
// The structured slot carries the reason, so no `console.warn` line is needed here.
|
|
1047
|
+
additionalFailureSlots[sourceIndex] = { projectId, error: message };
|
|
1048
|
+
}
|
|
1049
|
+
}));
|
|
1050
|
+
});
|
|
1051
|
+
// Run every inbound operation through the shared scheduler. It starts the
|
|
1052
|
+
// tasks under the client's concurrency permission and the bound, and it
|
|
1053
|
+
// settles every started task before it returns. This is the startup barrier:
|
|
1054
|
+
// the coordinator returns only after every upload settles.
|
|
1055
|
+
const inboundResults = await scheduleSyncOperations(inboundTasks, input.client.allowConcurrentSyncOperations === true, SYNC_OPERATION_CONCURRENCY_LIMIT);
|
|
1056
|
+
// Collect the referenced-project failures in stable input order.
|
|
1057
|
+
for (const failure of additionalFailureSlots) {
|
|
1058
|
+
if (failure) {
|
|
1059
|
+
additionalSourceFailures.push(failure);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
// Select a fatal failure in stable operation order. The workspace comes first,
|
|
1063
|
+
// then each asset. A referenced-project task never rejects, so a nonfatal
|
|
1064
|
+
// outcome never appears here. Raise the first required rejection, so two
|
|
1065
|
+
// required failures raise the earlier one.
|
|
1066
|
+
for (let index = 0; index < inboundResults.length; index += 1) {
|
|
1067
|
+
const result = inboundResults[index];
|
|
1068
|
+
if (inboundTaskIsRequired[index] && result.status === "rejected") {
|
|
1069
|
+
throw result.reason;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
const assetDirs = Object.fromEntries((input.assets ?? []).map((asset) => [asset.key, path.posix.join(runtimeRootDir, asset.key)]));
|
|
1074
|
+
return {
|
|
1075
|
+
spec: input.spec,
|
|
1076
|
+
workspaceLocalDir: input.workspaceLocalDir,
|
|
1077
|
+
workspaceRemoteDir,
|
|
1078
|
+
runtimeRootDir,
|
|
1079
|
+
assetDirs,
|
|
1080
|
+
additionalSourceDirs,
|
|
1081
|
+
additionalSourceFailures,
|
|
1082
|
+
workspaceSyncSnapshot: syncWorkspace && baselineSnapshot
|
|
1083
|
+
? { baseline: baselineSnapshot, gitSnapshot }
|
|
1084
|
+
: null,
|
|
1085
|
+
restoreWorkspace: async (onProgress) => {
|
|
1086
|
+
const restoreSink = onProgress ?? input.onProgress;
|
|
1087
|
+
// Build the ordered outbound restore task list. Each task runs one
|
|
1088
|
+
// restore from start to end: the workspace restore, or one asset restore.
|
|
1089
|
+
// The shared scheduler starts the tasks. When the sync client permits
|
|
1090
|
+
// concurrency, the scheduler keeps at most SYNC_OPERATION_CONCURRENCY_LIMIT
|
|
1091
|
+
// tasks active. When the client does not permit concurrency, the scheduler
|
|
1092
|
+
// runs one task at a time in this order. The scheduler settles every
|
|
1093
|
+
// started task before it returns, so lease teardown never starts while an
|
|
1094
|
+
// outbound restore task still writes host data.
|
|
1095
|
+
const outboundTasks = [];
|
|
1096
|
+
// The workspace restore task runs only when the run syncs the workspace.
|
|
1097
|
+
// The task exports the sandbox git history (git-backed workspace), reads
|
|
1098
|
+
// the sandbox workspace back, and merges it into the host workspace root.
|
|
1099
|
+
// The merge is the only outbound write inside the host workspace root.
|
|
1100
|
+
// Every other task writes a disjoint host target: an asset restore writes
|
|
1101
|
+
// its own store outside the workspace root. So the workspace task and the
|
|
1102
|
+
// asset tasks share one parallel set. Keep any future asset that must write
|
|
1103
|
+
// inside the host workspace root out of this set, and run it after the
|
|
1104
|
+
// merge. Each task gets its own restore temp directory, so two concurrent
|
|
1105
|
+
// tasks never share scratch state.
|
|
1106
|
+
if (syncWorkspace) {
|
|
1107
|
+
outboundTasks.push(() => runStepSpan("restore.workspace", async () => {
|
|
1108
|
+
// Each repository owns its Git history and merge. The parent baseline also
|
|
1109
|
+
// records child files so restart recovery has their original merge inputs.
|
|
1110
|
+
for (const repository of repositories) {
|
|
1111
|
+
const prefix = `${repository.path}/`;
|
|
1112
|
+
const localDir = path.join(input.workspaceLocalDir, repository.path);
|
|
1113
|
+
if (await fs.realpath(localDir) !== path.join(await fs.realpath(input.workspaceLocalDir), repository.path)) {
|
|
1114
|
+
throw new Error("Project repository escaped its workspace");
|
|
1115
|
+
}
|
|
1116
|
+
const nestedExclude = mergeExcludes(repository.snapshot.ignoredPaths, baselineSnapshot.exclude.flatMap((entry) => entry.startsWith(prefix) ? [entry.slice(prefix.length)]
|
|
1117
|
+
: entry.startsWith("*/") ? [entry] : []));
|
|
1118
|
+
const nested = await prepareSandboxManagedRuntime({
|
|
1119
|
+
spec: { ...input.spec, remoteCwd: path.posix.join(workspaceRemoteDir, repository.path) },
|
|
1120
|
+
client: input.client,
|
|
1121
|
+
adapterKey: input.adapterKey,
|
|
1122
|
+
workspaceLocalDir: localDir,
|
|
1123
|
+
workspaceInboundMode: "adopt_remote",
|
|
1124
|
+
workspaceGitSnapshot: repository.snapshot,
|
|
1125
|
+
workspaceExclude: nestedExclude,
|
|
1126
|
+
workspaceBaseline: {
|
|
1127
|
+
exclude: mergeExcludes(SANDBOX_WORKSPACE_HEAVY_DIR_EXCLUDES, [...GIT_ARCHIVE_EXCLUDES], [".paperclip-runtime"], nestedExclude),
|
|
1128
|
+
entries: new Map([...baselineSnapshot.entries]
|
|
1129
|
+
.filter(([entry]) => entry.startsWith(prefix))
|
|
1130
|
+
.map(([entry, value]) => [entry.slice(prefix.length), value])),
|
|
1131
|
+
},
|
|
1132
|
+
onRuntimeProgress: input.onRuntimeProgress,
|
|
1133
|
+
});
|
|
1134
|
+
await nested.restoreWorkspace(restoreSink);
|
|
1135
|
+
}
|
|
1136
|
+
await withTempDir("paperclip-sandbox-restore-", async (tempDir) => {
|
|
1137
|
+
let importedRef = null;
|
|
1138
|
+
let importedHead = null;
|
|
1139
|
+
let remoteWorkspaceStatus = "dirty";
|
|
1140
|
+
try {
|
|
1141
|
+
if (gitSnapshot) {
|
|
1142
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "export", "Exporting git changes from environment");
|
|
1143
|
+
importedRef = createImportedGitRef("sandbox");
|
|
1144
|
+
const remoteGitBundle = path.posix.join(runtimeRootDir, "git-delta.bundle");
|
|
1145
|
+
const remoteWorkspaceStatusPath = path.posix.join(runtimeRootDir, "workspace-status.txt");
|
|
1146
|
+
const exportRef = createRemoteGitExportRef("sandbox");
|
|
1147
|
+
const localBundlePath = path.join(tempDir, "git-delta.bundle");
|
|
1148
|
+
// Export the sandbox history and import it into the host workspace.
|
|
1149
|
+
// The delta bundle assumes the host holds the bundle's boundary
|
|
1150
|
+
// commit; when the host has been reset far enough that it does not,
|
|
1151
|
+
// the import fails on a missing prerequisite. In that case re-export
|
|
1152
|
+
// a full, self-contained bundle from the still-live sandbox rather
|
|
1153
|
+
// than discard the completed run.
|
|
1154
|
+
const exportAndImport = async (forceFullBundle) => {
|
|
1155
|
+
await input.client.run(`sh -c ${shellQuote(buildRemoteGitDeltaBundleScript({
|
|
1156
|
+
remoteDir: workspaceRemoteDir,
|
|
1157
|
+
baseSha: gitSnapshot.headCommit,
|
|
1158
|
+
exportRef,
|
|
1159
|
+
bundlePath: remoteGitBundle,
|
|
1160
|
+
statusPath: forceFullBundle ? undefined : remoteWorkspaceStatusPath,
|
|
1161
|
+
forceFullBundle,
|
|
1162
|
+
}))}`, { timeoutMs: input.spec.timeoutMs });
|
|
1163
|
+
const gitExport = makeTransferProgress(restoreSink, "Exporting git history", "from", undefined, { sink: input.onRuntimeProgress, phase: "export" });
|
|
1164
|
+
if (nativeSyncOut) {
|
|
1165
|
+
// Native outbound: the provider copies the bundle straight from
|
|
1166
|
+
// the sandbox into the host restore temp directory. This maps to
|
|
1167
|
+
// one `kind: "file"` mapping. The host does not buffer the full
|
|
1168
|
+
// bundle in RAM and does not move the bytes through the base64
|
|
1169
|
+
// read loop. The git import step below reads the bundle from
|
|
1170
|
+
// `localBundlePath`. The provider transfer reports its own byte
|
|
1171
|
+
// total, so the "Exporting git history" progress still degrades to
|
|
1172
|
+
// start-and-finish (mirrors the workspace restore below), but the
|
|
1173
|
+
// finish line carries the real transferred byte count.
|
|
1174
|
+
const operations = [{
|
|
1175
|
+
operationId: nextSyncOperationId(),
|
|
1176
|
+
files: [{
|
|
1177
|
+
sourcePath: remoteGitBundle,
|
|
1178
|
+
targetPath: localBundlePath,
|
|
1179
|
+
kind: "file",
|
|
1180
|
+
}],
|
|
1181
|
+
}];
|
|
1182
|
+
assertSyncOperationsConfined(operations, {
|
|
1183
|
+
sourceRoots: [runtimeRootDir],
|
|
1184
|
+
targetRoots: [tempDir],
|
|
1185
|
+
});
|
|
1186
|
+
const syncResult = await input.client.syncOut(operations);
|
|
1187
|
+
const transferredBytes = sumSyncResultBytes(syncResult);
|
|
1188
|
+
await gitExport.finish(transferredBytes, transferredBytes);
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
const bundleBytes = await input.client.readFile(remoteGitBundle, gitExport.options);
|
|
1192
|
+
const bundleBuffer = toBuffer(bundleBytes);
|
|
1193
|
+
await gitExport.finish(bundleBuffer.byteLength, bundleBuffer.byteLength);
|
|
1194
|
+
await fs.writeFile(localBundlePath, bundleBuffer);
|
|
1195
|
+
}
|
|
1196
|
+
await input.client.remove(remoteGitBundle).catch(() => undefined);
|
|
1197
|
+
if (!forceFullBundle) {
|
|
1198
|
+
remoteWorkspaceStatus = await input.client.readFile(remoteWorkspaceStatusPath)
|
|
1199
|
+
.then((bytes) => toBuffer(bytes).toString("utf8").trim())
|
|
1200
|
+
.catch(() => "dirty");
|
|
1201
|
+
remoteWorkspaceStatus = remoteWorkspaceStatus === "clean" ? "clean" : "dirty";
|
|
1202
|
+
await input.client.remove(remoteWorkspaceStatusPath).catch(() => undefined);
|
|
1203
|
+
}
|
|
1204
|
+
return fetchGitBundleIntoLocalRef({
|
|
1205
|
+
localDir: input.workspaceLocalDir,
|
|
1206
|
+
bundlePath: localBundlePath,
|
|
1207
|
+
exportRef,
|
|
1208
|
+
importedRef: importedRef,
|
|
1209
|
+
baseSha: gitSnapshot.headCommit,
|
|
1210
|
+
});
|
|
1211
|
+
};
|
|
1212
|
+
try {
|
|
1213
|
+
importedHead = await exportAndImport(false);
|
|
1214
|
+
}
|
|
1215
|
+
catch (error) {
|
|
1216
|
+
if (!isMissingGitPrerequisiteError(error))
|
|
1217
|
+
throw error;
|
|
1218
|
+
importedHead = await exportAndImport(true);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "restore", "Restoring workspace from environment");
|
|
1222
|
+
const extractedDir = path.join(tempDir, "workspace");
|
|
1223
|
+
if (nativeSyncOut) {
|
|
1224
|
+
// Native outbound: the provider materializes the sandbox workspace into
|
|
1225
|
+
// a fresh host directory. It is a clean destroy-then-replace into a
|
|
1226
|
+
// temp dir the orchestrator just created, so it maps exactly to a
|
|
1227
|
+
// generic directory file mapping; the host-side baseline merge below is
|
|
1228
|
+
// unchanged. The provider transfer reports its own byte total, so the
|
|
1229
|
+
// finish line carries the real transferred byte count.
|
|
1230
|
+
const operations = [{
|
|
1231
|
+
operationId: nextSyncOperationId(),
|
|
1232
|
+
files: [{
|
|
1233
|
+
sourcePath: workspaceRemoteDir,
|
|
1234
|
+
targetPath: extractedDir,
|
|
1235
|
+
kind: "directory",
|
|
1236
|
+
exclude: workspaceRestoreExclude,
|
|
1237
|
+
}],
|
|
1238
|
+
}];
|
|
1239
|
+
assertSyncOperationsConfined(operations, {
|
|
1240
|
+
sourceRoots: [workspaceRemoteDir],
|
|
1241
|
+
targetRoots: [extractedDir],
|
|
1242
|
+
});
|
|
1243
|
+
await fs.mkdir(extractedDir, { recursive: true });
|
|
1244
|
+
const workspaceRestore = makeTransferProgress(restoreSink, "Restoring", "from", "workspace", { sink: input.onRuntimeProgress, phase: "restore" });
|
|
1245
|
+
const syncResult = await input.client.syncOut(operations);
|
|
1246
|
+
const transferredBytes = sumSyncResultBytes(syncResult);
|
|
1247
|
+
await workspaceRestore.finish(transferredBytes, transferredBytes);
|
|
1248
|
+
}
|
|
1249
|
+
else {
|
|
1250
|
+
const remoteWorkspaceTar = path.posix.join(runtimeRootDir, "workspace-download.tar");
|
|
1251
|
+
await input.client.run(`sh -c ${shellQuote(createRemoteTarballFromDirectoryCommand({
|
|
1252
|
+
remoteDir: workspaceRemoteDir,
|
|
1253
|
+
archivePath: remoteWorkspaceTar,
|
|
1254
|
+
exclude: workspaceRestoreExclude,
|
|
1255
|
+
}))}`, { timeoutMs: input.spec.timeoutMs });
|
|
1256
|
+
const workspaceRestore = makeTransferProgress(restoreSink, "Restoring", "from", "workspace", { sink: input.onRuntimeProgress, phase: "restore" });
|
|
1257
|
+
const archiveBytes = await input.client.readFile(remoteWorkspaceTar, workspaceRestore.options);
|
|
1258
|
+
const archiveBuffer = toBuffer(archiveBytes);
|
|
1259
|
+
await workspaceRestore.finish(archiveBuffer.byteLength, archiveBuffer.byteLength);
|
|
1260
|
+
await input.client.remove(remoteWorkspaceTar).catch(() => undefined);
|
|
1261
|
+
const localArchivePath = path.join(tempDir, "workspace.tar");
|
|
1262
|
+
await fs.writeFile(localArchivePath, archiveBuffer);
|
|
1263
|
+
await extractTarballToDirectory({
|
|
1264
|
+
archivePath: localArchivePath,
|
|
1265
|
+
localDir: extractedDir,
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
const gitHeadToIntegrate = importedHead;
|
|
1269
|
+
await mergeDirectoryWithBaseline({
|
|
1270
|
+
baseline: repositories.length === 0 ? baselineSnapshot : {
|
|
1271
|
+
exclude: workspaceRestoreExclude,
|
|
1272
|
+
entries: new Map([...baselineSnapshot.entries].filter(([entry]) => !repositories.some((repo) => entry === repo.path || entry.startsWith(`${repo.path}/`)))),
|
|
1273
|
+
},
|
|
1274
|
+
sourceDir: extractedDir,
|
|
1275
|
+
targetDir: input.workspaceLocalDir,
|
|
1276
|
+
beforeApply: gitHeadToIntegrate
|
|
1277
|
+
? async () => {
|
|
1278
|
+
await integrateImportedGitHead({
|
|
1279
|
+
localDir: input.workspaceLocalDir,
|
|
1280
|
+
importedHead: gitHeadToIntegrate,
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
: undefined,
|
|
1284
|
+
afterApply: gitSnapshot
|
|
1285
|
+
? async () => {
|
|
1286
|
+
await resetLocalGitIndexToHead({
|
|
1287
|
+
localDir: input.workspaceLocalDir,
|
|
1288
|
+
checkWorkingTreeClean: remoteWorkspaceStatus === "clean",
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
: undefined,
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
finally {
|
|
1295
|
+
await emitRuntimeStatus(input.onRuntimeProgress, "finalize", "Finalizing workspace");
|
|
1296
|
+
if (importedRef) {
|
|
1297
|
+
await deleteLocalGitRef({ localDir: input.workspaceLocalDir, ref: importedRef });
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
}));
|
|
1302
|
+
}
|
|
1303
|
+
// One restore task per asset that has a teardown contribution. Each task
|
|
1304
|
+
// reads its asset back through `readFile` and writes a disjoint host
|
|
1305
|
+
// target. Each task gets its own restore temp directory.
|
|
1306
|
+
for (const asset of input.assets ?? []) {
|
|
1307
|
+
if (!asset.restore)
|
|
1308
|
+
continue;
|
|
1309
|
+
const assetRestore = asset.restore;
|
|
1310
|
+
const assetKey = asset.key;
|
|
1311
|
+
outboundTasks.push(() => runStepSpan(`restore.asset.${assetKey}`, async () => {
|
|
1312
|
+
await withTempDir("paperclip-sandbox-restore-", async (tempDir) => {
|
|
1313
|
+
await assetRestore({
|
|
1314
|
+
assetDir: path.posix.join(runtimeRootDir, assetKey),
|
|
1315
|
+
readFile: async (remotePath) => toBuffer(await input.client.readFile(remotePath)),
|
|
1316
|
+
tempDir,
|
|
1317
|
+
});
|
|
1318
|
+
});
|
|
1319
|
+
}));
|
|
1320
|
+
}
|
|
1321
|
+
// Run every outbound restore through the shared scheduler. It starts the
|
|
1322
|
+
// tasks under the client concurrency permission and the bound, and it
|
|
1323
|
+
// settles every started task before it returns. This is the teardown
|
|
1324
|
+
// barrier.
|
|
1325
|
+
const outboundResults = await scheduleSyncOperations(outboundTasks, input.client.allowConcurrentSyncOperations === true, SYNC_OPERATION_CONCURRENCY_LIMIT);
|
|
1326
|
+
// Every outbound restore is a required operation: a rejection is fatal.
|
|
1327
|
+
// The workspace comes first, then each asset in order. Raise the first
|
|
1328
|
+
// rejection in stable task order, so two failures raise the earlier one.
|
|
1329
|
+
for (const result of outboundResults) {
|
|
1330
|
+
if (result.status === "rejected") {
|
|
1331
|
+
throw result.reason;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
//# sourceMappingURL=sandbox-managed-runtime.js.map
|