{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the refactored coding agent.\n * Uses main.ts with AgentSession and new mode modules.\n *\n * Test with: npx tsx src/cli-new.ts [args...]\n */\nimport { EnvHttpProxyAgent, setGlobalDispatcher } from \"undici\";\nimport { APP_NAME } from \"./config.js\";\nimport { main } from \"./main.js\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\n// bodyTimeout/headersTimeout default to 300s in undici; long local-LLM stalls\n// (e.g. vLLM buffering a large tool call) exceed that and abort the SSE stream\n// with UND_ERR_BODY_TIMEOUT. Disable both — provider SDKs enforce their own\n// AbortController-based deadlines via retry.provider.timeoutMs.\nsetGlobalDispatcher(new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 }));\n\nmain(process.argv.slice(2));\n"]}