pi-codex-auto-review 0.1.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/LICENSE +201 -0
- package/NOTICE +10 -0
- package/README.md +77 -0
- package/dist/approvals.d.ts +72 -0
- package/dist/approvals.js +167 -0
- package/dist/approvals.js.map +1 -0
- package/dist/audit.d.ts +28 -0
- package/dist/audit.js +40 -0
- package/dist/audit.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +70 -0
- package/dist/cli.js.map +1 -0
- package/dist/context-files.d.ts +14 -0
- package/dist/context-files.js +113 -0
- package/dist/context-files.js.map +1 -0
- package/dist/contracts.d.ts +258 -0
- package/dist/contracts.js +102 -0
- package/dist/contracts.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/native/darwin-arm64/artifact.json +5 -0
- package/dist/native/darwin-arm64/pi-guard-execpolicy +0 -0
- package/dist/native/linux-x64/artifact.json +5 -0
- package/dist/native/linux-x64/pi-guard-execpolicy +0 -0
- package/dist/policy/domains.d.ts +5 -0
- package/dist/policy/domains.js +18 -0
- package/dist/policy/domains.js.map +1 -0
- package/dist/policy/index.d.ts +56 -0
- package/dist/policy/index.js +304 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/paths.d.ts +5 -0
- package/dist/policy/paths.js +54 -0
- package/dist/policy/paths.js.map +1 -0
- package/dist/policy/rules.d.ts +36 -0
- package/dist/policy/rules.js +61 -0
- package/dist/policy/rules.js.map +1 -0
- package/dist/policy/shell.d.ts +14 -0
- package/dist/policy/shell.js +122 -0
- package/dist/policy/shell.js.map +1 -0
- package/dist/reports.d.ts +21 -0
- package/dist/reports.js +42 -0
- package/dist/reports.js.map +1 -0
- package/dist/review/context.d.ts +25 -0
- package/dist/review/context.js +108 -0
- package/dist/review/context.js.map +1 -0
- package/dist/review/investigation.d.ts +39 -0
- package/dist/review/investigation.js +36 -0
- package/dist/review/investigation.js.map +1 -0
- package/dist/review/lifecycle.d.ts +29 -0
- package/dist/review/lifecycle.js +71 -0
- package/dist/review/lifecycle.js.map +1 -0
- package/dist/review/policy.d.ts +4 -0
- package/dist/review/policy.js +15 -0
- package/dist/review/policy.js.map +1 -0
- package/dist/review/upstream-policy.d.ts +2 -0
- package/dist/review/upstream-policy.js +210 -0
- package/dist/review/upstream-policy.js.map +1 -0
- package/dist/reviewer.d.ts +45 -0
- package/dist/reviewer.js +148 -0
- package/dist/reviewer.js.map +1 -0
- package/dist/sandbox/broker.d.ts +1 -0
- package/dist/sandbox/broker.js +135 -0
- package/dist/sandbox/broker.js.map +1 -0
- package/dist/sandbox/config.d.ts +5 -0
- package/dist/sandbox/config.js +91 -0
- package/dist/sandbox/config.js.map +1 -0
- package/dist/sandbox/executor.d.ts +20 -0
- package/dist/sandbox/executor.js +144 -0
- package/dist/sandbox/executor.js.map +1 -0
- package/dist/sandbox/hard-links.d.ts +4 -0
- package/dist/sandbox/hard-links.js +145 -0
- package/dist/sandbox/hard-links.js.map +1 -0
- package/dist/sandbox/linux-read-paths.d.ts +7 -0
- package/dist/sandbox/linux-read-paths.js +47 -0
- package/dist/sandbox/linux-read-paths.js.map +1 -0
- package/dist/sandbox/paths.d.ts +3 -0
- package/dist/sandbox/paths.js +10 -0
- package/dist/sandbox/paths.js.map +1 -0
- package/dist/sandbox/runtime-write-paths.d.ts +2 -0
- package/dist/sandbox/runtime-write-paths.js +8 -0
- package/dist/sandbox/runtime-write-paths.js.map +1 -0
- package/dist/sandbox/seccomp.d.ts +5 -0
- package/dist/sandbox/seccomp.js +16 -0
- package/dist/sandbox/seccomp.js.map +1 -0
- package/dist/sandbox/worker.d.ts +1 -0
- package/dist/sandbox/worker.js +73 -0
- package/dist/sandbox/worker.js.map +1 -0
- package/dist/signals.d.ts +10 -0
- package/dist/signals.js +21 -0
- package/dist/signals.js.map +1 -0
- package/dist/startup.d.ts +22 -0
- package/dist/startup.js +100 -0
- package/dist/startup.js.map +1 -0
- package/dist/tools/controller.d.ts +63 -0
- package/dist/tools/controller.js +286 -0
- package/dist/tools/controller.js.map +1 -0
- package/dist/tools/external.d.ts +30 -0
- package/dist/tools/external.js +24 -0
- package/dist/tools/external.js.map +1 -0
- package/dist/tools/mcp.d.ts +17 -0
- package/dist/tools/mcp.js +186 -0
- package/dist/tools/mcp.js.map +1 -0
- package/docs/publishing.md +73 -0
- package/docs/security/dependencies.md +43 -0
- package/docs/testing/auto-review-protection.md +130 -0
- package/docs/usage.md +217 -0
- package/native/execpolicy/LICENSE +201 -0
- package/native/execpolicy/NOTICE +6 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/LICENSE +201 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/README.md +901 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts +3 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js +472 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts +19 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js +17 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts +52 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js +153 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts +164 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js +246 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts +58 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js +128 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts +124 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js +258 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts +87 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js +138 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts +67 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js +113 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts +70 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js +171 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts +120 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js +281 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts +108 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js +208 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts +82 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js +155 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts +44 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js +220 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts +150 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js +678 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts +32 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js +111 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts +305 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js +2605 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts +55 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js +152 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts +12 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js +43 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts +116 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js +1195 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts +200 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js +443 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts +28 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js +114 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts +59 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js +159 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts +147 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js +445 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts +17 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js +163 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts +83 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js +212 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts +76 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js +221 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts +1691 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js +1233 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts +97 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js +1937 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts +113 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js +3 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts +411 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js +1408 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts +37 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js +125 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts +57 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js +332 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts +100 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js +546 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts +923 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js +1419 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts +31 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js +69 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts +7 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js +25 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts +15 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js +49 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts +17 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js +37 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts +27 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js +47 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts +9 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js +25 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js.map +1 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/package.json +88 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/build.ts +95 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/srt-proxy-agent.jar +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/arm64/apply-seccomp +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/build.ts +69 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/x64/apply-seccomp +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/arm64/srt-win.exe +0 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/build.ts +28 -0
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/x64/srt-win.exe +0 -0
- package/node_modules/@pondwader/socks5-server/.github/workflows/ci.yml +27 -0
- package/node_modules/@pondwader/socks5-server/LICENSE +20 -0
- package/node_modules/@pondwader/socks5-server/README.md +151 -0
- package/node_modules/@pondwader/socks5-server/dist/index.d.mts +87 -0
- package/node_modules/@pondwader/socks5-server/dist/index.d.ts +87 -0
- package/node_modules/@pondwader/socks5-server/dist/index.js +346 -0
- package/node_modules/@pondwader/socks5-server/dist/index.mjs +307 -0
- package/node_modules/@pondwader/socks5-server/package.json +31 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1157 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2509 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +520 -0
- package/node_modules/commander/lib/option.js +330 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +84 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +969 -0
- package/node_modules/node-forge/.editorconfig +17 -0
- package/node_modules/node-forge/.eslintrc.js +24 -0
- package/node_modules/node-forge/.github/workflows/main.yaml +96 -0
- package/node_modules/node-forge/.istanbul.yml +2 -0
- package/node_modules/node-forge/.npmignore +15 -0
- package/node_modules/node-forge/CHANGELOG.md +555 -0
- package/node_modules/node-forge/CONTRIBUTING.md +18 -0
- package/node_modules/node-forge/LICENSE +331 -0
- package/node_modules/node-forge/README.md +2071 -0
- package/node_modules/node-forge/RELEASE.md +19 -0
- package/node_modules/node-forge/SECURITY.md +5 -0
- package/node_modules/node-forge/examples/create-cert.js +110 -0
- package/node_modules/node-forge/examples/create-csr.js +66 -0
- package/node_modules/node-forge/examples/create-pkcs12.js +160 -0
- package/node_modules/node-forge/examples/imap.js +46 -0
- package/node_modules/node-forge/examples/sign-p7.js +115 -0
- package/node_modules/node-forge/examples/tls.js +189 -0
- package/node_modules/node-forge/flash/PooledSocket.as +18 -0
- package/node_modules/node-forge/flash/README.md +48 -0
- package/node_modules/node-forge/flash/SocketEvent.as +36 -0
- package/node_modules/node-forge/flash/SocketPool.as +754 -0
- package/node_modules/node-forge/flash/mod_fsp/README +135 -0
- package/node_modules/node-forge/flash/mod_fsp/mod_fsp.c +415 -0
- package/node_modules/node-forge/flash/package.json +28 -0
- package/node_modules/node-forge/flash/policyserver.js +65 -0
- package/node_modules/node-forge/flash/policyserver.py +112 -0
- package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
- package/node_modules/node-forge/karma-sauce.conf.js +79 -0
- package/node_modules/node-forge/karma.conf.js +133 -0
- package/node_modules/node-forge/lib/aes.js +1091 -0
- package/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
- package/node_modules/node-forge/lib/asn1-validator.js +91 -0
- package/node_modules/node-forge/lib/asn1.js +1503 -0
- package/node_modules/node-forge/lib/baseN.js +186 -0
- package/node_modules/node-forge/lib/cipher.js +230 -0
- package/node_modules/node-forge/lib/cipherModes.js +999 -0
- package/node_modules/node-forge/lib/des.js +496 -0
- package/node_modules/node-forge/lib/ed25519.js +1091 -0
- package/node_modules/node-forge/lib/forge.js +13 -0
- package/node_modules/node-forge/lib/form.js +149 -0
- package/node_modules/node-forge/lib/hmac.js +146 -0
- package/node_modules/node-forge/lib/http.js +1346 -0
- package/node_modules/node-forge/lib/index.all.js +16 -0
- package/node_modules/node-forge/lib/index.js +33 -0
- package/node_modules/node-forge/lib/jsbn.js +1294 -0
- package/node_modules/node-forge/lib/kem.js +168 -0
- package/node_modules/node-forge/lib/log.js +319 -0
- package/node_modules/node-forge/lib/md.all.js +13 -0
- package/node_modules/node-forge/lib/md.js +11 -0
- package/node_modules/node-forge/lib/md5.js +289 -0
- package/node_modules/node-forge/lib/mgf.js +12 -0
- package/node_modules/node-forge/lib/mgf1.js +57 -0
- package/node_modules/node-forge/lib/oids.js +180 -0
- package/node_modules/node-forge/lib/pbe.js +1023 -0
- package/node_modules/node-forge/lib/pbkdf2.js +211 -0
- package/node_modules/node-forge/lib/pem.js +237 -0
- package/node_modules/node-forge/lib/pkcs1.js +276 -0
- package/node_modules/node-forge/lib/pkcs12.js +1078 -0
- package/node_modules/node-forge/lib/pkcs7.js +1260 -0
- package/node_modules/node-forge/lib/pkcs7asn1.js +410 -0
- package/node_modules/node-forge/lib/pki.js +102 -0
- package/node_modules/node-forge/lib/prime.js +297 -0
- package/node_modules/node-forge/lib/prime.worker.js +168 -0
- package/node_modules/node-forge/lib/prng.js +419 -0
- package/node_modules/node-forge/lib/pss.js +241 -0
- package/node_modules/node-forge/lib/random.js +191 -0
- package/node_modules/node-forge/lib/rc2.js +410 -0
- package/node_modules/node-forge/lib/rsa.js +1973 -0
- package/node_modules/node-forge/lib/sha1.js +319 -0
- package/node_modules/node-forge/lib/sha256.js +327 -0
- package/node_modules/node-forge/lib/sha512.js +561 -0
- package/node_modules/node-forge/lib/socket.js +287 -0
- package/node_modules/node-forge/lib/ssh.js +236 -0
- package/node_modules/node-forge/lib/tls.js +4282 -0
- package/node_modules/node-forge/lib/tlssocket.js +249 -0
- package/node_modules/node-forge/lib/util.js +2652 -0
- package/node_modules/node-forge/lib/x509.js +3251 -0
- package/node_modules/node-forge/lib/xhr.js +738 -0
- package/node_modules/node-forge/package.json +123 -0
- package/node_modules/node-forge/tests/.eslintrc.js +5 -0
- package/node_modules/node-forge/tests/README.md +4 -0
- package/node_modules/node-forge/tests/benchmarks/aes-speed.js +62 -0
- package/node_modules/node-forge/tests/benchmarks/so-44303784.js +246 -0
- package/node_modules/node-forge/tests/flash/README.md +7 -0
- package/node_modules/node-forge/tests/flash/Test.as +96 -0
- package/node_modules/node-forge/tests/flash/build-flash.xml +7 -0
- package/node_modules/node-forge/tests/flash/index.html +28 -0
- package/node_modules/node-forge/tests/index.html +33 -0
- package/node_modules/node-forge/tests/issues/heartbleed.js +55 -0
- package/node_modules/node-forge/tests/issues/issue-428.html +95 -0
- package/node_modules/node-forge/tests/issues/issue-428.js +375 -0
- package/node_modules/node-forge/tests/karma/index.js +8 -0
- package/node_modules/node-forge/tests/karma/testWorker.js +65 -0
- package/node_modules/node-forge/tests/karma/web-worker-rsa.js +55 -0
- package/node_modules/node-forge/tests/legacy/common.html +65 -0
- package/node_modules/node-forge/tests/legacy/common.js +2199 -0
- package/node_modules/node-forge/tests/legacy/form.html +148 -0
- package/node_modules/node-forge/tests/legacy/form.js +40 -0
- package/node_modules/node-forge/tests/legacy/http.html +235 -0
- package/node_modules/node-forge/tests/legacy/index.html +70 -0
- package/node_modules/node-forge/tests/legacy/keygen.html +113 -0
- package/node_modules/node-forge/tests/legacy/login.css +26 -0
- package/node_modules/node-forge/tests/legacy/loginDemo.html +32 -0
- package/node_modules/node-forge/tests/legacy/loginDemo.js +149 -0
- package/node_modules/node-forge/tests/legacy/performance.html +533 -0
- package/node_modules/node-forge/tests/legacy/result.txt +1 -0
- package/node_modules/node-forge/tests/legacy/socketPool.html +302 -0
- package/node_modules/node-forge/tests/legacy/tasks.html +54 -0
- package/node_modules/node-forge/tests/legacy/tasks.js +378 -0
- package/node_modules/node-forge/tests/legacy/tls.html +389 -0
- package/node_modules/node-forge/tests/legacy/webid.html +89 -0
- package/node_modules/node-forge/tests/legacy/webid.js +313 -0
- package/node_modules/node-forge/tests/legacy/ws-webid.js +120 -0
- package/node_modules/node-forge/tests/legacy/xhr.html +67 -0
- package/node_modules/node-forge/tests/legacy/xhr.js +590 -0
- package/node_modules/node-forge/tests/pocs/ghsa-2328-f5f3-gj25.js +85 -0
- package/node_modules/node-forge/tests/pocs/ghsa-ppp5-5v6c-4jwp.js +166 -0
- package/node_modules/node-forge/tests/pocs/ghsa-q67f-28xg-22rw.js +103 -0
- package/node_modules/node-forge/tests/security/cve-2025-12816.js +75 -0
- package/node_modules/node-forge/tests/security/ghsa-554w-wpv2-vw27.js +81 -0
- package/node_modules/node-forge/tests/security/index.js +3 -0
- package/node_modules/node-forge/tests/server.crt +26 -0
- package/node_modules/node-forge/tests/server.js +87 -0
- package/node_modules/node-forge/tests/server.key +27 -0
- package/node_modules/node-forge/tests/support/task.js +718 -0
- package/node_modules/node-forge/tests/tests.css +61 -0
- package/node_modules/node-forge/tests/unit/aes.js +1498 -0
- package/node_modules/node-forge/tests/unit/asn1.js +1337 -0
- package/node_modules/node-forge/tests/unit/csr.js +129 -0
- package/node_modules/node-forge/tests/unit/des.js +231 -0
- package/node_modules/node-forge/tests/unit/ed25519.js +395 -0
- package/node_modules/node-forge/tests/unit/forge.js +2 -0
- package/node_modules/node-forge/tests/unit/hmac.js +64 -0
- package/node_modules/node-forge/tests/unit/index.html +20 -0
- package/node_modules/node-forge/tests/unit/index.js +27 -0
- package/node_modules/node-forge/tests/unit/jsbn.js +40 -0
- package/node_modules/node-forge/tests/unit/kem.js +167 -0
- package/node_modules/node-forge/tests/unit/md5.js +114 -0
- package/node_modules/node-forge/tests/unit/mgf1.js +16 -0
- package/node_modules/node-forge/tests/unit/pbkdf2.js +182 -0
- package/node_modules/node-forge/tests/unit/pem.js +159 -0
- package/node_modules/node-forge/tests/unit/pkcs1.js +1077 -0
- package/node_modules/node-forge/tests/unit/pkcs12.js +739 -0
- package/node_modules/node-forge/tests/unit/pkcs7.js +792 -0
- package/node_modules/node-forge/tests/unit/random.js +48 -0
- package/node_modules/node-forge/tests/unit/rc2.js +88 -0
- package/node_modules/node-forge/tests/unit/rsa.js +1278 -0
- package/node_modules/node-forge/tests/unit/sha1.js +72 -0
- package/node_modules/node-forge/tests/unit/sha256.js +79 -0
- package/node_modules/node-forge/tests/unit/sha512.js +200 -0
- package/node_modules/node-forge/tests/unit/ssh.js +175 -0
- package/node_modules/node-forge/tests/unit/tls.js +175 -0
- package/node_modules/node-forge/tests/unit/util.js +595 -0
- package/node_modules/node-forge/tests/unit/x509.js +1986 -0
- package/node_modules/node-forge/tests/websockets/server-webid.js +495 -0
- package/node_modules/node-forge/tests/websockets/server-ws.js +158 -0
- package/node_modules/node-forge/webpack-tests.config.js +26 -0
- package/node_modules/node-forge/webpack.config.js +130 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -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 +56 -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 +551 -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 +257 -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 +110 -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 +207 -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 +21 -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 +434 -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 +194 -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 +916 -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 +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -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 +210 -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 +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -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 +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -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 +86 -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 +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -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/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -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 +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -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/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -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 +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -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 +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -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 +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -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 +22 -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 +2 -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 +9 -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 +124 -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 +2 -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 +2 -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 +137 -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 +33 -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 +111 -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/standard-schema.cjs +2 -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 +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -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 +47 -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 +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -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 +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -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/index.cjs +22 -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 +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -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 +47 -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 +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -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 +60 -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 +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -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 +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { realpath, access } from 'node:fs/promises';
|
|
2
|
+
import { dirname, isAbsolute, relative, resolve, sep, join } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { GuardError } from '../contracts.js';
|
|
6
|
+
export function isWithin(path, root) {
|
|
7
|
+
const rel = relative(root, path);
|
|
8
|
+
return rel === '' || (!rel.startsWith(`..${sep}`) && rel !== '..' && !isAbsolute(rel));
|
|
9
|
+
}
|
|
10
|
+
/** Pi 0.99.1 file-input semantics, including its screenshot filename variants. */
|
|
11
|
+
export async function resolveToolPath(input, cwd, isRead = false, homeDir = homedir()) {
|
|
12
|
+
if (typeof input !== 'string' || input.includes('\0'))
|
|
13
|
+
throw new GuardError('INVALID_PATH', 'Invalid file input');
|
|
14
|
+
let path = input.replace(/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g, ' ').replace(/^@/, '');
|
|
15
|
+
if (path === '~')
|
|
16
|
+
path = homeDir;
|
|
17
|
+
else if (path.startsWith('~/'))
|
|
18
|
+
path = join(homeDir, path.slice(2));
|
|
19
|
+
else if (path.startsWith('file://'))
|
|
20
|
+
path = fileURLToPath(path);
|
|
21
|
+
const resolved = resolve(cwd, path);
|
|
22
|
+
if (!isRead)
|
|
23
|
+
return resolved;
|
|
24
|
+
const nfd = resolved.normalize('NFD');
|
|
25
|
+
for (const candidate of [...new Set([resolved, resolved.replace(/ (AM|PM)\./gi, '\u202F$1.'), nfd, resolved.replace(/'/g, '\u2019'), nfd.replace(/'/g, '\u2019')])]) {
|
|
26
|
+
try {
|
|
27
|
+
await access(candidate);
|
|
28
|
+
return candidate;
|
|
29
|
+
}
|
|
30
|
+
catch { }
|
|
31
|
+
}
|
|
32
|
+
return resolved;
|
|
33
|
+
}
|
|
34
|
+
/** Resolve existing ancestors as well as missing write targets, never just string prefixes. */
|
|
35
|
+
export async function canonicalPath(path, cwd) {
|
|
36
|
+
if (typeof path !== 'string' || !path || path.includes('\0'))
|
|
37
|
+
throw new GuardError('INVALID_PATH', 'Invalid path');
|
|
38
|
+
const absolute = resolve(cwd, path);
|
|
39
|
+
let ancestor = absolute;
|
|
40
|
+
for (;;) {
|
|
41
|
+
try {
|
|
42
|
+
return resolve(await realpath(ancestor), relative(ancestor, absolute));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (!['ENOENT', 'ENOTDIR'].includes(error.code ?? ''))
|
|
46
|
+
throw error;
|
|
47
|
+
const parent = dirname(ancestor);
|
|
48
|
+
if (parent === ancestor)
|
|
49
|
+
throw new GuardError('INVALID_PATH', 'Cannot resolve path', { cause: error });
|
|
50
|
+
ancestor = parent;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/policy/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,I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K,CAAC;YAC9F,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,QAAQ;gBAAE,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,qBAAqB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACvG,QAAQ,GAAG,MAAM,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface PrefixRule {
|
|
2
|
+
readonly pattern: readonly (string | readonly string[])[];
|
|
3
|
+
readonly decision: 'allow' | 'prompt' | 'forbidden';
|
|
4
|
+
readonly justification?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function matchesRule(argv: readonly string[], rule: PrefixRule): boolean;
|
|
7
|
+
export declare const CODEX_EXECPOLICY_REVISION = "a956835d020762cb2b570053af06f643a11c0ecc";
|
|
8
|
+
export interface RuleSource {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly source: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RuleMatch {
|
|
13
|
+
readonly decision: PrefixRule['decision'];
|
|
14
|
+
readonly justification?: string | null;
|
|
15
|
+
readonly matchedPrefix: readonly string[];
|
|
16
|
+
readonly resolvedProgram?: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface CompiledRules {
|
|
19
|
+
readonly revision: string;
|
|
20
|
+
readonly rules: readonly PrefixRule[];
|
|
21
|
+
readonly matches: readonly (readonly RuleMatch[])[];
|
|
22
|
+
readonly allowedDomains: readonly string[];
|
|
23
|
+
readonly deniedDomains: readonly string[];
|
|
24
|
+
readonly networkRules: readonly {
|
|
25
|
+
host: string;
|
|
26
|
+
protocol: string;
|
|
27
|
+
decision: PrefixRule['decision'];
|
|
28
|
+
justification?: string | null;
|
|
29
|
+
}[];
|
|
30
|
+
readonly hostExecutables: Readonly<Record<string, readonly string[]>>;
|
|
31
|
+
}
|
|
32
|
+
/** Compatibility reader; parsing and example validation run in Codex's actual Starlark engine. */
|
|
33
|
+
export declare function parseRules(source: string): readonly PrefixRule[];
|
|
34
|
+
export declare function evaluateRules(sources: readonly RuleSource[], commands?: readonly (readonly string[])[], signal?: AbortSignal): Promise<CompiledRules>;
|
|
35
|
+
/** Advanced scripts are matched as the real outer shell invocation, never as a safe inner prefix. */
|
|
36
|
+
export declare function ruleCommands(command: string, shellPath?: string, depth?: number): readonly (readonly string[])[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { basename } from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { execFile, spawnSync } from 'node:child_process';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
5
|
+
import { GuardError, immutable } from '../contracts.js';
|
|
6
|
+
import { analyzeShell } from './shell.js';
|
|
7
|
+
export function matchesRule(argv, rule) {
|
|
8
|
+
return rule.pattern.length <= argv.length && rule.pattern.every((part, index) => typeof part === 'string' ? part === argv[index] : part.includes(argv[index]));
|
|
9
|
+
}
|
|
10
|
+
export const CODEX_EXECPOLICY_REVISION = 'a956835d020762cb2b570053af06f643a11c0ecc';
|
|
11
|
+
const MAX_BYTES = 8 * 1024 * 1024;
|
|
12
|
+
const helper = fileURLToPath(new URL(`../native/${process.platform}-${process.arch}/pi-guard-execpolicy${process.platform === 'win32' ? '.exe' : ''}`, import.meta.url));
|
|
13
|
+
const helperEnvironment = process.platform === 'win32' ? { SystemRoot: process.env.SystemRoot } : {};
|
|
14
|
+
const execute = promisify(execFile);
|
|
15
|
+
function request(sources, commands) {
|
|
16
|
+
const input = JSON.stringify({ sources, commands });
|
|
17
|
+
if (Buffer.byteLength(input) > MAX_BYTES)
|
|
18
|
+
throw new GuardError('INVALID_RULES', 'Rule request exceeds the supported size');
|
|
19
|
+
return input;
|
|
20
|
+
}
|
|
21
|
+
function decode(stdout) {
|
|
22
|
+
const result = JSON.parse(stdout);
|
|
23
|
+
if (result.revision !== CODEX_EXECPOLICY_REVISION || !Array.isArray(result.rules) || !Array.isArray(result.matches) || !Array.isArray(result.allowedDomains) || !Array.isArray(result.deniedDomains))
|
|
24
|
+
throw new GuardError('INVALID_RULES', 'Unexpected Codex rule engine response');
|
|
25
|
+
return immutable(result);
|
|
26
|
+
}
|
|
27
|
+
/** Compatibility reader; parsing and example validation run in Codex's actual Starlark engine. */
|
|
28
|
+
export function parseRules(source) {
|
|
29
|
+
const result = spawnSync(helper, [], { input: request([{ name: 'inline.rules', source }], []), encoding: 'utf8', timeout: 10000, killSignal: 'SIGKILL', maxBuffer: MAX_BYTES, env: helperEnvironment });
|
|
30
|
+
if (result.error || result.status !== 0)
|
|
31
|
+
throw new GuardError('INVALID_RULES', `Codex rule engine failed: ${result.stderr?.slice(0, 4000) || result.error?.message || result.signal}`, { cause: result.error });
|
|
32
|
+
return decode(result.stdout).rules;
|
|
33
|
+
}
|
|
34
|
+
export async function evaluateRules(sources, commands = [], signal) {
|
|
35
|
+
const input = request(sources, commands);
|
|
36
|
+
try {
|
|
37
|
+
const running = execute(helper, [], { encoding: 'utf8', timeout: 10000, killSignal: 'SIGKILL', maxBuffer: MAX_BYTES, env: helperEnvironment, signal });
|
|
38
|
+
running.child.stdin?.end(input);
|
|
39
|
+
// A failed spawn can close stdin before its queued input has been delivered.
|
|
40
|
+
running.child.stdin?.on('error', () => { });
|
|
41
|
+
return decode((await running).stdout);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
throw new GuardError('INVALID_RULES', 'Codex rule engine could not evaluate the trusted rules', { cause: error });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** Advanced scripts are matched as the real outer shell invocation, never as a safe inner prefix. */
|
|
48
|
+
export function ruleCommands(command, shellPath = '/bin/bash', depth = 0) {
|
|
49
|
+
const parsed = analyzeShell(command);
|
|
50
|
+
if (!parsed.isSupported || parsed.commands.some(item => item.reads.length || item.writes.length) || depth > 4)
|
|
51
|
+
return [[shellPath, '-c', command]];
|
|
52
|
+
return parsed.commands.flatMap(item => {
|
|
53
|
+
if (['bash', 'sh', 'zsh', 'dash'].includes(basename(item.argv[0])) && item.argv.length === 3 && ['-c', '-lc'].includes(item.argv[1])) {
|
|
54
|
+
const inner = analyzeShell(item.argv[2]);
|
|
55
|
+
if (inner.isSupported && inner.commands.every(part => !part.reads.length && !part.writes.length))
|
|
56
|
+
return ruleCommands(item.argv[2], item.argv[0], depth + 1);
|
|
57
|
+
}
|
|
58
|
+
return [item.argv];
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/policy/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO1C,MAAM,UAAU,WAAW,CAAC,IAAuB,EAAE,IAAgB;IACnE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC,CAAC,CAAC;AAClK,CAAC;AACD,MAAM,CAAC,MAAM,yBAAyB,GAAG,0CAA0C,CAAC;AAYpF,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,G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AAC,CAAC;YAC1C,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;gBAAE,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAE,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QACjK,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ParsedCommand {
|
|
2
|
+
readonly argv: readonly string[];
|
|
3
|
+
readonly writes: readonly string[];
|
|
4
|
+
readonly reads: readonly string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ShellAnalysis {
|
|
7
|
+
readonly commands: readonly ParsedCommand[];
|
|
8
|
+
readonly isSupported: boolean;
|
|
9
|
+
readonly reason?: string;
|
|
10
|
+
}
|
|
11
|
+
/** A bounded literal grammar. Expansion/interpreters cannot borrow permission from their first word. */
|
|
12
|
+
export declare function analyzeShell(command: string): ShellAnalysis;
|
|
13
|
+
export declare function matchesPrefix(argv: readonly string[], prefix: readonly string[]): boolean;
|
|
14
|
+
export declare const INTERPRETERS: Set<string>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { GuardError } from '../contracts.js';
|
|
2
|
+
/** A bounded literal grammar. Expansion/interpreters cannot borrow permission from their first word. */
|
|
3
|
+
export function analyzeShell(command) {
|
|
4
|
+
if (typeof command !== 'string' || !command.trim() || command.includes('\0'))
|
|
5
|
+
throw new GuardError('INVALID_COMMAND', 'Invalid shell command');
|
|
6
|
+
if (command.length > 100_000)
|
|
7
|
+
return { commands: [], isSupported: false, reason: 'Command too long for literal analysis' };
|
|
8
|
+
const commands = [];
|
|
9
|
+
let argv = [], writes = [], reads = [], word = '', hasWord = false, quote = '', redirect = '';
|
|
10
|
+
let isSupported = true, reason;
|
|
11
|
+
const unsupported = (text) => { isSupported = false; reason ??= text; };
|
|
12
|
+
const finishWord = () => {
|
|
13
|
+
if (!hasWord)
|
|
14
|
+
return;
|
|
15
|
+
if (redirect === '>')
|
|
16
|
+
writes.push(word);
|
|
17
|
+
else if (redirect === '<')
|
|
18
|
+
reads.push(word);
|
|
19
|
+
else
|
|
20
|
+
argv.push(word);
|
|
21
|
+
word = '';
|
|
22
|
+
hasWord = false;
|
|
23
|
+
redirect = '';
|
|
24
|
+
};
|
|
25
|
+
const finishCommand = () => {
|
|
26
|
+
finishWord();
|
|
27
|
+
if (redirect)
|
|
28
|
+
unsupported('Missing redirection target');
|
|
29
|
+
if (argv.length)
|
|
30
|
+
commands.push({ argv, writes, reads });
|
|
31
|
+
else if (writes.length || reads.length)
|
|
32
|
+
unsupported('Redirection without literal command');
|
|
33
|
+
argv = [];
|
|
34
|
+
writes = [];
|
|
35
|
+
reads = [];
|
|
36
|
+
redirect = '';
|
|
37
|
+
};
|
|
38
|
+
for (let i = 0; i < command.length; i++) {
|
|
39
|
+
const ch = command[i];
|
|
40
|
+
if (quote === "'") {
|
|
41
|
+
if (ch === "'")
|
|
42
|
+
quote = '';
|
|
43
|
+
else
|
|
44
|
+
word += ch;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (ch === '\\' && quote !== "'") {
|
|
48
|
+
if (i + 1 >= command.length)
|
|
49
|
+
unsupported('Trailing escape');
|
|
50
|
+
else {
|
|
51
|
+
word += command[++i];
|
|
52
|
+
hasWord = true;
|
|
53
|
+
}
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (ch === '"') {
|
|
57
|
+
quote = quote === '"' ? '' : '"';
|
|
58
|
+
hasWord = true;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (ch === "'" && !quote) {
|
|
62
|
+
quote = "'";
|
|
63
|
+
hasWord = true;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (ch === '$' || ch === '`')
|
|
67
|
+
unsupported('Shell expansion requires review');
|
|
68
|
+
if (quote) {
|
|
69
|
+
word += ch;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if ('(){}*?~'.includes(ch))
|
|
73
|
+
unsupported('Non-literal shell syntax requires review');
|
|
74
|
+
if (ch === '#' && !hasWord) {
|
|
75
|
+
unsupported('Comments require review');
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
if (/\s/.test(ch) && ch !== '\n') {
|
|
79
|
+
finishWord();
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (ch === ';' || ch === '|' || ch === '&' || ch === '\n') {
|
|
83
|
+
finishCommand();
|
|
84
|
+
if (command[i + 1] === ch && '|&'.includes(ch))
|
|
85
|
+
i++;
|
|
86
|
+
else if (ch === '&')
|
|
87
|
+
unsupported('Background execution requires review');
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (ch === '>' || ch === '<') {
|
|
91
|
+
if (hasWord && /^\d+$/.test(word)) {
|
|
92
|
+
word = '';
|
|
93
|
+
hasWord = false;
|
|
94
|
+
}
|
|
95
|
+
finishWord();
|
|
96
|
+
redirect = ch;
|
|
97
|
+
if (command[i + 1] === ch) {
|
|
98
|
+
i++;
|
|
99
|
+
if (ch === '<')
|
|
100
|
+
unsupported('Here-documents require review');
|
|
101
|
+
}
|
|
102
|
+
if (command[i + 1] === '&')
|
|
103
|
+
unsupported('Descriptor redirection requires review');
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
word += ch;
|
|
107
|
+
hasWord = true;
|
|
108
|
+
}
|
|
109
|
+
if (quote)
|
|
110
|
+
unsupported('Unclosed quote');
|
|
111
|
+
finishCommand();
|
|
112
|
+
if (!commands.length)
|
|
113
|
+
unsupported('No literal command');
|
|
114
|
+
if (commands.some(c => c.argv.some(a => /^\w+=/.test(a))))
|
|
115
|
+
unsupported('Environment assignments require review');
|
|
116
|
+
return { commands, isSupported, ...(reason ? { reason } : {}) };
|
|
117
|
+
}
|
|
118
|
+
export function matchesPrefix(argv, prefix) {
|
|
119
|
+
return prefix.length > 0 && prefix.length <= argv.length && prefix.every((arg, i) => argv[i] === arg);
|
|
120
|
+
}
|
|
121
|
+
export const INTERPRETERS = new Set(['bash', 'sh', 'zsh', 'fish', 'dash', 'node', 'python', 'python3', 'perl', 'ruby', 'env', 'eval', 'source', 'exec', 'xargs', 'sudo', 'osascript']);
|
|
122
|
+
//# sourceMappingURL=shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/policy/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,wGAAwG;AACxG,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,CAAC;IAC/I,IAAI,OAAO,CAAC,MAAM,GAAG,OAAO;QAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,uCAAuC,EAAE,CAAC;IAC3H,MAAM,QAAQ,GAAoB,EAAE,CAAC;IACrC,IAAI,IAAI,GAAa,EAAE,EAAE,MAAM,GAAa,EAAE,EAAE,KAAK,GAAa,EAAE,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,GAAG,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,CAAC;IAC5H,IAAI,WAAW,GAAG,IAAI,EAAE,MAA0B,CAAC;IACnD,MAAM,WAAW,GAAG,CAAC,IAAY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C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAAE,WAAW,CAAC,wCAAwC,CAAC,CAAC;IACjH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAClE,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,IAAuB,EAAE,MAAyB;IAC9E,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;AACxG,CAAC;AACD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type TestEvidence } from './contracts.js';
|
|
2
|
+
export declare function validateEvidence(evidence: TestEvidence, requiredBehavior: readonly string[], expected?: {
|
|
3
|
+
contractDigest: string;
|
|
4
|
+
sourceDigest: string;
|
|
5
|
+
platform?: string;
|
|
6
|
+
requireRun?: boolean;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function validatePlatformEvidence(record: {
|
|
9
|
+
platform: string;
|
|
10
|
+
status: string;
|
|
11
|
+
sourceDigest: string;
|
|
12
|
+
contractDigest: string;
|
|
13
|
+
runId?: string;
|
|
14
|
+
results: Record<string, TestEvidence>;
|
|
15
|
+
}, requirements: Record<string, {
|
|
16
|
+
behavior: readonly string[];
|
|
17
|
+
}>, expected: {
|
|
18
|
+
platform: string;
|
|
19
|
+
sourceDigest: string;
|
|
20
|
+
contractDigest: string;
|
|
21
|
+
}): void;
|
package/dist/reports.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GuardError } from './contracts.js';
|
|
2
|
+
export function validateEvidence(evidence, requiredBehavior, expected) {
|
|
3
|
+
if (!evidence || !['pass', 'fail', 'environment-blocked', 'not-run'].includes(evidence.status))
|
|
4
|
+
throw new GuardError('INVALID_EVIDENCE', 'Unknown evidence status');
|
|
5
|
+
if (!evidence.testFiles?.length || new Set(evidence.testFiles).size !== evidence.testFiles.length || !evidence.tests?.length)
|
|
6
|
+
throw new GuardError('MISSING_EVIDENCE', 'Missing or duplicate test files / empty suite');
|
|
7
|
+
if (new Set(evidence.tests.map(t => t.name)).size !== evidence.tests.length)
|
|
8
|
+
throw new GuardError('DUPLICATE_EVIDENCE', 'Duplicate test names');
|
|
9
|
+
if (!evidence.contractDigest || !evidence.sourceDigest || !evidence.platform || !evidence.runtimeVersions || !Object.keys(evidence.runtimeVersions).length)
|
|
10
|
+
throw new GuardError('STALE_EVIDENCE', 'Missing evidence versions');
|
|
11
|
+
if (expected && (expected.contractDigest !== evidence.contractDigest || expected.sourceDigest !== evidence.sourceDigest))
|
|
12
|
+
throw new GuardError('STALE_EVIDENCE', 'Evidence does not match current source');
|
|
13
|
+
if (expected?.platform && evidence.platform !== expected.platform)
|
|
14
|
+
throw new GuardError('WRONG_PLATFORM', 'Evidence does not match the required platform and architecture');
|
|
15
|
+
if (expected?.requireRun && (evidence.schemaVersion !== 2 || !evidence.runId || !evidence.artifactPath || !evidence.startedAt || !evidence.recordedAt || evidence.provenance !== 'executed'))
|
|
16
|
+
throw new GuardError('MISSING_PROVENANCE', 'Qualification requires an executed, addressable run');
|
|
17
|
+
if (evidence.provenance === 'synthetic' && evidence.evidenceKind === 'native-os')
|
|
18
|
+
throw new GuardError('FALSE_NATIVE', 'Synthetic storage fixtures cannot qualify native execution');
|
|
19
|
+
if (evidence.status === 'pass') {
|
|
20
|
+
if (evidence.blockedReasons.length || evidence.tests.some(t => t.status !== 'pass' || t.isSkipped))
|
|
21
|
+
throw new GuardError('FALSE_PASS', 'Skipped, blocked or failed tests cannot pass');
|
|
22
|
+
for (const requirement of requiredBehavior) {
|
|
23
|
+
if (!evidence.coveredBehavior.includes(requirement) || !evidence.tests.some(t => t.name.includes(`[${requirement}]`) && t.status === 'pass'))
|
|
24
|
+
throw new GuardError('MISSING_COVERAGE', `Missing executed proof for ${requirement}`);
|
|
25
|
+
}
|
|
26
|
+
if (evidence.suite === 'native' && evidence.evidenceKind !== 'native-os')
|
|
27
|
+
throw new GuardError('FALSE_NATIVE', 'Native evidence requires OS controls');
|
|
28
|
+
if (evidence.suite === 'native' && (!evidence.nativeControls?.some(control => control.kind === 'allow' && control.isObserved && control.platform === evidence.platform) || !evidence.nativeControls.some(control => control.kind === 'deny' && control.isObserved && control.platform === evidence.platform)))
|
|
29
|
+
throw new GuardError('FALSE_NATIVE', 'Native evidence requires observed permitted and denied controls');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function validatePlatformEvidence(record, requirements, expected) {
|
|
33
|
+
if (!record || record.status !== 'pass' || !record.runId || record.platform !== expected.platform || record.sourceDigest !== expected.sourceDigest || record.contractDigest !== expected.contractDigest)
|
|
34
|
+
throw new GuardError('STALE_PLATFORM', 'Missing matching platform qualification');
|
|
35
|
+
for (const [name, suite] of Object.entries(requirements)) {
|
|
36
|
+
const result = record.results?.[name];
|
|
37
|
+
validateEvidence(result, suite.behavior, { ...expected, requireRun: true });
|
|
38
|
+
if (result.suite !== name || result.runId !== record.runId || result.status !== 'pass')
|
|
39
|
+
throw new GuardError('INCOMPLETE_PLATFORM', 'Platform suites must pass in the recorded run');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=reports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACzD,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QACtC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM;YAAE,MAAM,IAAI,UAAU,CAAC,qBAAqB,EAAE,+CAA+C,CAAC,CAAC;IACvL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BeforeAgentStartEvent, ExtensionContext } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import { type Json, type ReviewContext } from '../contracts.js';
|
|
3
|
+
export declare const AUTHORIZATION_ENTRY = "pi-codex-auto-review.authorization.v1";
|
|
4
|
+
export declare function safeEvidence(value: Json): Json;
|
|
5
|
+
/** Retains genuine authorization separately from summaries and extension-generated messages. */
|
|
6
|
+
export declare class ReviewContextStore {
|
|
7
|
+
private items;
|
|
8
|
+
private sessionId;
|
|
9
|
+
private contextId;
|
|
10
|
+
private turnId;
|
|
11
|
+
private authorizationVersion;
|
|
12
|
+
get identity(): string;
|
|
13
|
+
get turnIdentity(): string;
|
|
14
|
+
get scopeVersion(): number;
|
|
15
|
+
reset(sessionId: string, manager?: ExtensionContext['sessionManager']): void;
|
|
16
|
+
startTurn(): void;
|
|
17
|
+
authorize(text: string, id?: string): void;
|
|
18
|
+
confirm(content: Json, id?: string): void;
|
|
19
|
+
instructions(event: BeforeAgentStartEvent): void;
|
|
20
|
+
message(message: unknown, id?: string): void;
|
|
21
|
+
toolCall(content: Json, id: string): void;
|
|
22
|
+
toolResult(content: Json, id: string): void;
|
|
23
|
+
private add;
|
|
24
|
+
snapshot(maxChars: number, exactActionChars?: number): ReviewContext;
|
|
25
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { canonicalJson, digest, GuardError, immutable } from '../contracts.js';
|
|
3
|
+
import { redact } from '../audit.js';
|
|
4
|
+
export const AUTHORIZATION_ENTRY = 'pi-codex-auto-review.authorization.v1';
|
|
5
|
+
export function safeEvidence(value) {
|
|
6
|
+
if (typeof value === 'string')
|
|
7
|
+
return redact(value);
|
|
8
|
+
if (Array.isArray(value))
|
|
9
|
+
return value.map(safeEvidence);
|
|
10
|
+
if (value && typeof value === 'object')
|
|
11
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, /^(authorization|api[_-]?key|token|password|secret)$/i.test(key) ? '[REDACTED]' : safeEvidence(item)]));
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
function visibleMessage(message) {
|
|
15
|
+
if (!message || typeof message !== 'object')
|
|
16
|
+
return;
|
|
17
|
+
const raw = message;
|
|
18
|
+
if (!['assistant', 'toolResult', 'user'].includes(raw.role ?? ''))
|
|
19
|
+
return;
|
|
20
|
+
const content = typeof raw.content === 'string' ? raw.content : Array.isArray(raw.content) ? raw.content.flatMap(item => {
|
|
21
|
+
if (item.type === 'text')
|
|
22
|
+
return [{ type: 'text', text: String(item.text) }];
|
|
23
|
+
if (item.type === 'toolCall')
|
|
24
|
+
return [{ type: 'toolCall', id: String(item.id), name: String(item.name), arguments: JSON.parse(canonicalJson(item.arguments)) }];
|
|
25
|
+
return []; // Private reasoning, signatures and binary payloads never enter review.
|
|
26
|
+
}) : [];
|
|
27
|
+
return safeEvidence({ role: raw.role, content, ...(raw.toolCallId ? { toolCallId: raw.toolCallId } : {}) });
|
|
28
|
+
}
|
|
29
|
+
/** Retains genuine authorization separately from summaries and extension-generated messages. */
|
|
30
|
+
export class ReviewContextStore {
|
|
31
|
+
items = new Map();
|
|
32
|
+
sessionId = '';
|
|
33
|
+
contextId = randomUUID();
|
|
34
|
+
turnId = randomUUID();
|
|
35
|
+
authorizationVersion = 0;
|
|
36
|
+
get identity() { return this.contextId; }
|
|
37
|
+
get turnIdentity() { return this.turnId; }
|
|
38
|
+
get scopeVersion() { return this.authorizationVersion; }
|
|
39
|
+
reset(sessionId, manager) {
|
|
40
|
+
this.sessionId = sessionId;
|
|
41
|
+
this.contextId = randomUUID();
|
|
42
|
+
this.turnId = randomUUID();
|
|
43
|
+
this.items.clear();
|
|
44
|
+
this.authorizationVersion++;
|
|
45
|
+
for (const entry of manager?.getBranch?.() ?? []) {
|
|
46
|
+
if (entry.type === 'custom' && entry.customType === AUTHORIZATION_ENTRY) {
|
|
47
|
+
const data = entry.data;
|
|
48
|
+
if (typeof data?.text === 'string' && ['interactive', 'rpc'].includes(String(data.source)))
|
|
49
|
+
this.authorize(data.text, entry.id);
|
|
50
|
+
}
|
|
51
|
+
else if (entry.type === 'message')
|
|
52
|
+
this.message(entry.message, entry.id);
|
|
53
|
+
else if (entry.type === 'compaction' || entry.type === 'branch_summary')
|
|
54
|
+
this.add('assistant', 'evidence', entry.summary, entry.id);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
startTurn() { this.turnId = randomUUID(); }
|
|
58
|
+
authorize(text, id = randomUUID()) { this.add('user', 'authorization', text, id); }
|
|
59
|
+
confirm(content, id = randomUUID()) { this.add('user-confirmation', 'authorization', content, id); }
|
|
60
|
+
instructions(event) {
|
|
61
|
+
// The structured runtime source establishes provenance, never a filename found in tool output.
|
|
62
|
+
const current = new Set(event.systemPromptOptions.contextFiles.map(file => `agents:${file.path}`));
|
|
63
|
+
for (const [id, item] of this.items)
|
|
64
|
+
if (item.source === 'agents' && !current.has(id)) {
|
|
65
|
+
this.items.delete(id);
|
|
66
|
+
this.authorizationVersion++;
|
|
67
|
+
}
|
|
68
|
+
for (const file of event.systemPromptOptions.contextFiles)
|
|
69
|
+
this.add('agents', 'authorization', { path: file.path, content: file.content }, `agents:${file.path}`);
|
|
70
|
+
for (const [name, content] of [['customPrompt', event.systemPromptOptions.customPrompt], ['appendSystemPrompt', event.systemPromptOptions.appendSystemPrompt]]) {
|
|
71
|
+
if (content)
|
|
72
|
+
this.add('developer', 'authorization', content, `runtime:${name}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
message(message, id = randomUUID()) {
|
|
76
|
+
const content = visibleMessage(message);
|
|
77
|
+
if (content !== undefined)
|
|
78
|
+
this.add(message.role === 'toolResult' ? 'tool-result' : 'assistant', 'evidence', content, id);
|
|
79
|
+
}
|
|
80
|
+
toolCall(content, id) { this.add('tool-call', 'evidence', content, `call:${id}`); }
|
|
81
|
+
toolResult(content, id) { this.add('tool-result', 'evidence', content, `result:${id}`); }
|
|
82
|
+
add(source, trust, content, id) {
|
|
83
|
+
if (trust === 'authorization' && source !== 'user-confirmation' && canonicalJson(this.items.get(id)?.content ?? null) !== canonicalJson(safeEvidence(content)))
|
|
84
|
+
this.authorizationVersion++;
|
|
85
|
+
this.items.set(id, immutable({ id, source, trust, content: safeEvidence(content) }));
|
|
86
|
+
}
|
|
87
|
+
snapshot(maxChars, exactActionChars = 0) {
|
|
88
|
+
const authorization = [...this.items.values()].filter(item => item.trust === 'authorization');
|
|
89
|
+
const evidence = [...this.items.values()].filter(item => item.trust === 'evidence');
|
|
90
|
+
const fields = { sessionId: this.sessionId, contextId: this.contextId, turnId: this.turnId };
|
|
91
|
+
let remaining = maxChars - exactActionChars - canonicalJson({ ...fields, items: authorization }).length - 512;
|
|
92
|
+
if (remaining < 0)
|
|
93
|
+
throw new GuardError('REVIEW_CONTEXT_OVERFLOW', 'Required authorization and exact action exceed review context capacity');
|
|
94
|
+
const retained = [];
|
|
95
|
+
for (const item of evidence.reverse()) {
|
|
96
|
+
const text = canonicalJson(item);
|
|
97
|
+
if (text.length <= remaining) {
|
|
98
|
+
retained.unshift(item);
|
|
99
|
+
remaining -= text.length;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (retained.length !== evidence.length)
|
|
103
|
+
retained.unshift({ id: 'omission', source: 'assistant', trust: 'evidence', content: '<truncated reason="review-context-budget" />', isTruncated: true });
|
|
104
|
+
const data = { ...fields, items: [...authorization, ...retained] };
|
|
105
|
+
return immutable({ ...data, digest: digest(data) });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/review/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAyD,MAAM,iBAAiB,CAAC;AACtI,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AAC3E,MAAM,UAAU,YAAY,CAAC,KAAW;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACzD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,sDAAsD,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3N,OAAO,KAAK,CAAC;AACf,CAAC;AACD,SAAS,cAAc,CAAC,OAAgB;IACtC,I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,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;gBAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC;YAAC,CAAC;QACrF,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;YAAE,QAAQ,CAAC,OAAO,CAAC,EAAC,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,8CAA8C,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC,CAAC;QAChM,MAAM,IAAI,GAAG,EAAC,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,aAAa,EAAE,GAAG,QAAQ,CAAC,EAAC,CAAC;QACjE,OAAO,SAAS,CAAC,EAAC,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PermissionProfile } from '../contracts.js';
|
|
2
|
+
import type { SandboxExecutor } from '../sandbox/executor.js';
|
|
3
|
+
export declare const INVESTIGATION_TOOLS: readonly [{
|
|
4
|
+
readonly name: "inspect_file";
|
|
5
|
+
readonly description: "Read local text without modifying it; use only when it changes the review decision.";
|
|
6
|
+
readonly parameters: {
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
readonly properties: {
|
|
9
|
+
readonly path: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
readonly required: readonly ["path"];
|
|
14
|
+
readonly additionalProperties: false;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "inspect_directory";
|
|
18
|
+
readonly description: "List local directory metadata without modifying it.";
|
|
19
|
+
readonly parameters: {
|
|
20
|
+
readonly type: "object";
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly path: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly required: readonly ["path"];
|
|
27
|
+
readonly additionalProperties: false;
|
|
28
|
+
};
|
|
29
|
+
}];
|
|
30
|
+
export interface ReviewInvestigation {
|
|
31
|
+
execute(name: string, args: unknown, signal: AbortSignal): Promise<string>;
|
|
32
|
+
}
|
|
33
|
+
export declare class NativeInvestigation implements ReviewInvestigation {
|
|
34
|
+
private readonly executor;
|
|
35
|
+
private readonly profile;
|
|
36
|
+
private readonly cwd;
|
|
37
|
+
constructor(executor: SandboxExecutor, profile: PermissionProfile, cwd: string);
|
|
38
|
+
execute(name: string, args: unknown, signal: AbortSignal): Promise<string>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { createProfile, EMPTY_DELTA, GuardError, canonicalJson } from '../contracts.js';
|
|
3
|
+
import { canonicalPath, isWithin } from '../policy/paths.js';
|
|
4
|
+
import { safeEvidence } from './context.js';
|
|
5
|
+
export const INVESTIGATION_TOOLS = [
|
|
6
|
+
{ name: 'inspect_file', description: 'Read local text without modifying it; use only when it changes the review decision.', parameters: { type: 'object', properties: { path: { type: 'string' } }, required: ['path'], additionalProperties: false } },
|
|
7
|
+
{ name: 'inspect_directory', description: 'List local directory metadata without modifying it.', parameters: { type: 'object', properties: { path: { type: 'string' } }, required: ['path'], additionalProperties: false } },
|
|
8
|
+
];
|
|
9
|
+
export class NativeInvestigation {
|
|
10
|
+
executor;
|
|
11
|
+
profile;
|
|
12
|
+
cwd;
|
|
13
|
+
constructor(executor, profile, cwd) {
|
|
14
|
+
this.executor = executor;
|
|
15
|
+
this.profile = profile;
|
|
16
|
+
this.cwd = cwd;
|
|
17
|
+
}
|
|
18
|
+
async execute(name, args, signal) {
|
|
19
|
+
signal.throwIfAborted();
|
|
20
|
+
if (!['inspect_file', 'inspect_directory'].includes(name) || !args || typeof args !== 'object' || Array.isArray(args) || Object.keys(args).length !== 1 || typeof args.path !== 'string')
|
|
21
|
+
throw new GuardError('REVIEW_INVESTIGATION', 'Only bounded read-only inspection is supported');
|
|
22
|
+
const path = await canonicalPath(args.path, this.cwd);
|
|
23
|
+
const denies = await Promise.all(this.profile.denyRead.map(value => canonicalPath(value, this.cwd)));
|
|
24
|
+
if (denies.some(root => isWithin(path, root)))
|
|
25
|
+
throw new GuardError('REVIEW_INVESTIGATION', 'Protected paths cannot be inspected');
|
|
26
|
+
const profile = createProfile({ ...this.profile, mode: 'read-only', readRoots: ['/'], writeRoots: [], denyWrite: ['/'], allowedDomains: [], deniedDomains: [] });
|
|
27
|
+
const tool = name === 'inspect_file' ? 'read' : 'ls';
|
|
28
|
+
const result = await this.executor.execute({ kind: 'tool', tool, args: { path, limit: tool === 'read' ? 120 : 100 }, cwd: this.cwd, toolCallId: `review-${randomUUID()}` }, profile, EMPTY_DELTA, { signal, timeoutSeconds: 15 });
|
|
29
|
+
signal.throwIfAborted();
|
|
30
|
+
const raw = result;
|
|
31
|
+
const visible = raw.content?.filter(item => item.type === 'text').map(item => ({ type: 'text', text: item.text ?? '' })) ?? [];
|
|
32
|
+
const text = canonicalJson(safeEvidence(visible));
|
|
33
|
+
return text.length <= 12000 ? text : `${text.slice(0, 12000)}\n<truncated reason="inspection-output-limit" />`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=investigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"investigation.js","sourceRoot":"","sources":["../../src/review/investigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAqC,MAAM,iBAAiB,CAAC;AAE3H,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC7D,O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