@telora/daemon 0.24.40 → 0.24.42

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 (58) hide show
  1. package/build-info.json +2 -2
  2. package/dist/composition/daemon-contexts.js +1 -1
  3. package/dist/composition/tower-pass-context.d.ts +6 -1
  4. package/dist/composition/tower-pass-context.d.ts.map +1 -1
  5. package/dist/composition/tower-pass-context.js +12 -2
  6. package/dist/composition/tower-pass-context.js.map +1 -1
  7. package/dist/config/live-daemon-config.js +1 -1
  8. package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
  9. package/dist/daemon-state/awaiting-slot.js +2 -0
  10. package/dist/daemon-state/awaiting-slot.js.map +1 -1
  11. package/dist/daemon-state/focus-team-state.js +1 -1
  12. package/dist/directive/directive-queue.js +1 -1
  13. package/dist/focus/daemon-contexts.js +1 -1
  14. package/dist/focus/focus-poller-spawn.js +2 -2
  15. package/dist/focus/focus-poller-spawn.js.map +1 -1
  16. package/dist/focus/focus-poller-state.js +1 -1
  17. package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
  18. package/dist/focus/pending-spawn-pass-deps.js +2 -0
  19. package/dist/focus/pending-spawn-pass-deps.js.map +1 -1
  20. package/dist/focus/ready-focus-spawn-action.d.ts.map +1 -1
  21. package/dist/focus/ready-focus-spawn-action.js +2 -2
  22. package/dist/focus/ready-focus-spawn-action.js.map +1 -1
  23. package/dist/queries/api-client/shared.js +1 -1
  24. package/dist/queries/focuses/focus-discovery.js +1 -1
  25. package/dist/spawn/spawn-decision.d.ts.map +1 -1
  26. package/dist/spawn/spawn-decision.js +1 -18
  27. package/dist/spawn/spawn-decision.js.map +1 -1
  28. package/dist/supervision/spawn-cooldown.js +1 -1
  29. package/dist/testing/fixtures/api-client.js +1 -1
  30. package/dist/testing/fixtures/index.js +1 -1
  31. package/dist/testing/fixtures/pending-spawn-world.js +1 -1
  32. package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
  33. package/dist/testing/fixtures/review-loop.d.ts.map +1 -1
  34. package/dist/testing/fixtures/review-loop.js +2 -0
  35. package/dist/testing/fixtures/review-loop.js.map +1 -1
  36. package/dist/tower/tower-admission.d.ts +46 -9
  37. package/dist/tower/tower-admission.d.ts.map +1 -1
  38. package/dist/tower/tower-admission.js +59 -9
  39. package/dist/tower/tower-admission.js.map +1 -1
  40. package/dist/tower/tower-graph.d.ts.map +1 -1
  41. package/dist/tower/tower-graph.js +2 -1
  42. package/dist/tower/tower-graph.js.map +1 -1
  43. package/dist/tower/tower-heartbeat-status.d.ts +1 -1
  44. package/dist/tower/tower-heartbeat-status.d.ts.map +1 -1
  45. package/dist/tower/tower-heartbeat-status.js.map +1 -1
  46. package/dist/tower/tower-pass-standing.d.ts +11 -0
  47. package/dist/tower/tower-pass-standing.d.ts.map +1 -1
  48. package/dist/tower/tower-pass-standing.js +33 -1
  49. package/dist/tower/tower-pass-standing.js.map +1 -1
  50. package/dist/tower/tower-pass.d.ts +28 -4
  51. package/dist/tower/tower-pass.d.ts.map +1 -1
  52. package/dist/tower/tower-pass.js +60 -18
  53. package/dist/tower/tower-pass.js.map +1 -1
  54. package/dist/tower/tower-spawn-intent.d.ts.map +1 -1
  55. package/dist/tower/tower-spawn-intent.js +3 -2
  56. package/dist/tower/tower-spawn-intent.js.map +1 -1
  57. package/docs/runbook-tower.md +33 -5
  58. package/package.json +2 -2
@@ -153,6 +153,25 @@ that is no longer armed. A pass that throws for one product is logged and never
153
153
  stops another product's pass; admission fails open on that product's foci at
154
154
  once (see the fail-open rule).
