@openmuster/muster 0.3.1-alpha.4 → 0.3.1-alpha.5
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 +10 -6
- package/dist/{args-9ZZDcPxa.js → args-CaFBa2IP.js} +305 -23
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +67 -18
- package/dist/index.js +106 -41
- package/dist/inspect/app.js +49 -26
- package/dist/{main-Doit2DDY.js → main-BeEB08iI.js} +158 -8
- package/dist/main-CLzQkYeG.js +6 -0
- package/dist/mcp-CAAZRJgv.js +6 -0
- package/dist/{module-DjDMSEKu.js → module-BX2IjSiv.js} +2 -2
- package/dist/{module-D8qcE3e7.js → module-D9KdbEpS.js} +1 -1
- package/dist/skills/board/SKILL.md +5 -0
- package/dist/{steps-BUPRIOe3.js → steps-FNDWY1P_.js} +16 -4
- package/docs/01-concepts/09-watchers.md +4 -32
- package/docs/01-concepts/10-schedules.md +1 -1
- package/docs/01-concepts/11-access.md +19 -3
- package/docs/01-concepts/13-budgets.md +66 -3
- package/docs/01-concepts/15-outgoing-webhooks.md +6 -19
- package/docs/01-concepts/16-workflows.md +22 -2
- package/docs/01-quickstart.md +74 -45
- package/docs/02-sync/01-overview.md +34 -2
- package/docs/02-sync/02-github.md +40 -19
- package/docs/02-sync/03-linear.md +103 -85
- package/docs/02-sync/04-slack.md +116 -111
- package/docs/02-sync/05-notion.md +46 -25
- package/docs/03-guides/01-coding-agents.md +51 -33
- package/docs/03-guides/02-swarm.md +30 -15
- package/docs/03-guides/03-factory.md +193 -80
- package/docs/03-guides/04-inspector.md +73 -42
- package/docs/03-guides/05-running-agents.md +62 -35
- package/docs/03-guides/06-sandboxed-agents.md +488 -305
- package/docs/03-guides/07-build-a-ui.md +86 -31
- package/docs/03-guides/08-ci.md +59 -36
- package/docs/03-guides/09-daemon.md +121 -53
- package/docs/03-guides/10-two-agents.md +31 -22
- package/docs/03-guides/11-person-in-the-loop.md +47 -34
- package/docs/03-guides/12-unattended.md +46 -27
- package/docs/03-guides/13-terminals.md +51 -39
- package/docs/03-guides/14-no-cloud.md +31 -19
- package/docs/03-guides/15-several-boards.md +61 -27
- package/docs/03-guides/16-non-code.md +29 -18
- package/docs/03-guides/17-mcp.md +37 -30
- package/docs/03-guides/18-a-board-on-a-server.md +66 -43
- package/docs/03-guides/19-a-card-queue.md +210 -121
- package/docs/03-guides/20-a-feedback-loop.md +298 -134
- package/docs/03-guides/21-running-the-loop.md +94 -64
- package/docs/03-guides/22-building-from-linear.md +81 -57
- package/docs/04-reference/01-cli.md +7 -0
- package/docs/04-reference/02-handle.md +10 -15
- package/docs/04-reference/03-http.md +1 -1
- package/docs/04-reference/04-events.md +2 -1
- package/docs/04-reference/05-errors.md +3 -0
- package/docs/04-reference/08-files.md +49 -0
- package/docs/index.md +1 -0
- package/package.json +1 -1
- package/dist/main-D5aX7Jaj.js +0 -6
- package/dist/mcp-Cm96TIb3.js +0 -6
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Running agents
|
|
3
|
-
description: For handing a task, or a whole queue, to Claude Code, Codex or any command. mu run
|
|
3
|
+
description: For handing a task, or a whole queue, to Claude Code, Codex or any command. You end with mu run claiming the work, starting the agent in a clean environment, keeping the claim alive, and recording how it ended and what it cost.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Run an agent on one task
|
|
7
|
+
|
|
8
|
+
Give `mu run` a task ID and an agent, or any command after `--`:
|
|
7
9
|
|
|
8
10
|
```bash
|
|
9
11
|
mu run 12 --agent claude --cwd ~/code/web --as worker-1
|
|
@@ -11,48 +13,68 @@ mu run 12 --agent codex --cwd ~/code/web --as worker-2
|
|
|
11
13
|
mu run 12 --cwd ~/code/web -- ./my-agent --fast
|
|
12
14
|
```
|
|
13
15
|
|
|
14
|
-
`mu run` claims the task
|
|
15
|
-
|
|
16
|
-
`cost`, `tokens`, `session`,
|
|
16
|
+
`mu run` [claims](../01-concepts/08-tasks.md#claims) the task and starts the
|
|
17
|
+
agent in its own process group. It renews the claim while the agent works.
|
|
18
|
+
It records what the agent reported on the task: `cost`, `tokens`, `session`,
|
|
19
|
+
`agent`.
|
|
20
|
+
|
|
21
|
+
## Work through a queue
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
Add `--ready` and `--loop` to take the tasks in a channel one after another:
|
|
19
24
|
|
|
20
25
|
```bash
|
|
21
26
|
mu run --ready work/ --loop --agent claude --as worker-1
|
|
22
27
|
mu run --ready work/ --loop --agent claude --budget 5 --wait 10m
|
|
23
28
|
```
|
|
24
29
|
|
|
25
|
-
`--loop` takes one ready task after another, a fresh agent for each
|
|
26
|
-
nothing
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
`--loop` takes one ready task after another, with a fresh agent for each. It
|
|
31
|
+
stops when nothing has been ready for as long as `--wait` says. It stops at
|
|
32
|
+
once in these cases:
|
|
33
|
+
|
|
34
|
+
- on a usage limit or a sign-in error
|
|
35
|
+
- when its own `--budget` is spent (`--budget 5` is $5)
|
|
36
|
+
- when the board's [budget](../01-concepts/13-budgets.md) for the channel is
|
|
37
|
+
spent
|
|
29
38
|
|
|
30
39
|
## What the agent is told
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
The agent gets a pointer to the task, never the task's text. The pointer
|
|
42
|
+
says:
|
|
43
|
+
|
|
44
|
+
- which task it holds
|
|
45
|
+
- how to read it
|
|
46
|
+
- how to log its work
|
|
47
|
+
- how to [settle](../01-concepts/08-tasks.md#settling) it
|
|
48
|
+
|
|
49
|
+
The agent reads the thread itself with `mu read`.
|
|
34
50
|
|
|
35
51
|
## What the agent starts with
|
|
36
52
|
|
|
53
|
+
Each agent `mu run` starts gets:
|
|
54
|
+
|
|
37
55
|
- **A clean environment:** `PATH`, `HOME`, what that agent's own sign-in
|
|
38
56
|
needs, the board's variables, and what you pass with `--env K=V`. Secrets in
|
|
39
57
|
your shell don't reach it by accident.
|
|
40
|
-
- **Permissions on
|
|
41
|
-
skip-permissions flag, and
|
|
42
|
-
is the other way round: see
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- **
|
|
58
|
+
- **Permissions on:** `--bypass-permissions` turns on the agent's own
|
|
59
|
+
skip-permissions flag, and only when you pass it by name. In a cloud
|
|
60
|
+
sandbox it is the other way round: see
|
|
61
|
+
[Sandboxed agents](./06-sandboxed-agents.md).
|
|
62
|
+
- **Claude Code starts lean.** It gets a shell and file tools, without your
|
|
63
|
+
plugins, skills and connected tools. `--full` loads everything.
|
|
64
|
+
- **Codex gets a writable sandbox.** It covers its working folder and the
|
|
65
|
+
board's.
|
|
66
|
+
- **A worktree of its own, if you ask:** `--worktree <repo> --branch <name>`
|
|
47
67
|
makes `--cwd` a git worktree on a new branch.
|
|
48
68
|
|
|
49
69
|
## How it ends
|
|
50
70
|
|
|
71
|
+
What happens to the task depends on how the agent ends:
|
|
72
|
+
|
|
51
73
|
| The agent | The task |
|
|
52
74
|
| --- | --- |
|
|
53
75
|
| Settles it (complete, fail, block) | Is as the agent left it |
|
|
54
76
|
| Ends without settling it | Fails: "the agent ended without settling the task" |
|
|
55
|
-
|
|
|
77
|
+
| Reaches a usage limit or gets a sign-in error | Fails, without counting as a failed attempt. `mu tasks reopen` readies it again |
|
|
56
78
|
| Runs out of `--timeout` | Fails: "the agent ran out of time". Everything it started is stopped |
|
|
57
79
|
| Can't be started | Is released |
|
|
58
80
|
| Is stopped (Ctrl-C, SIGTERM) | Is released |
|
|
@@ -60,26 +82,31 @@ to settle it. Never the task's text. It reads the thread itself with `mu read`.
|
|
|
60
82
|
## Picking up where it left off
|
|
61
83
|
|
|
62
84
|
An agent that worked a task before resumes its own session, from the `session`
|
|
63
|
-
label. `--fresh` starts clean, and so does a different agent.
|
|
64
|
-
agent no longer has, such as one left in a cloud sandbox that is gone, is
|
|
65
|
-
forgotten and the agent starts again fresh at once, under the same claim: the
|
|
66
|
-
task counts no failed attempt. A session you name with `--resume` that the
|
|
67
|
-
agent doesn't have fails the run instead, and is not remembered.
|
|
85
|
+
label. `--fresh` starts clean, and so does a different agent.
|
|
68
86
|
|
|
69
|
-
|
|
87
|
+
The agent may no longer have that session, such as one left in a cloud
|
|
88
|
+
sandbox that is gone. Then `mu run` forgets it and starts the agent fresh at
|
|
89
|
+
once, under the same claim: the task counts no failed attempt. A session you
|
|
90
|
+
name with `--resume` that the agent doesn't have fails the run instead, and
|
|
91
|
+
`mu run` doesn't record it.
|
|
92
|
+
|
|
93
|
+
## Run your own agent command
|
|
70
94
|
|
|
71
95
|
Anything that reads a prompt on stdin works after `--`. It gets the task's ID
|
|
72
|
-
in `MUSTER_TASK` and its profile in
|
|
96
|
+
in `MUSTER_TASK` and its [profile](../01-concepts/06-actors.md) in
|
|
97
|
+
`MUSTER_PROFILE`. With no usage to read,
|
|
73
98
|
muster records how it exited and nothing else.
|
|
74
99
|
|
|
75
|
-
## When not to
|
|
100
|
+
## When not to run an agent this way
|
|
101
|
+
|
|
102
|
+
Use something else for:
|
|
76
103
|
|
|
77
|
-
- **
|
|
78
|
-
|
|
104
|
+
- **An agent you don't trust with your machine:** here it runs as you, with
|
|
105
|
+
your files and your network. Give it a
|
|
79
106
|
[cloud sandbox](./06-sandboxed-agents.md) instead.
|
|
80
|
-
- **
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- **
|
|
84
|
-
stops it. Give it a `--timeout`. See
|
|
107
|
+
- **A step that is only a command:** a test run, say, with nothing to decide.
|
|
108
|
+
`mu tasks run <id> -- pnpm test` settles the task by its exit code, with no
|
|
109
|
+
agent.
|
|
110
|
+
- **A budget as the only limit on Codex:** Codex reports no cost, so a budget
|
|
111
|
+
never stops it. Give it a `--timeout`. See
|
|
85
112
|
[Budgets](../01-concepts/13-budgets.md).
|