@wildo-ai/platform-core-shared 1.1.5 → 1.1.7

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 (88) hide show
  1. package/dist/esm/core/resources/resources-operations.custom.shared.definitions.d.ts.map +1 -1
  2. package/dist/esm/core/resources/resources-operations.custom.shared.definitions.js.map +1 -1
  3. package/dist/esm/core/resources/resources-relationships.custom.shared.definitions.d.ts.map +1 -1
  4. package/dist/esm/core/resources/resources-relationships.custom.shared.definitions.js.map +1 -1
  5. package/dist/esm/core/resources/resources-types.custom.shared.schemas.d.ts.map +1 -1
  6. package/dist/esm/core/resources/resources-types.custom.shared.schemas.js.map +1 -1
  7. package/dist/esm/index.d.ts +2 -0
  8. package/dist/esm/index.d.ts.map +1 -1
  9. package/dist/esm/index.js +2 -0
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/runtime/application-backend-env.contracts.d.ts +21 -2
  12. package/dist/esm/runtime/application-backend-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/runtime/application-backend-env.contracts.js +21 -0
  14. package/dist/esm/runtime/application-backend-env.contracts.js.map +1 -1
  15. package/dist/esm/runtime/application-worker-env.contracts.d.ts.map +1 -1
  16. package/dist/esm/runtime/application-worker-env.contracts.js.map +1 -1
  17. package/dist/esm/runtime/http-server-env.contracts.d.ts +46 -0
  18. package/dist/esm/runtime/http-server-env.contracts.d.ts.map +1 -0
  19. package/dist/esm/runtime/http-server-env.contracts.js +55 -0
  20. package/dist/esm/runtime/http-server-env.contracts.js.map +1 -0
  21. package/dist/esm/runtime/runtime-topology.contracts.d.ts +0 -4
  22. package/dist/esm/runtime/runtime-topology.contracts.d.ts.map +1 -1
  23. package/dist/esm/runtime/runtime-topology.contracts.js +0 -12
  24. package/dist/esm/runtime/runtime-topology.contracts.js.map +1 -1
  25. package/dist/esm/security/authorizations/roles.custom.shared.definitions.d.ts.map +1 -1
  26. package/dist/esm/security/authorizations/roles.custom.shared.definitions.js.map +1 -1
  27. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts +106 -4
  28. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts.map +1 -1
  29. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.js.map +1 -1
  30. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.d.ts +106 -4
  31. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.d.ts.map +1 -1
  32. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.js.map +1 -1
  33. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts +15 -0
  34. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts.map +1 -1
  35. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.js.map +1 -1
  36. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts +15 -0
  37. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js.map +1 -1
  39. package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.d.ts.map +1 -1
  40. package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.js.map +1 -1
  41. package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.d.ts +7 -5
  42. package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.d.ts.map +1 -1
  43. package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.js +7 -5
  44. package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.js.map +1 -1
  45. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.resources-config.schemas.d.ts.map +1 -1
  46. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.resources-config.schemas.js.map +1 -1
  47. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.schemas.d.ts.map +1 -1
  48. package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.schemas.js.map +1 -1
  49. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.d.ts.map +1 -1
  50. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js +23 -0
  51. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js.map +1 -1
  52. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.d.ts +279 -0
  53. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.d.ts.map +1 -0
  54. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.js +303 -0
  55. package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.js.map +1 -0
  56. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.d.ts +97 -1
  57. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.d.ts.map +1 -1
  58. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.js +86 -0
  59. package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.js.map +1 -1
  60. package/dist/esm/workbench/workbench-creation-dossier.custom.shared.schemas.d.ts.map +1 -1
  61. package/dist/esm/workbench/workbench-creation-dossier.custom.shared.schemas.js.map +1 -1
  62. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts +88 -5
  63. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts.map +1 -1
  64. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js +89 -7
  65. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js.map +1 -1
  66. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts +230 -13
  67. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts.map +1 -1
  68. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js +377 -16
  69. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js.map +1 -1
  70. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts.map +1 -1
  71. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js.map +1 -1
  72. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts +6 -0
  73. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts.map +1 -1
  74. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js +8 -0
  75. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js.map +1 -1
  76. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts +45 -2
  77. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts.map +1 -1
  78. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js +1 -1
  79. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js.map +1 -1
  80. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts +16 -2
  81. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts.map +1 -1
  82. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.js +25 -2
  83. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.js.map +1 -1
  84. package/dist/tsconfig.build.tsbuildinfo +1 -1
  85. package/package.json +4 -4
  86. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.d.ts +0 -0
  87. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.d.ts.map +0 -0
  88. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.js.map +0 -0
@@ -1,6 +1,8 @@
1
- import { MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';
1
+ import { MetaWorkflow_ClarificationAction, MetaWorkflow_EvaluationVerdict } from '@wildo-ai/saas-models/meta-workflows';
2
+ import { EngineCapability, } from '@wildo-ai/saas-models';
2
3
  import { z } from 'zod';
3
- import { initZodDecorators } from '@wildo-ai/zod-decorators';
4
+ import { initZodDecorators, StringEditMode } from '@wildo-ai/zod-decorators';
5
+ import { WorkbenchSpecificationArtifactConcern } from './workbench-resources.custom.shared.schemas.js';
4
6
  initZodDecorators(z);
5
7
  /**
6
8
  * The CREATION PLANE's shared vocabulary — schemas for the four companion-runtime resource
@@ -63,6 +65,8 @@ export var WorkbenchCreationPlaneBehavior;
63
65
  WorkbenchCreationPlaneBehavior["HOME_LINES"] = "creation-plane.home-lines";
64
66
  /** The four creation OUTCOMES with their standing, derived from the landed families and the build plan. */
65
67
  WorkbenchCreationPlaneBehavior["CREATION_OUTCOMES"] = "creation-plane.creation-outcomes";
68
+ /** The application's provider secrets per environment — what it needs and what is set, never a value (#1637). */
69
+ WorkbenchCreationPlaneBehavior["APPLICATION_SECRETS"] = "creation-plane.application-secrets";
66
70
  })(WorkbenchCreationPlaneBehavior || (WorkbenchCreationPlaneBehavior = {}));
