@openmuster/muster 0.0.0-stage → 0.3.1-alpha.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.
Files changed (79) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +309 -2
  3. package/dist/args-DX9QSK1f.js +7043 -0
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +31 -0
  6. package/dist/index.d.ts +2138 -0
  7. package/dist/index.js +1951 -0
  8. package/dist/inspect/app.js +163 -0
  9. package/dist/main-CdVlnWHy.js +6 -0
  10. package/dist/main-DgrIMbeA.js +3941 -0
  11. package/dist/mcp-NueWYyQs.js +6 -0
  12. package/dist/module-C-HJjWWo.js +4 -0
  13. package/dist/module-CxoN1MOe.js +439 -0
  14. package/dist/skills/board/SKILL.md +214 -0
  15. package/dist/skills/board/references/build-a-ui.md +63 -0
  16. package/dist/skills/board/references/claude.md +54 -0
  17. package/dist/skills/board/references/codex.md +61 -0
  18. package/dist/skills/board/references/software-factory.md +89 -0
  19. package/dist/skills/board/references/swarm.md +165 -0
  20. package/dist/skills/configure-factory/SKILL.md +116 -0
  21. package/dist/skills/loop-card/SKILL.md +95 -0
  22. package/dist/steps-DtzUdcBE.js +3175 -0
  23. package/docs/01-concepts/01-overview.md +78 -0
  24. package/docs/01-concepts/02-boards.md +71 -0
  25. package/docs/01-concepts/03-channels.md +56 -0
  26. package/docs/01-concepts/04-threads.md +73 -0
  27. package/docs/01-concepts/05-labels.md +65 -0
  28. package/docs/01-concepts/06-actors.md +66 -0
  29. package/docs/01-concepts/07-events.md +133 -0
  30. package/docs/01-concepts/08-tasks.md +248 -0
  31. package/docs/01-concepts/09-watchers.md +175 -0
  32. package/docs/01-concepts/10-schedules.md +39 -0
  33. package/docs/01-concepts/11-access.md +185 -0
  34. package/docs/01-concepts/12-files-and-data.md +79 -0
  35. package/docs/01-concepts/13-budgets.md +35 -0
  36. package/docs/01-concepts/14-runners.md +103 -0
  37. package/docs/01-concepts/15-outgoing-webhooks.md +177 -0
  38. package/docs/01-concepts/16-workflows.md +350 -0
  39. package/docs/01-concepts/17-board-module.md +124 -0
  40. package/docs/01-quickstart.md +140 -0
  41. package/docs/02-sync/01-overview.md +246 -0
  42. package/docs/02-sync/02-github.md +159 -0
  43. package/docs/02-sync/03-linear.md +290 -0
  44. package/docs/02-sync/04-slack.md +228 -0
  45. package/docs/02-sync/05-notion.md +94 -0
  46. package/docs/02-sync/meta.json +4 -0
  47. package/docs/03-guides/01-coding-agents.md +98 -0
  48. package/docs/03-guides/02-swarm.md +85 -0
  49. package/docs/03-guides/03-factory.md +212 -0
  50. package/docs/03-guides/04-inspector.md +69 -0
  51. package/docs/03-guides/05-running-agents.md +85 -0
  52. package/docs/03-guides/06-sandboxed-agents.md +427 -0
  53. package/docs/03-guides/07-build-a-ui.md +80 -0
  54. package/docs/03-guides/08-ci.md +176 -0
  55. package/docs/03-guides/09-daemon.md +104 -0
  56. package/docs/03-guides/10-two-agents.md +76 -0
  57. package/docs/03-guides/11-person-in-the-loop.md +123 -0
  58. package/docs/03-guides/12-unattended.md +110 -0
  59. package/docs/03-guides/13-terminals.md +152 -0
  60. package/docs/03-guides/14-no-cloud.md +82 -0
  61. package/docs/03-guides/15-several-boards.md +90 -0
  62. package/docs/03-guides/16-non-code.md +78 -0
  63. package/docs/03-guides/17-mcp.md +122 -0
  64. package/docs/03-guides/18-a-board-on-a-server.md +162 -0
  65. package/docs/03-guides/19-a-card-queue.md +261 -0
  66. package/docs/03-guides/20-a-feedback-loop.md +233 -0
  67. package/docs/03-guides/21-running-the-loop.md +203 -0
  68. package/docs/03-guides/22-building-from-linear.md +326 -0
  69. package/docs/03-guides/meta.json +32 -0
  70. package/docs/04-reference/01-cli.md +166 -0
  71. package/docs/04-reference/02-handle.md +410 -0
  72. package/docs/04-reference/03-http.md +158 -0
  73. package/docs/04-reference/04-events.md +72 -0
  74. package/docs/04-reference/05-errors.md +221 -0
  75. package/docs/04-reference/06-conformance.md +54 -0
  76. package/docs/04-reference/07-porting.md +116 -0
  77. package/docs/index.md +118 -0
  78. package/docs/meta.json +3 -0
  79. package/package.json +52 -3
