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.
@@ -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
- // Dead-bridge signal. Claude Code prints "<source> no MCP server configured
124
- // with that name" when a channel source references an MCP server that isn't
125
- // registered. Music topic incident (2026-06-01): seen mid-turn after an
126
- // auto-/compact of a large resumed session redrew the TUI and dropped the
127
- // `server:polygram-bridge` binding the turn could no longer deliver its
128
- // reply and hung. The bridge name precedes the error on the same line, so
129
- // anchor on it: matching the bare phrase risks a false hit on prose that
130
- // merely quotes the error, while the healthy "polygram-bridge: <polygram-info>
131
- // …" connection line never contains "no MCP server configured".
132
- const BRIDGE_DEAD_RE = /polygram-bridge[^\n]*no MCP server configured/i;
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
- // Wedge recovery (Music topic incident, 2026-06-01). Claude Code's
2415
- // channel source can lose its MCP-server registration mid-turn most
2416
- // often after an auto-/compact of a large resumed session redraws the
2417
- // TUI and the `server:polygram-bridge` binding fails to re-resolve
2418
- // ("polygram-bridge no MCP server configured with that name"). The
2419
- // bridge SOCKET stays up, so the socket-close path
2420
- // (bridgeServer 'bridge-disconnected' _handleBridgeDisconnected) never
2421
- // fires but claude can no longer deliver the reply, so the turn
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.13",
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": {