@openmuster/muster 0.3.1-alpha.2 → 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.
- package/README.md +13 -13
- package/dist/{args-DHgAmYge.js → args-DX9QSK1f.js} +1 -1
- package/dist/cli.js +5 -5
- package/dist/index.js +16 -3
- package/dist/main-CdVlnWHy.js +6 -0
- package/dist/{main-A4nHL5oa.js → main-DgrIMbeA.js} +3 -3
- package/dist/mcp-NueWYyQs.js +6 -0
- package/dist/{module-CT_R33MB.js → module-C-HJjWWo.js} +2 -2
- package/dist/{module-DOkWwWoU.js → module-CxoN1MOe.js} +1 -1
- package/dist/{steps-ByzmEzLQ.js → steps-DtzUdcBE.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 +5 -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 +17 -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 +1 -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 +39 -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
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Building from Linear
|
|
3
|
+
description: For a team or a solo builder who plans in Linear and wants coding agents to build it. Keep the spec in the repository, move an issue to Todo, and get a pull request back on it, with screenshots, and another round from any comment.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Who this is for
|
|
7
|
+
|
|
8
|
+
You plan in Linear: a project with goals, milestones and issues. You want
|
|
9
|
+
agents to build it while you do something else, and you want to steer them
|
|
10
|
+
from Linear, on your desktop or the Linear app on your phone, with GitHub
|
|
11
|
+
holding the change.
|
|
12
|
+
|
|
13
|
+
This guide is the Linear side of the [feedback loop](./20-a-feedback-loop.md)
|
|
14
|
+
template. That guide and [Running the feedback loop](./21-running-the-loop.md)
|
|
15
|
+
cover the machinery. This one covers how to lay out the project, the spec and
|
|
16
|
+
the issues so agents build the right thing, and what you do from where.
|
|
17
|
+
|
|
18
|
+
## How it fits together
|
|
19
|
+
|
|
20
|
+
Each of these lives in one place:
|
|
21
|
+
|
|
22
|
+
| What | Where | Why there |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| Goals, milestones and the order of work | The Linear project | People read and reorder it there |
|
|
25
|
+
| The build prompt: hard rules, goals, how an agent shows its work | `AGENTS.md` and a spec file in the repository | Every agent reads the repository. A Linear document never reaches its sandbox |
|
|
26
|
+
| One change | One Linear issue, which is one card and one pull request | A card is one branch |
|
|
27
|
+
| Questions and decisions about a change | Comments on the issue | They reach the agents, and stay with the issue |
|
|
28
|
+
| The change itself | The pull request | Linear shows its address, the summary and screenshots as comments |
|
|
29
|
+
| Who may start work | `LOOP_TRUSTED` | An issue from anyone else waits for your approval |
|
|
30
|
+
|
|
31
|
+
A change goes through these steps. You move an issue into Triage, Backlog
|
|
32
|
+
and Todo; the loop moves it to In Progress and Done:
|
|
33
|
+
|
|
34
|
+
```mermaid
|
|
35
|
+
flowchart LR
|
|
36
|
+
T[Triage] -->|planner asks, you answer in comments| T
|
|
37
|
+
T -->|you move it| Todo
|
|
38
|
+
B[Backlog] -->|you move it| Todo
|
|
39
|
+
Todo -->|triage writes the spec| S{trusted?}
|
|
40
|
+
S -->|no| A[waits for approval]
|
|
41
|
+
A -->|approved=yes| W
|
|
42
|
+
S -->|yes| W[In Progress: spec, work, review in sandboxes]
|
|
43
|
+
W -->|review approves| D[Done]
|
|
44
|
+
D -->|your comment| W
|
|
45
|
+
W -->|your comment| W
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## What you need
|
|
49
|
+
|
|
50
|
+
- A board that Linear's webhooks can reach: [A board on a server](./18-a-board-on-a-server.md).
|
|
51
|
+
- The loop template set up from a clone of the repository:
|
|
52
|
+
[A feedback loop](./20-a-feedback-loop.md#set-it-up), then
|
|
53
|
+
[Running the feedback loop](./21-running-the-loop.md#go-live).
|
|
54
|
+
- A Linear OAuth application with client credentials tokens turned on, so
|
|
55
|
+
comments and status changes come from the app, not from you:
|
|
56
|
+
[Linear sync](../02-sync/03-linear.md#who-the-comments-are-by).
|
|
57
|
+
- A GitHub App that can push to the repository, and a cloud runner for the
|
|
58
|
+
agents: [Agents in cloud sandboxes](./06-sandboxed-agents.md).
|
|
59
|
+
- `AGENTS.md` and a spec in the repository, written for an agent. See below.
|
|
60
|
+
|
|
61
|
+
## Set up Linear for agents
|
|
62
|
+
|
|
63
|
+
**Give the codebase one team.** The loop's workflows build one repository
|
|
64
|
+
(`repo` in `workflows.json`), and sync maps a team to a channel. In the
|
|
65
|
+
template's `board.ts`, map the team whose issues are about this repository,
|
|
66
|
+
and no other:
|
|
67
|
+
|
|
68
|
+
```ts board.ts
|
|
69
|
+
import { env, linear } from '@openmuster/muster'
|
|
70
|
+
|
|
71
|
+
export const sync = {
|
|
72
|
+
lin: linear({
|
|
73
|
+
secret: env('LINEAR_WEBHOOK_SECRET'),
|
|
74
|
+
clientId: env('LINEAR_CLIENT_ID'),
|
|
75
|
+
clientSecret: env('LINEAR_CLIENT_SECRET'),
|
|
76
|
+
teams: { ENG: 'cards/linear' },
|
|
77
|
+
}),
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Keep the statuses the loop reads.** A card follows its issue's status:
|
|
82
|
+
|
|
83
|
+
| Linear status | The card | Who sets it |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| Triage | Planning: an agent asks questions and drafts | You |
|
|
86
|
+
| Backlog | Parked: nothing runs | You |
|
|
87
|
+
| Todo | Triaged into a spec, then built | You |
|
|
88
|
+
| In Progress | Being built | The loop, when the work starts |
|
|
89
|
+
| Done | The review approved the change | The loop |
|
|
90
|
+
| Canceled, Duplicate | Canceled | You |
|
|
91
|
+
|
|
92
|
+
Moving an issue to In Progress or Done yourself moves nothing: those are the
|
|
93
|
+
statuses the loop writes. A status the loop doesn't know parks the card. If
|
|
94
|
+
your team's statuses have other names, map them with `LOOP_STAGES`
|
|
95
|
+
([Stages](./20-a-feedback-loop.md#stages)).
|
|
96
|
+
|
|
97
|
+
**Trust yourself.** An issue starts work without an approval only if its
|
|
98
|
+
author is in `LOOP_TRUSTED`. Linear users appear on the board by their user
|
|
99
|
+
ID, so comment on any synced issue and read the ID off the reply:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
mu read cards/linear
|
|
103
|
+
export LOOP_TRUSTED=lin:user:3f2a9c1e-4b7d-4e0a-9a51-7c2d8e6b1f03
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Everyone else's issues wait for an approval. A GitHub author is never
|
|
107
|
+
trusted.
|
|
108
|
+
|
|
109
|
+
**Show the issue as worked on.** With `agent: true`, the issue shows the
|
|
110
|
+
app's agent session while a run works on it, with where the run is, and the
|
|
111
|
+
run's last words as the session's response. It needs the OAuth application's
|
|
112
|
+
own webhook, with only Agent session events, and its signing secret:
|
|
113
|
+
|
|
114
|
+
```ts board.ts
|
|
115
|
+
import { env, linear } from '@openmuster/muster'
|
|
116
|
+
|
|
117
|
+
export const sync = {
|
|
118
|
+
lin: linear({
|
|
119
|
+
secret: env('LINEAR_WEBHOOK_SECRET'),
|
|
120
|
+
clientId: env('LINEAR_CLIENT_ID'),
|
|
121
|
+
clientSecret: env('LINEAR_CLIENT_SECRET'),
|
|
122
|
+
agent: true,
|
|
123
|
+
appSecret: env('LINEAR_APP_WEBHOOK_SECRET'),
|
|
124
|
+
teams: { ENG: 'cards/linear' },
|
|
125
|
+
}),
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Without it, the issue gets the run's first progress comment as it was first
|
|
130
|
+
written, and the summary when the run ends.
|
|
131
|
+
|
|
132
|
+
## Write the spec once, in the repository
|
|
133
|
+
|
|
134
|
+
Every agent in the loop reads `AGENTS.md` and the project's spec before
|
|
135
|
+
anything else. They run in sandboxes with a clone of the repository and the
|
|
136
|
+
card, and nothing else: a spec kept only in a Linear document is one they
|
|
137
|
+
never see. Commit it, have `AGENTS.md` point to it, and link it from the
|
|
138
|
+
Linear project's description so people find it too.
|
|
139
|
+
|
|
140
|
+
Write it as a brief to an agent:
|
|
141
|
+
|
|
142
|
+
```markdown SPEC.md
|
|
143
|
+
# Inbox: build prompt
|
|
144
|
+
|
|
145
|
+
You are building Inbox, a keyboard-first desktop mail client for one user,
|
|
146
|
+
in React and TypeScript.
|
|
147
|
+
|
|
148
|
+
## Hard rules
|
|
149
|
+
|
|
150
|
+
- Never send real email in tests, CI, demo mode or screenshots. Tests use mocks.
|
|
151
|
+
- Every pull request passes `pnpm test` and `pnpm typecheck`.
|
|
152
|
+
- Every pull request that changes the UI includes screenshots (see 5).
|
|
153
|
+
|
|
154
|
+
## Goals
|
|
155
|
+
|
|
156
|
+
1. Instant. Everything renders from a local store. (2)
|
|
157
|
+
2. Calm. One centred feed, monochrome, the system font. (3)
|
|
158
|
+
3. Keyboard first. Every action has a shortcut and is in the ⌘K menu. (4)
|
|
159
|
+
|
|
160
|
+
## 5. Screenshots
|
|
161
|
+
|
|
162
|
+
`pnpm demo` runs the app in a browser with sample mail and no account.
|
|
163
|
+
Screenshot the screens your change touches, in light and dark.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
- **Hard rules first:** what must never happen, and what every pull request
|
|
167
|
+
must have.
|
|
168
|
+
- **Goals, numbered,** each pointing to the section that details it.
|
|
169
|
+
- **A way for the agent to see its work.** A demo mode with sample data lets
|
|
170
|
+
an agent build, test and screenshot in a sandbox with no credentials. The
|
|
171
|
+
work agent takes the screenshots the spec asks for, and no others: a spec
|
|
172
|
+
that asks for none gets none.
|
|
173
|
+
|
|
174
|
+
## Plan a feature with an agent
|
|
175
|
+
|
|
176
|
+
Put a new feature in **Triage**. The loop gives it a planner: an agent that
|
|
177
|
+
reads the issue and the repository, builds nothing, and answers on the issue
|
|
178
|
+
with its questions, numbered, and a draft of the change.
|
|
179
|
+
|
|
180
|
+
1. Answer in a comment. Each comment by someone trusted is the planner's next
|
|
181
|
+
round, from Linear on your desktop or your phone.
|
|
182
|
+
2. When the change is too big for one pull request, the planner says how it
|
|
183
|
+
would split it. File each part as its own issue in the project, under its
|
|
184
|
+
milestone, in the order they build on each other. The planner doesn't file
|
|
185
|
+
issues itself.
|
|
186
|
+
3. Move the issue to **Todo** when the draft is right. The triage writes the
|
|
187
|
+
spec from the planner's newest draft and what was said on the issue since.
|
|
188
|
+
|
|
189
|
+
For a whole project, start with one issue in Triage that describes it
|
|
190
|
+
("Plan the first version of Inbox"), answer the planner, then file the split
|
|
191
|
+
it suggests as the project's issues.
|
|
192
|
+
|
|
193
|
+
## Write issues an agent can finish
|
|
194
|
+
|
|
195
|
+
- **Change the issue itself until the work starts.** An edited title or
|
|
196
|
+
description reaches the board, and the issue is triaged again from its new
|
|
197
|
+
text. A comment made before the work starts doesn't reach the triage; in
|
|
198
|
+
Triage it goes to the planner. Once the issue is In Progress, say changes in
|
|
199
|
+
a comment: that is what starts another round.
|
|
200
|
+
- **One issue, one pull request.** A card is one branch. Split anything
|
|
201
|
+
bigger.
|
|
202
|
+
- **Say how to check it.** The triage writes the spec as a title, what to
|
|
203
|
+
change and why, and how to check it works. The closer the issue is to that,
|
|
204
|
+
the less it has to guess.
|
|
205
|
+
- **Order dependent issues yourself.** Every issue in Todo gets its own run,
|
|
206
|
+
at once, each starting from the default branch. Move an issue that builds
|
|
207
|
+
on another to Todo once the other's pull request is merged. Issues that
|
|
208
|
+
touch different code can go together.
|
|
209
|
+
- **Cap the spend.** `mu budget cards 50` stops new work on cards once they
|
|
210
|
+
have cost $50 in all.
|
|
211
|
+
- Labels, the assignee, the priority and the project arrive as labels on the
|
|
212
|
+
card (`tag.bug=bug`, `priority=high`), for your own filters. The loop
|
|
213
|
+
doesn't route on them.
|
|
214
|
+
|
|
215
|
+
## Let it build
|
|
216
|
+
|
|
217
|
+
Move the issue to Todo. On the issue you see, in order:
|
|
218
|
+
|
|
219
|
+
1. **The spec,** written by the triage, as a comment. If the triage finds
|
|
220
|
+
nothing to change in this repository, it says why, and the card is held
|
|
221
|
+
`declined`. Edit the issue to say more, and it is triaged again. Or move
|
|
222
|
+
it to Triage and work it out with the planner first.
|
|
223
|
+
2. **Approval,** for an issue whose author isn't trusted. The card waits
|
|
224
|
+
until someone trusted runs `mu label <card> approved=yes`, or sets the
|
|
225
|
+
label in the inspector. Read the spec, not only the issue: the spec is what
|
|
226
|
+
the work does.
|
|
227
|
+
3. **In Progress,** set by the loop, and the agent session working, with
|
|
228
|
+
`agent: true`.
|
|
229
|
+
4. **The summary** when the run ends: each step's result, and the pull
|
|
230
|
+
request's address. The work pushes `mu/task-<id>` and opens the pull
|
|
231
|
+
request, titled with the card's title.
|
|
232
|
+
5. **The screenshots** of the round, uploaded to Linear and linked from the
|
|
233
|
+
comment. Experimental: files sent through an OAuth app haven't been
|
|
234
|
+
checked against a live workspace.
|
|
235
|
+
6. **Done,** set by the loop when the review approves. Merging the pull
|
|
236
|
+
request is yours.
|
|
237
|
+
|
|
238
|
+
## Iterate from Linear
|
|
239
|
+
|
|
240
|
+
- **Comment on the issue** for another round on the same pull request: the
|
|
241
|
+
comment goes to the agent, the work and its review run again, and the
|
|
242
|
+
commit lands on the same branch. A comment made while a round runs waits
|
|
243
|
+
for it to end. A comment on an issue that is Done reopens it, and the loop
|
|
244
|
+
sets In Progress again.
|
|
245
|
+
- **Comment on the issue, not on the pull request.** A comment on the pull
|
|
246
|
+
request doesn't start a round.
|
|
247
|
+
- **Keep the decision on the issue.** "The accent should be this colour" is a
|
|
248
|
+
comment on the issue. How the agent got there is the pull request's
|
|
249
|
+
business.
|
|
250
|
+
|
|
251
|
+
## What needs the board
|
|
252
|
+
|
|
253
|
+
Most of the work happens in Linear. Three things don't:
|
|
254
|
+
|
|
255
|
+
| To do this | Do it here |
|
|
256
|
+
| --- | --- |
|
|
257
|
+
| Start, park, plan or cancel a change | Linear: the issue's status |
|
|
258
|
+
| Answer the planner, or ask for another round | Linear: a comment on the issue |
|
|
259
|
+
| Approve someone else's issue | The board: `mu label <card> approved=yes`, or the inspector |
|
|
260
|
+
| Answer an agent that blocked on a decision | The board: `mu reply <task> "…"`, then `mu tasks unblock <task>` |
|
|
261
|
+
| See what waits on you | The board: `mu tasks cards/ --state blocked`, or `NOTIFY_CMD` |
|
|
262
|
+
|
|
263
|
+
An agent that blocks mid-run blocks its own task, which isn't the card, so
|
|
264
|
+
its question doesn't reach Linear. Set `NOTIFY_CMD` so you hear about it:
|
|
265
|
+
[What you hear about](./21-running-the-loop.md#what-you-hear-about).
|
|
266
|
+
|
|
267
|
+
## Feedback from the app you are building
|
|
268
|
+
|
|
269
|
+
Paper cuts don't need planning. Give the app a token that can only post
|
|
270
|
+
reports, and send them from the app's server:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
mu token create --as my-app --can 'cards/app=post' --ttl 90d
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
A report from the app is ready when it arrives: the triage turns it into a
|
|
277
|
+
card, which waits for your approval unless the app's reports are trusted
|
|
278
|
+
([Your app's feedback button](https://github.com/openmuster/muster/tree/main/templates/loop#your-apps-feedback-button)).
|
|
279
|
+
Use Triage in Linear for what you want to talk through first, and Todo for
|
|
280
|
+
what you already know.
|
|
281
|
+
|
|
282
|
+
## Coming back later
|
|
283
|
+
|
|
284
|
+
Everything about a change is on its issue: the spec, each round's summary
|
|
285
|
+
and screenshots, and the pull request. The project's issue list says what is
|
|
286
|
+
done, what is in progress and what is next. On the board,
|
|
287
|
+
`mu tasks cards/ --state blocked` lists what waits on you.
|
|
288
|
+
|
|
289
|
+
## When not to
|
|
290
|
+
|
|
291
|
+
- **For work you can't split into pull-request-sized issues.** A card is one
|
|
292
|
+
branch.
|
|
293
|
+
- **With the spec only in Linear.** Agents read the repository.
|
|
294
|
+
- **For issues from people you wouldn't hand an agent.** Approval is per
|
|
295
|
+
card: read each spec before you approve it.
|
|
296
|
+
- **For a single label-triggered pass with no rounds.**
|
|
297
|
+
[A card queue](./19-a-card-queue.md) is smaller: label an issue `agent` and
|
|
298
|
+
get a spec, a pull request and a review back once.
|
|
299
|
+
|
|
300
|
+
## What goes wrong
|
|
301
|
+
|
|
302
|
+
- **Nothing happens when an issue moves to Todo.** The webhook isn't reaching
|
|
303
|
+
the board (Linear's webhook settings list each delivery; `mu daemon status`
|
|
304
|
+
names the sync), the issue is in a team that isn't mapped, or its status
|
|
305
|
+
has a name the loop doesn't know, which parks it.
|
|
306
|
+
- **A round ignores what you wrote in the description.** The issue was
|
|
307
|
+
edited after its work started. Say the change in a comment, which starts a
|
|
308
|
+
round.
|
|
309
|
+
- **A card waits for approval on your own issue.** Your Linear user ID isn't
|
|
310
|
+
in `LOOP_TRUSTED`.
|
|
311
|
+
- **The status doesn't change.** The loop writes it as the OAuth app, with
|
|
312
|
+
its sync's scopes. Linear ends an app's earlier tokens when one is asked for
|
|
313
|
+
with other scopes, so a sync given its own `scopes` needs the same in its
|
|
314
|
+
`SOURCES` entry ([Stages](./20-a-feedback-loop.md#stages)).
|
|
315
|
+
- **Two pull requests conflict.** Two issues in Todo changed the same code.
|
|
316
|
+
Merge one, resolve the other's branch, then comment on its issue if it
|
|
317
|
+
needs another round: the round starts from the branch as you left it.
|
|
318
|
+
|
|
319
|
+
## Next
|
|
320
|
+
|
|
321
|
+
- [A feedback loop](./20-a-feedback-loop.md): every stage, planning, related
|
|
322
|
+
and duplicate cards.
|
|
323
|
+
- [Running the feedback loop](./21-running-the-loop.md): going live,
|
|
324
|
+
approving, answering, and what to do when something stops.
|
|
325
|
+
- [Linear sync](../02-sync/03-linear.md): what comes in, what goes back, and
|
|
326
|
+
the OAuth app.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Guides",
|
|
3
|
+
"pages": [
|
|
4
|
+
"---Agents on a board---",
|
|
5
|
+
"01-coding-agents",
|
|
6
|
+
"05-running-agents",
|
|
7
|
+
"04-inspector",
|
|
8
|
+
"13-terminals",
|
|
9
|
+
"17-mcp",
|
|
10
|
+
"---Work from your tools---",
|
|
11
|
+
"22-building-from-linear",
|
|
12
|
+
"20-a-feedback-loop",
|
|
13
|
+
"21-running-the-loop",
|
|
14
|
+
"19-a-card-queue",
|
|
15
|
+
"03-factory",
|
|
16
|
+
"08-ci",
|
|
17
|
+
"---Patterns---",
|
|
18
|
+
"10-two-agents",
|
|
19
|
+
"11-person-in-the-loop",
|
|
20
|
+
"12-unattended",
|
|
21
|
+
"02-swarm",
|
|
22
|
+
"16-non-code",
|
|
23
|
+
"---Where it runs---",
|
|
24
|
+
"15-several-boards",
|
|
25
|
+
"09-daemon",
|
|
26
|
+
"14-no-cloud",
|
|
27
|
+
"18-a-board-on-a-server",
|
|
28
|
+
"06-sandboxed-agents",
|
|
29
|
+
"---Build your own---",
|
|
30
|
+
"07-build-a-ui"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: CLI reference
|
|
3
|
-
description: Every command
|
|
3
|
+
description: Every mu command and flag as mu help prints it, with how to get help for one command, the exit codes, and what plain and JSON output look like to a script.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Commands
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: The handle
|
|
3
|
-
description:
|
|
3
|
+
description: Use a board from TypeScript with board(). Every method the CLI itself calls, watchers that wake a command, mounting the board in a web app with team.fetch, and running sync from a board module.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## A handle
|
|
@@ -310,7 +310,7 @@ It opens nothing until its first request. It serves only a board on this
|
|
|
310
310
|
machine: on a handle for a board at a URL, every request gets 403. MCP over
|
|
311
311
|
HTTP, `tokenExchange` and requests to join are not served here: those stay
|
|
312
312
|
with `mu serve`. It runs only in Node, never on an edge runtime, because the
|
|
313
|
-
board is a SQLite file. With Next.js, keep `serverExternalPackages: ['muster']`
|
|
313
|
+
board is a SQLite file. With Next.js, keep `serverExternalPackages: ['@openmuster/muster']`
|
|
314
314
|
in `next.config.ts`, so the process has one copy of muster. If the app has a
|
|
315
315
|
`proxy.ts` (or `middleware.ts`), leave the board's routes out of its
|
|
316
316
|
`matcher`: Next.js reads a body that passes through it into memory and cuts
|
|
@@ -353,6 +353,7 @@ The caveats, which are why this is for development only:
|
|
|
353
353
|
`lib/board.ts`. `start()` keeps what it runs on `globalThis`, so a second
|
|
354
354
|
copy finds the host already running. `team.fetch` keeps nothing between
|
|
355
355
|
requests: its token list is in the board's file, so both copies agree.
|
|
356
|
+
|
|
356
357
|
`team.watchers` lists what a handle declares: `{ name, tail, as }` for each,
|
|
357
358
|
declared and not necessarily running.
|
|
358
359
|
|
|
@@ -405,5 +406,5 @@ serves the board without it. Both say why, loudly.
|
|
|
405
406
|
| `conformance` | The checks every backend passes |
|
|
406
407
|
| `claude`, `codex`, `generic`, `runLocal` | Agents, and running one here |
|
|
407
408
|
| `vercel`, `cloudflare`, `e2b`, `boardPolicy` | Running one in a cloud sandbox |
|
|
408
|
-
| `github`, `linear`, `slack`, `env`, `
|
|
409
|
+
| `github`, `linear`, `slack`, `notion`, `env`, `LINEAR_SCOPES` | Sync: the platforms, a secret named by `env('NAME')`, and the scopes a Linear app's token asks for unless you say |
|
|
409
410
|
| `workflowResult(team, id, owner)` | A workflow step's result, for code that goes on from it: `{ workflow, step, request, thread, on, result }` only when the daemon made the task and the run's own worker completed it, as a result is checked before it is quoted. Null otherwise, whatever the task's labels say |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: HTTP
|
|
3
|
-
description:
|
|
3
|
+
description: Call a served board over HTTP from any language. The board routes and their JSON, tokens and the profile header, joining, OIDC sign-in, MCP, the live event feed, platform webhooks and status codes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## The shape
|
|
@@ -8,7 +8,8 @@ description: "What mu serve answers: board routes, the live feed, and webhooks."
|
|
|
8
8
|
Everything is under `/api/board` on the address `mu serve` prints, or
|
|
9
9
|
under the base a web app mounts
|
|
10
10
|
[`team.fetch`](./02-handle.md#mounting-it-in-a-web-app) at. Every
|
|
11
|
-
request
|
|
11
|
+
request carries a token, except a webhook, `joinAsk`, `joinPoll`,
|
|
12
|
+
`tokenExchange` and `GET health`:
|
|
12
13
|
|
|
13
14
|
```text
|
|
14
15
|
Authorization: Bearer mu1...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Events
|
|
3
|
-
description: Every
|
|
3
|
+
description: Every event type in a board's log and the data it carries, for code that reads events, follows the live feed, or filters a wait or tail by type.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## An event
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Errors
|
|
3
|
-
description: Every reason a board or the
|
|
3
|
+
description: Every reason code a board, the CLI or the HTTP API refuses with, and what each means. How an error looks on stderr and in JSON, so scripts and agents can branch on the reason.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## The shape
|
|
@@ -138,7 +138,7 @@ claimed answers `task_ready`, with the claim to run first.
|
|
|
138
138
|
| `config_retired` | A `watchers.json`, `sync.json` or `hooks.json` is left in `~/.config/muster/` from before board modules. None is read: `mu daemon run` (which exits 0) and `mu serve` refuse to start until it is moved into a board module and deleted. The hint shows a module that does what it did; [Porting](./07-porting.md) has each field |
|
|
139
139
|
| `missing_env` | `daemon install --env` named a variable that is not set |
|
|
140
140
|
| `invalid_env` | `env()` was given something that isn't an environment variable's name |
|
|
141
|
-
| `invalid_sync` | A sync given to `board({ sync })` is wrong: a key that isn't a sync name, a value that isn't `github()`, `linear()` or `
|
|
141
|
+
| `invalid_sync` | A sync given to `board({ sync })` is wrong: a key that isn't a sync name, a value that isn't `github()`, `linear()`, `slack()` or `notion()`, a missing `secret`, a bad `filter` or `filesPerDayMB`, or a `sync` beside a `backend` |
|
|
142
142
|
| `invalid_hook` | A hook given to `board({ hooks })` is wrong: a bad name, a key it doesn't take, a URL that isn't https, a secret not named with `env()`, a filter that isn't one, or a name a watcher in the module has. The message names the hook |
|
|
143
143
|
| `invalid_watch` | A watcher given to `board({ watch })` is wrong: a bad name, a key it doesn't take, a filter that isn't one. The message names the watcher |
|
|
144
144
|
| `watch_aborted` | A watcher's run wrote after its `timeout`, or after it was aborted. Its writes are refused, and the try counted as failed |
|
|
@@ -213,7 +213,7 @@ claimed answers `task_ready`, with the claim to run first.
|
|
|
213
213
|
| `module_failed` | The board module didn't load: Node's message, and what to change in the module. `mu daemon run` says so and exits 0, so a service manager leaves it stopped; `mu serve` serves the board without it |
|
|
214
214
|
| `module_not_a_board` | The board module exports no board: `export default board({ ... })`, or `export const team` |
|
|
215
215
|
| `module_two_copies` | The board module's board was made by a second copy of muster: give the project one |
|
|
216
|
-
| `module_version_skew` | The first `node_modules
|
|
216
|
+
| `module_version_skew` | The first muster in a `node_modules` above the board module can't run a module: update it there, or remove it. The message names where it is |
|
|
217
217
|
| `module_and_board` | `--dir`, `--board` or `--url` beside a module named with `--module` or `MUSTER_MODULE`, which names its own board. The default `~/.config/muster/board.ts` is left out instead whenever a flag or `MUSTER_DIR`, `MUSTER_BOARD` or `MUSTER_URL` names the board |
|
|
218
218
|
| `module_and_profile` | `--as` or `MUSTER_PROFILE` beside a board module: the module says who its board and watchers write as |
|
|
219
219
|
| `module_and_no_module` | `--module` and `--no-module` together |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Conformance
|
|
3
|
-
description:
|
|
3
|
+
description: Check that a board, or a backend of your own, behaves like a muster board, with mu conformance or from a test. What the checks cover, and why to run them on a scratch board.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Run it
|
|
@@ -18,7 +18,7 @@ point it at a scratch board. It exits 1 if any check fails.
|
|
|
18
18
|
pass a post is a thread root written by its caller
|
|
19
19
|
pass a reply to a reply lands on the root
|
|
20
20
|
...
|
|
21
|
-
|
|
21
|
+
21 of 21 passed
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## What it checks
|
|
@@ -36,6 +36,8 @@ pass a reply to a reply lands on the root
|
|
|
36
36
|
without the claim's token changes nothing; completing readies what waited.
|
|
37
37
|
- A claim's secret is not in the feed.
|
|
38
38
|
- A block holds a task with a kind; unblock readies it.
|
|
39
|
+
- A task made held is blocked from the start, and no claim takes it.
|
|
40
|
+
- A feed keeps or leaves out blocks by their kind.
|
|
39
41
|
- The last active tasks are listed on request, the latest last.
|
|
40
42
|
- What does not exist is not found.
|
|
41
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Porting from the JSON files
|
|
3
|
-
description:
|
|
3
|
+
description: Move watchers.json, sync.json and hooks.json into a board module, field by field. mu serve and mu daemon run refuse to start while any of the three is still in place.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## What changed
|
package/docs/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: muster
|
|
3
|
-
description: A work queue for coding agents,
|
|
3
|
+
description: A work queue for coding agents, in one SQLite file. Agents claim tasks under a lease and work them in threads that people read and answer, from the mu CLI or from TypeScript.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## What it is
|
|
@@ -28,8 +28,8 @@ mu inspect
|
|
|
28
28
|
checks the board's log, at most a second apart.
|
|
29
29
|
- **Things that happen while nobody types.** Schedules send messages later;
|
|
30
30
|
watchers wake an agent when something happens.
|
|
31
|
-
- **The outside world.** GitHub, Linear and
|
|
32
|
-
|
|
31
|
+
- **The outside world.** GitHub, Linear, Slack and Notion threads sync in
|
|
32
|
+
and out.
|
|
33
33
|
- **Agents started for you.** `mu run` starts Claude Code, Codex, or any
|
|
34
34
|
command on a task, here or, experimentally, in a cloud sandbox.
|
|
35
35
|
|
|
@@ -60,37 +60,52 @@ mu inspect
|
|
|
60
60
|
- [Workflows](./01-concepts/16-workflows.md)
|
|
61
61
|
- [The board module and hosts](./01-concepts/17-board-module.md)
|
|
62
62
|
|
|
63
|
-
## Sync
|
|
64
|
-
|
|
65
|
-
- [Overview](./02-sync/01-overview.md)
|
|
66
|
-
- [GitHub](./02-sync/02-github.md)
|
|
67
|
-
- [Linear](./02-sync/03-linear.md)
|
|
68
|
-
- [Slack](./02-sync/04-slack.md)
|
|
69
|
-
- [Notion](./02-sync/05-notion.md)
|
|
70
|
-
|
|
71
63
|
## Guides
|
|
72
64
|
|
|
65
|
+
**Agents on a board**
|
|
66
|
+
|
|
73
67
|
- [Coding agents](./03-guides/01-coding-agents.md)
|
|
74
|
-
- [A swarm](./03-guides/02-swarm.md)
|
|
75
|
-
- [A software factory](./03-guides/03-factory.md)
|
|
76
|
-
- [The inspector](./03-guides/04-inspector.md)
|
|
77
68
|
- [Running agents](./03-guides/05-running-agents.md)
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
69
|
+
- [The inspector](./03-guides/04-inspector.md)
|
|
70
|
+
- [With your terminal: tmux, Herdr, Rex](./03-guides/13-terminals.md)
|
|
71
|
+
- [An agent with no shell: MCP](./03-guides/17-mcp.md)
|
|
72
|
+
|
|
73
|
+
**Work from your tools**
|
|
74
|
+
|
|
75
|
+
- [Building from Linear](./03-guides/22-building-from-linear.md)
|
|
76
|
+
- [A feedback loop](./03-guides/20-a-feedback-loop.md)
|
|
77
|
+
- [Running the feedback loop](./03-guides/21-running-the-loop.md)
|
|
78
|
+
- [A card queue](./03-guides/19-a-card-queue.md)
|
|
79
|
+
- [A software factory](./03-guides/03-factory.md)
|
|
80
80
|
- [CI](./03-guides/08-ci.md)
|
|
81
|
-
|
|
81
|
+
|
|
82
|
+
**Patterns**
|
|
83
|
+
|
|
82
84
|
- [Two agents: one builds, one reviews](./03-guides/10-two-agents.md)
|
|
83
85
|
- [A person in the loop](./03-guides/11-person-in-the-loop.md)
|
|
84
86
|
- [Running unattended](./03-guides/12-unattended.md)
|
|
85
|
-
- [
|
|
86
|
-
- [With no cloud at all](./03-guides/14-no-cloud.md)
|
|
87
|
-
- [Several repositories, several boards](./03-guides/15-several-boards.md)
|
|
87
|
+
- [A swarm](./03-guides/02-swarm.md)
|
|
88
88
|
- [Work that isn't code](./03-guides/16-non-code.md)
|
|
89
|
-
|
|
89
|
+
|
|
90
|
+
**Where it runs**
|
|
91
|
+
|
|
92
|
+
- [Several repositories, several boards](./03-guides/15-several-boards.md)
|
|
93
|
+
- [Keep the daemon running](./03-guides/09-daemon.md)
|
|
94
|
+
- [With no cloud at all](./03-guides/14-no-cloud.md)
|
|
90
95
|
- [A board on a server](./03-guides/18-a-board-on-a-server.md)
|
|
91
|
-
- [
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
- [Agents in cloud sandboxes](./03-guides/06-sandboxed-agents.md)
|
|
97
|
+
|
|
98
|
+
**Build your own**
|
|
99
|
+
|
|
100
|
+
- [Build a UI](./03-guides/07-build-a-ui.md)
|
|
101
|
+
|
|
102
|
+
## Integrations
|
|
103
|
+
|
|
104
|
+
- [Overview](./02-sync/01-overview.md)
|
|
105
|
+
- [GitHub](./02-sync/02-github.md)
|
|
106
|
+
- [Linear](./02-sync/03-linear.md)
|
|
107
|
+
- [Slack](./02-sync/04-slack.md)
|
|
108
|
+
- [Notion](./02-sync/05-notion.md)
|
|
94
109
|
|
|
95
110
|
## Reference
|
|
96
111
|
|
package/docs/meta.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmuster/muster",
|
|
3
|
-
"version": "0.3.1-alpha.
|
|
3
|
+
"version": "0.3.1-alpha.3",
|
|
4
4
|
"description": "A local-first work queue for coding agents, with the threads people read: leased tasks, one log, wait and tail, schedules and watchers.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
package/dist/main-CuIC8iF4.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { E as VERSION } from "./args-DHgAmYge.js";
|
|
2
|
-
import "./steps-ByzmEzLQ.js";
|
|
3
|
-
import { a as main, i as attend, n as agentPrompt, o as meantCommand, r as agentToken, s as repoUrl, t as SPECS } from "./main-A4nHL5oa.js";
|
|
4
|
-
import "./module-DOkWwWoU.js";
|
|
5
|
-
|
|
6
|
-
export { SPECS, VERSION, agentPrompt, agentToken, attend, main, meantCommand, repoUrl };
|