@bluewombat/runtime 0.7.0 → 0.9.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.
Files changed (135) hide show
  1. package/README.md +126 -100
  2. package/SPECS.md +103 -84
  3. package/dist/cli.js +32 -34
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config/agent-shorthand.d.ts +2 -1
  6. package/dist/config/agent-shorthand.d.ts.map +1 -1
  7. package/dist/config/agent-shorthand.js +30 -9
  8. package/dist/config/agent-shorthand.js.map +1 -1
  9. package/dist/config/defaults.d.ts +0 -2
  10. package/dist/config/defaults.d.ts.map +1 -1
  11. package/dist/config/defaults.js +0 -2
  12. package/dist/config/defaults.js.map +1 -1
  13. package/dist/config/find-config.d.ts +3 -2
  14. package/dist/config/find-config.d.ts.map +1 -1
  15. package/dist/config/find-config.js +4 -4
  16. package/dist/config/find-config.js.map +1 -1
  17. package/dist/config/home.js +2 -2
  18. package/dist/config/home.js.map +1 -1
  19. package/dist/config/load-config.d.ts +2 -2
  20. package/dist/config/load-config.d.ts.map +1 -1
  21. package/dist/config/load-config.js +46 -29
  22. package/dist/config/load-config.js.map +1 -1
  23. package/dist/config/parse-args.d.ts.map +1 -1
  24. package/dist/config/parse-args.js +50 -48
  25. package/dist/config/parse-args.js.map +1 -1
  26. package/dist/config/types.d.ts +40 -24
  27. package/dist/config/types.d.ts.map +1 -1
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/loop/authority.d.ts +3 -4
  33. package/dist/loop/authority.d.ts.map +1 -1
  34. package/dist/loop/authority.js +27 -22
  35. package/dist/loop/authority.js.map +1 -1
  36. package/dist/loop/context.d.ts +8 -3
  37. package/dist/loop/context.d.ts.map +1 -1
  38. package/dist/loop/deliveries.d.ts +16 -16
  39. package/dist/loop/deliveries.d.ts.map +1 -1
  40. package/dist/loop/deliveries.js +35 -187
  41. package/dist/loop/deliveries.js.map +1 -1
  42. package/dist/loop/describe.d.ts +4 -6
  43. package/dist/loop/describe.d.ts.map +1 -1
  44. package/dist/loop/describe.js +2 -2
  45. package/dist/loop/describe.js.map +1 -1
  46. package/dist/loop/drive.d.ts +4 -6
  47. package/dist/loop/drive.d.ts.map +1 -1
  48. package/dist/loop/drive.js +9 -33
  49. package/dist/loop/drive.js.map +1 -1
  50. package/dist/loop/features.d.ts +23 -0
  51. package/dist/loop/features.d.ts.map +1 -0
  52. package/dist/loop/features.js +571 -0
  53. package/dist/loop/features.js.map +1 -0
  54. package/dist/loop/journal.d.ts +1 -1
  55. package/dist/loop/journal.js +2 -2
  56. package/dist/loop/journal.js.map +1 -1
  57. package/dist/loop/lock.d.ts +1 -1
  58. package/dist/loop/lock.js +1 -1
  59. package/dist/loop/open-host.d.ts.map +1 -1
  60. package/dist/loop/open-host.js +23 -24
  61. package/dist/loop/open-host.js.map +1 -1
  62. package/dist/loop/probe.d.ts +1 -1
  63. package/dist/loop/probe.d.ts.map +1 -1
  64. package/dist/loop/probe.js +51 -22
  65. package/dist/loop/probe.js.map +1 -1
  66. package/dist/loop/process-tree.d.ts +1 -1
  67. package/dist/loop/process-tree.js +1 -1
  68. package/dist/loop/report.d.ts +9 -7
  69. package/dist/loop/report.d.ts.map +1 -1
  70. package/dist/loop/report.js +30 -99
  71. package/dist/loop/report.js.map +1 -1
  72. package/dist/loop/streams.d.ts +5 -5
  73. package/dist/loop/streams.d.ts.map +1 -1
  74. package/dist/loop/streams.js +3 -3
  75. package/dist/loop/streams.js.map +1 -1
  76. package/dist/loop/tick.d.ts +6 -4
  77. package/dist/loop/tick.d.ts.map +1 -1
  78. package/dist/loop/tick.js +50 -78
  79. package/dist/loop/tick.js.map +1 -1
  80. package/dist/loop/trace.d.ts +5 -5
  81. package/dist/loop/trace.d.ts.map +1 -1
  82. package/dist/loop/trace.js +5 -14
  83. package/dist/loop/trace.js.map +1 -1
  84. package/dist/loop/transformers.d.ts +3 -13
  85. package/dist/loop/transformers.d.ts.map +1 -1
  86. package/dist/loop/transformers.js +3 -53
  87. package/dist/loop/transformers.js.map +1 -1
  88. package/dist/loop/warm.d.ts +3 -3
  89. package/dist/loop/warm.js +3 -3
  90. package/dist/loop/work-line.d.ts +1 -1
  91. package/dist/operator/agent-plugins.d.ts +11 -0
  92. package/dist/operator/agent-plugins.d.ts.map +1 -1
  93. package/dist/operator/agent-plugins.js +3 -3
  94. package/dist/operator/agent-plugins.js.map +1 -1
  95. package/dist/operator/board.d.ts +3 -8
  96. package/dist/operator/board.d.ts.map +1 -1
  97. package/dist/operator/board.js +2 -11
  98. package/dist/operator/board.js.map +1 -1
  99. package/dist/operator/cancel.d.ts +2 -2
  100. package/dist/operator/cancel.js +6 -6
  101. package/dist/operator/cancel.js.map +1 -1
  102. package/dist/operator/doctor.d.ts +9 -0
  103. package/dist/operator/doctor.d.ts.map +1 -1
  104. package/dist/operator/doctor.js +32 -25
  105. package/dist/operator/doctor.js.map +1 -1
  106. package/dist/operator/explain.d.ts +76 -0
  107. package/dist/operator/explain.d.ts.map +1 -0
  108. package/dist/operator/explain.js +556 -0
  109. package/dist/operator/explain.js.map +1 -0
  110. package/dist/operator/film.d.ts +3 -11
  111. package/dist/operator/film.d.ts.map +1 -1
  112. package/dist/operator/film.js +8 -90
  113. package/dist/operator/film.js.map +1 -1
  114. package/dist/operator/init.d.ts.map +1 -1
  115. package/dist/operator/init.js +41 -49
  116. package/dist/operator/init.js.map +1 -1
  117. package/dist/operator/live.js +1 -1
  118. package/dist/operator/live.js.map +1 -1
  119. package/dist/operator/log.js +3 -4
  120. package/dist/operator/log.js.map +1 -1
  121. package/dist/operator/release.d.ts +2 -2
  122. package/dist/operator/release.js +7 -7
  123. package/dist/operator/release.js.map +1 -1
  124. package/dist/operator/run.d.ts +25 -0
  125. package/dist/operator/run.d.ts.map +1 -0
  126. package/dist/operator/run.js +70 -0
  127. package/dist/operator/run.js.map +1 -0
  128. package/dist/operator/setup.d.ts.map +1 -1
  129. package/dist/operator/setup.js +20 -16
  130. package/dist/operator/setup.js.map +1 -1
  131. package/dist/plugins/manager.d.ts +33 -2
  132. package/dist/plugins/manager.d.ts.map +1 -1
  133. package/dist/plugins/manager.js +67 -0
  134. package/dist/plugins/manager.js.map +1 -1
  135. package/package.json +15 -16
