polydev-ai 1.10.3 → 1.10.5
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/lib/tunnelClient.js +5 -3
- package/package.json +1 -1
package/lib/tunnelClient.js
CHANGED
|
@@ -30,7 +30,7 @@ class TunnelClient {
|
|
|
30
30
|
// Configurable intervals
|
|
31
31
|
this.HEARTBEAT_INTERVAL_MS = 30_000; // 30s
|
|
32
32
|
this.POLL_INTERVAL_MS = 3_000; // 3s
|
|
33
|
-
this.CLI_TIMEOUT_MS =
|
|
33
|
+
this.CLI_TIMEOUT_MS = 240_000; // 4 min per request (matches server-side timeout)
|
|
34
34
|
|
|
35
35
|
// Try to load freshest token from file on construction
|
|
36
36
|
// (env var may be stale if process was started long ago)
|
|
@@ -248,8 +248,10 @@ class TunnelClient {
|
|
|
248
248
|
* Handle a single tunnel request by routing to CLI
|
|
249
249
|
*/
|
|
250
250
|
async handleRequest(request) {
|
|
251
|
-
// Use streaming path for
|
|
252
|
-
|
|
251
|
+
// Use streaming path ONLY for gemini_cli.
|
|
252
|
+
// claude_code streaming (--output-format stream-json) produces no NDJSON output
|
|
253
|
+
// in headless/tunnel mode — the non-streaming sendCliPrompt() path works reliably.
|
|
254
|
+
if (request.provider !== 'claude_code' && this.cliManager.supportsStreaming(request.provider)) {
|
|
253
255
|
return this.handleStreamingRequest(request);
|
|
254
256
|
}
|
|
255
257
|
|