cueclaw 0.1.1 → 0.1.3
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 +202 -20
- package/dist/app-JK3HBFKZ.js +3279 -0
- package/dist/{chunk-RSKXBXSJ.js → chunk-25KI643G.js} +16 -1
- package/dist/{chunk-PZZ6FBGB.js → chunk-CXBDJQJJ.js} +4 -3
- package/dist/chunk-HDUFGPCI.js +729 -0
- package/dist/{chunk-G43R5ASK.js → chunk-JJUF2AJ5.js} +20 -1
- package/dist/chunk-KBLMQZ3P.js +116 -0
- package/dist/{chunk-SEYPA5M2.js → chunk-X3WNTN5V.js} +147 -39
- package/dist/{chunk-WE5J7GMR.js → chunk-ZOFGQYXX.js} +36 -11
- package/dist/cli.js +132 -71
- package/dist/{config-6NWFKNLW.js → config-D5A5TNLZ.js} +4 -1
- package/dist/daemon-4DVXPT4O.js +28 -0
- package/dist/{executor-LS3Y4DO5.js → executor-TMY6MGVY.js} +5 -4
- package/dist/logger-HKMIMPCE.js +18 -0
- package/dist/{planner-UU4T5IEN.js → planner-MJ3XBCWH.js} +3 -3
- package/dist/{service-VTUYSAAZ.js → service-AP5GEITC.js} +4 -3
- package/dist/{setup-NWBKTQCO.js → setup-U2YKLOK6.js} +7 -2
- package/dist/{telegram-P6DBJ7WZ.js → telegram-FH5O4F3K.js} +27 -3
- package/dist/{whatsapp-HFMOFSFI.js → whatsapp-RLNSXSFI.js} +10 -2
- package/package.json +1 -1
- package/dist/app-ZJG6ANUK.js +0 -1953
- package/dist/chunk-LSL3FRCU.js +0 -307
- package/dist/chunk-QBOYMF4A.js +0 -42
- package/dist/chunk-W274JWEK.js +0 -229
- package/dist/daemon-HPD3D7TJ.js +0 -95
- package/dist/logger-HD23RPWS.js +0 -12
- package/dist/router-F5PJC74R.js +0 -14
package/README.md
CHANGED
|
@@ -6,8 +6,19 @@
|
|
|
6
6
|
An AI workflow orchestrator that turns natural language into executable DAGs. Built on the <a href="https://docs.anthropic.com/en/docs/claude-agent-sdk">Claude Agent SDK</a>.
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/cueclaw"><img src="https://img.shields.io/npm/v/cueclaw" alt="npm version" /></a>
|
|
11
|
+
<a href="https://github.com/memodb-io/cueclaw/actions"><img src="https://img.shields.io/github/actions/workflow/status/memodb-io/cueclaw/ci.yml?branch=main" alt="CI" /></a>
|
|
12
|
+
<a href="https://github.com/memodb-io/cueclaw/blob/main/LICENSE"><img src="https://img.shields.io/github/license/memodb-io/cueclaw" alt="License" /></a>
|
|
13
|
+
<img src="https://img.shields.io/node/v/cueclaw" alt="Node.js" />
|
|
14
|
+
</p>
|
|
15
|
+
|
|
9
16
|
## How It Works
|
|
10
17
|
|
|
18
|
+
1. **Describe** what you want in plain language
|
|
19
|
+
2. **Review** the generated execution plan (DAG)
|
|
20
|
+
3. **Confirm**, and CueClaw runs it in the background as a daemon
|
|
21
|
+
|
|
11
22
|
```
|
|
12
23
|
You: "Every 30 minutes, check my X timeline for trending AI/LLM tweets,
|
|
13
24
|
reply with a professional but friendly tone, and post a daily
|
|
@@ -29,35 +40,114 @@ CueClaw:
|
|
|
29
40
|
└────────────────────────────────────────────┘
|
|
30
41
|
```
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
### More Examples
|
|
44
|
+
|
|
45
|
+
<details>
|
|
46
|
+
<summary><b>GitHub Issue to Draft PR</b> — poll trigger, multi-step DAG</summary>
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
You: "Monitor my repo for issues assigned to me. Create a branch,
|
|
50
|
+
analyze the issue, generate an implementation plan, and open
|
|
51
|
+
a Draft PR linking the issue."
|
|
52
|
+
|
|
53
|
+
CueClaw:
|
|
54
|
+
┌─ Plan: Issue Auto PR ──────────────────────┐
|
|
55
|
+
│ Trigger: poll (60s) │
|
|
56
|
+
│ │
|
|
57
|
+
│ 1. Clone repo & create feature branch │
|
|
58
|
+
│ 2. Analyze issue & generate plan │
|
|
59
|
+
│ └─ depends on: step 1 │
|
|
60
|
+
│ 3. Commit plan & create Draft PR │
|
|
61
|
+
│ └─ depends on: step 2 │
|
|
62
|
+
│ 4. Notify via Telegram │
|
|
63
|
+
│ └─ depends on: step 3 │
|
|
64
|
+
└────────────────────────────────────────────┘
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
<details>
|
|
70
|
+
<summary><b>GitHub Trending Daily Digest</b> — cron trigger, Telegram notification</summary>
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
You: "Every day at 10am, scrape GitHub Trending for the top 10 projects,
|
|
74
|
+
summarize each with stars/language/description, and send the digest
|
|
75
|
+
to me on Telegram."
|
|
76
|
+
|
|
77
|
+
CueClaw:
|
|
78
|
+
┌─ Plan: GitHub Trending Digest ─────────────┐
|
|
79
|
+
│ Trigger: cron (0 10 * * *) │
|
|
80
|
+
│ │
|
|
81
|
+
│ 1. Fetch GitHub Trending page │
|
|
82
|
+
│ 2. Extract top 10 projects with metadata │
|
|
83
|
+
│ └─ depends on: step 1 │
|
|
84
|
+
│ 3. Generate formatted digest summary │
|
|
85
|
+
│ └─ depends on: step 2 │
|
|
86
|
+
│ 4. Send digest via Telegram │
|
|
87
|
+
│ └─ depends on: step 3 │
|
|
88
|
+
└────────────────────────────────────────────┘
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
</details>
|
|
92
|
+
|
|
93
|
+
<details>
|
|
94
|
+
<summary><b>PR Review Loop</b> — interactive commands via poll trigger</summary>
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
You: "Watch my PRs. If someone comments /execute, run the plan in PLAN.md.
|
|
98
|
+
If they comment /modify, update the plan. If /merge, squash-merge
|
|
99
|
+
and close the linked issue."
|
|
100
|
+
|
|
101
|
+
CueClaw:
|
|
102
|
+
┌─ Plan: PR Review Loop ─────────────────────┐
|
|
103
|
+
│ Trigger: poll (60s) │
|
|
104
|
+
│ │
|
|
105
|
+
│ 1. Parse trigger data for PR & command │
|
|
106
|
+
│ 2. Execute command (run/modify/merge) │
|
|
107
|
+
│ └─ depends on: step 1 │
|
|
108
|
+
│ 3. Comment result on PR & notify user │
|
|
109
|
+
│ └─ depends on: step 2 │
|
|
110
|
+
└────────────────────────────────────────────┘
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
</details>
|
|
33
114
|
|
|
34
115
|
## Features
|
|
35
116
|
|
|
117
|
+
**Core**
|
|
36
118
|
- **Natural language in, workflow out** — Describe "when X happens, do Y". No YAML/JSON authoring.
|
|
37
119
|
- **Human-in-the-loop** — Review the generated DAG before anything runs. Modify or cancel at any point.
|
|
38
|
-
- **Multi-
|
|
39
|
-
- **
|
|
40
|
-
|
|
41
|
-
|
|
120
|
+
- **Multi-turn planner** — The planner asks clarifying questions, stores credentials, then generates the workflow.
|
|
121
|
+
- **Parallel DAG execution** — Independent steps run concurrently via `Promise.all`. Dependencies are respected.
|
|
122
|
+
|
|
123
|
+
**Channels**
|
|
124
|
+
- **TUI** — Interactive terminal UI with themes, keyboard shortcuts, and real-time execution views.
|
|
125
|
+
- **WhatsApp** — Baileys-based. QR code auth, inline confirmation, typing indicators.
|
|
126
|
+
- **Telegram** — Grammy-based. Inline keyboard buttons, message chunking, callback queries.
|
|
127
|
+
|
|
128
|
+
**Infrastructure**
|
|
129
|
+
- **Daemon** — Runs as a launchd (macOS) or systemd (Linux) service with auto-restart on crash.
|
|
130
|
+
- **Triggers** — Poll scripts, cron schedules, or manual execution.
|
|
131
|
+
- **Concurrency control** — GroupQueue with global cap and per-workflow serialization.
|
|
132
|
+
- **Container isolation** (optional) — Docker execution with filesystem isolation, mount allowlists, and stdin-only secret delivery. Defaults to local mode with safety hooks.
|
|
133
|
+
- **Structured logging** — pino to `~/.cueclaw/logs/`, per-workflow execution logs, TUI log stream.
|
|
42
134
|
|
|
43
|
-
##
|
|
135
|
+
## Quick Start
|
|
44
136
|
|
|
45
137
|
Runtime: **Node.js 22+**.
|
|
46
138
|
|
|
47
139
|
```bash
|
|
48
140
|
npm install -g cueclaw@latest
|
|
49
|
-
# or: pnpm add -g cueclaw@latest
|
|
50
|
-
|
|
51
141
|
cueclaw config set claude.api_key $ANTHROPIC_API_KEY
|
|
52
142
|
cueclaw
|
|
53
143
|
```
|
|
54
144
|
|
|
55
|
-
|
|
145
|
+
From source:
|
|
56
146
|
|
|
57
147
|
```bash
|
|
58
148
|
git clone https://github.com/memodb-io/cueclaw.git
|
|
59
|
-
cd cueclaw
|
|
60
|
-
pnpm
|
|
149
|
+
cd cueclaw && pnpm install && pnpm build
|
|
150
|
+
pnpm dev # or: node dist/cli.js
|
|
61
151
|
```
|
|
62
152
|
|
|
63
153
|
Optional: [Docker](https://docker.com/products/docker-desktop) for container isolation, WhatsApp / Telegram for bot channels.
|
|
@@ -65,20 +155,99 @@ Optional: [Docker](https://docker.com/products/docker-desktop) for container iso
|
|
|
65
155
|
## Architecture
|
|
66
156
|
|
|
67
157
|
```mermaid
|
|
68
|
-
flowchart
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
158
|
+
flowchart TB
|
|
159
|
+
subgraph Channels
|
|
160
|
+
TUI[TUI<br/><small>Ink / React</small>]
|
|
161
|
+
WA[WhatsApp<br/><small>Baileys</small>]
|
|
162
|
+
TG[Telegram<br/><small>Grammy</small>]
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
subgraph Core
|
|
166
|
+
Router[Message Router]
|
|
167
|
+
PS[Planner Session<br/><small>multi-turn LLM</small>]
|
|
168
|
+
Exec[Executor<br/><small>parallel DAG</small>]
|
|
169
|
+
AR[Agent Runner<br/><small>Claude Agent SDK</small>]
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
subgraph Daemon
|
|
173
|
+
TL[Trigger Loop<br/><small>poll / cron</small>]
|
|
174
|
+
GQ[GroupQueue<br/><small>concurrency control</small>]
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
TUI & WA & TG --> Router
|
|
178
|
+
Router --> PS
|
|
179
|
+
PS -->|Workflow DAG| Router
|
|
180
|
+
Router -->|User confirms| Exec
|
|
181
|
+
Exec --> AR
|
|
182
|
+
AR -->|local| SDK[Claude Agent SDK<br/><small>query()</small>]
|
|
183
|
+
AR -->|container| Docker[Docker Container]
|
|
184
|
+
Exec --> DB[(SQLite)]
|
|
185
|
+
TL --> GQ --> Exec
|
|
186
|
+
Exec -->|notify| Router
|
|
187
|
+
Router --> TUI & WA & TG
|
|
76
188
|
```
|
|
77
189
|
|
|
78
|
-
Single Node.js process. Each workflow step runs in its own agent session.
|
|
190
|
+
Single Node.js process. Each workflow step runs in its own agent session. Data flows between steps via `$steps.{id}.output` references. The daemon manages trigger evaluation and workflow execution with crash recovery.
|
|
79
191
|
|
|
80
192
|
See [docs/architecture.md](docs/architecture.md) for the full design.
|
|
81
193
|
|
|
194
|
+
## Commands
|
|
195
|
+
|
|
196
|
+
**CLI**
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
cueclaw # Launch TUI (default)
|
|
200
|
+
cueclaw new "description" # Create workflow directly
|
|
201
|
+
cueclaw list # List all workflows
|
|
202
|
+
cueclaw status <id> # Workflow details
|
|
203
|
+
cueclaw pause|resume|delete # Lifecycle management
|
|
204
|
+
cueclaw daemon start|stop|status|install|uninstall|logs
|
|
205
|
+
cueclaw config get|set # Configuration management
|
|
206
|
+
cueclaw setup # First-run validation
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**TUI Slash Commands**
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
/new [description] Create a new workflow
|
|
213
|
+
/list List all workflows
|
|
214
|
+
/status <id> Workflow status
|
|
215
|
+
/cancel <id> Cancel running workflow
|
|
216
|
+
/bot start|status Manage bot channels
|
|
217
|
+
/daemon start|stop Daemon control
|
|
218
|
+
/theme [name] Switch theme (default, mono, ocean)
|
|
219
|
+
/help Show all commands
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Project Structure
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
src/
|
|
226
|
+
├── cli.ts # CLI entry point (commander)
|
|
227
|
+
├── config.ts # YAML config + Zod validation
|
|
228
|
+
├── db.ts # SQLite persistence (WAL mode)
|
|
229
|
+
├── planner.ts # LLM → Workflow DAG generation
|
|
230
|
+
├── planner-session.ts # Multi-turn planner conversation
|
|
231
|
+
├── executor.ts # Parallel DAG execution engine
|
|
232
|
+
├── agent-runner.ts # Claude Agent SDK wrapper (local + container)
|
|
233
|
+
├── router.ts # Message routing across channels
|
|
234
|
+
├── daemon.ts # Background process + PID management
|
|
235
|
+
├── service.ts # launchd / systemd integration
|
|
236
|
+
├── trigger-loop.ts # Poll + cron trigger evaluation
|
|
237
|
+
├── container-runner.ts # Docker container execution
|
|
238
|
+
├── container-runtime.ts # Image management (build / pull)
|
|
239
|
+
├── channels/
|
|
240
|
+
│ ├── tui.ts # TUI channel
|
|
241
|
+
│ ├── whatsapp.ts # WhatsApp (Baileys)
|
|
242
|
+
│ └── telegram.ts # Telegram (Grammy)
|
|
243
|
+
└── tui/
|
|
244
|
+
├── app.tsx # Main TUI application
|
|
245
|
+
├── commands/ # Slash command registry
|
|
246
|
+
├── hooks/ # Custom React hooks
|
|
247
|
+
├── messages/ # Per-type message components
|
|
248
|
+
└── theme/ # Theme system (3 built-in themes)
|
|
249
|
+
```
|
|
250
|
+
|
|
82
251
|
## Documentation
|
|
83
252
|
|
|
84
253
|
| Doc | Description |
|
|
@@ -90,6 +259,19 @@ See [docs/architecture.md](docs/architecture.md) for the full design.
|
|
|
90
259
|
| [docs/config.md](docs/config.md) | Configuration and CLI reference |
|
|
91
260
|
| [docs/testing.md](docs/testing.md) | Test strategy |
|
|
92
261
|
|
|
262
|
+
## Contributing
|
|
263
|
+
|
|
264
|
+
Contributions are welcome. CueClaw follows a **skills-over-features** philosophy — the core stays minimal, and domain-specific capabilities live as skills in `.claude/skills/`.
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
pnpm install # Install dependencies
|
|
268
|
+
pnpm test # Run tests (~309 tests, 33 files)
|
|
269
|
+
pnpm lint # Lint
|
|
270
|
+
pnpm typecheck # Type check
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
See [docs/testing.md](docs/testing.md) for test conventions (co-located tests, in-memory SQLite, mock patterns).
|
|
274
|
+
|
|
93
275
|
## License
|
|
94
276
|
|
|
95
277
|
Apache-2.0
|