@openmuster/muster 0.3.1-alpha.4 → 0.3.1-alpha.6

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 (58) hide show
  1. package/README.md +11 -7
  2. package/dist/{args-9ZZDcPxa.js → args-CaFBa2IP.js} +305 -23
  3. package/dist/cli.js +3 -3
  4. package/dist/index.d.ts +98 -19
  5. package/dist/index.js +107 -42
  6. package/dist/inspect/app.js +49 -26
  7. package/dist/{main-Doit2DDY.js → main-3kE64MlN.js} +195 -12
  8. package/dist/main-o4m_lGDG.js +6 -0
  9. package/dist/mcp-D6Xt2ixk.js +6 -0
  10. package/dist/{module-DjDMSEKu.js → module-BX2IjSiv.js} +2 -2
  11. package/dist/{module-D8qcE3e7.js → module-D9KdbEpS.js} +1 -1
  12. package/dist/skills/board/SKILL.md +5 -0
  13. package/dist/skills/loop-card/SKILL.md +22 -3
  14. package/dist/{steps-BUPRIOe3.js → steps-cnWo2Wvx.js} +299 -12
  15. package/docs/01-concepts/09-watchers.md +4 -32
  16. package/docs/01-concepts/10-schedules.md +1 -1
  17. package/docs/01-concepts/11-access.md +19 -3
  18. package/docs/01-concepts/13-budgets.md +66 -3
  19. package/docs/01-concepts/15-outgoing-webhooks.md +6 -19
  20. package/docs/01-concepts/16-workflows.md +42 -2
  21. package/docs/01-quickstart.md +74 -45
  22. package/docs/02-sync/01-overview.md +34 -2
  23. package/docs/02-sync/02-github.md +40 -19
  24. package/docs/02-sync/03-linear.md +103 -85
  25. package/docs/02-sync/04-slack.md +116 -111
  26. package/docs/02-sync/05-notion.md +46 -25
  27. package/docs/03-guides/01-coding-agents.md +51 -33
  28. package/docs/03-guides/02-swarm.md +30 -15
  29. package/docs/03-guides/03-factory.md +193 -80
  30. package/docs/03-guides/04-inspector.md +73 -42
  31. package/docs/03-guides/05-running-agents.md +62 -35
  32. package/docs/03-guides/06-sandboxed-agents.md +535 -305
  33. package/docs/03-guides/07-build-a-ui.md +86 -31
  34. package/docs/03-guides/08-ci.md +59 -36
  35. package/docs/03-guides/09-daemon.md +121 -53
  36. package/docs/03-guides/10-two-agents.md +31 -22
  37. package/docs/03-guides/11-person-in-the-loop.md +47 -34
  38. package/docs/03-guides/12-unattended.md +46 -27
  39. package/docs/03-guides/13-terminals.md +51 -39
  40. package/docs/03-guides/14-no-cloud.md +31 -19
  41. package/docs/03-guides/15-several-boards.md +61 -27
  42. package/docs/03-guides/16-non-code.md +29 -18
  43. package/docs/03-guides/17-mcp.md +37 -30
  44. package/docs/03-guides/18-a-board-on-a-server.md +66 -43
  45. package/docs/03-guides/19-a-card-queue.md +210 -121
  46. package/docs/03-guides/20-a-feedback-loop.md +412 -135
  47. package/docs/03-guides/21-running-the-loop.md +94 -64
  48. package/docs/03-guides/22-building-from-linear.md +100 -63
  49. package/docs/04-reference/01-cli.md +7 -0
  50. package/docs/04-reference/02-handle.md +11 -15
  51. package/docs/04-reference/03-http.md +1 -1
  52. package/docs/04-reference/04-events.md +2 -1
  53. package/docs/04-reference/05-errors.md +6 -0
  54. package/docs/04-reference/08-files.md +49 -0
  55. package/docs/index.md +1 -0
  56. package/package.json +1 -1
  57. package/dist/main-D5aX7Jaj.js +0 -6
  58. package/dist/mcp-Cm96TIb3.js +0 -6
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  title: The inspector
3
- description: For watching a board and acting on it from a browser on your machine. mu inspect opens a local page with tasks by state, channels, threads and live activity, where you can post, reply, start tasks and approve requests to join.
3
+ description: For people who want to watch a board and act on it from a browser on their own machine. You end with a local page from mu inspect that shows tasks by state, channels, threads and live activity, where you can post, reply, start tasks and approve requests to join.
4
4
  ---
5
5
 
6
- ## Open it
6
+ ## Open the inspector
7
+
8
+ Open the inspector, or a demo of it:
7
9
 
8
10
  ```bash
9
11
  mu inspect
@@ -11,42 +13,67 @@ mu inspect --port 4500 --no-open
11
13
  mu demo
12
14
  ```
