@openmuster/muster 0.3.1-alpha.2 → 0.3.1-alpha.4
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 +19 -17
- package/dist/{args-DHgAmYge.js → args-9ZZDcPxa.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/index.js +16 -3
- package/dist/inspect/app.js +45 -40
- package/dist/main-D5aX7Jaj.js +6 -0
- package/dist/{main-A4nHL5oa.js → main-Doit2DDY.js} +242 -21
- package/dist/mcp-Cm96TIb3.js +6 -0
- package/dist/{module-DOkWwWoU.js → module-D8qcE3e7.js} +1 -1
- package/dist/{module-CT_R33MB.js → module-DjDMSEKu.js} +2 -2
- package/dist/{steps-ByzmEzLQ.js → steps-BUPRIOe3.js} +1 -1
- package/docs/01-concepts/01-overview.md +7 -2
- package/docs/01-concepts/02-boards.md +4 -4
- package/docs/01-concepts/03-channels.md +1 -1
- package/docs/01-concepts/04-threads.md +1 -3
- package/docs/01-concepts/05-labels.md +1 -1
- package/docs/01-concepts/06-actors.md +1 -1
- package/docs/01-concepts/07-events.md +11 -4
- package/docs/01-concepts/08-tasks.md +8 -4
- package/docs/01-concepts/09-watchers.md +7 -4
- package/docs/01-concepts/10-schedules.md +1 -1
- package/docs/01-concepts/11-access.md +46 -43
- package/docs/01-concepts/12-files-and-data.md +1 -1
- package/docs/01-concepts/13-budgets.md +1 -1
- package/docs/01-concepts/14-runners.md +9 -8
- package/docs/01-concepts/15-outgoing-webhooks.md +2 -2
- package/docs/01-concepts/16-workflows.md +6 -6
- package/docs/01-concepts/17-board-module.md +8 -6
- package/docs/01-quickstart.md +8 -6
- package/docs/02-sync/01-overview.md +33 -26
- package/docs/02-sync/02-github.md +5 -4
- package/docs/02-sync/03-linear.md +21 -21
- package/docs/02-sync/04-slack.md +7 -11
- package/docs/02-sync/05-notion.md +3 -1
- package/docs/02-sync/meta.json +4 -0
- package/docs/03-guides/01-coding-agents.md +2 -2
- package/docs/03-guides/02-swarm.md +4 -4
- package/docs/03-guides/03-factory.md +1 -5
- package/docs/03-guides/04-inspector.md +36 -1
- package/docs/03-guides/05-running-agents.md +13 -1
- package/docs/03-guides/06-sandboxed-agents.md +15 -29
- package/docs/03-guides/07-build-a-ui.md +21 -2
- package/docs/03-guides/08-ci.md +13 -5
- package/docs/03-guides/09-daemon.md +6 -5
- package/docs/03-guides/10-two-agents.md +1 -1
- package/docs/03-guides/11-person-in-the-loop.md +1 -1
- package/docs/03-guides/12-unattended.md +1 -1
- package/docs/03-guides/13-terminals.md +4 -5
- package/docs/03-guides/14-no-cloud.md +1 -1
- package/docs/03-guides/15-several-boards.md +21 -2
- package/docs/03-guides/16-non-code.md +12 -3
- package/docs/03-guides/17-mcp.md +2 -6
- package/docs/03-guides/18-a-board-on-a-server.md +1 -1
- package/docs/03-guides/19-a-card-queue.md +22 -22
- package/docs/03-guides/20-a-feedback-loop.md +14 -6
- package/docs/03-guides/21-running-the-loop.md +16 -9
- package/docs/03-guides/22-building-from-linear.md +326 -0
- package/docs/03-guides/meta.json +32 -0
- package/docs/04-reference/01-cli.md +2 -1
- package/docs/04-reference/02-handle.md +4 -3
- package/docs/04-reference/03-http.md +3 -2
- package/docs/04-reference/04-events.md +1 -1
- package/docs/04-reference/05-errors.md +3 -3
- package/docs/04-reference/06-conformance.md +4 -2
- package/docs/04-reference/07-porting.md +1 -1
- package/docs/index.md +60 -24
- package/docs/meta.json +3 -0
- package/package.json +1 -1
- package/dist/main-CuIC8iF4.js +0 -6
- package/dist/mcp-GkdeWAnr.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Access
|
|
3
|
-
description:
|
|
3
|
+
description: File mode trusts every process that can open the board's file. Serve mode gives each agent a revocable token you can limit by channel and permission. Serving, tokens, agents that ask to join, and private channels.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Two trust modes
|
|
@@ -80,10 +80,50 @@ channel, a subtree (`factory/`), or `*`.
|
|
|
80
80
|
`sync:`. A token held to channels can't move one.
|
|
81
81
|
- A schedule belongs to the token that made it. Revoke the token and its
|
|
82
82
|
schedules are canceled as they come due. A token that only ran out leaves
|
|
83
|
-
them going: cancel those with `mu schedule cancel
|
|
83
|
+
them going: cancel those with `mu schedule cancel`, as you would one made
|
|
84
84
|
before 0.2.0, which has no record of its token. A token held to
|
|
85
85
|
channels has 20 schedules going at most.
|
|
86
86
|
|
|
87
|
+
`mu token list` shows the tokens the board has made that haven't run out,
|
|
88
|
+
each with an ID. `mu token revoke <id>` stops one at once: its next request is
|
|
89
|
+
refused. The board keeps that list in its own file, as records of what it
|
|
90
|
+
made, never the tokens themselves. A token with an ID the board has no
|
|
91
|
+
record of is refused, so restoring a board from an old backup stops the
|
|
92
|
+
tokens made since.
|
|
93
|
+
|
|
94
|
+
A token made before 0.2.0 may have no ID. Such a token can't be revoked and
|
|
95
|
+
stops when it runs out. To stop one sooner, delete
|
|
96
|
+
the board's key in `~/.config/muster/keys/`, which stops every token the board
|
|
97
|
+
has made.
|
|
98
|
+
|
|
99
|
+
The signing key is made once and kept in `~/.config/muster/keys/`, so tokens
|
|
100
|
+
survive a restart of `mu serve`.
|
|
101
|
+
|
|
102
|
+
A client sets two variables, and every command uses that board:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
export MUSTER_URL=http://127.0.0.1:4100/api/board
|
|
106
|
+
export MUSTER_TOKEN=mu1...
|
|
107
|
+
mu whoami
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Making a token from another machine
|
|
111
|
+
|
|
112
|
+
On the board's own machine you are its owner and may make any token. From
|
|
113
|
+
another machine, with `MUSTER_URL` and a token of your own, you can make one
|
|
114
|
+
too, with limits that keep it from growing:
|
|
115
|
+
|
|
116
|
+
- It must be held to a profile and to named channels. No `*`, no `manage`.
|
|
117
|
+
- It lives a day at most, and never longer than the token that made it.
|
|
118
|
+
- A maker that is itself held to a profile can only make a token for that
|
|
119
|
+
same profile, and a maker marked no-sync makes no-sync tokens.
|
|
120
|
+
- Only a token that reaches everything can make one. A token held to
|
|
121
|
+
channels, or one made this way, can't make, list or revoke tokens.
|
|
122
|
+
|
|
123
|
+
This is how `mu run --runner vercel --as fixer` gets its agent a token: one
|
|
124
|
+
for that name, that task's channel, a little longer than the run, and marked
|
|
125
|
+
so nothing it writes is mirrored outward.
|
|
126
|
+
|
|
87
127
|
## Let an agent ask to join
|
|
88
128
|
|
|
89
129
|
Instead of making a token and passing it to an agent, let the agent ask for
|
|
@@ -124,45 +164,6 @@ request decides what the token may do: you do, when you approve.
|
|
|
124
164
|
- **Approving over HTTP** takes a token as wide as yours, and makes a token by
|
|
125
165
|
the rules for making one there: a day at most, named channels, no `manage`.
|
|
126
166
|
|
|
127
|
-
The signing key is made once and kept in `~/.config/muster/keys/`, so tokens
|
|
128
|
-
survive a restart of `mu serve`.
|
|
129
|
-
|
|
130
|
-
`mu token list` shows the tokens the board has made that haven't run out,
|
|
131
|
-
each with an ID. `mu token revoke <id>` stops one at once: its next request is
|
|
132
|
-
refused. The board keeps that list in its own file, as records of what it
|
|
133
|
-
made, never the tokens themselves. A token with an ID the board has no
|
|
134
|
-
record of is refused, so restoring a board from an old backup stops the
|
|
135
|
-
tokens made since. A token made before muster kept the list has no ID and can't be
|
|
136
|
-
revoked; it stops when it runs out. So does one `mu serve` printed in
|
|
137
|
-
a version before 0.2.0, which was good for 30 days: to stop one of those
|
|
138
|
-
sooner, delete the board's key in `~/.config/muster/keys/`, which stops every
|
|
139
|
-
token the board has made.
|
|
140
|
-
|
|
141
|
-
### Making a token from another machine
|
|
142
|
-
|
|
143
|
-
On the board's own machine you are its owner and may make any token. From
|
|
144
|
-
another machine, with `MUSTER_URL` and a token of your own, you can make one
|
|
145
|
-
too, with limits that keep it from growing:
|
|
146
|
-
|
|
147
|
-
- It must be held to a profile and to named channels. No `*`, no `manage`.
|
|
148
|
-
- It lives a day at most, and never longer than the token that made it.
|
|
149
|
-
- A maker that is itself held to a profile can only make a token for that
|
|
150
|
-
same profile, and a maker marked no-sync makes no-sync tokens.
|
|
151
|
-
- Only a token that reaches everything can make one. A token held to
|
|
152
|
-
channels, or one made this way, can't make, list or revoke tokens.
|
|
153
|
-
|
|
154
|
-
This is how `mu run --runner vercel --as fixer` gets its agent a token: one
|
|
155
|
-
for that name, that task's channel, a little longer than the run, and marked
|
|
156
|
-
so nothing it writes is mirrored outward.
|
|
157
|
-
|
|
158
|
-
A client sets two variables, and every command uses that board:
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
export MUSTER_URL=http://127.0.0.1:4100/api/board
|
|
162
|
-
export MUSTER_TOKEN=mu1...
|
|
163
|
-
mu whoami
|
|
164
|
-
```
|
|
165
|
-
|
|
166
167
|
## Private channels
|
|
167
168
|
|
|
168
169
|
```bash
|
|
@@ -178,5 +179,7 @@ Privacy holds against tokens. In file mode there is no one to keep out.
|
|
|
178
179
|
## What stays off the board
|
|
179
180
|
|
|
180
181
|
Nothing that runs a command or holds a secret is stored on a board. Watcher
|
|
181
|
-
commands, sync mappings and the names of secrets live in
|
|
182
|
-
|
|
182
|
+
commands, sync mappings and the names of secrets live in your
|
|
183
|
+
[board module](./17-board-module.md), a file you write and keep where you
|
|
184
|
+
like: `~/.config/muster/board.ts`, or any path you pass with `--module` or
|
|
185
|
+
`MUSTER_MODULE`. The secrets themselves stay in the environment.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Files and typed data
|
|
3
|
-
description:
|
|
3
|
+
description: Attach files to messages, and put JSON in blocks the board checks against a registered schema, so programs read data without parsing text. Also what a delete leaves on disk, and how to erase it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Files
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Budgets
|
|
3
|
-
description:
|
|
3
|
+
description: A budget caps what the tasks under a channel may cost in dollars. Once it is spent, the board refuses new claims there with over_budget. Agents that report no cost, such as Codex, need a time limit instead.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Set one
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Runners
|
|
3
|
-
description:
|
|
3
|
+
description: A runner, mu run, claims a task, starts an agent on it, renews the claim while it works and settles what the agent leaves open. Running here compared with the experimental Vercel, Cloudflare and E2B sandboxes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## What a runner does
|
|
@@ -81,15 +81,16 @@ See [Running agents](../03-guides/05-running-agents.md) for local runs and
|
|
|
81
81
|
| Private repository | Your own git access | A GitHub App's read token, used only while cloning | A GitHub App's read token, added by the Worker only while cloning | A GitHub App's read token, stored at E2B only while cloning |
|
|
82
82
|
| `mu run` waits for it | Yes | Yes; `--detach` returns at once | With `--push`, and for each task of a `--ready --loop` worker; otherwise it returns at once and the Worker ends the container when the agent exits | Yes, always: `--detach` is refused |
|
|
83
83
|
| `--push` (a pull request) | No | Yes | Yes | Yes |
|
|
84
|
-
| `--ready --loop` | One agent after another, here | A sandbox per task, started from here | A container per task, started from here
|
|
85
|
-
| Registered workflows | Yes | Yes | Yes
|
|
84
|
+
| `--ready --loop` | One agent after another, here | A sandbox per task, started from here | A container per task, started from here | A sandbox per task, started from here |
|
|
85
|
+
| Registered workflows | Yes | Yes | Yes | Yes |
|
|
86
86
|
| Default `--timeout` | None | 30 minutes | 30 minutes with `--push` or for a worker's task; otherwise an hour, set by the Worker | 30 minutes; a sandbox lives an hour at most unless `MUSTER_E2B_MAX_LIFETIME` says more |
|
|
87
|
-
| Agents | Claude Code, Codex, or any command | Claude Code and Codex, which the sandbox image has | Claude Code, which the template's image installs; set `AGENT_PACKAGE` for another | Claude Code and Codex, in the template you build
|
|
87
|
+
| Agents | Claude Code, Codex, or any command | Claude Code and Codex, which the sandbox image has | Claude Code, which the template's image installs; set `AGENT_PACKAGE` for another | Claude Code and Codex, in the template you build |
|
|
88
88
|
|
|
89
|
-
The cloud runners are experimental.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
The cloud runners are experimental. Not yet run against a live Cloudflare
|
|
90
|
+
account: a worker's `--ready --loop` and registered workflows. Codex has run
|
|
91
|
+
on E2B, and not yet on Vercel or Cloudflare. The README's
|
|
92
|
+
[What has been run for real](https://github.com/openmuster/muster#what-has-been-run-for-real)
|
|
93
|
+
has the rest.
|
|
93
94
|
|
|
94
95
|
## Which agents
|
|
95
96
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Outgoing webhooks
|
|
3
|
-
description:
|
|
3
|
+
description: An outgoing webhook POSTs each matching board event to a URL of yours, signed with HMAC-SHA256. Declare one in a board module, verify the signature in your receiver, and rely on at-least-once, in-order delivery.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## What one is
|
|
@@ -155,7 +155,7 @@ board. The secret has to be set where you run it.
|
|
|
155
155
|
|
|
156
156
|
- **To wake an agent on this machine,** use a
|
|
157
157
|
[watcher](./09-watchers.md): it needs no receiver and sends nothing out.
|
|
158
|
-
- **To mirror threads to GitHub, Linear or
|
|
158
|
+
- **To mirror threads to GitHub, Linear, Slack or Notion,** use
|
|
159
159
|
[sync](../02-sync/01-overview.md): it writes in each platform's own shape.
|
|
160
160
|
A hook's body is muster's, and a chat app's incoming-webhook URL will not
|
|
161
161
|
understand it without a small service in between.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Workflows
|
|
3
|
-
description:
|
|
3
|
+
description: A workflow is a plan of tasks and a crew of workers, registered once in workflows.json. Someone you allow starts it on a thread, and the daemon makes the tasks, starts the workers and posts a summary.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## What one is
|
|
@@ -20,8 +20,8 @@ sequenceDiagram
|
|
|
20
20
|
D->>B: reply on #812: the summary
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
A workflow
|
|
24
|
-
and a crew of workers that take them. You write it once in a file of yours.
|
|
23
|
+
A workflow is a plan you run more than once: a list of steps that become
|
|
24
|
+
tasks, and a crew of workers that take them. You write it once in a file of yours.
|
|
25
25
|
Someone you allow asks for it on a thread, and the daemon does the rest.
|
|
26
26
|
|
|
27
27
|
Workflows are yours, like [watchers](./09-watchers.md) and
|
|
@@ -210,8 +210,8 @@ is told apart from anything a person writes.
|
|
|
210
210
|
`mu run` would: `MUSTER_URL` or `MUSTER_SANDBOX_URL`, and for `vercel` the
|
|
211
211
|
Vercel token, team and project, for `cloudflare` `MUSTER_CF_WORKER` and
|
|
212
212
|
`MUSTER_CF_SECRET`, for `e2b` `E2B_API_KEY` and `MUSTER_E2B_TEMPLATE`, and with `push` the GitHub App's. Set them where the
|
|
213
|
-
daemon starts; `mu daemon install` takes each with `--env <name>`. Cloudflare workers
|
|
214
|
-
|
|
213
|
+
daemon starts; `mu daemon install` takes each with `--env <name>`. Experimental: Cloudflare workers have not yet
|
|
214
|
+
run against a live Cloudflare account.
|
|
215
215
|
- **Each request is one run.** Run it twice and the second run is a second
|
|
216
216
|
set of tasks and workers. A `mu workflow run` you retried after a timeout
|
|
217
217
|
may have started one already, so read the thread before you send it again.
|
|
@@ -323,7 +323,7 @@ A `pr` is shown only for a pull request URL on github.com.
|
|
|
323
323
|
[watcher](./09-watchers.md).
|
|
324
324
|
- **To cancel a run.** There is no `mu workflow cancel`. Cancel its tasks with
|
|
325
325
|
`mu tasks cancel`; the workers stop on their own once nothing is ready.
|
|
326
|
-
- **From Slack.** There is no slash command
|
|
326
|
+
- **From Slack.** There is no Slack slash command. Use `mu workflow run`, or ask
|
|
327
327
|
from code.
|
|
328
328
|
|
|
329
329
|
## What goes wrong
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: The board module and hosts
|
|
3
|
-
description:
|
|
3
|
+
description: A board module is one TypeScript file that declares a board's watchers, sync and outgoing webhooks. A host runs it (mu daemon run, mu serve or your own process), and a lease keeps each role on one host at a time.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## The module
|
|
@@ -9,7 +9,7 @@ A board module is a TypeScript file whose default export, or `team`, is a
|
|
|
9
9
|
`board()`. It says which board, and what that board does when nobody types:
|
|
10
10
|
|
|
11
11
|
- `watch`: [watchers](./09-watchers.md), what to listen for and what to do;
|
|
12
|
-
- `sync`: [GitHub, Linear and
|
|
12
|
+
- `sync`: [GitHub, Linear, Slack and Notion](../02-sync/01-overview.md);
|
|
13
13
|
- `hooks`: [outgoing webhooks](./15-outgoing-webhooks.md).
|
|
14
14
|
|
|
15
15
|
```ts board.ts
|
|
@@ -51,8 +51,8 @@ watcher doesn't take. The error names it.
|
|
|
51
51
|
so `--dir`, `--board`, `--url`, `--as` and `MUSTER_PROFILE` don't go with it.
|
|
52
52
|
|
|
53
53
|
It needs no project. A bare `~/.config/muster/board.ts`, with no
|
|
54
|
-
`package.json` and no `node_modules`,
|
|
55
|
-
`mu` answers its `import '@openmuster/muster'` with its own copy. A module in a project
|
|
54
|
+
`package.json` and no `node_modules`, works too, as on a machine with only a
|
|
55
|
+
shell or in a container: `mu` answers its `import '@openmuster/muster'` with its own copy. A module in a project
|
|
56
56
|
that installs muster runs on that project's install: `mu` becomes that
|
|
57
57
|
install's `mu`, so a process holds one copy of muster. It is refused when the
|
|
58
58
|
project's muster is too old to run a module, naming both versions.
|
|
@@ -106,8 +106,10 @@ waits for an answer, or sends a signed ping to a hook.
|
|
|
106
106
|
- **A module that fails to load** stops `mu daemon run` with exit 0, so a
|
|
107
107
|
service manager leaves it stopped, and `mu serve` serves the board without
|
|
108
108
|
it. Both say why, loudly.
|
|
109
|
-
- **A variable a sync
|
|
110
|
-
|
|
109
|
+
- **A variable a sync names that isn't set** stops both, by name:
|
|
110
|
+
`mu daemon run` exits 0, and `mu serve` exits 1 before it listens. One only
|
|
111
|
+
a hook names stops `start()`: `mu daemon run` exits 0, and `mu serve` says
|
|
112
|
+
so and serves the board without the module's watchers and hooks.
|
|
111
113
|
- **A watcher or hook named like a workflow** in `workflows.json` is refused:
|
|
112
114
|
one name is one thing.
|
|
113
115
|
- **A `watchers.json`, `sync.json` or `hooks.json` left from before** makes
|
package/docs/01-quickstart.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Quickstart
|
|
3
|
-
description:
|
|
3
|
+
description: Install mu, make a board on this machine, and take a task from created to completed, first by hand and then with Claude Code or Codex doing the work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Install
|
|
@@ -13,9 +13,11 @@ Older ones bundle a SQLite it refuses to run on. It is on npm as
|
|
|
13
13
|
npm install -g @openmuster/muster
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
That is the latest release; run it again to upgrade. To be told when there
|
|
17
|
+
is a newer one, set `MUSTER_UPDATE_CHECK=1`: once a day, a command run in a
|
|
18
|
+
terminal says so in one line. To pin a version, name it:
|
|
19
|
+
`npm install -g @openmuster/muster@0.3.1-alpha.4`.
|
|
20
|
+
Every release is also a tarball on GitHub, which npm installs from its URL:
|
|
19
21
|
`https://github.com/openmuster/muster/releases/latest/download/muster.tgz`.
|
|
20
22
|
|
|
21
23
|
To try it without installing:
|
|
@@ -77,8 +79,8 @@ a task's first message and the event that made it a task each take one.
|
|
|
77
79
|
## Let an agent do one
|
|
78
80
|
|
|
79
81
|
The same thing, with an agent doing the work. This needs Claude Code or Codex
|
|
80
|
-
installed and signed in, and it spends tokens: a task this small cost
|
|
81
|
-
20 cents
|
|
82
|
+
installed and signed in, and it spends tokens: a task this small has cost
|
|
83
|
+
about 20 cents.
|
|
82
84
|
|
|
83
85
|
```bash
|
|
84
86
|
mu tasks create work "Make a file hello.txt that says hello, and check it exists"
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: GitHub, Linear and
|
|
2
|
+
title: Integrations
|
|
3
|
+
description: Bring GitHub, Linear, Slack and Notion threads onto the board for agents to read and wait on, and send the board's replies back. Webhooks, secrets, what goes back where, files, filters and catch-up after downtime.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
> GitHub sync has been run against a live repository, and the two faults that
|
|
8
|
-
> run found are fixed in 0.2.0. Slack sync has been run against a live
|
|
9
|
-
> workspace and found no faults. Linear sync has been run against a live
|
|
10
|
-
> workspace and found no faults. A race found by reading the code, where what
|
|
11
|
-
> the board sent could come back as a second copy, is fixed on the main branch
|
|
12
|
-
> and covered by a test, not yet run live.
|
|
6
|
+
Each platform has its own page: [GitHub](./02-github.md), [Linear](./03-linear.md), [Slack](./04-slack.md) and [Notion](./05-notion.md). To put sync to work, start from a guide: [Building from Linear](../03-guides/22-building-from-linear.md), [A feedback loop](../03-guides/20-a-feedback-loop.md), [A software factory](../03-guides/03-factory.md) or [CI](../03-guides/08-ci.md).
|
|
13
7
|
|
|
14
8
|
## What it does
|
|
15
9
|
|
|
16
|
-
A platform thread (an issue, a pull request, a Slack thread
|
|
17
|
-
thread in the channel you map it to. What people write there
|
|
18
|
-
replies, written by their platform identity (`gh:user:nico`). What
|
|
19
|
-
on the board goes back, where the mapping mirrors.
|
|
10
|
+
A platform thread (an issue, a pull request, a Slack thread, a Notion page)
|
|
11
|
+
becomes a board thread in the channel you map it to. What people write there
|
|
12
|
+
arrives as replies, written by their platform identity (`gh:user:nico`). What
|
|
13
|
+
is written on the board goes back, where the mapping mirrors.
|
|
20
14
|
|
|
21
15
|
## How an event arrives
|
|
22
16
|
|
|
@@ -61,7 +55,7 @@ load it without the secrets. The board reads them when it starts
|
|
|
61
55
|
(`team.fetch`).
|
|
62
56
|
|
|
63
57
|
```ts
|
|
64
|
-
import { board, env, github, linear, slack } from '@openmuster/muster'
|
|
58
|
+
import { board, env, github, linear, notion, slack } from '@openmuster/muster'
|
|
65
59
|
|
|
66
60
|
export default board({
|
|
67
61
|
sync: {
|
|
@@ -74,6 +68,7 @@ export default board({
|
|
|
74
68
|
}),
|
|
75
69
|
lin: linear({ secret: env('LINEAR_WEBHOOK_SECRET'), token: env('LINEAR_API_KEY'), teams: { ENG: 'eng' } }),
|
|
76
70
|
chat: slack({ secret: env('SLACK_SIGNING_SECRET'), token: env('SLACK_BOT_TOKEN'), channels: { C0123456789: 'general' } }),
|
|
71
|
+
nt: notion({ secret: env('NOTION_WEBHOOK_SECRET'), token: env('NOTION_TOKEN'), databases: { '1a2b3c4d00004000800000000000d00b': 'feedback' } }),
|
|
77
72
|
},
|
|
78
73
|
})
|
|
79
74
|
```
|
|
@@ -84,9 +79,13 @@ export default board({
|
|
|
84
79
|
says so and exits 0, so the service stays stopped. `team.fetch` goes on
|
|
85
80
|
serving the board, says it in its log, and answers a webhook with a plain
|
|
86
81
|
503 and `health` with 503 `unhealthy`. Neither answer names the variable.
|
|
87
|
-
- **`token`**
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
- **`token`** sends things back, catches up and fetches files. Without one,
|
|
83
|
+
GitHub, Linear and Slack still bring in what their webhooks carry. A GitHub
|
|
84
|
+
App ([GitHub](./02-github.md#who-the-comments-are-by)) or a Linear OAuth
|
|
85
|
+
app ([Linear](./03-linear.md#who-the-comments-are-by)) can take its place.
|
|
86
|
+
Notion needs it for everything, since its webhooks say only what changed.
|
|
87
|
+
**`bot`** is the app's own identity on the platform, so its writes aren't
|
|
88
|
+
imported as someone else's.
|
|
90
89
|
- **The module's sync runs where the module is started**, under the board's
|
|
91
90
|
`sync` lease, so one process at a time catches up and sends to the
|
|
92
91
|
platforms, whichever runs the watchers. Each message is also claimed on the
|
|
@@ -109,15 +108,18 @@ export default board({
|
|
|
109
108
|
| | Comes in | Goes back |
|
|
110
109
|
| --- | --- | --- |
|
|
111
110
|
| [GitHub](./02-github.md) | Issues, pull requests, comments, reviews, CI | Only where a repo sets `mirror` |
|
|
112
|
-
| [Linear](./03-linear.md) | Issues, comments, state | Yes, unless a team sets `mirror: false` |
|
|
111
|
+
| [Linear](./03-linear.md) | Issues, comments, state, labels, assignee, priority, project | Yes, unless a team sets `mirror: false` |
|
|
113
112
|
| [Slack](./04-slack.md) | Channel messages and thread replies | Yes, unless a channel sets `mirror: false` |
|
|
113
|
+
| [Notion](./05-notion.md) | Pages in a database, their Status, comments | Yes, unless a database sets `mirror: false` |
|
|
114
114
|
|
|
115
115
|
- **Replies** in a synced thread are posted on the platform once, and the copy
|
|
116
116
|
that comes back as a webhook is not imported again.
|
|
117
|
-
- **Threads started on the board** in a mapped channel open an issue,
|
|
118
|
-
to the Slack channel, and their replies follow them
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
- **Threads started on the board** in a mapped channel open an issue, post
|
|
118
|
+
to the Slack channel, or make a Notion page, and their replies follow them
|
|
119
|
+
there.
|
|
120
|
+
- **Edits and deletes** follow a message to its copy, in both directions,
|
|
121
|
+
except out to Linear, which keeps a comment as first sent. Going out they
|
|
122
|
+
are best effort: a platform that refuses one is skipped.
|
|
121
123
|
- **`--no-sync`** on a message keeps it on the board.
|
|
122
124
|
- **Labels and reactions never leave the board.** A platform's own labels
|
|
123
125
|
and assignees come in, as `tag.*` and `assignee.*` on the thread: see
|
|
@@ -127,14 +129,15 @@ A sync makes threads, not tasks. `mu tasks create <id>` makes one a task.
|
|
|
127
129
|
|
|
128
130
|
## Files
|
|
129
131
|
|
|
130
|
-
Files on a message follow it where the platform allows.
|
|
131
|
-
|
|
132
|
+
Files on a message follow it where the platform allows. Experimental: file
|
|
133
|
+
sync has not yet been run against a live account.
|
|
132
134
|
|
|
133
135
|
| | Comes in | Goes back |
|
|
134
136
|
| --- | --- | --- |
|
|
135
137
|
| [Slack](./04-slack.md) | Files on a message | Uploaded, and shared into the thread after the text |
|
|
136
138
|
| [Linear](./03-linear.md) | Files uploaded to Linear and linked from the text | Uploaded to Linear, and linked from the text |
|
|
137
139
|
| [GitHub](./02-github.md) | No: a link to an attachment stays in the text | No: GitHub has no upload API. The text names each file |
|
|
140
|
+
| [Notion](./05-notion.md) | No | No: each file is named in the comment, and stays on the board |
|
|
138
141
|
|
|
139
142
|
The rules are the same for each platform:
|
|
140
143
|
|
|
@@ -213,8 +216,9 @@ Text it passes as it is, give or take a final newline, keeps its files.
|
|
|
213
216
|
|
|
214
217
|
Platforms resend what wasn't answered, for a while. Beyond that, the ticker
|
|
215
218
|
asks GitHub and Linear for the issues, pull requests and comments since the
|
|
216
|
-
last event it received,
|
|
217
|
-
|
|
219
|
+
last event it received, Slack for each mapped channel's messages and thread
|
|
220
|
+
replies, and Notion for the pages changed in each mapped database and their
|
|
221
|
+
comments, and imports what it missed.
|
|
218
222
|
|
|
219
223
|
- **Where it starts** is noted when `mu serve` or the daemon starts, before
|
|
220
224
|
the first webhook, five minutes before the last event received, in case
|
|
@@ -227,6 +231,9 @@ thread replies, and imports what it missed.
|
|
|
227
231
|
newest change it read.
|
|
228
232
|
- **A state the board changed after the platform's copy was read** is left
|
|
229
233
|
as it is.
|
|
234
|
+
- **Notion** gives up to 1,000 changed pages a database. A comment on a page
|
|
235
|
+
that didn't otherwise change while the board was down isn't found: see
|
|
236
|
+
[Notion](./05-notion.md#catching-up).
|
|
230
237
|
- **More changes made at one moment than a read can take** are gone past.
|
|
231
238
|
The daemon logs `skipped sync <key>: changes made at <time> may not have
|
|
232
239
|
been read`.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: GitHub
|
|
3
|
-
description: Issues
|
|
3
|
+
description: Issues and pull requests become board threads, with comments as replies, and state, reviews, CI results, labels and assignees as labels agents can wait on. Nothing goes back to GitHub unless a repository turns on mirroring.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Guides that use it: [CI](../03-guides/08-ci.md) waits on a pull request's checks, [A software factory](../03-guides/03-factory.md) answers issues as they arrive, and [A feedback loop](../03-guides/20-a-feedback-loop.md) turns an issue into a pull request.
|
|
7
|
+
|
|
6
8
|
## Map repositories
|
|
7
9
|
|
|
8
10
|
```ts board.ts
|
|
@@ -86,9 +88,8 @@ Nothing, unless the repository sets `mirror: true`. With it:
|
|
|
86
88
|
Files don't sync with GitHub:
|
|
87
89
|
|
|
88
90
|
- **In:** an attachment in an issue or comment is a link to
|
|
89
|
-
`github.com/user-attachments`. It stays in the text, as a link
|
|
90
|
-
|
|
91
|
-
the board doesn't try.
|
|
91
|
+
`github.com/user-attachments`. It stays in the text, as a link: the
|
|
92
|
+
board doesn't fetch it.
|
|
92
93
|
- **Out:** GitHub has no API to attach a file to an issue or a comment. A
|
|
93
94
|
board message's files are named at the end of its text, and stay on the
|
|
94
95
|
board: `[file not sent: fix.patch (2 KB): GitHub takes no uploads, it is on the board]`.
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Linear
|
|
3
|
-
description: Issues and
|
|
3
|
+
description: Drive agents from the Linear issues your team already plans in. Issues arrive as threads, with their status, labels, assignee, priority and project as labels, and board replies go back to the issue as comments.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Sync brings a Linear team's issues and comments onto the board as threads,
|
|
7
|
+
and posts the board's replies back on the issue. That is what lets an agent
|
|
8
|
+
work from the issues you already plan in Linear: it reads the issue and its
|
|
9
|
+
comments, and what it says lands on the issue. This page is the sync itself.
|
|
10
|
+
For the whole workflow, from a project and its spec to a pull request per
|
|
11
|
+
issue, with rounds started from a comment, see
|
|
12
|
+
[Building from Linear](../03-guides/22-building-from-linear.md).
|
|
13
|
+
|
|
6
14
|
## Map teams
|
|
7
15
|
|
|
8
16
|
```ts board.ts
|
|
@@ -60,11 +68,8 @@ export default board({
|
|
|
60
68
|
- Catch-up and files use the app as well, so no `token` is needed. With both
|
|
61
69
|
set, the app is used.
|
|
62
70
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
> issue as a comment by the application, under the application's name. A token
|
|
66
|
-
> running out after thirty days, and one ended early, are covered by tests
|
|
67
|
-
> against a stand-in for Linear's API only.
|
|
71
|
+
Not yet seen against a live workspace: a token renewed after thirty days,
|
|
72
|
+
or one Linear ends early.
|
|
68
73
|
|
|
69
74
|
## Show an issue being worked on
|
|
70
75
|
|
|
@@ -97,8 +102,8 @@ export default board({
|
|
|
97
102
|
run's last words, and the session is complete. Linear writes that response
|
|
98
103
|
on the issue as a comment by the application. A later round on the same
|
|
99
104
|
card goes on in the same session.
|
|
100
|
-
- The run's `started …` reply is not posted as a comment, and
|
|
101
|
-
|
|
105
|
+
- The run's `started …` reply is not posted as a comment. Its summary, and
|
|
106
|
+
every other reply, is a comment as before.
|
|
102
107
|
- A comment by the application's own user is not brought in while sessions
|
|
103
108
|
are on: the response is one, and the board has no ID to know it by.
|
|
104
109
|
- A call Linear refuses is tried again a minute later.
|
|
@@ -110,13 +115,8 @@ session events** and nothing else, and name the signing secret Linear shows
|
|
|
110
115
|
there as `appSecret`. The board checks what arrives with it and answers;
|
|
111
116
|
nothing in it is imported. The token needs no more than `read` and `write`.
|
|
112
117
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
> opened on an issue nobody had mentioned the application in, notes, a
|
|
116
|
-
> response that completed it, and a note that made a completed session active
|
|
117
|
-
> again. The board doing it by itself is covered by tests against a stand-in
|
|
118
|
-
> for Linear's API. A person writing in the session's thread is not handled:
|
|
119
|
-
> it reaches the application's webhook, which the board answers and drops.
|
|
118
|
+
A person writing in the session's thread is not imported: it reaches the
|
|
119
|
+
application's webhook, which the board answers and drops.
|
|
120
120
|
|
|
121
121
|
`bot` is optional: the user ID whose comments are never imported. Set it only
|
|
122
122
|
when the token acts as a user of its own, such as an OAuth app that posts as
|
|
@@ -132,6 +132,7 @@ own comments and issues by the IDs Linear gave them, so they don't come back.
|
|
|
132
132
|
| A comment | A reply, by `lin:user:<id>` |
|
|
133
133
|
| A comment is edited or removed | The reply is edited or deleted |
|
|
134
134
|
| The issue's state changes | The label `state`, in lowercase with dashes: `in-progress` |
|
|
135
|
+
| The issue's title or description is edited | The thread's first message is edited: the title, a blank line, the description |
|
|
135
136
|
| A label is on it, added or removed | A label per Linear label: `tag.bug=bug` |
|
|
136
137
|
| It is assigned, reassigned or unassigned | `assignee.<handle>=<handle>`, from the assignee's profile handle or the name they show |
|
|
137
138
|
| Its priority is set or cleared | `priority`: `urgent`, `high`, `medium` or `low`. No priority is no label |
|
|
@@ -225,16 +226,15 @@ user named in `bot`.
|
|
|
225
226
|
Linear's answer; an upload URL anywhere else is refused and the file named.
|
|
226
227
|
|
|
227
228
|
A personal API key with read and write access fetches and uploads files.
|
|
228
|
-
|
|
229
|
+
Experimental: files through an OAuth app have not been checked against a
|
|
230
|
+
live workspace.
|
|
229
231
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
sends one, the file is named in the text instead of attached. This has not
|
|
233
|
-
been tried against Linear. See [Files](./01-overview.md#files) for the limits.
|
|
232
|
+
The board follows no redirect from `uploads.linear.app`: a file Linear
|
|
233
|
+
redirects is named in the text instead of attached. See [Files](./01-overview.md#files) for the limits.
|
|
234
234
|
|
|
235
235
|
## Catching up
|
|
236
236
|
|
|
237
|
-
After downtime, and when a token is set, the ticker asks Linear for the issues in
|
|
237
|
+
After downtime, and when a token or an OAuth app is set, the ticker asks Linear for the issues in
|
|
238
238
|
the mapped teams updated since the last event it received, then the comments
|
|
239
239
|
on them. An issue created while the board was down arrives whole, with its
|
|
240
240
|
title, description and labels, and its comments as replies. A state change
|
package/docs/02-sync/04-slack.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Slack
|
|
3
|
-
description:
|
|
3
|
+
description: Map Slack channels to board channels, so a message people post becomes a thread agents can read and answer. Replies, edits and deletes go back to the Slack thread, and Slack can show a run as working.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Guides that use it: [A software factory](../03-guides/03-factory.md) answers questions in a channel as they arrive, and [A feedback loop](../03-guides/20-a-feedback-loop.md) turns a thread into a pull request, with Slack showing the run as working.
|
|
7
|
+
|
|
6
8
|
## Map channels
|
|
7
9
|
|
|
8
10
|
```ts board.ts
|
|
@@ -82,22 +84,16 @@ In the app's settings, turn on the agent feature (the manifest's
|
|
|
82
84
|
> Slack says declaring an app an agent can't be undone, and that people have
|
|
83
85
|
> to reload Slack to see it. Try it on an app made for the purpose first.
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
> a person posted started a run, "<app> is working" showed under its thread
|
|
88
|
-
> with no message asking for it, and it went when the run was summed up. Not
|
|
89
|
-
> yet seen live: a private channel, a run longer than Slack's hour, and one run
|
|
90
|
-
> handing over to the next on the same thread. Those are covered by tests
|
|
91
|
-
> against a stand-in for Slack's API.
|
|
87
|
+
Not yet seen against a live workspace: a private channel, a run longer than
|
|
88
|
+
Slack's hour, and one run handing over to the next on the same thread.
|
|
92
89
|
|
|
93
90
|
## Files
|
|
94
91
|
|
|
95
92
|
- **In:** a file on a Slack message is fetched from `files.slack.com` with
|
|
96
93
|
the bot token and attached to the message. It needs `files:read`. A web
|
|
97
94
|
page in place of the file is taken to be Slack's sign-in page, and the
|
|
98
|
-
message says to check that scope.
|
|
99
|
-
`files.slack.com
|
|
100
|
-
Slack redirects is named instead. Not tried against Slack. A file
|
|
95
|
+
message says to check that scope. The board follows no redirect from
|
|
96
|
+
`files.slack.com`: a file Slack redirects is named instead. A file
|
|
101
97
|
Slack only links to (from Google Drive, say) is named, not fetched.
|
|
102
98
|
- **Out:** each file on a board message is uploaded with
|
|
103
99
|
`files.getUploadURLExternal`, then shared into the Slack thread after the
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Notion
|
|
3
|
-
description:
|
|
3
|
+
description: Map a Notion database to a channel, so each page becomes a thread with its Status as a state label and its comments as replies. Board replies go back as comments, and new board threads become pages.
|
|
4
4
|
---
|
|
5
5
|
|
|
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
|
+
|
|
6
8
|
## Map databases
|
|
7
9
|
|
|
8
10
|
```ts board.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Coding agents
|
|
3
|
-
description:
|
|
3
|
+
description: For engineers who want Claude Code, Codex or another coding agent to work from a board. Install the board skill, give the agent its own name, and see what can start it again after its turn ends.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Install the skill
|
|
@@ -28,7 +28,7 @@ release you run doesn't have yet. `mu skills install` always matches the `mu`
|
|
|
28
28
|
it came with.
|
|
29
29
|
|
|
30
30
|
Where an agent keeps its standing instructions differs by vendor. These are
|
|
31
|
-
the usual places
|
|
31
|
+
the usual places. Check your agent's own docs.
|
|
32
32
|
|
|
33
33
|
| Agent | Where the board instructions go |
|
|
34
34
|
| --- | --- |
|