switchroom 0.13.17 → 0.13.18

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.
@@ -47331,8 +47331,8 @@ var {
47331
47331
  } = import__.default;
47332
47332
 
47333
47333
  // src/build-info.ts
47334
- var VERSION = "0.13.17";
47335
- var COMMIT_SHA = "84eb8ad9";
47334
+ var VERSION = "0.13.18";
47335
+ var COMMIT_SHA = "847c860e";
47336
47336
 
47337
47337
  // src/cli/agent.ts
47338
47338
  init_source();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "switchroom",
3
- "version": "0.13.17",
3
+ "version": "0.13.18",
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": {
@@ -48204,10 +48204,10 @@ function sweepStaleTurnActiveMarker(stateDir, opts) {
48204
48204
  }
48205
48205
 
48206
48206
  // ../src/build-info.ts
48207
- var VERSION = "0.13.17";
48208
- var COMMIT_SHA = "84eb8ad9";
48209
- var COMMIT_DATE = "2026-05-23T05:24:12Z";
48210
- var LATEST_PR = 1678;
48207
+ var VERSION = "0.13.18";
48208
+ var COMMIT_SHA = "847c860e";
48209
+ var COMMIT_DATE = "2026-05-23T06:38:45Z";
48210
+ var LATEST_PR = 1680;
48211
48211
  var COMMITS_AHEAD_OF_TAG = 0;
48212
48212
 
48213
48213
  // gateway/boot-version.ts
@@ -50815,6 +50815,31 @@ ${url}`;
50815
50815
  logOutbound("edit", chat_id, decision.messageId, decision.mergedText.length, "silent-anchor-merge");
50816
50816
  process.stderr.write(`telegram gateway: silent-reply auto-edit \u2014 ` + `chat=${chat_id} anchor=${decision.messageId} merged_len=${decision.mergedText.length}
50817
50817
  `);
50818
+ noteOutbound3(statusKey(chat_id, threadId), {
50819
+ messageId: decision.messageId,
50820
+ text: decision.mergedText
50821
+ });
50822
+ if (HISTORY_ENABLED) {
50823
+ try {
50824
+ recordOutbound({
50825
+ chat_id,
50826
+ thread_id: threadId ?? null,
50827
+ message_ids: [decision.messageId],
50828
+ texts: [decision.mergedText],
50829
+ attachment_kinds: [null]
50830
+ });
50831
+ } catch (histErr) {
50832
+ process.stderr.write(`telegram gateway: history recordOutbound (silent-anchor-edit) failed: ${histErr instanceof Error ? histErr.message : String(histErr)}
50833
+ `);
50834
+ }
50835
+ }
50836
+ if (turn2 != null && isFinalAnswerReply({
50837
+ text: decision.mergedText,
50838
+ disableNotification
50839
+ })) {
50840
+ turn2.finalAnswerDelivered = true;
50841
+ }
50842
+ outboundDedup.record(chat_id, threadId, decision.mergedText, Date.now());
50818
50843
  silentAnchorEditDone = true;
50819
50844
  } catch (err) {
50820
50845
  process.stderr.write(`telegram gateway: silent-reply auto-edit failed, falling back to fresh send: ${err instanceof Error ? err.message : String(err)}
@@ -4485,6 +4485,55 @@ async function executeReply(args: Record<string, unknown>): Promise<{ content: A
4485
4485
  `chat=${chat_id} anchor=${decision.messageId} ` +
4486
4486
  `merged_len=${decision.mergedText.length}\n`,
4487
4487
  )
4488
+
4489
+ // #1679 — side effects the chunk-loop completion path runs.
4490
+ // The edit-anchor branch returns early below, so these must
4491
+ // be wired here too. Skipping them silently causes:
4492
+ // - cross-turn ambient (`pending-work-progress.ts`) holds
4493
+ // a stale anchor text and OVERWRITES the model's
4494
+ // accumulated silent content with `still working (Nm)`
4495
+ // when async work is in flight (this is the load-bearing
4496
+ // fix);
4497
+ // - SQLite history (`get_recent_messages`) misses the
4498
+ // silent-anchor content;
4499
+ // - #1664 silent-end re-prompt fires even when the
4500
+ // accumulated silent content qualifies as substantive;
4501
+ // - retries within the dedup window may double-send.
4502
+ pendingProgress.noteOutbound(statusKey(chat_id, threadId), {
4503
+ messageId: decision.messageId,
4504
+ text: decision.mergedText,
4505
+ })
4506
+ if (HISTORY_ENABLED) {
4507
+ try {
4508
+ recordOutbound({
4509
+ chat_id,
4510
+ thread_id: threadId ?? null,
4511
+ message_ids: [decision.messageId],
4512
+ texts: [decision.mergedText],
4513
+ attachment_kinds: [null],
4514
+ })
4515
+ } catch (histErr) {
4516
+ process.stderr.write(
4517
+ `telegram gateway: history recordOutbound (silent-anchor-edit) failed: ${histErr instanceof Error ? histErr.message : String(histErr)}\n`,
4518
+ )
4519
+ }
4520
+ }
4521
+ if (
4522
+ turn != null
4523
+ && isFinalAnswerReply({
4524
+ text: decision.mergedText,
4525
+ disableNotification,
4526
+ })
4527
+ ) {
4528
+ turn.finalAnswerDelivered = true
4529
+ }
4530
+ outboundDedup.record(
4531
+ chat_id,
4532
+ threadId,
4533
+ decision.mergedText,
4534
+ Date.now(),
4535
+ )
4536
+
4488
4537
  silentAnchorEditDone = true
4489
4538
  } catch (err) {
4490
4539
  // Edit failed (e.g. message deleted, rate limit exhausted,