67
71
  /** Membership test the companion's source routes by. */
68
72
  export const WORKBENCH_CREATION_PLANE_BEHAVIOR_IDS = Object.freeze(Object.values(WorkbenchCreationPlaneBehavior));
@@ -81,6 +85,21 @@ export const WORKBENCH_CREATION_PLANE_BEHAVIOR_IDS = Object.freeze(Object.values
81
85
  export function sanitizeWorkbenchCreationPlaneIdentity(value) {
82
86
  return value.replaceAll('.', '__').replace(/[^a-zA-Z0-9_-]/g, '-');
83
87
  }
88
+ /**
89
+ * A dossier row's id — `sanitize(playbookRef)--sanitize(questionRef)` for the step itself, and
90
+ * `sanitize(playbookRef)--<instanceKey>--sanitize(questionRef)` for one of its INSTANCES (#1609).
91
+ *
92
+ * Shared for the same reason the sanitizer is: the companion's projection EMITS the id and the
93
+ * conversation's answer tool ADDRESSES a row by it, and two copies would let the two drift apart the
94
+ * first time the shape changed — which is exactly what adding an instance did. An instance key is a
95
+ * kebab slug, so it needs no sanitizing and cannot contain the `--` separator's ambiguity in a way the
96
+ * question ref does not already (both are refused as duplicates by the projection, never guessed at).
97
+ */
98
+ export function workbenchDossierEntryIdentity(input) {
99
+ const step = sanitizeWorkbenchCreationPlaneIdentity(input.playbookRef);
100
+ const question = sanitizeWorkbenchCreationPlaneIdentity(input.questionRef);
101
+ return input.instanceKey ? `${step}--${input.instanceKey}--${question}` : `${step}--${question}`;
102
+ }
84
103
  /**
85
104
  * The creation plane's CORRELATION VOCABULARY on the engine's actor task — the one named source for
86
105
  * the `context.correlation` envelope's domain and ref keys (#1348, #1330).
@@ -279,6 +298,23 @@ export const Workbench_Playbook_Schema = z.object({
279
298
  family: z.string().min(1),
280
299
  changedInputs: z.array(z.string()),
281
300
  })).isSummaryField(),
301
+ /**
302
+ * Whether the application's LINE runs this playbook at all (#1607): true when it is in the line's active
303
+ * set. Distinct from `eligible`, which asks whether an active playbook may run RIGHT NOW. Absent when the
304
+ * board was computed without a line.
305
+ */
306
+ activeInLine: z.boolean().optional().isSummaryField(),
307
+ /**
308
+ * Why it is, or is not, in the active set — one sentence, already rendered by the runtime, like `unmet`:
309
+ * in the line, outside it, producing only what does not apply, or waiting for the line to be declared.
310
+ * A sentence rather than the status value because this package does not import the vocabulary.
311
+ */
312
+ activationDetail: z.string().optional().isSummaryField(),
313
+ /**
314
+ * The instances of this playbook the creator opened and has not closed (#1609): each one's key and what it
315
+ * is for. The default instance is not listed; it is the playbook itself. Absent without a line.
316
+ */
317
+ openInstances: z.array(z.object({ instanceKey: z.string().min(1), purpose: z.string().min(1) })).optional().isSummaryField(),
282
318
  /** When the served board was computed — the cache's honesty field, rendered as "as of". */
283
319
  computedAt: z.date().isSummaryField(),
284
320
  });
@@ -402,6 +438,18 @@ export var WorkbenchDossierEntryStanding;
402
438
  WorkbenchDossierEntryStanding["FROM_YOU"] = "from-you";
403
439
  /** The playbook asks it and nobody has answered. */
404
440
  WorkbenchDossierEntryStanding["STILL_NEEDED"] = "still-needed";
441
+ /**
442
+ * An opened INSTANCE of the step asks it and has no answer of its own, so it runs on the step's own
443
+ * answer (#1609). Answered, not needed: nothing is blocked, and an answer given here replaces the
444
+ * step's for this instance only.
445
+ */
446
+ WorkbenchDossierEntryStanding["FROM_THE_STEP"] = "from-the-step";
447
+ /**
448
+ * The PRODUCT answers it: a governed-document fact the application's own declarations establish,
449
+ * read rather than asked (#1454, gap 4; `compliance-is-derived-from-the-product.md`). Never
450
+ * "needed" and never editable here — its answer changes when what the product declares changes.
451
+ */
452
+ WorkbenchDossierEntryStanding["READ_FROM_PRODUCT"] = "read-from-product";
405
453
  })(WorkbenchDossierEntryStanding || (WorkbenchDossierEntryStanding = {}));