package/SPECS.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Host
2
2
 
3
3
  The composition root, not a Transformer. It is the process you run: Cursor, admission,
4
- Conductor, report. It is not a FeatureStandard transformer and it is not a
4
+ Conductor, report. It is not a TicketStandard transformer and it is not a
5
5
  sequencer — Conductor sequences; this package calls it.
6
6
 
7
- Host does not know a tracker. It resolves one FeatureManager package, hands it
8
- the options it never reads, and drives the `ManagerPort` that package returns.
7
+ Host does not know a tracker. It resolves one TicketTracker package, hands it
8
+ the options it never reads, and drives the `Manager` (a FeatureTracker and a TicketTracker) that package returns.
9
9
  Adding GitLab or Jira changes nothing here.
10
10
 
11
11
  ## 1. Job
@@ -19,7 +19,7 @@ Adding GitLab or Jira changes nothing here.
19
19
  persist) no longer lists Publisher / Refresher slots
20
20
  the work line copy refresh the work line copy
21
21
  one Delivery at a time:
22
- admit / ready / cancel,
22
+ admit / resume / cancel,
23
23
  reconcile, drive, report,
24
24
  save Cursor
25
25
  sweep: drive what is in flight
@@ -29,7 +29,7 @@ Adding GitLab or Jira changes nothing here.
29
29
 
30
30
  **In:** WorkLineStable, how to isolate and fold it (`workLine.isolation`),
31
31
  workspace root, ledger root, a manager specifier and its opaque options,
32
- Planner / Builder / Gate argv.
32
+ Builder / Gate argv.
33
33
  **Out:** a typed result. The CLI maps that to an exit code.
34
34
 
35
35
  ## 2. Faces
@@ -37,12 +37,12 @@ Planner / Builder / Gate argv.
37
37
  | Face | Entry | Must not |
38
38
  | ------ | ------------------------------------------------------------------------------------- | --------------------------------------------- |
39
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 |
40
+ | CLI | `mason run \| watch \| status \| log \| cancel \| release \| init \| setup \| doctor` | Interpret a TicketStandard; 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
44
- Delivery, `drive.ts` runs one Project and reports on the Feature that ran,
45
- `report.ts` maps Conductor outcomes to FeatureManager Events,
44
+ Delivery, `drive.ts` runs one Project and reports on the Ticket that ran,
45
+ `report.ts` maps Conductor outcomes to TicketTracker Events,
46
46
  `journal.ts` and `trace.ts` are its film and its stdout. `loop/` may import
47
47
  Transformer packages: this package **is** the composition root for the
48
48
  execution Transformers. Conductor still must not. Host must not import a
