polygram 0.3.0 → 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/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +23 -6
- package/commands/status.md +63 -36
- package/package.json +3 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "shumkov",
|
|
4
|
+
"description": "Ivan Shumkov's Claude Code plugins.",
|
|
5
|
+
"owner": {
|
|
6
|
+
"name": "Ivan Shumkov",
|
|
7
|
+
"email": "ivanshumkov@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
{
|
|
11
|
+
"name": "polygram",
|
|
12
|
+
"description": "Telegram integration for Claude Code that preserves the OpenClaw per-chat session model. Migration target for OpenClaw users. Bundles /polygram:status|logs|pair-code|approvals admin commands and a history skill.",
|
|
13
|
+
"category": "integration",
|
|
14
|
+
"source": "./",
|
|
15
|
+
"homepage": "https://github.com/shumkov/polygram"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -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/README.md
CHANGED
|
@@ -120,23 +120,40 @@ For production, LaunchAgent plists are in `ops/`. See `ops/README.md`.
|
|
|
120
120
|
polygram also ships as a Claude Code plugin — adds admin slash commands
|
|
121
121
|
and bundles the transcript-query skill for use inside your Claude sessions.
|
|
122
122
|
|
|
123
|
+
The repo doubles as a single-plugin marketplace. Two commands at your
|
|
124
|
+
Claude Code `/` prompt:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
/plugin marketplace add https://github.com/shumkov/polygram.git
|
|
128
|
+
/plugin install polygram@shumkov
|
|
123
129
|
```
|
|
124
|
-
|
|
130
|
+
|
|
131
|
+
The first registers the marketplace (`shumkov`). The second installs the
|
|
132
|
+
`polygram` plugin from it.
|
|
133
|
+
|
|
134
|
+
To enable in a specific Claude project, add to `.claude/settings.json`:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"enabledPlugins": {
|
|
139
|
+
"polygram@shumkov": true
|
|
140
|
+
}
|
|
141
|
+
}
|
|
125
142
|
```
|
|
126
143
|
|
|
127
|
-
Once
|
|
144
|
+
Once enabled:
|
|
128
145
|
|
|
129
|
-
- `/polygram:status` — running bots, IPC health, recent events
|
|
146
|
+
- `/polygram:status` — running bots, IPC health, recent events
|
|
130
147
|
- `/polygram:logs <bot>` — tail `~/polygram/logs/<bot>.log`
|
|
131
148
|
- `/polygram:pair-code` — walks you through issuing a pairing code (in-band via Telegram)
|
|
132
149
|
- `/polygram:approvals [bot]` — pending and recent tool-approval rows
|
|
133
150
|
|
|
134
|
-
The bundled **`
|
|
135
|
-
|
|
151
|
+
The bundled **`history` skill** lets Claude query the transcript directly
|
|
152
|
+
when you ask about past chat activity:
|
|
136
153
|
|
|
137
154
|
```
|
|
138
155
|
"Summarise the Orders topic today" →
|
|
139
|
-
|
|
156
|
+
Claude invokes the history skill → runs `recent <chat> --since 24h`
|
|
140
157
|
```
|
|
141
158
|
|
|
142
159
|
Scope is derived from `process.cwd()`: the skill refuses to run from an
|
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",
|