clawdo 1.0.0
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/LICENSE +21 -0
- package/README.md +312 -0
- package/dist/db.js +906 -0
- package/dist/errors.js +48 -0
- package/dist/inbox.js +122 -0
- package/dist/index.js +759 -0
- package/dist/parser.js +78 -0
- package/dist/render.js +238 -0
- package/dist/sanitize.js +146 -0
- package/dist/types.js +4 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LePetitPince
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# clawdo 🦞
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/clawdo)
|
|
4
|
+
[](https://github.com/LePetitPince/clawdo/actions/workflows/ci.yml)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
[](https://clawhub.com)
|
|
8
|
+
|
|
9
|
+
**Personal task queue with autonomous AI execution** — claw + to-do
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g clawdo
|
|
13
|
+
|
|
14
|
+
# Or via OpenClaw/ClawHub
|
|
15
|
+
clawhub install clawdo
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Your thoughts become tasks. Your agent executes them. You stay in flow.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The Concept
|
|
23
|
+
|
|
24
|
+
Not every task needs your attention. Some things your AI can just do. Some need a ping when done. Some need collaboration. **clawdo** knows the difference.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Quick add
|
|
28
|
+
clawdo add "fix the RSS parser"
|
|
29
|
+
|
|
30
|
+
# What can the agent do right now?
|
|
31
|
+
clawdo next --auto
|
|
32
|
+
|
|
33
|
+
# View tasks
|
|
34
|
+
clawdo list --ready
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
It's a task queue for one human and one AI agent. Not a project manager. Not Jira. A capture tool with autonomous execution.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g clawdo
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Tasks live in `~/.config/clawdo/`
|
|
48
|
+
|
|
49
|
+
**Requirements:**
|
|
50
|
+
- **Node.js ≥ 18**
|
|
51
|
+
- **Build tools** (for better-sqlite3):
|
|
52
|
+
- Debian/Ubuntu: `apt install build-essential python3`
|
|
53
|
+
- macOS: `xcode-select --install`
|
|
54
|
+
- Windows: [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Multi-Agent Setup
|
|
59
|
+
|
|
60
|
+
**Problem:** Multiple agents/sessions accessing the same database?
|
|
61
|
+
|
|
62
|
+
**Solutions:**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Option 1: Environment variable (persistent for session)
|
|
66
|
+
export CLAWDO_DB_PATH=/shared/agent-name.db
|
|
67
|
+
clawdo add "task"
|
|
68
|
+
|
|
69
|
+
# Option 2: --db flag (per-command)
|
|
70
|
+
clawdo --db /shared/agent-name.db add "task"
|
|
71
|
+
|
|
72
|
+
# Option 3: Shared database (SQLite WAL mode supports concurrent access)
|
|
73
|
+
export CLAWDO_DB_PATH=/shared/team.db
|
|
74
|
+
# Multiple agents can read simultaneously + 1 writer
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Default:** `~/.config/clawdo/clawdo.db` (single user)
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Security & Trust
|
|
82
|
+
|
|
83
|
+
**Provenance Enabled:** This package is published with [npm provenance](https://docs.npmjs.com/generating-provenance-statements), providing cryptographic proof that it was built by GitHub Actions, not a human laptop.
|
|
84
|
+
|
|
85
|
+
**Pinned Dependencies:** All dependencies use exact versions (no `^` caret) to ensure reproducible builds and prevent unexpected breaking changes.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Add a task
|
|
93
|
+
clawdo add "write documentation"
|
|
94
|
+
|
|
95
|
+
# List all tasks
|
|
96
|
+
clawdo list
|
|
97
|
+
|
|
98
|
+
# Mark a task as done
|
|
99
|
+
clawdo done abc123
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Usage
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Add a task (minimal friction)
|
|
108
|
+
clawdo add "update dependencies"
|
|
109
|
+
clawdo add "fix typo in README"
|
|
110
|
+
|
|
111
|
+
# With inline metadata (optional)
|
|
112
|
+
clawdo add "integrate search +api @code soon" # project, context, urgency
|
|
113
|
+
|
|
114
|
+
# With flags (precise control)
|
|
115
|
+
clawdo add "refactor auth" --level auto --urgency now --project backend
|
|
116
|
+
|
|
117
|
+
# What should I do next?
|
|
118
|
+
clawdo next # highest priority task
|
|
119
|
+
clawdo next --auto # next auto-executable task
|
|
120
|
+
|
|
121
|
+
# View tasks
|
|
122
|
+
clawdo list # active tasks (status=todo)
|
|
123
|
+
clawdo list --project api # filter by project
|
|
124
|
+
clawdo list --level auto # what can agent do?
|
|
125
|
+
clawdo list --ready # unblocked, actionable tasks
|
|
126
|
+
|
|
127
|
+
# Mark complete
|
|
128
|
+
clawdo done <id>
|
|
129
|
+
clawdo done # complete all in-progress tasks
|
|
130
|
+
|
|
131
|
+
# Agent proposes a task
|
|
132
|
+
clawdo propose "add tests for auth" --project backend --urgency soon
|
|
133
|
+
|
|
134
|
+
# View full details
|
|
135
|
+
clawdo show <id>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Autonomy Levels
|
|
141
|
+
|
|
142
|
+
| Level | Max Time | Max Tokens | Sub-agents | Notification | Use Case |
|
|
143
|
+
|-------|----------|------------|------------|--------------|----------|
|
|
144
|
+
| **auto** | 10 min | 50K | ❌ | None | Trivial + single-session work (grep, fix typo, run tests) |
|
|
145
|
+
| **auto-notify** | 30 min | 150K | ✅ (1 max) | On completion | Multi-step work (research, refactor) |
|
|
146
|
+
| **collab** | No limit | No limit | ✅ | Real-time | Complex/risky work |
|
|
147
|
+
|
|
148
|
+
Default: `collab` (safe)
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Urgency
|
|
153
|
+
|
|
154
|
+
| Urgency | Meaning |
|
|
155
|
+
|---------|---------|
|
|
156
|
+
| **now** | Drop everything. Do this next. |
|
|
157
|
+
| **soon** | In the next day or two. |
|
|
158
|
+
| **whenever** | No rush. Pick it up when idle. |
|
|
159
|
+
| **someday** | Backlog. Nice to have. May never happen. |
|
|
160
|
+
|
|
161
|
+
Default: `whenever`
|
|
162
|
+
|
|
163
|
+
Optional: set a hard `--due YYYY-MM-DD` for calendar-bound tasks.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Inline Syntax (Optional)
|
|
168
|
+
|
|
169
|
+
Quick metadata in natural language:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
clawdo add "fix auth bug +backend @code auto soon"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Parsed:
|
|
176
|
+
- `+word` → project (+ prefix is auto-added if omitted in flags)
|
|
177
|
+
- `@word` → context (@ prefix is auto-added if omitted in flags)
|
|
178
|
+
- `auto` / `auto-notify` / `collab` → autonomy level
|
|
179
|
+
- `now` / `soon` / `whenever` / `someday` → urgency
|
|
180
|
+
- `due:YYYY-MM-DD` or `due:tomorrow` → due date
|
|
181
|
+
|
|
182
|
+
If parsing fails → stored verbatim, no questions asked.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Task Actions
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
clawdo show <id> # show full task details
|
|
190
|
+
clawdo done <id> # mark complete
|
|
191
|
+
clawdo done # mark all in-progress tasks as complete
|
|
192
|
+
clawdo start <id> # mark in progress
|
|
193
|
+
clawdo edit <id> --urgency now # change metadata
|
|
194
|
+
clawdo edit <id> --text "new text" # update description
|
|
195
|
+
clawdo confirm <id> # approve agent proposal
|
|
196
|
+
clawdo reject <id> --reason "why" # reject with explanation
|
|
197
|
+
clawdo archive <id> # soft delete
|
|
198
|
+
clawdo note <id> "notes here" # append notes
|
|
199
|
+
|
|
200
|
+
# Dependencies (both syntaxes work)
|
|
201
|
+
clawdo block <id> <blocker-id> # set blocker
|
|
202
|
+
clawdo block <id> by <blocker-id> # set blocker (alternative syntax)
|
|
203
|
+
clawdo unblock <id> # clear blocker
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Agent Integration
|
|
209
|
+
|
|
210
|
+
### Agent-Proposed Tasks
|
|
211
|
+
|
|
212
|
+
Tasks added by the agent go to `proposed` status. Human must confirm before they enter the active queue:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
clawdo list --status proposed # see proposals
|
|
216
|
+
clawdo confirm <id> # approve
|
|
217
|
+
clawdo reject <id> # decline
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Inbox (Agent Interface)
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
clawdo inbox # human-readable markdown
|
|
224
|
+
clawdo inbox --format json # structured JSON for agents
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Returns categorized tasks: auto-ready, urgent, overdue, proposed, blocked, stale.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Stats & History
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
clawdo stats # summary counts
|
|
235
|
+
clawdo history <id> # full task history with current status
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Configuration
|
|
241
|
+
|
|
242
|
+
Lives in `~/.config/clawdo/`
|
|
243
|
+
|
|
244
|
+
Database: `~/.config/clawdo/clawdo.db` (SQLite with WAL mode)
|
|
245
|
+
Audit log: `~/.config/clawdo/audit.jsonl` (append-only)
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Security
|
|
250
|
+
|
|
251
|
+
### Input Sanitization
|
|
252
|
+
All task text is sanitized on creation:
|
|
253
|
+
- Control characters stripped
|
|
254
|
+
- Prompt injection patterns filtered (`SYSTEM MESSAGE`, `IGNORE PREVIOUS`, etc.)
|
|
255
|
+
- Length limits enforced (1000 chars for text, 5000 for notes)
|
|
256
|
+
- Cryptographically secure ID generation
|
|
257
|
+
|
|
258
|
+
### Audit Trail
|
|
259
|
+
Every action logged with:
|
|
260
|
+
- Timestamp
|
|
261
|
+
- Actor (human/agent)
|
|
262
|
+
- Task ID
|
|
263
|
+
- Session details
|
|
264
|
+
- Tools used
|
|
265
|
+
|
|
266
|
+
Audit log is append-only (set with `chattr +a` on Linux).
|
|
267
|
+
|
|
268
|
+
### File Permissions
|
|
269
|
+
- Config directory: `700` (owner only)
|
|
270
|
+
- Database: `600` (owner read/write)
|
|
271
|
+
- Audit log: `600` (owner read/write)
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Troubleshooting
|
|
276
|
+
|
|
277
|
+
**"Database locked"**
|
|
278
|
+
- Another process is accessing the database. Check for stale locks.
|
|
279
|
+
- WAL mode should prevent this — report if it persists.
|
|
280
|
+
|
|
281
|
+
**"Permission denied" on ~/.config/clawdo/**
|
|
282
|
+
- Run `chmod 700 ~/.config/clawdo` and `chmod 600 ~/.config/clawdo/clawdo.db`
|
|
283
|
+
|
|
284
|
+
**Agent proposals not showing up**
|
|
285
|
+
- Check: `clawdo list --status proposed`
|
|
286
|
+
- Agent-added tasks require explicit confirmation
|
|
287
|
+
|
|
288
|
+
**Build errors during installation**
|
|
289
|
+
- better-sqlite3 requires native build tools
|
|
290
|
+
- Install build essentials for your platform (see Install section above)
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Development
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
git clone https://github.com/LePetitPince/clawdo.git
|
|
298
|
+
cd clawdo
|
|
299
|
+
npm install
|
|
300
|
+
npm run build
|
|
301
|
+
npm test
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## License
|
|
307
|
+
|
|
308
|
+
MIT
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
*Built by [LePetitPince](https://github.com/LePetitPince) 🌹*
|