polygram 0.12.0-rc.13 → 0.12.0-rc.14
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/process/cli-process.js +19 -39
- package/package.json +1 -1
|
@@ -120,16 +120,17 @@ const STREAMING_HINT_RE = /esc to interrupt/i;
|
|
|
120
120
|
// — false positives surface as no-op telemetry, false negatives surface
|
|
121
121
|
// as the idle-ceiling timeout (~10min).
|
|
122
122
|
const UNKNOWN_PROMPT_HEURISTIC_RE = /(\?\s*$|\(y\/N\)|Yes\/No|❯\s|^\s*[12345]\.\s)/im;
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
// `
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
|
|
123
|
+
// rc.14: a previous rc (rc.11) had a BRIDGE_DEAD_RE here that matched the pane
|
|
124
|
+
// line "server:polygram-bridge no MCP server configured with that name" and
|
|
125
|
+
// treated it as a dead bridge to recover from. That was a MISDIAGNOSIS: this
|
|
126
|
+
// line is a BENIGN, persistent banner that `--dangerously-load-development-
|
|
127
|
+
// channels` + `--strict-mcp-config` prints on EVERY healthy session — the
|
|
128
|
+
// channel still delivers messages and the reply tool still works (reproduced
|
|
129
|
+
// 2026-06-01 with a test MCP server that demonstrably functions). The pane
|
|
130
|
+
// matcher therefore false-fired ~5s into every channels turn and KILLED
|
|
131
|
+
// healthy sessions (the Music-topic "mid-turn detach" regression). Real bridge
|
|
132
|
+
// loss is caught by the socket-close path (bridgeServer 'bridge-disconnected'
|
|
133
|
+
// → _handleBridgeDisconnected). There is no reliable pane signal — removed.
|
|
133
134
|
// Per-pattern rate limit so a dialog that lingers across multiple polls
|
|
134
135
|
// doesn't spam sendControl/event emissions. Aligned with the 5s poll cadence.
|
|
135
136
|
const MID_TURN_DEDUP_WINDOW_MS = 30_000;
|
|
@@ -2411,35 +2412,14 @@ class CliProcess extends Process {
|
|
|
2411
2412
|
}
|
|
2412
2413
|
if (!pane) return;
|
|
2413
2414
|
|
|
2414
|
-
//
|
|
2415
|
-
//
|
|
2416
|
-
//
|
|
2417
|
-
//
|
|
2418
|
-
//
|
|
2419
|
-
//
|
|
2420
|
-
//
|
|
2421
|
-
//
|
|
2422
|
-
// orphans and would hang until the wall-clock cap while this watchdog
|
|
2423
|
-
// logged cli-mid-turn-unknown-prompt every 30s and recovered nothing.
|
|
2424
|
-
// Detect it from the pane and route through the SAME recovery as a real
|
|
2425
|
-
// socket disconnect: reject pending turns (user gets the 🔌 resend
|
|
2426
|
-
// message via BRIDGE_DISCONNECTED) and emit 'bridge-disconnected' so
|
|
2427
|
-
// process-manager kills + lazy-respawns the dead instance (next msg
|
|
2428
|
-
// recovers the conversation via `claude --resume`). Gated on
|
|
2429
|
-
// pendingTurns.size>0 by the early return above, so it can't fire on an
|
|
2430
|
-
// idle session that merely has the string in scrollback.
|
|
2431
|
-
if (BRIDGE_DEAD_RE.test(pane)) {
|
|
2432
|
-
this.logger.warn?.(
|
|
2433
|
-
`[${this.label}] cli: channels MCP registration lost mid-turn ` +
|
|
2434
|
-
`(pane-detected) — recovering ${this.pendingTurns.size} orphaned turn(s)`,
|
|
2435
|
-
);
|
|
2436
|
-
this._logEvent('cli-bridge-detached-midturn', {
|
|
2437
|
-
pending_count: this.pendingTurns.size,
|
|
2438
|
-
session_id: this.claudeSessionId,
|
|
2439
|
-
});
|
|
2440
|
-
this._handleBridgeDisconnected('mcp-registration-lost');
|
|
2441
|
-
return;
|
|
2442
|
-
}
|
|
2415
|
+
// rc.14: removed the rc.11 pane-based "dead bridge" detection here. It
|
|
2416
|
+
// matched the BENIGN banner "server:polygram-bridge no MCP server
|
|
2417
|
+
// configured with that name" — a cosmetic line that
|
|
2418
|
+
// `--dangerously-load-development-channels` + `--strict-mcp-config` prints
|
|
2419
|
+
// on EVERY healthy session (channel still delivers; reply tool still
|
|
2420
|
+
// works). The matcher false-fired ~5s into every channels turn and killed
|
|
2421
|
+
// healthy sessions. Real bridge loss is the socket-close path
|
|
2422
|
+
// (_handleBridgeDisconnected), not anything observable in the pane.
|
|
2443
2423
|
|
|
2444
2424
|
const now = Date.now();
|
|
2445
2425
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.12.0-rc.
|
|
3
|
+
"version": "0.12.0-rc.14",
|
|
4
4
|
"description": "Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.",
|
|
5
5
|
"main": "lib/ipc/client.js",
|
|
6
6
|
"bin": {
|