@wildo-ai/platform-core-shared 1.1.10 → 1.1.12

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 (142) hide show
  1. package/dist/esm/core/resources/resources-operations.custom.shared.definitions.js.map +1 -1
  2. package/dist/esm/core/resources/resources-relationships.custom.shared.definitions.js.map +1 -1
  3. package/dist/esm/core/resources/resources-types.custom.shared.schemas.d.ts.map +1 -1
  4. package/dist/esm/core/resources/resources-types.custom.shared.schemas.js.map +1 -1
  5. package/dist/esm/dev-runtime/dependency-install-record.d.ts +111 -0
  6. package/dist/esm/dev-runtime/dependency-install-record.d.ts.map +1 -0
  7. package/dist/esm/dev-runtime/dependency-install-record.js +185 -0
  8. package/dist/esm/dev-runtime/dependency-install-record.js.map +1 -0
  9. package/dist/esm/dev-runtime/dev-runtime-command.d.ts +50 -0
  10. package/dist/esm/dev-runtime/dev-runtime-command.d.ts.map +1 -0
  11. package/dist/esm/dev-runtime/dev-runtime-command.js +147 -0
  12. package/dist/esm/dev-runtime/dev-runtime-command.js.map +1 -0
  13. package/dist/esm/dev-runtime/dev-runtime-processes.d.ts +47 -0
  14. package/dist/esm/dev-runtime/dev-runtime-processes.d.ts.map +1 -0
  15. package/dist/esm/dev-runtime/dev-runtime-processes.js +163 -0
  16. package/dist/esm/dev-runtime/dev-runtime-processes.js.map +1 -0
  17. package/dist/esm/dev-runtime/dev-runtime-signals.d.ts +54 -0
  18. package/dist/esm/dev-runtime/dev-runtime-signals.d.ts.map +1 -0
  19. package/dist/esm/dev-runtime/dev-runtime-signals.js +113 -0
  20. package/dist/esm/dev-runtime/dev-runtime-signals.js.map +1 -0
  21. package/dist/esm/dev-runtime/emitted-relative-specifiers.d.ts +14 -0
  22. package/dist/esm/dev-runtime/emitted-relative-specifiers.d.ts.map +1 -0
  23. package/dist/esm/dev-runtime/emitted-relative-specifiers.js +71 -0
  24. package/dist/esm/dev-runtime/emitted-relative-specifiers.js.map +1 -0
  25. package/dist/esm/dev-runtime/frontend-dev-runtime.d.ts +43 -0
  26. package/dist/esm/dev-runtime/frontend-dev-runtime.d.ts.map +1 -0
  27. package/dist/esm/dev-runtime/frontend-dev-runtime.js +42 -0
  28. package/dist/esm/dev-runtime/frontend-dev-runtime.js.map +1 -0
  29. package/dist/esm/dev-runtime/node-runtime-dev-supervisor.d.ts +233 -0
  30. package/dist/esm/dev-runtime/node-runtime-dev-supervisor.d.ts.map +1 -0
  31. package/dist/esm/dev-runtime/node-runtime-dev-supervisor.js +578 -0
  32. package/dist/esm/dev-runtime/node-runtime-dev-supervisor.js.map +1 -0
  33. package/dist/esm/dev-runtime/package-compile-loop.d.ts +125 -0
  34. package/dist/esm/dev-runtime/package-compile-loop.d.ts.map +1 -0
  35. package/dist/esm/dev-runtime/package-compile-loop.js +386 -0
  36. package/dist/esm/dev-runtime/package-compile-loop.js.map +1 -0
  37. package/dist/esm/dev-runtime.exports.d.ts +19 -0
  38. package/dist/esm/dev-runtime.exports.d.ts.map +1 -0
  39. package/dist/esm/dev-runtime.exports.js +19 -0
  40. package/dist/esm/dev-runtime.exports.js.map +1 -0
  41. package/dist/esm/index.d.ts +4 -0
  42. package/dist/esm/index.d.ts.map +1 -1
  43. package/dist/esm/index.js +4 -0
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/runtime/application-backend-env.contracts.d.ts +16 -2
  46. package/dist/esm/runtime/application-backend-env.contracts.d.ts.map +1 -1
  47. package/dist/esm/runtime/application-backend-env.contracts.js +20 -1
  48. package/dist/esm/runtime/application-backend-env.contracts.js.map +1 -1
  49. package/dist/esm/runtime/application-worker-env.contracts.d.ts +14 -4
  50. package/dist/esm/runtime/application-worker-env.contracts.d.ts.map +1 -1
  51. package/dist/esm/runtime/application-worker-env.contracts.js +12 -0
  52. package/dist/esm/runtime/application-worker-env.contracts.js.map +1 -1
  53. package/dist/esm/runtime/backend-start-outcome.contracts.d.ts +27 -0
  54. package/dist/esm/runtime/backend-start-outcome.contracts.d.ts.map +1 -1
  55. package/dist/esm/runtime/backend-start-outcome.contracts.js +34 -0
  56. package/dist/esm/runtime/backend-start-outcome.contracts.js.map +1 -1
  57. package/dist/esm/runtime/frontend-settings-hub-wiring.contracts.d.ts +28 -0
  58. package/dist/esm/runtime/frontend-settings-hub-wiring.contracts.d.ts.map +1 -0
  59. package/dist/esm/runtime/frontend-settings-hub-wiring.contracts.js +35 -0
  60. package/dist/esm/runtime/frontend-settings-hub-wiring.contracts.js.map +1 -0
  61. package/dist/esm/runtime/http-server-env.contracts.d.ts +14 -1
  62. package/dist/esm/runtime/http-server-env.contracts.d.ts.map +1 -1
  63. package/dist/esm/runtime/http-server-env.contracts.js +13 -0
  64. package/dist/esm/runtime/http-server-env.contracts.js.map +1 -1
  65. package/dist/esm/runtime/local-dev-runtime-signals.contracts.d.ts +239 -0
  66. package/dist/esm/runtime/local-dev-runtime-signals.contracts.d.ts.map +1 -0
  67. package/dist/esm/runtime/local-dev-runtime-signals.contracts.js +256 -0
  68. package/dist/esm/runtime/local-dev-runtime-signals.contracts.js.map +1 -0
  69. package/dist/esm/runtime/runtime-topology.contracts.js.map +1 -1
  70. package/dist/esm/security/authorizations/roles.custom.shared.definitions.js.map +1 -1
  71. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts +362 -36
  72. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts.map +1 -1
  73. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.js +4 -3
  74. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.js.map +1 -1
  75. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.d.ts +400 -37
  76. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.d.ts.map +1 -1
  77. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.js +107 -1
  78. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.js.map +1 -1
  79. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts +26 -26
  80. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts.map +1 -1
  81. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.js +4 -3
  82. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.js.map +1 -1
  83. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts +33 -27
  84. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts.map +1 -1
  85. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js +26 -2
  86. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js.map +1 -1
  87. package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.d.ts +3 -3
  88. package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.d.ts.map +1 -1
  89. package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.js +30 -42
  90. package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.js.map +1 -1
  91. package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.d.ts +9 -9
  92. package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.js.map +1 -1
  93. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.resources-config.schemas.js.map +1 -1
  94. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.schemas.d.ts +7 -7
  95. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.schemas.js.map +1 -1
  96. package/dist/esm/workbench/creation-drive.custom.shared.schemas.d.ts +52 -0
  97. package/dist/esm/workbench/creation-drive.custom.shared.schemas.d.ts.map +1 -0
  98. package/dist/esm/workbench/creation-drive.custom.shared.schemas.js +49 -0
  99. package/dist/esm/workbench/creation-drive.custom.shared.schemas.js.map +1 -0
  100. package/dist/esm/workbench/creation-journey-timeline.custom.shared.schemas.d.ts +183 -0
  101. package/dist/esm/workbench/creation-journey-timeline.custom.shared.schemas.d.ts.map +1 -0
  102. package/dist/esm/workbench/creation-journey-timeline.custom.shared.schemas.js +188 -0
  103. package/dist/esm/workbench/creation-journey-timeline.custom.shared.schemas.js.map +1 -0
  104. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.d.ts.map +1 -1
  105. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js +76 -0
  106. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js.map +1 -1
  107. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.d.ts +170 -7
  108. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.d.ts.map +1 -1
  109. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.js +177 -7
  110. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.js.map +1 -1
  111. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.d.ts +21 -3
  112. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.d.ts.map +1 -1
  113. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.js +7 -0
  114. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.js.map +1 -1
  115. package/dist/esm/workbench/workbench-creation-dossier.custom.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/workbench/workbench-creation-dossier.custom.shared.schemas.js.map +1 -1
  117. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts +611 -405
  118. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts.map +1 -1
  119. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js +98 -17
  120. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js.map +1 -1
  121. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts +821 -240
  122. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts.map +1 -1
  123. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js +795 -41
  124. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js.map +1 -1
  125. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts +34 -0
  126. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts.map +1 -1
  127. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js +31 -0
  128. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js.map +1 -1
  129. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts +14 -2
  130. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts.map +1 -1
  131. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js +25 -3
  132. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js.map +1 -1
  133. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts +353 -250
  134. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts.map +1 -1
  135. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js +1 -0
  136. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js.map +1 -1
  137. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts +34 -29
  138. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts.map +1 -1
  139. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.js +9 -5
  140. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.js.map +1 -1
  141. package/dist/tsconfig.build.tsbuildinfo +1 -1
  142. package/package.json +13 -8
