polygram 0.8.0-rc.65 → 0.8.0-rc.66

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://anthropic.com/claude-code/plugin.schema.json",
3
3
  "name": "polygram",
4
- "version": "0.8.0-rc.65",
4
+ "version": "0.8.0-rc.66",
5
5
  "description": "Telegram integration for Claude Code that preserves the OpenClaw per-chat session model. Migration target for OpenClaw users. Multi-bot, multi-chat, per-topic isolation; SQLite transcripts; inline-keyboard approvals. Bundles /polygram:status|logs|pair-code|approvals admin commands plus history (transcript queries) and polygram-send (out-of-turn IPC sends with file-upload validation) skills.",
6
6
  "keywords": [
7
7
  "telegram",
package/lib/db.js CHANGED
@@ -381,7 +381,22 @@ function wrap(db) {
381
381
  AND json_extract(detail_json, '$.session_key') = ?
382
382
  LIMIT 1
383
383
  `).get(c.id, c.session_key);
384
- if (!boundary) orphans.push(c);
384
+ if (boundary) continue;
385
+ // rc.66: also skip if a previous boot has already handled
386
+ // this orphan (silent replay via compact-replay event, OR
387
+ // surface-fallback via compact-failed-restart event). Both
388
+ // of those record `original_ts` in their detail_json
389
+ // matching the original compact-command's ts. Without this
390
+ // dedupe, every subsequent deploy re-surfaces / re-replays
391
+ // the same orphan (annoying noise).
392
+ const handled = db.prepare(`
393
+ SELECT id FROM events
394
+ WHERE kind IN ('compact-replay', 'compact-failed-restart')
395
+ AND json_extract(detail_json, '$.original_ts') = ?
396
+ LIMIT 1
397
+ `).get(c.ts);
398
+ if (handled) continue;
399
+ orphans.push(c);
385
400
  }
386
401
  return orphans;
387
402
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polygram",
3
- "version": "0.8.0-rc.65",
3
+ "version": "0.8.0-rc.66",
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": {