@luckydraw/cumulus 0.30.29 → 0.30.30

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +40 -43
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.30.29
4
+ - Attach files of any type to messages, with upload progress shown
5
+ - Stricter MCP config validation catches setup errors earlier
6
+ - Cleaner responses with literal `<thinking>` tags suppressed
7
+ - Updated documentation reflecting current features
8
+
9
+
3
10
  ## v0.30.29
4
11
 
5
12
  - Attach files of any type to messages, with live upload progress
package/README.md CHANGED
@@ -2,15 +2,14 @@
2
2
 
3
3
  A self-hosted multi-channel AI gateway built around Claude and other LLMs. Runs as a long-lived daemon, speaks to you through a web chat widget, Slack, Discord, iOS push, email webhooks, and more — with unlimited conversation context via the **Recursive Language Model (RLM)** pattern.
4
4
 
5
- Originally a CLI wrapper for Claude, Cumulus has grown into a full gateway platform that coordinates agents, channels, models, and federated deployments.
5
+ Originally a CLI wrapper for Claude, Cumulus has grown into a full gateway platform that coordinates agents, channels, and models behind one persistent process.
6
6
 
7
7
  ## What you get
8
8
 
9
9
  - **Gateway daemon** (`cumulus-gateway`) — HTTP + WebSocket server with per-thread conversations, streaming responses, and an admin API.
10
- - **Web chat widget** — embeddable `/chat` interface with voice mode, push notifications, media uploads, and rich [blex block](https://www.npmjs.com/package/@luckydraw/blex) rendering (tables, forms, charts, kanban, diagrams).
10
+ - **Web chat widget** — embeddable `/chat` interface with voice mode, push notifications, file uploads with progress, and rich [blex block](https://www.npmjs.com/package/@luckydraw/blex) rendering (tables, forms, charts, kanban, diagrams).
11
11
  - **Channel adapters** — Slack and Discord bots, inbound email webhooks (Resend), and generic HTTP webhooks — all injecting into the same thread model.
12
12
  - **Inter-agent messaging** — threads can talk to each other via `send_to_agent`, with support for CC/BCC visibility.
13
- - **Federation** — hub-and-spoke mesh so agents on different machines can message each other across NATs.
14
13
  - **Per-thread model selection** — Claude (via CLI) or any HuggingFace model (GLM-5, Kimi-K2.5, Qwen3, etc.) with tool calling.
15
14
  - **Scheduled triggers, email, push, media serving** — built-in MCP tools so agents can send emails, schedule themselves, notify you, and upload files.
16
15
  - **Unlimited history** — JSONL per thread + vector store + adaptive context budget. Conversations never truncate.
@@ -32,19 +31,19 @@ Originally a CLI wrapper for Claude, Cumulus has grown into a full gateway platf
32
31
  │ │ (HTTP / WS daemon) │ │
33
32
  │ └──────────┬───────────┘ │
34
33
  │ │ │
35
- ┌───────────────────┼──────────────────────┐
36
-
37
- ┌─────────┐ ┌──────────────┐ ┌───────────────┐
38
- │ Thread │ │ Model router │ Federation │ │
39
- │ store │ │ Claude / HF │ hub/spoke │ │
40
- │ (JSONL) │ │ MCP tools │ (WSS mesh) │ │
41
- └────┬────┘ └──────┬───────┘ └───────────────┘
42
-
43
-
44
- ~/.cumulus/ Claude CLI
45
- threads/ HuggingFace API
46
- content/ MCP stdio + in-process
47
- media/
34
+ ┌─────────────┴─────────────┐
35
+ ▼ │
36
+ ┌─────────┐ ┌──────────────┐
37
+ │ Thread │ │ Model router │
38
+ │ store │ │ Claude / HF │
39
+ │ (JSONL) │ │ MCP tools │
40
+ └────┬────┘ └──────┬───────┘
41
+
42
+
43
+ ~/.cumulus/ Claude CLI
44
+ threads/ HuggingFace API
45
+ content/ MCP stdio + in-process
46
+ media/
48
47
  └──────────────────────────────────────────────────────────────┘
49
48
  ```
50
49
 
@@ -108,12 +107,6 @@ Open `http://localhost:8080/chat`, paste the API key, and start talking. Message
108
107
  },
109
108
  "resend": { "apiKey": "re_…", "defaultFrom": "you@example.com" },
110
109
  "vapid": { "publicKey": "…", "privateKey": "…", "subject": "mailto:you@example.com" },
111
- "federation": {
112
- "enabled": true,
113
- "role": "hub", // "hub" or "spoke"
114
- "allowedSpokes": ["mac-karl"], // hub only
115
- // spoke config: { role:"spoke", hub:"wss://host/federation", apiKey:"…", name:"mac-…" }
116
- },
117
110
  }