@@ -55,11 +55,11 @@ import rule between them are in [README.md](./README.md) § Layers.
55
55
  `mason.config.yaml`, found by walking up from the working directory, or the
56
56
  file `--config` names. Relative paths in the file resolve against the file;
57
57
  relative paths in a flag resolve against the working directory. Flags override
58
- the file. `--manager-option key=value` merges per key, so overriding one option
58
+ the file. `--feature-tracker-option key=value` (and `--ticket-tracker-option`) merges per key, so overriding one option
59
59
  does not drop the others; a repeated key becomes an array.
60
60
 
61
61
  Host validates only its own keys, against a closed list: an unknown key is a
62
- refusal, not something ignored. `managerOptions` is copied through untouched:
62
+ refusal, not something ignored. Each side's `options` is copied through untouched:
63
63
  a tracker's fields are that package's business, and its errors are that
64
64
  package's words.
65
65
 
@@ -71,7 +71,7 @@ See § 8.
71
71
 
72
72
  ## 4. Loading a manager
73
73
 
74
- `manager` is a package name or a path. Resolution imports the bare specifier
74
+ `featureTracker.package` and `ticketTracker.package` are each a package name or a path. The two sides may name the same package or two different ones: a package asked for a side it does not answer is refused by name. One package with the same options on both sides is built once. `doctor` and `setup` run each distinct manager once; the reference work line is named by the ticket tracker, which holds the Authority. Resolution imports the bare specifier
75
75
  first — mason and its managers installed side by side in one project — then
76
76
  walks up from the config file's directory, which covers a global `mason`
77
77
  driving a locally installed manager. A module without `createManager` is
@@ -95,41 +95,68 @@ not losing an Event.
95
95
 
96
96
  ## 6. One Delivery
97
97
 
98
+ The FeatureTracker's `listen` delivers Features whose specification is final.
98
99
  `adapt` first. Then:
99
100
 