406
454
  export const Workbench_GovernanceDocument_Schema = z.object({
407
455
  /** The document's ref, sanitized — a definition ref carries `:` and `.`. */
@@ -492,7 +540,9 @@ export var WorkbenchPlaybooks_Operations;
492
540
  /** Answer a run that stopped at a clarification — accept with answers, decline, or cancel. */
493
541
  WorkbenchPlaybooks_Operations["RESUME"] = "resume_run";
494
542
  /**
495
- * The interview this playbook declares, as a decision payload — `null` when it asks nothing. Read
543
+ * The questions this playbook still needs answered, as a decision payload — the declared interview
544
+ * minus what the dossier already answers (shared decisions included), and `null` when nothing is left
545
+ * to ask: the step declares none, or the dossier answers them all (#1454 review). Read
496
546
  * ON DEMAND, at the moment somebody chooses to run it, and deliberately not a field of the row: one
497
547
  * playbook alone declares fifteen questions, so carrying them on every row would pay for all of
498
548
  * them on every poll in order to show none of them.
@@ -563,12 +613,22 @@ export const Workbench_PlaybookRunRequest_Schema = z.object({
563
613
  })).optional(),
564
614
  /** Full pipe — generation, validation, rendering, judge — with NO filesystem writes. */
565
615
  dryRun: z.boolean().optional(),
616
+ /**
617
+ * The opened INSTANCE to run (#1609); omitted runs the step itself. An instance nobody opened is refused,
618
+ * and its pre-answers are filed as that instance's answers, never the step's.
619
+ */
620
+ instanceKey: z.string().min(1).optional(),
566
621
  });