118
111
  ```
119
112
 
@@ -131,7 +124,7 @@ curl -X PUT http://localhost:8080/api/thread/my-thread/config \
131
124
  -d '{"model": "zai-org/GLM-5"}'
132
125
  ```
133
126
 
134
- - `claude` — spawns `claude --print` per turn. Gets the full Claude Code tool surface.
127
+ - `claude` — spawns `claude --print` per turn. Gets the full Claude Code tool surface. Per-thread `effort` selector (`low` → `max`) maps to the CLI's `--effort` flag.
135
128
  - HuggingFace models — routed through an OpenAI-compatible endpoint with a built-in agentic loop that handles tool use, truncation recovery, and error retry.
136
129
 
137
130
  ### Web chat widget
@@ -139,12 +132,17 @@ curl -X PUT http://localhost:8080/api/thread/my-thread/config \
139
132
  At `/chat`. Features:
140
133
 
141
134
  - **Streaming** responses over WebSocket, with interjection support (type while streaming to interrupt and redirect).
142
- - **[Blex blocks](https://www.npmjs.com/package/@luckydraw/blex)** — `~~~blex:table`, `~~~blex:poll`, `~~~blex:kanban`, `~~~blex:mermaid`, and 18 other block types for rich interactive content.
143
- - **Voice mode** — hands-free conversation using browser STT + TTS (optionally server-side Piper).
135
+ - **Multiple threads, side by side** — Cmd/Ctrl+Click any thread in the sidebar to open it in a second panel alongside the current one. Useful for cross-referencing or driving two agents in parallel. Mobile auto-collapses to a single panel.
136
+ - **Inline annotations** — highlight any chat text, leave a comment via the popover, and send it back as a quoted chip. Chips can be edited or removed before sending. Works like leaving a margin note on what the agent just said.
137
+ - **[Blex blocks](https://www.npmjs.com/package/@luckydraw/blex)** — `~~~blex:TYPE` fenced JSON renders as a rich, interactive component. 22 block types including:
138
+ - **Interactive input** — `poll` (multi-question carousels, multi-select, write-in answers), `confirm` (Yes/No/Cancel), `form` (typed fields with validation). User responses serialize back into the chat input.
139
+ - **Embedded content** — `embed` (sandboxed iframe for hosted apps and webpages, inline in the chat), `image`/`gallery` (with `upload_media`-served URLs), `mermaid` and `svg` diagrams.
140
+ - **Live data** — `table` (sortable/selectable), `chart`, `kanban`, `calendar`, `timeline`, `status`, `metric`, `progress`, `file-tree`, `terminal`, `code`, `diff` (with Apply/Reject buttons), `layout` (composes other blocks), `branch` (step-through flowcharts).
141
+ - **Voice mode** — hands-free conversation using browser STT + server-side Piper TTS, with sentence-by-sentence playback and barge-in.
144
142
  - **Push notifications** — PWA install + VAPID subscriptions. Agents call `notify_user` to alert you while you're away.
145
- - **Media uploads** — drag files in; `upload_media` tool returns a public URL backed by `~/.cumulus/media/`.
146
- - **Annotations** — highlight text, attach comments, send back as chips.
143
+ - **File attachments** — drag or pick any file type. Non-image files upload via XHR with a per-chip progress bar and cancel; agents receive the absolute disk path and can `read_file` it directly. Images stay on the inline-base64 path for vision-capable models.
147
144
  - **Texitool integration** — edit Unicode-art diagrams in-place via an embedded canvas.
145
+ - **Update banner** — auto-detects when a newer version is on npm and offers a one-click update.
148
146
 
149
147
  ### Channel adapters
150
148
 
@@ -154,7 +152,7 @@ At `/chat`. Features:
154
152
 
155
153
  ### Inter-agent messaging
156
154
 
157
- Any thread can message another thread using the `send_to_agent` MCP tool:
155
+ Any thread can message another thread on the same gateway using the `send_to_agent` MCP tool:
158
156
 
159
157
  ```
160
158
  send_to_agent(target="devops", message="Deploy the new build", visibility="cc")
@@ -166,17 +164,6 @@ send_to_agent(target="devops", message="Deploy the new build", visibility="cc")
166
164
 
167
165
  If the target is busy, the message is queued and delivered as a batch when that thread is idle ("while you were busy, 3 messages arrived…").
168
166
 
169
- ### Federation
170
-
171
- Two gateways can be linked in a hub-and-spoke topology. The hub runs at a stable URL; spokes connect outbound via WSS, so NAT doesn't matter.
172
-
173
- ```
174
- send_to_agent("thundercat:cumulus", "…") # cross-gateway addressing
175
- list_agents() # aggregates threads across all spokes
176
- ```
177
-
178
- Heartbeats every 25s with bidirectional WebSocket pings; dead connections are torn down within 75s.
179
-
180
167
  ### Scheduled triggers
181
168
 
182
169
  Agents can schedule themselves:
@@ -200,6 +187,16 @@ list_emails(limit=10)
200
187
 
201
188
  Rate-limited per thread (default 10/hour). All sends are logged to thread history. First email from a new thread triggers a `notify_user` ping.
202
189
 
190
+ ### Reliability
191
+
192
+ - **Graceful restart** — `cumulus-gateway reload` (SIGHUP) drains active Claude/HF streams up to 120s before restarting; no truncated responses on deploy.
193
+ - **Auto-resume after restart** — interrupted threads get a resume nudge on startup so the agent picks back up with full RAG context.
194
+ - **Persistent streaming buffer** — partial responses are flushed to disk every 5s during streaming and recovered on restart.
195
+ - **Truncation continuation** — `finish_reason: "length"` triggers max-token escalation (8k → 16k → 32k) and seamless continuation stitching.
196
+ - **WebSocket keepalive** — server-side ping/pong every 30s; clients reload history if a stream goes silent for >120s.
197
+ - **Policy-error retry** — Claude CLI transient "Usage Policy" refusals auto-retry up to 3 times with a visible "Retrying…" indicator.
198
+ - **HF transient-error retry** — `[Error: terminated]`, connection resets, and similar stream/network errors retry with exponential backoff.
199
+
203
200
  ### Self-update
204
201
 
205
202
  ```bash
@@ -208,7 +205,7 @@ cumulus-gateway update # bumps to latest, saves previous for rollbac
208
205
  cumulus-gateway rollback # restores the previous version
209
206
  ```
210
207
 
211
- The widget's top bar also shows an "Update available" indicator when a new version lands on npm.
208
+ The widget's top bar also shows an "Update available" indicator (with a manual ↻ check button) when a new version lands on npm.
212
209
 
213
210
  ## Classic CLI mode
214
211
 
@@ -258,7 +255,7 @@ The `cumulus-mcp` server exposes history and content tools. Usable from any MCP-
258
255
 
259
256
  **Gateway-only tools** (available to agents running inside the daemon):
260
257
 
261
- `send_to_agent`, `list_agents`, `notify_user`, `schedule_trigger`, `cancel_schedule`, `list_schedules`, `send_email`, `list_emails`, `upload_media`, `create_plastic_app`, `update_pipeline`.
258
+ `send_to_agent`, `list_agents`, `notify_user`, `schedule_trigger`, `cancel_schedule`, `list_schedules`, `send_email`, `list_emails`, `upload_media`.
262
259
 
263
260
  ## RAG & context management
264
261
 
@@ -292,7 +289,7 @@ The `cumulus-mcp` server exposes history and content tools. Usable from any MCP-
292
289
 
293
290
  All `/api/*` routes require `X-API-Key: <key>` (from `apiKeys[]`).
294
291
 
295
- WebSocket (`/chat/ws`) carries the same semantics with streaming, interjection, `inject`, `worker_cancel`, and voice-mode audio frames.
292
+ WebSocket (`/chat/ws`) carries the same semantics with streaming, interjection, `inject`, and voice-mode audio frames.
296
293
 
297
294
  ## Development
298
295
 
@@ -307,7 +304,7 @@ npm run type-check
307
304
  ```
308
305
 
309
306
  - **Build:** `dist/` compiled TypeScript plus static assets (widget HTML/CSS/JS, blex bundles).
310
- - **Tests:** vitest, 700+ tests covering agentic loop, retriever, adapters, federation, scheduler, push.
307
+ - **Tests:** vitest, 700+ tests covering agentic loop, retriever, adapters, scheduler, push.
311
308
  - **Deploy workflow:** bump version, `npm publish`, then `cumulus-gateway reload` on the host (SIGHUP drains active streams — see `docs/tasks/050-graceful-restart.md`).
312
309
 
313
310
  ## Background
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luckydraw/cumulus",
3
- "version": "0.30.29",
3
+ "version": "0.30.30",
4
4
  "description": "RLM-based CLI chat wrapper for Claude with external history context management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",