100
- | Adapter | Host |
101
- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
102
- | `invalid` (new, or the intention changed) | `recordInvalid`, emit `invalid` |
103
- | `invalid` (same fingerprint as recorded) | leave it; the tracker was told, and telling it is what delivered it again |
104
- | `upsert` (new/invalid) | `admit`, emit `accepted`, then `runProject` when the Project is free; a Project frozen by an escalation queues the Feature (journal `queued`, one `progress` Event) and the sweep starts it once the Project is free. Post-run Events (`planned` / `done` / `escalated`) are reported on the Feature that was driven, not on the delivered key. `progress` (once per refusal) when the Authority sent the Submission back and a repair is on its way |
105
- | `upsert` (in-flight / terminal) | leave it; do not restart. In-flight is `planning`, `running`, `escalated`, `integrating`, `submitted`; terminal is `merging`, `done`, `cancelled`. An echo of a Host report (Submitted, a progress comment) is this row: do not admit it |
106
- | `upsert` (`received`) | same drive as a new upsert (no second `accepted`) |
107
- | `upsert` + `signalsReady` while `escalated` | same as `ready` — a poll snapshot has no `labeled` edge |
108
- | `ready` | `resumeReady`, emit `resumed`, `runProject`, then the same post-run Events |
109
- | `cancel` | `conductor.cancel`. `cancelled`, or `reject_late` when the ledger says point of no return; nothing on `done` (the issue closing is the Submission's own doing) or `cancelled` |
110
- | `unavailable` / interrupt | stop the tick |
111
-
112
- `runProject` is always preceded by `reconcile` on that Project. Host never
113
- drives an `escalated` Feature: that state is frozen until a human `ready`.
101
+ | Adapter | Host |
102
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103
+ | `invalid` (new, or the intention changed) | emit `invalid` on the Feature, keyed by fingerprint |
104
+ | `invalid` (same fingerprint as recorded) | leave it; the tracker was told, and telling it is what delivered it again |
105
+ | `upsert` (absent or `waiting`) | `admitFeature`, emit `accepted`. Nothing is driven here: the sweep does it |
106
+ | `upsert` (any other state) | leave it; journal `skipped`. An echo of a Host report is this row |
107
+ | `upsert` + `signalsResume` while `escalated` | same as `resume` — a poll snapshot has no `labeled` edge |
108
+ | `resume` | resume the Feature, emit `resumed` |
109
+ | `cancel` | `cancelFeatureFlow`: the Tickets not done are cancelled, the line is dropped, the Project is free |
110
+ | `unavailable` / interrupt | stop the tick |
111
+
112
+ A Ticket is never delivered: the sweep reads the Tickets of the open Feature
113
+ from the TicketTracker (`tickets`). A `resume` on an escalated Ticket, an edit of
114
+ a Ticket not yet started, a Ticket closed on the tracker are read there
115
+ (`syncTickets`) and acted on the same way as for a Feature. A Ticket in flight is
116
+ not admitted again on each pass; only a `received` Ticket whose fingerprint
117
+ changed is.
118
+
119
+ ### The sweep: one Feature per Project
120
+
121
+ Every pass, each Project with a `waiting`, `open` or `submitted` Feature is
122
+ advanced (`advanceProject`):
123
+
124
+ 1. No active Feature: open the next one that may. A Feature may open when every
125
+ Feature blocking it is `done`, and every one of its Tickets
126
+ (`tickets`) is `task_ready`. Order: priority, then age. The Feature is then
127
+ `open`: with an Authority, its line `feature/<id>` is cut from the final
128
+ branch (`openLine`); the Tickets are admitted with their Feature and their
129
+ blockers.
130
+ 2. `open`: the work line copy is refreshed onto the line, then Tickets are
131
+ driven one at a time (a Ticket whose blockers are not `done` is skipped; the
132
+ next by priority then age is taken). Each Ticket's Submission targets the line. When every Ticket
133
+ is `done` or `cancelled` the Feature is closed: the line goes to the
134
+ Authority (`submit`). With no Authority the Feature is `done` at once.
135
+ 3. `submitted`: the Feature waits. Without `merge-when-ready` a human folds it;
136
+ `settled` says `folded` (done) or `closed` (escalated). With
137
+ `merge-when-ready` the assembly judgement runs on the line and the Authority
138
+ folds it. No other Feature opens on the Project meanwhile.
139
+ 4. A Feature whose Tickets are all blocked escalates; one that cannot be
140
+ settled because the Authority lacks `settled` waits.
141
+
142
+ Host never drives an `escalated` unit: that state is frozen until a human `resume`.
114
143
 
115
144
  Every Event Host emits is a write to the tracker, and a tracker that lists by
116
145
  "last updated" delivers the intention again on the next pass because of that
117
146
  write. No row above may emit on that echo: `invalid` is keyed by fingerprint,
118
147
  `accepted` by the ledger not knowing the key (or knowing it `invalid`), the
119
- queued `progress` by `eventId`, the post-run Events by the Feature that was
120
- driven, `resumed` by taking the signal back, `cancelled` by the ledger
121
- refusing a second cancel, an in-flight Feature (including `submitted`) by
148
+ post-run Events by the Ticket that was driven, `resumed` by taking the signal back, `cancelled` by the ledger
149
+ refusing a second cancel, an in-flight Ticket (including `submitted`) by
122
150
  leaving the upsert.
123
151
 
124
152
  On top of that, every Event that states a fact carries an `eventId`, so a
125
153
  manager that already has it says nothing — after a restart as much as within
126
154
  a pass. The id names the fact: `<key>:accepted:<fingerprint>` and
127
- `<key>:invalid:<fingerprint>` (an edit is a new fact), `<key>:planned:<planned_at>`,
128
- `<key>:integrated:<subtask>`, `<key>:submitted:<reference>`,
129
- `<key>:refused:<n>`, `<key>:queued:<blocker>`, `<key>:resumed:<round>`,
130
- `<key>:escalated:<round>:<kind>[:<subtask>]`, `<key>:done`,
155
+ `<key>:invalid:<fingerprint>` (an edit is a new fact), `<key>:submitted:<reference>`,
156
+ `<key>:refused:<n>`, `<key>:resumed:<round>`,
157
+ `<key>:escalated:<round>:<kind>`, `<key>:done`,
131
158
  `<key>:cancelled`, `<key>:reject_late:…`. The round is the ledger's count of
132
- `ready` taken: a Plan refused, resumed and refused again has the same Attempt
159
+ `resume` taken: an escalation resumed and escalated again has the same Attempt
133
160
  count both times, and only the round tells the two escalations apart.
134
161
  `escalation_reminder` alone would carry none, repetition being its point.
135
162
 
@@ -147,7 +174,7 @@ than waited for; the Transformer then answers `interrupted`. `mason run` exits
147
174
 
148
175
  Each pass appends JSON lines to `<ledgerRoot>/events.jsonl` (listen, probed,
149
176
  Transformer progress, admitted, reported, queued, idle, a heartbeat while
150
- `submitted`, one `held` while a Subtask waits on a bail that has not expired).
177
+ `submitted`, one `held` while a unit waits on a bail that has not expired).
151
178
  Every report to the tracker is filmed with how long it took (`ms`): `reported`
152
179
  when the manager took it (including a Thread that already carried that eventId
153
180
  — a duplicate is already said), `report-declined` when it failed. That file is
@@ -156,7 +183,7 @@ the ledger is still right. `mason run` still writes a human Trace on stdout.
156
183
  The journal is how another process attaches.
157
184
 
158
185
  An offer the work could not get past is journaled `submit-refused`, with the
159
- Feature's `key`, `by` (`publisher` when the work could not be placed,
186
+ Ticket's `key`, `by` (`publisher` when the work could not be placed,
160
187
  `authority` when the Authority would not open a Submission) and the refuser's
161
188
  own `reason`. The same reason becomes the escalation's Trace; the line is so
162
189
  `mason log --problems` and a watcher see why a run stopped, not only that it
@@ -164,32 +191,28 @@ did.
164
191
 
165
192
  After listen, if the manager declares `probe` and the listen reached the source
166
193
  (`completed`, `listened` — not `source-lost` / `interrupted` / `invalid-invocation`),