567
622
  export const Workbench_PlaybookResumeRequest_Schema = z.object({
568
623
  /** The suspended run being answered — the handle `run` returned when it stopped to ask. */
569
624
  runId: z.string().min(1),
570
- /** `accept` (requires ≥1 answer), `decline`, or `cancel` — the industry three-action model. */
571
- action: z.string().min(1),
625
+ /**
626
+ * WHICH round of its questions this answers, declines or cancels — the waiting row's `round` (#1584). A
627
+ * run asks again after an answer under the same `runId`; a round it has moved past is refused 409.
628
+ */
629
+ round: z.number().int().min(1),
630
+ /** ACCEPT (every question answered), DECLINE (the rest delegated) or CANCEL — see `MetaWorkflow_ClarificationAction` (#1785). */
631
+ action: z.enum(MetaWorkflow_ClarificationAction),
572
632
  answers: z.array(z.object({
573
633
  ref: z.string().min(1),
574
634
  answer: z.string().min(1),
@@ -611,6 +671,21 @@ export const Workbench_RunWriteRevertRequest_Schema = z.object({
611
671
  /** Overwrite files edited since the run. NOT defaulted on — a human edit is never silently destroyed. */
612
672
  force: z.boolean().optional(),
613
673
  });
674
+ /**
675
+ * What a playbook run's answer says about the run, when it says anything (#1781). Absent on a run that
676
+ * concluded, or on a detached submission that is still going.
677
+ *
678
+ * One named home for a vocabulary the companion writes and several readers compare — the run record,
679
+ * the clarification lifecycle, the resume route, and the workbench's summary of a RESUME, which used
680
+ * to read every answer carrying a `runId` as "Started", a cancelled clarification included.
681
+ */
682
+ export var Workbench_PlaybookRunOutcomeStatus;
683
+ (function (Workbench_PlaybookRunOutcomeStatus) {
684
+ /** Healthy, and waiting at a clarification: the run asked the creator something and holds until answered. */
685
+ Workbench_PlaybookRunOutcomeStatus["AWAITING_CREATOR_INPUT"] = "awaiting_creator_input";
686
+ /** The creator cancelled a clarification: the run was abandoned and does not continue. */
687
+ Workbench_PlaybookRunOutcomeStatus["CANCELLED"] = "cancelled";
688
+ })(Workbench_PlaybookRunOutcomeStatus || (Workbench_PlaybookRunOutcomeStatus = {}));
614
689
  /**
615
690
  * Dispatch RESPONSES are LOOSE objects, deliberately: each names the fields the board branches on
616
691
  * and forwards the rest verbatim. The companion routes already spread the whole service result, and
@@ -619,8 +694,7 @@ export const Workbench_RunWriteRevertRequest_Schema = z.object({
619
694
  */
620
695
  export const Workbench_PlaybookRunOutcome_Schema = z.looseObject({
621
696
  runId: z.string().optional(),
622
- /** Present exactly when the run is HEALTHY and waiting at a clarification. */
623
- status: z.string().optional(),
697
+ status: z.enum(Workbench_PlaybookRunOutcomeStatus).optional(),
624
698
  note: z.string().optional(),
625
699
  });
626
700
  export const Workbench_BuildPlanDispatchOutcome_Schema = z.looseObject({
@@ -648,6 +722,11 @@ export const Workbench_RunWriteRevertOutcome_Schema = z.looseObject({
648
722
  reverted: z.array(z.string()).optional(),
649
723
  /** Files whose current bytes differ from what the run wrote — refused by name, revertable with force. */
650
724
  refusedDiverged: z.array(z.string()).optional(),
725
+ /**
726
+ * Files a LATER recorded run landed on (#1614): refused even under force, because the earlier bytes
727
+ * would destroy that run's work. Each names the run to revert first (#1666).
728
+ */
729
+ refusedLaterRun: z.array(z.object({ path: z.string(), runId: z.string() })).optional(),
651
730
  note: z.string().optional(),
652
731
  });
653
732
  /**
@@ -748,6 +827,12 @@ export const Workbench_BuildDispatch_Schema = z.object({
748
827
  workbenchBuildDispatchId: z.string().min(1).isPrimaryKey().isSummaryField(),
749
828
  /** The build-plan task this attempt ran. */
750
829
  taskRef: z.string().min(1).isSummaryField(),
830
+ /**
831
+ * What the task delivers, in its own sentence — joined from the plan by `taskRef` so a card, a pane
832
+ * title and a Home line name the run by what it does rather than by its key (#1454, gap 1). NULL when
833
+ * the plan no longer holds the task (a plan re-decomposed since): the ref is then the only name.
834
+ */
835
+ objective: z.string().min(1).isSummaryField().nullable(),
751
836
  /**
752
837
  * How the attempt ended, or that it has not.
753
838
  *
@@ -801,12 +886,12 @@ export const Workbench_BuildDispatch_Schema = z.object({
801
886
  * the presence of. Naming the state makes that explicit and makes the row renderable by one layout.
802
887
  *
803
888
  * The distinction that matters most is RUNNING vs RUNNING_DETACHED, and it is not cosmetic: the
804
- * first is the CHOREOGRAPHY single-flight marker and is null for every ordinary run, so a board that
805
- * read it alone reported "nothing is running" while a fifteen-minute run was in flight.
889
+ * first is a composite holding its instance's single-flight subject and never an ordinary run, so a board
890
+ * that read it alone reported "nothing is running" while a fifteen-minute run was in flight.
806
891
  */
807
892
  export var Workbench_PlaybookRunState;
808
893
  (function (Workbench_PlaybookRunState) {
809
- /** The composite choreography's single-flight marker — at most one, and null for an ordinary run. */
894
+ /** A composite holding its instance's single-flight subject (#1610): one per running instance, several at once, never an ordinary run. */
810
895
  Workbench_PlaybookRunState["RUNNING"] = "running";
811
896
  /** An ordinary run this companion process is executing right now. */
812
897
  Workbench_PlaybookRunState["RUNNING_DETACHED"] = "running_detached";
@@ -834,12 +919,18 @@ export const Workbench_PlaybookRun_Schema = z.object({
834
919
  /** The row's own id, sanitized — run ids carry dots (see the playbook id note). */
835
920
  workbenchPlaybookRunId: z.string().min(1).isPrimaryKey().isSummaryField(),
836
921
  /**
837
- * The run id as the companion records it. NULL for the RUNNING marker and for an INTERRUPTED
838
- * entry, neither of which the companion identifies by run — they are known by their playbook.
922
+ * The run id as the companion records it. NULL only for an INTERRUPTED entry, which the companion
923
+ * knows by the checkpoint it left (its playbook and instance), not by a run.
839
924
  */
840
925
  runId: z.string().min(1).isSummaryField().nullable(),
841
926
  /** The playbook this run is of. Every state has one; it is how a run is known. */
842
927
  playbookRef: z.string().min(1).isSummaryField(),
928
+ /**
929
+ * The playbook INSTANCE this run is of (#1609), or null for a run of the step itself. Two instances of
930
+ * one playbook run and settle side by side, so a reader telling runs apart by playbook alone would show
931
+ * one instance's outcome as the other's.
932
+ */
933
+ instanceKey: z.string().min(1).isSummaryField().nullable(),
843
934
  /**
844
935
  * The execution-trace session the run recorded under, as the companion RECORDED it at run time.
845
936
  * NULL when the request carried no session, and for the RUNNING and INTERRUPTED states.
@@ -950,6 +1041,12 @@ export const Workbench_WaitingPlaybookRun_Schema = z.object({
950
1041
  /** The closed answer set, when the question has one. */
951
1042
  options: z.array(z.string().min(1)),
952
1043
  })).isSummaryField(),
1044
+ /**
1045
+ * The signed-in person the question is ROUTED to (#1751): whoever started the run from the workbench or
1046
+ * the conversation. Only they may answer it; anybody else is refused as if nothing waited. NULL when the
1047
+ * question is unrouted (a run started from the console) or the checkpoint could not be read.
1048
+ */
1049
+ routedToUserId: z.string().min(1).isSummaryField().nullable(),
953
1050
  });
954
1051
  /**
955
1052
  * One coding run PARKED on a question.
@@ -985,6 +1082,24 @@ export const Workbench_CodingLaneStatus_Schema = z.object({
985
1082
  workbenchCodingLaneStatusId: z.string().min(1).isPrimaryKey().isSummaryField(),
986
1083
  /** Every declared coding agent resolves in the registry. NOT a claim that the transport works. */
987
1084
  codingAgentRegistered: z.boolean().isSummaryField(),
1085
+ /**
1086
+ * The coding agent this host dispatches to (a provider ref: `anthropic`, `openai`, `opencode`).
1087
+ * NULL when the selection cannot be resolved (#1637).
1088
+ */
1089
+ codingAgentProviderRef: z.string().min(1).isSummaryField().nullable(),
1090
+ /**
1091
+ * Whether that agent's operator is signed in on this host, read from the agent's own status command
1092
+ * without a model call — what `codingAgentRegistered` cannot say: a registered agent with no login
1093
+ * fails every run on its first prompt. `false` means a definite "not signed in" — the one state a
1094
+ * dispatch refuses on. NULL when the state could not be read, and when the agent's status command is not
1095
+ * installed: the Claude and Codex agents run through adapters that do not need it, so its absence says
1096
+ * nothing about the login; {@link codingAgentLoginRemedy} then names the install (#1637).
1097
+ */
1098
+ codingAgentSignedIn: z.boolean().isSummaryField().nullable(),
1099
+ /** What the status command reported, in one line. NULL when nothing was read. */
1100
+ codingAgentLoginDetail: z.string().nullable(),
1101
+ /** What to do when the agent is not signed in — the login or install command. NULL when nothing is owed. */
1102
+ codingAgentLoginRemedy: z.string().nullable(),
988
1103
  /**
989
1104
  * The durable actor-task row of the run in flight — the edge from this lane into the control
990
1105
  * plane, which is why it is a foreign key rather than a printed id. NULL when none is running,
@@ -1045,6 +1160,12 @@ export const Workbench_ParkedCodingQuestion_Schema = z.object({
1045
1160
  * before answering rather than after.
1046
1161
  */
1047
1162
  resumable: z.boolean().isSummaryField(),
1163
+ /**
1164
+ * WHICH of the run's questions this row shows — opaque, echoed back by an answer (#1581, eighth review).
1165
+ * A run may ask again after an answer, under the same task id, so the task id alone cannot say which
1166
+ * question a person was looking at when they typed; an answer carrying this continues only that one.
1167
+ */
1168
+ suspensionRef: z.string().min(1),
1048
1169
  });
1049
1170
  /**
1050
1171
  * One dossier entry: a question a playbook declares, and what the creator said to it, if anything.
@@ -1055,10 +1176,18 @@ export const Workbench_ParkedCodingQuestion_Schema = z.object({
1055
1176
  * surface can ASK it without a second read.
1056
1177
  */
1057
1178
  export const Workbench_DossierEntry_Schema = z.object({
1058
- /** EMITTED BY THE BEHAVIOR: `sanitize(playbookRef)--sanitize(questionRef)`. */
1179
+ /** EMITTED BY THE BEHAVIOR through `workbenchDossierEntryIdentity`. */
1059
1180
  workbenchDossierEntryId: z.string().min(1).isPrimaryKey().isSummaryField(),
1060
1181
  playbookRef: z.string().min(1).isSummaryField(),
1061
1182
  questionRef: z.string().min(1).isSummaryField(),
1183
+ /**
1184
+ * The INSTANCE of the step this question is asked for (#1609), or null for the step itself. An opened
1185
+ * instance asks its own questions, so the same question appears once per instance; an instance that
1186
+ * has not answered one falls back to the step's own answer when it runs.
1187
+ */
1188
+ instanceKey: z.string().nullable().isSummaryField(),
1189
+ /** What the instance was opened FOR, in the creator's words; null for the step itself. */
1190
+ instancePurpose: z.string().nullable().isSummaryField(),
1062
1191
  /** The authored question, verbatim from the playbook. */
1063
1192
  question: z.string().min(1).isSummaryField(),
1064
1193
  /**
@@ -1090,6 +1219,32 @@ export const Workbench_DossierEntry_Schema = z.object({
1090
1219
  * derived before the answer changed reads as stale on its playbook.
1091
1220
  */
1092
1221
  affectsFamilies: z.array(z.string()).isSummaryField(),
1222
+ /**
1223
+ * WHAT THE QUESTION IS ABOUT, on the axis the artifact list groups families by (#1454, gap 4): the
1224
+ * concern of the family the asking step produces — or, for a step that produces none, of the first
1225
+ * family its answer reaches. The dossier groups by it, so a creator reads "why it exists", "how it
1226
+ * gets built" and "what it must promise" rather than three lists organised by machinery.
1227
+ */
1228
+ subject: z.enum(WorkbenchSpecificationArtifactConcern).systemEnum('WorkbenchSpecificationArtifactConcern').isSummaryField(),
1229
+ /**
1230
+ * OUT OF DATE: answered, and a step READING this answer made its result before one of the answers it
1231
+ * reads changed (its stale outputs list `creator-inputs`; #1454, gap 4 and its review). Derived from `outOfDateStepRefs` (non-empty), and
1232
+ * kept as its own boolean because it is what the row's badge and a list filter ask.
1233
+ */
1234
+ outOfDate: z.boolean().isSummaryField(),
1235
+ /**
1236
+ * WHICH steps are out of date for this answer: the asking step and every step sharing the decision
1237
+ * (`sharedWithPlaybookRefs`) with a stale output whose changed inputs include `creator-inputs`. A shared decision is ONE row,
1238
+ * so "Regenerate" has to name the step it reruns; before this carried the refs, a change to a shared
1239
+ * answer marked and reran only the owner (#1454 review, LOW).
1240
+ */
1241
+ outOfDateStepRefs: z.array(z.string()).isSummaryField(),
1242
+ /**
1243
+ * The other steps that READ this decision (a `sameDecisionAs` fallback with no answer of its own,
1244
+ * #1454 review). One decision is one row, at its owner; those steps' interviews show and answer it,
1245
+ * so it is asked once.
1246
+ */
1247
+ sharedWithPlaybookRefs: z.array(z.string()).isSummaryField(),
1093
1248
  });
1094
1249
  /** The dossier resource's one write verb. */
1095
1250
  export var WorkbenchDossierEntries_Operations;
@@ -1380,19 +1535,26 @@ export var WorkbenchParkedCodingQuestions_Operations;
1380
1535
  /** Answer THIS parked run and resume the same agent session. A WRITE: it re-enters a workspace-mutating run behind the worktree lock. */
1381
1536
  WorkbenchParkedCodingQuestions_Operations["ANSWER"] = "answer";
1382
1537
  /**
1383
- * End the coding run that is active — collection-level, because there is ONE coding lane and one
1384
- * active run; the parked row is where an operator meets the decision, not what identifies the run.
1538
+ * End THIS parked run. Per row since #1581 (seventh review): with waves (#1528) several runs may be
1539
+ * live, and a collection-level cancel ended whatever this process drove — doing nothing for a park
1540
+ * no chain held, and stopping other runs while this one stayed parked.
1385
1541
  */
1386
1542
  WorkbenchParkedCodingQuestions_Operations["CANCEL"] = "cancel";
1387
1543
  })(WorkbenchParkedCodingQuestions_Operations || (WorkbenchParkedCodingQuestions_Operations = {}));
1388
1544
  export const Workbench_ParkedQuestionAnswerRequest_Schema = z.object({
1389
1545
  /** The answer, in the operator's words. Empty is refused by the lane with its own sentence. */
1390
1546
  answer: z.string(),
1547
+ /** The row's `suspensionRef`: the question this answers. Refused (409) once the run has asked another. */
1548
+ suspensionRef: z.string().min(1),
1391
1549
  });
1392
1550
  /** The lane's admission of the resumed run — its own shape, carried loosely. */
1393
1551
  export const Workbench_ParkedQuestionAnswerOutcome_Schema = z.looseObject({});
1552
+ /**
1553
+ * The row's `cancel` answers ONLY a run it ended or signalled: a run that moved on meanwhile is a 409 the
1554
+ * gate shows, never a `cancelled: false` read as success (#1581, eleventh and twelfth reviews).
1555
+ */
1394
1556
  export const Workbench_CodingRunCancelOutcome_Schema = z.looseObject({
1395
- cancelled: z.boolean(),
1557
+ cancelled: z.literal(true),
1396
1558
  });
1397
1559
  /**
1398
1560
  * The governed document's one verb: LAND the facts a person established for it as the
@@ -1434,4 +1596,203 @@ export const Workbench_GovernanceFactsLandingOutcome_Schema = z.object({
1434
1596
  existedBefore: z.boolean(),
1435
1597
  wiringAlreadyInPlace: z.array(z.string()),
1436
1598
  });
1599
+ /**
1600
+ * Where one secret stands for an application in one environment (#1637).
1601
+ *
1602
+ * The ONE vocabulary for `wildo secrets list`, the creation essentials of `wildo init`/`setup` and
1603
+ * the workbench's secrets section, so the three cannot disagree about what "needed" means. Derived
1604
+ * from what the application declares (the providers it scopes, the capabilities it enables, its systems
1605
+ * of record and inbound endpoints), never from the provider catalogue.
1606
+ */
1607
+ export var ApplicationSecretStanding;
1608
+ (function (ApplicationSecretStanding) {
1609
+ /**
1610
+ * Required by something the application uses, unset, and nothing else covers what it is for: a
1611
+ * capability, a provider the application scoped on purpose, a system of record or an inbound endpoint
1612
+ * cannot work until it is provided.
1613
+ */
1614
+ ApplicationSecretStanding["NEEDED"] = "needed";
1615
+ /** It has a value in this environment, and something reads it. */
1616
+ ApplicationSecretStanding["SET"] = "set";
1617
+ /** Unset, and nothing waits for it: an optional key, or a capability another provider already serves. */
1618
+ ApplicationSecretStanding["AVAILABLE"] = "available";
1619
+ /**
1620
+ * It has a value, and nothing CONSUMES it: a provider key no provider declares, a system-of-record key
1621
+ * naming no declared instance or no slot its credential has, an inbound key naming no endpoint. It is
1622
+ * listed to be REMOVED — the one verb it offers. Usually the remains of something renamed or retired
1623
+ * (Odoo was a provider before it was a system of record).
1624
+ *
1625
+ * Unconsumed is not undelivered: the dev companion's `.env` carries EVERY provider key, and the backend
1626
+ * receives a well-formed inbound name or a slot of a declared instance. So a row says which runtimes still
1627
+ * receive it, and removing it regenerates their `.env` files like any other change — otherwise the value
1628
+ * would stay on disk and in the running process after the person was told it was gone.
1629
+ */
1630
+ ApplicationSecretStanding["UNUSED"] = "unused";
1631
+ })(ApplicationSecretStanding || (ApplicationSecretStanding = {}));
1632
+ /**
1633
+ * What a secret belongs to, and so which section of `secrets.json` holds it and how its name is formed.
1634
+ * Three kinds because they are three different things, not three spellings of a provider key: a system of
1635
+ * record is deliberately NOT a provider (#1049 D10) and an inbound endpoint secret proves a delivery rather
1636
+ * than authenticating a call.
1637
+ */
1638
+ export var ApplicationSecretKind;
1639
+ (function (ApplicationSecretKind) {
1640
+ /** A provider's secret, declared by its secrets contract; `secrets.json` → `providerEnv`. */
1641
+ ApplicationSecretKind["PROVIDER"] = "provider";
1642
+ /**
1643
+ * A credential slot of a declared system of record (#1055), named `WILDO_SOR_<NAME>__<SLOT>`;
1644
+ * `secrets.json` → `systemsOfRecordEnv`. Read by the application backend only.
1645
+ */
1646
+ ApplicationSecretKind["SYSTEM_OF_RECORD"] = "system_of_record";
1647
+ /**
1648
+ * The verification secret of an application inbound endpoint (#1596), named
1649
+ * `WILDO_INBOUND_<ENDPOINT_KEY>__SECRET`; `secrets.json` → `inboundEndpointEnv`. Read by the backend only.
1650
+ */
1651
+ ApplicationSecretKind["INBOUND_ENDPOINT"] = "inbound_endpoint";
1652
+ })(ApplicationSecretKind || (ApplicationSecretKind = {}));
1653
+ /**
1654
+ * Which GitHub level holds a REMOTE environment's provider secret. Remote secrets are GitHub Actions
1655
+ * secrets; the generated deploy job declares `environment: <env>`, so an environment secret applies to
1656
+ * that environment alone and overrides a repository secret of the same name, which is the fallback.
1657
+ * spec-cite: https://docs.github.com/en/actions/reference/security/secrets — "If an organization, repository, and environment all have a secret with the same name, the environment-level secret takes precedence."
1658
+ */
1659
+ export var ApplicationSecretRemoteLevel;
1660
+ (function (ApplicationSecretRemoteLevel) {
1661
+ ApplicationSecretRemoteLevel["ENVIRONMENT"] = "environment";
1662
+ ApplicationSecretRemoteLevel["REPOSITORY"] = "repository";
1663
+ })(ApplicationSecretRemoteLevel || (ApplicationSecretRemoteLevel = {}));
1664
+ /**
1665
+ * Joins the parts of a secret row's id. The separator must be something an environment id and a kind cannot
1666
+ * contain, so the id splits back on its first two occurrences. Environment ids are `^[a-z0-9]+(?:-[a-z0-9]+)*$`
1667
+ * (`WildoEnvironmentIdSchema`), and no {@link ApplicationSecretKind} value contains `--`.
1668
+ */
1669
+ const APPLICATION_SECRET_ROW_ID_SEPARATOR = '--';
1670
+ const APPLICATION_SECRET_KIND_VALUES = new Set(Object.values(ApplicationSecretKind));
1671
+ /**
1672
+ * The `id` of one secret row: environment, kind and name (`local--provider--OPENAI_API_KEY`). The same name is
1673
+ * a different secret per environment, and per KIND too — each kind is its own `secrets.json` section, so a
1674
+ * key left in the wrong section during a migration (an Odoo credential still in `providerEnv`) is a second
1675
+ * secret beside the one that belongs, and must be addressable on its own rather than colliding with it.
1676
+ *
1677
+ * The id travels in the URL of the row's page and of its `set` / `unset` operations, and the engine checks
1678
+ * it before any handler runs (`ExecutionContextCreator.validateParameterFormat`). It was
1679
+ * `<environment>::<NAME>` until 2026-09-26: the list rendered, but the row's page and both operations
1680
+ * answered `400 api_call_initiator_parameter_unsupported`, because that check then held every id to
1681
+ * `^[a-zA-Z0-9_-]+$`. Since #2048 it holds an introspected row's id to the introspection format, which admits
1682
+ * more; this id stays inside the narrower alphabet anyway, so it is valid under both, and
1683
+ * `workbench-application-secret-row-id.test.ts` pins that.
1684
+ */
1685
+ export function applicationSecretRowId(envName, kind, envVarName) {
1686
+ return [envName, kind, envVarName].join(APPLICATION_SECRET_ROW_ID_SEPARATOR);
1687
+ }
1688
+ /**
1689
+ * Splits a secret row's id back into environment, kind and name, or `null` when it cannot be a row id. It
1690
+ * splits on the first two separators — neither the environment nor the kind can contain one — and the name
1691
+ * keeps any it has. A well-formed id naming nothing real is refused later by `wildo secrets`, which states
1692
+ * the reason itself.
1693
+ */
1694
+ export function splitApplicationSecretRowId(rowId) {
1695
+ const first = rowId.indexOf(APPLICATION_SECRET_ROW_ID_SEPARATOR);
1696
+ if (first <= 0)
1697
+ return null;
1698
+ const kindStart = first + APPLICATION_SECRET_ROW_ID_SEPARATOR.length;
1699
+ const second = rowId.indexOf(APPLICATION_SECRET_ROW_ID_SEPARATOR, kindStart);
1700
+ if (second <= kindStart)
1701
+ return null;
1702
+ const kind = rowId.slice(kindStart, second);
1703
+ const envVarName = rowId.slice(second + APPLICATION_SECRET_ROW_ID_SEPARATOR.length);
1704
+ if (!APPLICATION_SECRET_KIND_VALUES.has(kind) || envVarName.length === 0)
1705
+ return null;
1706
+ return { envName: rowId.slice(0, first), kind: kind, envVarName };
1707
+ }
1708
+ /**
1709
+ * One secret an application declares a use for (or still holds), in one environment — the workbench's
1710
+ * secrets section. Names and standings only: a value never enters this row, in either direction of the wire.
1711
+ */
1712
+ export const Workbench_ApplicationSecret_Schema = z.object({
1713
+ /**
1714
+ * `<environment>--<kind>--<NAME>` — see {@link applicationSecretRowId}. A SUMMARY field like every other
1715
+ * workbench row's key: the list is read in summary mode, and a card whose row carries no id cannot open its
1716
+ * row — which is where `set` and `unset` live (#1637).
1717
+ */
1718
+ workbenchApplicationSecretId: z.string().min(1).isPrimaryKey().isSummaryField(),
1719
+ /** The environment this row describes (`local`, or a remote environment's name). */
1720
+ environmentName: z.string().min(1).isSummaryField(),
1721
+ /** The environment variable the runtime reads — the key in the `secrets.json` section its {@link kind} names. */
1722
+ envVarName: z.string().min(1).isSummaryField(),
1723
+ /** Where it stands: needed, set, available, or unused. */
1724
+ standing: z.enum(ApplicationSecretStanding).systemEnum('ApplicationSecretStanding').isSummaryField(),
1725
+ /** What it belongs to: a provider, a system of record, or an inbound endpoint. */
1726
+ kind: z.enum(ApplicationSecretKind).systemEnum('ApplicationSecretKind').isSummaryField(),
1727
+ /**
1728
+ * WHICH one, in the vocabulary of its {@link kind}: the provider ref, the system-of-record instance name,
1729
+ * or the inbound endpoint key. NULL only for an {@link ApplicationSecretStanding.UNUSED} key that names
1730
+ * no owner: a provider key no provider declares, or a system-of-record or inbound name that does not parse.
1731
+ */
1732
+ ownerRef: z.string().min(1).nullable().isSummaryField(),
1733
+ /** Its owner's own description of it, when it has one. */
1734
+ description: z.string().nullable(),
1735
+ /** The enabled capabilities a provider serves for this application — why the secret is needed. Empty for the other kinds. */
1736
+ capabilities: z.array(z.enum(EngineCapability).systemEnum('EngineCapability')),
1737
+ /**
1738
+ * The runtimes that RECEIVE it in their environment — the ones a change regenerates and restarts: `backend`,
1739
+ * `companion`, `minions.<key>`, `workers.<key>`, `frontendServices.<key>`. For an UNUSED key this is where it
1740
+ * is still carried, never where it is used.
1741
+ */
1742
+ runtimes: z.array(z.string()),
1743
+ /** The companion's LLM key — the one secret `wildo init`/`setup` ask for, because the creation chat runs on it. */
1744
+ creationEssential: z.boolean(),
1745
+ /** Remote only: which GitHub level holds it. NULL locally, and NULL for a remote secret that is not set. */
1746
+ remoteLevel: z.enum(ApplicationSecretRemoteLevel).systemEnum('ApplicationSecretRemoteLevel').nullable(),
1747
+ });
1748
+ /** The secret row's two verbs. Both run `wildo secrets set/unset`, which is the only writer of a secret. */
1749
+ export var WorkbenchApplicationSecrets_Operations;
1750
+ (function (WorkbenchApplicationSecrets_Operations) {
1751
+ /**
1752
+ * Provide THIS secret's value. Locally the runtimes that read it restart to pick it up; remotely it
1753
+ * becomes the GitHub Environment secret the deploy reads.
1754
+ */
1755
+ WorkbenchApplicationSecrets_Operations["SET"] = "set";
1756
+ /** Remove THIS secret from its environment. */
1757
+ WorkbenchApplicationSecrets_Operations["UNSET"] = "unset";
1758
+ })(WorkbenchApplicationSecrets_Operations || (WorkbenchApplicationSecrets_Operations = {}));
1759
+ export const Workbench_ApplicationSecretSetRequest_Schema = z.object({
1760
+ /**
1761
+ * The value. Never returned, never logged, never stored by the companion: `.isWriteOnlySecret()` masks
1762
+ * it in every RESPONSE, so once saved nothing shows it again.
1763
+ *
1764
+ * Entered in a multi-line box, visible while typed, as GitHub's own secret form does. Decided by
1765
+ * practice rather than taste, and measured against the two alternatives:
1766
+ * - A masked (`type=password`) input was tried first. It is single-line, so a pasted key file lost its
1767
+ * line breaks, and a browser treats it as a login: Chrome ignores `autocomplete="off"` on password
1768
+ * fields and still autofills or offers to save into `new-password` ones, so a provider key could be
1769
+ * saved as a localhost password or a saved one filled in unseen. The vocabulary has no `off` token.
1770
+ * - A single-line text input strips newlines from a paste too (HTML value sanitization).
1771
+ * The box preserves what was pasted, and a person can check a paste before saving it.
1772
+ */
1773
+ value: z.string().min(1).stringUI({ edit: { editMode: StringEditMode.TEXTAREA } }).isWriteOnlySecret(),
1774
+ });
1775
+ /**
1776
+ * What a change did — the shape `wildo secrets set/unset --json` prints (#1637). The local fields are
1777
+ * inert for a remote environment, whose change is the GitHub secret itself.
1778
+ */
1779
+ export const Workbench_ApplicationSecretChangeOutcome_Schema = z.object({
1780
+ envVarName: z.string(),
1781
+ /** Which section the change was made in — with the name and the environment, the secret's identity. */
1782
+ kind: z.enum(ApplicationSecretKind).systemEnum('ApplicationSecretKind'),
1783
+ envName: z.string(),
1784
+ /** Local: the runtimes a LIVE `wildo local dev` supervisor was asked to restart to read the change. */
1785
+ restartSignalledRuntimes: z.array(z.string()),
1786
+ /** Local: whether the runtimes' `.env` files were regenerated. */
1787
+ envFilesRegenerated: z.boolean(),
1788
+ /** Local: why the `.env` files were not regenerated, with the command to run; null when they were. */
1789
+ envFilesRegenerationFailure: z.string().nullable(),
1790
+ /** Local: the companion reads this key and applies the change itself instead of restarting. */
1791
+ companionAppliesChange: z.boolean(),
1792
+ /**
1793
+ * Set by the COMPANION (never by the CLI) when it could not apply the change in-process: the value is
1794
+ * saved and reaches the companion at its next start. Absent when nothing failed.
1795
+ */
1796
+ companionApplyFailure: z.string().optional(),
1797
+ });
1437
1798
  //# sourceMappingURL=workbench-creation-plane.custom.shared.schemas.js.map