@bluewombat/runtime 0.5.0 → 0.7.0
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 +142 -57
- package/SPECS.md +35 -18
- package/dist/cli.js +18 -0
- package/dist/cli.js.map +1 -1
- package/dist/config/agent-shorthand.d.ts +45 -0
- package/dist/config/agent-shorthand.d.ts.map +1 -0
- package/dist/config/agent-shorthand.js +256 -0
- package/dist/config/agent-shorthand.js.map +1 -0
- package/dist/config/load-config.d.ts.map +1 -1
- package/dist/config/load-config.js +121 -24
- package/dist/config/load-config.js.map +1 -1
- package/dist/config/parse-args.d.ts.map +1 -1
- package/dist/config/parse-args.js +84 -24
- package/dist/config/parse-args.js.map +1 -1
- package/dist/config/types.d.ts +32 -12
- package/dist/config/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/loop/deliveries.d.ts +16 -0
- package/dist/loop/deliveries.d.ts.map +1 -1
- package/dist/loop/deliveries.js +25 -0
- package/dist/loop/deliveries.js.map +1 -1
- package/dist/loop/drive.d.ts.map +1 -1
- package/dist/loop/drive.js +15 -1
- package/dist/loop/drive.js.map +1 -1
- package/dist/loop/open-host.d.ts +1 -1
- package/dist/loop/open-host.d.ts.map +1 -1
- package/dist/loop/open-host.js +13 -1
- package/dist/loop/open-host.js.map +1 -1
- package/dist/loop/report.d.ts.map +1 -1
- package/dist/loop/report.js +20 -0
- package/dist/loop/report.js.map +1 -1
- package/dist/loop/tick.d.ts +3 -1
- package/dist/loop/tick.d.ts.map +1 -1
- package/dist/loop/tick.js.map +1 -1
- package/dist/loop/transformers.d.ts +9 -2
- package/dist/loop/transformers.d.ts.map +1 -1
- package/dist/loop/transformers.js +31 -29
- package/dist/loop/transformers.js.map +1 -1
- package/dist/loop/warm.d.ts +21 -0
- package/dist/loop/warm.d.ts.map +1 -0
- package/dist/loop/warm.js +59 -0
- package/dist/loop/warm.js.map +1 -0
- package/dist/operator/agent-plugins.d.ts +14 -0
- package/dist/operator/agent-plugins.d.ts.map +1 -0
- package/dist/operator/agent-plugins.js +149 -0
- package/dist/operator/agent-plugins.js.map +1 -0
- package/dist/operator/doctor.d.ts.map +1 -1
- package/dist/operator/doctor.js +27 -20
- package/dist/operator/doctor.js.map +1 -1
- package/dist/operator/film.js +5 -0
- package/dist/operator/film.js.map +1 -1
- package/dist/operator/init.js +14 -5
- package/dist/operator/init.js.map +1 -1
- package/dist/operator/live.js +9 -7
- package/dist/operator/live.js.map +1 -1
- package/dist/operator/release.d.ts +18 -0
- package/dist/operator/release.d.ts.map +1 -0
- package/dist/operator/release.js +65 -0
- package/dist/operator/release.js.map +1 -0
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -50,16 +50,17 @@ package's README — Host does not grow a `--repo` flag for it.
|
|
|
50
50
|
|
|
51
51
|
## Commands
|
|
52
52
|
|
|
53
|
-
| Command
|
|
54
|
-
|
|
|
55
|
-
| `mason run`
|
|
56
|
-
| `mason watch`
|
|
57
|
-
| `mason status`
|
|
58
|
-
| `mason log`
|
|
59
|
-
| `mason init`
|
|
60
|
-
| `mason setup`
|
|
61
|
-
| `mason doctor`
|
|
62
|
-
| `mason cancel`
|
|
53
|
+
| Command | Job |
|
|
54
|
+
| --------------- | -------------------------------------------------------------------------------------- |
|
|
55
|
+
| `mason run` | Drain the FeatureManager, run Conductor, report |
|
|
56
|
+
| `mason watch` | Snapshot the ledger and follow the journal. Ctrl-C leaves the worker running |
|
|
57
|
+
| `mason status` | Snapshot the ledger, then exit. `--json` for scripts |
|
|
58
|
+
| `mason log` | Replay the journal, with the reason a phase stopped. `--problems` for just those |
|
|
59
|
+
| `mason init` | Set this directory up: asks, writes the config and the Builder stub, then runs `setup` |
|
|
60
|
+
| `mason setup` | Prepare the tracker. A plan by default; `--apply` writes. Exit 1 on a blocked step |
|
|
61
|
+
| `mason doctor` | Check the config, the slots, and the manager. Exit 1 on any failure |
|
|
62
|
+
| `mason cancel` | Abandon a Feature by key, when the tracker cannot say it is gone |
|
|
63
|
+
| `mason release` | Drop a held Subtask without waiting for the bail clock |
|
|
63
64
|
|
|
64
65
|
One `run` per ledger: `run` writes `<ledger>/lock` with its pid and a second
|
|
65
66
|
`run` on the same home refuses to start while that process lives (two runs
|
|
@@ -106,6 +107,13 @@ manager with no `probe`), stop `run` if it holds the ledger lock, then:
|
|
|
106
107
|
mason cancel github:owner/name#19
|
|
107
108
|
```
|
|
108
109
|
|
|
110
|
+
After a crash left a Subtask `running` with nobody on it, stop `run` if it
|
|
111
|
+
holds the lock, then:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
mason release github:owner/name#19
|
|
115
|
+
```
|
|
116
|
+
|
|
109
117
|
The film is `<ledger>/events.jsonl`, next to `cursor`. It is not truth after a
|
|
110
118
|
crash — the ledger is. The file can grow; there is no rotation yet.
|
|
111
119
|
|
|
@@ -129,20 +137,25 @@ managerOptions:
|
|
|
129
137
|
workLine:
|
|
130
138
|
stable: ./work-line-stable
|
|
131
139
|
isolation: "@bluewombat/isolation-copy"
|
|
140
|
+
warm:
|
|
141
|
+
cmd: [pnpm, install, --frozen-lockfile]
|
|
142
|
+
timeoutMs: 600000
|
|
132
143
|
planner:
|
|
133
144
|
cmd:
|
|
134
145
|
- node
|
|
135
146
|
- ./node_modules/@bluewombat/slots/planners/one-subtask.mjs
|
|
136
147
|
timeoutMs: 600000
|
|
148
|
+
gates: { defaultTimeoutMs: 120000, gates: [] }
|
|
137
149
|
builder:
|
|
138
150
|
producer:
|
|
139
151
|
cmd: [node, ./mason-builder.mjs]
|
|
140
152
|
timeoutMs: 600000
|
|
153
|
+
gates: { defaultTimeoutMs: 120000, gates: [] }
|
|
141
154
|
repair:
|
|
142
155
|
cmd: [node, ./mason-repair.mjs]
|
|
143
156
|
timeoutMs: 600000
|
|
157
|
+
gates: { defaultTimeoutMs: 120000, gates: [] }
|
|
144
158
|
maxAttempts: 3
|
|
145
|
-
gates: { defaultTimeoutMs: 120000, gates: [] }
|
|
146
159
|
assembly:
|
|
147
160
|
gates: { defaultTimeoutMs: 900000, gates: [] }
|
|
148
161
|
authority:
|
|
@@ -151,31 +164,32 @@ timeoutMs: 600000
|
|
|
151
164
|
pollIntervalMs: 10000
|
|
152
165
|
```
|
|
153
166
|
|
|
154
|
-
| Field | Meaning
|
|
155
|
-
| --------------------------- |
|
|
156
|
-
| `manager` | Package name or path that exports `createManager`
|
|
157
|
-
| `managerOptions` | Opaque to Host. What it holds is the manager's own documentation
|
|
158
|
-
| `workLine.stable` | Existing directory the work folds into. Optional when the manager names a reference work line: Host then keeps its own copy at `<home>/work-line`
|
|
159
|
-
| `workLine.isolation` | Package name or path exporting `strategy` — required. Host loads it like a manager; Isolator/Integrator do not sniff
|
|
160
|
-
| `workLine.isolationOptions` | What that strategy is told, unread by Host — like `managerOptions`. `isolation-git` reads `exclude`, the paths a Child never gets (default `.env`, `.env.*`). A strategy without `createStrategy` refuses any
|
|
161
|
-
| `workLine.
|
|
162
|
-
| `
|
|
163
|
-
| `
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
166
|
-
| `
|
|
167
|
-
| `
|
|
168
|
-
| `
|
|
169
|
-
| `
|
|
170
|
-
| `builder.
|
|
171
|
-
| `builder.
|
|
172
|
-
| `
|
|
173
|
-
| `assembly.
|
|
174
|
-
| `assembly.
|
|
175
|
-
| `assembly.
|
|
176
|
-
| `
|
|
177
|
-
| `
|
|
178
|
-
| `
|
|
167
|
+
| Field | Meaning |
|
|
168
|
+
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
169
|
+
| `manager` | Package name or path that exports `createManager` |
|
|
170
|
+
| `managerOptions` | Opaque to Host. What it holds is the manager's own documentation |
|
|
171
|
+
| `workLine.stable` | Existing directory the work folds into. Optional when the manager names a reference work line: Host then keeps its own copy at `<home>/work-line` |
|
|
172
|
+
| `workLine.isolation` | Package name or path exporting `strategy` — required. Host loads it like a manager; Isolator/Integrator do not sniff |
|
|
173
|
+
| `workLine.isolationOptions` | What that strategy is told, unread by Host — like `managerOptions`. `isolation-git` reads `exclude`, the paths a Child never gets (default `.env`, `.env.*`). A strategy without `createStrategy` refuses any |
|
|
174
|
+
| `workLine.warm` | Optional `cmd` / `timeoutMs`. Runs once in the Feature workspace after Isolation, before any Subtask is copied from it — typically `pnpm install --frozen-lockfile`. Absent: Subtasks inherit a cold Feature |
|
|
175
|
+
| `workLine.branch` | The work line a fold lands on. Without it, what the reference names, or else whatever is checked out |
|
|
176
|
+
| `authority` | `enabled`, the `publish` / `refresh` slots, and the optional `describe` slot (§ Describer). Absent: the fold is local |
|
|
177
|
+
| `home` | Where Host keeps what is its own — default `./.mason` |
|
|
178
|
+
| `workspaceRoot` | Isolated feature / Subtask directories (created). Default `<home>/workspaces` |
|
|
179
|
+
| `ledger` | WorkLedger root (created). The Cursor is a file inside it. Default `<home>/ledger` |
|
|
180
|
+
| `persist` | Package name or path exporting `openPersist({ ledgerRoot })`: how the ledger is stored under that root. Default `@bluewombat/persist-fs`; `@bluewombat/persist-sqlite` ships too. `watch` reads through the same backend |
|
|
181
|
+
| `agents` | Agents a pass names instead of writing `cmd` (§ Agent passes written short) |
|
|
182
|
+
| `planner` | `cmd` / `timeoutMs` / `gates`. FeatureStandard in, a Plan out. Its own `gates` judges `workLineStable` once a Plan is otherwise accepted — not where the Planner agent itself reads from |
|
|
183
|
+
| `builder.producer` | `cmd` / `timeoutMs` / `gates`. Spawned in the Subtask workspace. Exit 0 runs its own `gates` |
|
|
184
|
+
| `builder.repair` | The same, for a pass a Gate refused. **Required**, and never inherited — including its `gates`: a repair with none of its own runs ungated, even when `builder.producer.gates` is not empty |
|
|
185
|
+
| `builder.maxAttempts` | Attempts one Task may start. Default 3 |
|
|
186
|
+
| `assembly.fix` | `cmd` / `timeoutMs` / `gates`. Spawned when a judgement of the whole refused it — by an Authority, by `assembly.validate`, or by both. Judged by its own `gates` |
|
|
187
|
+
| `assembly.validate` | `cmd` / `timeoutMs` / `gates`. Optional. A local, read-only judge of the assembled feature, run after align, with or without an Authority. A refusal is repaired by `assembly.fix` the same as an Authority's. Judged by its own `gates`, never `builder`'s or `assembly.fix`'s |
|
|
188
|
+
| `assembly.maxAttempts` | Attempts that one fix may start. Default 3 |
|
|
189
|
+
| `assembly.gates` | `defaultTimeoutMs` and `gates`: the produce:false judgement-only pass — no producer of its own, re-checking the assembled feature. Empty: the Authority judges alone. Independent of `assembly.fix.gates` / `assembly.validate.gates` — never shared with either |
|
|
190
|
+
| `timeoutMs` | How long a child **outside** a Task may run: manager, isolations |
|
|
191
|
+
| `maxRefusals` | Times the work may be sent back before it escalates, by an Authority, by `assembly.validate`, or by both — one shared budget. Default 3 |
|
|
192
|
+
| `pollIntervalMs` | Set it and the process keeps draining until SIGINT. Absent: one tick. Pick it with § Choosing `pollIntervalMs` — 10000 is the floor worth having |
|
|
179
193
|
| `observability.streams` | `enabled`, `dir`, `keep`. Films what every child says, as it says it — one file per child under `<dir>/<feature>/`, named in the journal by a `stream-opened` line. `dir` resolves against the config file; default `<home>/streams`. `keep` is `stdout` / `stderr`, default both. Off unless `enabled` is true: a stream is the Project's own code and prompts in the clear |
|
|
180
194
|
|
|
181
195
|
Every `cmd` is named where it is used, and nothing falls back to a neighbour: a
|
|
@@ -187,6 +201,66 @@ runs after align, before the Authority sees the work (or before the final
|
|
|
187
201
|
fold, with none). Its refusal is repaired by `assembly.fix` exactly as an
|
|
188
202
|
Authority's is, and shares the same `maxRefusals` budget.
|
|
189
203
|
|
|
204
|
+
Paths a slot **writes** — `--transcript-dir`, `--agent-home` and
|
|
205
|
+
`--plugins-out` — always resolve against the config file's directory, even
|
|
206
|
+
before that directory exists. Left relative they would land inside the Task
|
|
207
|
+
worktree (published, then destroyed). So does `--plugin-dir`, which is read: a
|
|
208
|
+
relative one left as a word would be looked up in the Task worktree.
|
|
209
|
+
|
|
210
|
+
### Agent passes written short
|
|
211
|
+
|
|
212
|
+
A pass that drives an agent through the shipped slots can name the agent
|
|
213
|
+
instead of writing its `cmd`. `agents` declares each agent once; a pass names
|
|
214
|
+
one, its prompt, and the plugins its agent starts with:
|
|
215
|
+
|
|
216
|
+
```yaml
|
|
217
|
+
agents:
|
|
218
|
+
cursor:
|
|
219
|
+
adapter: cursor # or claude, or the path of an agent wrapper
|
|
220
|
+
home: ./.mason/agent-home # with apiKeyEnv: isolate the vendor (Cursor only)
|
|
221
|
+
apiKeyEnv: CURSOR_API_KEY
|
|
222
|
+
transcripts: ./.mason/transcripts
|
|
223
|
+
pluginsOut: ./.mason/plugins # where deck profiles are built
|
|
224
|
+
planner:
|
|
225
|
+
agent: cursor
|
|
226
|
+
prompt: ./prompts/planner.md
|
|
227
|
+
read: ./.mason/work-line # planner only
|
|
228
|
+
plugins: [./ai-plugins/core/planner]
|
|
229
|
+
profile: planner
|
|
230
|
+
args: [--plan] # the vendor CLI's own flags
|
|
231
|
+
timeoutMs: 600000
|
|
232
|
+
builder:
|
|
233
|
+
producer:
|
|
234
|
+
agent: cursor
|
|
235
|
+
prompt: ./prompts/builder.md
|
|
236
|
+
plugins: [./ai-plugins/core/builder]
|
|
237
|
+
profile: builder
|
|
238
|
+
timeoutMs: 1200000
|
|
239
|
+
gates: { defaultTimeoutMs: 120000, gates: [] }
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Host writes the `cmd` it stands for — `node <slots>/<role>.mjs --prompt-file …
|
|
243
|
+
-- node <slots>/agents/cursor.mjs --transcript-dir … --plugin-dir … --profile
|
|
244
|
+
… --plugins-out … --agent-arg …` — with `<slots>` the
|
|
245
|
+
`node_modules/@bluewombat/slots` next to the config. Nothing past the config
|
|
246
|
+
knows a pass was written short. The roles: `planner`, `builder.producer`,
|
|
247
|
+
`builder.repair`, `assembly.fix`, `assembly.validate`, and `authority.describe`
|
|
248
|
+
(an argv as before, or `{ agent, prompt?, plugins?, profile?, args? }`).
|
|
249
|
+
|
|
250
|
+
| Key | Meaning |
|
|
251
|
+
| --------- | --------------------------------------------------------------------------------------------------------- |
|
|
252
|
+
| `agent` | A name `agents` declares. With `cmd` beside it, the pass is refused |
|
|
253
|
+
| `prompt` | `--prompt-file` of the role slot. Absent: the role's built-in template |
|
|
254
|
+
| `rules` | `--rules-file` of the role slot |
|
|
255
|
+
| `read` | Planner only: the directory the Planner agent reads (`--read`) |
|
|
256
|
+
| `plugins` | Plugin folders of the Mason home, each a `--plugin-dir` |
|
|
257
|
+
| `profile` | The project's deck profile for this role. Needs the agent's `pluginsOut`. See the slots' § Agents/Plugins |
|
|
258
|
+
| `args` | Appended to the agent's own `args`, each an `--agent-arg` |
|
|
259
|
+
|
|
260
|
+
A `profile` is read in the project, not in the Mason home: the role gets the
|
|
261
|
+
base plugins and that profile, as the project's committed deck locks pin them.
|
|
262
|
+
`mason doctor` checks those locks in the work line without the network.
|
|
263
|
+
|
|
190
264
|
Every tracker field lives in `managerOptions`. Host does not read them.
|
|
191
265
|
|
|
192
266
|
### Choosing `pollIntervalMs`
|
|
@@ -208,11 +282,11 @@ touch it. It only sets how long `mason run` takes to notice:
|
|
|
208
282
|
a read whose answer did not change comes back 304, which does not count
|
|
209
283
|
against the token's budget.
|
|
210
284
|
|
|
211
|
-
| The tick
|
|
212
|
-
|
|
|
213
|
-
| Nothing to do
|
|
214
|
-
| A Feature in flight
|
|
215
|
-
| A Feature `submitted`
|
|
285
|
+
| The tick | GitHub REST calls | Counted when nothing moved | Besides |
|
|
286
|
+
| --------------------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | ---------------------------------------------- |
|
|
287
|
+
| Nothing to do | 1: the issues updated since the Cursor, 100 per page | 0 (304) | none: no fetch |
|
|
288
|
+
| A Feature in flight | + 1 per Feature that can still be abandoned: is its issue still there | 0 (304) | a `git fetch` of the work line copy (not REST) |
|
|
289
|
+
| A Feature `submitted` | + the judgement: `ci-green` asks for the pull request, its check runs and its statuses (about 3) | about 3: `ci-green` is its own process and keeps no `etag` | |
|
|
216
290
|
|
|
217
291
|
Reports to the tracker (a comment, a label move: 2 to 4 calls each) happen
|
|
218
292
|
when the work moves, not per tick, and each changes the listing: the read
|
|
@@ -318,18 +392,27 @@ that completes cleanly but finds a problem is still a refusal.
|
|
|
318
392
|
|
|
319
393
|
### Gates
|
|
320
394
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
`
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
395
|
+
Five independent sequences, one per role — `planner`, `builder.producer`,
|
|
396
|
+
`builder.repair`, `assembly.fix`, `assembly.validate` — plus `assembly.gates`
|
|
397
|
+
for the one judgement-only pass with no producer of its own (re-checking the
|
|
398
|
+
assembled feature; `ci-green` reads the checks the work line ran on what the
|
|
399
|
+
Publisher placed, so it belongs there). No sharing, no dispatch choosing
|
|
400
|
+
between two buckets: a check right for one pass is not necessarily right for
|
|
401
|
+
another, even within the same stage. `builder.repair` is the sharpest edge —
|
|
402
|
+
it does not inherit `builder.producer.gates`, so a repair Attempt with no
|
|
403
|
+
Gate of its own runs ungated.
|
|
404
|
+
|
|
405
|
+
Implementer's Gates are told `--stage unit` or `--stage assembly` alongside
|
|
406
|
+
`--id`, `--attempt`, `--gate-id`, `--intention` and `--definition-of-done`.
|
|
407
|
+
Most have no use for it. `workspace-changed` does: "nothing changed" means
|
|
408
|
+
nothing was done in a unit, and is the correct outcome for an assembly that
|
|
409
|
+
needed nothing. FeatureBreakdown's Gates (`planner.gates`) are told only
|
|
410
|
+
`--key` and `--gate-id` — no Attempt counter, no `--stage`, no
|
|
411
|
+
`--definition-of-done` — so a Gate written for Implementer's shape is not a
|
|
412
|
+
drop-in for `planner.gates`.
|
|
413
|
+
|
|
414
|
+
`init` writes an empty list on `builder.producer` and `builder.repair`; add a
|
|
415
|
+
Gate when the Project has a check.
|
|
333
416
|
|
|
334
417
|
Every child carries its own ceiling and no other. A Gate entry may name a
|
|
335
418
|
`timeoutMs`; without one it takes its sequence's `defaultTimeoutMs`, and a Gate
|
|
@@ -338,7 +421,9 @@ from what another child left behind, so a slow producer can no longer leave its
|
|
|
338
421
|
Gates a millisecond to answer in.
|
|
339
422
|
|
|
340
423
|
What bounds a Subtask is therefore what you wrote:
|
|
341
|
-
`builder.maxAttempts × (builder.producer.timeoutMs + Σ builder.gates timeouts)
|
|
424
|
+
`builder.maxAttempts × (builder.producer.timeoutMs + Σ builder.producer.gates timeouts)`
|
|
425
|
+
for a first pass, and the same shape with `repair` in place of `producer` once
|
|
426
|
+
a Gate has refused one.
|
|
342
427
|
A repair and an assembly fix each carry their own `timeoutMs`. An assembly fix
|
|
343
428
|
is bounded the same way from `assembly.maxAttempts` and `assembly.fix`.
|
|
344
429
|
|
|
@@ -525,7 +610,7 @@ change that breaks it does not merge.
|
|
|
525
610
|
| `config/` | What a Project wrote: argv, `mason.config.yaml`, discovery, `HostOptions`. Pure: YAML in, options out | A runtime value (a Journal, a Port, a process handle) | Node, `manager-kit` types |
|
|
526
611
|
| `plugins/` | Load a package by name and check its shape: a manager, an isolation strategy | What to do with the loaded thing | `config` |
|
|
527
612
|
| `loop/` | The process: listen → probe → adapt → admit → run → report; composition (`open-host`, `transformers`, Authority, work line, lock, Cursor, journal, trace) | A command a human types; a string a human reads about the config | `plugins`, `config`, the kernel, Transformers |
|
|
528
|
-
| `operator/` | Tools for a human: `init`, `setup`, `doctor`, `watch` / `status`, `log`, `cancel`, `board`, the terminal prompt
|
|
613
|
+
| `operator/` | Tools for a human: `init`, `setup`, `doctor`, `watch` / `status`, `log`, `cancel`, `release`, `board`, the terminal prompt | Anything the loop needs — the loop cannot see this layer | everything below |
|
|
529
614
|
| `index.ts`, `cli.ts` | The package surface and the dispatch. Nothing else sits at the top of `src/` | Logic | everything |
|
|
530
615
|
|
|
531
616
|
Host's code names no plugin. A manager, an isolation strategy, a persistence
|
|
@@ -576,10 +661,10 @@ SPECS.md behavioural contract
|
|
|
576
661
|
README.md how to install, configure and run; the layers above
|
|
577
662
|
src/
|
|
578
663
|
index.ts the package surface
|
|
579
|
-
cli.ts mason run | watch | status | log | cancel | init | setup | doctor
|
|
664
|
+
cli.ts mason run | watch | status | log | cancel | release | init | setup | doctor
|
|
580
665
|
config/ argv, JSON config, config discovery → HostOptions; defaults: the plugin names Host ships with
|
|
581
666
|
plugins/ load: the one loader; manager, isolation, persist: one shape each; discover
|
|
582
667
|
loop/ open-host (composition), tick (the loop), deliveries, drive, probe, report, authority, work-line, cursor, lock, journal (the film), streams (what a child said), trace, transformers
|
|
583
|
-
operator/ init, setup, doctor, live (watch / status), log, film, cancel, board, prompt, git-remote
|
|
668
|
+
operator/ init, setup, doctor, live (watch / status), log, film, cancel, release, board, prompt, git-remote
|
|
584
669
|
fixtures/ stand-in slots for the loop's tests
|
|
585
670
|
```
|
package/SPECS.md
CHANGED
|
@@ -34,10 +34,10 @@ Planner / Builder / Gate argv.
|
|
|
34
34
|
|
|
35
35
|
## 2. Faces
|
|
36
36
|
|
|
37
|
-
| Face | Entry
|
|
38
|
-
| ------ |
|
|
39
|
-
| Import | `openHost(options)` then `runOnce` / `run`
|
|
40
|
-
| CLI | `mason run \| watch \| status \| log \| cancel \| init \| setup \| doctor` | Interpret a FeatureStandard; pick Child paths |
|
|
37
|
+
| Face | Entry | Must not |
|
|
38
|
+
| ------ | ------------------------------------------------------------------------------------- | --------------------------------------------- |
|
|
39
|
+
| Import | `openHost(options)` then `runOnce` / `run` | Live inside Conductor `src/run/` |
|
|
40
|
+
| CLI | `mason run \| watch \| status \| log \| cancel \| release \| init \| setup \| doctor` | Interpret a FeatureStandard; pick Child paths |
|
|
41
41
|
|
|
42
42
|
`src/loop/` is the process: `open-host.ts` opens packages (composition),
|
|
43
43
|
`tick.ts` runs the listen / probe / Cursor / sweep loop, `deliveries.ts` handles one
|
|
@@ -147,9 +147,11 @@ than waited for; the Transformer then answers `interrupted`. `mason run` exits
|
|
|
147
147
|
|
|
148
148
|
Each pass appends JSON lines to `<ledgerRoot>/events.jsonl` (listen, probed,
|
|
149
149
|
Transformer progress, admitted, reported, queued, idle, a heartbeat while
|
|
150
|
-
`submitted`
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
`submitted`, one `held` while a Subtask waits on a bail that has not expired).
|
|
151
|
+
Every report to the tracker is filmed with how long it took (`ms`): `reported`
|
|
152
|
+
when the manager took it (including a Thread that already carried that eventId
|
|
153
|
+
— a duplicate is already said), `report-declined` when it failed. That file is
|
|
154
|
+
a film, not truth: a crash may drop the last lines;
|
|
153
155
|
the ledger is still right. `mason run` still writes a human Trace on stdout.
|
|
154
156
|
The journal is how another process attaches.
|
|
155
157
|
|
|
@@ -177,7 +179,7 @@ and left; the next sweep that finds the Project free claims it. The same set
|
|
|
177
179
|
copy: starting a queued Feature on a copy that was not fast-forwarded this
|
|
178
180
|
tick would build on a version that no longer exists.
|
|
179
181
|
|
|
180
|
-
## 8. init, setup, doctor, watch, status, log and
|
|
182
|
+
## 8. init, setup, doctor, watch, status, log, cancel and release
|
|
181
183
|
|
|
182
184
|
`init` writes a config that already runs: the Planner is the bootstrap one from
|
|
183
185
|
`@bluewombat/slots/planners/`, the Builder is a stub that says what to replace
|
|
@@ -186,16 +188,23 @@ and the Gate sequence starts empty. Example Gates live in
|
|
|
186
188
|
`@bluewombat/slots/gates/` (`parent-clean`, `sensitive-path`,
|
|
187
189
|
`workspace-changed`, `ci-green`).
|
|
188
190
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
191
|
+
Five independent Gate sequences, one per role — `planner.gates`,
|
|
192
|
+
`builder.producer.gates`, `builder.repair.gates`, `assembly.fix.gates`,
|
|
193
|
+
`assembly.validate.gates` — plus `assembly.gates` for the one judgement-only
|
|
194
|
+
pass with no producer of its own. No sequence is shared and nothing is
|
|
195
|
+
dispatched between buckets: a check that is right for one pass can be wrong
|
|
196
|
+
for another, even within the same stage — `workspace-changed` says an Attempt
|
|
197
|
+
that changed nothing did nothing, which is true of `builder.producer`/`repair`
|
|
198
|
+
and false of `assembly.gates`'s pass, whose correct outcome is that nothing
|
|
199
|
+
was left to do. `builder.repair` does not inherit `builder.producer.gates`: a
|
|
200
|
+
repair Attempt with no Gate of its own runs ungated. The assembly's
|
|
201
|
+
judgement-only pass produces nothing unless something refused it first: it is
|
|
202
|
+
a judgement, and a refusal is `assembly.fix`, not a second first-pass. Two
|
|
203
|
+
things may judge it: `assembly.gates` (and an Authority's own checks on what
|
|
204
|
+
was published) and, optionally, `assembly.validate` — a local, read-only pass
|
|
205
|
+
that runs before either, judged by its own `assembly.validate.gates`, not
|
|
206
|
+
`assembly.gates`. Both send a refusal to the same `fix` and spend the same
|
|
207
|
+
`maxRefusals` budget.
|
|
199
208
|
|
|
200
209
|
Every child of a Task carries its own ceiling and no other. Every `cmd` names
|
|
201
210
|
its own `timeoutMs`, and none is inherited from a neighbour — nothing else
|
|
@@ -334,6 +343,14 @@ already cancelled, 1 when abandon is refused (`done`, point of no return), 2
|
|
|
334
343
|
when the key is missing or the ledger does not know it. The key is the first
|
|
335
344
|
positional: `cancel github:owner/name#19`.
|
|
336
345
|
|
|
346
|
+
`release <key>` drops a held Subtask (or a Feature still in `planning`) without
|
|
347
|
+
waiting for the bail clock — the hatch after a crash left nobody on the work.
|
|
348
|
+
A clean stop releases itself. It takes the ledger lock — stop `run` first if
|
|
349
|
+
it holds it. Exit 0 when the Subtask was released or the Feature was already
|
|
350
|
+
free, 1 when the Feature is past `planning` / `running` (the state is named),
|
|
351
|
+
2 when the key is missing or the ledger does not know it. The key is the first
|
|
352
|
+
positional: `release github:owner/name#19`.
|
|
353
|
+
|
|
337
354
|
## 9. Acceptance
|
|
338
355
|
|
|
339
356
|
1. Convertible upsert in an empty Source → WorkLineStable carries the Builder
|
package/dist/cli.js
CHANGED
|
@@ -10,6 +10,7 @@ import { runInit } from "./operator/init.js";
|
|
|
10
10
|
import { runLive } from "./operator/live.js";
|
|
11
11
|
import { runLog } from "./operator/log.js";
|
|
12
12
|
import { isInteractive, terminalAsk } from "./operator/prompt.js";
|
|
13
|
+
import { runRelease } from "./operator/release.js";
|
|
13
14
|
import { runSetup } from "./operator/setup.js";
|
|
14
15
|
const USAGE = `Usage: ${PRODUCT} <command>
|
|
15
16
|
|
|
@@ -18,6 +19,7 @@ const USAGE = `Usage: ${PRODUCT} <command>
|
|
|
18
19
|
status snapshot the ledger, then exit
|
|
19
20
|
log replay the journal, including why a phase stopped
|
|
20
21
|
cancel abandon a Feature by key (when the tracker cannot say it is gone)
|
|
22
|
+
release drop a held Subtask without waiting for the bail clock
|
|
21
23
|
init set this directory up — asks, writes, then runs setup
|
|
22
24
|
doctor check the config, the slots, and the manager
|
|
23
25
|
setup prepare the tracker (--apply to write; a plan without it)
|
|
@@ -184,6 +186,22 @@ async function main(argv) {
|
|
|
184
186
|
detachSignals();
|
|
185
187
|
}
|
|
186
188
|
}
|
|
189
|
+
if (command === "release") {
|
|
190
|
+
const interruptFlag = { interrupted: false };
|
|
191
|
+
const detachSignals = installSignalHandlers(interruptFlag);
|
|
192
|
+
try {
|
|
193
|
+
return await runRelease({
|
|
194
|
+
cwd: process.cwd(),
|
|
195
|
+
argv: rest,
|
|
196
|
+
env: process.env,
|
|
197
|
+
write: (line) => process.stdout.write(line),
|
|
198
|
+
interruptFlag,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
finally {
|
|
202
|
+
detachSignals();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
187
205
|
process.stderr.write(USAGE);
|
|
188
206
|
return 2;
|
|
189
207
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAy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are const ROLE_SCRIPTS: {
|
|
3
|
+
readonly planner: "planners/producer.mjs";
|
|
4
|
+
readonly "builder.producer": "builders/producer.mjs";
|
|
5
|
+
readonly "builder.repair": "builders/repair.mjs";
|
|
6
|
+
readonly "assembly.fix": "assembly/fix.mjs";
|
|
7
|
+
readonly "assembly.validate": "assembly/validate.mjs";
|
|
8
|
+
readonly "authority.describe": "messages/git-producer.mjs";
|
|
9
|
+
};
|
|
10
|
+
export type AgentRole = keyof typeof ROLE_SCRIPTS;
|
|
11
|
+
/** The keys a pass written short may carry, besides its own (`timeoutMs`, `gates`). */
|
|
12
|
+
export declare const SHORT_PASS_KEYS: Set<string>;
|
|
13
|
+
/** One agent as `agents.<name>` declares it, paths already resolved. */
|
|
14
|
+
export type AgentDecl = {
|
|
15
|
+
adapter: string;
|
|
16
|
+
bin?: string;
|
|
17
|
+
model?: string;
|
|
18
|
+
home?: string;
|
|
19
|
+
apiKeyEnv?: string;
|
|
20
|
+
transcripts?: string;
|
|
21
|
+
pluginsOut?: string;
|
|
22
|
+
args: string[];
|
|
23
|
+
};
|
|
24
|
+
export type Agents = ReadonlyMap<string, AgentDecl>;
|
|
25
|
+
type Read<T> = {
|
|
26
|
+
ok: true;
|
|
27
|
+
value: T;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
reason: string;
|
|
31
|
+
};
|
|
32
|
+
export declare function readAgents(value: unknown, configDir: string): Read<Map<string, AgentDecl>>;
|
|
33
|
+
/**
|
|
34
|
+
* The argv a pass written short stands for. `object` is the pass's own
|
|
35
|
+
* mapping; its keys were checked by the caller.
|
|
36
|
+
*/
|
|
37
|
+
export declare function expandAgentPass(object: Record<string, unknown>, role: AgentRole, agents: Agents, configDir: string, key: string): Read<string[]>;
|
|
38
|
+
/** The agent and profile a pass's argv names, written short or not; for `doctor`. */
|
|
39
|
+
export declare function agentPartOf(argv: readonly string[]): {
|
|
40
|
+
profile?: string;
|
|
41
|
+
pluginsOut?: string;
|
|
42
|
+
pluginDirs: string[];
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=agent-shorthand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-shorthand.d.ts","sourceRoot":"","sources":["../../src/config/agent-shorthand.ts"],"names":[],"mappings":"AA2BA,mEAAmE;AACnE,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,YAAY,CAAC;AAclD,uFAAuF;AACvF,eAAO,MAAM,eAAe,aAAsE,CAAC;AAEnG,wEAAwE;AACxE,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD,KAAK,IAAI,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAmF1F;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,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