pi-codex-auto-review 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -10
- package/dist/approval-commands.d.ts +4 -0
- package/dist/approval-commands.js +103 -0
- package/dist/approval-commands.js.map +1 -0
- package/dist/approval-settings.d.ts +9 -0
- package/dist/approval-settings.js +40 -0
- package/dist/approval-settings.js.map +1 -0
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -34
- package/dist/index.js.map +1 -1
- package/dist/policy/index.d.ts +0 -1
- package/dist/policy/index.js +6 -32
- package/dist/policy/index.js.map +1 -1
- package/dist/review/investigation.d.ts +3 -3
- package/dist/review/investigation.js +1 -1
- package/dist/review/investigation.js.map +1 -1
- package/dist/review/policy.js +1 -1
- package/dist/tools/controller.d.ts +7 -4
- package/dist/tools/controller.js +51 -35
- package/dist/tools/controller.js.map +1 -1
- package/dist/tools/environment.d.ts +1 -0
- package/dist/tools/environment.js +6 -0
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/executor.d.ts +14 -0
- package/dist/tools/executor.js +75 -0
- package/dist/tools/executor.js.map +1 -0
- package/dist/tools/mutation-queue.d.ts +1 -0
- package/dist/tools/mutation-queue.js +16 -0
- package/dist/tools/mutation-queue.js.map +1 -0
- package/docs/publishing.md +7 -7
- package/docs/security/dependencies.md +13 -3
- package/docs/testing/auto-review-protection.md +28 -8
- package/docs/usage.md +19 -16
- package/package.json +11 -14
- package/dist/sandbox/broker.d.ts +0 -1
- package/dist/sandbox/broker.js +0 -139
- package/dist/sandbox/broker.js.map +0 -1
- package/dist/sandbox/config.d.ts +0 -5
- package/dist/sandbox/config.js +0 -97
- package/dist/sandbox/config.js.map +0 -1
- package/dist/sandbox/directory-scan.d.ts +0 -1
- package/dist/sandbox/directory-scan.js +0 -32
- package/dist/sandbox/directory-scan.js.map +0 -1
- package/dist/sandbox/executor.d.ts +0 -20
- package/dist/sandbox/executor.js +0 -146
- package/dist/sandbox/executor.js.map +0 -1
- package/dist/sandbox/hard-links.d.ts +0 -4
- package/dist/sandbox/hard-links.js +0 -155
- package/dist/sandbox/hard-links.js.map +0 -1
- package/dist/sandbox/linux-read-paths.d.ts +0 -7
- package/dist/sandbox/linux-read-paths.js +0 -47
- package/dist/sandbox/linux-read-paths.js.map +0 -1
- package/dist/sandbox/paths.d.ts +0 -3
- package/dist/sandbox/paths.js +0 -10
- package/dist/sandbox/paths.js.map +0 -1
- package/dist/sandbox/runtime-write-paths.d.ts +0 -2
- package/dist/sandbox/runtime-write-paths.js +0 -8
- package/dist/sandbox/runtime-write-paths.js.map +0 -1
- package/dist/sandbox/seccomp.d.ts +0 -5
- package/dist/sandbox/seccomp.js +0 -16
- package/dist/sandbox/seccomp.js.map +0 -1
- package/dist/sandbox/worker.d.ts +0 -1
- package/dist/sandbox/worker.js +0 -78
- package/dist/sandbox/worker.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/LICENSE +0 -201
- package/node_modules/@anthropic-ai/sandbox-runtime/README.md +0 -901
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts +0 -3
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js +0 -472
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts +0 -19
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js +0 -17
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts +0 -52
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js +0 -153
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts +0 -164
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js +0 -246
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts +0 -58
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js +0 -128
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts +0 -124
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js +0 -258
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts +0 -87
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js +0 -138
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts +0 -67
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js +0 -113
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts +0 -70
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js +0 -171
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts +0 -120
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js +0 -281
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts +0 -108
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js +0 -208
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts +0 -82
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js +0 -155
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts +0 -44
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js +0 -220
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts +0 -150
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js +0 -678
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts +0 -32
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js +0 -111
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts +0 -305
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js +0 -2605
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts +0 -55
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js +0 -152
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts +0 -12
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js +0 -43
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts +0 -116
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js +0 -1195
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts +0 -200
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js +0 -443
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts +0 -28
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js +0 -114
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts +0 -59
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js +0 -159
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts +0 -147
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js +0 -445
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts +0 -17
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js +0 -163
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts +0 -83
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js +0 -212
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts +0 -76
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js +0 -221
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts +0 -1691
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js +0 -1233
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts +0 -97
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js +0 -1937
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts +0 -113
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js +0 -3
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts +0 -411
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js +0 -1408
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts +0 -37
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js +0 -125
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts +0 -57
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js +0 -332
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts +0 -100
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js +0 -546
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts +0 -923
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js +0 -1419
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts +0 -31
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js +0 -69
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts +0 -7
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js +0 -25
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts +0 -15
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js +0 -49
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts +0 -17
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js +0 -37
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts +0 -27
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js +0 -47
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts +0 -9
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js +0 -25
- package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js.map +0 -1
- package/node_modules/@anthropic-ai/sandbox-runtime/package.json +0 -88
- package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/build.ts +0 -95
- 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 +0 -69
- 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 +0 -28
- 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 +0 -27
- package/node_modules/@pondwader/socks5-server/LICENSE +0 -20
- package/node_modules/@pondwader/socks5-server/README.md +0 -151
- package/node_modules/@pondwader/socks5-server/dist/index.d.mts +0 -87
- package/node_modules/@pondwader/socks5-server/dist/index.d.ts +0 -87
- package/node_modules/@pondwader/socks5-server/dist/index.js +0 -346
- package/node_modules/@pondwader/socks5-server/dist/index.mjs +0 -307
- package/node_modules/@pondwader/socks5-server/package.json +0 -31
- package/node_modules/commander/LICENSE +0 -22
- package/node_modules/commander/Readme.md +0 -1157
- package/node_modules/commander/esm.mjs +0 -16
- package/node_modules/commander/index.js +0 -24
- package/node_modules/commander/lib/argument.js +0 -149
- package/node_modules/commander/lib/command.js +0 -2509
- package/node_modules/commander/lib/error.js +0 -39
- package/node_modules/commander/lib/help.js +0 -520
- package/node_modules/commander/lib/option.js +0 -330
- package/node_modules/commander/lib/suggestSimilar.js +0 -101
- package/node_modules/commander/package-support.json +0 -16
- package/node_modules/commander/package.json +0 -84
- package/node_modules/commander/typings/esm.d.mts +0 -3
- package/node_modules/commander/typings/index.d.ts +0 -969
- package/node_modules/node-forge/.editorconfig +0 -17
- package/node_modules/node-forge/.eslintrc.js +0 -24
- package/node_modules/node-forge/.github/workflows/main.yaml +0 -96
- package/node_modules/node-forge/.istanbul.yml +0 -2
- package/node_modules/node-forge/.npmignore +0 -15
- package/node_modules/node-forge/CHANGELOG.md +0 -555
- package/node_modules/node-forge/CONTRIBUTING.md +0 -18
- package/node_modules/node-forge/LICENSE +0 -331
- package/node_modules/node-forge/README.md +0 -2071
- package/node_modules/node-forge/RELEASE.md +0 -19
- package/node_modules/node-forge/SECURITY.md +0 -5
- package/node_modules/node-forge/examples/create-cert.js +0 -110
- package/node_modules/node-forge/examples/create-csr.js +0 -66
- package/node_modules/node-forge/examples/create-pkcs12.js +0 -160
- package/node_modules/node-forge/examples/imap.js +0 -46
- package/node_modules/node-forge/examples/sign-p7.js +0 -115
- package/node_modules/node-forge/examples/tls.js +0 -189
- package/node_modules/node-forge/flash/PooledSocket.as +0 -18
- package/node_modules/node-forge/flash/README.md +0 -48
- package/node_modules/node-forge/flash/SocketEvent.as +0 -36
- package/node_modules/node-forge/flash/SocketPool.as +0 -754
- package/node_modules/node-forge/flash/mod_fsp/README +0 -135
- package/node_modules/node-forge/flash/mod_fsp/mod_fsp.c +0 -415
- package/node_modules/node-forge/flash/package.json +0 -28
- package/node_modules/node-forge/flash/policyserver.js +0 -65
- package/node_modules/node-forge/flash/policyserver.py +0 -112
- package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
- package/node_modules/node-forge/karma-sauce.conf.js +0 -79
- package/node_modules/node-forge/karma.conf.js +0 -133
- package/node_modules/node-forge/lib/aes.js +0 -1091
- package/node_modules/node-forge/lib/aesCipherSuites.js +0 -282
- package/node_modules/node-forge/lib/asn1-validator.js +0 -91
- package/node_modules/node-forge/lib/asn1.js +0 -1503
- package/node_modules/node-forge/lib/baseN.js +0 -186
- package/node_modules/node-forge/lib/cipher.js +0 -230
- package/node_modules/node-forge/lib/cipherModes.js +0 -999
- package/node_modules/node-forge/lib/des.js +0 -496
- package/node_modules/node-forge/lib/ed25519.js +0 -1091
- package/node_modules/node-forge/lib/forge.js +0 -13
- package/node_modules/node-forge/lib/form.js +0 -149
- package/node_modules/node-forge/lib/hmac.js +0 -146
- package/node_modules/node-forge/lib/http.js +0 -1346
- package/node_modules/node-forge/lib/index.all.js +0 -16
- package/node_modules/node-forge/lib/index.js +0 -33
- package/node_modules/node-forge/lib/jsbn.js +0 -1294
- package/node_modules/node-forge/lib/kem.js +0 -168
- package/node_modules/node-forge/lib/log.js +0 -319
- package/node_modules/node-forge/lib/md.all.js +0 -13
- package/node_modules/node-forge/lib/md.js +0 -11
- package/node_modules/node-forge/lib/md5.js +0 -289
- package/node_modules/node-forge/lib/mgf.js +0 -12
- package/node_modules/node-forge/lib/mgf1.js +0 -57
- package/node_modules/node-forge/lib/oids.js +0 -180
- package/node_modules/node-forge/lib/pbe.js +0 -1023
- package/node_modules/node-forge/lib/pbkdf2.js +0 -211
- package/node_modules/node-forge/lib/pem.js +0 -237
- package/node_modules/node-forge/lib/pkcs1.js +0 -276
- package/node_modules/node-forge/lib/pkcs12.js +0 -1078
- package/node_modules/node-forge/lib/pkcs7.js +0 -1260
- package/node_modules/node-forge/lib/pkcs7asn1.js +0 -410
- package/node_modules/node-forge/lib/pki.js +0 -102
- package/node_modules/node-forge/lib/prime.js +0 -297
- package/node_modules/node-forge/lib/prime.worker.js +0 -168
- package/node_modules/node-forge/lib/prng.js +0 -419
- package/node_modules/node-forge/lib/pss.js +0 -241
- package/node_modules/node-forge/lib/random.js +0 -191
- package/node_modules/node-forge/lib/rc2.js +0 -410
- package/node_modules/node-forge/lib/rsa.js +0 -1973
- package/node_modules/node-forge/lib/sha1.js +0 -319
- package/node_modules/node-forge/lib/sha256.js +0 -327
- package/node_modules/node-forge/lib/sha512.js +0 -561
- package/node_modules/node-forge/lib/socket.js +0 -287
- package/node_modules/node-forge/lib/ssh.js +0 -236
- package/node_modules/node-forge/lib/tls.js +0 -4282
- package/node_modules/node-forge/lib/tlssocket.js +0 -249
- package/node_modules/node-forge/lib/util.js +0 -2652
- package/node_modules/node-forge/lib/x509.js +0 -3251
- package/node_modules/node-forge/lib/xhr.js +0 -738
- package/node_modules/node-forge/package.json +0 -123
- package/node_modules/node-forge/tests/.eslintrc.js +0 -5
- package/node_modules/node-forge/tests/README.md +0 -4
- package/node_modules/node-forge/tests/benchmarks/aes-speed.js +0 -62
- package/node_modules/node-forge/tests/benchmarks/so-44303784.js +0 -246
- package/node_modules/node-forge/tests/flash/README.md +0 -7
- package/node_modules/node-forge/tests/flash/Test.as +0 -96
- package/node_modules/node-forge/tests/flash/build-flash.xml +0 -7
- package/node_modules/node-forge/tests/flash/index.html +0 -28
- package/node_modules/node-forge/tests/index.html +0 -33
- package/node_modules/node-forge/tests/issues/heartbleed.js +0 -55
- package/node_modules/node-forge/tests/issues/issue-428.html +0 -95
- package/node_modules/node-forge/tests/issues/issue-428.js +0 -375
- package/node_modules/node-forge/tests/karma/index.js +0 -8
- package/node_modules/node-forge/tests/karma/testWorker.js +0 -65
- package/node_modules/node-forge/tests/karma/web-worker-rsa.js +0 -55
- package/node_modules/node-forge/tests/legacy/common.html +0 -65
- package/node_modules/node-forge/tests/legacy/common.js +0 -2199
- package/node_modules/node-forge/tests/legacy/form.html +0 -148
- package/node_modules/node-forge/tests/legacy/form.js +0 -40
- package/node_modules/node-forge/tests/legacy/http.html +0 -235
- package/node_modules/node-forge/tests/legacy/index.html +0 -70
- package/node_modules/node-forge/tests/legacy/keygen.html +0 -113
- package/node_modules/node-forge/tests/legacy/login.css +0 -26
- package/node_modules/node-forge/tests/legacy/loginDemo.html +0 -32
- package/node_modules/node-forge/tests/legacy/loginDemo.js +0 -149
- package/node_modules/node-forge/tests/legacy/performance.html +0 -533
- package/node_modules/node-forge/tests/legacy/result.txt +0 -1
- package/node_modules/node-forge/tests/legacy/socketPool.html +0 -302
- package/node_modules/node-forge/tests/legacy/tasks.html +0 -54
- package/node_modules/node-forge/tests/legacy/tasks.js +0 -378
- package/node_modules/node-forge/tests/legacy/tls.html +0 -389
- package/node_modules/node-forge/tests/legacy/webid.html +0 -89
- package/node_modules/node-forge/tests/legacy/webid.js +0 -313
- package/node_modules/node-forge/tests/legacy/ws-webid.js +0 -120
- package/node_modules/node-forge/tests/legacy/xhr.html +0 -67
- package/node_modules/node-forge/tests/legacy/xhr.js +0 -590
- package/node_modules/node-forge/tests/pocs/ghsa-2328-f5f3-gj25.js +0 -85
- package/node_modules/node-forge/tests/pocs/ghsa-ppp5-5v6c-4jwp.js +0 -166
- package/node_modules/node-forge/tests/pocs/ghsa-q67f-28xg-22rw.js +0 -103
- package/node_modules/node-forge/tests/security/cve-2025-12816.js +0 -75
- package/node_modules/node-forge/tests/security/ghsa-554w-wpv2-vw27.js +0 -81
- package/node_modules/node-forge/tests/security/index.js +0 -3
- package/node_modules/node-forge/tests/server.crt +0 -26
- package/node_modules/node-forge/tests/server.js +0 -87
- package/node_modules/node-forge/tests/server.key +0 -27
- package/node_modules/node-forge/tests/support/task.js +0 -718
- package/node_modules/node-forge/tests/tests.css +0 -61
- package/node_modules/node-forge/tests/unit/aes.js +0 -1498
- package/node_modules/node-forge/tests/unit/asn1.js +0 -1337
- package/node_modules/node-forge/tests/unit/csr.js +0 -129
- package/node_modules/node-forge/tests/unit/des.js +0 -231
- package/node_modules/node-forge/tests/unit/ed25519.js +0 -395
- package/node_modules/node-forge/tests/unit/forge.js +0 -2
- package/node_modules/node-forge/tests/unit/hmac.js +0 -64
- package/node_modules/node-forge/tests/unit/index.html +0 -20
- package/node_modules/node-forge/tests/unit/index.js +0 -27
- package/node_modules/node-forge/tests/unit/jsbn.js +0 -40
- package/node_modules/node-forge/tests/unit/kem.js +0 -167
- package/node_modules/node-forge/tests/unit/md5.js +0 -114
- package/node_modules/node-forge/tests/unit/mgf1.js +0 -16
- package/node_modules/node-forge/tests/unit/pbkdf2.js +0 -182
- package/node_modules/node-forge/tests/unit/pem.js +0 -159
- package/node_modules/node-forge/tests/unit/pkcs1.js +0 -1077
- package/node_modules/node-forge/tests/unit/pkcs12.js +0 -739
- package/node_modules/node-forge/tests/unit/pkcs7.js +0 -792
- package/node_modules/node-forge/tests/unit/random.js +0 -48
- package/node_modules/node-forge/tests/unit/rc2.js +0 -88
- package/node_modules/node-forge/tests/unit/rsa.js +0 -1278
- package/node_modules/node-forge/tests/unit/sha1.js +0 -72
- package/node_modules/node-forge/tests/unit/sha256.js +0 -79
- package/node_modules/node-forge/tests/unit/sha512.js +0 -200
- package/node_modules/node-forge/tests/unit/ssh.js +0 -175
- package/node_modules/node-forge/tests/unit/tls.js +0 -175
- package/node_modules/node-forge/tests/unit/util.js +0 -595
- package/node_modules/node-forge/tests/unit/x509.js +0 -1986
- package/node_modules/node-forge/tests/websockets/server-webid.js +0 -495
- package/node_modules/node-forge/tests/websockets/server-ws.js +0 -158
- package/node_modules/node-forge/webpack-tests.config.js +0 -26
- package/node_modules/node-forge/webpack.config.js +0 -130
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/package.json +0 -118
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5136
- package/node_modules/zod/src/v4/classic/checks.ts +0 -30
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -66
- package/node_modules/zod/src/v4/classic/errors.ts +0 -75
- package/node_modules/zod/src/v4/classic/external.ts +0 -50
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -33
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1594
- package/node_modules/zod/src/v4/core/checks.ts +0 -1283
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -134
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -424
- package/node_modules/zod/src/v4/core/function.ts +0 -176
- package/node_modules/zod/src/v4/core/index.ts +0 -15
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -143
- package/node_modules/zod/src/v4/core/parse.ts +0 -94
- package/node_modules/zod/src/v4/core/regexes.ts +0 -135
- package/node_modules/zod/src/v4/core/registries.ts +0 -96
- package/node_modules/zod/src/v4/core/schemas.ts +0 -3842
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
- package/node_modules/zod/src/v4/core/util.ts +0 -775
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -125
- package/node_modules/zod/src/v4/locales/az.ts +0 -121
- package/node_modules/zod/src/v4/locales/be.ts +0 -184
- package/node_modules/zod/src/v4/locales/ca.ts +0 -127
- package/node_modules/zod/src/v4/locales/cs.ts +0 -142
- package/node_modules/zod/src/v4/locales/de.ts +0 -124
- package/node_modules/zod/src/v4/locales/en.ts +0 -127
- package/node_modules/zod/src/v4/locales/eo.ts +0 -125
- package/node_modules/zod/src/v4/locales/es.ts +0 -125
- package/node_modules/zod/src/v4/locales/fa.ts +0 -134
- package/node_modules/zod/src/v4/locales/fi.ts +0 -131
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
- package/node_modules/zod/src/v4/locales/fr.ts +0 -124
- package/node_modules/zod/src/v4/locales/he.ts +0 -125
- package/node_modules/zod/src/v4/locales/hu.ts +0 -126
- package/node_modules/zod/src/v4/locales/id.ts +0 -125
- package/node_modules/zod/src/v4/locales/index.ts +0 -39
- package/node_modules/zod/src/v4/locales/it.ts +0 -125
- package/node_modules/zod/src/v4/locales/ja.ts +0 -122
- package/node_modules/zod/src/v4/locales/kh.ts +0 -126
- package/node_modules/zod/src/v4/locales/ko.ts +0 -131
- package/node_modules/zod/src/v4/locales/mk.ts +0 -127
- package/node_modules/zod/src/v4/locales/ms.ts +0 -124
- package/node_modules/zod/src/v4/locales/nl.ts +0 -126
- package/node_modules/zod/src/v4/locales/no.ts +0 -124
- package/node_modules/zod/src/v4/locales/ota.ts +0 -125
- package/node_modules/zod/src/v4/locales/pl.ts +0 -126
- package/node_modules/zod/src/v4/locales/ps.ts +0 -133
- package/node_modules/zod/src/v4/locales/pt.ts +0 -123
- package/node_modules/zod/src/v4/locales/ru.ts +0 -184
- package/node_modules/zod/src/v4/locales/sl.ts +0 -126
- package/node_modules/zod/src/v4/locales/sv.ts +0 -127
- package/node_modules/zod/src/v4/locales/ta.ts +0 -125
- package/node_modules/zod/src/v4/locales/th.ts +0 -126
- package/node_modules/zod/src/v4/locales/tr.ts +0 -121
- package/node_modules/zod/src/v4/locales/ua.ts +0 -126
- package/node_modules/zod/src/v4/locales/ur.ts +0 -126
- package/node_modules/zod/src/v4/locales/vi.ts +0 -125
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
- package/node_modules/zod/src/v4/mini/external.ts +0 -40
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -62
- package/node_modules/zod/src/v4/mini/parse.ts +0 -1
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
- package/node_modules/zod/src/v4-mini/index.ts +0 -1
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -111
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3775
- package/node_modules/zod/v3/types.d.cts +0 -1031
- package/node_modules/zod/v3/types.d.ts +0 -1031
- package/node_modules/zod/v3/types.js +0 -3693
- package/node_modules/zod/v4/classic/checks.cjs +0 -32
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -57
- package/node_modules/zod/v4/classic/compat.d.cts +0 -46
- package/node_modules/zod/v4/classic/compat.d.ts +0 -46
- package/node_modules/zod/v4/classic/compat.js +0 -27
- package/node_modules/zod/v4/classic/errors.cjs +0 -67
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -41
- package/node_modules/zod/v4/classic/external.cjs +0 -70
- package/node_modules/zod/v4/classic/external.d.cts +0 -13
- package/node_modules/zod/v4/classic/external.d.ts +0 -13
- package/node_modules/zod/v4/classic/external.js +0 -18
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/parse.cjs +0 -32
- package/node_modules/zod/v4/classic/parse.d.cts +0 -23
- package/node_modules/zod/v4/classic/parse.d.ts +0 -23
- package/node_modules/zod/v4/classic/parse.js +0 -6
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1109
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -630
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -630
- package/node_modules/zod/v4/classic/schemas.js +0 -1006
- package/node_modules/zod/v4/core/api.cjs +0 -1039
- package/node_modules/zod/v4/core/api.d.cts +0 -284
- package/node_modules/zod/v4/core/api.d.ts +0 -284
- package/node_modules/zod/v4/core/api.js +0 -906
- package/node_modules/zod/v4/core/checks.cjs +0 -591
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -565
- package/node_modules/zod/v4/core/core.cjs +0 -67
- package/node_modules/zod/v4/core/core.d.cts +0 -49
- package/node_modules/zod/v4/core/core.d.ts +0 -49
- package/node_modules/zod/v4/core/core.js +0 -61
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -226
- package/node_modules/zod/v4/core/errors.d.cts +0 -208
- package/node_modules/zod/v4/core/errors.d.ts +0 -208
- package/node_modules/zod/v4/core/errors.js +0 -195
- package/node_modules/zod/v4/core/function.cjs +0 -102
- package/node_modules/zod/v4/core/function.d.cts +0 -52
- package/node_modules/zod/v4/core/function.d.ts +0 -52
- package/node_modules/zod/v4/core/function.js +0 -75
- package/node_modules/zod/v4/core/index.cjs +0 -44
- package/node_modules/zod/v4/core/index.d.cts +0 -15
- package/node_modules/zod/v4/core/index.d.ts +0 -15
- package/node_modules/zod/v4/core/index.js +0 -15
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -87
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -87
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/parse.cjs +0 -87
- package/node_modules/zod/v4/core/parse.d.cts +0 -25
- package/node_modules/zod/v4/core/parse.d.ts +0 -25
- package/node_modules/zod/v4/core/parse.js +0 -57
- package/node_modules/zod/v4/core/regexes.cjs +0 -103
- package/node_modules/zod/v4/core/regexes.d.cts +0 -62
- package/node_modules/zod/v4/core/regexes.d.ts +0 -62
- package/node_modules/zod/v4/core/regexes.js +0 -95
- package/node_modules/zod/v4/core/registries.cjs +0 -56
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/zod/v4/core/schemas.cjs +0 -1748
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1041
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1041
- package/node_modules/zod/v4/core/schemas.js +0 -1717
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/to-json-schema.js +0 -849
- package/node_modules/zod/v4/core/util.cjs +0 -539
- package/node_modules/zod/v4/core/util.d.cts +0 -183
- package/node_modules/zod/v4/core/util.d.ts +0 -183
- package/node_modules/zod/v4/core/util.js +0 -493
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -142
- package/node_modules/zod/v4/locales/ar.d.cts +0 -4
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -116
- package/node_modules/zod/v4/locales/az.cjs +0 -141
- package/node_modules/zod/v4/locales/az.d.cts +0 -4
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -115
- package/node_modules/zod/v4/locales/be.cjs +0 -190
- package/node_modules/zod/v4/locales/be.d.cts +0 -4
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -164
- package/node_modules/zod/v4/locales/ca.cjs +0 -144
- package/node_modules/zod/v4/locales/ca.d.cts +0 -4
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -118
- package/node_modules/zod/v4/locales/cs.cjs +0 -161
- package/node_modules/zod/v4/locales/cs.d.cts +0 -4
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -135
- package/node_modules/zod/v4/locales/de.cjs +0 -142
- package/node_modules/zod/v4/locales/de.d.cts +0 -4
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -116
- package/node_modules/zod/v4/locales/en.cjs +0 -145
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/en.js +0 -117
- package/node_modules/zod/v4/locales/eo.cjs +0 -144
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.js +0 -116
- package/node_modules/zod/v4/locales/es.cjs +0 -143
- package/node_modules/zod/v4/locales/es.d.cts +0 -4
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -117
- package/node_modules/zod/v4/locales/fa.cjs +0 -148
- package/node_modules/zod/v4/locales/fa.d.cts +0 -4
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -122
- package/node_modules/zod/v4/locales/fi.cjs +0 -148
- package/node_modules/zod/v4/locales/fi.d.cts +0 -4
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -122
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -117
- package/node_modules/zod/v4/locales/fr.cjs +0 -142
- package/node_modules/zod/v4/locales/fr.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -116
- package/node_modules/zod/v4/locales/he.cjs +0 -143
- package/node_modules/zod/v4/locales/he.d.cts +0 -4
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -117
- package/node_modules/zod/v4/locales/hu.cjs +0 -143
- package/node_modules/zod/v4/locales/hu.d.cts +0 -4
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -117
- package/node_modules/zod/v4/locales/id.cjs +0 -142
- package/node_modules/zod/v4/locales/id.d.cts +0 -4
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -116
- package/node_modules/zod/v4/locales/index.cjs +0 -84
- package/node_modules/zod/v4/locales/index.d.cts +0 -39
- package/node_modules/zod/v4/locales/index.d.ts +0 -39
- package/node_modules/zod/v4/locales/index.js +0 -39
- package/node_modules/zod/v4/locales/it.cjs +0 -143
- package/node_modules/zod/v4/locales/it.d.cts +0 -4
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -117
- package/node_modules/zod/v4/locales/ja.cjs +0 -141
- package/node_modules/zod/v4/locales/ja.d.cts +0 -4
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -115
- package/node_modules/zod/v4/locales/kh.cjs +0 -143
- package/node_modules/zod/v4/locales/kh.d.cts +0 -4
- package/node_modules/zod/v4/locales/kh.d.ts +0 -4
- package/node_modules/zod/v4/locales/kh.js +0 -117
- package/node_modules/zod/v4/locales/ko.cjs +0 -147
- package/node_modules/zod/v4/locales/ko.d.cts +0 -4
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -121
- package/node_modules/zod/v4/locales/mk.cjs +0 -144
- package/node_modules/zod/v4/locales/mk.d.cts +0 -4
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -118
- package/node_modules/zod/v4/locales/ms.cjs +0 -142
- package/node_modules/zod/v4/locales/ms.d.cts +0 -4
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -116
- package/node_modules/zod/v4/locales/nl.cjs +0 -143
- package/node_modules/zod/v4/locales/nl.d.cts +0 -4
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -117
- package/node_modules/zod/v4/locales/no.cjs +0 -142
- package/node_modules/zod/v4/locales/no.d.cts +0 -4
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -116
- package/node_modules/zod/v4/locales/ota.cjs +0 -143
- package/node_modules/zod/v4/locales/ota.d.cts +0 -4
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -117
- package/node_modules/zod/v4/locales/pl.cjs +0 -143
- package/node_modules/zod/v4/locales/pl.d.cts +0 -4
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -117
- package/node_modules/zod/v4/locales/ps.cjs +0 -148
- package/node_modules/zod/v4/locales/ps.d.cts +0 -4
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -122
- package/node_modules/zod/v4/locales/pt.cjs +0 -142
- package/node_modules/zod/v4/locales/pt.d.cts +0 -4
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -116
- package/node_modules/zod/v4/locales/ru.cjs +0 -190
- package/node_modules/zod/v4/locales/ru.d.cts +0 -4
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -164
- package/node_modules/zod/v4/locales/sl.cjs +0 -143
- package/node_modules/zod/v4/locales/sl.d.cts +0 -4
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -117
- package/node_modules/zod/v4/locales/sv.cjs +0 -144
- package/node_modules/zod/v4/locales/sv.d.cts +0 -4
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -118
- package/node_modules/zod/v4/locales/ta.cjs +0 -143
- package/node_modules/zod/v4/locales/ta.d.cts +0 -4
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -117
- package/node_modules/zod/v4/locales/th.cjs +0 -143
- package/node_modules/zod/v4/locales/th.d.cts +0 -4
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -117
- package/node_modules/zod/v4/locales/tr.cjs +0 -143
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/tr.js +0 -115
- package/node_modules/zod/v4/locales/ua.cjs +0 -143
- package/node_modules/zod/v4/locales/ua.d.cts +0 -4
- package/node_modules/zod/v4/locales/ua.d.ts +0 -4
- package/node_modules/zod/v4/locales/ua.js +0 -117
- package/node_modules/zod/v4/locales/ur.cjs +0 -143
- package/node_modules/zod/v4/locales/ur.d.cts +0 -4
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -117
- package/node_modules/zod/v4/locales/vi.cjs +0 -142
- package/node_modules/zod/v4/locales/vi.d.cts +0 -4
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -116
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -116
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -117
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -47
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -17
- package/node_modules/zod/v4/mini/external.cjs +0 -62
- package/node_modules/zod/v4/mini/external.d.cts +0 -11
- package/node_modules/zod/v4/mini/external.d.ts +0 -11
- package/node_modules/zod/v4/mini/external.js +0 -13
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -60
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -30
- package/node_modules/zod/v4/mini/parse.cjs +0 -8
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -839
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -356
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -356
- package/node_modules/zod/v4/mini/schemas.js +0 -732
- package/node_modules/zod/v4-mini/index.cjs +0 -17
- package/node_modules/zod/v4-mini/index.d.cts +0 -1
- package/node_modules/zod/v4-mini/index.d.ts +0 -1
- package/node_modules/zod/v4-mini/index.js +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# pi-codex-auto-review
|
|
2
2
|
|
|
3
|
-
Codex의 ‘Approve for me’에서 영감을 받은 Pi 자동 실행 승인 검토 확장입니다.
|
|
3
|
+
Codex의 ‘Approve for me’에서 영감을 받은 Pi 자동 실행 승인 검토 확장입니다. 승인 요청을 규칙과 보조 모델로 검토하거나 사용자가 직접 승인하도록 설정합니다. 승인된 도구는 Pi의 원래 실행기로 실행합니다. OS 샌드박스나 파일·네트워크 격리를 구성하지 않습니다. Codex 공개 소스 [`rust-v0.160.0`](https://github.com/openai/codex/tree/a956835d020762cb2b570053af06f643a11c0ecc)의 공개 승인 정책을 참고했습니다.
|
|
4
|
+
|
|
5
|
+
현재 소스의 샌드박스 제거와 설정 메뉴 변경은 아직 npm에 게시되지 않았습니다. 기존 `0.1.2`에는 이전 실행 구조가 들어 있습니다. 새 배포 전에는 [소스 빌드와 로컬 등록](docs/usage.md#소스에서-빌드)으로 확인합니다.
|
|
4
6
|
|
|
5
7
|
## 설치
|
|
6
8
|
|
|
@@ -18,7 +20,14 @@ pi list
|
|
|
18
20
|
1. **정책 판단** — 절대 차단 경로와 `commandRules`를 먼저 평가합니다. 차단 경로는 모델 검토나 저장 승인으로 해제하지 않습니다.
|
|
19
21
|
2. **자동 검토** — 남은 작업은 현재 모델이 위험 등급과 결과를 판정합니다.
|
|
20
22
|
3. **승인** — 남은 범위는 사용자가 확정합니다.
|
|
21
|
-
4.
|
|
23
|
+
4. **Pi 실행** — 승인된 작업을 원래 SDK 도구로 실행하며 취소 신호와 호출자 옵션을 전달합니다.
|
|
24
|
+
|
|
25
|
+
## 승인 설정
|
|
26
|
+
|
|
27
|
+
- `/approve`: **Approve for me**(보조 모델 검토) 또는 **Ask for approval**(사용자 승인)을 선택합니다.
|
|
28
|
+
- `/approve-model`: 등록된 모델을 검색해 보조 검토 모델을 선택합니다. **현재 Pi 모델 사용**으로 되돌릴 수 있습니다.
|
|
29
|
+
|
|
30
|
+
선택은 `<agentDir>/guard/settings.json`에 저장되고 다음 실행에도 적용됩니다. 주 대화 모델은 바뀌지 않습니다. 취소하면 기존 설정을 유지합니다.
|
|
22
31
|
|
|
23
32
|
## 요구 사항
|
|
24
33
|
|
|
@@ -27,13 +36,13 @@ pi list
|
|
|
27
36
|
| Node.js | 22.19 이상 |
|
|
28
37
|
| Pi | 0.99.1 또는 1.0.0 |
|
|
29
38
|
| Rust | 소스 빌드에만 1.95 이상 필요 |
|
|
30
|
-
|
|
|
39
|
+
| 규칙 엔진 배포 | macOS ARM64와 Linux x64 |
|
|
31
40
|
|
|
32
41
|
## 보호 경계
|
|
33
42
|
|
|
34
43
|
- 모드는 `workspace-write`(작업 공간과 기본 임시 경로 쓰기 허용)와 `read-only`입니다.
|
|
35
44
|
- 제어·인증 경로와 프로젝트의 `.pi` 설정·확장 코드, 신뢰한 확장의 코드 디렉터리는 모델 쓰기를 절대 차단합니다.
|
|
36
|
-
-
|
|
45
|
+
- 일반 범위를 넘는 파일 접근, 검토 규칙, 해석하지 못하는 명령은 실행 전에 검토합니다. 읽기와 기존 범위 안의 일반 작업은 정책에 따라 실행합니다.
|
|
37
46
|
- 승인은 한 번, 세션, 규칙 저장 중 선택하며, 저장 승인은 정확한 도구·입력·정책에 묶입니다.
|
|
38
47
|
- 자동 검토는 현재 모델로 수행하고, 반복 거부되면 실제 작업을 중단합니다. 검토 오류는 승인으로 바뀌지 않습니다.
|
|
39
48
|
- MCP 도구 승인과 프로젝트 지침 탐색도 같은 신뢰·검토 경계 안에 둡니다.
|
|
@@ -42,9 +51,9 @@ pi list
|
|
|
42
51
|
|
|
43
52
|
## 한계와 비보장
|
|
44
53
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
54
|
+
- 승인된 셸과 인터프리터는 호스트 권한으로 실행합니다. 검토에 표시한 파일·도메인 범위는 OS가 강제하는 접근 제한이 아닙니다.
|
|
55
|
+
- 재귀 디렉터리 탐색·하드링크 전수 검사·네트워크 프록시를 구성하지 않습니다. 간접 파일 접근과 실행 중 목적지 변경을 격리하지 않습니다.
|
|
56
|
+
- Pi, 신뢰한 확장 코드와 외부 MCP 서버의 내부 실행은 신뢰 경계에 포함됩니다.
|
|
48
57
|
- 이미 MCP 서버에 전달한 요청의 취소 효과는 외부 공급자의 구현에 달려 있습니다.
|
|
49
58
|
- 공개 정책·흐름의 호환성 검증은 독점 Codex 모델과 모든 판단이 같다는 뜻이 아닙니다.
|
|
50
59
|
- 별도로 설치한 Pi 호스트의 의존성을 자동으로 교체하지 않습니다. 이 저장소의 조치 근거는 [의존성 보안](https://github.com/buYoung/pi-codex-auto-review/blob/HEAD/docs/security/dependencies.md) 문서에 있습니다.
|
|
@@ -55,12 +64,12 @@ pi list
|
|
|
55
64
|
npm run verify:guard
|
|
56
65
|
```
|
|
57
66
|
|
|
58
|
-
`verify:guard`는 빌드와 전체 로컬 검증을
|
|
67
|
+
`verify:guard`는 빌드와 현재 운영체제의 전체 로컬 검증을 실행합니다. 다른 운영체제와 실모델의 결과는 별도 실행 근거로 기록하며 로컬 통과로 대신하지 않습니다.
|
|
59
68
|
|
|
60
69
|
- `npm run test:*` 단일 검증은 실제 자격 증명이나 유료 모델을 사용하지 않습니다. 환경 제한·의존성 부재는 통과로 처리하지 않습니다.
|
|
61
70
|
- `npm run verify:platform`은 현재 운영체제의 전체 검증을 실행합니다.
|
|
62
71
|
- GitHub Actions의 `자동 검토 운영체제 검증`은 실제 Linux x64 검사와 Docker 이미지·결과 반출을 수행합니다. workflow에는 Ollama 키를 전달하지 않습니다.
|
|
63
|
-
- Windows의 `verify:windows`는
|
|
72
|
+
- Windows의 `verify:windows`는 규칙 엔진·승인 정책·파일 실행과 취소를 검증합니다. 전체 셸 실행 지원을 검증하는 명령은 아닙니다.
|
|
64
73
|
- Docker 컨테이너 검증 활용은 [사용법](https://github.com/buYoung/pi-codex-auto-review/blob/HEAD/docs/usage.md) 문서의 Docker 절에 있습니다.
|
|
65
74
|
- 각 실행은 `.reports/pi-guard/runs/<실행 ID>/<플랫폼>/`에 저장되고, 보호·허용·차단 사례는 [보호 경계 검증표](https://github.com/buYoung/pi-codex-auto-review/blob/HEAD/docs/testing/auto-review-protection.md)에 있습니다.
|
|
66
75
|
|
|
@@ -70,7 +79,7 @@ npm run verify:guard
|
|
|
70
79
|
- [배포 안내](https://github.com/buYoung/pi-codex-auto-review/blob/HEAD/docs/publishing.md) — pnpm release, Trusted Publishing 설정과 GitHub Actions의 자동 npm 게시
|
|
71
80
|
- [의존성 보안](https://github.com/buYoung/pi-codex-auto-review/blob/HEAD/docs/security/dependencies.md) — 높은 심각도 감사 항목의 적용 근거와 재생성 방법
|
|
72
81
|
- [보호 경계 검증표](https://github.com/buYoung/pi-codex-auto-review/blob/HEAD/docs/testing/auto-review-protection.md) — 보호·허용·검토 실패·취소 사례와 검증하지 않은 범위
|
|
73
|
-
- [인계 자료](https://github.com/buYoung/pi-codex-auto-review/tree/HEAD/docs/handoffs/auto-review) — 플랫폼·실모델 검증의 실행 근거와 소스 해시.
|
|
82
|
+
- [인계 자료](https://github.com/buYoung/pi-codex-auto-review/tree/HEAD/docs/handoffs/auto-review) — 이전 플랫폼·실모델 검증의 실행 근거와 소스 해시. 과거 결과와 현재 소스를 구분합니다.
|
|
74
83
|
|
|
75
84
|
## 라이선스
|
|
76
85
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import type { GuardController } from './tools/controller.js';
|
|
3
|
+
import type { ApprovalSettingsStore } from './approval-settings.js';
|
|
4
|
+
export declare function registerApprovalCommands(pi: ExtensionAPI, guard: GuardController, store: ApprovalSettingsStore): void;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { getSelectListTheme } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import { Container, Input, SelectList, Spacer, Text, Key, matchesKey, fuzzyFilter } from '@earendil-works/pi-tui';
|
|
3
|
+
import { canonicalJson, GuardError } from './contracts.js';
|
|
4
|
+
import { validateSettings } from './policy/index.js';
|
|
5
|
+
const CURRENT_MODEL = 'current';
|
|
6
|
+
const modeNames = { auto_review: 'Approve for me', user: 'Ask for approval' };
|
|
7
|
+
class ApprovalModelPicker extends Container {
|
|
8
|
+
items;
|
|
9
|
+
finish;
|
|
10
|
+
input = new Input();
|
|
11
|
+
list;
|
|
12
|
+
results = new Container();
|
|
13
|
+
filtered;
|
|
14
|
+
get focused() { return this.input.focused; }
|
|
15
|
+
set focused(value) { this.input.focused = value; }
|
|
16
|
+
constructor(items, selected, finish, search) {
|
|
17
|
+
super();
|
|
18
|
+
this.items = items;
|
|
19
|
+
this.finish = finish;
|
|
20
|
+
this.addChild(new Text('승인 검토 모델 선택', 0, 0));
|
|
21
|
+
this.addChild(new Spacer(1));
|
|
22
|
+
this.addChild(this.input);
|
|
23
|
+
this.addChild(new Spacer(1));
|
|
24
|
+
this.addChild(this.results);
|
|
25
|
+
this.addChild(new Text('검색 · ↑↓ 선택 · Enter 적용 · Esc 취소', 0, 0));
|
|
26
|
+
this.filtered = items;
|
|
27
|
+
this.input.setValue(search);
|
|
28
|
+
this.filter(search);
|
|
29
|
+
const index = this.filtered.findIndex(item => item.value === selected);
|
|
30
|
+
if (index >= 0)
|
|
31
|
+
this.list.setSelectedIndex(index);
|
|
32
|
+
}
|
|
33
|
+
filter(query) {
|
|
34
|
+
this.filtered = query ? fuzzyFilter(this.items, query, item => `${item.label} ${item.description ?? ''}`) : this.items;
|
|
35
|
+
this.list = new SelectList(this.filtered, 12, getSelectListTheme());
|
|
36
|
+
this.list.onSelect = item => this.finish(item.value);
|
|
37
|
+
this.list.onCancel = () => this.finish(undefined);
|
|
38
|
+
this.results.clear();
|
|
39
|
+
this.results.addChild(this.filtered.length ? this.list : new Text('일치하는 모델이 없습니다.', 0, 0));
|
|
40
|
+
}
|
|
41
|
+
handleInput(data) {
|
|
42
|
+
if (matchesKey(data, Key.escape))
|
|
43
|
+
this.finish(undefined);
|
|
44
|
+
else if (matchesKey(data, Key.enter) || matchesKey(data, Key.up) || matchesKey(data, Key.down))
|
|
45
|
+
this.list.handleInput(data);
|
|
46
|
+
else {
|
|
47
|
+
const before = this.input.getValue();
|
|
48
|
+
this.input.handleInput(data);
|
|
49
|
+
if (this.input.getValue() !== before)
|
|
50
|
+
this.filter(this.input.getValue());
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function chooseReviewModel(context, current, search) {
|
|
55
|
+
const models = context.modelRegistry.getAvailable();
|
|
56
|
+
const items = [
|
|
57
|
+
{ value: CURRENT_MODEL, label: '현재 Pi 모델 사용', description: '주 작업 모델의 선택을 따릅니다.' },
|
|
58
|
+
...models.map(model => ({ value: canonicalJson({ provider: model.provider, id: model.id }), label: model.name || model.id, description: `${model.provider}/${model.id}` })),
|
|
59
|
+
];
|
|
60
|
+
const selected = current ? canonicalJson(current) : CURRENT_MODEL;
|
|
61
|
+
const result = context.mode === 'rpc'
|
|
62
|
+
? await context.ui.select('승인 검토 모델 선택', items.map(item => `${item.label} — ${item.description}`)).then(value => value === undefined ? undefined : items[items.findIndex(item => `${item.label} — ${item.description}` === value)]?.value)
|
|
63
|
+
: await context.ui.custom((_tui, _theme, _keys, done) => new ApprovalModelPicker(items, selected, done, search));
|
|
64
|
+
if (result === undefined)
|
|
65
|
+
return undefined;
|
|
66
|
+
return result === CURRENT_MODEL ? null : JSON.parse(result);
|
|
67
|
+
}
|
|
68
|
+
export function registerApprovalCommands(pi, guard, store) {
|
|
69
|
+
const requireUI = (context) => {
|
|
70
|
+
if (!context.hasUI)
|
|
71
|
+
throw new GuardError('APPROVAL_UI_UNAVAILABLE', 'Approval settings require an interactive Pi session');
|
|
72
|
+
};
|
|
73
|
+
const apply = async (patch, context) => {
|
|
74
|
+
await guard.updateSettings(current => validateSettings({ ...current, ...patch }), context.cwd, settings => store.save(settings));
|
|
75
|
+
context.ui.setStatus('auto-review', undefined);
|
|
76
|
+
};
|
|
77
|
+
pi.registerCommand('approve', { description: 'Approve for me 또는 Ask for approval 승인 방식을 설정합니다.', handler: async (_args, context) => {
|
|
78
|
+
requireUI(context);
|
|
79
|
+
await context.waitForIdle();
|
|
80
|
+
const current = guard.options.settings;
|
|
81
|
+
const choice = await context.ui.select(`실행 승인 방식 — 현재 ${modeNames[current.approvalsReviewer]}`, Object.values(modeNames));
|
|
82
|
+
if (choice === undefined)
|
|
83
|
+
return;
|
|
84
|
+
const reviewer = choice === modeNames.auto_review ? 'auto_review' : choice === modeNames.user ? 'user' : undefined;
|
|
85
|
+
if (!reviewer)
|
|
86
|
+
return;
|
|
87
|
+
await apply({ approvalsReviewer: reviewer }, context);
|
|
88
|
+
context.ui.notify(`승인 방식: ${modeNames[reviewer]}`, 'info');
|
|
89
|
+
} });
|
|
90
|
+
pi.registerCommand('approve-model', { description: '승인 검토에 사용할 보조모델을 선택합니다.', handler: async (args, context) => {
|
|
91
|
+
requireUI(context);
|
|
92
|
+
await context.waitForIdle();
|
|
93
|
+
const current = guard.options.settings;
|
|
94
|
+
const model = await chooseReviewModel(context, current.reviewModel, args.trim());
|
|
95
|
+
if (model === undefined)
|
|
96
|
+
return;
|
|
97
|
+
if (model && !context.modelRegistry.find(model.provider, model.id))
|
|
98
|
+
throw new GuardError('MODEL_UNAVAILABLE', 'Selected review model is no longer registered');
|
|
99
|
+
await apply({ reviewModel: model }, context);
|
|
100
|
+
context.ui.notify(`승인 검토 모델: ${model ? `${model.provider}/${model.id}` : '현재 Pi 모델 사용'}`, 'info');
|
|
101
|
+
} });
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=approval-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-commands.js","sourceRoot":"","sources":["../src/approval-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAmD,MAAM,iCAAiC,CAAC;AACtH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,WAAW,EAAmC,MAAM,wBAAwB,CAAC;AACnJ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mBAAmB,CAAC;AAKzE,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC,MAAM,SAAS,GAAG,EAAC,WAAW,EAAC,gBAAgB,EAAC,IAAI,EAAC,kBAAkB,EAAU,CAAC;AAElF,MAAM,mBAAoB,SAAQ,SAAS;IAOZ;IAAwD;IANpE,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;IAC7B,IAAI,CAAc;IACT,OAAO,GAAG,IAAI,SAAS,EAAE,CAAC;IACnC,QAAQ,CAAe;IAC/B,IAAI,OAAO,KAAc,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,C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AE,CAAC,CAAC;YAC/E,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO;YAChC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAC,KAAK,CAAC,EAAE,CAAC;gBAAE,MAAM,IAAI,UAAU,CAAC,mBAAmB,EAAC,+CAA+C,CAAC,CAAC;YAC7J,MAAM,KAAK,CAAC,EAAC,WAAW,EAAC,KAAK,EAAC,EAAC,OAAO,CAAC,CAAC;YACzC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,aAAa,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE,EAAC,MAAM,CAAC,CAAC;QACnG,CAAC,EAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type GuardSettings } from './policy/index.js';
|
|
2
|
+
export declare class ApprovalSettingsStore {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
private readonly defaults;
|
|
5
|
+
private readonly isRequired;
|
|
6
|
+
constructor(path: string, defaults?: Partial<GuardSettings>, isRequired?: boolean);
|
|
7
|
+
load(): Promise<GuardSettings>;
|
|
8
|
+
save(settings: GuardSettings): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { dirname } from 'node:path';
|
|
4
|
+
import { canonicalJson, GuardError } from './contracts.js';
|
|
5
|
+
import { validateSettings } from './policy/index.js';
|
|
6
|
+
export class ApprovalSettingsStore {
|
|
7
|
+
path;
|
|
8
|
+
defaults;
|
|
9
|
+
isRequired;
|
|
10
|
+
constructor(path, defaults = {}, isRequired = false) {
|
|
11
|
+
this.path = path;
|
|
12
|
+
this.defaults = defaults;
|
|
13
|
+
this.isRequired = isRequired;
|
|
14
|
+
}
|
|
15
|
+
async load() {
|
|
16
|
+
try {
|
|
17
|
+
const stored = JSON.parse(await readFile(this.path, 'utf8'));
|
|
18
|
+
validateSettings(stored);
|
|
19
|
+
return validateSettings({ ...this.defaults, ...stored });
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
if (!this.isRequired && error.code === 'ENOENT')
|
|
23
|
+
return validateSettings(this.defaults);
|
|
24
|
+
throw new GuardError('INVALID_SETTINGS', 'Approval settings could not be loaded', { cause: error });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async save(settings) {
|
|
28
|
+
validateSettings(settings);
|
|
29
|
+
await mkdir(dirname(this.path), { recursive: true, mode: 0o700 });
|
|
30
|
+
const temporary = `${this.path}.${randomUUID()}.tmp`;
|
|
31
|
+
try {
|
|
32
|
+
await writeFile(temporary, canonicalJson(settings) + '\n', { flag: 'wx', mode: 0o600 });
|
|
33
|
+
await rename(temporary, this.path);
|
|
34
|
+
}
|
|
35
|
+
finally {
|
|
36
|
+
await rm(temporary, { force: true });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=approval-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-settings.js","sourceRoot":"","sources":["../src/approval-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mBAAmB,CAAC;AAEzE,MAAM,OAAO,qBAAqB;IACX;IAA+B;IAAwD;IAA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,SAAS,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;gBAAS,CAAC;YAAC,MAAM,EAAE,CAAC,SAAS,EAAC,EAAC,KAAK,EAAC,IAAI,EAAC,CAAC,CAAC;QAAC,CAAC;IACjD,CAAC;CACF"}
|
package/dist/contracts.d.ts
CHANGED
|
@@ -143,6 +143,8 @@ export interface ExecutionOptions {
|
|
|
143
143
|
readonly env?: NodeJS.ProcessEnv;
|
|
144
144
|
readonly onData?: (data: Buffer) => void;
|
|
145
145
|
readonly onUpdate?: (result: ToolResult) => void;
|
|
146
|
+
/** Execute the original Pi definition after admission, in the same process. */
|
|
147
|
+
readonly delegate?: (signal: AbortSignal) => Promise<Json>;
|
|
146
148
|
readonly authority?: ExecutionAuthority;
|
|
147
149
|
readonly onNetworkRequest?: (request: NetworkApprovalRequest, signal: AbortSignal) => Promise<boolean>;
|
|
148
150
|
}
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQhD,MAAM,CAAC,MAAM,UAAU,GAAwB,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AAkBtH,MAAM,CAAC,MAAM,WAAW,GAAoB,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EA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MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC;IAC7H,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAC9I,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExtensionFactory, type BashToolOptions, type ReadToolOptions, type McpExtensionOptions } from '@earendil-works/pi-coding-agent';
|
|
2
2
|
import { type GuardSettings } from './policy/index.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ToolExecutor } from './tools/executor.js';
|
|
4
4
|
import { GuardController } from './tools/controller.js';
|
|
5
5
|
import type { PermissionProfile } from './contracts.js';
|
|
6
6
|
import type { ReviewProvider } from './reviewer.js';
|
|
@@ -11,7 +11,7 @@ export interface GuardOptions {
|
|
|
11
11
|
settings?: Partial<GuardSettings>;
|
|
12
12
|
settingsPath?: string;
|
|
13
13
|
profile?: PermissionProfile;
|
|
14
|
-
executor?:
|
|
14
|
+
executor?: ToolExecutor;
|
|
15
15
|
provider?: ReviewProvider;
|
|
16
16
|
bashOptions?: Omit<BashToolOptions, 'operations'>;
|
|
17
17
|
readOptions?: Omit<ReadToolOptions, 'operations'>;
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
import { join, resolve } from 'node:path';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { createBashToolDefinition, createReadToolDefinition, createEditToolDefinition, createWriteToolDefinition, createGrepToolDefinition, createFindToolDefinition, createLsToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
4
|
-
import { defaultProfile
|
|
4
|
+
import { defaultProfile } from './policy/index.js';
|
|
5
5
|
import { ApprovalManager, FileGrantPersistence } from './approvals.js';
|
|
6
6
|
import { AuditLog } from './audit.js';
|
|
7
|
-
import {
|
|
7
|
+
import { PiExecutor } from './tools/executor.js';
|
|
8
8
|
import { GuardController } from './tools/controller.js';
|
|
9
9
|
import { AUTHORIZATION_ENTRY, safeEvidence } from './review/context.js';
|
|
10
|
-
import {
|
|
11
|
-
import { redact } from './audit.js';
|
|
10
|
+
import { createProfile } from './contracts.js';
|
|
12
11
|
import { createGuardedMcpExtension } from './tools/mcp.js';
|
|
12
|
+
import { ApprovalSettingsStore } from './approval-settings.js';
|
|
13
|
+
import { registerApprovalCommands } from './approval-commands.js';
|
|
13
14
|
export function createGuardExtension(options = {}) {
|
|
14
15
|
let controller;
|
|
15
16
|
const factory = async (pi) => {
|
|
17
|
+
const previous = controller;
|
|
18
|
+
controller = undefined;
|
|
19
|
+
await previous?.close();
|
|
16
20
|
const cwd = options.cwd ?? process.cwd();
|
|
17
|
-
const settings = options.settingsPath ? await loadSettings(options.settingsPath) : validateSettings(options.settings ?? {});
|
|
18
21
|
const agentDir = options.agentDir ?? process.env.PI_CODING_AGENT_DIR ?? join(homedir(), '.pi', 'agent');
|
|
19
22
|
const controlDir = join(agentDir, 'guard');
|
|
20
|
-
const
|
|
23
|
+
const settingsPath = options.settingsPath ? resolve(options.settingsPath) : join(controlDir, 'settings.json');
|
|
24
|
+
const settingsStore = new ApprovalSettingsStore(settingsPath, options.settings, Boolean(options.settingsPath));
|
|
25
|
+
const settings = await settingsStore.load();
|
|
26
|
+
const baseline = await defaultProfile(cwd, settings, [agentDir, settingsPath], options.trustedExtensionPaths);
|
|
21
27
|
const profile = options.profile ? createProfile({ ...options.profile,
|
|
22
28
|
denyRead: [...new Set([...options.profile.denyRead, ...baseline.denyRead])],
|
|
23
29
|
denyWrite: [...new Set([...options.profile.denyWrite, ...baseline.denyWrite])],
|
|
24
30
|
}) : baseline;
|
|
25
31
|
const audit = new AuditLog(join(controlDir, 'audit.jsonl'));
|
|
26
32
|
const approvals = new ApprovalManager({ reviewTimeoutMs: settings.reviewTimeoutMs, approvalTimeoutMs: settings.approvalTimeoutMs, approvalPolicy: settings.approvalPolicy, approvalsReviewer: settings.approvalsReviewer, audit, persistence: new FileGrantPersistence(join(controlDir, 'grants.json')) });
|
|
27
|
-
controller = new GuardController({ profile, settings, executor: options.executor ?? new
|
|
33
|
+
controller = new GuardController({ profile, settings, executor: options.executor ?? new PiExecutor(), approvals, audit, provider: options.provider, shellPath: options.bashOptions?.shellPath });
|
|
28
34
|
try {
|
|
29
35
|
await controller.initialize(cwd);
|
|
30
36
|
}
|
|
@@ -52,7 +58,7 @@ export function createGuardExtension(options = {}) {
|
|
|
52
58
|
pi.on('tool_call', event => {
|
|
53
59
|
guard.assertReady();
|
|
54
60
|
guard.noteCall(event);
|
|
55
|
-
if (!['bash', 'read', 'edit', 'write', 'grep', 'find', 'ls', 'codemode', ...settings.trustedTools].includes(event.toolName) && !guard.isExternalTool(event.toolName))
|
|
61
|
+
if (!['bash', 'read', 'edit', 'write', 'grep', 'find', 'ls', 'codemode', ...guard.options.settings.trustedTools].includes(event.toolName) && !guard.isExternalTool(event.toolName))
|
|
56
62
|
return { block: true, reason: 'Unknown tool needs an explicit trusted adapter' };
|
|
57
63
|
});
|
|
58
64
|
pi.on('tool_result', event => {
|
|
@@ -61,32 +67,7 @@ export function createGuardExtension(options = {}) {
|
|
|
61
67
|
});
|
|
62
68
|
pi.on('user_bash', (event, context) => { guard.assertReady(); return { operations: guard.userBashOperations(context, event.command) }; });
|
|
63
69
|
pi.on('session_shutdown', async () => { await guard.close(); });
|
|
64
|
-
pi
|
|
65
|
-
await context.waitForIdle();
|
|
66
|
-
const denials = guard.approvals.lifecycle.recentDenials;
|
|
67
|
-
if (!denials.length) {
|
|
68
|
-
context.ui.notify('재검토할 최근 거부가 없습니다.', 'info');
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
let id = args.trim();
|
|
72
|
-
if (!id) {
|
|
73
|
-
if (!context.hasUI)
|
|
74
|
-
throw new GuardError('APPROVAL_UI_UNAVAILABLE', 'Use /approve <denial-id> to select one exact recent denial');
|
|
75
|
-
const choices = denials.map(item => `${item.id} | ${item.action.tool} | ${redact(canonicalJson(item.action.args))} | ${item.assessment.rationale}`);
|
|
76
|
-
const selected = await context.ui.select('자동 검토 거부 — 한 번 재검토할 작업 선택', choices);
|
|
77
|
-
if (!selected)
|
|
78
|
-
return;
|
|
79
|
-
id = denials[choices.indexOf(selected)].id;
|
|
80
|
-
}
|
|
81
|
-
const retry = await guard.authorizeRetry(id, context);
|
|
82
|
-
if (retry.denial.action.source === 'user-bash' && !retry.denial.action.args.networkDestination) {
|
|
83
|
-
await guard.retryUserBash(retry.denial.action, context);
|
|
84
|
-
context.ui.notify('선택한 명령을 다시 검토하고 실행했습니다.', 'info');
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
const nested = retry.denial.action.source === 'nested' ? 'Invoke only this exact tool through codemode to preserve the original nested source.' : 'Retry only this exact tool action.';
|
|
88
|
-
pi.sendUserMessage(`${nested}\nTool: ${retry.denial.action.tool}\nArguments: ${canonicalJson(retry.args)}\nThe user selected denial ${id} for one retry. The controller holds a one-use exact-action marker; automatic review and policy still apply. Do not repeat unrelated earlier side effects.`, { expandPromptTemplates: false });
|
|
89
|
-
} });
|
|
70
|
+
registerApprovalCommands(pi, guard, settingsStore);
|
|
90
71
|
if (options.mcp !== false) {
|
|
91
72
|
try {
|
|
92
73
|
const mcp = await createGuardedMcpExtension(agentDir, () => guard, options.mcp, options.mcpToolPolicies);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,C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C;AACD,eAAe,oBAAoB,EAAE,CAAC,OAAO,CAAC"}
|
package/dist/policy/index.d.ts
CHANGED
package/dist/policy/index.js
CHANGED
|
@@ -8,8 +8,6 @@ import { analyzeShell, matchesPrefix } from './shell.js';
|
|
|
8
8
|
import { reviewPolicy } from '../review/policy.js';
|
|
9
9
|
import { matchesDomain, isNetworkHost, isDomainPattern, normalizeHost } from './domains.js';
|
|
10
10
|
import { evaluateRules, ruleCommands, matchesRule } from './rules.js';
|
|
11
|
-
import { runtimeWritePaths } from '../sandbox/runtime-write-paths.js';
|
|
12
|
-
import { hasNativePatternChars } from '../sandbox/paths.js';
|
|
13
11
|
export { canonicalPath, isWithin, analyzeShell, matchesPrefix, resolveToolPath };
|
|
14
12
|
export const DEFAULT_SETTINGS = immutable({
|
|
15
13
|
mode: 'workspace-write', commandRules: [], allowedDomains: [], reviewTimeoutMs: 20_000, approvalTimeoutMs: 60_000, executionTimeoutSeconds: 120, trustedTools: [],
|
|
@@ -163,10 +161,7 @@ export class PolicyEngine {
|
|
|
163
161
|
const canWrite = !isWrite || profile.writeRoots.some(p => isWithin(target, p)) && !(profile.readOnlyPaths ?? []).some(p => isWithin(target, p));
|
|
164
162
|
if (canRead && canWrite)
|
|
165
163
|
return decision(action, 'allow', 'Within current filesystem permissions');
|
|
166
|
-
|
|
167
|
-
if ((!canRead && hasNativePatternChars(target)) || (!canWrite && hasNativePatternChars(writePath)))
|
|
168
|
-
return decision(action, 'deny', 'Native permission roots containing *, ?, [ or ] cannot be approved as literal paths', EMPTY_DELTA, true);
|
|
169
|
-
return decision(action, 'ask', writePath === target ? 'Filesystem permission required' : 'The native backend requires the enclosing directory in this invocation; review this full write scope', { readPaths: canRead ? [] : [target], writePaths: canWrite ? [] : [writePath], domains: [] });
|
|
164
|
+
return decision(action, 'ask', 'Action outside the ordinary approval scope', { readPaths: canRead ? [] : [target], writePaths: canWrite ? [] : [target], domains: [] });
|
|
170
165
|
}
|
|
171
166
|
async shellDecision(action, signal) {
|
|
172
167
|
const profile = await this.resolvedProfile(action.cwd);
|
|
@@ -174,7 +169,7 @@ export class PolicyEngine {
|
|
|
174
169
|
if (typeof command !== 'string')
|
|
175
170
|
return decision(action, 'deny', 'Invalid command input', EMPTY_DELTA, true);
|
|
176
171
|
const analysis = analyzeShell(command);
|
|
177
|
-
let shouldAsk =
|
|
172
|
+
let shouldAsk = !analysis.isSupported;
|
|
178
173
|
const delta = { readPaths: [], writePaths: [], domains: [] };
|
|
179
174
|
const commandGroups = ruleCommands(command, typeof action.args.shellPath === 'string' ? action.args.shellPath : '/bin/bash');
|
|
180
175
|
const key = digest(commandGroups);
|
|
@@ -210,6 +205,8 @@ export class PolicyEngine {
|
|
|
210
205
|
for (const item of analysis.commands) {
|
|
211
206
|
const executable = basename(item.argv[0]);
|
|
212
207
|
const isSafeRead = ['pwd', 'echo', 'printf', 'ls', 'cat', 'head', 'tail', 'wc', 'rg', 'grep', 'find', 'stat', 'true', 'false'].includes(executable);
|
|
208
|
+
if (!isSafeRead && !['touch', 'mkdir', 'rmdir', 'rm', 'truncate', 'tee', 'chmod', 'chown', 'cp', 'mv', 'git', 'curl', 'wget'].includes(executable))
|
|
209
|
+
shouldAsk = true;
|
|
213
210
|
const operands = item.argv.slice(1).filter(arg => !arg.startsWith('-'));
|
|
214
211
|
const reads = [...item.reads], writes = [...item.writes];
|
|
215
212
|
if (analysis.isSupported) {
|
|
@@ -261,16 +258,12 @@ export class PolicyEngine {
|
|
|
261
258
|
delta[key] = [...new Set(await Promise.all(delta[key].map(path => canonicalPath(path, action.cwd))))];
|
|
262
259
|
if (delta.readPaths.some(path => profile.denyRead.some(root => isWithin(path, root))) || delta.writePaths.some(path => [...profile.denyRead, ...profile.denyWrite].some(root => isWithin(path, root))) || delta.domains.some(host => !isNetworkHost(host) || profile.deniedDomains.some(pattern => matchesDomain(host, pattern))))
|
|
263
260
|
return decision(action, 'deny', 'Requested permissions target an absolute deny', EMPTY_DELTA, true);
|
|
264
|
-
const
|
|
265
|
-
const hasCreationScope = writeScopes.some((path, index) => path !== delta.writePaths[index]);
|
|
266
|
-
const boundDelta = { ...delta, writePaths: [...new Set(writeScopes)], domains: [...new Set(delta.domains.map(normalizeHost))] };
|
|
267
|
-
if ([...boundDelta.readPaths, ...boundDelta.writePaths].some(hasNativePatternChars))
|
|
268
|
-
return decision(action, 'deny', 'Native permission roots containing *, ?, [ or ] cannot be approved as literal paths', EMPTY_DELTA, true);
|
|
261
|
+
const boundDelta = { ...delta, domains: [...new Set(delta.domains.map(normalizeHost))] };
|
|
269
262
|
if (isRuleAllowed)
|
|
270
263
|
return immutable({ ...decision(action, 'allow', 'Trusted prefix rule authorizes this command', boundDelta), authority: { kind: 'command-rule', actionDigest: action.digest, ruleDigest: digest(matches) } });
|
|
271
264
|
const isFullRequest = action.args.sandbox_permissions === 'require_escalated' && explicit === undefined;
|
|
272
265
|
shouldAsk ||= action.args.sandbox_permissions === 'require_escalated';
|
|
273
|
-
const reason =
|
|
266
|
+
const reason = prompted?.justification ?? (shouldAsk ? 'Command requires approval review' : 'Within the ordinary approval scope');
|
|
274
267
|
return immutable({ ...decision(action, shouldAsk ? 'ask' : 'allow', reason, boundDelta), approvalCategory: prompted ? 'rules' : 'sandbox', ...(isFullRequest ? { authority: { kind: 'reviewed-command', actionDigest: action.digest } } : {}) });
|
|
275
268
|
}
|
|
276
269
|
async resolvedProfile(cwd) {
|
|
@@ -281,24 +274,5 @@ export class PolicyEngine {
|
|
|
281
274
|
result.readOnlyPaths = await Promise.all(this.profile.readOnlyPaths.map(path => canonicalPath(path, cwd)));
|
|
282
275
|
return result;
|
|
283
276
|
}
|
|
284
|
-
async nativeWriteScope(target, cwd) {
|
|
285
|
-
let candidate = target;
|
|
286
|
-
while (process.platform === 'linux') {
|
|
287
|
-
try {
|
|
288
|
-
await stat(candidate);
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
catch (error) {
|
|
292
|
-
if (error.code !== 'ENOENT')
|
|
293
|
-
throw error;
|
|
294
|
-
const parent = dirname(candidate);
|
|
295
|
-
if (parent === candidate)
|
|
296
|
-
throw error;
|
|
297
|
-
candidate = parent;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
const defaults = await runtimeWritePaths(cwd);
|
|
301
|
-
return defaults.find(root => isWithin(candidate, root)) ?? candidate;
|
|
302
|
-
}
|
|
303
277
|
}
|
|
304
278
|
//# sourceMappingURL=index.js.map
|