167
- Host asks `probe` of every Feature abandon is still legal for (`received`,
168
- `planning`, `running`, `escalated`, `integrating`, `submitted`). `gone` is the
194
+ Host asks the FeatureTracker's `probe` of every Feature, and the
195
+ TicketTracker's of every Ticket, abandon is still legal for. `gone` is the
169
196
  same abandon as a `cancel` delivery, so a deleted item a poll can never list
170
197
  still frees the Project; `unavailable` is not abandon. Probe runs before the
171
198
  work-line refresh and the deliveries, so a cancel in this pass can start the
172
199
  `received` queue on a copy that was just fast-forwarded.
173
200
 
174
- The sweep after the deliveries drives every Project that has work in flight
175
- **or** `received`, once per tick. The result is reported on the Feature that
176
- was driven. A `received` Feature behind an escalation is journaled `queued`
177
- and left; the next sweep that finds the Project free claims it. The same set
178
- (`in-flight ∪ received`) decides whether this pass refreshes the work line
179
- copy: starting a queued Feature on a copy that was not fast-forwarded this
180
- tick would build on a version that no longer exists.
201
+ The sweep after the deliveries advances every Project that has a `waiting`,
202
+ `open` or `submitted` Feature, once per tick (§ 6). The result is reported on
203
+ the Ticket that was driven. The work line copy is refreshed onto the Feature's
204
+ line before a Ticket starts: starting on a copy that was not fast-forwarded
205
+ would build on a version that no longer exists.
181
206
 
182
207
  ## 8. init, setup, doctor, watch, status, log, cancel and release
183
208
 
184
- `init` writes a config that already runs: the Planner is the bootstrap one from
185
- `@bluewombat/slots/planners/`, the Builder is a stub that says what to replace
209
+ `init` writes a config that already runs: the Builder is a stub that says what to replace
186
210
  (example Cursor CLI and Claude Code Builders live in `@bluewombat/slots/builders/`),
187
211
  and the Gate sequence starts empty. Example Gates live in
188
212
  `@bluewombat/slots/gates/` (`parent-clean`, `sensitive-path`,
189
213
  `workspace-changed`, `ci-green`).
190
214
 
191
- Five independent Gate sequences, one per role — `planner.gates`,
192
- `builder.producer.gates`, `builder.repair.gates`, `assembly.fix.gates`,
215
+ Four independent Gate sequences, one per role — `builder.producer.gates`, `builder.repair.gates`, `assembly.fix.gates`,
193
216
  `assembly.validate.gates` — plus `assembly.gates` for the one judgement-only
194
217
  pass with no producer of its own. No sequence is shared and nothing is
195
218
  dispatched between buckets: a check that is right for one pass can be wrong
@@ -242,13 +265,13 @@ re-cloned. `init` then runs `setup` and offers to apply it, so nothing has to be
242
265
  re-run by hand.
243
266
 
244
267
  A flag is read by the same question that would have asked for it, so
245
- `--manager-option labels=mason` lands in the config in the shape a typed answer
268
+ `--manager-option repo=owner/name` lands in the config in the shape a typed answer
246
269
  would, and a malformed one is refused before anything is written. The setup plan
247
270
  that follows never decides `init`'s exit code: it wrote its files, and
248
271
  `mason init && mason setup --apply` must not stop because a token is not
249
272
  exported yet.
250
273
 
251
- `--manager` turns every question off, which is what a script wants;
274
+ `--manager` (one package for both sides; the config is where they are told apart) turns every question off, which is what a script wants;
252
275
  `--interactive` forces them when stdin is a pipe. Overwriting an existing config
253
276
  needs `--force`, or a yes to the question. Ctrl-C, Ctrl-D, or a pipe running dry
254
277
  stops on the spot with `Cancelled. Nothing written.` and exit 130 — a read after
@@ -278,12 +301,12 @@ the manager, the ledger root — and closes it with `host-stopped` before the lo
278
301
  is released. A journal holds every run that ever wrote to that ledger, and
279
302
  without these a reader cannot tell one process's film from the next, nor a run
280
303
  that ended from one whose process was killed: the missing `host-stopped` is how
281
- the second is said. Every line about a Task also carries the Feature it serves,
282
- as `key`; a line that names a Task and no Feature is a line nothing can join.
304
+ the second is said. Every line about a Task also carries the Ticket it serves,
305
+ as `key`; a line that names a Task and no Ticket is a line nothing can join.
283
306
 
284
307
  `observability.streams` films what every child says, as it says it: the
285
- producers, the Gates, the Planner. One file per child under
286
- `<dir>/<feature>/<task>-attempt-<n>[-gate-<id>]-<stamp>.ndjson`, one JSON object
308
+ producers and the Gates. One file per child under
309
+ `<dir>/<ticket>/<task>-attempt-<n>[-gate-<id>]-<stamp>.ndjson`, one JSON object
287
310
  per chunk with its own stamp and which stream it came from, filed under the same
288
311
  directory name a transcript uses. Each file is named in the journal by a
289
312
  `stream-opened` line, so nothing has to rebuild the path. `dir` resolves against
@@ -300,7 +323,7 @@ killed for writing past its output bound is filmed up to the kill: the bound
300
323
  protects Host's memory, and that child is the one worth having a film of.
301
324
 