@@ -1,5 +1,5 @@
1
- import { ApplicationInterviewDepth, MetaWorkflow_ClarificationAction, MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';
2
- import { EngineCapability, HumanDecision_FieldKind, } from '@wildo-ai/saas-models';
1
+ import { ApplicationInterviewDepth, MetaWorkflow_ClarificationAction, MetaWorkflow_ElicitationNonAnswer, MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';
2
+ import { AgentWorkShortfallKind, EngineCapability, FlowsActors_Status, HumanDecision_FieldKind, } from '@wildo-ai/saas-models';
3
3
  import { z } from 'zod';
4
4
  import { initZodDecorators, StringEditMode } from '@wildo-ai/zod-decorators';
5
5
  import { WorkbenchSpecificationArtifactConcern } from './workbench-resources.custom.shared.schemas.js';
@@ -53,6 +53,8 @@ export var WorkbenchCreationPlaneBehavior;
53
53
  /** The build lane's dispatch history, one row per attempt. */
54
54
  WorkbenchCreationPlaneBehavior["BUILD_DISPATCH_PLAN"] = "creation-plane.build-dispatch-plan";
55
55
  WorkbenchCreationPlaneBehavior["BUILD_DISPATCHES"] = "creation-plane.build-dispatches";
56
+ /** Everything the build knows about each task (#2530): its attempts, whose failures they were, what they cost, why it has not landed. */
57
+ WorkbenchCreationPlaneBehavior["BUILD_TASK_RECORDS"] = "creation-plane.build-task-records";
56
58
  /** The playbook runs suspended waiting on a person. */
57
59
  WorkbenchCreationPlaneBehavior["PLAYBOOK_RUNS"] = "creation-plane.playbook-runs";
58
60
  WorkbenchCreationPlaneBehavior["WAITING_PLAYBOOK_RUNS"] = "creation-plane.waiting-playbook-runs";
@@ -171,18 +173,13 @@ export var WorkbenchBuildPlanTaskStatus;
171
173
  */
172
174
  export var Workbench_BuildTaskStuckReason;
173
175
  (function (Workbench_BuildTaskStuckReason) {
174
- /** It already ran, and its declared product is absent even from the working tree: fix the declaration or the work. */
175
- Workbench_BuildTaskStuckReason["COMPLETED_UNLANDED"] = "completed_unlanded";
176
176
  /**
177
- * It already ran, and its declared product IS in the working tree but not committed. Landing means
178
- * committed because acceptance is a commit.
177
+ * It already ran, and its declared product is absent from the working tree: fix the declaration or the work.
179
178
  *
180
- * Under GUIDED that is the whole story, and the remedy is to review and commit what the run wrote.
181
- * Under the autonomy posture the loop has ALREADY tried to commit it (#1534), so reaching this state
182
- * means its accept REFUSED a path — carried changes from before the run, edited since, or not this
183
- * run's — and the companion's warning names which. The remedy is that refusal's, not a blind commit.
179
+ * There is no "written, awaiting a commit" reason (#3514): a task lands when its product is in the working tree and
180
+ * something checked it (#3204), and a commit is a build checkpoint that records, never a condition of landing.
184
181
  */
185
- Workbench_BuildTaskStuckReason["COMPLETED_AWAITING_COMMIT"] = "completed_awaiting_commit";
182
+ Workbench_BuildTaskStuckReason["COMPLETED_UNLANDED"] = "completed_unlanded";
186
183
  /** Its run suspended on a question nobody has answered; re-dispatching would abandon that session. */
187
184
  Workbench_BuildTaskStuckReason["PARKED_AWAITING_ANSWER"] = "parked_awaiting_answer";
188
185
  /** It produces a governed document the engine catalog does not define, so no run can author it. */
@@ -200,7 +197,147 @@ export var Workbench_BuildTaskStuckReason;
200
197
  * or two agents would build the same task. Nobody's move: it clears when that run settles.
201
198
  */
202
199
  Workbench_BuildTaskStuckReason["IN_FLIGHT"] = "in_flight";
200
+ /**
201
+ * A live run of ANOTHER task may write one of the files this task's declared products are written to (#3204). Two runs
202
+ * writing one file in the shared worktree interfere: one overwrites the other, and the wave repairs it after the fact
203
+ * with a re-check or a re-run. So the wave's own selection passes over it for a ready task whose declared products
204
+ * meet nothing in flight. Only DECLARED products are compared; a shared file no product names (a module barrel, a
205
+ * registry) is still left to the after-the-fact repair. Nobody's move: it clears when that run settles.
206
+ */
207
+ Workbench_BuildTaskStuckReason["CONTENDED"] = "contended";
208
+ /**
209
+ * Its latest run failed its checks while other runs of the wave were writing beside it, so the failure may be theirs
210
+ * (#3204): a sibling's half-written file turned a shared typecheck red, or left a package's compiled output stale so the
211
+ * check could not be asked at all. It is not dispatched again in the same wave, where it would meet the same tree: the
212
+ * wave's end re-runs its checks ALONE, a pass lands it and a failure offers it to the next wave. Measured on reference run
213
+ * 42621319676: two schema tasks re-dispatched five times in nine minutes, each failing on a sibling's red build, spent their
214
+ * attempt budget while their checks passed alone. Nobody's move: it clears when the wave ends.
215
+ */
216
+ Workbench_BuildTaskStuckReason["AWAITING_ISOLATED_RECHECK"] = "awaiting_isolated_recheck";
217
+ /**
218
+ * A generation step whose landing check could not be ANSWERED right now (#3223): a schema-plan check that neither passed
219
+ * nor reported drift, a design-token block the CLI could not validate, a brand nobody could read. Not "not landed": it
220
+ * is UNKNOWN, so it is never dispatched — running it would either fail the same way or redo work that may well have
221
+ * landed (a companion restart re-ran a landed `design-system-brand` step this way). It clears on its own once the check
222
+ * answers; when it does not, the dispatch refusal names the check and the command that shows why.
223
+ */
224
+ Workbench_BuildTaskStuckReason["LANDING_UNKNOWN"] = "landing_unknown";
225
+ /**
226
+ * A FOLLOW-UP the host derived from a reported gap (#3227), waiting for the creator's review before it runs: the
227
+ * autonomy posture (`one-source-of-truth.md` D5) keeps approving a result a person's act, and a follow-up is work the
228
+ * accepted plan never listed. `wildo build approve <ref>` lets it run; `wildo build close <ref> --declined` closes it.
229
+ * Never reached under the automatic posture, where follow-ups run as they are derived.
230
+ */
231
+ Workbench_BuildTaskStuckReason["FOLLOW_UP_AWAITING_REVIEW"] = "follow_up_awaiting_review";
232
+ /**
233
+ * A generation step whose panel refused to seat expert charters older than their inputs (#3244): a build task changed
234
+ * what they read (the design system, say). Passed over so the rest of the plan proceeds, and offered again once the
235
+ * staffing step, `top_down.expert-personas`, has derived them again, which the build-dispatch step runs on its own
236
+ * (reference run 42218788356, where the refusal ended the build lane at 32 of 98 tasks). A charter a person edited is
237
+ * never derived again: its remedy is the hand edit.
238
+ */
239
+ Workbench_BuildTaskStuckReason["STALE_EXPERT_CHARTERS"] = "stale_expert_charters";
203
240
  })(Workbench_BuildTaskStuckReason || (Workbench_BuildTaskStuckReason = {}));
241
+ /**
242
+ * The stuck reasons that only WAIT for a live run to settle (#1528, #3204): progress, never a finding, and proof that a
243
+ * run is live. One set, so the dispatch's warning and the Home projection cannot disagree about which reasons mean it.
244
+ */
245
+ export const WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN = new Set([
246
+ Workbench_BuildTaskStuckReason.IN_FLIGHT,
247
+ Workbench_BuildTaskStuckReason.CONTENDED,
248
+ ]);
249
+ /**
250
+ * The stuck reasons a RE-ARM releases (#2530): the task is held by its own runs, and the remedy is to fix why and put it
251
+ * back — `WorkbenchBuildPlanTasks_Operations.REARM` is offered for these and no other.
252
+ *
253
+ * - `completed_unlanded`: a completed run holds it through the loop guard, and a re-arm releases that run.
254
+ * - `attempts_exhausted`: its failed runs hold it through the attempt budget, and a re-arm releases them.
255
+ *
256
+ * Left out, each because a re-arm would be the wrong remedy: `parked_awaiting_answer` (a question waits), `in_flight` (a run is
257
+ * live), `no_document_blueprint` (no run can produce it), `landing_unknown` (nothing holds it but a check that has not
258
+ * answered yet).
259
+ */
260
+ export const WORKBENCH_REARMABLE_STUCK_REASONS = [
261
+ Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,
262
+ Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED,
263
+ ];
264
+ /**
265
+ * Whose failure a failed coding run was (#1581), as the run's output records it.
266
+ *
267
+ * TASK runs are counted against the task's attempt budget; HOST runs (the run could not be recorded, or the turn was
268
+ * taken away: a mid-turn kill, a provider's 529/429, an exhausted quota, an expired login, an operator's cancel) are
269
+ * forgiven up to a bound. Declared here rather than beside its producer (the companion's coding dispatch) for the reason
270
+ * `Workbench_BuildTaskStuckReason` gives: the workbench shows it per attempt (#2530), and a browser bundle cannot import
271
+ * the companion.
272
+ */
273
+ export var CodingRunFailureAttribution;
274
+ (function (CodingRunFailureAttribution) {
275
+ /** The task's own failure: its checks went red, or its agent ran and failed at the work. Counted. */
276
+ CodingRunFailureAttribution["TASK"] = "task";
277
+ /** The host's: it could not record the run, or the turn was taken away. Forgiven, up to a bound. */
278
+ CodingRunFailureAttribution["HOST"] = "host";
279
+ })(CodingRunFailureAttribution || (CodingRunFailureAttribution = {}));
280
+ /**
281
+ * WHY a build task was put back in the queue (#1535) — the one question a later reader of a re-arm asks.
282
+ *
283
+ * A re-arm keeps a task's run history and adds one fact to it, on the runs it releases: they no longer hold the task,
284
+ * and here is why. Declared here rather than beside its producer (the companion's build dispatch) because the workbench
285
+ * both offers the re-arm (`WorkbenchBuildPlanTasks_Operations.REARM`) and shows each attempt's reason (#2530), and a
286
+ * browser bundle cannot import the companion.
287
+ */
288
+ export var BuildTaskRearmReason;
289
+ (function (BuildTaskRearmReason) {
290
+ /** The landing check was wrong about this task, and has been corrected. */
291
+ BuildTaskRearmReason["PROBE_CORRECTED"] = "probe-corrected";
292
+ /** A defect outside the task made its product impossible to produce, and has been fixed. */
293
+ BuildTaskRearmReason["BLOCKING_DEFECT_FIXED"] = "blocking-defect-fixed";
294
+ /** Neither of the above: an operator judged the work should run again. The note says why. */
295
+ BuildTaskRearmReason["OPERATOR_JUDGEMENT"] = "operator-judgement";
296
+ /**
297
+ * The ENVIRONMENT failed the runs, not the task (#3236): the network or the machine went away (DNS lost, a connection
298
+ * cut, a sleep) and the runs the outage took are released. Distinct from `operator-judgement` so a later reader of the
299
+ * task's history sees that its failed attempts said nothing about the work.
300
+ */
301
+ BuildTaskRearmReason["ENVIRONMENT"] = "environment";
302
+ /**
303
+ * Set by the BUILD WAVE, never by a person (#2210): the run completed while other runs edited the same tree, and its
304
+ * declared product is missing from a file one of them also changed, so the loss is theirs rather than the task's. The
305
+ * wave re-arms the task and re-runs it alone, a bounded number of times (`MAXIMUM_INTERFERENCE_REARMS`).
306
+ * The run also carries the interference the wave found (`BuildTaskInterference`, companion-side).
307
+ *
308
+ * Like every re-arm it also releases the task's FAILED runs not yet re-armed, so the attempt budget starts afresh.
309
+ * Deliberate: the task did complete, so its earlier failures say nothing about whether the work can be done, and the
310
+ * interference bound still stops a task that keeps losing its product.
311
+ */
312
+ BuildTaskRearmReason["INTERFERED_BY_CONCURRENT_RUN"] = "interfered-by-concurrent-run";
313
+ })(BuildTaskRearmReason || (BuildTaskRearmReason = {}));
314
+ /**
315
+ * How a build task a PERSON closed is accounted for (`wildo build close`, #3224, #3225, #3227) — the one question a reader
316
+ * of a closed task asks: what made it done, if anything did. A closure never makes a task's product true; it records that
317
+ * a person said it is done another way, or that a derived follow-up is not wanted. Declared here rather than beside its
318
+ * producer (the companion's build dispatch) because the workbench shows it on the task's record, and a browser bundle
319
+ * cannot import the companion.
320
+ */
321
+ export var BuildTaskClosureKind;
322
+ (function (BuildTaskClosureKind) {
323
+ /** Another task of the plan built what this one was for. It counts as landed while that task is landed. */
324
+ BuildTaskClosureKind["SATISFIED_BY_TASK"] = "satisfied_by_task";
325
+ /** A commit HEAD contains built it (a person's, a reconciliation's). It counts as landed while the closure is committed. */
326
+ BuildTaskClosureKind["SATISFIED_BY_COMMIT"] = "satisfied_by_commit";
327
+ /** A host-derived follow-up the creator declines: the gap it answers is not worked. Follow-ups only. */
328
+ BuildTaskClosureKind["DECLINED"] = "declined";
329
+ })(BuildTaskClosureKind || (BuildTaskClosureKind = {}));
330
+ /**
331
+ * The reasons a PERSON may give (`wildo build rearm`, the companion's re-arm route, the workbench's `rearm` operation).
332
+ * The wave's own reason is left out: it asserts a measurement (a sibling changed the product's file during the run)
333
+ * that only the wave makes, and an operator choosing it would record a detection that never happened.
334
+ */
335
+ export const OPERATOR_BUILD_TASK_REARM_REASONS = [
336
+ BuildTaskRearmReason.PROBE_CORRECTED,
337
+ BuildTaskRearmReason.BLOCKING_DEFECT_FIXED,
338
+ BuildTaskRearmReason.OPERATOR_JUDGEMENT,
339
+ BuildTaskRearmReason.ENVIRONMENT,
340
+ ];
204
341
  /**
205
342
  * How far one BUILD DISPATCH got — the whole of what `GET /build/dispatches` can honestly say.
206
343
  *
@@ -229,7 +366,10 @@ export var Workbench_BuildDispatchPhase;
229
366
  (function (Workbench_BuildDispatchPhase) {
230
367
  /** Selected and handed to its executor; nothing has resolved yet. */
231
368
  Workbench_BuildDispatchPhase["SUBMITTED"] = "submitted";
232
- /** A coding run was admitted and is running. Its outcome is the durable actor-task row `codingTaskId`. */
369
+ /**
370
+ * A coding run was admitted. The phase names the HAND-OFF and stays ADMITTED however the run ends: how
371
+ * the run stands is `Workbench_BuildDispatch.runStatus`, read off the same execution row (#2523).
372
+ */
233
373
  Workbench_BuildDispatchPhase["ADMITTED"] = "admitted";
234
374
  /** A companion generation step ran to completion. */
235
375
  Workbench_BuildDispatchPhase["FINISHED"] = "finished";
@@ -315,6 +455,27 @@ export const Workbench_Playbook_Schema = z.object({
315
455
  * is for. The default instance is not listed; it is the playbook itself. Absent without a line.
316
456
  */
317
457
  openInstances: z.array(z.object({ instanceKey: z.string().min(1), purpose: z.string().min(1) })).optional().isSummaryField(),
458
+ /*
459
+ * The playbook's DECLARED edges (#2530), each a reference a process map draws. With `outputOwners` (the families it
460
+ * writes) they make the catalogue a graph: a family feeds the playbooks that read it, which write the families that
461
+ * feed the next, and a composite admits its children.
462
+ *
463
+ * The family fields address the specification-artifact row of that family (its id IS the family); a family no row
464
+ * holds is a dangling reference, which the edge tolerates. `inputFamilyIds` and `preconditionFamilyIds` stay apart:
465
+ * a playbook gated on a family waits for it without reading it, and reads families it is not gated on. So does
466
+ * `conditionFamilyIds` (#2670): a family whose decision decides what the playbook waits for, which it never waits for.
467
+ */
468
+ /** The families it reads, from its declared inputs. */
469
+ inputFamilyIds: z.array(z.string().min(1).isForeignKey()).isSummaryField(),
470
+ /** The families its preconditions name: an artifact that must exist, be valid, be stale or decide. */
471
+ preconditionFamilyIds: z.array(z.string().min(1).isForeignKey()).isSummaryField(),
472
+ /**
473
+ * The families whose DECISION decides whether one of its preconditions applies: an `artifact_expected` gate's `when`
474
+ * (#2494). The build decomposition expects a website plan only once the capability composition decided it is NEEDED.
475
+ */
476
+ conditionFamilyIds: z.array(z.string().min(1).isForeignKey()).isSummaryField(),
477
+ /** The playbooks it admits as children when it is a composite, by their row id; empty otherwise. */
478
+ admittedPlaybookIds: z.array(z.string().min(1).isForeignKey()).isSummaryField(),
318
479
  /** When the served board was computed — the cache's honesty field, rendered as "as of". */
319
480
  computedAt: z.date().isSummaryField(),
320
481
  });
@@ -340,6 +501,24 @@ export const Workbench_BuildPlanTask_Schema = z.object({
340
501
  /** Task refs that must land first — the only thing that decides what may run next. */
341
502
  prerequisiteTaskRefs: z.array(z.string()).isSummaryField(),
342
503
  });
504
+ /**
505
+ * The BUILD PLAN view's `ref` (#2531): the plan drawn as a graph, a menubar destination beside the domain model. Its
506
+ * nodes are the build-plan tasks and its edges their prerequisites; a node opens the task's own page.
507
+ *
508
+ * It must not contain a dot, for the reason `WORKBENCH_DOMAIN_MODEL_VIEW_REF` records: the label lookup splits the
509
+ * whole `composite_views.<translationRef>.<key>` path on `.`.
510
+ */
511
+ export const WORKBENCH_BUILD_PLAN_VIEW_REF = 'build-plan';
512
+ /** The label key the view's title and description hang off: the engine's `app.<ref>` derivation, restated. */
513
+ export const WORKBENCH_BUILD_PLAN_TRANSLATION_REF = `app.${WORKBENCH_BUILD_PLAN_VIEW_REF}`;
514
+ /**
515
+ * The PLAYBOOK MAP view's `ref` (#2531): the playbook catalog drawn as what unlocks what, a menubar destination beside
516
+ * the build plan. Its nodes are the playbooks and the families they name; its edges what each writes, reads, waits for
517
+ * and, as a composite, runs (the playbook row's declared edges, #2530). No dot, for the domain model's reason.
518
+ */
519
+ export const WORKBENCH_PLAYBOOK_MAP_VIEW_REF = 'playbook-map';
520
+ /** The label key the view's title and description hang off: the engine's `app.<ref>` derivation, restated. */
521
+ export const WORKBENCH_PLAYBOOK_MAP_TRANSLATION_REF = `app.${WORKBENCH_PLAYBOOK_MAP_VIEW_REF}`;
343
522
  /**
344
523
  * One run's write record — the evidence lane behind every dispatch.
345
524
  *
@@ -382,6 +561,17 @@ export const Workbench_RunWriteRecord_Schema = z.object({
382
561
  fileCount: z.number().int().isSummaryField(),
383
562
  /** The commit the workbench's `accept` made of these writes (#1454, Step 7); NULL until one has. */
384
563
  acceptedCommitSha: z.string().min(1).isSummaryField().nullable(),
564
+ /**
565
+ * The run FAILED after writing these files (#3265): a half-applied composition the autonomy posture never commits and no
566
+ * coding door takes. Not a landing, and shown as failed wherever the record is listed, with its accept and revert doors,
567
+ * because nothing else prompts a person to settle it. `false` on every completed landing.
568
+ */
569
+ landingFailed: z.boolean().isSummaryField(),
570
+ /**
571
+ * For a failed landing, the two commands that settle it (`wildo creation accept <runId>` / `revert <runId>`), as the
572
+ * companion names them on every surface that lists the run (#3265). NULL on a completed landing.
573
+ */
574
+ failedLandingRemedies: z.object({ accept: z.string().min(1), revert: z.string().min(1) }).isSummaryField().nullable(),
385
575
  });
