polygram 0.6.15 → 0.6.16

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.6.15",
4
+ "version": "0.6.16",
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 and a history skill.",
6
6
  "keywords": [
7
7
  "telegram",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polygram",
3
- "version": "0.6.15",
3
+ "version": "0.6.16",
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": {
package/polygram.js CHANGED
@@ -786,6 +786,9 @@ function errorReplyText(err) {
786
786
  if (/Process (exited|killed)/i.test(msg)) {
787
787
  return '💥 Something crashed on my end. Try again.';
788
788
  }
789
+ if (/error_during_execution/i.test(msg)) {
790
+ return '💥 Something went wrong mid-stream. Try again.';
791
+ }
789
792
  const reason = msg.split('\n')[0].slice(0, 120);
790
793
  return `Hit a snag: ${reason || 'unknown error'}. Try resending.`;
791
794
  }
@@ -1761,7 +1764,16 @@ async function handleMessage(sessionKey, chatId, msg, bot) {
1761
1764
  if (result.error) {
1762
1765
  console.error(`[${label}] Error (${elapsed}s):`, result.error);
1763
1766
  reactor.setState('ERROR');
1764
- if (!result.text) { markReplied(); return; }
1767
+ // 0.6.16: pre-fix, silently markReplied()+return — the user got an
1768
+ // error reaction emoji on their message but no actual reply text,
1769
+ // AND 'replied' status meant boot replay didn't re-dispatch on next
1770
+ // boot. Worst-case: shutdown-killed turn (e.g. polygram upgrade
1771
+ // mid-stream) → user sends "yes", sees 🤯, gets no answer ever,
1772
+ // the row is silently lost. Promote to a thrown error so
1773
+ // dispatchHandleMessage's catch correctly distinguishes shutdown
1774
+ // (→ 'replay-pending', boot replay retries) from runtime failure
1775
+ // (→ 'failed', user gets an apology with retry hint).
1776
+ if (!result.text) throw new Error(result.error);
1765
1777
  } else {
1766
1778
  // Clear the progress reaction instead of stamping 👍 — the reply
1767
1779
  // bubble itself is the "done" signal and a permanent thumbs-up on