polygram 0.3.1 → 0.3.2
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/commands/status.md +63 -36
- package/package.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "polygram",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
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/commands/status.md
CHANGED
|
@@ -2,39 +2,66 @@
|
|
|
2
2
|
description: Show polygram daemon health — running bots, IPC sockets, recent events.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Do these checks
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
1.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
2.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
5
|
+
Report the health of the polygram Telegram daemon.
|
|
6
|
+
|
|
7
|
+
Do these checks with the Bash tool and summarise per-bot in a short
|
|
8
|
+
Markdown table. Cover launchd **and** tmux supervision — users run either.
|
|
9
|
+
|
|
10
|
+
### 1. Discover configured bots
|
|
11
|
+
|
|
12
|
+
Read bot names from `~/polygram/config.json` (or `$POLYGRAM_CONFIG`):
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
jq -r '.bots | keys[]' ~/polygram/config.json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### 2. Per bot, check supervisor + process
|
|
19
|
+
|
|
20
|
+
**a) LaunchAgent** — `launchctl list | grep com.polygram.<bot>`. If
|
|
21
|
+
present the bot is under launchd. PID `-` means loaded but not running.
|
|
22
|
+
|
|
23
|
+
**b) tmux** — `tmux list-windows -a 2>/dev/null | grep <bot>`. If
|
|
24
|
+
present the bot is running in a tmux pane (most common during testing).
|
|
25
|
+
|
|
26
|
+
**c) Process** — `pgrep -f "polygram --bot <bot>"`. Confirms the Node
|
|
27
|
+
process is actually alive regardless of supervisor.
|
|
28
|
+
|
|
29
|
+
Label supervision as:
|
|
30
|
+
- `launchd` — plist loaded
|
|
31
|
+
- `tmux` — window present
|
|
32
|
+
- `foreground` — alive but unsupervised (will die on logout/crash)
|
|
33
|
+
- `absent` — no process
|
|
34
|
+
|
|
35
|
+
### 3. IPC socket liveness
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
polygram-ipc <bot-name>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
That's the `polygram-ipc` bin installed alongside the daemon. Interpret:
|
|
42
|
+
- `ping: {"ok":true,...}` — socket alive ✅
|
|
43
|
+
- `ERR: ECONNREFUSED` — socket stale (supervisor claims running, isn't serving)
|
|
44
|
+
- `ERR: ENOENT` — socket missing
|
|
45
|
+
- `command not found: polygram-ipc` — user has polygram < 0.3.2; tell
|
|
46
|
+
them to `npm install -g polygram@latest`
|
|
47
|
+
|
|
48
|
+
### 4. Recent events
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
sqlite3 ~/polygram/<bot>.db "SELECT ts, kind FROM events ORDER BY ts DESC LIMIT 5;"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Flag anything ending in `-failed`, `-error`, `crashed-mid-send`,
|
|
55
|
+
`poll-stalled`, `approval-sweep-failed`.
|
|
56
|
+
|
|
57
|
+
### 5. Summarise
|
|
58
|
+
|
|
59
|
+
Compact Markdown table + overall verdict:
|
|
60
|
+
|
|
61
|
+
- ✅ **healthy** — every bot supervised, live socket, no recent errors
|
|
62
|
+
- ⚠️ **degraded** — running but not supervised (foreground) OR sweeper
|
|
63
|
+
events present OR stale socket
|
|
64
|
+
- ❌ **broken** — any bot has no live process or no live socket
|
|
65
|
+
|
|
66
|
+
If the install isn't at `~/polygram/`, ask for the data-dir path rather
|
|
67
|
+
than guessing.
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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": {
|
|
7
7
|
"polygram": "polygram.js",
|
|
8
|
-
"polygram-split-db": "scripts/split-db.js"
|
|
8
|
+
"polygram-split-db": "scripts/split-db.js",
|
|
9
|
+
"polygram-ipc": "scripts/ipc-smoke.js"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
11
12
|
"polygram.js",
|