switchroom 0.12.24 → 0.12.25

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.
@@ -47247,8 +47247,8 @@ var {
47247
47247
  } = import__.default;
47248
47248
 
47249
47249
  // src/build-info.ts
47250
- var VERSION = "0.12.24";
47251
- var COMMIT_SHA = "7ab1329";
47250
+ var VERSION = "0.12.25";
47251
+ var COMMIT_SHA = "4b8ab51";
47252
47252
 
47253
47253
  // src/cli/agent.ts
47254
47254
  init_source();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "switchroom",
3
- "version": "0.12.24",
3
+ "version": "0.12.25",
4
4
  "description": "Run Claude Code 24/7 on your Claude Pro/Max subscription over Telegram. Open-source alternative to OpenClaw and NanoClaw — no API keys.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -47357,11 +47357,11 @@ function sweepStaleTurnActiveMarker(stateDir, opts) {
47357
47357
  }
47358
47358
 
47359
47359
  // ../src/build-info.ts
47360
- var VERSION = "0.12.24";
47361
- var COMMIT_SHA = "7ab1329";
47362
- var COMMIT_DATE = "2026-05-20T14:48:10+10:00";
47363
- var LATEST_PR = 1582;
47364
- var COMMITS_AHEAD_OF_TAG = 3;
47360
+ var VERSION = "0.12.25";
47361
+ var COMMIT_SHA = "4b8ab51";
47362
+ var COMMIT_DATE = "2026-05-20T15:24:02+10:00";
47363
+ var LATEST_PR = 1584;
47364
+ var COMMITS_AHEAD_OF_TAG = 2;
47365
47365
 
47366
47366
  // gateway/boot-version.ts
47367
47367
  function formatRelativeAgo(iso) {
@@ -49234,7 +49234,9 @@ var ipcServer = createIpcServer({
49234
49234
  onClientRegistered(client3) {
49235
49235
  process.stderr.write(`telegram gateway: bridge registered \u2014 agent=${client3.agentName}
49236
49236
  `);
49237
- shadowEmit({ kind: "bridgeUp", at: Date.now() });
49237
+ if (client3.agentName != null) {
49238
+ shadowEmit({ kind: "bridgeUp", at: Date.now() });
49239
+ }
49238
49240
  client3.send({ type: "status", status: "agent_connected" });
49239
49241
  if (client3.agentName != null) {
49240
49242
  const pending = pendingInboundBuffer.drain(client3.agentName);
@@ -49328,7 +49330,9 @@ var ipcServer = createIpcServer({
49328
49330
  onClientDisconnected(client3) {
49329
49331
  process.stderr.write(`telegram gateway: bridge disconnected \u2014 agent=${client3.agentName}
49330
49332
  `);
49331
- shadowEmit({ kind: "bridgeDown", at: Date.now() });
49333
+ if (client3.agentName != null) {
49334
+ shadowEmit({ kind: "bridgeDown", at: Date.now() });
49335
+ }
49332
49336
  flushOnAgentDisconnect({
49333
49337
  agentName: client3.agentName,
49334
49338
  activeStatusReactions,
@@ -3196,8 +3196,17 @@ const ipcServer: IpcServer = createIpcServer({
3196
3196
 
3197
3197
  onClientRegistered(client: IpcClient) {
3198
3198
  process.stderr.write(`telegram gateway: bridge registered — agent=${client.agentName}\n`)
3199
- // Phase 2b shadow: bridge up.
3200
- shadowEmit({ kind: 'bridgeUp', at: Date.now() })
3199
+ // Phase 2b shadow: ONLY emit bridgeUp for the REAL bridge sidecar
3200
+ // (with an agent name). Anonymous IPC clients (recall.py, mcp
3201
+ // handshakes, etc.) connect briefly without a name and would
3202
+ // false-positive a bridgeUp/bridgeDown cycle that doesn't reflect
3203
+ // the real bridge state. This bug — discovered post-v0.12.24 — was
3204
+ // causing the shadow state to read `bridge_dead` even when the
3205
+ // real bridge was healthy, because every recall.py connect+disconnect
3206
+ // would flip the state.
3207
+ if (client.agentName != null) {
3208
+ shadowEmit({ kind: 'bridgeUp', at: Date.now() })
3209
+ }
3201
3210
  client.send({ type: 'status', status: 'agent_connected' })
3202
3211
 
3203
3212
  // #1150: drain any synthetic inbounds queued for this agent while
@@ -3323,8 +3332,12 @@ const ipcServer: IpcServer = createIpcServer({
3323
3332
 
3324
3333
  onClientDisconnected(client: IpcClient) {
3325
3334
  process.stderr.write(`telegram gateway: bridge disconnected — agent=${client.agentName}\n`)
3326
- // Phase 2b shadow: bridge down.
3327
- shadowEmit({ kind: 'bridgeDown', at: Date.now() })
3335
+ // Phase 2b shadow: ONLY emit bridgeDown for the REAL bridge sidecar
3336
+ // (matching the bridgeUp gate above). Anonymous IPC clients
3337
+ // disconnect frequently — those are not bridge flaps.
3338
+ if (client.agentName != null) {
3339
+ shadowEmit({ kind: 'bridgeDown', at: Date.now() })
3340
+ }
3328
3341
 
3329
3342
  // Scope the flush to clients that actually registered as an agent.
3330
3343
  // Anonymous one-shot connections (e.g. recall.py's legacy