index.ts 971 B

1234567891011121314151617181920212223
  1. /**
  2. * Outbound HTTP proxy support for DeepSeek Harness.
  3. *
  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 one policy from the launch
  6. * environment and installs it as undici's global dispatcher, which is what `fetch` resolves — so
  7. * LLM adapters, web search, MCP over HTTP, and telemetry are covered without touching their code.
  8. *
  9. * This is a library, not a plugin: transport policy has one answer per process, so there is nothing
  10. * for a composition to mount, swap, or scope.
  11. *
  12. * Four functions, one per way a caller needs the policy — install it, ask how to send one request,
  13. * build a child's environment, and strip the ambient one for a replay.
  14. * @module @deepseek-ai/dsh-http-proxy
  15. */
  16. export {
  17. clearedProxyEnv,
  18. installProxyFromEnvironment,
  19. proxyEnvironmentForChild,
  20. proxyRouteFor,
  21. type ProxyRoute,
  22. } from './install.ts'