386
576
  /** One execution-trace session — the queryable index the board links from. */
387
577
  export const Workbench_TraceSession_Schema = z.object({
@@ -457,6 +647,17 @@ export var WorkbenchDossierEntryStanding;
457
647
  * Changing it records the creator's own answer in its place.
458
648
  */
459
649
  WorkbenchDossierEntryStanding["ASSUMED"] = "assumed";
650
+ /**
651
+ * The creator said the question does not concern this application, and why (#3437). Answered — nothing is
652
+ * blocked — and never filled in by a run. Changing it records an answer, or the other non-answer, in its place.
653
+ */
654
+ WorkbenchDossierEntryStanding["NOT_APPLICABLE"] = "not-applicable";
655
+ /**
656
+ * The creator said the question concerns this application and is not decided yet, and why (#3437). Nothing waits
657
+ * on it: the step runs and marks what rests on it as owed; a governed document shows the clause as owed. Listed
658
+ * to revisit, like an assumption.
659
+ */
660
+ WorkbenchDossierEntryStanding["DEFERRED"] = "deferred";
460
661
  })(WorkbenchDossierEntryStanding || (WorkbenchDossierEntryStanding = {}));
461
662
  /**
462
663
  * Whether a CHOICE question's options can be offered right now — for a question whose options are
@@ -532,9 +733,12 @@ export const Workbench_GovernanceQuestion_Schema = z.object({
532
733
  /** What choosing this option MEANS, in the creator's language rather than the schema's. */
533
734
  creatorMeaning: z.string().min(1),
534
735
  })).isSummaryField(),
535
- /** Answered in the authored facts (from you) or not (still needed) — the same standing vocabulary the interview dossier uses. */
736
+ /**
737
+ * Answered in the authored facts (from you), deferred in the dossier (not decided yet, #3437), or neither (still
738
+ * needed) — the same standing vocabulary the interview dossier uses.
739
+ */
536
740
  standing: z.enum(WorkbenchDossierEntryStanding).systemEnum('WorkbenchDossierEntryStanding').isSummaryField(),
537
- /** The answer as a person reads it — the text, the chosen options, or the "does not apply" reason. `null` when still needed. */
741
+ /** The answer as a person reads it — the text, the chosen options, the "does not apply" reason, or why it was deferred. `null` when still needed. */
538
742
  answerSummary: z.string().nullable().isSummaryField(),
539
743
  /** When the answer was decided (the declaration's own instant). `null` when still needed. */
540
744
  answeredAt: z.date().nullable().isSummaryField(),
@@ -594,6 +798,13 @@ export var WorkbenchBuildPlanTasks_Operations;
594
798
  * A non-ready task answers 409 naming what it waits on. Costs a coding run.
595
799
  */
596
800
  WorkbenchBuildPlanTasks_Operations["DISPATCH_TASK"] = "dispatch_task";
801
+ /**
802
+ * Put THIS task back in the queue once the reason it did not land is fixed (#1535, #2530): its completed runs that
803
+ * still hold it, and its failed runs not yet re-armed, stop counting, each recording why. Offered for a task held by
804
+ * either guard (`completed_unlanded`, `attempts_exhausted`); a task with no such run answers 409, since there is
805
+ * nothing to release. Runs nothing itself: the next dispatch offers the task again.
806
+ */
807
+ WorkbenchBuildPlanTasks_Operations["REARM"] = "rearm";
597
808
  /**
598
809
  * ACCEPT what this task's latest completed coding run wrote: commit exactly those paths, from the
599
810
  * coding-run write register, in one commit whose message names the task. Paths carrying another
@@ -691,6 +902,13 @@ export const Workbench_BuildPlanDispatchTaskRequest_Schema = z.object({
691
902
  /** The conversation this dispatch belongs to, so the thread shows the run as a card. */
692
903
  conversationId: z.string().min(1).optional(),
693
904
  });