13
15
 
14
- `mu inspect` opens the board in a browser. `mu demo` opens it on a scratch
15
- board and plays a run through every state, so you can watch one happen.
16
+ `mu inspect` opens the board in a browser. `--port 4500` serves it on port
17
+ 4500, and `--no-open` doesn't open a browser. `mu demo` opens the page on a
18
+ scratch board and plays a run through every state, so you can watch one
19
+ happen.
16
20
 
17
21
  ## What it shows
18
22
 
19
- - **Tasks**, by state: open, waiting, ready, claimed, blocked, completed,
23
+ The page shows:
24
+
25
+ - **Tasks by state:** open, waiting, ready, claimed, blocked, completed,
20
26
  failed, canceled, all. Each row has the task's labels, who holds it and how
21
- long the lease has left, what it waits for, or why it is held.
22
- - **Channels**, and the threads in each.
23
- - **Activity**: the newest events on the board.
24
- - **A thread pane** for any task or thread, with its labels and files.
25
- - **A composer**: post in a channel, reply in a thread, or start a task. The
26
- "as" field at the foot of the sidebar picks the profile you write as.
27
- - **Requests to join**: agents that asked for a token with `mu join`, each
27
+ long the [lease](../01-concepts/08-tasks.md#claims) has left, what it waits
28
+ for, or why it is [held](../01-concepts/08-tasks.md#states).
29
+ - **Channels:** each with its threads.
30
+ - **Activity:** the newest events on the board, each with its clock time.
31
+ - **A thread pane:** any task or thread, with its labels and files in full,
32
+ the whole date of each message, and who holds a task and until when.
33
+ - **A composer:** post in a channel, reply in a thread, or start a task. The
34
+ "as" field at the foot of the sidebar picks the
35
+ [profile](../01-concepts/06-actors.md) you write as.
36
+ - **Requests to join:** agents that asked for a token with `mu join`, each
28
37
  with its code and note. Approve one with a channel, its permissions and how
29
38
  long the token lasts, or deny it. See
30
39
  [Access](../01-concepts/11-access.md#let-an-agent-ask-to-join).
31
40
 
32
- It follows the board live. The view is in the URL, so a link opens the same
33
- place.
41
+ The page updates live as the board changes. The view is in the URL, so a link
42
+ opens the same place.
34
43
 
35
44
  Every view is a link: Tab reaches it, Enter opens it, and it opens in a new
36
- tab when you ask for one. Enter opens a row too. On a phone the sidebar is
37
- behind the menu button and a thread takes the whole screen; on a tablet a
38
- thread lies over the list.
39
-
40
- ## Notifications
41
-
42
- Press **notify me of mentions** in the sidebar and allow it, and the page
43
- shows a notification for each new message that mentions you, while it is
44
- open, in a background tab too. A mention of you is what `mu inbox` counts
45
- as one with no `--as`: `@` and your own handle, from anyone but you. A
46
- mention of a profile, such as the one in the "as" field, isn't one. What
47
- you write from the page, as any profile, never notifies you. Click a
45
+ tab when you ask for one. Enter opens a row too.
46
+
47
+ ## Work through a list from the keyboard
48
+
49
+ In tasks and activity, these keys move through the list one row at a time:
50
+
51
+ | Key | What it does |
52
+ | --- | --- |
53
+ | `j` or `↓` | Moves to the next row |
54
+ | `k` or `↑` | Moves to the previous row |
55
+ | `Enter` | Opens the thread of the row you are on |
56
+ | `Esc` | Closes the list of keys, the menu or the thread, in that order. Closing a thread puts you back on the row you opened it from |
57
+ | `?` | Shows every key |
58
+
59
+ While you type in the composer or the "as" field, every key is text and none
60
+ of these work. A key held with Cmd, Ctrl or Alt is left to the browser.
61
+
62
+ On a phone the sidebar is behind the menu button and a thread takes the whole
63
+ screen. On a tablet a thread opens over the list.
64
+
65
+ ## Get notified of mentions
66
+
67
+ Press **notify me of mentions** in the sidebar and allow notifications. The
68
+ page then shows a notification for each new message that mentions you. It
69
+ does this while the page is open, in a background tab too. Click a
48
70
  notification to open its thread.
49
71
 
72
+ A mention of you is `@` and your own handle, from anyone but you: what
73
+ `mu inbox` counts as a mention with no `--as`. A mention of a profile, such
74
+ as the one in the "as" field, isn't one. What you write from the page, as any
75
+ profile, never notifies you.
76
+
50
77
  The button is only there until you answer. To change your answer later, use
51
78
  the site settings of your browser for the page's address.
52
79
 
@@ -55,34 +82,38 @@ the site settings of your browser for the page's address.
55
82
  The page acts as you, so its server trusts nothing but its own page:
56
83
 
57
84
  - It listens on 127.0.0.1 only and answers only for its own host name.
58
- - Every board request needs a token made for that run. It is in the link
59
- `mu inspect` prints, after the `#`, and nowhere in what the server sends:
60
- anything on your machine can ask 127.0.0.1 for the page, and gets a page
61
- that can do nothing. Open the printed link once and your browser keeps the
62
- token for that address, so links to a view work after that.
85
+ - Every board request needs a token made for that run. The token is in the
86
+ link `mu inspect` prints, after the `#`, and nowhere in what the server
87
+ sends. Anything on your machine can ask 127.0.0.1 for the page, and gets a
88
+ page that can do nothing. Open the printed link once and your browser keeps
89
+ the token for that address, so links to a view work after that.
63
90
  - Writes must come from the page's own origin.
64
91
 
65
92
  Try writes against a scratch board first (`--dir`): on a board with sync, a
66
93
  reply in a mirrored thread reaches people.
67
94
 
68
- ## When not to
95
+ ## When not to use the inspector
96
+
97
+ Use something else for:
69
98
 
70
- - For someone on another machine. The inspector listens on 127.0.0.1 only;
71
- serve the board and give them a token, or
99
+ - **Someone on another machine:** the inspector listens on 127.0.0.1 only.
100
+ Serve the board and give them a token, or
72
101
  [build a page](./07-build-a-ui.md) for them.
73
- - For an agent or a script. `mu read`, `mu wait` and `mu tail` give it the
102
+ - **An agent or a script:** `mu read`, `mu wait` and `mu tail` give it the
74
103
  same board as text.
75
104
 
76
105
  ## What goes wrong
77
106
 
78
- - **"This page needs the link mu inspect printed".** The page was opened
107
+ Each item is the symptom, then the cause and the fix:
108
+
109
+ - **"This page needs the link mu inspect printed":** you opened the page
79
110
  without the token after the `#`, or with one from an earlier
80
111
  `mu inspect`: each run makes a new one. Open the link it printed this time.
81
- - **`The inspector doesn't answer for "<host>"`.** The page was reached
82
- under another host name. Use the printed address.
83
- - **No notifications, though the page asked and you allowed them.** The
84
- operating system has to allow your browser to show notifications too: on
85
- macOS in System Settings, Notifications. Chrome on Android shows none from
86
- a page like this one.
112
+ - **`The inspector doesn't answer for "<host>"`:** you reached the page under
113
+ another host name. Use the printed address.
114
+ - **You get no notifications, though the page asked and you allowed them.**
115
+ The operating system has to allow your browser to show notifications too:
116
+ on macOS in System Settings, Notifications. Chrome on Android shows none
117
+ from a page like this one.
87
118
  - **A notification comes a minute late.** A browser slows a tab it hasn't
88
119
  shown for a while; the page reads the board less often until you look.
@@ -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 claims it, starts the agent in a clean environment, keeps the claim alive, and records how it ended and what it cost.
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
- ## One task
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, starts the agent in its own process group, renews
15
- the claim while it works, and records what the agent reported on the task:
16
- `cost`, `tokens`, `session`, `agent`.
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
- ## A worker
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, until
26
- nothing is ready for as long as `--wait` says. It stops at once on a usage
27
- limit or a sign-in error, when its own `--budget` is spent, and when the
28
- board's [budget](../01-concepts/13-budgets.md) for the channel is.
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
- A pointer: which task it holds, how to read it, how to log its work, and how
33
- to settle it. Never the task's text. It reads the thread itself with `mu read`.
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.** `--bypass-permissions` turns on the agent's own
41
- skip-permissions flag, and is always asked for by name. In a cloud sandbox it
42
- is the other way round: see [Sandboxed agents](./06-sandboxed-agents.md).
43
- - **Claude Code starts lean:** a shell and file tools, without your plugins,
44
- skills and connected tools. `--full` loads everything.
45
- - **Codex gets a writable sandbox** over its working folder and the board's.
46
- - **A worktree of its own,** if you ask: `--worktree <repo> --branch <name>`
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
- | Hits a usage limit or a sign-in error | Fails, without counting against it. `mu tasks reopen` readies it again |
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. A session the
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
- ## Any agent
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 `MUSTER_PROFILE`. With no usage to read,
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
- - **For an agent you don't trust with your machine.** Here it runs as you,
78
- with your files and your network. Give it a
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
- - **For a step that is only a command,** such as a test run, with nothing
81
- to decide. `mu tasks run <id> -- pnpm test` settles the task by its exit
82
- code, with no agent.
83
- - **For a budget alone on Codex.** It reports no cost, so a budget never
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).