302
325
  A film says what it held as it closes — `stream-closed` with the bytes, the
303
- chunks and the milliseconds — and a Feature that reaches `done` or `cancelled`
326
+ chunks and the milliseconds — and a Ticket that reaches `done` or `cancelled`
304
327
  has its films removed, which the journal records as `streams-discarded` with the
305
328
  count and the size. An escalation keeps everything: that is the outcome where
306
329
  somebody has to go and look. Nothing prunes transcripts.
@@ -313,7 +336,7 @@ poll. A `listen` that did not complete is never held and never hidden.
313
336
  `watch` and `status` are the operator live view. They open the ledger the same
314
337
  way `run` does (`openFilesystemPersist` then `openWorkLedger`) and they do not
315
338
  open a manager, Conductor, or Host. `status` prints a snapshot of every known
316
- Feature and exits. `watch` prints that snapshot, then follows new journal lines
339
+ Ticket and exits. `watch` prints that snapshot, then follows new journal lines
317
340
  until SIGINT (exit 0). A missing journal is not an error: the snapshot still
318
341
  stands. `--json` prints the snapshot as JSON. Ctrl-C on watch leaves the worker
319
342
  running. The file can grow without rotation. A followed line that records a
@@ -327,15 +350,13 @@ are hidden. `--all` keeps them. `--problems` keeps only lines that explain a
327
350
  stop. `--tail N` keeps the last N of the text film (0 means no limit). `--json`
328
351
  prints every kept line, and when `--tail` is also passed and drops lines the
329
352
  object names `kept` and `shown`. After the text film it tallies the distinct
330
- problems. A `result` is counted with the exit code of the `planner-finished`
331
- just before it. A run that then pauses, with no exit code, is tallied as
332
- `interrupted`, apart from a non-zero exit that left the same detail. When a
353
+ problems, each stop once with how many times it happened. When a
333
354
  slot was given `--transcript-dir` it names the newest transcript files with
334
355
  the agent exit and duration read from the start of each file. A missing
335
356
  journal is not an error. Exit 2 when the config or `--tail` cannot be read.
336
357
 
337
- `cancel <key>` abandons one Feature the same way a `cancel` delivery does. The
338
- team still abandons in the FeatureManager; this is the hatch when the tracker
358
+ `cancel <key>` abandons one Ticket the same way a `cancel` delivery does. The
359
+ team still abandons in the TicketTracker; this is the hatch when the tracker
339
360
  cannot say the intention is gone (a manager with no `probe`, or an operator
340
361
  who already knows) and the ledger would otherwise freeze the Project. It
341
362
  takes the ledger lock — stop `run` first if it holds it. Exit 0 on cancel or
@@ -343,26 +364,26 @@ already cancelled, 1 when abandon is refused (`done`, point of no return), 2
343
364
  when the key is missing or the ledger does not know it. The key is the first
344
365
  positional: `cancel github:owner/name#19`.
345
366
 
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),
367
+ `release <key>` drops a held unit without waiting for the bail clock — the
368
+ hatch after a crash left nobody on the work. A clean stop releases itself. It
369
+ takes the ledger lock — stop `run` first if it holds it. Exit 0 when the unit
370
+ was released or the Ticket was already free, 1 when the Ticket is not
371
+ `running` (the state is named),
351
372
  2 when the key is missing or the ledger does not know it. The key is the first
352
373
  positional: `release github:owner/name#19`.
353
374
 
354
375
  ## 9. Acceptance
355
376
 
356
377
  1. Convertible upsert in an empty Source → WorkLineStable carries the Builder
357
- marker, Thread `accepted`, `planned`, `done`, Cursor is that file name.
378
+ marker, Thread `accepted`, `done`, Cursor is that file name.
358
379
  2. Unconvertible upsert → Thread `invalid`, no Conductor work, Cursor advanced.
359
- 3. Fail-blocking Gate, then a `ready` Event, then passing Gates → Thread
380
+ 3. Fail-blocking Gate, then a `resume` Event, then passing Gates → Thread
360
381
  contains `escalated` then `resumed` then `done`.
361
382
  4. `cancel` while `escalated` → Thread `cancelled`; WorkLineStable seed-only.
362
383
  5. Re-running `runOnce` with the saved Cursor does not re-deliver the first Event.
363
384
  6. GitHub: convertible issue (mocked API) → WorkLineStable marker, comments
364
- `accepted`, `planned`, `done`.
365
- 7. GitHub: fail-blocking then the same issue with the ready label → `escalated`,
385
+ `accepted`, `done`.
386
+ 7. GitHub: fail-blocking then the same issue with the resume label → `escalated`,
366
387
  `resumed`, `done`.
367
388
  8. A manager named by path, and one named by package, both load; a module without
368
389
  `createManager` is refused by name.
@@ -378,26 +399,24 @@ positional: `release github:owner/name#19`.
378
399
  does not appear; `listInFlight()` is the mid-flight subset.
379
400
  14. A Transformer `status` line and a `gate-finished` line during `runProject`
380
401
  appear in `<ledgerRoot>/events.jsonl`.
