cruo-agent 0.1.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/README.md +93 -0
- package/dist/VERSION +1 -0
- package/dist/cli.js +47024 -0
- package/dist/index.js +54479 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# cruo-agent
|
|
2
|
+
|
|
3
|
+
Run a Cruo agent. It watches your board, picks up the cards you assign it, and
|
|
4
|
+
works them — on your machine, under your own Claude account.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx cruo-agent login cruo_pat_… # the token Cruo showed you once
|
|
8
|
+
npx cruo-agent --dry-run # what would it pick up? starts no model
|
|
9
|
+
npx cruo-agent # let it work
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What this actually is
|
|
13
|
+
|
|
14
|
+
Three things people tend to run together, kept apart because they fail
|
|
15
|
+
differently:
|
|
16
|
+
|
|
17
|
+
- **The agent** is a member of your workspace — a row and a token. It signs in
|
|
18
|
+
to nothing, and nothing runs because it exists.
|
|
19
|
+
- **The supervisor** is this program. It watches the board with a plain database
|
|
20
|
+
query, so sitting idle costs nothing, and starts a harness when there is work.
|
|
21
|
+
- **The harness** is Claude Code, started fresh for one card and gone when that
|
|
22
|
+
card is done. Nothing carries over between cards but the board itself.
|
|
23
|
+
|
|
24
|
+
Cruo runs no model of its own and never bills you for inference.
|
|
25
|
+
|
|
26
|
+
## Getting a token
|
|
27
|
+
|
|
28
|
+
Cruo → Settings → Members → **Add an agent**. The token is shown once; Cruo
|
|
29
|
+
stores a hash. If you lose it, issue another from the key button on its row.
|
|
30
|
+
|
|
31
|
+
Then assign the agent a card. That is the whole of the setup — an agent is a
|
|
32
|
+
member, so it appears in the assignee list like anyone else.
|
|
33
|
+
|
|
34
|
+
## Where the token comes from
|
|
35
|
+
|
|
36
|
+
In order: `CRUO_TOKEN` in the environment, then `--token`, then whatever
|
|
37
|
+
`cruo login` stored in `~/.cruo/config.json` (mode 0600).
|
|
38
|
+
|
|
39
|
+
**There is no `cruo <token>` form on purpose.** A credential in a positional
|
|
40
|
+
argument shows up in `ps` output, where every other user on the machine can read
|
|
41
|
+
it, and in your shell history, where it stays. `--token` is there for a CI
|
|
42
|
+
runner that injects secrets its own way, and it warns.
|
|
43
|
+
|
|
44
|
+
## Letting it write code
|
|
45
|
+
|
|
46
|
+
By default the harness gets the board and nothing else, which is right for an
|
|
47
|
+
agent whose work is judgement over your issues. An agent that writes code needs
|
|
48
|
+
a checkout and the tools to use it:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx cruo-agent --worktree --allow 'mcp__cruo,Read,Glob,Grep,Edit,Write,Bash(git:*)'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`--worktree` gives every card its own checkout, cut fresh from `origin/main` —
|
|
55
|
+
never the tree you are working in, and never whatever you have half-finished. It
|
|
56
|
+
carries tracked files only, so an agent cannot read a `.env` you have not
|
|
57
|
+
committed. When the run ends the checkout is deleted and the branch survives.
|
|
58
|
+
|
|
59
|
+
Run it from the repository the agent should work on. If that repository needs
|
|
60
|
+
installing before its tests will run, add `--prepare 'npm ci'` or whatever your
|
|
61
|
+
equivalent is — a fresh checkout has your source and none of your dependencies.
|
|
62
|
+
|
|
63
|
+
## Common options
|
|
64
|
+
|
|
65
|
+
| flag | |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `--once` | one pass, then exit |
|
|
68
|
+
| `--dry-run` | show what it would pick up; starts no model |
|
|
69
|
+
| `--limit <n>` | work at most n issues this pass |
|
|
70
|
+
| `--interval <seconds>` | how often to poll (default 20) |
|
|
71
|
+
| `--worktree` | a checkout per card |
|
|
72
|
+
| `--allow <tools>` | what the harness may use |
|
|
73
|
+
| `--push` | publish the branch after a run that commits |
|
|
74
|
+
| `--harness-timeout <seconds>` | kill a run that wedges (default 600) |
|
|
75
|
+
| `--max-attempts <n>` | give up on a card after n unproductive runs (default 3) |
|
|
76
|
+
|
|
77
|
+
The full list, and what each is for: <https://cruo.space/agents>
|
|
78
|
+
|
|
79
|
+
## Running it somewhere that is not your laptop
|
|
80
|
+
|
|
81
|
+
The same command works on a server, and that machine needs no privileged access
|
|
82
|
+
to Cruo: the supervisor trades its token for a short-lived session, so the only
|
|
83
|
+
secret on the box is the agent's own token — scoped to one workspace, in one
|
|
84
|
+
product, revocable from Settings.
|
|
85
|
+
|
|
86
|
+
The harness still runs under your Claude account, on that box.
|
|
87
|
+
|
|
88
|
+
## The name
|
|
89
|
+
|
|
90
|
+
The package is `cruo-agent`; the command it installs is `cruo`. npm refuses the
|
|
91
|
+
bare name as too close to `cron` and `crc`, and a bin's name is independent of
|
|
92
|
+
its package's — so `npm i -g cruo-agent` gives you `cruo`, and `npx cruo-agent`
|
|
93
|
+
works without one.
|
package/dist/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.0
|