@jsayubi/ccgram 1.1.0 → 1.1.1
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/README.md +27 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# CCGram
|
|
4
4
|
|
|
5
|
-
**Control Claude Code from Telegram — approve permissions, answer questions, and manage AI
|
|
5
|
+
**Control Claude Code from Telegram — approve permissions, answer questions, resume sessions, and manage AI coding agents from your phone.**
|
|
6
6
|
|
|
7
7
|
[](https://github.com/jsayubi/ccgram/actions/workflows/ci.yml)
|
|
8
8
|
[](https://www.npmjs.com/package/@jsayubi/ccgram)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
CCGram is a self-hosted Telegram bot that bridges Claude Code to your phone. When Claude needs a permission, has a question, or finishes a task — you get a Telegram message with inline buttons to respond.
|
|
16
|
+
CCGram is a self-hosted Telegram bot that bridges Claude Code to your phone. When Claude needs a permission, has a question, or finishes a task — you get a Telegram message with inline buttons to respond. Resume past conversations, start new sessions, and manage multiple AI coding agents — all without being at your keyboard.
|
|
17
17
|
|
|
18
18
|
```
|
|
19
19
|
Claude Code → ccgram hooks → Telegram bot → 📱 your phone
|
|
@@ -28,6 +28,7 @@ Claude Code → ccgram hooks → Telegram bot → 📱 your phone
|
|
|
28
28
|
- **Smart notifications** — Task completions, session start/end, and subagent activity — silent when you're at your terminal, instant when you're away
|
|
29
29
|
- **Remote command routing** — Send any command to any Claude session from Telegram
|
|
30
30
|
- **Session management** — List, switch between, and interrupt active sessions
|
|
31
|
+
- **Resume conversations** — `/resume` reads your full Claude Code session history with conversation snippets — pick up any past conversation in one tap
|
|
31
32
|
- **Project launcher** — Start Claude in any project directory with `/new myproject`
|
|
32
33
|
- **Smart routing** — Prefix matching, default workspace, reply-to routing
|
|
33
34
|
- **Typing indicator** — See when the bot is waiting for Claude to respond
|
|
@@ -126,6 +127,22 @@ Claude asks a question (AskUserQuestion)
|
|
|
126
127
|
|
|
127
128
|
The `/new` command searches your configured `PROJECT_DIRS`, finds exact or prefix-matched directories, creates a tmux session (or PTY session if tmux is unavailable), starts Claude, and sets it as the default workspace.
|
|
128
129
|
|
|
130
|
+
### Resume past conversations
|
|
131
|
+
|
|
132
|
+
| Command | Description |
|
|
133
|
+
|---------|-------------|
|
|
134
|
+
| `/resume` | Show projects with past Claude sessions |
|
|
135
|
+
| `/resume myproject` | Jump straight to session picker for that project |
|
|
136
|
+
|
|
137
|
+
The `/resume` command reads directly from Claude Code's session storage (`~/.claude/projects/`), giving you access to your full conversation history — not just sessions started through the bot.
|
|
138
|
+
|
|
139
|
+
Each session shows a snippet of the first message for easy identification. Sessions are sorted by last activity.
|
|
140
|
+
|
|
141
|
+
**Active session protection:**
|
|
142
|
+
- If a session appears to be running in a terminal (JSONL file modified within 5 min), you get a warning before resuming to prevent dual-instance conflicts
|
|
143
|
+
- If a PTY session is running, you're warned that it will be terminated (PTY sessions can't be reattached)
|
|
144
|
+
- tmux sessions switch seamlessly — the bot injects `/exit` + `claude --resume` inline, keeping your terminal connected
|
|
145
|
+
|
|
129
146
|
### Smart routing
|
|
130
147
|
|
|
131
148
|
**Prefix matching** — workspace names can be abbreviated. `/ass hello` routes to `assistant` if it's unique. Ambiguous prefixes show a list to choose from.
|
|
@@ -235,7 +252,7 @@ node dist/workspace-telegram-bot.js
|
|
|
235
252
|
```bash
|
|
236
253
|
npm run build # Compile TypeScript → dist/
|
|
237
254
|
npm run build:watch # Watch mode
|
|
238
|
-
npm test # Run
|
|
255
|
+
npm test # Run 84 tests (vitest)
|
|
239
256
|
```
|
|
240
257
|
|
|
241
258
|
**Note:** Claude Code hooks run from `~/.ccgram/dist/`, not the repo's `dist/`. After changing hook scripts during development, sync them:
|
|
@@ -276,8 +293,9 @@ cli.ts # ccgram CLI entry point
|
|
|
276
293
|
```
|
|
277
294
|
test/
|
|
278
295
|
├── prompt-bridge.test.js # 15 tests — IPC write/read/update/clean/expiry
|
|
279
|
-
├── workspace-router.test.js #
|
|
280
|
-
|
|
296
|
+
├── workspace-router.test.js # 38 tests — session map, prefix matching, defaults, reply-to, session history
|
|
297
|
+
├── callback-parser.test.js # 23 tests — all callback_data formats (perm, opt, new, rp, rs, rc)
|
|
298
|
+
└── active-check.test.js # 8 tests — terminal activity detection, thresholds
|
|
281
299
|
```
|
|
282
300
|
|
|
283
301
|
Tests use isolated temp directories and run with `npm test` (vitest, no configuration needed).
|
|
@@ -303,6 +321,9 @@ All notifications — including permission requests — are suppressed automatic
|
|
|
303
321
|
**Can I use it with multiple projects at once?**
|
|
304
322
|
Yes. Each Claude session maps to a named tmux or PTY session. Use `/sessions` to see all active sessions, or `/use <workspace>` to set a default for plain text routing.
|
|
305
323
|
|
|
324
|
+
**Can I resume a conversation I started in the terminal?**
|
|
325
|
+
Yes. `/resume` reads from Claude Code's own session storage, so it sees every conversation — not just ones started through the bot. If the session is still running in your terminal, you'll get a warning before resuming to prevent conflicts.
|
|
326
|
+
|
|
306
327
|
**Do I need tmux?**
|
|
307
328
|
No. When tmux is not detected, CCGram automatically falls back to headless PTY sessions powered by [`node-pty`](https://github.com/microsoft/node-pty). No configuration required — it activates on its own.
|
|
308
329
|
|
|
@@ -331,7 +352,7 @@ MIT — see [LICENSE](LICENSE).
|
|
|
331
352
|
|
|
332
353
|
<div align="center">
|
|
333
354
|
|
|
334
|
-
Built for developers who
|
|
355
|
+
Built for developers who run Claude Code unattended — approve permissions, resume conversations, and manage AI coding agents from anywhere.
|
|
335
356
|
|
|
336
357
|
[Report a bug](https://github.com/jsayubi/ccgram/issues) · [Request a feature](https://github.com/jsayubi/ccgram/issues)
|
|
337
358
|
|