381
- 15. `watch` on a ledger with Features and no journal prints the snapshot,
382
- including a `submitted` Feature's reference, and exits 0 on interrupt. It
402
+ 15. `watch` on a ledger with Tickets and no journal prints the snapshot,
403
+ including a `submitted` Ticket's reference, and exits 0 on interrupt. It
383
404
  does not import `openHost` or a manager package.
384
- 16. Two Features on one Project, the first `escalated`: admitting the second
385
- emits `accepted` and one `progress` (queued), not `escalated`; the second
386
- stays `received`. Cancelling the first in a later pass starts the second.
387
- A `submitted` Feature that reaches `done` while a second is delivered
388
- reports `done` on the first.
389
- 17. After an escalation, a `probe` of `gone` cancels that Feature and the sweep
390
- starts the `received` queue in the same pass. `unavailable` leaves the
405
+ 16. Two Features on one Project: the second does not open while the first is
406
+ open, escalated or submitted. A Feature blocked by another does not open
407
+ until it is `done`. A Feature whose Tickets are not all `task-ready` does
408
+ not open.
409
+ 17. After an escalation, a `probe` of `gone` cancels that Ticket (or Feature)
410
+ and the sweep goes on. `unavailable` leaves the
391
411
  escalation. A listen that missed the source does not probe. GitHub: a 404
392
412
  on `GET /issues/{n}` after a completed listen cancels, even when the
393
- listing is empty. `cancel <key>` abandons an escalated Feature.
394
- 18. A Feature `submitted`, then the same upsert delivered again, then the
413
+ listing is empty. `cancel <key>` abandons an escalated Ticket.
414
+ 18. A Ticket `submitted`, then the same upsert delivered again, then the
395
415
  Authority refuses: Host skips the echo, records no `pending_fingerprint`,
396
- and the next pass repairs. It does not escalate as a plan refusal.
416
+ and the next pass repairs. It does not escalate as an edited intention.
397
417
  19. `log` on a journal that recorded `unavailable` with a `detail` prints that
398
418
  detail, hides `idle`, and `--problems` drops the phase labels that are not
399
- themselves the failure. `--json` returns every kept line. A paused run
400
- with no planner exit code is tallied apart from a non-zero exit. It does
419
+ themselves the failure. `--json` returns every kept line. It does
401
420
  not import `openHost`.
402
421
 
403
422
  How to install, configure and run: [README.md](./README.md).
package/dist/cli.js CHANGED
@@ -1,36 +1,37 @@
1
1
  #!/usr/bin/env node
2
- import { PRODUCT } from "@bluewombat/manager-kit";
3
- import { CONFIG_FILENAME } from "./config/find-config.js";
2
+ import { CLI_NAME } from "@bluewombat/manager-kit";
3
+ import { DEFAULT_CONFIG_FILENAME } from "./config/find-config.js";
4
4
  import { DEFAULT_HOME } from "./config/home.js";
5
- import { parseArgs } from "./config/parse-args.js";
6
- import { openHost } from "./loop/open-host.js";
7
5
  import { runCancel } from "./operator/cancel.js";
8
6
  import { runDoctor } from "./operator/doctor.js";
7
+ import { runExplain } from "./operator/explain.js";
9
8
  import { runInit } from "./operator/init.js";
10
9
  import { runLive } from "./operator/live.js";
11
10
  import { runLog } from "./operator/log.js";
12
11
  import { isInteractive, terminalAsk } from "./operator/prompt.js";
13
12
  import { runRelease } from "./operator/release.js";
13
+ import { runRun } from "./operator/run.js";
14
14
  import { runSetup } from "./operator/setup.js";
15
- const USAGE = `Usage: ${PRODUCT} <command>
15
+ const USAGE = `Usage: ${CLI_NAME} <command>
16
16
 
17
- run drain the FeatureManager, run Conductor, report
17
+ run drain the tracker, run Conductor, report
18
18
  watch snapshot the ledger and follow the journal
19
19
  status snapshot the ledger, then exit
20
20
  log replay the journal, including why a phase stopped
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
+ cancel abandon a Ticket by key (when the tracker cannot say it is gone)
22
+ release drop a held unit without waiting for the bail clock
23
23
  init set this directory up — asks, writes, then runs setup
24
24
  doctor check the config, the slots, and the manager
25
+ explain say what an agent role starts with: prompt, plugins, skills (read-only)
25
26
  setup prepare the tracker (--apply to write; a plan without it)
26
27
 
27
- init flags: --manager PKG --manager-option KEY=VALUE --work-line-stable DIR
28
+ init flags: --config FILE --manager PKG --manager-option KEY=VALUE --work-line-stable DIR
28
29
  --clone REMOTE [--branch NAME] --force --interactive
29
30
 
30
- Shared flags: --config FILE --manager NAME --manager-option KEY=VALUE --home DIR
31
+ Shared flags: --config FILE --feature-tracker NAME --feature-tracker-option KEY=VALUE
32
+ --ticket-tracker NAME --ticket-tracker-option KEY=VALUE --home DIR
31
33
  --work-line-stable DIR --work-line-branch NAME --workspace-root DIR --ledger DIR
32
34
  --streams-dir DIR