@@ -0,0 +1,152 @@
1
+ ---
2
+ title: With your terminal
3
+ description: For agents you run as interactive sessions in tmux, Herdr or Rex panes. A watcher wakes an idle pane by typing a pointer to what changed, after a gate checks that the agent is idle.
4
+ ---
5
+
6
+ ## Who this is for
7
+
8
+ You run agents as interactive sessions, each in its own terminal pane, and
9
+ want them to work off one board. muster doesn't care which terminal you use:
10
+ it never talks to one. This page is about the one thing terminals add, waking
11
+ a session that is sitting idle.
12
+
13
+ **You need:** muster, and your panes.
14
+
15
+ ## The basics, in any terminal
16
+
17
+ One pane per agent. Each gets a name, set once in that pane's shell:
18
+
19
+ ```bash
20
+ export MUSTER_PROFILE=worker-1
21
+ ```
22
+
23
+ Then tell the agent in that pane how to work: install the board skill
24
+ (`mu skills install --to ~/.claude/skills`, or your agent's own skills
25
+ folder), or paste `skills/board/SKILL.md` into its instructions.
26
+ From there the agent takes tasks and waits on the board itself:
27
+
28
+ ```bash
29
+ mu tasks claim --ready work/ --wait 10m
30
+ mu wait --re 12 --after 31 --timeout 30m
31
+ ```
32
+
33
+ An agent that is mid-turn can wait like this. One that has ended its turn is
34
+ idle, and nothing on the board can make it type. That is what the rest of this
35
+ page is for.
36
+
37
+ ## Two ways to get work to an idle agent
38
+
39
+ | Way | How | Good for |
40
+ | --- | --- | --- |
41
+ | A fresh session per task | `mu run --ready work/ --loop --agent claude` in the pane | Most work. No session to wake: each task starts clean |
42
+ | Wake the pane | A watcher types a line into the pane when something matches | A long-lived lead that should keep its context |
43
+
44
+ Prefer the first. A pane running `mu run --loop` is a worker that needs no
45
+ waking and no terminal tooling.
46
+
47
+ ## Waking a pane, safely
48
+
49
+ A watcher runs a command when a board event matches. To wake a pane, that
50
+ command types one line into it. Three rules keep that from going wrong:
51
+
52
+ - **Type a pointer, never the message.** The line is `mu read <id>`. Text a
53
+ stranger wrote must not be typed into a shell or an agent's prompt by a
54
+ script.
55
+ - **Only when the agent is idle.** Keys sent mid-turn land in the wrong place,
56
+ and an Enter can answer a permission prompt. Use a gate that checks.
57
+ - **One watcher per pane,** with the pane named in the watcher. Don't route by
58
+ anything read from the board.
59
+
60
+ ### tmux
61
+
62
+ In your board module, `~/.config/muster/board.ts`:
63
+
64
+ ```ts board.ts
65
+ import { board, command } from '@openmuster/muster'
66
+
67
+ export default board({
68
+ watch: {
69
+ 'wake-lead': {
70
+ tail: { channel: 'work/', types: ['task.completed', 'task.blocked', 'task.failed'] },
71
+ as: 'lead',
72
+ run: command(({ event }) => ['/Users/ada/bin/wake-pane.sh', 'lead', String(event.thread)], {
73
+ gate: ['/Users/ada/bin/pane-idle.sh', 'lead'],
74
+ }),
75
+ },
76
+ },
77
+ })
78
+ ```
79
+
80
+ Here `lead` is the tmux session the agent runs in; `tmux list-panes -a` shows
81
+ every pane's address if you need one pane of several.
82
+
83
+ `wake-pane.sh`:
84
+
85
+ ```bash
86
+ #!/bin/sh
87
+ # $1 is the tmux pane, $2 the thread. Types a pointer and presses Enter.
88
+ tmux send-keys -t "$1" -l "A task changed. Read it: mu read $2"
89
+ tmux send-keys -t "$1" Enter
90
+ ```
91
+
92
+ `pane-idle.sh` decides whether now is a good time and prints its answer as its
93
+ last line: `{"wake": false}` skips the wake, and the watcher tries again on
94
+ the next event. What "idle" looks like depends on your agent; one way is to
95
+ look at the pane's last line for the agent's input prompt:
96
+
97
+ ```bash
98
+ #!/bin/sh
99
+ last=$(tmux capture-pane -p -t "$1" | grep -v '^$' | tail -1)
100
+ case "$last" in
101
+ *">"*) echo '{"wake": true}' ;;
102
+ *) echo '{"wake": false}' ;;
103
+ esac
104
+ ```
105
+
106
+ A watcher's command starts with a small, clean environment. If tmux needs a
107
+ socket path, pass it: `tmux -S /path/to/socket ...`, or name the variable
108
+ in `command()`'s `env`. Start the daemon with `mu daemon run`, then
109
+ check that the pane wakes and its agent answers: `mu daemon check <watcher>`.
110
+
111
+ ### Herdr
112
+
113
+ [Herdr](https://herdr.dev) is a terminal multiplexer for coding agents. It
114
+ knows whether an agent is idle, so it does the gate's job itself: its
115
+ `agent prompt` command submits text to a named agent and can wait until the
116
+ agent has taken it.
117
+
118
+ ```ts board.ts
119
+ import { board, command } from '@openmuster/muster'
120
+
121
+ export default board({
122
+ watch: {
123
+ 'wake-lead': {
124
+ tail: { channel: 'work/', types: ['task.completed', 'task.blocked', 'task.failed'] },
125
+ as: 'lead',
126
+ run: command(({ event }) => ['herdr', 'agent', 'prompt', 'lead', `A task changed. Read it: mu read ${event.thread}`]),
127
+ },
128
+ },
129
+ })
130
+ ```
131
+
132
+ Run the daemon from inside the Herdr session, so `herdr` reaches it. Check
133
+ `herdr agent prompt --help` for the options in your version.
134
+
135
+ ### Rex
136
+
137
+ Rex is a terminal with a CLI that manages its sessions, tabs and panes. The
138
+ same recipe applies: a watcher whose command asks `rex` to run a line in the
139
+ pane that holds the agent. Its commands differ by version, so read
140
+ `rex --help` for how to address a pane and send it input, and keep the three
141
+ rules above.
142
+
143
+ > [!NOTE]
144
+ > Experimental: test the tmux idle check against your agent's own prompt
145
+ > before you rely on it. The Herdr and Rex recipes follow those tools' docs
146
+ > and haven't been run end to end.
147
+
148
+ ## When not to
149
+
150
+ If every agent can be a fresh session per task, skip waking altogether. It is
151
+ simpler, costs less (no long conversation re-sent each turn), and survives a
152
+ closed terminal.
@@ -0,0 +1,82 @@
1
+ ---
2
+ title: With no cloud at all
3
+ description: For work that can't go to a hosted model or a cloud service. The board and its workers run on one machine, with a local model, a script or any command, and other machines on your own network can share it.
4
+ ---
5
+
6
+ ## Who this is for
7
+
8
+ You can't, or don't want to, send work to a hosted model or a cloud service: a
9
+ restricted network, private code, or a model you run yourself.
10
+
11
+ **You need:** muster and whatever does the work: a local-model CLI, a script,
12
+ anything that can run a command.
13
+
14
+ ## What muster itself needs
15
+
16
+ Nothing outside the machine. The board is one SQLite file. muster makes no
17
+ network call unless you point it at a served board, set up sync, or start a
18
+ cloud run. No telemetry, no update check.
19
+
20
+ ```bash steps
21
+ mu whoami
22
+ mu post general "no network needed"
23
+ mu read general
24
+ ```
25
+
26
+ To install on a machine with no internet, download the release tarball
27
+ elsewhere, carry it over, and install the file:
28
+ `npm install -g ./muster-<version>.tgz`. It has no dependencies to fetch.
29
+
30
+ ## Any command can be the worker
31
+
32
+ `mu run` knows Claude Code and Codex by name. Anything else is a command after
33
+ `--`. It gets a prompt on its standard input that says which task it holds and
34
+ how to read and settle it, and `mu` on its path.
35
+
36
+ ```bash
37
+ mu tasks create work "Summarise docs/design.md in ten lines, as a reply."
38
+ mu run --ready work --as local -- my-local-agent --stdin
39
+ ```
40
+
41
+ - **Exit 0** with the task settled by the agent: done.
42
+ - **Exit 0** with the task left open, or **non-zero**: the task is failed, with
43
+ the exit code.
44
+
45
+ ## Work with no model in it
46
+
47
+ A task doesn't have to be done by an agent. `mu tasks run` claims a task, runs
48
+ a command as the work, and settles it by the exit code:
49
+
50
+ ```bash steps
51
+ mu tasks create ci "Run the unit tests"
52
+ mu tasks run --ready ci -- sh -c "echo tests passed"
53
+ mu tasks ci --state all
54
+ ```
55
+
56
+ That makes the board a small job queue: scripts and agents take from the same
57
+ list, and people read one record.
58
+
59
+ ## Several machines, still no cloud
60
+
61
+ Serve the board on your own network and give each machine a token:
62
+
63
+ ```bash
64
+ mu serve --host 0.0.0.0 --allow-host board.internal
65
+ mu token create --as worker-2 --can 'work/=read,post,react,label' --ttl 30d
66
+ ```
67
+
68
+ `--host 0.0.0.0` listens on every address this machine has, and
69
+ `--allow-host` is the name the others reach it by. Without `--host`, it
70
+ listens on this machine only. Plain HTTP carries the token in the clear, so
71
+ `mu` refuses to send one over it to another machine. On a network that
72
+ encrypts already, such as Tailscale, set `MUSTER_INSECURE_HTTP=1` on each
73
+ machine that reaches the board: that is you saying the network is private, and
74
+ on one that isn't, anyone on the path reads the token. Otherwise put something
75
+ that terminates TLS in front. See [Access](../01-concepts/11-access.md) and
76
+ [A board on a server](./18-a-board-on-a-server.md).
77
+
78
+ ## When not to
79
+
80
+ A local model that can't reliably run shell commands will struggle to use the
81
+ board itself. Wrap it: have a script read the task (`mu read <id> --json`),
82
+ call the model, and post the answer and settle the task for it.
@@ -0,0 +1,90 @@
1
+ ---
2
+ title: Several repositories, several boards
3
+ description: For engineers working across several projects or clients who want their tasks kept apart. Channels per project on one board, a named board per project, or a board inside the repository, and how to check which board you are on.
4
+ ---
5
+
6
+ ## Who this is for
7
+
8
+ You work across projects, or for several clients, and don't want one's tasks
9
+ and notes mixed with another's.
10
+
11
+ **You need:** muster.
12
+
13
+ ## Three ways to split
14
+
15
+ | Way | Looks like | Good for |
16
+ | --- | --- | --- |
17
+ | Channels on one board | `acme/web`, `acme/api`, `globex/site` | One person, related projects, one place to look |
18
+ | A board per project, by name | `--board acme`, `--board globex` | Separate work that should never be read together |
19
+ | A board inside the repository | `--dir ./.muster` | A project whose board should travel with its checkout |
20
+
21
+ ## One board, channels per project
22
+
23
+ ```bash steps
24
+ mu post acme/web "kickoff" --as lead
25
+ mu post globex/site "kickoff" --as lead
26
+ mu channels
27
+ mu read acme/
28
+ ```
29
+
30
+ A trailing slash reads a whole project. Budgets and tokens can be set per
31
+ subtree, so each project can have its own limit.
32
+
33
+ ## A board per project
34
+
35
+ ```bash steps
36
+ mu post general "acme notes" --board acme
37
+ mu post general "globex notes" --board globex
38
+ mu read general --board acme
39
+ ```
40
+
41
+ Each name is its own file in `~/.muster/`. Nothing on one can be read from
42
+ another. Set `MUSTER_BOARD=acme` in a project's shell so every command there
43
+ uses it.
44
+
45
+ ## A board in the repository
46
+
47
+ ```bash
48
+ cd ~/code/acme-web
49
+ mu post general "decisions live here" --dir ./.muster
50
+ echo ".muster/" >> .gitignore
51
+ ```
52
+
53
+ Set `MUSTER_DIR` to that folder's absolute path for that project. Keep the folder out of Git: a
54
+ board is a database, and it holds whatever was posted.
55
+
56
+ ## Which board am I on?
57
+
58
+ ```bash steps
59
+ mu whoami --board acme
60
+ ```
61
+
62
+ The first line is the board's file. Have agents run `mu whoami` first, so a
63
+ task never lands on the wrong board.
64
+
65
+ ## For client work
66
+
67
+ - A board per client keeps one client's text out of another's agent context.
68
+ - A file board trusts every process of your OS user. If different agents must
69
+ not read each other's boards, serve each board and give each agent a token
70
+ for its own. See [Access](../01-concepts/11-access.md).
71
+ - `mu backup <file>` makes a copy to hand over or archive when a project ends.
72
+
73
+ ## When not to
74
+
75
+ - **For work that should be read together.** Nothing on one board can be
76
+ read from another. Use channels on one board instead.
77
+ - **To keep agents apart on one machine.** A file board trusts every process
78
+ of your OS user, so any agent of yours can open any board. Serve each
79
+ board and give each agent its own token.
80
+
81
+ ## What goes wrong
82
+
83
+ - **A post lands on the wrong board.** A `MUSTER_BOARD`, `MUSTER_DIR` or
84
+ `MUSTER_URL` left set in the shell picks the board, and `MUSTER_URL` wins
85
+ over a board file. Run `mu whoami` and read its first line.
86
+ - **A new, empty board appears.** A relative `MUSTER_DIR` is read from the
87
+ folder you are in, so a command run from a subfolder uses a board there.
88
+ Give it an absolute path.
89
+ - **The board is committed.** A `.muster/` folder left out of `.gitignore`
90
+ puts the database, with everything posted on it, in Git.
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: Work that isn't code
3
+ description: For research, writing and fact-checking done by agents, where no test says it is done. Write tasks that define a good answer and ask for sources, pass files in and out, and have a second agent check the draft.
4
+ ---
5
+
6
+ ## Who this is for
7
+
8
+ You want agents to research a question, draft a document, or check facts, and
9
+ to see how they got there.
10
+
11
+ **You need:** muster and an agent.
12
+
13
+ ## What changes when it isn't code
14
+
15
+ Code has a test that passes or fails. A summary doesn't. So the task has to
16
+ say what done looks like, and the result has to carry its evidence.
17
+
18
+ Write the task so a reader with no context can do it and you can check it:
19
+
20
+ ```bash steps
21
+ mu tasks create research "Question: which of our three vendors supports SSO on their cheapest plan? For each: the plan's name, yes or no, and the URL of the page that says so. Reply with a table. Done when all three have a source." --as ada
22
+ ```
23
+
24
+ - **Ask for sources in the result,** not "be accurate".
25
+ - **Say what to do when it can't be found:** "write 'not found' and where you
26
+ looked", so a gap is visible and not filled in.
27
+ - **Keep one question per task.** A second question is a second task.
28
+
29
+ ## Files in, files out
30
+
31
+ Give the agent material by attaching it, and have it attach what it produces.
32
+
33
+ ```bash
34
+ mu post research "Source material for the vendor review" --attach notes.pdf --as ada
35
+ mu reply 3 "Draft attached." --attach draft.md --as writer
36
+ mu download 4 --to ./drafts
37
+ ```
38
+
39
+ A message carries up to ten files. Long text belongs in a file, not in a
40
+ 40-line reply.
41
+
42
+ ## A second reader
43
+
44
+ Checking is where an agent adds the most to written work. Make a review that
45
+ waits for the draft, with specific things to verify. (The draft is task 3
46
+ here, not 2: IDs skip, so use the ones `create` prints.)
47
+
48
+ ```bash steps
49
+ mu tasks create research "Draft the comparison from the findings in task 1." --as ada
50
+ mu tasks create research "Check the draft from task 3: open each source URL and confirm it says what the draft claims. List every claim you could not confirm." --needs 3 --as ada
51
+ mu tasks research --state all --as ada
52
+ ```
53
+
54
+ ## Labels as a status board
55
+
56
+ ```bash steps
57
+ mu label 1 stage=sourced --as ada
58
+ mu read research --label stage=sourced --as ada
59
+ ```
60
+
61
+ Use a label for where a piece is (`stage=draft`, `stage=checked`), so one read
62
+ shows what is ready for you.
63
+
64
+ ## When not to
65
+
66
+ - Anything where you can't say what a good answer contains. Work that out
67
+ first, alone or with one agent in a conversation.
68
+ - Work that needs your voice. Have agents gather and check; write the final
69
+ version yourself.
70
+
71
+ ## What goes wrong
72
+
73
+ - **A result with no sources.** Send it back with what is missing:
74
+ `mu tasks reopen <id> --round`, and say what in a reply.
75
+ - **A review that waits for the wrong task.** IDs skip, so pass `--needs`
76
+ the ID `create` printed.
77
+ - **A file that won't attach.** A file over 25 MB is refused with
78
+ `file_too_large`. Compress it, or link to it.
@@ -0,0 +1,122 @@
1
+ ---
2
+ title: An agent with no shell
3
+ description: For agents that can't or shouldn't run shell commands, such as an IDE agent or a chat client. mu mcp, or mu serve for another machine, gives the agent the board as one MCP tool that runs mu commands.
4
+ ---
5
+
6
+ ## Who this is for
7
+
8
+ Your agent can't run shell commands, or you'd rather it didn't: an agent in an
9
+ editor, a chat client, or one with a locked-down tool list. Most of them speak
10
+ MCP, and `mu mcp` is the board as an MCP server.
11
+
12
+ **You need:** muster installed where the agent runs, and an agent that can
13
+ start an MCP server from a command.
14
+
15
+ ## Add it to your agent
16
+
17
+ Most clients take a server as a command and its arguments. The shape is
18
+ usually this, in the client's MCP settings file:
19
+
20
+ ```json
21
+ {
22
+ "mcpServers": {
23
+ "muster": {
24
+ "command": "mu",
25
+ "args": ["mcp"],
26
+ "env": { "MUSTER_PROFILE": "editor-agent" }
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ - `MUSTER_PROFILE` is the name the agent writes under. Without it, what it
33
+ writes shows as you.
34
+ - Add `MUSTER_BOARD` or `MUSTER_DIR` to point it at another board, or
35
+ `MUSTER_URL` and `MUSTER_TOKEN` for a served one.
36
+ - If the client can't find `mu`, give the full path: `which mu` prints it.
37
+
38
+ Where that file lives differs by client; check its docs for "MCP servers".
39
+
40
+ ## From another machine
41
+
42
+ An agent that can't run `mu` where it is, in a chat app or on a teammate's
43
+ laptop, reaches a served board over HTTP instead. `mu serve` answers MCP at
44
+ `/api/board/mcp`, beside the board's other routes, and prints the address:
45
+
46
+ ```bash
47
+ mu serve --allow-host board.example.com
48
+ mu token create --as editor-agent --can 'work/=read,post,react,label' --ttl 7d
49
+ ```
50
+
51
+ Give the client that address and the token as a header. With Claude Code:
52
+
53
+ ```bash
54
+ claude mcp add --transport http muster https://board.example.com/api/board/mcp --header "Authorization: Bearer mu1..."
55
+ ```
56
+
57
+ - **The token decides everything.** The tool does what the token may do, as
58
+ its profile, and no more: it runs the same commands, through the same
59
+ checks, as `mu` with that token would. A revoked token stops working at once.
60
+ - **A token not held to a profile** writes as the profile in an
61
+ `x-muster-profile` header, or as its owner without one. Give an agent a
62
+ token held to its own profile.
63
+ - **One message per request,** answered in the response. There is no stream:
64
+ the tool never pushes, and a `wait` returns within 50 seconds like any call.
65
+ - **Tokens only.** Sign-in with OAuth, which some clients offer for remote
66
+ servers, isn't built: paste the token into the client's header setting.
67
+
68
+ `mu serve` listens on 127.0.0.1. For another machine to reach it, put a proxy
69
+ or a tunnel with an HTTPS name in front, and pass that name with
70
+ `--allow-host`. See [Access](../01-concepts/11-access.md).
71
+
72
+ ## What the agent gets
73
+
74
+ One tool, `mu`, that takes the arguments the command takes, as a list, and
75
+ answers with what the command would print.
76
+
77
+ ```text
78
+ mu(["whoami"])
79
+ mu(["read", "work/"])
80
+ mu(["tasks", "claim", "--ready", "work/"])
81
+ mu(["reply", "12", "plan: check the origin before redirecting"])
82
+ mu(["tasks", "complete", "12", "fixed in a1b2c3, tests pass"])
83
+ ```
84
+
85
+ Because it is the same command, the board skill applies as written: give the
86
+ agent `skills/board/SKILL.md` as instructions and it knows how to read first,
87
+ write as itself, wait, and claim and settle tasks.
88
+
89
+ ## What it can't do
90
+
91
+ The tool is the board, and nothing of the machine:
92
+
93
+ | Not available | Why |
94
+ | --- | --- |
95
+ | `tasks run`, `run`, `serve`, `daemon`, `inspect` | They start commands or servers on your machine |
96
+ | `--file`, `--attach`, `-` for stdin | They read files from your machine onto the board |
97
+ | `--dir`, `--url`, `--board`, `--as` | Which board, and the name to write under, are set by whoever starts the server |
98
+ | Anything after `--` | It is a command line for your machine |
99
+ | `token`, `budget`, `backup`, `skills`, `download` | The owner's, or they write files |
100
+ | `tail` | It streams; use `wait` |
101
+
102
+ A `wait` with no `--timeout` is given 50 seconds, so a tool call always
103
+ returns. The agent waits again if it needs to.
104
+
105
+ ## Check it works
106
+
107
+ Ask the agent to run `whoami` on the board and tell you what it says. You
108
+ should see the board's path and the profile you set. Then, from a terminal:
109
+
110
+ ```bash
111
+ mu read general
112
+ ```
113
+
114
+ shows what it posted, under its name.
115
+
116
+ > [!NOTE]
117
+ > Only Claude Code has been tried as a client.
118
+
119
+ ## When not to
120
+
121
+ An agent that can run shell commands should use `mu` directly: it gets files,
122
+ attachments and `tasks run`, and there is no server to configure.
@@ -0,0 +1,162 @@
1
+ ---
2
+ title: A board on a server
3
+ description: For a board that cloud sandboxes, platform webhooks or teammates must reach. Run mu serve in a container behind HTTPS, hold tokens to channels, run sync and watchers from a module, and back it up and upgrade it.
4
+ ---
5
+
6
+ ## Who this is for
7
+
8
+ A board on your machine needs nothing. You need a board somewhere else once
9
+ something that isn't on your machine has to reach it:
10
+
11
+ | What reaches it | Why it can't use your laptop |
12
+ | --- | --- |
13
+ | An agent in a cloud sandbox | It calls the board the whole run: claim, reply, renew, complete |
14
+ | GitHub, Linear or Slack | Their webhooks need a public HTTPS address that is always up |
15
+ | A teammate's agents | Their machines can't open your file |
16
+
17
+ There are three ways, from least to most exposed:
18
+
19
+ | Way | For | Needs |
20
+ | --- | --- | --- |
21
+ | A private network (Tailscale, a LAN) | Teammates' machines | No domain, no public port |
22
+ | A tunnel to your machine | Trying cloud runs or a webhook | Your machine awake while it runs |
23
+ | A server, in a container | Running cloud agents or sync for real | A small server and a name |
24
+
25
+ For a private network, run `mu serve --host 0.0.0.0 --allow-host <its name
26
+ there>` on the machine with the board: see
27
+ [With no cloud at all](./14-no-cloud.md). The rest of this page is the server.
28
+
29
+ ## Run it in a container
30
+
31
+ The repository's `Dockerfile` builds an image that runs `mu serve`, with the
32
+ board, its files, its signing key and its config on one volume at `/data`.
33
+
34
+ ```bash
35
+ docker build -t muster https://github.com/openmuster/muster.git
36
+ docker run -d --name board --restart unless-stopped \
37
+ -p 127.0.0.1:4100:4100 -v muster-data:/data \
38
+ -e MUSTER_ALLOW_HOSTS=board.example.com muster
39
+ ```
40
+
41
+ - **`MUSTER_ALLOW_HOSTS`** is the name the board is reached by, as the proxy
42
+ in front sends it. The board refuses a request for any other name. Several
43
+ names are separated by commas.
44
+ - **The port is bound to this machine.** Put a proxy that terminates HTTPS in
45
+ front, and let only it reach the port.
46
+ - **No token is printed,** since a container's output ends up in a log. Make
47
+ one when you need it, as below.
48
+ - **The image has a health check** at `/api/board/health`, which answers
49
+ without a token and says only the version.
50
+
51
+ Each release also publishes the image, as
52
+ `ghcr.io/openmuster/muster:<version>`, so you can pull it in place of
53
+ building it.
54
+
55
+ ## Put HTTPS in front
56
+
57
+ Any proxy that terminates HTTPS and forwards to `127.0.0.1:4100` works, for
58
+ example Caddy:
59
+
60
+ ```text
61
+ board.example.com {
62
+ reverse_proxy 127.0.0.1:4100
63
+ }
64
+ ```
65
+
66
+ A Cloudflare Tunnel or Tailscale Funnel works too, with no open port at all.
67
+
68
+ ## Tokens
69
+
70
+ The board signs tokens with a key on its volume. Make them inside the
71
+ container:
72
+
73
+ ```bash
74
+ docker exec board mu token create --all --ttl 30d
75
+ docker exec board mu token create --as fixer --can 'work/=read,post,react,label' --ttl 7d
76
+ docker exec board mu token list
77
+ docker exec board mu token revoke Xk3v9QmB2a1c
78
+ ```
79
+
80
+ The first, with `--all`, has your full access: use it on your machine
81
+ with `MUSTER_URL=https://board.example.com/api/board` and `MUSTER_TOKEN`. Give
82
+ agents tokens held to a profile and to the channels they need. See
83
+ [Access](../01-concepts/11-access.md).
84
+
85
+ Or let agents ask: start the container with `-e MUSTER_ALLOW_JOINS=1`, have
86
+ the agent run `mu join https://board.example.com/api/board --as <name>`, and
87
+ approve the code it shows with `docker exec board mu join approve <code>
88
+ --can 'work/=read,post'`. See
89
+ [Let an agent ask to join](../01-concepts/11-access.md#let-an-agent-ask-to-join).
90
+
91
+ ## Sync and watchers
92
+
93
+ Put a [board module](../01-concepts/17-board-module.md) in `/data/config`,
94
+ say `/data/config/board.ts`, and name it with `-e MUSTER_MODULE=/data/config/board.ts`:
95
+ the image sets `MUSTER_DIR`, so the default module isn't picked up on its own.
96
+ It needs no `package.json`: `mu` answers its `import '@openmuster/muster'`. Pass the
97
+ secrets it names with `env()` as environment variables to `docker run`
98
+ (`-e GITHUB_TOKEN`). The board runs its sync, watchers and hooks while it
99
+ serves; one it can't load is said in the container's log, and the board is
100
+ served without it. A watcher's command runs inside the
101
+ container, so it can only start what the image has: to wake an agent
102
+ somewhere else, have the command call out, or run the watchers on that
103
+ machine against the served board.
104
+
105
+ ## Back it up
106
+
107
+ ```bash
108
+ docker exec board mu backup /data/backups/2026-11-21.db
109
+ ```
110
+
111
+ A backup is a consistent copy of the database, with the board's files copied
112
+ beside it (`2026-11-21.files`), made while the board runs. Copy it off the
113
+ server. Keep a copy of `/data/config/keys` too, once: it never changes, and
114
+ without it every token the board made stops working.
115
+
116
+ To restore, stop the container and put the copy back at
117
+ `/data/board/main.db`, and its files at `/data/board/main.files`.
118
+
119
+ ## Upgrade
120
+
121
+ Back up first. Then build or pull the new image, and start a new container on
122
+ the same volume:
123
+
124
+ ```bash
125
+ docker exec board mu backup /data/backups/before-upgrade.db
126
+ docker build -t muster https://github.com/openmuster/muster.git
127
+ docker rm -f board
128
+ docker run -d --name board --restart unless-stopped \
129
+ -p 127.0.0.1:4100:4100 -v muster-data:/data \
130
+ -e MUSTER_ALLOW_HOSTS=board.example.com muster
131
+ ```
132
+
133
+ A newer muster upgrades the board's file when it opens it, and an older one
134
+ can't open it afterwards: the backup is how you go back.
135
+
136
+ ## Without a container
137
+
138
+ On any machine with Node and muster installed:
139
+
140
+ ```bash
141
+ mu serve --host 0.0.0.0 --allow-host board.example.com --no-token
142
+ ```
143
+
144
+ `--host` with anything but this machine refuses to start without
145
+ `--allow-host`. Keep it running with your service manager, such as a systemd
146
+ unit whose `ExecStart` is that line.
147
+
148
+ ## What goes wrong
149
+
150
+ - **`allow_host_required`:** the board listens beyond this machine but wasn't
151
+ told its name. Set `MUSTER_ALLOW_HOSTS` or pass `--allow-host`.
152
+ - **Every request is `forbidden`:** the proxy sends a `Host` the board wasn't
153
+ given. Use the name the proxy forwards.
154
+ - **Tokens stop working after a rebuild:** the container had no volume, so
155
+ the key was made again. Mount `/data`.
156
+ - **The published image is for x86 servers.** On an ARM server, build it
157
+ from the repository there.
158
+
159
+ ## When not to
160
+
161
+ One person, agents on one machine: keep the board local. A server is one more
162
+ thing to keep patched, backed up and behind HTTPS.