905
+ /** Why a build task goes back in the queue (#2530): a person's reason, and what was fixed. */
906
+ export const Workbench_BuildTaskRearmRequest_Schema = z.object({
907
+ /* A person's reasons only: the wave's own records a detection only the wave makes. */
908
+ reason: z.enum(OPERATOR_BUILD_TASK_REARM_REASONS).systemEnum('BuildTaskRearmReason'),
909
+ /** What was fixed, in a sentence. Required: a reason alone cannot say which defect. */
910
+ note: z.string().trim().min(1),
911
+ });
694
912
  export const Workbench_AcceptChangesRequest_Schema = z.object({
695
913
  /** Commit paths that diverged since the run. NOT defaulted on — a human edit is never silently swept in. */
696
914
  force: z.boolean().optional(),
@@ -725,10 +943,27 @@ export const Workbench_PlaybookRunOutcome_Schema = z.looseObject({
725
943
  status: z.enum(Workbench_PlaybookRunOutcomeStatus).optional(),
726
944
  note: z.string().optional(),
727
945
  });
946
+ /**
947
+ * How a build dispatch answers (#2531 review M1): the companion forwards its dispatch result as it is. One task run
948
+ * answers the task it dispatched (`plan`) and what started for it, a coding run's `admission` or the result of a
949
+ * `generationStep` the companion ran itself, exactly one of the two. A parallel `dispatch_next` answers the `wave` it
950
+ * started, with a `note`.
951
+ *
952
+ * There is no top-level `taskRef`. This schema declared one, which no answer ever carried, so the line saying what a run
953
+ * started was never shown and the raw answer opened in its place.
954
+ */
728
955
  export const Workbench_BuildPlanDispatchOutcome_Schema = z.looseObject({
729
- taskRef: z.string().optional(),
956
+ plan: z.looseObject({ taskRef: z.string().min(1) }).optional(),
957
+ admission: z.looseObject({}).optional(),
958
+ generationStep: z.looseObject({}).optional(),
959
+ wave: z.looseObject({}).optional(),
730
960
  note: z.string().optional(),
731
961
  });
962
+ /** How a re-arm answers: the runs it released, and the reason it recorded on them. */
963
+ export const Workbench_BuildTaskRearmOutcome_Schema = z.looseObject({
964
+ rearmedRunTaskIds: z.array(z.string()).optional(),
965
+ rearm: z.looseObject({ reason: z.enum(BuildTaskRearmReason), note: z.string(), rearmedAt: z.string() }).optional(),
966
+ });
732
967
  export const Workbench_BuildPlanAddTaskOutcome_Schema = z.looseObject({
733
968
  taskRef: z.string().optional(),
734
969
  /** TRUE when no plan existed and this task is its first. */
@@ -739,6 +974,13 @@ export const Workbench_BuildPlanAddTaskOutcome_Schema = z.looseObject({
739
974
  });
740
975
  /** How ACCEPT answers, for a task's coding run or a playbook run alike: what was committed, what was refused and why. */
741
976
  export const Workbench_AcceptChangesOutcome_Schema = z.looseObject({
977
+ /**
978
+ * TRUE when no new commit was made because what it would commit was already committed: the run was accepted before, or
979
+ * its files were committed by hand (#2531 review M3). `commitSha` is then that earlier commit, not a new one. An accept
980
+ * can be partial, holding back the files it cannot vouch for, and the task waits on them; only a forced accept
981
+ * (`force`) commits those.
982
+ */
983
+ alreadyCommitted: z.boolean().optional(),
742
984
  commitSha: z.string().optional(),
743
985
  committedPaths: z.array(z.string()).optional(),
744
986
  refusedPaths: z.array(z.object({ path: z.string(), reason: z.string() })).optional(),
@@ -755,6 +997,11 @@ export const Workbench_RunWriteRevertOutcome_Schema = z.looseObject({
755
997
  * would destroy that run's work. Each names the run to revert first (#1666).
756
998
  */
757
999
  refusedLaterRun: z.array(z.object({ path: z.string(), runId: z.string() })).optional(),
1000
+ /**
1001
+ * Binary files the run replaced while their earlier version was uncommitted (#3264): the record holds their hash, not
1002
+ * their bytes, so nothing can restore them. Refused even under force.
1003
+ */
1004
+ refusedWithoutPreImage: z.array(z.string()).optional(),
758
1005
  note: z.string().optional(),
759
1006
  });
760
1007
  /**
@@ -827,8 +1074,15 @@ export const Workbench_BuildDispatchPlan_Schema = z.object({
827
1074
  * counted as landed on pages that listed none. Named so "92 of 92 landed" can never hide it. Empty is healthy.
828
1075
  */
829
1076
  landedBeforeAnyRunTaskRefs: z.array(z.string().min(1)).isSummaryField(),
830
- /** TRUE when there is no next task because every one has landed. */
1077
+ /** TRUE when there is no next task because every one has landed, and no specifications module is failing. */
831
1078
  exhausted: z.boolean().isSummaryField(),
1079
+ /**
1080
+ * The specifications modules failing while the plan has no next task (#3258). Such a plan is not `exhausted`: what landed
1081
+ * may only have run, and no check of the package can answer. Empty otherwise.
1082
+ */
1083
+ failingSpecificationModules: z.array(z.string().min(1)).isSummaryField(),
1084
+ /** TRUE when that plan's next dispatch repairs the failing module (#3258), so nothing is asked of a person yet. */
1085
+ specificationRepairOwed: z.boolean(),
832
1086
  /**
833
1087
  * Every READY task dispatch passed over because it cannot make progress, and why (#1451).
834
1088
  *
@@ -845,8 +1099,6 @@ export const Workbench_BuildDispatchPlan_Schema = z.object({
845
1099
  reason: z.enum(Workbench_BuildTaskStuckReason).systemEnum('Workbench_BuildTaskStuckReason'),
846
1100
  /** The run that proves it is stuck; NULL for a task that is unbuildable before any run. */
847
1101
  priorTaskId: z.string().min(1).nullable(),
848
- /** `completed_awaiting_commit` only: the probed paths present in the working tree and not committed. */
849
- uncommittedPaths: z.array(z.string().min(1)),
850
1102
  /** `parked_awaiting_answer` (and a parked `no_document_blueprint`): the question the run is waiting on. */
851
1103
  question: z.string().min(1).nullable(),
852
1104
  /** `no_document_blueprint` only: the governed document the catalog does not define. */
@@ -858,7 +1110,10 @@ export const Workbench_BuildDispatchPlan_Schema = z.object({
858
1110
  landedCount: z.number().int().isSummaryField(),
859
1111
  });
860
1112
  export const Workbench_BuildDispatch_Schema = z.object({
861
- /** Emitted by the behavior as `<taskRef>--<startedAt>`, sanitized — a task can be dispatched twice. */
1113
+ /**
1114
+ * The dispatch's own EXECUTION id (#2530): a task can be dispatched twice, even in the same second, and was keyed on its
1115
+ * task and start instant until two such attempts shared one id.
1116
+ */
862
1117
  workbenchBuildDispatchId: z.string().min(1).isPrimaryKey().isSummaryField(),
863
1118
  /** The build-plan task this attempt ran. */
864
1119
  taskRef: z.string().min(1).isSummaryField(),
@@ -890,18 +1145,321 @@ export const Workbench_BuildDispatch_Schema = z.object({
890
1145
  codingTaskId: z.string().min(1).isForeignKey().isSummaryField().nullable(),
891
1146
  /** Why it failed, verbatim. NULL on every dispatch that did not. */
892
1147
  error: z.string().min(1).isSummaryField().nullable(),
1148
+ /**
1149
+ * Whose failure a failed coding run was (#1581): the task's, or the host's. HOST is everything that is not the task's: the
1150
+ * agent's turn taken by the environment (a signed-out agent, a spent quota, a killed turn, an operator's cancel) or a
1151
+ * change set or trace the host could not capture. Only the first kind is the coding lane's, so the dispatch's page and
1152
+ * card offer to see whether the lane is ready, never to explain the failure (#2530 review M2, #2531 review L1). NULL for
1153
+ * a run that did not fail, a generation step, and a run recorded before it.
1154
+ */
1155
+ failureAttribution: z.enum(CodingRunFailureAttribution).systemEnum('CodingRunFailureAttribution').nullable(),
893
1156
  /**
894
1157
  * The conversation the dispatch was started from (#1454, Step 7), so the thread shows it as a
895
1158
  * card. NULL for a dispatch started from the plan's next-task door or before conversations existed.
896
1159
  */
897
1160
  conversationId: z.string().min(1).isSummaryField().nullable(),
1161
+ /**
1162
+ * How the dispatch's RUN stands — the status of the actor execution the dispatch is (#2523).
1163
+ *
1164
+ * Every dispatch is one execution (#1359): a coding run on `application-coding.system`, a generation step
1165
+ * on `application-build.system`. Its status is the one truthful answer to "did it work", for both
1166
+ * executors. The phase cannot give it: a coding dispatch's phase resolves at ADMITTED, by design, so a run
1167
+ * that has since completed, failed or is waiting on an answer still reads ADMITTED there. Every consumer
1168
+ * that keyed a coding run's end on `phase === FINISHED` was asking a question no coding run could answer:
1169
+ * the conversation's dispatch card never offered Accept, and Home never listed a coding run as settled.
1170
+ */
1171
+ runStatus: z.enum(FlowsActors_Status).systemEnum('FlowsActors_Status').isSummaryField(),
1172
+ /** When the run ENDED. NULL while it is pending, running or waiting on an answer. */
1173
+ runFinishedAt: z.date().isSummaryField().nullable(),
898
1174
  /**
899
1175
  * Whether the coding run's writes have been ACCEPTED — committed through the `accept` verb, or
900
- * found already committed. NULL when there is nothing to accept: a generation step, a failed run,
901
- * a run that wrote nothing, or a run older than the coding-run write register.
1176
+ * found already committed.
1177
+ *
1178
+ * FALSE means exactly one thing: a coding run that COMPLETED, recorded writes, and has none committed
1179
+ * yet — the state the `accept` verb addresses. NULL when there is nothing to accept NOW: a generation
1180
+ * step, a run still running or waiting on an answer, a failed run, a run that wrote nothing, or a run
1181
+ * older than the coding-run write register.
902
1182
  */
903
1183
  accepted: z.boolean().isSummaryField().nullable(),
904
1184
  });
1185
+ /**
1186
+ * One ATTEMPT at a build task (#2530): one actor execution, as the build's record reads it. A coding run, or a companion
1187
+ * generation step (labels, migrations, translations).
1188
+ */
1189
+ export const Workbench_BuildTaskAttempt_Schema = z.object({
1190
+ /** The execution's own task id: the coding run's actor task, or the generation step's. */
1191
+ runTaskId: z.string().min(1),
1192
+ startedAt: z.date(),
1193
+ settledAt: z.date().nullable(),
1194
+ status: z.enum(FlowsActors_Status).systemEnum('FlowsActors_Status'),
1195
+ /**
1196
+ * A companion generation step (labels, migrations, translations) rather than a coding run. No agent ran, so its cost and
1197
+ * tokens are what its own model calls were MEASURED at, and may be a floor (`spendIsFloor`) where some reported nothing.
1198
+ */
1199
+ generationStep: z.boolean(),
1200
+ /**
1201
+ * Refused by the host before it started (an admission refusal, a run a stopped process left selected). In the
1202
+ * history, because it explains why nothing ran; counted by no figure, because it was no attempt of the task's.
1203
+ */
1204
+ refusedBeforeStart: z.boolean(),
1205
+ /** Nothing ran: a host refusal, or admission refusing the task's own contract (which the budget does count). */
1206
+ ranNothing: z.boolean(),
1207
+ /** Whose failure a failed run was; null for a run that did not fail, and for a run recorded before the field. */
1208
+ failureAttribution: z.enum(CodingRunFailureAttribution).systemEnum('CodingRunFailureAttribution').nullable(),
1209
+ /** It failed while other runs were editing the tree, so the failure may be theirs. */
1210
+ interferenceSuspected: z.boolean(),
1211
+ /**
1212
+ * Why the task was put back in the queue after this run, which then no longer held it; null when it was not. A person's
1213
+ * reason, or the build wave's own when the run's product was lost to a sibling run editing the same file.
1214
+ */
1215
+ rearmReason: z.enum(BuildTaskRearmReason).systemEnum('BuildTaskRearmReason').nullable(),
1216
+ /** What was fixed, as the re-arm recorded it; null when the run was not re-armed. */
1217
+ rearmNote: z.string().min(1).nullable(),
1218
+ /** Why it failed, verbatim; null when it did not. */
1219
+ error: z.string().min(1).nullable(),
1220
+ /**
1221
+ * What the run cost, with its currency: what the agent reported for a coding run, what its model calls were measured at
1222
+ * for a generation step (in one currency; a step that spent in several shows none). Null when nothing reported a cost —
1223
+ * never read as zero.
1224
+ */
1225
+ costAmount: z.number().nullable(),
1226
+ costCurrency: z.string().min(1).nullable(),
1227
+ /** The cost and tokens are a FLOOR: a generation step some of whose model calls reported no usage. */
1228
+ spendIsFloor: z.boolean(),
1229
+ /**
1230
+ * The tokens the run reported in all; null when it reported none. Mostly prompt-cache reads for a coding run, so a
1231
+ * large figure is the agent re-reading its context, not that much new work.
1232
+ */
1233
+ totalTokens: z.number().int().min(0).nullable(),
1234
+ /** Files the run itself changed; null when the run recorded none. */
1235
+ filesChanged: z.number().int().nullable(),
1236
+ /** The checks the run itself failed, by ref (a check already red when it started is not its failure, so not here). */
1237
+ failedCheckRefs: z.array(z.string().min(1)),
1238
+ /** Paths the run changed outside the task's declared scope: recorded, never refused. */
1239
+ outOfScopePaths: z.array(z.string().min(1)),
1240
+ /**
1241
+ * The run COMPLETED and a sibling of its wave overwrote its product (#2210): which runs, which of the task's product
1242
+ * files both changed, and whether the wave re-ran the task for it. Null for a run nobody overwrote. The case a person's
1243
+ * re-arm answers once the wave's own re-runs are spent.
1244
+ */
1245
+ interference: z.object({
1246
+ overlappingTaskRefs: z.array(z.string().min(1)),
1247
+ contendedProductPaths: z.array(z.string().min(1)),
1248
+ requeued: z.boolean(),
1249
+ }).nullable(),
1250
+ /*
1251
+ * NOT carried: why the agent's turn ended (`max_tokens`, `refusal`), which is the agent's own vocabulary with no
1252
+ * words here yet; the run's own page shows it.
1253
+ */
1254
+ });
1255
+ /**
1256
+ * What `wildo db diff --check` could tell the host about the resource model versus the accepted schema plan.
1257
+ *
1258
+ * THREE answers, not two. A boolean merged the two failures that lead to opposite places (found in review,
1259
+ * 2026-09-13): DRIFTED means the migration step has work and must run first; UNANSWERABLE means the check did not
1260
+ * report drift and did not pass — no accepted plan and an undeterminable store declaration, no built backend registry, a compiled model older than its
1261
+ * sources (`assessCompiledModelCurrency`, #403: before it, a dead watcher's stale dist answered IN_SYNC and landed
1262
+ * this step with drift on disk), a CLI that could not import
1263
+ * it or could not be spawned, a timeout, a lockfile that fails strict parsing, or an ENGINE planner-contract
1264
+ * mismatch (whose remedy is `wildo db generate --accept-planner-contract`, not a rebuild) — and
1265
+ * running the step then only throws. Read as one "not in sync", an unanswerable check put a step that can
1266
+ * only fail at the head of the build queue on every dispatch, so no other task could run.
1267
+ *
1268
+ * Only IN_SYNC ever lands the step: an unanswered question must not land a migration step either.
1269
+ *
1270
+ * Declared here rather than beside its producer (the companion's generation steps) because the workbench shows it on a
1271
+ * step's record (#2530).
1272
+ */
1273
+ export var SchemaPlanSyncState;
1274
+ (function (SchemaPlanSyncState) {
1275
+ /** The model and the accepted plan agree: the migration step has landed. */
1276
+ SchemaPlanSyncState["IN_SYNC"] = "in_sync";
1277
+ /** The check ran and reported ungenerated changes: the migration step has work to do. */
1278
+ SchemaPlanSyncState["DRIFTED"] = "drifted";
1279
+ /** The check neither passed nor reported drift (see above for the causes); running the step now would refuse or fail. */
1280
+ SchemaPlanSyncState["UNANSWERABLE"] = "unanswerable";
1281
+ })(SchemaPlanSyncState || (SchemaPlanSyncState = {}));
1282
+ /**
1283
+ * What `wildo design-tokens validate` could tell the host about the stylesheet's generated block.
1284
+ *
1285
+ * Three answers, for the reason {@link SchemaPlanSyncState} has three: the command exits non-zero for a
1286
+ * stale block AND for every could-not-ask failure (a config that does not load, a stylesheet with no
1287
+ * markers, a CLI that cannot start or times out), and the two lead to opposite places. STALE means the
1288
+ * `design-tokens` step has work; UNANSWERABLE means running it would refuse or fail the same way, so the
1289
+ * dispatch host passes over it while other work is ready.
1290
+ *
1291
+ * Declared here for the reason {@link SchemaPlanSyncState} is (#2530).
1292
+ */
1293
+ export var DesignTokenBlockState;
1294
+ (function (DesignTokenBlockState) {
1295
+ /** The block is exactly what `generate` would write from the config. */
1296
+ DesignTokenBlockState["CURRENT"] = "current";
1297
+ /** The block differs from what `generate` would write: the step has work. */
1298
+ DesignTokenBlockState["STALE"] = "stale";
1299
+ /** The command neither confirmed nor refuted the block; running the step now would fail the same way. */
1300
+ DesignTokenBlockState["UNANSWERABLE"] = "unanswerable";
1301
+ })(DesignTokenBlockState || (DesignTokenBlockState = {}));
1302
+ /**
1303
+ * Does every module the brand step writes (the frontend's brand design, and the website's colours when a website is
1304
+ * declared) say what the brand's visual tone now renders?
1305
+ *
1306
+ * Three answers, for the reason {@link DesignTokenBlockState} has three: STALE means the step has work and runs,
1307
+ * UNANSWERABLE means the brand could not be read (the specifications do not evaluate, or this host has no
1308
+ * introspection), and running the step then only throws, so the selector passes it over while other work is ready.
1309
+ *
1310
+ * Declared here for the reason {@link SchemaPlanSyncState} is (#2530).
1311
+ */
1312
+ export var BrandDesignState;
1313
+ (function (BrandDesignState) {
1314
+ /** Every module exists and equals the render of the brand's current visual tone. */
1315
+ BrandDesignState["CURRENT"] = "current";
1316
+ /** A module is absent or says something the brand no longer does. */
1317
+ BrandDesignState["STALE"] = "stale";
1318
+ /** The brand's visual tone could not be read, so currency cannot be decided either way. */
1319
+ BrandDesignState["UNANSWERABLE"] = "unanswerable";
1320
+ })(BrandDesignState || (BrandDesignState = {}));
1321
+ /** A landing probe the working tree does not satisfy (#2530, #3204): what landing searched for there, and what is missing. */
1322
+ export const Workbench_BuildTaskUnmetProbe_Schema = z.object({
1323
+ /**
1324
+ * The files the probe reads, and how they are read: ONE path is that file, present (and declaring `declarations`
1325
+ * when it names any); SEVERAL paths with `declarations` are candidates, any one of which may declare them; several with
1326
+ * `keyPrefix` are the language packs, every present one of which must carry a key under it. Empty for a shell probe,
1327
+ * which reads the resolved shell rather than a fixed file (`shellSurface`, `shell`). The probe's KIND is the
1328
+ * companion's (`BuildPlanTaskLandedProbeKind`): these fields are what it looks for, and between them say which kind.
1329
+ */
1330
+ paths: z.array(z.string().min(1)),
1331
+ /**
1332
+ * The symbols the probe looks for in those files; empty for a probe that asks only that a file be present. WHERE in
1333
+ * the file they must sit (a set, one call's arguments, a key at an object path, a list's entry) is the companion's
1334
+ * probe relation and is not carried: its parameters are code locations the companion derives only when it probes, and
1335
+ * no surface shows them, a run's included (#2531 review L4). A reader learns WHAT is missing here, not where it goes.
1336
+ */
1337
+ declarations: z.array(z.string().min(1)),
1338
+ /** The key every present label pack must carry one under (a website section's words); null for other probes. */
1339
+ keyPrefix: z.string().min(1).nullable(),
1340
+ /**
1341
+ * The shell surface a placement probe reads — a `PlacementSurface` value of the specifications. A string declaring that
1342
+ * vocabulary, so it reads `system_enums.PlacementSurface` like the enum, since this package does not depend on the
1343
+ * specifications. Null for the probe that asks whether ANY surface carries a placement, and for every probe that reads
1344
+ * files.
1345
+ */
1346
+ shellSurface: z.string().min(1).systemEnum('PlacementSurface').nullable(),
1347
+ /** A shell probe's explanation: what the surface lacks, still carries, or could not be asked. Null for a file probe. */
1348
+ shell: z.object({
1349
+ /** Why the surface could not be read, verbatim: the probe is then unsatisfied without being a "no". */
1350
+ unanswerable: z.string().min(1).nullable(),
1351
+ /** Subjects the plan placed there that the surface does not carry. */
1352
+ missing: z.array(z.string().min(1)),
1353
+ /** Subjects the plan declined that the surface still carries. */
1354
+ declinedButPresent: z.array(z.string().min(1)),
1355
+ /** Files contributing the surface that the working tree does not hold (#3514). */
1356
+ absentPaths: z.array(z.string().min(1)),
1357
+ }).nullable(),
1358
+ /**
1359
+ * A REGISTRY probe's explanation (#2966): an agent, an approval gate, a work unit, a metered usage recording (#2305
1360
+ * S5) or a retention binding, proven from what the backend registers, and a role a relationship confers (#2305 S6),
1361
+ * proven from `wildo.saas.config.ts`. Null for every other probe. Kept apart from `shell`, which reads a surface: these read a registry, and
1362
+ * a "declined" entry has no meaning here.
1363
+ */
1364
+ registered: z.object({
1365
+ /** Why the registry could not be read, verbatim: the probe is then unsatisfied without being a "no". */
1366
+ unanswerable: z.string().min(1).nullable(),
1367
+ /**
1368
+ * What the task's module does not register as planned, one entry per shortfall: WHY (worded from
1369
+ * `system_enums.AgentWorkShortfallKind`), the ref it is about, and the planned and registered values where it compares
1370
+ * them (for a refused gate, the engine's refusal, verbatim).
1371
+ */
1372
+ missing: z.array(z.object({
1373
+ kind: z.enum(AgentWorkShortfallKind).systemEnum('AgentWorkShortfallKind'),
1374
+ ref: z.string().min(1),
1375
+ planned: z.string().min(1).nullable(),
1376
+ registered: z.string().min(1).nullable(),
1377
+ })),
1378
+ /** Registration files, or files the agent index imports, that the working tree does not hold (#3514). */
1379
+ absentPaths: z.array(z.string().min(1)),
1380
+ }).nullable(),
1381
+ });
1382
+ /**
1383
+ * Everything the build knows about ONE task, in one row (#2530, from the companion's per-task record, #1521).
1384
+ *
1385
+ * The case it exists for: "not landed" hid three facts — never dispatched, dispatched and FAILED, dispatched,
1386
+ * SUCCEEDED and unprovable — and they are three shapes here: no attempts; a failed attempt; a completed attempt with
1387
+ * unmet probes. Its id IS the build-plan task row's id, so a task's detail reads its record by the id it already has;
1388
+ * it is its own resource because reading attempts, classifying a stuck task and probing the tree is too much to pay on
1389
+ * every row of the task list.
1390
+ *
1391
+ * The attempts are read from the actor plane by ONE listing per coding system, bounded far above a whole build's runs;
1392
+ * `attemptsTruncated` says when that bound was met, so an early task's oldest runs may be missing and "never run" is not
1393
+ * claimed.
1394
+ */
1395
+ export const Workbench_BuildTaskRecord_Schema = z.object({
1396
+ workbenchBuildTaskRecordId: z.string().min(1).isPrimaryKey().isSummaryField(),
1397
+ /** The build-plan task this is the record of (the same id). */
1398
+ workbenchBuildPlanTaskId: z.string().min(1).isForeignKey().isSummaryField(),
1399
+ taskRef: z.string().min(1).isSummaryField(),
1400
+ status: z.enum(WorkbenchBuildPlanTaskStatus).systemEnum('WorkbenchBuildPlanTaskStatus').isSummaryField(),
1401
+ /**
1402
+ * Attempts that count (every one but a host refusal before start). Which FAILED ones count against the attempt
1403
+ * budget is the budget's own question (host failures and suspected interference are forgiven up to a bound); each
1404
+ * attempt says what it needs for that, and a spent budget is `stuckReason` ATTEMPTS_EXHAUSTED, never re-derived here.
1405
+ */
1406
+ attemptCount: z.number().int().min(0).isSummaryField(),
1407
+ /** Newest first. Empty: never dispatched (unless `attemptsTruncated`). */
1408
+ attempts: z.array(Workbench_BuildTaskAttempt_Schema),
1409
+ /** The attempt listing met its bound: the oldest attempts of an early task may be missing. */
1410
+ attemptsTruncated: z.boolean(),
1411
+ /** READY and passed over by dispatch: why, from the same classification the selector uses. */
1412
+ stuckReason: z.enum(Workbench_BuildTaskStuckReason).systemEnum('Workbench_BuildTaskStuckReason').isSummaryField().nullable(),
1413
+ /** `parked_awaiting_answer`: the question its run is waiting on. */
1414
+ stuckQuestion: z.string().min(1).nullable(),
1415
+ /** `no_document_blueprint`: the governed document no blueprint defines. */
1416
+ stuckDocumentRef: z.string().min(1).nullable(),
1417
+ /** BLOCKED: the prerequisites that have not landed. */
1418
+ waitingOnTaskRefs: z.array(z.string().min(1)),
1419
+ /** Not landed and attempted: the probes the working tree, which landing reads (#3204), does not satisfy. */
1420
+ unmetProbes: z.array(Workbench_BuildTaskUnmetProbe_Schema),
1421
+ /*
1422
+ * A GENERATION STEP lands on something other than a file it writes, and when it has not, which of these three it is
1423
+ * says whether running it again can help: the step's own state, null when it is current or is not that step.
1424
+ */
1425
+ /** The migration step: whether the model and the accepted schema plan agree. */
1426
+ schemaPlanSyncState: z.enum(SchemaPlanSyncState).systemEnum('SchemaPlanSyncState').nullable(),
1427
+ /** The design-tokens step: whether the stylesheet's generated block is what the config would generate. */
1428
+ designTokenBlockState: z.enum(DesignTokenBlockState).systemEnum('DesignTokenBlockState').nullable(),
1429
+ /** The brand-design step: whether the generated module says what the brand's visual tone renders. */
1430
+ brandDesignState: z.enum(BrandDesignState).systemEnum('BrandDesignState').nullable(),
1431
+ /**
1432
+ * A generation step whose landing cannot be judged, and why, verbatim (#2504): today a labels plan that hides units
1433
+ * the application owes. Named before the step's first run too, since it holds the step back from running. Null when
1434
+ * nothing holds its landing.
1435
+ */
1436
+ landingBlockedBy: z.string().min(1).nullable(),
1437
+ /*
1438
+ * The follow-up tasks (#2496): what the host derived from a gap this task's latest completed run reported still unmet,
1439
+ * and on a follow-up, the task whose gap derived it. By build-plan task row id, so each opens the task it names
1440
+ * (#2652); `wildo context journey` prints the same two facts.
1441
+ */
1442
+ /** The follow-up tasks derived from this task's reported gaps; empty when none was derived. */
1443
+ followUpTaskIds: z.array(z.string().min(1).isForeignKey()),
1444
+ /** On a follow-up task: the task whose reported gap derived it; null on every other task. */
1445
+ followUpOfTaskId: z.string().min(1).isForeignKey().nullable(),
1446
+ /*
1447
+ * A person's CLOSURE (`wildo build close`, #3224, #3227): the task counts as landed because a person said it is done
1448
+ * another way, or declined it, never because its own probe found its product. Null on every task nobody closed.
1449
+ */
1450
+ /** How the closure accounts for the task. */
1451
+ closureKind: z.enum(BuildTaskClosureKind).systemEnum('BuildTaskClosureKind').nullable(),
1452
+ /** The task or the commit that built it; null when declined or not closed. */
1453
+ closureSatisfiedBy: z.string().min(1).nullable(),
1454
+ /** Why, in the person's words. */
1455
+ closureReason: z.string().min(1).nullable(),
1456
+ /** LANDED with no product to prove: it ran, and nothing can show what it made. */
1457
+ unverifiable: z.boolean(),
1458
+ /** LANDED before any run of its own started: something else made its product, or the probe reads the wrong thing. */
1459
+ landedBeforeAnyRun: z.boolean(),
1460
+ /** Where the probe found that product, so a reader can see what it took for it; empty unless `landedBeforeAnyRun`. */
1461
+ landedBeforeAnyRunPaths: z.array(z.string().min(1)),
1462
+ });
905
1463
  /**
906
1464
  * One playbook run SUSPENDED waiting on a person.
907
1465
  *
@@ -944,6 +1502,50 @@ export var Workbench_PlaybookRunState;
944
1502
  */
945
1503
  Workbench_PlaybookRunState["AWAITING_ANSWER"] = "awaiting_answer";
946
1504
  })(Workbench_PlaybookRunState || (Workbench_PlaybookRunState = {}));
1505
+ /**
1506
+ * One child of a composite run's round (#2530): the playbook that ran in it, why it was on the table, what it landed and
1507
+ * whether it failed — the record's own summary (`PlaybookRunChoreographyChildSummary`), with its measurement left on the
1508
+ * run's record. A child that was itself a LANE is known by the rounds that name it as their lane.
1509
+ */
1510
+ export const Workbench_PlaybookRunRoundChild_Schema = z.object({
1511
+ playbookRef: z.string().min(1),
1512
+ /** Why it was on the table, in the runtime's own sentence (a first run, a refresh and what moved, a re-opening). */
1513
+ ranBecause: z.string().min(1).nullable(),
1514
+ /**
1515
+ * TRUE when it re-ran over a landing the record already held — the runtime's rerun verdict was a refresh or a current
1516
+ * landing re-opened, never a first run (#3213). A failure of such a child left that earlier landing standing, which is
1517
+ * what makes it a non-fatal repair failure; `ranBecause` is a sentence and is written for a first run too, so it cannot
1518
+ * say this. NULL on a row recorded without a verdict.
1519
+ */
1520
+ reranOverLanding: z.boolean().nullable(),
1521
+ /** The specification files it landed, in landing order. Empty is a finding, not a gap. */
1522
+ landed: z.array(z.string().min(1)),
1523
+ /** Why it failed, bounded as the record keeps it; null when it did not. */
1524
+ failure: z.string().min(1).nullable(),
1525
+ });
1526
+ /**
1527
+ * One round of a composite run (#2530): the root's, or a nested lane's. FLAT rather than nested: a lane's rounds follow
1528
+ * the round whose child ran the lane and name it (`parentRoundKey`, `lanePlaybookRef`), so a process map nests them as
1529
+ * groups without a recursive contract, and every depth the record keeps reaches the row.
1530
+ *
1531
+ * The choreography's own stop reason (`PlaybookChoreographyStopReason`) is NOT here: it is a closed vocabulary of the
1532
+ * runtime, which this package does not depend on, and a raw code would render as words nobody authored. Each round's
1533
+ * `stopRationale` is the selector's own sentence for why that round ended the run; the reason code stays on the record.
1534
+ */
1535
+ export const Workbench_PlaybookRunRound_Schema = z.object({
1536
+ /** The round's place in the run: `3` for the root's third, `3/<lane playbook>/2` for the second round of that lane. */
1537
+ roundKey: z.string().min(1),
1538
+ /** The round whose child ran this lane; null for a round of the run itself. */
1539
+ parentRoundKey: z.string().min(1).nullable(),
1540
+ /** The child playbook whose lane this round belongs to; null for a round of the run itself. */
1541
+ lanePlaybookRef: z.string().min(1).nullable(),
1542
+ iteration: z.number().int().min(1),
1543
+ /** The earlier round of the same lane that began from the very same input state: a lane spending without converging. */
1544
+ sameInputStateAsIteration: z.number().int().min(1).nullable(),
1545
+ /** Why the selector stopped after this round, in its own sentence; null when it went on. */
1546
+ stopRationale: z.string().min(1).nullable(),
1547
+ children: z.array(Workbench_PlaybookRunRoundChild_Schema),
1548
+ });
947
1549
  /**
948
1550
  * One playbook run, in whatever state it is in.
949
1551
  *
@@ -1030,6 +1632,12 @@ export const Workbench_PlaybookRun_Schema = z.object({
1030
1632
  })).nullable(),
1031
1633
  /** Why the judge stayed silent, in its own words — a failed call, or an evaluation that never ran. */
1032
1634
  judgeSkipped: z.string().min(1).nullable(),
1635
+ /**
1636
+ * A COMPOSITE run's rounds, its own and every nested lane's, in run order (#2530), each with the children that ran in
1637
+ * it — what a process map draws as rounds, then child runs. Null for a run of a single playbook, and for a run not
1638
+ * settled yet (its rounds are on the record once it ends).
1639
+ */
1640
+ choreographyRounds: z.array(Workbench_PlaybookRunRound_Schema).nullable(),
1033
1641
  });
1034
1642
  export const Workbench_WaitingPlaybookRun_Schema = z.object({
1035
1643
  /** The run's own id, sanitized — run ids carry dots (see the playbook id note). */
@@ -1084,13 +1692,10 @@ export const Workbench_WaitingPlaybookRun_Schema = z.object({
1084
1692
  routedToUserId: z.string().min(1).isSummaryField().nullable(),
1085
1693
  });
1086
1694
  /**
1087
- * One coding run PARKED on a question.
1088
- *
1089
- * It arrives inside the coding-agent status payload, which is a singleton and stays a companion
1090
- * read. These do not: a parked question is identified by the task that parked on it, it persists
1091
- * until somebody answers, and a queue of work waiting on a person is the last thing that should be
1092
- * reachable only by reading a status blob.
1695
+ * The coding lane's one row id. Named, because the workbench links to the row from where the lane's trouble shows (an
1696
+ * attempt, a dispatch or a dispatch card the host failed, #2530) and the companion stamps it: two copies of the literal would be two ids.
1093
1697
  */
1698
+ export const WORKBENCH_CODING_LANE_STATUS_ROW_ID = 'coding-lane';
1094
1699
  /**
1095
1700
  * The coding lane's own posture — ONE row, always present.
1096
1701
  *
@@ -1113,7 +1718,7 @@ export const Workbench_WaitingPlaybookRun_Schema = z.object({
1113
1718
  * outstanding — which is why the parked queue has to be read beside it.
1114
1719
  */
1115
1720
  export const Workbench_CodingLaneStatus_Schema = z.object({
1116
- /** One row, one id. The projection stamps a constant: there is exactly one coding lane. */
1721
+ /** One row, one id ({@link WORKBENCH_CODING_LANE_STATUS_ROW_ID}): there is exactly one coding lane. */
1117
1722
  workbenchCodingLaneStatusId: z.string().min(1).isPrimaryKey().isSummaryField(),
1118
1723
  /** Every declared coding agent resolves in the registry. NOT a claim that the transport works. */
1119
1724
  codingAgentRegistered: z.boolean().isSummaryField(),
@@ -1176,6 +1781,14 @@ export var Workbench_ParkedCodingQuestionOptionRef;
1176
1781
  })(Workbench_ParkedCodingQuestionOptionRef || (Workbench_ParkedCodingQuestionOptionRef = {}));
1177
1782
  /** The single field a parked run asks: the agent's own question, verbatim. */
1178
1783
  export const WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF = 'answer';
1784
+ /**
1785
+ * One coding run PARKED on a question.
1786
+ *
1787
+ * It arrives inside the coding-agent status payload, which is a singleton and stays a companion
1788
+ * read. These do not: a parked question is identified by the task that parked on it, it persists
1789
+ * until somebody answers, and a queue of work waiting on a person is the last thing that should be
1790
+ * reachable only by reading a status blob.
1791
+ */
1179
1792
  export const Workbench_ParkedCodingQuestion_Schema = z.object({
1180
1793
  /** The parked task's id, sanitized. */
1181
1794
  workbenchParkedCodingQuestionId: z.string().min(1).isPrimaryKey().isSummaryField(),
@@ -1243,8 +1856,20 @@ export const Workbench_DossierEntry_Schema = z.object({
1243
1856
  standing: z.enum(WorkbenchDossierEntryStanding).systemEnum('WorkbenchDossierEntryStanding').isSummaryField(),
1244
1857
  /** Whether the options can be offered now — see {@link WorkbenchDossierEntryOptionsState}. */
1245
1858
  optionsState: z.enum(WorkbenchDossierEntryOptionsState).systemEnum('WorkbenchDossierEntryOptionsState').isSummaryField(),
1246
- /** The answer as stored, when there is one. */
1859
+ /** The answer as stored, when there is one. Null for a question answered without a value (#3437). */
1247
1860
  value: z.string().nullable().isSummaryField(),
1861
+ /**
1862
+ * Why the creator answered WITHOUT a value (#3437): the reason it does not apply, or what it waits on. Null for any
1863
+ * other standing. Kept apart from `value` so nothing reads the reason as an answer.
1864
+ */
1865
+ nonAnswerReason: z.string().nullable().isSummaryField(),
1866
+ /**
1867
+ * The ways this question may be answered WITHOUT a value (#3439): what its playbook declares its output can carry,
1868
+ * and none for a question only the creator may answer — the shared `admittedElicitationNonAnswers`, so the
1869
+ * workbench, the console and the landing agree. Empty offers neither "does not apply" nor "later"; the answer
1870
+ * operation refuses a kind not listed here.
1871
+ */
1872
+ admittedNonAnswers: z.array(z.enum(MetaWorkflow_ElicitationNonAnswer).systemEnum('MetaWorkflow_ElicitationNonAnswer')).isSummaryField(),
1248
1873
  answeredAt: z.date().nullable().isSummaryField(),
1249
1874
  answeredByRef: z.string().nullable().isSummaryField(),
1250
1875
  /** What the person was shown beside the option they chose (#2337), recorded with the answer; null when nothing was. */
@@ -1360,9 +1985,21 @@ export const Workbench_DossierInterviewDepthOutcome_Schema = z.looseObject({
1360
1985
  interviewDepth: z.enum(ApplicationInterviewDepth),
1361
1986
  packageRelativePath: z.string(),
1362
1987
  });
1988
+ /**
1989
+ * An answer to a dossier question: a VALUE, or (#3439) a NON-ANSWER with its reason — never both, and one of the two.
1990
+ * The exclusivity and the admission are decided by the operation against the ROW (`admittedNonAnswers`), not here: a
1991
+ * cross-field refinement would hide the one sentence that says what to change behind a generic schema error.
1992
+ */
1363
1993
  export const Workbench_DossierAnswerRequest_Schema = z.object({
1364
- /** The answer, in the creator's words — validated against the question's kind before it is stored. */
1365
- value: z.string().min(1),
1994
+ /** The answer, in the creator's words — validated against the question's kind before it is stored. Absent with `nonAnswer`. */
1995
+ value: z.string().min(1).optional(),
1996
+ /**
1997
+ * Answer WITHOUT a value (#3439): the question does not apply to this application, or it is not decided yet. Refused
1998
+ * where the row's `admittedNonAnswers` does not list it, and alongside a `value` or an assumption.
1999
+ */
2000
+ nonAnswer: z.enum(MetaWorkflow_ElicitationNonAnswer).optional(),
2001
+ /** Required with `nonAnswer`: why it does not apply, or what it waits on — recorded so the person can revisit it. */
2002
+ reason: z.string().min(1).optional(),
1366
2003
  /**
1367
2004
  * TRUE when the value is a PROPOSAL the creator let stand because they did not know (#2129): it is
1368
2005
  * recorded as an assumption, authored by the companion's proposer, and the dossier lists it to revisit.
@@ -1373,8 +2010,10 @@ export const Workbench_DossierAnswerRequest_Schema = z.object({
1373
2010
  assumptionRationale: z.string().min(1).optional(),
1374
2011
  });
1375
2012
  export const Workbench_DossierAnswerOutcome_Schema = z.looseObject({
1376
- /** The answer as STORED (canonical for a `confirm`). */
1377
- value: z.string(),
2013
+ /** The answer as STORED (canonical for a `confirm`); null for a question answered without a value (#3439). */
2014
+ value: z.string().nullable(),
2015
+ /** The non-answer recorded instead of a value (#3439); null when a value was. */
2016
+ nonAnswer: z.enum(MetaWorkflow_ElicitationNonAnswer).nullable(),
1378
2017
  answeredAt: z.string(),
1379
2018
  /** The dossier file this landed in, package-relative. */
1380
2019
  packageRelativePath: z.string(),
@@ -1419,16 +2058,62 @@ export var WorkbenchCreationHomeLineKind;
1419
2058
  WorkbenchCreationHomeLineKind["RUN_INTERRUPTED"] = "run-interrupted";
1420
2059
  /** A build dispatch finished or failed; `acceptable` says whether its writes wait to be committed. */
1421
2060
  WorkbenchCreationHomeLineKind["DISPATCH_SETTLED"] = "dispatch-settled";
2061
+ /**
2062
+ * A re-run inside a lane — a repair of a GAP, a refresh — FAILED while the family's earlier landing still stands
2063
+ * (#3213): a NON-FATAL repair failure, whether the re-run was refused or the environment failed it. The landing it would have replaced is what its consumers read, and the lane
2064
+ * went on with them (e.g. a refused build-decompose repair: the plan on disk still dispatches). `playbookRef` is the
2065
+ * re-run's playbook, `subject` its failure; the target is the lane's run. `failed` stays false, because nothing the
2066
+ * creation built is lost; the refusal is shown so it can be repaired when it matters.
2067
+ */
2068
+ WorkbenchCreationHomeLineKind["REPAIR_FAILED_LANDING_STANDS"] = "repair-failed-landing-stands";
1422
2069
  /**
1423
2070
  * The coding agent's account hit its usage limit, and the build dispatches nothing until it resets
1424
2071
  * (#2388). `subject` is when the build resumes (`08:11 Europe/Paris`); the target is the dispatch that met
1425
2072
  * the limit. Shown only while the limit holds, so it disappears once the build has resumed.
1426
2073
  */
1427
2074
  WorkbenchCreationHomeLineKind["CODING_AGENT_USAGE_LIMITED"] = "coding-agent-usage-limited";
2075
+ /**
2076
+ * The coding agent's provider ACCOUNT refused its turn: no credits left, a spend or usage limit, billing (#3204).
2077
+ * Distinct from {@link CODING_AGENT_USAGE_LIMITED}: nothing resets on its own, a PERSON adds credits or raises the
2078
+ * limit. The build holds and asks again every thirty minutes, charging no attempt, so a person who fixes the account
2079
+ * while a drive waits loses nothing; an unattended drive stops on it. `subject` is the refusal in the providers'
2080
+ * sentence (`describeModelProviderAccountRefusal`); the target is the dispatch that met it. Shown while the hold lasts.
2081
+ */
2082
+ WorkbenchCreationHomeLineKind["CODING_AGENT_ACCOUNT_REFUSED"] = "coding-agent-account-refused";
2083
+ /**
2084
+ * A coding run lost the network, and no coding turn is admitted until a probe of the agent's API answers along the
2085
+ * agent's own route (#3236, #3262). `at` is when the loss was met, `taskRef` the task whose run met it, `subject` the
2086
+ * route the probe takes (`api.anthropic.com via proxy proxy.corp:3128`), absent when no route is known. Shown only
2087
+ * while the hold lasts; what ends it is the probe answering, a turn started after the loss succeeding, or
2088
+ * `wildo build rearm <task> --reason environment`.
2089
+ */
2090
+ WorkbenchCreationHomeLineKind["CODING_AGENT_CONNECTIVITY_LOST"] = "coding-agent-connectivity-lost";
2091
+ /**
2092
+ * A verification check's command cannot be executed (#3423): `wildo`, say, is not on the companion's PATH, so every
2093
+ * task's check would fail the same way, and no coding turn is admitted. `subject` is the command, `taskRef` the task
2094
+ * whose run met it, `at` when. Nothing lifts it on its own: a person puts the command on PATH, and the next admission
2095
+ * looks it up first (or `wildo build rearm <task> --reason environment` ends it). Shown while the hold lasts; an
2096
+ * unattended drive stops on it.
2097
+ */
2098
+ WorkbenchCreationHomeLineKind["VERIFICATION_TOOL_UNAVAILABLE"] = "verification-tool-unavailable";
2099
+ /**
2100
+ * A person CLOSED a build task (`wildo build close`, #3224, #3227): done another way, or a derived follow-up declined.
2101
+ * `at` is when, `taskRef` the task, `subject` the reason they gave. Shown so a reader of the build's history sees that a
2102
+ * person, not a probe, said the task is done.
2103
+ */
2104
+ WorkbenchCreationHomeLineKind["BUILD_TASK_CLOSED"] = "build-task-closed";
1428
2105
  /** A playbook run suspended on questions only the creator can answer. */
1429
2106
  WorkbenchCreationHomeLineKind["CLARIFICATION"] = "clarification";
1430
2107
  /** A coding run parked on a question the agent could not answer alone. */
1431
2108
  WorkbenchCreationHomeLineKind["PARKED_QUESTION"] = "parked-question";
2109
+ /**
2110
+ * An interview still waiting on the creator whose answer would date work the next unattended round could run
2111
+ * (#3361): a step reading the creator's stated facts, which an answer given later re-derives. The round withholds
2112
+ * that work (`findReadersDatedByWaitingInterviews`), so this line is what moves it, and an unattended drive stops on
2113
+ * it. `playbookRef` is the interview's playbook, `subject` the steps it holds (refs, comma-separated); the target is
2114
+ * the interview's playbook. Not shown for a quick interview's questions an unattended round assumes (#2129).
2115
+ */
2116
+ WorkbenchCreationHomeLineKind["INTERVIEW_DATES_NEXT_WORK"] = "interview-dates-next-work";
1432
2117
  /** A governed document the creator asked for (a draft exists) still needing a fact only they can give. */
1433
2118
  WorkbenchCreationHomeLineKind["GOVERNANCE_DOCUMENT"] = "governance-document";
1434
2119
  /** The next READY build task of the dispatch plan. */
@@ -1436,13 +2121,42 @@ export var WorkbenchCreationHomeLineKind;
1436
2121
  /**
1437
2122
  * The plan can run NOTHING: every ready task is stuck, and `stuckReason` says what unblocks it.
1438
2123
  *
1439
- * ASKED rather than SUGGESTION, because every reason is the creator's move — committing what a
1440
- * finished run wrote under GUIDED, or, under the autonomy posture where the loop commits (#1534),
1441
- * resolving the path its accept refused or correcting a declaration no run can satisfy.
2124
+ * ASKED rather than SUGGESTION, because every reason it is shown for is the creator's move — correcting a
2125
+ * declaration no run can satisfy, re-arming a task that spent its attempts, approving a follow-up. (A run's work
2126
+ * awaiting a commit was one until #3514: a task lands from the working tree since #3204.)
1442
2127
  * Without it the plan simply falls silent: `CONTINUE_THE_PLAN` is derived from the next ready task,
1443
2128
  * and a stuck queue has none (#1451, #1463).
1444
2129
  */
1445
2130
  WorkbenchCreationHomeLineKind["UNBLOCK_THE_PLAN"] = "unblock-the-plan";
2131
+ /**
2132
+ * Nothing in the plan can run and it is not finished, because a specifications module fails (#3258). `subject` names the
2133
+ * modules. ASKED because the remedy is fixing the module, and without this line such a plan reads as nothing at all: no
2134
+ * next task, not finished, and no stuck task to explain it.
2135
+ */
2136
+ WorkbenchCreationHomeLineKind["SPECIFICATION_FAULT_HOLDS_THE_PLAN"] = "specification-fault-holds-the-plan";
2137
+ /**
2138
+ * A FOLLOW-UP task landed while its latest completed run still reports a requirement unmet (#2583): advisory, never a
2139
+ * reason the loop stops. `taskRef` is the follow-up, `subject` names each requirement and what the run said is
2140
+ * missing. The door is running it again on purpose: `wildo build run <ref> --despite-landed --reason operator-judgement`.
2141
+ */
2142
+ WorkbenchCreationHomeLineKind["FOLLOW_UP_LANDED_WITH_GAP"] = "follow-up-landed-with-gap";
2143
+ /**
2144
+ * Files a build task's coding runs left UNCOMMITTED that no automatic door will commit (#3267): a failed run's file a
2145
+ * retry refused, or a file dirty at a retry's baseline with what earlier failed runs left, and no run of the task live.
2146
+ * ASKED, because only a person can settle it: `taskRef` is the task, `subject` names each file and the runs whose
2147
+ * record holds it. The doors are `wildo build accept <ref> --leftovers` (commit, under those runs) and the discard
2148
+ * command `wildo build tasks` prints per file. Derived from the write register and the tree, so it disappears once
2149
+ * each file is committed or discarded.
2150
+ */
2151
+ WorkbenchCreationHomeLineKind["RUN_LEFTOVER_UNCOMMITTED"] = "run-leftover-uncommitted";
2152
+ /**
2153
+ * A build task LANDED and something its landing does not cover is unfinished (#3285): a billing catalogue committed
2154
+ * while the backend does not enable billing, so nothing serves it. Advisory, a mark beside the landing and never a
2155
+ * reason anything stops. `taskRef` is the task, `subject` names each setting still to set and the file that holds it;
2156
+ * `wildo build tasks` prints what each needs first. Derived from the committed tree, so it disappears once the setting
2157
+ * is committed.
2158
+ */
2159
+ WorkbenchCreationHomeLineKind["LANDED_WITH_ADVISORY"] = "landed-with-advisory";
1446
2160
  /** An eligible playbook whose output family is missing. */
1447
2161
  WorkbenchCreationHomeLineKind["PRODUCE_MISSING"] = "produce-missing";
1448
2162
  /** An eligible playbook whose output is stale — derived before one of its inputs last changed. */
@@ -1547,7 +2261,8 @@ export const Workbench_CreationOutcome_Schema = z.object({
1547
2261
  tasksLanded: z.number().int().min(0).nullable().isSummaryField(),
1548
2262
  /**
1549
2263
  * APPLICATION_WORKS only: the application's runtimes whose dev-loop supervisor has PAUSED them — it
1550
- * will not start them until something changes (#1537). While any is listed the outcome is not DONE,
2264
+ * will not start them until something changes (#1537) — or is CRASH-LOOPING them, restarting each at most every five
2265
+ * minutes while it keeps failing to start (#3365). While any is listed the outcome is not DONE,
1551
2266
  * whatever has landed: an application that cannot start does not work. Null on the other three,
1552
2267
  * and null when no supervisor could answer, which is "cannot tell" rather than "all up".
1553
2268
  */
@@ -1574,8 +2289,10 @@ export const Workbench_RunWriteFileDiff_Schema = z.object({
1574
2289
  existedBefore: z.boolean(),
1575
2290
  /** The file on disk no longer holds what the run wrote; the diff still describes what the RUN did. */
1576
2291
  diverged: z.boolean(),
1577
- /** Unified diff. Empty when the run rewrote a file with identical bytes. */
2292
+ /** Unified diff. Empty when the run rewrote a file with identical bytes. For a binary file, one line naming its hashes. */
1578
2293
  diff: z.string(),
2294
+ /** A binary file (#3264): its record holds a hash, so `diff` is one descriptive line and no lines of text. */
2295
+ binary: z.literal(true).optional(),
1579
2296
  });
1580
2297
  export const Workbench_RunWriteDiff_Schema = z.object({
1581
2298
  runId: z.string().min(1),
@@ -1682,7 +2399,8 @@ export const Workbench_CodingRunCancelOutcome_Schema = z.looseObject({
1682
2399
  * The governed document's one verb: LAND the facts a person established for it as the
1683
2400
  * `document-facts-authored` family. The row is the document; the body carries the governance scope,
1684
2401
  * the answers and, for a reviewed fact, the review — a per-question verb with a bare value could
1685
- * carry none of that, which is why the question resource has no write verb of its own.
2402
+ * carry none of that, which is why ANSWERING stays on the document. Deferring one question carries
2403
+ * only a reason and asserts nothing, so it is the question's own verb (`WorkbenchGovernanceQuestions_Operations`).
1686
2404
  */
1687
2405
  export var WorkbenchGovernanceDocuments_Operations;
1688
2406
  (function (WorkbenchGovernanceDocuments_Operations) {
@@ -1710,6 +2428,35 @@ export const Workbench_GovernanceFactsLandingRequest_Schema = z.object({
1710
2428
  /** Run the whole pipe and write nothing — what lets a person see the exact file their answers produce BEFORE anything touches the tree. */
1711
2429
  dryRun: z.boolean().optional(),
1712
2430
  });
2431
+ /**
2432
+ * The governance question's one verb (#3439): DEFER it — the person says the fact concerns this application and is not
2433
+ * decided yet, and why. A dossier write (`deferredDocumentFacts`), never a fact declaration, so the fact stays absent
2434
+ * and every clause resting on it stays owed. It names no governance scope and records no review, which is why it can be
2435
+ * a per-question verb while answering cannot (see {@link WorkbenchGovernanceDocuments_Operations}).
2436
+ */
2437
+ export var WorkbenchGovernanceQuestions_Operations;
2438
+ (function (WorkbenchGovernanceQuestions_Operations) {
2439
+ WorkbenchGovernanceQuestions_Operations["DEFER"] = "defer";
2440
+ })(WorkbenchGovernanceQuestions_Operations || (WorkbenchGovernanceQuestions_Operations = {}));
2441
+ /**
2442
+ * Whether a governance question in this standing may be DEFERRED (#3439): one still needed, and one already deferred
2443
+ * (re-deferring rewords the reason). A fact the product establishes is read, never deferred; and an ANSWERED fact is
2444
+ * not either, because a landed declaration wins over a deferral of the same fact (`deriveOpenGovernanceQuestions`), so
2445
+ * the deferral would change nothing anyone sees. The ONE predicate the operation refuses by and the workbench offers by.
2446
+ */
2447
+ export function governanceQuestionAdmitsDeferral(standing) {
2448
+ return standing === WorkbenchDossierEntryStanding.STILL_NEEDED || standing === WorkbenchDossierEntryStanding.DEFERRED;
2449
+ }
2450
+ export const Workbench_GovernanceQuestionDeferRequest_Schema = z.object({
2451
+ /** Why it is not decided yet — what it waits on. Required: a deferral with no reason cannot be revisited. */
2452
+ reason: z.string().min(1),
2453
+ });
2454
+ export const Workbench_GovernanceQuestionDeferOutcome_Schema = z.looseObject({
2455
+ /** The fact deferred. */
2456
+ factRef: z.string().min(1),
2457
+ /** The dossier file the deferral landed in, package-relative. */
2458
+ packageRelativePath: z.string().min(1),
2459
+ });
1713
2460
  export const Workbench_GovernanceFactsLandingOutcome_Schema = z.object({
1714
2461
  family: z.string().min(1),
1715
2462
  packageRelativePath: z.string().min(1),
@@ -1736,7 +2483,10 @@ export var ApplicationSecretStanding;
1736
2483
  ApplicationSecretStanding["NEEDED"] = "needed";
1737
2484
  /** It has a value in this environment, and something reads it. */
1738
2485
  ApplicationSecretStanding["SET"] = "set";
1739
- /** Unset, and nothing waits for it: an optional key, or a capability another provider already serves. */
2486
+ /**
2487
+ * Unset, and nothing waits for it: an optional key, or a capability another provider already serves, ready, in every
2488
+ * runtime that would use this key for it (a provider ready in the backend serves nothing to the companion, #2985).
2489
+ */
1740
2490
  ApplicationSecretStanding["AVAILABLE"] = "available";
1741
2491
  /**
1742
2492
  * It has a value, and nothing CONSUMES it: a provider key no provider declares, a system-of-record key
@@ -1854,7 +2604,11 @@ export const Workbench_ApplicationSecret_Schema = z.object({
1854
2604
  ownerRef: z.string().min(1).nullable().isSummaryField(),
1855
2605
  /** Its owner's own description of it, when it has one. */
1856
2606
  description: z.string().nullable(),
1857
- /** The enabled capabilities a provider serves for this application — why the secret is needed. Empty for the other kinds. */
2607
+ /**
2608
+ * The enabled capabilities this secret serves — why it is needed: those of the provider arms that READ it, not every
2609
+ * capability its provider serves (#2978). Empty for a key no capability-serving arm reads (a sign-in client secret)
2610
+ * and for the other kinds.
2611
+ */
1858
2612
  capabilities: z.array(z.enum(EngineCapability).systemEnum('EngineCapability')),
1859
2613
  /**
1860
2614
  * The runtimes that RECEIVE it in their environment — the ones a change regenerates and restarts: `backend`,