33
- --planner -- CMD --planner-timeout-ms N
34
35
  --builder -- CMD --builder-timeout-ms N --builder-max-attempts N
35
36
  --builder-repair -- CMD --builder-repair-timeout-ms N
36
37
  --builder-gate ID -- CMD --builder-gate-timeout-ms N
@@ -41,14 +42,15 @@ Shared flags: --config FILE --manager NAME --manager-option KEY=VALUE --home DIR
41
42
 
42
43
  A gate's --*-gate-timeout-ms comes before the --*-gate it bounds.
43
44
 
44
- watch / status also take --json (snapshot as JSON).
45
+ watch / status also take --json (snapshot as JSON). explain takes an optional role
46
+ (builder.producer, builder.repair, assembly.fix, assembly.validate, authority.describe) and --json.
45
47
 
46
48
  log also takes --problems, --all, and --json (every kept line).
47
49
  --tail N limits the text film (0 = no limit). With --json it names kept and shown when it drops lines.
48
50
 
49
- Without --config, the nearest ${CONFIG_FILENAME} is used. --home is where Host
50
- keeps its own files (default ${DEFAULT_HOME}): the ledger, the workspaces, its copy of
51
- the work line.
51
+ Without --config, the nearest ${DEFAULT_CONFIG_FILENAME} is used, and init writes
52
+ that name. --home is where Host keeps its own files (default ${DEFAULT_HOME}): the
53
+ ledger, the workspaces, its copy of the work line.
52
54
 
53
55
  --streams-dir films what every child says, as it says it, one file per child.
54
56
  Naming the directory is what turns it on; the config key "observability.streams"
@@ -67,30 +69,18 @@ function installSignalHandlers(state) {
67
69
  };
68
70
  }
69
71
  async function run(argv) {
70
- const parsed = parseArgs(argv, { cwd: process.cwd() });
71
- if (!parsed.ok) {
72
- process.stderr.write(`${parsed.reason}\n`);
73
- return 2;
74
- }
75
72
  const interruptFlag = { interrupted: false };
76
- const options = { ...parsed.invocation, interruptFlag };
77
73
  const detachSignals = installSignalHandlers(interruptFlag);
78
- let host;
79
74
  try {
80
- host = await openHost(options);
81
- const result = await host.run();
82
- // An interrupt mid-Delivery leaves that run `refused` too: it is still an interrupt.
83
- if (interruptFlag.interrupted) {
84
- return 130;
85
- }
86
- return result.lastRun?.outcome === "refused" ? 1 : 0;
87
- }
88
- catch (error) {
89
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
90
- return 2;
75
+ return await runRun({
76
+ cwd: process.cwd(),
77
+ argv,
78
+ write: (text) => process.stdout.write(text),
79
+ writeError: (text) => process.stderr.write(text),
80
+ interruptFlag,
81
+ });
91
82
  }
92
83
  finally {
93
- await host?.close();
94
84
  detachSignals();
95
85
  }
96
86
  }
@@ -170,6 +160,14 @@ async function main(argv) {
170
160
  write: (line) => process.stdout.write(line),
171
161
  });
172
162
  }
163
+ if (command === "explain") {
164
+ return await runExplain({
165
+ cwd: process.cwd(),
166
+ argv: rest,
167
+ env: process.env,
168
+ write: (text) => process.stdout.write(text),
169
+ });
170
+ }
173
171
  if (command === "cancel") {
174
172
  const interruptFlag = { interrupted: false };
175
173
  const detachSignals = installSignalHandlers(interruptFlag);
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,yBAAyB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,KAAK,GAAG,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAkCC,eAAe;+BAChB,YAAY;;;;;;;CAO1C,CAAC;AAEF,SAAS,qBAAqB,CAAC,KAA+B;IAC5D,MAAM,QAAQ,GAAG,GAAS,EAAE;QAC1B,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IAC3B,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,QAAQ,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C,KAAK,CAAC,IAAI,CAAC;gBAC3C,aAAa;aACd,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,aAAa,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,aAAa,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QAC7C,MAAM,aAAa,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;QAC3D,IAAI,CAAC;YACH,OAAO,MAAM,UAAU,CAAC;gBACtB,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;gBAClB,IAAI,EAAE,IAAI;gBACV,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC3C,aAAa;aACd,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,aAAa,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACnD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
@@ -1,6 +1,5 @@
1
1
  /** The shipped role slot behind each pass that drives an agent. */
2
2
  export declare const ROLE_SCRIPTS: {
3
- readonly planner: "planners/producer.mjs";
4
3
  readonly "builder.producer": "builders/producer.mjs";
5
4
  readonly "builder.repair": "builders/repair.mjs";
6
5
  readonly "assembly.fix": "assembly/fix.mjs";
@@ -17,6 +16,8 @@ export type AgentDecl = {
17
16
  model?: string;
18
17
  home?: string;
19
18
  apiKeyEnv?: string;
19
+ passEnv: string[];
20
+ denyShell: string[];
20
21
  transcripts?: string;
21
22
  pluginsOut?: string;
22
23
  args: string[];
@@ -1 +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,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,GACV,IAAI,CAAC,MAAM,EAAE,CAAC,CA+E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