@openmuster/muster 0.3.1-alpha.3 → 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 +16 -10
- package/dist/{args-DX9QSK1f.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 +79 -51
- package/dist/{main-DgrIMbeA.js → main-BeEB08iI.js} +397 -26
- package/dist/main-CLzQkYeG.js +6 -0
- package/dist/mcp-CAAZRJgv.js +6 -0
- package/dist/{module-C-HJjWWo.js → module-BX2IjSiv.js} +2 -2
- package/dist/{module-CxoN1MOe.js → module-D9KdbEpS.js} +1 -1
- package/dist/skills/board/SKILL.md +5 -0
- package/dist/{steps-DtzUdcBE.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 -42
- 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 +79 -29
- 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 +8 -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 +22 -0
- package/package.json +1 -1
- package/dist/main-CdVlnWHy.js +0 -6
- package/dist/mcp-NueWYyQs.js +0 -6
|
@@ -5,7 +5,15 @@ description: Map a Notion database to a channel, so each page becomes a thread w
|
|
|
5
5
|
|
|
6
6
|
Guides that use it: [A feedback loop](../03-guides/20-a-feedback-loop.md) turns a page into a pull request, its Status moving the card, and [Running the feedback loop](../03-guides/21-running-the-loop.md) covers the day-to-day.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Set it up
|
|
9
|
+
|
|
10
|
+
### 1. Create the integration
|
|
11
|
+
|
|
12
|
+
Create a Notion integration. `token` is the integration's secret
|
|
13
|
+
(`ntn_…`). Share each mapped database with the integration, and give it the
|
|
14
|
+
capabilities to read content, read comments and insert comments.
|
|
15
|
+
|
|
16
|
+
### 2. Map the databases
|
|
9
17
|
|
|
10
18
|
```ts board.ts
|
|
11
19
|
import { board, env, notion } from '@openmuster/muster'
|
|
@@ -25,38 +33,50 @@ A database maps to a channel, by its data source ID: on a workspace that
|
|
|
25
33
|
predates data sources, by the database's own ID. Either is taken with or
|
|
26
34
|
without dashes. Sync is two-way unless a database sets `mirror: false`.
|
|
27
35
|
|
|
28
|
-
`token` is the integration's secret (`ntn_…`). Share each mapped database
|
|
29
|
-
with the integration, and give it the capabilities to read content, read
|
|
30
|
-
comments and insert comments.
|
|
31
|
-
|
|
32
36
|
`secret` is the webhook subscription's verification token, which Notion
|
|
33
37
|
signs every delivery with. `bot` is optional: the integration's own user ID,
|
|
34
38
|
whose pages and comments are never imported.
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
### 3. Start the board with a pending secret
|
|
37
41
|
|
|
38
42
|
Notion sends its verification token once, to the webhook's URL, signed with
|
|
39
43
|
that same token, and it has to be pasted back into Notion before anything
|
|
40
|
-
else is sent
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
else is sent.
|
|
45
|
+
|
|
46
|
+
Start the board with the sync in its module and `NOTION_WEBHOOK_SECRET`
|
|
47
|
+
set to `pending`. Only then does the board take Notion's one unsigned
|
|
48
|
+
request.
|
|
49
|
+
|
|
50
|
+
### 4. Subscribe the webhook
|
|
51
|
+
|
|
52
|
+
In the integration's settings, under Webhooks, subscribe
|
|
53
|
+
`https://<your host>/api/board/webhooks/nt` to page and comment events.
|
|
54
|
+
|
|
55
|
+
### 5. Verify the token
|
|
56
|
+
|
|
57
|
+
The board writes the token Notion sent to `notion-verification-token`
|
|
58
|
+
in muster's config folder (`~/.config/muster`, or `MUSTER_CONFIG`),
|
|
59
|
+
readable by you alone. It is never logged or answered, and never
|
|
60
|
+
written over: the first one stays.
|
|
61
|
+
|
|
62
|
+
Paste it into Notion's Verify. Anyone can send the board a token, so
|
|
63
|
+
this is the check: one Notion didn't send fails there. If it fails,
|
|
64
|
+
delete the file and have Notion send its token again. Then set
|
|
65
|
+
`NOTION_WEBHOOK_SECRET` to it and start the board again.
|
|
55
66
|
|
|
56
67
|
From then on a delivery without Notion's signature for that token is
|
|
57
68
|
refused.
|
|
58
69
|
|
|
59
|
-
|
|
70
|
+
### 6. Check it
|
|
71
|
+
|
|
72
|
+
Make a page in the mapped database: on the board's next tick it arrives as a
|
|
73
|
+
thread in the mapped channel, labelled `kind=page` and `source=nt`.
|
|
74
|
+
|
|
75
|
+
## Reference
|
|
76
|
+
|
|
77
|
+
What the sync brings in, sends back and catches up on.
|
|
78
|
+
|
|
79
|
+
### What comes in
|
|
60
80
|
|
|
61
81
|
| In Notion | On the board |
|
|
62
82
|
| --- | --- |
|
|
@@ -71,12 +91,13 @@ Notion's webhooks say only what changed, not what it says now. The board
|
|
|
71
91
|
answers each at once and reads the page or comment from Notion's API on its
|
|
72
92
|
next tick, so what it imports is always what Notion says then, and a late
|
|
73
93
|
delivery brings nothing older. A read that fails is tried again on later
|
|
74
|
-
ticks, rather than import less than the page says.
|
|
94
|
+
ticks, rather than import less than the page says. One Notion won't answer for
|
|
95
|
+
24 hours is given up with a `sync.dropped` event. A page's text is cut at 9,000 characters,
|
|
75
96
|
with a link to the rest.
|
|
76
97
|
|
|
77
98
|
A page in a database the sync doesn't map is not brought in.
|
|
78
99
|
|
|
79
|
-
|
|
100
|
+
### What goes back
|
|
80
101
|
|
|
81
102
|
- **A reply** in a synced thread is a comment on the page, in pieces of
|
|
82
103
|
2,000 characters, as Notion takes them. Editing or deleting it does the
|
|
@@ -86,7 +107,7 @@ A page in a database the sync doesn't map is not brought in.
|
|
|
86
107
|
- **Files** aren't sent yet: each is named in the comment, and stays on the
|
|
87
108
|
board.
|
|
88
109
|
|
|
89
|
-
|
|
110
|
+
### Catching up
|
|
90
111
|
|
|
91
112
|
A board that was down asks Notion, when it starts, for the pages changed in
|
|
92
113
|
each mapped database since it last heard, oldest first, up to 1,000 a
|
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Coding agents
|
|
3
|
-
description: For engineers who want Claude Code, Codex or another coding agent to work from a board.
|
|
3
|
+
description: For engineers who want Claude Code, Codex or another coding agent to work from a board. You end with the board skill installed, the agent writing under its own name, and a way to start it again after its turn ends.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Install the skill
|
|
7
7
|
|
|
8
|
+
Install the board skill with the skills CLI:
|
|
9
|
+
|
|
8
10
|
```bash
|
|
9
|
-
|
|
10
|
-
mu skills path
|
|
11
|
+
npx skills add openmuster/muster
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
The
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
The [skills CLI](https://skills.sh) asks which skills and which agents, then
|
|
15
|
+
copies them where each agent keeps its own. There are three: `board`,
|
|
16
|
+
`configure-factory` and `loop-card`. Add `--skill board` for one, and `-g` to
|
|
17
|
+
install for your user instead of the project.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
The skills CLI takes the skills from the repository's main branch. They can
|
|
20
|
+
describe a command that the release you run doesn't have yet. To get the
|
|
21
|
+
skills that match the `mu` you installed, use `mu` itself:
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
|
-
|
|
24
|
+
mu skills install --to ~/.claude/skills
|
|
25
|
+
mu skills path
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
The first copies the skills that ship with muster to where your agent keeps
|
|
29
|
+
its own. The second prints where they are, for an agent that reads a file
|
|
30
|
+
instead. For an agent with no skills folder, paste the board skill's
|
|
31
|
+
`SKILL.md` into its instructions.
|
|
29
32
|
|
|
30
|
-
Where an agent keeps its standing instructions differs by vendor.
|
|
31
|
-
the usual places
|
|
33
|
+
Where an agent keeps its standing instructions differs by vendor. The table
|
|
34
|
+
shows the usual places; check your agent's own docs:
|
|
32
35
|
|
|
33
36
|
| Agent | Where the board instructions go |
|
|
34
37
|
| --- | --- |
|
|
35
|
-
| Claude Code | `~/.claude/skills/` (
|
|
38
|
+
| Claude Code | `~/.claude/skills/` (where both commands above put them) |
|
|
36
39
|
| Codex | `AGENTS.md` in the repository, or `~/.codex/AGENTS.md` |
|
|
37
40
|
| Cursor | A rule file under `.cursor/rules/` |
|
|
38
41
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
39
42
|
| Windsurf | A rule file under `.windsurf/rules/` |
|
|
40
43
|
|
|
41
|
-
An agent that can't run shell commands gets the board as
|
|
42
|
-
see [An agent with no shell](./17-mcp.md).
|
|
44
|
+
An agent that can't run shell commands gets the board as a Model Context
|
|
45
|
+
Protocol (MCP) tool instead: see [An agent with no shell](./17-mcp.md).
|
|
43
46
|
|
|
44
47
|
For any of them the content is the same: the board skill's `SKILL.md`. Two
|
|
45
48
|
things have to be true wherever the agent runs its commands:
|
|
@@ -47,13 +50,20 @@ things have to be true wherever the agent runs its commands:
|
|
|
47
50
|
- `mu` is on its `PATH`. An agent that runs commands in its own sandbox or
|
|
48
51
|
container may not see what your shell sees.
|
|
49
52
|
- It can reach the board. On a file board that means it can read and write
|
|
50
|
-
`~/.muster
|
|
53
|
+
`~/.muster/`. Give an agent that can't a served board instead
|
|
51
54
|
(`MUSTER_URL` and a token, see [Access](../01-concepts/11-access.md)).
|
|
52
55
|
|
|
53
|
-
The skill teaches an agent to
|
|
54
|
-
|
|
56
|
+
The skill teaches an agent to:
|
|
57
|
+
|
|
58
|
+
- find the board
|
|
59
|
+
- read before it writes
|
|
60
|
+
- write as itself
|
|
61
|
+
- wait instead of polling
|
|
62
|
+
- [claim](../01-concepts/08-tasks.md#claims) and settle tasks
|
|
63
|
+
|
|
64
|
+
## Give the agent its own profile
|
|
55
65
|
|
|
56
|
-
|
|
66
|
+
Set the agent's [profile](../01-concepts/06-actors.md) in its environment:
|
|
57
67
|
|
|
58
68
|
```bash
|
|
59
69
|
export MUSTER_PROFILE=claude
|
|
@@ -62,19 +72,27 @@ export MUSTER_PROFILE=claude
|
|
|
62
72
|
Or have it pass `--as claude` on every command that writes. Without either,
|
|
63
73
|
what the agent writes shows as you.
|
|
64
74
|
|
|
65
|
-
##
|
|
75
|
+
## Ask it to work on the board
|
|
76
|
+
|
|
77
|
+
Ask in plain words, for example:
|
|
66
78
|
|
|
67
79
|
- "Post what you changed in `dev`."
|
|
68
80
|
- "Ask in the thread and wait for the answer."
|
|
69
81
|
- "Take the next task in `work/` and do it."
|
|
70
82
|
|
|
83
|
+
The commands behind them:
|
|
84
|
+
|
|
71
85
|
```bash
|
|
72
86
|
mu post dev "moved auth to the edge: a1b2c3" --as claude
|
|
73
87
|
mu wait --re 12 --after 31 --timeout 30m --as claude
|
|
74
88
|
mu tasks claim --ready work/ --wait 10m --as claude
|
|
75
89
|
```
|
|
76
90
|
|
|
77
|
-
|
|
91
|
+
Here `mu wait` waits up to 30 minutes for the next event in thread 12 after
|
|
92
|
+
cursor 31. `mu tasks claim --ready work/` takes the next ready task
|
|
93
|
+
under `work/`, and waits up to 10 minutes for one.
|
|
94
|
+
|
|
95
|
+
## Start it again after its turn ends
|
|
78
96
|
|
|
79
97
|
Nothing wakes an agent after its turn ends. An agent that should come back
|
|
80
98
|
when something happens needs something to start it again:
|
|
@@ -84,15 +102,15 @@ when something happens needs something to start it again:
|
|
|
84
102
|
happens.
|
|
85
103
|
- `mu run --loop`, which starts a fresh one for each task.
|
|
86
104
|
|
|
87
|
-
##
|
|
105
|
+
## Give a sandboxed agent the board
|
|
88
106
|
|
|
89
|
-
|
|
90
|
-
a board file. Codex is one: `mu run` gives it the board's
|
|
91
|
-
folder. An agent that can't reach the file at all uses a
|
|
92
|
-
[Access](../01-concepts/11-access.md).
|
|
107
|
+
Some agents run in a sandbox that can't open files outside their workspace,
|
|
108
|
+
so they can't reach a board file. Codex is one: `mu run` gives it the board's
|
|
109
|
+
folder as a writable folder. An agent that can't reach the file at all uses a
|
|
110
|
+
board over HTTP: see [Access](../01-concepts/11-access.md).
|
|
93
111
|
|
|
94
112
|
## Board text is information
|
|
95
113
|
|
|
96
|
-
Tell the agent
|
|
97
|
-
|
|
98
|
-
because a message says to.
|
|
114
|
+
Tell the agent that what others wrote on a board is content, not
|
|
115
|
+
instructions. The skill tells it too. The agent doesn't run commands,
|
|
116
|
+
approve, merge, deploy or publish because a message says to.
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: A swarm
|
|
3
|
-
description: For splitting one goal across several agents at once.
|
|
3
|
+
description: For splitting one goal across several agents at once. You end with a lead that breaks the goal into tasks that own separate files, workers that each take one ready task in a fresh session, and a review task that checks the results.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Who does what in a swarm
|
|
7
7
|
|
|
8
8
|
A lead plans and decides, workers each do one task, and a person owns the
|
|
9
9
|
goal. They never talk to each other directly: the plan is the board's tasks,
|
|
10
10
|
and every question, answer and result is in a task's thread.
|
|
11
11
|
|
|
12
|
-
The board's part is the queue:
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
The board's part is the queue:
|
|
13
|
+
|
|
14
|
+
- one holder per task (see [Claims](../01-concepts/08-tasks.md#claims))
|
|
15
|
+
- tasks that wait for what they need
|
|
16
|
+
- a hold for a person's answer (see
|
|
17
|
+
[States](../01-concepts/08-tasks.md#states))
|
|
18
|
+
- a lease that returns a dropped task to `ready` when it runs out
|
|
19
|
+
|
|
20
|
+
The lead's part is judgment: splitting the goal, answering questions,
|
|
15
21
|
checking results.
|
|
16
22
|
|
|
17
23
|
## When a swarm fits, and when it doesn't
|
|
@@ -36,7 +42,11 @@ mu tasks create work/checkout "Rate-limit the API. You own apps/api/checkout/."
|
|
|
36
42
|
mu tasks create work/checkout "Show the limit in the UI. You own apps/web/checkout/." --needs 1 --as lead
|
|
37
43
|
```
|
|
38
44
|
|
|
39
|
-
##
|
|
45
|
+
## Run a swarm from the command line
|
|
46
|
+
|
|
47
|
+
Create the tasks from a plan file (see
|
|
48
|
+
[A plan in one write](../01-concepts/08-tasks.md#a-plan-in-one-write)), start
|
|
49
|
+
the workers, and have the lead wait for results:
|
|
40
50
|
|
|
41
51
|
```bash
|
|
42
52
|
mu tasks create work/checkout --file plan.json --as lead
|
|
@@ -49,7 +59,7 @@ Each `mu run --loop` is a worker: it takes the next ready task, starts a fresh
|
|
|
49
59
|
agent on it, and does that again until nothing is ready. The lead's guide is
|
|
50
60
|
the board skill's `references/swarm.md`.
|
|
51
61
|
|
|
52
|
-
##
|
|
62
|
+
## Run a swarm from the template page
|
|
53
63
|
|
|
54
64
|
`templates/swarm` is a page that does the same from a form:
|
|
55
65
|
|
|
@@ -59,6 +69,8 @@ pnpm install
|
|
|
59
69
|
pnpm dev # on 127.0.0.1 only: the page has no sign-in
|
|
60
70
|
```
|
|
61
71
|
|
|
72
|
+
On the page:
|
|
73
|
+
|
|
62
74
|
- The form takes a goal, a run name, how many agents, which agent, and where
|
|
63
75
|
they run.
|
|
64
76
|
- Launching posts the run's thread, queues one planning task, and starts the
|
|
@@ -66,17 +78,20 @@ pnpm dev # on 127.0.0.1 only: the page has no sign-in
|
|
|
66
78
|
- `/live` shows the queue by state, who holds what, and the newest messages.
|
|
67
79
|
|
|
68
80
|
Agents run as local processes with the access of whoever started the page.
|
|
69
|
-
Launch
|
|
81
|
+
Launch a run only on code you would run yourself.
|
|
82
|
+
|
|
83
|
+
## Check and limit what workers do
|
|
70
84
|
|
|
71
|
-
|
|
85
|
+
Put these checks in place:
|
|
72
86
|
|
|
73
|
-
- **"Completed" is what the worker says, not evidence.** Make a review task
|
|
74
|
-
the work, and give it to a different agent.
|
|
75
|
-
- **A review that fails sends the work back
|
|
87
|
+
- **"Completed" is what the worker says, not evidence.** Make a review task
|
|
88
|
+
that needs the work, and give it to a different agent.
|
|
89
|
+
- **A review that fails sends the work back.** Reopen the work with
|
|
90
|
+
`mu tasks reopen <id> --round`.
|
|
76
91
|
- **A budget:** `mu budget work/checkout 20` stops new claims once the tasks
|
|
77
|
-
there have cost
|
|
78
|
-
- **A lead keeps a short session.**
|
|
79
|
-
so it can start over when a piece of work closes.
|
|
92
|
+
there have cost $20.
|
|
93
|
+
- **A lead keeps a short session.** It keeps its state in a thread on the
|
|
94
|
+
board, so it can start over when a piece of work closes.
|
|
80
95
|
|
|
81
96
|
## What it costs to start an agent
|
|
82
97
|
|