@knyazevai/dsh 0.2.4 → 0.2.6
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/node_modules/@knyazevai/dsh-acp/package.json +24 -24
- package/node_modules/@knyazevai/dsh-acp-app/package.json +3 -3
- package/node_modules/@knyazevai/dsh-agent/package.json +18 -18
- package/node_modules/@knyazevai/dsh-agent-default-model/package.json +7 -7
- package/node_modules/@knyazevai/dsh-agent-instructions/package.json +25 -25
- package/node_modules/@knyazevai/dsh-agent-loop/package.json +22 -22
- package/node_modules/@knyazevai/dsh-agent-preset/package.json +6 -6
- package/node_modules/@knyazevai/dsh-agent-preset-registry/package.json +26 -26
- package/node_modules/@knyazevai/dsh-agent-tool-presentation/package.json +8 -8
- package/node_modules/@knyazevai/dsh-anonymous-user-id/package.json +5 -5
- package/node_modules/@knyazevai/dsh-api-account-controller/package.json +7 -7
- package/node_modules/@knyazevai/dsh-api-gateway/package.json +12 -12
- package/node_modules/@knyazevai/dsh-api-job-controller/package.json +10 -10
- package/node_modules/@knyazevai/dsh-api-remote-access/package.json +8 -8
- package/node_modules/@knyazevai/dsh-api-remotes/package.json +42 -42
- package/node_modules/@knyazevai/dsh-api-session-controller/package.json +77 -77
- package/node_modules/@knyazevai/dsh-api-settings-controller/package.json +13 -13
- package/node_modules/@knyazevai/dsh-api-terminal-controller/package.json +21 -21
- package/node_modules/@knyazevai/dsh-api-workspace-controller/package.json +21 -21
- package/node_modules/@knyazevai/dsh-api-workspace-files/package.json +14 -14
- package/node_modules/@knyazevai/dsh-app-boot/README.i18n.yaml +2 -2
- package/node_modules/@knyazevai/dsh-app-boot/README.md +1 -1
- package/node_modules/@knyazevai/dsh-app-boot/README.zh.md +1 -1
- package/node_modules/@knyazevai/dsh-app-boot/lib/index.js +3 -1
- package/node_modules/@knyazevai/dsh-app-boot/package.json +8 -8
- package/node_modules/@knyazevai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@knyazevai/dsh-attachment/package.json +3 -3
- package/node_modules/@knyazevai/dsh-attachment-local/package.json +6 -6
- package/node_modules/@knyazevai/dsh-authorization/package.json +5 -5
- package/node_modules/@knyazevai/dsh-base/package.json +95 -95
- package/node_modules/@knyazevai/dsh-bash-local/package.json +8 -8
- package/node_modules/@knyazevai/dsh-bash-sandbox/package.json +12 -12
- package/node_modules/@knyazevai/dsh-brand/package.json +1 -1
- package/node_modules/@knyazevai/dsh-chunked-list/package.json +1 -1
- package/node_modules/@knyazevai/dsh-client-connection/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-file-upload/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-hmr/package.json +3 -3
- package/node_modules/@knyazevai/dsh-client-locale/package.json +11 -11
- package/node_modules/@knyazevai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@knyazevai/dsh-client-modules/package.json +4 -4
- package/node_modules/@knyazevai/dsh-client-product-analytics/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-resources/package.json +6 -6
- package/node_modules/@knyazevai/dsh-client-shortcuts/package.json +9 -9
- package/node_modules/@knyazevai/dsh-client-ui-agent-preset/package.json +18 -18
- package/node_modules/@knyazevai/dsh-client-ui-approval/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-attachment/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-ui-brand-official/package.json +4 -4
- package/node_modules/@knyazevai/dsh-client-ui-chat/package.json +37 -37
- package/node_modules/@knyazevai/dsh-client-ui-commands/package.json +16 -16
- package/node_modules/@knyazevai/dsh-client-ui-conversation/package.json +34 -34
- package/node_modules/@knyazevai/dsh-client-ui-cordis/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-deepseek-model-label-1017/package.json +8 -8
- package/node_modules/@knyazevai/dsh-client-ui-deliverables/package.json +30 -30
- package/node_modules/@knyazevai/dsh-client-ui-directory-picker-browse/package.json +8 -8
- package/node_modules/@knyazevai/dsh-client-ui-directory-picker-native/package.json +4 -4
- package/node_modules/@knyazevai/dsh-client-ui-goal/package.json +15 -15
- package/node_modules/@knyazevai/dsh-client-ui-input-trigger/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-jobs/package.json +11 -11
- package/node_modules/@knyazevai/dsh-client-ui-layout/package.json +9 -9
- package/node_modules/@knyazevai/dsh-client-ui-message-feedback/package.json +18 -18
- package/node_modules/@knyazevai/dsh-client-ui-model-selection/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-open-in-app/package.json +20 -20
- package/node_modules/@knyazevai/dsh-client-ui-permission-presets/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-plan/package.json +21 -21
- package/node_modules/@knyazevai/dsh-client-ui-plugin-manager/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-plugin-market/package.json +14 -14
- package/node_modules/@knyazevai/dsh-client-ui-reference/package.json +16 -16
- package/node_modules/@knyazevai/dsh-client-ui-renderer/package.json +3 -3
- package/node_modules/@knyazevai/dsh-client-ui-schedule/package.json +20 -20
- package/node_modules/@knyazevai/dsh-client-ui-secret-mask/package.json +6 -6
- package/node_modules/@knyazevai/dsh-client-ui-session/package.json +11 -11
- package/node_modules/@knyazevai/dsh-client-ui-settings/package.json +7 -7
- package/node_modules/@knyazevai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/node_modules/@knyazevai/dsh-client-ui-settings-account/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-settings-agent-loop/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@knyazevai/dsh-client-ui-settings-general/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-settings-models/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-settings-plugin-inventory/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-settings-plugins/package.json +7 -7
- package/node_modules/@knyazevai/dsh-client-ui-settings-session-log/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-ui-settings-shell/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-ui-settings-subagent/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-ui-settings-web-search/package.json +10 -10
- package/node_modules/@knyazevai/dsh-client-ui-shortcuts/package.json +11 -11
- package/node_modules/@knyazevai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@knyazevai/dsh-client-ui-sidebar/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-sidebar-browser/package.json +12 -12
- package/node_modules/@knyazevai/dsh-client-ui-sidebar-documentpreview/package.json +20 -20
- package/node_modules/@knyazevai/dsh-client-ui-sidebar-files/package.json +16 -16
- package/node_modules/@knyazevai/dsh-client-ui-sidebar-right/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-sidebar-terminal/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-skill/package.json +17 -17
- package/node_modules/@knyazevai/dsh-client-ui-subagent/package.json +18 -18
- package/node_modules/@knyazevai/dsh-client-ui-theme/package.json +13 -13
- package/node_modules/@knyazevai/dsh-client-ui-tool/package.json +28 -28
- package/node_modules/@knyazevai/dsh-client-ui-trajectory/package.json +18 -18
- package/node_modules/@knyazevai/dsh-client-ui-user-questions/package.json +21 -21
- package/node_modules/@knyazevai/dsh-client-ui-workflow-run/package.json +15 -15
- package/node_modules/@knyazevai/dsh-client-ui-workspace/package.json +27 -27
- package/node_modules/@knyazevai/dsh-cmdline/package.json +1 -1
- package/node_modules/@knyazevai/dsh-command-compact/package.json +8 -8
- package/node_modules/@knyazevai/dsh-command-feedback/package.json +12 -12
- package/node_modules/@knyazevai/dsh-command-goal/package.json +12 -12
- package/node_modules/@knyazevai/dsh-commands/package.json +16 -16
- package/node_modules/@knyazevai/dsh-compaction/package.json +9 -9
- package/node_modules/@knyazevai/dsh-compaction-basic/package.json +24 -24
- package/node_modules/@knyazevai/dsh-compaction-image-offload/package.json +17 -17
- package/node_modules/@knyazevai/dsh-compaction-tool-result-pruner/package.json +12 -12
- package/node_modules/@knyazevai/dsh-config-editor/package.json +6 -6
- package/node_modules/@knyazevai/dsh-cordis-client-runner/package.json +6 -6
- package/node_modules/@knyazevai/dsh-cordis-host-runner/package.json +18 -18
- package/node_modules/@knyazevai/dsh-credentials/package.json +2 -2
- package/node_modules/@knyazevai/dsh-credentials-local/package.json +9 -9
- package/node_modules/@knyazevai/dsh-deepseek-account/package.json +9 -9
- package/node_modules/@knyazevai/dsh-deepseek-account-platform/package.json +9 -9
- package/node_modules/@knyazevai/dsh-deepseek-llm-api-extensions/package.json +1 -1
- package/node_modules/@knyazevai/dsh-deque/package.json +1 -1
- package/node_modules/@knyazevai/dsh-experimental-agent-team/package.json +20 -20
- package/node_modules/@knyazevai/dsh-experimental-agent-team-profile/package.json +4 -4
- package/node_modules/@knyazevai/dsh-experimental-api-speech-to-text/package.json +5 -5
- package/node_modules/@knyazevai/dsh-experimental-auto-review/package.json +38 -38
- package/node_modules/@knyazevai/dsh-experimental-badge-skill-bundle/package.json +2 -2
- package/node_modules/@knyazevai/dsh-experimental-client-ui-agent-team/package.json +13 -13
- package/node_modules/@knyazevai/dsh-experimental-client-ui-cot-translation/package.json +22 -22
- package/node_modules/@knyazevai/dsh-experimental-client-ui-voice-input/package.json +17 -17
- package/node_modules/@knyazevai/dsh-experimental-cot-translation-bundle/package.json +3 -3
- package/node_modules/@knyazevai/dsh-experimental-inspector/package.json +16 -16
- package/node_modules/@knyazevai/dsh-experimental-inspector-profile/package.json +3 -3
- package/node_modules/@knyazevai/dsh-experimental-plugin-market-bundle/package.json +3 -3
- package/node_modules/@knyazevai/dsh-experimental-ralph-bundle/package.json +3 -3
- package/node_modules/@knyazevai/dsh-experimental-session-inspector/package.json +14 -14
- package/node_modules/@knyazevai/dsh-experimental-session-search/package.json +3 -3
- package/node_modules/@knyazevai/dsh-experimental-session-titles-bundle/package.json +2 -2
- package/node_modules/@knyazevai/dsh-experimental-speech-to-text/package.json +6 -6
- package/node_modules/@knyazevai/dsh-experimental-speech-to-text-sensevoice/package.json +7 -7
- package/node_modules/@knyazevai/dsh-experimental-terminal-bundle/package.json +4 -4
- package/node_modules/@knyazevai/dsh-experimental-tool-agent-team/package.json +23 -23
- package/node_modules/@knyazevai/dsh-experimental-tool-worktree/package.json +19 -19
- package/node_modules/@knyazevai/dsh-experimental-translator/package.json +24 -24
- package/node_modules/@knyazevai/dsh-experimental-voice-input-bundle/package.json +5 -5
- package/node_modules/@knyazevai/dsh-experimental-worktree/package.json +21 -21
- package/node_modules/@knyazevai/dsh-file-reference/package.json +3 -3
- package/node_modules/@knyazevai/dsh-file-reference-local/package.json +13 -13
- package/node_modules/@knyazevai/dsh-fork-base/package.json +7 -7
- package/node_modules/@knyazevai/dsh-fork-llm-first-chunk-timeout/package.json +17 -17
- package/node_modules/@knyazevai/dsh-fork-llm-rate-limit-cooldown/package.json +16 -16
- package/node_modules/@knyazevai/dsh-fork-session-source/package.json +7 -7
- package/node_modules/@knyazevai/dsh-fork-ui-workspace-overlay/package.json +14 -14
- package/node_modules/@knyazevai/dsh-fork-web/package.json +7 -7
- package/node_modules/@knyazevai/dsh-fork-workspace-session-state/package.json +11 -11
- package/node_modules/@knyazevai/dsh-fs/package.json +7 -7
- package/node_modules/@knyazevai/dsh-fs-local/package.json +4 -4
- package/node_modules/@knyazevai/dsh-fs-observation-policy/package.json +4 -4
- package/node_modules/@knyazevai/dsh-fs-sandbox/package.json +10 -10
- package/node_modules/@knyazevai/dsh-goal/package.json +22 -22
- package/node_modules/@knyazevai/dsh-goal-round-driver/package.json +16 -16
- package/node_modules/@knyazevai/dsh-harness-dev-context/package.json +12 -12
- package/node_modules/@knyazevai/dsh-headless/package.json +20 -20
- package/node_modules/@knyazevai/dsh-hmr/package.json +6 -6
- package/node_modules/@knyazevai/dsh-home-paths/package.json +1 -1
- package/node_modules/@knyazevai/dsh-host-directory-picker/package.json +1 -1
- package/node_modules/@knyazevai/dsh-host-directory-picker-auto/package.json +15 -15
- package/node_modules/@knyazevai/dsh-host-directory-picker-browse/package.json +2 -2
- package/node_modules/@knyazevai/dsh-host-directory-picker-native/package.json +3 -3
- package/node_modules/@knyazevai/dsh-host-frontend-static/package.json +6 -6
- package/node_modules/@knyazevai/dsh-host-open-in-app/package.json +5 -5
- package/node_modules/@knyazevai/dsh-host-plugin-inventory/package.json +9 -9
- package/node_modules/@knyazevai/dsh-host-product-telemetry-otel/package.json +5 -5
- package/node_modules/@knyazevai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@knyazevai/dsh-http-proxy/README.i18n.yaml +10 -10
- package/node_modules/@knyazevai/dsh-http-proxy/README.md +7 -2
- package/node_modules/@knyazevai/dsh-http-proxy/README.zh.md +7 -2
- package/node_modules/@knyazevai/dsh-http-proxy/lib/index.js +221 -19
- package/node_modules/@knyazevai/dsh-http-proxy/lib/types/index.d.ts +3 -3
- package/node_modules/@knyazevai/dsh-http-proxy/lib/types/install.d.ts +8 -7
- package/node_modules/@knyazevai/dsh-http-proxy/lib/types/policy.d.ts +19 -2
- package/node_modules/@knyazevai/dsh-http-proxy/lib/types/system.d.ts +53 -0
- package/node_modules/@knyazevai/dsh-http-proxy/package.json +1 -1
- package/node_modules/@knyazevai/dsh-invariants/package.json +1 -1
- package/node_modules/@knyazevai/dsh-jobs/package.json +9 -9
- package/node_modules/@knyazevai/dsh-jobs-local/package.json +12 -12
- package/node_modules/@knyazevai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@knyazevai/dsh-lazy-require/package.json +1 -1
- package/node_modules/@knyazevai/dsh-llm/package.json +7 -7
- package/node_modules/@knyazevai/dsh-llm-deepseek/package.json +37 -37
- package/node_modules/@knyazevai/dsh-llm-deepseek-account/package.json +13 -13
- package/node_modules/@knyazevai/dsh-llm-deepseek-api-key/package.json +9 -9
- package/node_modules/@knyazevai/dsh-llm-pi-ai/package.json +21 -21
- package/node_modules/@knyazevai/dsh-llm-retry/package.json +21 -21
- package/node_modules/@knyazevai/dsh-mcp-client/package.json +20 -20
- package/node_modules/@knyazevai/dsh-mcp-resources/package.json +12 -12
- package/node_modules/@knyazevai/dsh-message-feedback/package.json +14 -14
- package/node_modules/@knyazevai/dsh-native-command/package.json +1 -1
- package/node_modules/@knyazevai/dsh-office-to-pdf/package.json +6 -6
- package/node_modules/@knyazevai/dsh-otel/package.json +3 -3
- package/node_modules/@knyazevai/dsh-output-retention/package.json +1 -1
- package/node_modules/@knyazevai/dsh-package-manifest/package.json +1 -1
- package/node_modules/@knyazevai/dsh-permission-presets/package.json +18 -18
- package/node_modules/@knyazevai/dsh-persona/package.json +4 -4
- package/node_modules/@knyazevai/dsh-plan-mode/package.json +21 -21
- package/node_modules/@knyazevai/dsh-plugin-manager/package.json +27 -27
- package/node_modules/@knyazevai/dsh-plugin-market/package.json +18 -18
- package/node_modules/@knyazevai/dsh-plugin-market-index/package.json +2 -2
- package/node_modules/@knyazevai/dsh-plugin-package-inventory-deepseek/package.json +13 -13
- package/node_modules/@knyazevai/dsh-ptc-runtime/package.json +3 -3
- package/node_modules/@knyazevai/dsh-ptc-runtime-node/package.json +20 -20
- package/node_modules/@knyazevai/dsh-pwsh-local/package.json +8 -8
- package/node_modules/@knyazevai/dsh-pwsh-sandbox/package.json +12 -12
- package/node_modules/@knyazevai/dsh-repeat-tool-reminder/package.json +10 -10
- package/node_modules/@knyazevai/dsh-sandbox/package.json +6 -6
- package/node_modules/@knyazevai/dsh-sandbox-local/package.json +9 -9
- package/node_modules/@knyazevai/dsh-sandbox-policy/package.json +11 -11
- package/node_modules/@knyazevai/dsh-sandbox-windows-acl/package.json +10 -10
- package/node_modules/@knyazevai/dsh-schedule/package.json +31 -31
- package/node_modules/@knyazevai/dsh-scope/package.json +1 -1
- package/node_modules/@knyazevai/dsh-sdk-app/package.json +5 -5
- package/node_modules/@knyazevai/dsh-sdk-jsonrpc-server/package.json +24 -24
- package/node_modules/@knyazevai/dsh-sdk-minimal/package.json +34 -34
- package/node_modules/@knyazevai/dsh-sdk-protocol/package.json +7 -7
- package/node_modules/@knyazevai/dsh-session/package.json +8 -8
- package/node_modules/@knyazevai/dsh-session-checkpoint-policy/package.json +16 -16
- package/node_modules/@knyazevai/dsh-session-format/package.json +2 -2
- package/node_modules/@knyazevai/dsh-session-format-catalog/package.json +9 -9
- package/node_modules/@knyazevai/dsh-session-format-v0-to-v1/package.json +4 -4
- package/node_modules/@knyazevai/dsh-session-format-v1-to-v2/package.json +6 -6
- package/node_modules/@knyazevai/dsh-session-format-v2-to-v3/package.json +4 -4
- package/node_modules/@knyazevai/dsh-session-format-v3-to-v4/package.json +3 -3
- package/node_modules/@knyazevai/dsh-session-log-deepseek/package.json +14 -14
- package/node_modules/@knyazevai/dsh-session-log-export/package.json +21 -21
- package/node_modules/@knyazevai/dsh-session-persistence/package.json +9 -9
- package/node_modules/@knyazevai/dsh-session-persistence-jsonl/package.json +10 -10
- package/node_modules/@knyazevai/dsh-session-projection/package.json +3 -3
- package/node_modules/@knyazevai/dsh-session-projection-cache/package.json +10 -10
- package/node_modules/@knyazevai/dsh-session-query/package.json +18 -18
- package/node_modules/@knyazevai/dsh-session-query-sqlite/package.json +9 -9
- package/node_modules/@knyazevai/dsh-session-reference/package.json +35 -35
- package/node_modules/@knyazevai/dsh-session-stats/package.json +7 -7
- package/node_modules/@knyazevai/dsh-session-telemetry/package.json +5 -5
- package/node_modules/@knyazevai/dsh-session-telemetry-otel/package.json +22 -22
- package/node_modules/@knyazevai/dsh-session-title/package.json +14 -14
- package/node_modules/@knyazevai/dsh-session-title-all-prompts-llm/package.json +12 -12
- package/node_modules/@knyazevai/dsh-session-title-first-prompt-llm/package.json +15 -15
- package/node_modules/@knyazevai/dsh-session-title-llm/package.json +10 -10
- package/node_modules/@knyazevai/dsh-session-turn-outline/package.json +7 -7
- package/node_modules/@knyazevai/dsh-settings/package.json +10 -10
- package/node_modules/@knyazevai/dsh-shell/package.json +5 -5
- package/node_modules/@knyazevai/dsh-shell-env/package.json +11 -11
- package/node_modules/@knyazevai/dsh-skill/package.json +6 -6
- package/node_modules/@knyazevai/dsh-skill-badge/package.json +3 -3
- package/node_modules/@knyazevai/dsh-skill-filesystem/package.json +7 -7
- package/node_modules/@knyazevai/dsh-skill-office/package.json +3 -3
- package/node_modules/@knyazevai/dsh-spill/package.json +7 -7
- package/node_modules/@knyazevai/dsh-spill-local/package.json +6 -6
- package/node_modules/@knyazevai/dsh-spill-policy/package.json +31 -31
- package/node_modules/@knyazevai/dsh-storage/package.json +1 -1
- package/node_modules/@knyazevai/dsh-storage-domain/package.json +3 -3
- package/node_modules/@knyazevai/dsh-storage-json/package.json +3 -3
- package/node_modules/@knyazevai/dsh-subagent/package.json +47 -47
- package/node_modules/@knyazevai/dsh-subagent-fork-in-process/package.json +12 -12
- package/node_modules/@knyazevai/dsh-subagent-spawn-in-process/package.json +16 -16
- package/node_modules/@knyazevai/dsh-subprocess/package.json +4 -4
- package/node_modules/@knyazevai/dsh-subprocess-local/package.json +8 -8
- package/node_modules/@knyazevai/dsh-system-prompt/package.json +5 -5
- package/node_modules/@knyazevai/dsh-terminal/package.json +7 -7
- package/node_modules/@knyazevai/dsh-terminal-bash/package.json +20 -20
- package/node_modules/@knyazevai/dsh-time-context/package.json +20 -20
- package/node_modules/@knyazevai/dsh-timeout/package.json +1 -1
- package/node_modules/@knyazevai/dsh-tmux-context/package.json +12 -12
- package/node_modules/@knyazevai/dsh-token-meter/package.json +14 -14
- package/node_modules/@knyazevai/dsh-tool-ask-user/package.json +9 -9
- package/node_modules/@knyazevai/dsh-tool-bash/package.json +33 -33
- package/node_modules/@knyazevai/dsh-tool-bash-persistent/package.json +22 -22
- package/node_modules/@knyazevai/dsh-tool-call-timeout-policy/package.json +7 -7
- package/node_modules/@knyazevai/dsh-tool-cordis/package.json +10 -10
- package/node_modules/@knyazevai/dsh-tool-fs/package.json +32 -32
- package/node_modules/@knyazevai/dsh-tool-fs-search/package.json +23 -23
- package/node_modules/@knyazevai/dsh-tool-goal/package.json +17 -17
- package/node_modules/@knyazevai/dsh-tool-jobs/package.json +15 -15
- package/node_modules/@knyazevai/dsh-tool-present/package.json +20 -20
- package/node_modules/@knyazevai/dsh-tool-pwsh/package.json +33 -33
- package/node_modules/@knyazevai/dsh-tool-pwsh-persistent/package.json +23 -23
- package/node_modules/@knyazevai/dsh-tool-ralph/package.json +20 -20
- package/node_modules/@knyazevai/dsh-tool-schedule/package.json +12 -12
- package/node_modules/@knyazevai/dsh-tool-session-query/package.json +24 -24
- package/node_modules/@knyazevai/dsh-tool-skill/package.json +15 -15
- package/node_modules/@knyazevai/dsh-tool-str-replace-editor/package.json +20 -20
- package/node_modules/@knyazevai/dsh-tool-subagent/package.json +22 -22
- package/node_modules/@knyazevai/dsh-tool-subagent-control/package.json +20 -20
- package/node_modules/@knyazevai/dsh-tool-terminal/package.json +26 -26
- package/node_modules/@knyazevai/dsh-tool-todo/package.json +14 -14
- package/node_modules/@knyazevai/dsh-tool-web/package.json +19 -19
- package/node_modules/@knyazevai/dsh-tool-workflow/package.json +21 -21
- package/node_modules/@knyazevai/dsh-tool-working-directory/package.json +12 -12
- package/node_modules/@knyazevai/dsh-tool-workspace-dependencies/package.json +6 -6
- package/node_modules/@knyazevai/dsh-tools/package.json +25 -25
- package/node_modules/@knyazevai/dsh-typert-loader/package.json +5 -5
- package/node_modules/@knyazevai/dsh-typert-protocol/package.json +2 -2
- package/node_modules/@knyazevai/dsh-typert-registry/package.json +2 -2
- package/node_modules/@knyazevai/dsh-user-approval/package.json +13 -13
- package/node_modules/@knyazevai/dsh-user-questions/package.json +15 -15
- package/node_modules/@knyazevai/dsh-util-code-language/package.json +1 -1
- package/node_modules/@knyazevai/dsh-util-crypto/package.json +1 -1
- package/node_modules/@knyazevai/dsh-util-time/package.json +1 -1
- package/node_modules/@knyazevai/dsh-util-values/package.json +1 -1
- package/node_modules/@knyazevai/dsh-util-workspace-path/package.json +1 -1
- package/node_modules/@knyazevai/dsh-wake-scheduler/package.json +11 -11
- package/node_modules/@knyazevai/dsh-web/package.json +3 -3
- package/node_modules/@knyazevai/dsh-web-app/package.json +141 -141
- package/node_modules/@knyazevai/dsh-web-deepseek-api/package.json +15 -15
- package/node_modules/@knyazevai/dsh-web-fetch-http/package.json +7 -7
- package/node_modules/@knyazevai/dsh-web-frontend/package.json +28 -28
- package/node_modules/@knyazevai/dsh-web-search-deepseek/package.json +15 -15
- package/node_modules/@knyazevai/dsh-win32-process/package.json +2 -2
- package/node_modules/@knyazevai/dsh-workflow/package.json +9 -9
- package/node_modules/@knyazevai/dsh-workflow-ptc/package.json +37 -37
- package/node_modules/@knyazevai/dsh-working-directory/package.json +19 -19
- package/node_modules/@knyazevai/dsh-workspace/package.json +12 -12
- package/node_modules/@knyazevai/dsh-workspace-changes/package.json +19 -19
- package/package.json +304 -304
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knyazevai/dsh-host-product-telemetry-otel",
|
|
3
3
|
"description": "Explicit product usage events exported through OpenTelemetry HTTP logs",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "~4.0.5",
|
|
39
|
-
"@knyazevai/dsh-otel": "0.2.
|
|
39
|
+
"@knyazevai/dsh-otel": "0.2.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@deepseek-ai/cordis": "~4.0.5",
|
|
43
43
|
"@deepseek-ai/cordis-plugin-loader": "~1.0.6",
|
|
44
|
-
"@knyazevai/dsh-app-boot": "0.2.
|
|
45
|
-
"@knyazevai/dsh-loader-smoke": "0.2.
|
|
46
|
-
"@knyazevai/dsh-otel": "0.2.
|
|
44
|
+
"@knyazevai/dsh-app-boot": "0.2.6",
|
|
45
|
+
"@knyazevai/dsh-loader-smoke": "0.2.6",
|
|
46
|
+
"@knyazevai/dsh-otel": "0.2.6"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knyazevai/dsh-host-webserver",
|
|
3
3
|
"description": "Web route-registration plugin: HTTP and upgrade routes, index transform taps, and static dist fallback; knows no harness concepts",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
en: 7607501a633ca97d
|
|
10
10
|
zh: 96a1c401a149155f
|
|
11
11
|
/knyazevai-dsh-http-proxy/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: 122515537847acfc
|
|
13
|
+
zh: dc5e4cdc61c77cd5
|
|
14
14
|
/knyazevai-dsh-http-proxy/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
en: 782b24f91ee8ce71
|
|
22
22
|
zh: af4b75a0d5a98fdc
|
|
23
23
|
/knyazevai-dsh-http-proxy/use-this-package/what-the-policy-reads:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: 4d1de59edb784298
|
|
25
|
+
zh: d71372a5fc9fa638
|
|
26
26
|
/knyazevai-dsh-http-proxy/use-this-package/failures:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 87dab66805343cb6
|
|
28
|
+
zh: 3b9eff4c002e122b
|
|
29
29
|
/knyazevai-dsh-http-proxy/understand-the-implementation:
|
|
30
30
|
en: ee4615a04fa6503d
|
|
31
31
|
zh: ee2c5fb2204a43cf
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
en: 73c3a16dedfe00e2
|
|
34
34
|
zh: e8d949b479ca3dde
|
|
35
35
|
/knyazevai-dsh-http-proxy/understand-the-implementation/source-map:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: 7714a439a7a38d80
|
|
37
|
+
zh: a1fb5134b65415ec
|
|
38
38
|
/knyazevai-dsh-http-proxy/understand-the-implementation/bypass-matching:
|
|
39
39
|
en: e9ad6c2e8ee2fc21
|
|
40
40
|
zh: c10de6995cf594bc
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
en: 7f12ca92e7722f98
|
|
49
49
|
zh: 97fa75de6a3f6a3f
|
|
50
50
|
/knyazevai-dsh-http-proxy/known-limitations-and-deferred-work:
|
|
51
|
-
en:
|
|
52
|
-
zh:
|
|
51
|
+
en: 04ed2e7624c1d465
|
|
52
|
+
zh: feec08711ea70da8
|
|
53
53
|
/knyazevai-dsh-http-proxy/known-limitations-and-deferred-work/dev-note:
|
|
54
54
|
en: 8f915ac6f4fc1525
|
|
55
55
|
zh: 29b06e0aae5a30ec
|
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
Use this package to apply one outbound HTTP proxy policy to Harness requests that use Node's built-in `fetch`, including LLM, web-search, and HTTP MCP traffic. The launcher reads
|
|
12
|
+
Use this package to apply one outbound HTTP proxy policy to Harness requests that use Node's built-in `fetch`, including LLM, web-search, and HTTP MCP traffic. The launcher reads explicit proxy variables or Windows manual system settings once; ordinary `fetch` callers require no extra imports or changes. Local loopback traffic stays direct, while unsupported proxy URLs are reported and skipped for the affected scheme. Public helpers let callers route transports with their own proxy settings, prepare child-process environments, or clear proxy variables for isolated replays.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -51,8 +51,12 @@ That gate cannot see inside an SDK, so each outbound call site carries an `egres
|
|
|
51
51
|
|
|
52
52
|
Loopback is always bypassed — `localhost`, the whole `127.0.0.0/8` range, `::1`, `0.0.0.0`, and the IPv4-mapped spellings of those. The harness's own Web UI, Connection transport, and every local test server would otherwise route through the proxy and loop. The published bypass list names only the four literal entries an environment reader can match; `proxyForUrl` recognises the range itself, because a list entry cannot express one.
|
|
53
53
|
|
|
54
|
+
`DSH_PROXY_MODE=auto` is the default: explicit address variables win; otherwise Windows reads the current user's manual HTTP(S) proxy and exclusions. Other platforms stay direct without an explicit proxy. `DSH_PROXY_MODE=environment` disables system discovery; `direct` disables all proxies. Set these controls in the launching environment or `$DSH_HOME/.env`, never a project `.env`. `DSH_SYSTEM_PROXY_TIMEOUT_MS` bounds discovery, defaults to 10000, and accepts integers from 1 to 60000. Restart DSH after changing system settings.
|
|
55
|
+
|
|
54
56
|
### Failures
|
|
55
57
|
|
|
58
|
+
Windows discovery failures, invalid settings, and configured PAC scripts stop startup with an address-free diagnostic and an explicit environment/direct recovery action. No request silently switches from a configured system proxy to a direct route.
|
|
59
|
+
|
|
56
60
|
A proxy value the package cannot use — a SOCKS or PAC URL, an unparseable string, an unsupported scheme — is reported and skipped, and that scheme connects directly. The variable may have been exported for other tools, so it must not stop the agent from starting.
|
|
57
61
|
|
|
58
62
|
-----
|
|
@@ -72,6 +76,7 @@ A proxy value the package cannot use — a SOCKS or PAC URL, an unparseable stri
|
|
|
72
76
|
|---|---|
|
|
73
77
|
| `src/policy.ts` | Resolution and bypass matching; a diagnostic names the variable, never its value. Imports no transport, so it stays loadable where undici is absent. |
|
|
74
78
|
| `src/install.ts` | The global dispatcher, the active-policy record, the route, and the child environment. Imports undici dynamically. |
|
|
79
|
+
| `src/system.ts` | Windows settings discovery, startup mode validation, and protocol-specific manual proxy parsing. |
|
|
75
80
|
| `src/index.ts` | The package face: four functions and one type. |
|
|
76
81
|
|
|
77
82
|
### Bypass matching
|
|
@@ -104,7 +109,7 @@ No direct invalidation: the package contributes no request tokens and never muta
|
|
|
104
109
|
|
|
105
110
|
These limits define when the package is a poor fit. They are current package constraints.
|
|
106
111
|
|
|
107
|
-
- **No SOCKS, PAC, or
|
|
112
|
+
- **No SOCKS, PAC execution, WPAD, or macOS system detection** — Windows manual HTTP(S) settings are supported; configured PAC scripts require explicit HTTP(S) variables or an explicit direct mode. Windows exclusions use wildcard and `<local>` matching in this process; child tools receive them through `NO_PROXY` and apply their own matching rules.
|
|
108
113
|
- **No custom certificate authority** — a TLS-intercepting corporate proxy needs `NODE_EXTRA_CA_CERTS` set on the process before launch, which this package neither sets nor validates.
|
|
109
114
|
- **A spawned child honors the policy only on a new enough runtime, and only when every value it inherits is one Node accepts** — it reads the published environment through Node's `NODE_USE_ENV_PROXY` (22.21+, 24+), and the engines range admits 22.19 and 22.20, where such a child stays direct. A user whose environment also names a SOCKS or otherwise refused proxy leaves every child Node direct: the flag is withheld so the child can start at all. A child also matches bypass entries with Node's own `NO_PROXY` rules, which differ from this package's in their separators and IPv4-range support. Nothing in this process depends on a Node version: every in-process request reaches the global dispatcher.
|
|
110
115
|
- **Telemetry is direct by design** — the OTLP exporter posts through `node:http`, which no global dispatcher reaches. Routing it would need either an `http.Agent` whose `proxyEnv` option post-dates the lowest supported Node, or the SDK's `fetch` transport, which has no compression while the shipped profile enables gzip. Telemetry is the one channel whose loss costs the user nothing, so it stays where it was; `DSH_TELEMETRY_MODE=DISABLED` turns it off.
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
使用本包可为采用 Node 内置 `fetch` 的 Harness 请求应用一份出站 HTTP 代理策略,包括 LLM(大语言模型)、web 搜索与 HTTP MCP
|
|
12
|
+
使用本包可为采用 Node 内置 `fetch` 的 Harness 请求应用一份出站 HTTP 代理策略,包括 LLM(大语言模型)、web 搜索与 HTTP MCP 流量。启动器读取一次显式代理变量或 Windows 手动系统设置,普通 `fetch` 调用方无需额外引入或改动。loopback 流量保持直连;不受支持的代理 URL 会被报告,并针对受影响的协议跳过。公共辅助函数可让调用方路由采用自有代理设置的传输、准备子进程环境,或为隔离回放清除代理变量。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -51,8 +51,12 @@ kind: "package-reference"
|
|
|
51
51
|
|
|
52
52
|
loopback 始终被绕过——`localhost`、整个 `127.0.0.0/8` 段、`::1`、`0.0.0.0`,以及它们的 IPv4 映射写法。否则 Harness 自己的 Web UI、Connection 传输以及每一个本地测试服务器都会经由代理并形成回环。发布出去的绕过列表只包含读取环境的消费者能匹配的四个字面量条目;`proxyForUrl` 自行识别整个网段,因为列表条目无法表达一个范围。
|
|
53
53
|
|
|
54
|
+
`DSH_PROXY_MODE=auto` 为默认值:显式地址变量优先,否则 Windows 读取当前用户的手动 HTTP(S) 代理与排除项。其他平台在未显式设置代理时直连。`DSH_PROXY_MODE=environment` 禁用系统发现;`direct` 禁用所有代理。这些控制项只能来自启动环境或 `$DSH_HOME/.env`,不能来自项目 `.env`。`DSH_SYSTEM_PROXY_TIMEOUT_MS` 限制发现耗时,默认为 10000,接受 1 到 60000 的整数。更改系统设置后需重启 DSH。
|
|
55
|
+
|
|
54
56
|
### 失败处理
|
|
55
57
|
|
|
58
|
+
Windows 发现失败、无效设置或已配置的 PAC 脚本会中止启动,诊断不包含地址,并提供显式环境设置或直连恢复操作。请求不会静默从已配置的系统代理切换为直连。
|
|
59
|
+
|
|
56
60
|
本包无法使用的代理值——SOCKS 或 PAC URL、无法解析的字符串、不受支持的协议——会被报告并跳过,该 scheme 转为直连。该变量可能是用户为其他工具导出的,不应因此阻止 agent(智能体)启动。
|
|
57
61
|
|
|
58
62
|
-----
|
|
@@ -72,6 +76,7 @@ loopback 始终被绕过——`localhost`、整个 `127.0.0.0/8` 段、`::1`、`
|
|
|
72
76
|
|---|---|
|
|
73
77
|
| `src/policy.ts` | 解析与绕过匹配;诊断只点名变量,从不带出它的值。不引入任何传输实现,因此在没有 undici 的环境中仍可加载。 |
|
|
74
78
|
| `src/install.ts` | 全局 dispatcher、生效策略记录、路由与子进程环境。动态引入 undici。 |
|
|
79
|
+
| `src/system.ts` | Windows 设置发现、启动模式校验以及按协议解析手动代理。 |
|
|
75
80
|
| `src/index.ts` | 本包的对外接口:四个函数与一个类型。 |
|
|
76
81
|
|
|
77
82
|
### 绕过匹配
|
|
@@ -104,7 +109,7 @@ loopback 始终被绕过——`localhost`、整个 `127.0.0.0/8` 段、`::1`、`
|
|
|
104
109
|
|
|
105
110
|
这些限制界定了本包不适用的场景,属于当前的包级约束。
|
|
106
111
|
|
|
107
|
-
- **不支持 SOCKS、PAC
|
|
112
|
+
- **不支持 SOCKS、PAC 执行、WPAD 或 macOS 系统探测**——支持 Windows 手动 HTTP(S) 设置;已配置的 PAC 脚本需要显式 HTTP(S) 变量或显式直连模式。本进程按 Windows 通配符与 `<local>` 匹配排除项;子工具通过 `NO_PROXY` 接收排除项,并使用各自的匹配规则。
|
|
108
113
|
- **不支持自定义证书颁发机构**——做 TLS 拦截的企业代理需要在启动前为进程设置 `NODE_EXTRA_CA_CERTS`,本包既不设置也不校验它。
|
|
109
114
|
- **spawn 出的子进程只在足够新的运行时上遵循策略,且仅当它继承的每个值都是 Node 接受的**——它通过 Node 的 `NODE_USE_ENV_PROXY` 读取已发布的环境(22.21+、24+),而 engines 范围允许 22.19 与 22.20,在这两个版本上这样的子进程保持直连。若用户环境里还有 SOCKS 或其他被拒的代理,所有子 Node 都保持直连:不设置该标志,子进程才起得来。子进程还会按 Node 自己的 `NO_PROXY` 规则匹配绕过条目,其分隔符与 IPv4 区间处理与本包不同。本进程内不依赖任何 Node 版本:每一次进程内请求都会落到全局 dispatcher。
|
|
110
115
|
- **遥测按设计直连**——OTLP 导出器通过 `node:http` 投递,全局 dispatcher 触及不到。要让它走代理,要么依赖 `http.Agent` 的 `proxyEnv`,而该选项晚于本项目支持的最低 Node 版本;要么改用 SDK 的 `fetch` 传输,但它没有压缩能力,而随附配置启用了 gzip。遥测是唯一一条丢失后不会让用户付出任何代价的通道,因此维持原状;`DSH_TELEMETRY_MODE=DISABLED` 可关闭它。
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { promisify } from "node:util";
|
|
1
4
|
//#region lib/types/policy.js
|
|
2
5
|
/**
|
|
3
6
|
* Proxy policy resolution: the pure, transport-free half of this package. It turns the launch
|
|
@@ -276,7 +279,184 @@ function proxyForUrl(policy, url) {
|
|
|
276
279
|
const proxy = url.protocol === "https:" ? policy.httpsProxy : url.protocol === "http:" ? policy.httpProxy : void 0;
|
|
277
280
|
if (proxy === void 0) return void 0;
|
|
278
281
|
if (isLoopbackHost(url.hostname)) return void 0;
|
|
279
|
-
return bypassesProxy(policy.noProxy, url) ? void 0 : proxy;
|
|
282
|
+
return bypassesProxy(policy.noProxy, url) || bypassesSystemProxy(policy.systemBypass ?? [], url) ? void 0 : proxy;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Match Windows proxy exclusions without changing the environment's NO_PROXY matching rules.
|
|
286
|
+
* @param entries - semicolon-separated Windows exclusions split into individual entries.
|
|
287
|
+
* @param url - outbound request URL.
|
|
288
|
+
* @returns whether Windows excludes this URL from its manual proxy.
|
|
289
|
+
*/
|
|
290
|
+
function bypassesSystemProxy(entries, url) {
|
|
291
|
+
const host = url.hostname.replace(/^\[|\]$/g, "").replace(/\.$/u, "").toLowerCase();
|
|
292
|
+
for (let entry of entries) {
|
|
293
|
+
entry = entry.trim().toLowerCase();
|
|
294
|
+
if (entry === "<local>") {
|
|
295
|
+
if (!host.includes(".") && !host.includes(":")) return true;
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
const scheme = /^(https?):\/\//u.exec(entry);
|
|
299
|
+
if (scheme !== null) {
|
|
300
|
+
if (`${scheme[1]}:` !== url.protocol) continue;
|
|
301
|
+
entry = entry.slice(scheme[0].length);
|
|
302
|
+
}
|
|
303
|
+
if (entry === "") continue;
|
|
304
|
+
const { host: pattern, port } = splitHostPort(entry);
|
|
305
|
+
if (port !== void 0 && port !== (url.port || (url.protocol === "https:" ? "443" : "80"))) continue;
|
|
306
|
+
const expression = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
|
|
307
|
+
if (new RegExp(`^${expression}$`, "u").test(host)) return true;
|
|
308
|
+
}
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region lib/types/system.js
|
|
313
|
+
/** Windows manual proxy discovery before the launcher mounts network consumers. */
|
|
314
|
+
const execute = promisify(execFile);
|
|
315
|
+
const WINDOWS_SETTINGS = `
|
|
316
|
+
$ErrorActionPreference = 'Stop'
|
|
317
|
+
[Console]::OutputEncoding = New-Object System.Text.UTF8Encoding($false)
|
|
318
|
+
$p = Get-ItemProperty -LiteralPath 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings'
|
|
319
|
+
@{ enabled = ($p.ProxyEnable -eq 1); server = [string]$p.ProxyServer; bypass = [string]$p.ProxyOverride; pac = [string]$p.AutoConfigURL } | ConvertTo-Json -Compress
|
|
320
|
+
`;
|
|
321
|
+
/** A proxy discovery failure with no addresses, credentials, or PowerShell output in its message. */
|
|
322
|
+
var SystemProxyError = class extends Error {
|
|
323
|
+
/** Stable failure category for startup reporting. */
|
|
324
|
+
code = "DSH_SYSTEM_PROXY_ERROR";
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Read proxy launch controls from the same layered environment as proxy addresses.
|
|
328
|
+
* @param env - exported variables and user-level .env values.
|
|
329
|
+
* @returns validated mode and discovery timeout; invalid values fail before transport changes.
|
|
330
|
+
*/
|
|
331
|
+
function proxyStartupOptions(env) {
|
|
332
|
+
const mode = env.get("DSH_PROXY_MODE")?.value.trim() || "auto";
|
|
333
|
+
if (mode !== "auto" && mode !== "environment" && mode !== "direct") throw new SystemProxyError("DSH_PROXY_MODE must be auto, environment, or direct");
|
|
334
|
+
const raw = env.get("DSH_SYSTEM_PROXY_TIMEOUT_MS")?.value.trim() || "10000";
|
|
335
|
+
const timeoutMs = Number(raw);
|
|
336
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 6e4) throw new SystemProxyError("DSH_SYSTEM_PROXY_TIMEOUT_MS must be an integer from 1 to 60000");
|
|
337
|
+
return {
|
|
338
|
+
mode,
|
|
339
|
+
timeoutMs
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Whether a user supplied an address, including an unsupported one that must not select another route.
|
|
344
|
+
* @param env - layered launch environment.
|
|
345
|
+
* @returns true when any HTTP, HTTPS, or ALL proxy variable is nonempty.
|
|
346
|
+
*/
|
|
347
|
+
function hasExplicitProxy(env) {
|
|
348
|
+
return PROXY_ENV_NAMES.some((name) => !/no_proxy/iu.test(name) && (env.get(name)?.value.trim() ?? "") !== "");
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Select the startup route before any dispatcher or process environment is changed.
|
|
352
|
+
* @param env - layered user configuration.
|
|
353
|
+
* @param platform - platform of the process owning the network transport.
|
|
354
|
+
* @param report - receives address-free startup diagnostics.
|
|
355
|
+
* @param readSystem - platform I/O adapter, completed before transport installation.
|
|
356
|
+
* @returns the resolved policy and whether an explicit direct mode must replace an ambient dispatcher.
|
|
357
|
+
*/
|
|
358
|
+
async function resolveStartupProxy(env, platform, report, readSystem = readWindowsProxy) {
|
|
359
|
+
const options = proxyStartupOptions(env);
|
|
360
|
+
if (options.mode === "direct") return {
|
|
361
|
+
policy: DIRECT_POLICY,
|
|
362
|
+
forceDirect: true
|
|
363
|
+
};
|
|
364
|
+
if (options.mode === "auto" && platform === "win32" && !hasExplicitProxy(env)) {
|
|
365
|
+
const policy = await readSystem(env, options.timeoutMs);
|
|
366
|
+
if (policy.source === "system") report("Using Windows system proxy. Set DSH_PROXY_MODE=direct to disable it, or configure HTTP_PROXY and HTTPS_PROXY to override it.");
|
|
367
|
+
return {
|
|
368
|
+
policy,
|
|
369
|
+
forceDirect: false
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
const { policy, diagnostics } = resolveProxyPolicy(env);
|
|
373
|
+
for (const diagnostic of diagnostics) report(diagnostic.message);
|
|
374
|
+
return {
|
|
375
|
+
policy,
|
|
376
|
+
forceDirect: false
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function proxyUrl(value) {
|
|
380
|
+
const candidate = value.includes("://") ? value : `http://${value}`;
|
|
381
|
+
const parsed = URL.parse(candidate);
|
|
382
|
+
if (parsed === null || !["http:", "https:"].includes(parsed.protocol) || parsed.hostname === "" || parsed.pathname !== "/" || parsed.search !== "" || parsed.hash !== "") throw new SystemProxyError("Windows has an unsupported proxy address; set HTTP_PROXY and HTTPS_PROXY to HTTP(S) proxy URLs, or set DSH_PROXY_MODE=direct");
|
|
383
|
+
return parsed.href;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Validate the PowerShell result and retain protocol-specific Windows proxy and exclusion rules.
|
|
387
|
+
* @param output - JSON emitted by the Windows settings reader.
|
|
388
|
+
* @param env - environment supplying optional additional NO_PROXY exclusions.
|
|
389
|
+
* @returns a manual system proxy policy, or the unchanged direct policy when disabled.
|
|
390
|
+
* @throws SystemProxyError for unreadable settings, PAC scripts, or unsupported addresses.
|
|
391
|
+
*/
|
|
392
|
+
function parseWindowsProxy(output, env) {
|
|
393
|
+
let data;
|
|
394
|
+
try {
|
|
395
|
+
data = JSON.parse(output.replace(/^\uFEFF/u, "").trim());
|
|
396
|
+
} catch (_error) {
|
|
397
|
+
throw new SystemProxyError("Cannot read Windows proxy settings; configure HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
398
|
+
}
|
|
399
|
+
if (data === null || typeof data !== "object" || !("enabled" in data) || typeof data.enabled !== "boolean" || !("server" in data) || typeof data.server !== "string" || !("bypass" in data) || typeof data.bypass !== "string" || !("pac" in data) || typeof data.pac !== "string") throw new SystemProxyError("Windows returned invalid proxy settings; configure HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
400
|
+
if (data.pac.trim() !== "") throw new SystemProxyError("Windows uses an automatic proxy script (PAC); set HTTP_PROXY and HTTPS_PROXY to its HTTP proxy address, or set DSH_PROXY_MODE=direct");
|
|
401
|
+
if (!data.enabled) return DIRECT_POLICY;
|
|
402
|
+
const slots = /* @__PURE__ */ new Map();
|
|
403
|
+
const server = data.server.trim();
|
|
404
|
+
if (!server.includes("=")) {
|
|
405
|
+
slots.set("http", proxyUrl(server));
|
|
406
|
+
slots.set("https", proxyUrl(server));
|
|
407
|
+
} else for (const entry of server.split(";")) {
|
|
408
|
+
if (entry.trim() === "") continue;
|
|
409
|
+
const split = entry.indexOf("=");
|
|
410
|
+
const scheme = entry.slice(0, split).trim().toLowerCase();
|
|
411
|
+
if (split < 1 || ![
|
|
412
|
+
"http",
|
|
413
|
+
"https",
|
|
414
|
+
"ftp",
|
|
415
|
+
"socks"
|
|
416
|
+
].includes(scheme)) throw new SystemProxyError("Windows has invalid protocol proxy settings; configure HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
417
|
+
if (scheme === "socks") throw new SystemProxyError("Windows uses a SOCKS proxy; configure an HTTP(S) proxy with HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
418
|
+
if (scheme === "http" || scheme === "https") {
|
|
419
|
+
if (slots.has(scheme)) throw new SystemProxyError("Windows has duplicate protocol proxy settings; configure HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
420
|
+
slots.set(scheme, proxyUrl(entry.slice(split + 1).trim()));
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
if (slots.size === 0) throw new SystemProxyError("Windows has no supported HTTP proxy; configure HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
424
|
+
const noProxy = env.get("no_proxy")?.value.trim() || env.get("NO_PROXY")?.value.trim() || "";
|
|
425
|
+
const httpProxy = slots.get("http"), httpsProxy = slots.get("https");
|
|
426
|
+
return {
|
|
427
|
+
source: "system",
|
|
428
|
+
noProxy: withLoopback(noProxy),
|
|
429
|
+
...httpProxy === void 0 ? {} : { httpProxy },
|
|
430
|
+
...httpsProxy === void 0 ? {} : { httpsProxy },
|
|
431
|
+
systemBypass: data.bypass.split(";").map((entry) => entry.trim()).filter(Boolean)
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Query current-user Windows Internet Settings without printing addresses or loading a PowerShell profile.
|
|
436
|
+
* @param env - launch environment supplying optional additional NO_PROXY exclusions.
|
|
437
|
+
* @param timeoutMs - validated subprocess deadline.
|
|
438
|
+
* @returns the current manual proxy policy; the subprocess has exited before resolution.
|
|
439
|
+
*/
|
|
440
|
+
async function readWindowsProxy(env, timeoutMs) {
|
|
441
|
+
const root = process.env.SystemRoot || process.env.WINDIR || "C:\\Windows";
|
|
442
|
+
let output;
|
|
443
|
+
try {
|
|
444
|
+
output = (await execute(join(root, "System32", "WindowsPowerShell", "v1.0", "powershell.exe"), [
|
|
445
|
+
"-NoLogo",
|
|
446
|
+
"-NoProfile",
|
|
447
|
+
"-NonInteractive",
|
|
448
|
+
"-EncodedCommand",
|
|
449
|
+
Buffer.from(WINDOWS_SETTINGS, "utf16le").toString("base64")
|
|
450
|
+
], {
|
|
451
|
+
windowsHide: true,
|
|
452
|
+
timeout: timeoutMs,
|
|
453
|
+
maxBuffer: 65536,
|
|
454
|
+
encoding: "utf8"
|
|
455
|
+
})).stdout;
|
|
456
|
+
} catch (_error) {
|
|
457
|
+
throw new SystemProxyError("Cannot read Windows proxy settings; configure HTTP_PROXY and HTTPS_PROXY, or set DSH_PROXY_MODE=direct");
|
|
458
|
+
}
|
|
459
|
+
return parseWindowsProxy(output, env);
|
|
280
460
|
}
|
|
281
461
|
//#endregion
|
|
282
462
|
//#region lib/types/install.js
|
|
@@ -336,7 +516,7 @@ function applyPolicyEnv(policy) {
|
|
|
336
516
|
inheritedProxyEnv = previousInherited ?? snapshotProxyEnv();
|
|
337
517
|
const published = {};
|
|
338
518
|
for (const [field, names] of Object.entries(POLICY_ENV_NAMES)) {
|
|
339
|
-
const value = policy
|
|
519
|
+
const value = publishedPolicyValue(policy, field);
|
|
340
520
|
for (const name of names) published[name] = value;
|
|
341
521
|
}
|
|
342
522
|
const restore = writeProxyEnv(published);
|
|
@@ -355,6 +535,11 @@ function snapshotProxyEnv() {
|
|
|
355
535
|
for (const names of Object.values(POLICY_ENV_NAMES)) for (const name of names) snapshot[name] = process.env[name];
|
|
356
536
|
return snapshot;
|
|
357
537
|
}
|
|
538
|
+
/** Environment readers receive Windows exclusions in NO_PROXY; their wildcard rules remain transport-owned. */
|
|
539
|
+
function publishedPolicyValue(policy, field) {
|
|
540
|
+
if (field !== "noProxy") return policy[field];
|
|
541
|
+
return [policy.noProxy, ...policy.systemBypass ?? []].filter(Boolean).join(",");
|
|
542
|
+
}
|
|
358
543
|
/**
|
|
359
544
|
* Set every proxy name to the value `values` holds for it, removing a name whose value is `undefined`.
|
|
360
545
|
*
|
|
@@ -402,7 +587,7 @@ async function createPolicyDispatcher(policy) {
|
|
|
402
587
|
*
|
|
403
588
|
* Installing replaces undici's global dispatcher, which is what Node's built-in `fetch` resolves, so
|
|
404
589
|
* every caller that issues a plain `fetch()` is covered without knowing this package exists. A policy
|
|
405
|
-
* that proxies nothing
|
|
590
|
+
* that proxies nothing preserves ambient settings unless direct routing was explicitly requested.
|
|
406
591
|
*
|
|
407
592
|
* A worker thread has its own `globalThis` and so its own dispatcher; installing here does not
|
|
408
593
|
* reach it. No worker installs one today: both this repository ships — the workflow engine and the
|
|
@@ -410,12 +595,13 @@ async function createPolicyDispatcher(policy) {
|
|
|
410
595
|
* credentials. A worker that needs the policy has to be handed one explicitly and install it itself.
|
|
411
596
|
*
|
|
412
597
|
* @param policy - the resolved policy to install.
|
|
598
|
+
* @param forceDirect - replace the ambient dispatcher and clear proxy variables for explicit direct mode.
|
|
413
599
|
* @returns a disposer restoring the previous dispatcher, policy, and environment, then closing the agent.
|
|
414
600
|
*/
|
|
415
|
-
async function installGlobalProxy(policy) {
|
|
601
|
+
async function installGlobalProxy(policy, forceDirect = false) {
|
|
416
602
|
const previousPolicy = active;
|
|
417
603
|
if (policy.source === "none") {
|
|
418
|
-
if (previousPolicy === void 0) {
|
|
604
|
+
if (previousPolicy === void 0 && !forceDirect) {
|
|
419
605
|
active = policy;
|
|
420
606
|
return () => {
|
|
421
607
|
active = previousPolicy;
|
|
@@ -423,13 +609,13 @@ async function installGlobalProxy(policy) {
|
|
|
423
609
|
};
|
|
424
610
|
}
|
|
425
611
|
const previousInstalled = installed;
|
|
426
|
-
const restoreEnv = inheritedProxyEnv === void 0 ? void 0 : writeProxyEnv(inheritedProxyEnv);
|
|
427
612
|
const undici = await import("undici");
|
|
428
613
|
const previous = undici.getGlobalDispatcher();
|
|
429
614
|
const direct = new undici.Agent();
|
|
615
|
+
const restoreEnv = forceDirect ? clearProcessProxyEnv() : inheritedProxyEnv === void 0 ? void 0 : writeProxyEnv(inheritedProxyEnv);
|
|
430
616
|
undici.setGlobalDispatcher(direct);
|
|
431
617
|
active = policy;
|
|
432
|
-
installed = void 0;
|
|
618
|
+
installed = forceDirect ? direct : void 0;
|
|
433
619
|
return async () => {
|
|
434
620
|
undici.setGlobalDispatcher(previous);
|
|
435
621
|
active = previousPolicy;
|
|
@@ -438,11 +624,11 @@ async function installGlobalProxy(policy) {
|
|
|
438
624
|
await direct.close();
|
|
439
625
|
};
|
|
440
626
|
}
|
|
441
|
-
const restoreEnv = applyPolicyEnv(policy);
|
|
442
627
|
const { getGlobalDispatcher, setGlobalDispatcher } = await import("undici");
|
|
443
628
|
const previousDispatcher = getGlobalDispatcher();
|
|
444
629
|
const previousInstalled = installed;
|
|
445
630
|
const agent = await createPolicyDispatcher(policy);
|
|
631
|
+
const restoreEnv = applyPolicyEnv(policy);
|
|
446
632
|
setGlobalDispatcher(agent);
|
|
447
633
|
active = policy;
|
|
448
634
|
installed = agent;
|
|
@@ -454,6 +640,15 @@ async function installGlobalProxy(policy) {
|
|
|
454
640
|
await agent.close();
|
|
455
641
|
};
|
|
456
642
|
}
|
|
643
|
+
/** Clear an explicitly disabled proxy for this process and its children, restoring every spelling on disposal. */
|
|
644
|
+
function clearProcessProxyEnv() {
|
|
645
|
+
const previous = Object.fromEntries(PROXY_ENV_NAMES.map((name) => [name, process.env[name]]));
|
|
646
|
+
for (const name of PROXY_ENV_NAMES) Reflect.deleteProperty(process.env, name);
|
|
647
|
+
return () => {
|
|
648
|
+
for (const [name, value] of Object.entries(previous)) if (value === void 0) Reflect.deleteProperty(process.env, name);
|
|
649
|
+
else process.env[name] = value;
|
|
650
|
+
};
|
|
651
|
+
}
|
|
457
652
|
/**
|
|
458
653
|
* The proxy environment a spawned child needs.
|
|
459
654
|
*
|
|
@@ -485,16 +680,20 @@ async function installGlobalProxy(policy) {
|
|
|
485
680
|
* A worker thread is deliberately NOT served here — see the workflow engine, which runs
|
|
486
681
|
* model-authored scripts and must not receive a proxy URL that may carry credentials.
|
|
487
682
|
*
|
|
488
|
-
* @returns names to apply to the child environment, where `undefined` means remove
|
|
489
|
-
*
|
|
683
|
+
* @returns names to apply to the child environment, where `undefined` means remove; explicit direct
|
|
684
|
+
* mode removes proxy addresses, while an inactive policy returns an empty object.
|
|
490
685
|
*/
|
|
491
686
|
function proxyEnvironmentForChild() {
|
|
492
687
|
const policy = active;
|
|
493
688
|
const inherited = inheritedProxyEnv;
|
|
689
|
+
if (policy?.source === "none" && installed !== void 0) return {
|
|
690
|
+
...clearedProxyEnv(),
|
|
691
|
+
NODE_USE_ENV_PROXY: void 0
|
|
692
|
+
};
|
|
494
693
|
if (policy === void 0 || policy.source === "none" || inherited === void 0) return {};
|
|
495
694
|
const overlay = { NODE_USE_ENV_PROXY: "1" };
|
|
496
695
|
for (const [field, names] of Object.entries(POLICY_ENV_NAMES)) {
|
|
497
|
-
const resolved = policy
|
|
696
|
+
const resolved = publishedPolicyValue(policy, field);
|
|
498
697
|
const named = field !== "noProxy" && names.some((name) => inherited[name] !== void 0);
|
|
499
698
|
for (const name of names) overlay[name] = named ? inherited[name] : resolved;
|
|
500
699
|
}
|
|
@@ -502,7 +701,7 @@ function proxyEnvironmentForChild() {
|
|
|
502
701
|
return overlay;
|
|
503
702
|
}
|
|
504
703
|
/**
|
|
505
|
-
* Resolve
|
|
704
|
+
* Resolve explicit proxy configuration or Windows manual system settings and install the policy.
|
|
506
705
|
*
|
|
507
706
|
* Resolution, reporting, and installation are one operation because no caller needs them apart: the
|
|
508
707
|
* launcher does all three in sequence before the first plugin mounts, and a policy resolved but not
|
|
@@ -510,16 +709,16 @@ function proxyEnvironmentForChild() {
|
|
|
510
709
|
*
|
|
511
710
|
* A value the environment supplies but this package cannot use is reported and skipped rather than
|
|
512
711
|
* thrown: the variable may have been exported for another tool, and a proxy the harness cannot use
|
|
513
|
-
* must not stop the agent from starting.
|
|
712
|
+
* must not stop the agent from starting. Automatic Windows discovery failures stop startup with
|
|
713
|
+
* an actionable, address-free error; direct mode explicitly clears proxy variables and dispatchers.
|
|
514
714
|
*
|
|
515
715
|
* @param env - the launch environment, whose own layering already prefers real variables over `.env` files.
|
|
516
|
-
* @param report - receives
|
|
716
|
+
* @param report - receives address-free discovery and rejected-value diagnostics.
|
|
517
717
|
* @returns a disposer restoring the previous dispatcher, policy, and environment.
|
|
518
718
|
*/
|
|
519
719
|
async function installProxyFromEnvironment(env, report) {
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
return await installGlobalProxy(policy);
|
|
720
|
+
const selected = await resolveStartupProxy(env, process.platform, report);
|
|
721
|
+
return await installGlobalProxy(selected.policy, selected.forceDirect);
|
|
523
722
|
}
|
|
524
723
|
/**
|
|
525
724
|
* The environment overlay that removes every proxy name from a spawned child.
|
|
@@ -527,10 +726,13 @@ async function installProxyFromEnvironment(env, report) {
|
|
|
527
726
|
* A harness that replays a recorded session must reach its own fixture server, not the proxy a
|
|
528
727
|
* developer or a CI runner exported; `undefined` is how a spawn removes a name it inherits.
|
|
529
728
|
*
|
|
530
|
-
* @returns
|
|
729
|
+
* @returns removed address variables and environment-only mode, disabling Windows discovery for isolated children.
|
|
531
730
|
*/
|
|
532
731
|
function clearedProxyEnv() {
|
|
533
|
-
return
|
|
732
|
+
return {
|
|
733
|
+
...Object.fromEntries(PROXY_ENV_NAMES.map((name) => [name, void 0])),
|
|
734
|
+
DSH_PROXY_MODE: "environment"
|
|
735
|
+
};
|
|
534
736
|
}
|
|
535
737
|
//#endregion
|
|
536
738
|
export { clearedProxyEnv, installProxyFromEnvironment, proxyEnvironmentForChild, proxyRouteFor };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Outbound HTTP proxy support for DeepSeek Harness.
|
|
3
3
|
*
|
|
4
4
|
* Node's built-in `fetch` ignores `HTTP_PROXY` and friends, so every harness request would connect
|
|
5
|
-
* directly no matter what the user exported. The launcher resolves
|
|
6
|
-
*
|
|
7
|
-
* LLM adapters, web search, MCP over HTTP
|
|
5
|
+
* directly no matter what the user exported. The launcher resolves explicit configuration or
|
|
6
|
+
* Windows manual system settings and installs undici's global dispatcher, which `fetch` resolves.
|
|
7
|
+
* LLM adapters, web search, and MCP over HTTP use that dispatcher without transport-specific setup.
|
|
8
8
|
*
|
|
9
9
|
* This is a library, not a plugin: transport policy has one answer per process, so there is nothing
|
|
10
10
|
* for a composition to mount, swap, or scope.
|
|
@@ -62,12 +62,12 @@ export declare function proxyRouteFor(url: URL): ProxyRoute;
|
|
|
62
62
|
* A worker thread is deliberately NOT served here — see the workflow engine, which runs
|
|
63
63
|
* model-authored scripts and must not receive a proxy URL that may carry credentials.
|
|
64
64
|
*
|
|
65
|
-
* @returns names to apply to the child environment, where `undefined` means remove
|
|
66
|
-
*
|
|
65
|
+
* @returns names to apply to the child environment, where `undefined` means remove; explicit direct
|
|
66
|
+
* mode removes proxy addresses, while an inactive policy returns an empty object.
|
|
67
67
|
*/
|
|
68
68
|
export declare function proxyEnvironmentForChild(): Readonly<Record<string, string | undefined>>;
|
|
69
69
|
/**
|
|
70
|
-
* Resolve
|
|
70
|
+
* Resolve explicit proxy configuration or Windows manual system settings and install the policy.
|
|
71
71
|
*
|
|
72
72
|
* Resolution, reporting, and installation are one operation because no caller needs them apart: the
|
|
73
73
|
* launcher does all three in sequence before the first plugin mounts, and a policy resolved but not
|
|
@@ -75,10 +75,11 @@ export declare function proxyEnvironmentForChild(): Readonly<Record<string, stri
|
|
|
75
75
|
*
|
|
76
76
|
* A value the environment supplies but this package cannot use is reported and skipped rather than
|
|
77
77
|
* thrown: the variable may have been exported for another tool, and a proxy the harness cannot use
|
|
78
|
-
* must not stop the agent from starting.
|
|
78
|
+
* must not stop the agent from starting. Automatic Windows discovery failures stop startup with
|
|
79
|
+
* an actionable, address-free error; direct mode explicitly clears proxy variables and dispatchers.
|
|
79
80
|
*
|
|
80
81
|
* @param env - the launch environment, whose own layering already prefers real variables over `.env` files.
|
|
81
|
-
* @param report - receives
|
|
82
|
+
* @param report - receives address-free discovery and rejected-value diagnostics.
|
|
82
83
|
* @returns a disposer restoring the previous dispatcher, policy, and environment.
|
|
83
84
|
*/
|
|
84
85
|
export declare function installProxyFromEnvironment(env: EnvLookup, report: (message: string) => void): Promise<() => Promise<void>>;
|
|
@@ -88,7 +89,7 @@ export declare function installProxyFromEnvironment(env: EnvLookup, report: (mes
|
|
|
88
89
|
* A harness that replays a recorded session must reach its own fixture server, not the proxy a
|
|
89
90
|
* developer or a CI runner exported; `undefined` is how a spawn removes a name it inherits.
|
|
90
91
|
*
|
|
91
|
-
* @returns
|
|
92
|
+
* @returns removed address variables and environment-only mode, disabling Windows discovery for isolated children.
|
|
92
93
|
*/
|
|
93
|
-
export declare function clearedProxyEnv(): Record<string, undefined>;
|
|
94
|
+
export declare function clearedProxyEnv(): Record<string, string | undefined>;
|
|
94
95
|
//# sourceMappingURL=install.d.ts.map
|
|
@@ -58,8 +58,10 @@ export interface ProxyPolicy {
|
|
|
58
58
|
readonly httpsProxy?: string;
|
|
59
59
|
/** The bypass list, already merged with {@link LOOPBACK_NO_PROXY}. Empty when nothing is bypassed. */
|
|
60
60
|
readonly noProxy: string;
|
|
61
|
-
/**
|
|
62
|
-
readonly source: 'env' | 'none';
|
|
61
|
+
/** Whether proxy addresses came from explicit variables, Windows settings, or neither. */
|
|
62
|
+
readonly source: 'env' | 'system' | 'none';
|
|
63
|
+
/** Windows proxy exclusions, matched with Windows wildcard and <local> semantics. */
|
|
64
|
+
readonly systemBypass?: readonly string[];
|
|
63
65
|
}
|
|
64
66
|
/** A policy that proxies nothing. Callers that have not installed a policy resolve URLs against this. */
|
|
65
67
|
export declare const DIRECT_POLICY: ProxyPolicy;
|
|
@@ -87,6 +89,14 @@ export interface ProxyResolution {
|
|
|
87
89
|
* @returns true when the URL would be accepted.
|
|
88
90
|
*/
|
|
89
91
|
export declare function isSupportedProxyUrl(value: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Merge {@link LOOPBACK_NO_PROXY} into a bypass list, preserving the caller's entries and order.
|
|
94
|
+
* A list of `*` already bypasses everything and is returned unchanged.
|
|
95
|
+
*
|
|
96
|
+
* @param noProxy - the bypass list as the environment supplied it.
|
|
97
|
+
* @returns the effective bypass list.
|
|
98
|
+
*/
|
|
99
|
+
export declare function withLoopback(noProxy: string | undefined): string;
|
|
90
100
|
/**
|
|
91
101
|
* Whether a host names this machine.
|
|
92
102
|
*
|
|
@@ -133,4 +143,11 @@ export declare function resolveProxyPolicy(env: EnvLookup): ProxyResolution;
|
|
|
133
143
|
* @returns the proxy URL to tunnel through, or `undefined` for a direct connection.
|
|
134
144
|
*/
|
|
135
145
|
export declare function proxyForUrl(policy: ProxyPolicy, url: URL): string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Match Windows proxy exclusions without changing the environment's NO_PROXY matching rules.
|
|
148
|
+
* @param entries - semicolon-separated Windows exclusions split into individual entries.
|
|
149
|
+
* @param url - outbound request URL.
|
|
150
|
+
* @returns whether Windows excludes this URL from its manual proxy.
|
|
151
|
+
*/
|
|
152
|
+
export declare function bypassesSystemProxy(entries: readonly string[], url: URL): boolean;
|
|
136
153
|
//# sourceMappingURL=policy.d.ts.map
|