155
155
 
156
+ The head-of-pass run is not the only one. A focus armed or re-armed AFTER the
157
+ poll's pass read the armed set -- most often with a stage directive queued for
158
+ it in the same poll, which the pending-spawn pass acts on later in that poll --
159
+ has no verdict for its current arm. Both spawn passes, ready and pending, admit
160
+ through one rule (`admitThroughTower`, `tower/tower-admission.ts`): when the
161
+ product's pass is standing and no pass of this daemon has computed a verdict for
162
+ the focus under its current `agent_assigned_at`, admission runs that product's
163
+ pass on the spot (`computeTowerVerdictForAdmission`, `tower/tower-pass.ts`;
164
+ the focus counted as wanting a team), writes the product's changed verdicts,
165
+ and admits against the verdict it just computed. So a just-armed focus is held
166
+ from its first poll, whichever pass reaches it, and every re-arm gets its own
167
+ verdict before it can spawn. The daemon logs `[tower] "<focus>": no verdict
168
+ computed for its current arm yet -- computing it before admission`. Pinned by
169
+ `tower/tower-arm-admission.test.ts` (the 2026-10-26 sequence, and each hold
170
+ reason through both paths), `tower/tower-depends-on-admission.test.ts` (an
171
+ unlanded depends_on predecessor, through the production tower read, graph judge
172
+ and git LANDED check, holding both paths until it lands) and
173
+ `tower/tower-entrypoints.test.ts`.
174
+
156
175
  ## The three modes: `TELORA_TOWER_MODE`
157
176
 
158
177
  Declared in `@telora/daemon-core` `env-config.ts`; default **`observe`**.
@@ -171,14 +190,23 @@ most recent pass for the product succeeded, within the freshness bound. When the
171
190
  product's pass fails -- or has not yet succeeded since the daemon started --
172
191
  every verdict of that product is unobeyed AT ONCE, however fresh, and the daemon
173
192
  logs `[tower] "<focus>": its product's tower pass failed -- failing open`.
174
- Another product's holds are untouched. A verdict that is
175
-
176
- - missing,
193
+ Another product's holds are untouched -- and this includes a pass admission ran
194
+ itself for a just-armed focus: if that computation fails, the product's pass is
195
+ failed and the focus spawns.
196
+
197
+ A verdict that is NOT YET COMPUTED -- missing, or computed under an earlier arm
198
+ (its `armedAt` is not the focus's current `agent_assigned_at`), while the
199
+ product's pass stands and no pass of this daemon has seen the current arm -- is
200
+ not a failure of the tower, so admission does not fail open on it: it computes
201
+ the verdict first (see the slot rule above) and admits against that. Only once
202
+ the tower has had its chance is a verdict that is
203
+
204
+ - missing (the pass computed none for this arm, e.g. its inputs could not be judged),
177
205
  - unreadable,
178
206
  - older than the bounded age (`TOWER_VERDICT_MAX_AGE_MS`, 5 minutes), or
179
- - computed under an earlier arm (its `armedAt` is not the focus's current `agent_assigned_at`)
207
+ - computed under an earlier arm although a pass has seen the current one (a read that raced the write)
180
208
 
181
- is NO verdict: the focus spawns exactly as it would with the tower off, the
209
+ NO verdict: the focus spawns exactly as it would with the tower off, the
182
210
  daemon logs `[tower] "<focus>": tower verdict unavailable (<why>) -- failing
183
211
  open`, and the dashboard names it ("Tower verdict unavailable (stale) --
184
212
  spawns as with the tower off"). A tower that stops writing therefore releases
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telora/daemon",
3
- "version": "0.24.40",
3
+ "version": "0.24.42",
4
4
  "description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,7 +41,7 @@
41
41
  "//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. Test files live beside the modules they exercise (owner-directory layout); the runner discovers them recursively.",
42
42
  "dependencies": {
43
43
  "@telora/daemon-core": "^0.3.2",
44
- "@telora/mcp-products": "^0.23.18",
44
+ "@telora/mcp-products": "^0.23.19",
45
45
  "commander": "^14.0.3",
46
46
  "yaml": "^2.4.0",
47
47
  "zod": "^4.3.6"