polygram 0.4.10 → 0.4.11
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.
- package/.claude-plugin/plugin.json +1 -1
- package/lib/process-manager.js +5 -0
- package/package.json +1 -1
- package/polygram.js +6 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "polygram",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.11",
|
|
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/lib/process-manager.js
CHANGED
|
@@ -410,6 +410,11 @@ class ProcessManager {
|
|
|
410
410
|
maxTurnMs,
|
|
411
411
|
);
|
|
412
412
|
pending.maxTimer = maxTimer;
|
|
413
|
+
// Give callers a hook so they can transition user-visible state
|
|
414
|
+
// (e.g. status reaction "👀 queued" → "🤔 thinking") the moment
|
|
415
|
+
// Claude actually starts this pending, not the moment it arrived.
|
|
416
|
+
try { context?.onActivate?.(); }
|
|
417
|
+
catch (err) { this.logger.error(`[${entry.label}] onActivate: ${err.message}`); }
|
|
413
418
|
};
|
|
414
419
|
|
|
415
420
|
pending.resetIdleTimer = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
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
|
@@ -1246,7 +1246,11 @@ async function handleMessage(sessionKey, chatId, msg, bot) {
|
|
|
1246
1246
|
},
|
|
1247
1247
|
logError: (m) => console.error(`[${label}] ${m}`),
|
|
1248
1248
|
});
|
|
1249
|
-
|
|
1249
|
+
// Start at QUEUED (👀) so user sees their message was received but
|
|
1250
|
+
// not yet being worked on. pm calls context.onActivate when this
|
|
1251
|
+
// pending becomes the queue head (Claude is actually starting it),
|
|
1252
|
+
// at which point we flip to THINKING (🤔).
|
|
1253
|
+
reactor.setState('QUEUED');
|
|
1250
1254
|
|
|
1251
1255
|
try {
|
|
1252
1256
|
// Pass streamer + reactor as per-turn context. pm's callbacks pick
|
|
@@ -1254,6 +1258,7 @@ async function handleMessage(sessionKey, chatId, msg, bot) {
|
|
|
1254
1258
|
// get routed to their own streamer/reactor.
|
|
1255
1259
|
const result = await sendToProcess(sessionKey, prompt, {
|
|
1256
1260
|
streamer, reactor, sourceMsgId: msg.message_id,
|
|
1261
|
+
onActivate: () => reactor.setState('THINKING'),
|
|
1257
1262
|
});
|
|
1258
1263
|
const elapsed = ((Date.now() - t0) / 1000).toFixed(1);
|
|
1259
1264
|
|