@wildo-ai/platform-core-shared 1.1.1 → 1.1.2

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 (51) hide show
  1. package/dist/esm/index.d.ts +7 -0
  2. package/dist/esm/index.d.ts.map +1 -1
  3. package/dist/esm/index.js +7 -0
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts +3 -3
  6. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts.map +1 -1
  7. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.js +39 -8
  8. package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.js.map +1 -1
  9. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts +4 -3
  10. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts.map +1 -1
  11. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.js +37 -6
  12. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.js.map +1 -1
  13. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts +1 -0
  14. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts.map +1 -1
  15. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js +13 -0
  16. package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js.map +1 -1
  17. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.d.ts +100 -0
  18. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.d.ts.map +1 -0
  19. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js +578 -0
  20. package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js.map +1 -0
  21. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.d.ts +98 -0
  22. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.d.ts.map +1 -0
  23. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.js +86 -0
  24. package/dist/esm/workbench/workbench-creation-board.custom.shared.schemas.js.map +1 -0
  25. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts +157 -0
  26. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts.map +1 -0
  27. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js +258 -0
  28. package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js.map +1 -0
  29. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts +221 -0
  30. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts.map +1 -0
  31. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js +292 -0
  32. package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js.map +1 -0
  33. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts +48 -0
  34. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts.map +1 -0
  35. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js +48 -0
  36. package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js.map +1 -0
  37. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts +142 -21
  38. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js +252 -23
  40. package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js.map +1 -1
  41. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts +280 -55
  42. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts.map +1 -1
  43. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js +187 -102
  44. package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js.map +1 -1
  45. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts +227 -49
  46. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts.map +1 -1
  47. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.js +464 -85
  48. package/dist/esm/workbench/workbench-resources.custom.shared.schemas.js.map +1 -1
  49. package/dist/tsconfig.build.tsbuildinfo +1 -1
  50. package/package.json +4 -5
  51. package/dist/esm/.builder.pid +0 -9
@@ -0,0 +1,292 @@
1
+ import { z } from 'zod';
2
+ import { initZodDecorators } from '@wildo-ai/zod-decorators';
3
+ initZodDecorators(z);
4
+ /**
5
+ * The CREATION PLANE's shared vocabulary — schemas for the four companion-runtime resource
6
+ * families, and the behavior ids their bindings name.
7
+ *
8
+ * ## What these rows are, and are not
9
+ *
10
+ * They are the companion's OWN RUNTIME projections for the one application it serves: the playbook
11
+ * eligibility board, the build-plan dispatch view, the run write-register and the execution-trace
12
+ * index. Unlike every other workbench resource, nothing here is derived from the application's
13
+ * source by a subprocess — the behaviors materialize IN-PROCESS from the companion's running
14
+ * services, which is why their binding declares `IntrospectionTenancyStance.APPLICATION_RUNTIME`
15
+ * and their variants are authenticated rather than `APP_PUBLIC`.
16
+ *
17
+ * ## Why the vocabularies stay plain strings
18
+ *
19
+ * Same argument as the domain-model schema one file over: `phase`, `functionalTopic` and
20
+ * `targetKind` are owned by `@wildo-ai/saas-specifications`, which this package deliberately does
21
+ * not depend on (it would drag the whole specification graph into every platform consumer). The
22
+ * companion produces the values from the real enums; binding them here would make a row a newer
23
+ * companion legitimately produces unparseable by an older workbench — refusing to show exactly the
24
+ * state the board exists to reveal.
25
+ */
26
+ /**
27
+ * The behavior ids the creation-plane bindings declare — the companion's IN-PROCESS catalog.
28
+ *
29
+ * ONE named source, consumed from both ends: the resource configs (this package) write these into
30
+ * `introspectionBinding.behavior`, and the companion's introspection source routes on membership —
31
+ * an id in this set is served by `CreationPlaneProjectionCompanionService` in-process; any other id
32
+ * flows to the subprocess lane. Deliberately NOT added to the companion's
33
+ * `CompanionIntrospectionBehaviorIdValues`: that vocabulary's execution contract
34
+ * (`materializationBoundary: 'subprocess'`, routing targets, service kinds) describes a machinery
35
+ * these behaviors never enter.
36
+ */
37
+ export var WorkbenchCreationPlaneBehavior;
38
+ (function (WorkbenchCreationPlaneBehavior) {
39
+ /** `listPlaybookEligibility()` rows + projected `computedAt`/`phase`, behind the eligibility cache. */
40
+ WorkbenchCreationPlaneBehavior["PLAYBOOK_ELIGIBILITY"] = "creation-plane.playbook-eligibility";
41
+ /** The build-plan graph's tasks with dispatch `status` computed against git (ready / landed / blocked). */
42
+ WorkbenchCreationPlaneBehavior["BUILD_PLAN_TASKS"] = "creation-plane.build-plan-tasks";
43
+ /** The write register's records, pre-image bytes stripped. */
44
+ WorkbenchCreationPlaneBehavior["RUN_WRITE_RECORDS"] = "creation-plane.run-write-records";
45
+ /** The execution-trace session index. */
46
+ WorkbenchCreationPlaneBehavior["TRACE_SESSIONS"] = "creation-plane.trace-sessions";
47
+ })(WorkbenchCreationPlaneBehavior || (WorkbenchCreationPlaneBehavior = {}));
48
+ /** Membership test the companion's source routes by. */
49
+ export const WORKBENCH_CREATION_PLANE_BEHAVIOR_IDS = Object.freeze(Object.values(WorkbenchCreationPlaneBehavior));
50
+ /**
51
+ * The creation plane's IDENTITY RULE — part of the shared contract, deliberately, because both ends
52
+ * apply it: the companion's projections emit each row's id from its business key
53
+ * (`identityFields` composition refuses values outside `[a-zA-Z0-9_-]`, and playbook refs and trace
54
+ * session ids legitimately carry dots), and a frontend surface holding only the business key
55
+ * (an interrupted run's `playbookRef`) derives the row address the same way. Two copies of this
56
+ * function would be the drift this package exists to prevent.
57
+ *
58
+ * `.` becomes `__`; anything else outside the charset becomes `-`. NOT injective in general —
59
+ * which is why the companion's projections refuse post-sanitization duplicates rather than serving
60
+ * two rows under one id, and why server-side lookups match sanitized forms instead of reversing.
61
+ */
62
+ export function sanitizeWorkbenchCreationPlaneIdentity(value) {
63
+ return value.replaceAll('.', '__').replace(/[^a-zA-Z0-9_-]/g, '-');
64
+ }
65
+ /**
66
+ * The dispatch status of one build-plan task — computed, never stored.
67
+ *
68
+ * `LANDED` = the dispatch service's landed-refs resolution (evidence in git) includes it.
69
+ * `READY` = every prerequisite landed and it has not. `BLOCKED` = at least one prerequisite has
70
+ * not landed. Exactly one holds per task, derived per read.
71
+ */
72
+ export var WorkbenchBuildPlanTaskStatus;
73
+ (function (WorkbenchBuildPlanTaskStatus) {
74
+ WorkbenchBuildPlanTaskStatus["READY"] = "ready";
75
+ WorkbenchBuildPlanTaskStatus["LANDED"] = "landed";
76
+ WorkbenchBuildPlanTaskStatus["BLOCKED"] = "blocked";
77
+ })(WorkbenchBuildPlanTaskStatus || (WorkbenchBuildPlanTaskStatus = {}));
78
+ /**
79
+ * One playbook's row on the eligibility board.
80
+ *
81
+ * A projection of the application-creation runtime's `PlaybookEligibility` (whose docs carry the
82
+ * semantics), flattened for a list row: the per-precondition verdict objects are NOT carried —
83
+ * `unmet` is their already-rendered "why not" — and two board-level scalars are projected ONTO each
84
+ * row (`phase`, `computedAt`) because a resource row must be complete on its own.
85
+ */
86
+ export const Workbench_Playbook_Schema = z.object({
87
+ /**
88
+ * EMITTED BY THE BEHAVIOR — `playbookRef` sanitized to the URL-safe identity charset — NOT
89
+ * composed by the binding's `identityFields`. Composition refuses any value outside
90
+ * `[a-zA-Z0-9_-]`, and playbook refs legitimately carry dots (`top_down.phase-gate`), so the
91
+ * projection service derives the field itself (`.` → `__`, anything else invalid → `-`) and
92
+ * REFUSES on a post-sanitization duplicate rather than serving two rows under one id.
93
+ */
94
+ workbenchPlaybookId: z.string().min(1).isPrimaryKey().isSummaryField(),
95
+ playbookRef: z.string().min(1).isSummaryField(),
96
+ playbookVersion: z.string().min(1).isSummaryField(),
97
+ /**
98
+ * The PLAYBOOK's own taxonomy label (`top_down`, `bottom_up`, `refinement`, `cross_cutting`) — what
99
+ * kind of reasoning it embodies.
100
+ *
101
+ * It said "the derived journey phase — board-level, projected per row" until 2026-09-04, and that is
102
+ * what it carried: one application-level value stamped onto every row, while the workbench rendered
103
+ * it beside each playbook as if it described that playbook. The derived application phase is gone
104
+ * (`MetaWorkflow_Phase`); this is the label that was always true of the row.
105
+ */
106
+ phase: z.string().min(1).isSummaryField(),
107
+ /** One sentence: what running this playbook produces. */
108
+ intent: z.string().isSummaryField(),
109
+ /** The deterministic gate's verdict: may this playbook run right now. */
110
+ eligible: z.boolean().isSummaryField(),
111
+ /** The `detail` of every unsatisfied precondition — "why not", already rendered by the runtime. */
112
+ unmet: z.array(z.string()).isSummaryField(),
113
+ /** Every READINESS precondition holds and only SEQUENCING ones do not: information, not a refusal. */
114
+ blockedOnlyBySequencing: z.boolean().isSummaryField(),
115
+ /** This playbook interviews the creator, so a run will stop and ask. */
116
+ requiresElicitation: z.boolean().isSummaryField(),
117
+ /** Families this playbook writes that ALREADY have content — a run implies an overwrite. */
118
+ wouldReplace: z.array(z.string()).isSummaryField(),
119
+ /** Families no render profile can land yet. A run would refuse; the board says so first. */
120
+ unlandableFamilies: z.array(z.string()).isSummaryField(),
121
+ /** Landed outputs whose declared inputs have moved since. An ANNOTATION, never a gate. */
122
+ staleOutputs: z.array(z.object({
123
+ family: z.string().min(1),
124
+ changedInputs: z.array(z.string()),
125
+ })).isSummaryField(),
126
+ /** When the served board was computed — the cache's honesty field, rendered as "as of". */
127
+ computedAt: z.string().min(1).isSummaryField(),
128
+ });
129
+ /**
130
+ * One build-plan task in the DISPATCH view.
131
+ *
132
+ * DELIBERATELY THIN beside the `workbenchBuildTasks` aspect resource, which projects the same
133
+ * authored population from the specification artifact with its traceability edges. This row
134
+ * answers "what can run next and what has landed"; authored detail (skill refs, serves edges)
135
+ * stays on the aspect row sharing the same `taskRef`.
136
+ */
137
+ export const Workbench_BuildPlanTask_Schema = z.object({
138
+ /** Emitted by the behavior (task refs are already URL-safe by their own regex; same lane as its siblings). */
139
+ workbenchBuildPlanTaskId: z.string().min(1).isPrimaryKey().isSummaryField(),
140
+ taskRef: z.string().min(1).isSummaryField(),
141
+ /** One sentence of intent: what this task delivers. */
142
+ objective: z.string().min(1).isSummaryField(),
143
+ /** The target's `kind` discriminant only — the physical detail belongs to the dispatch plan. */
144
+ targetKind: z.string().min(1).isSummaryField(),
145
+ /** Which phase of building the application this task belongs to (context, never ordering). */
146
+ functionalTopic: z.string().min(1).isSummaryField(),
147
+ status: z.enum(WorkbenchBuildPlanTaskStatus).isSummaryField(),
148
+ /** Task refs that must land first — the only thing that decides what may run next. */
149
+ prerequisiteTaskRefs: z.array(z.string()).isSummaryField(),
150
+ });
151
+ /**
152
+ * One run's write record — the evidence lane behind every dispatch.
153
+ *
154
+ * Pre-image BYTES (`previousContent`) are deliberately not projected: they belong to the revert
155
+ * mechanism, and a list row carrying every pre-image would ship the working tree's history through
156
+ * every LIST.
157
+ */
158
+ export const Workbench_RunWriteRecord_Schema = z.object({
159
+ /** Emitted by the behavior — `runId` sanitized to the identity charset (see the playbook id note). */
160
+ workbenchRunWriteRecordId: z.string().min(1).isPrimaryKey().isSummaryField(),
161
+ runId: z.string().min(1).isSummaryField(),
162
+ playbookRef: z.string().min(1).isSummaryField(),
163
+ /*
164
+ * The JOIN KEYS (Phase 4, requirement R5), emitted by the projection as SANITIZED identities so
165
+ * the values match the target rows' ids — `playbookRef` is the human-readable business key,
166
+ * `workbenchPlaybookId` is the addressable one. Named exactly as the target's own field
167
+ * identifier so the global field-identifier map resolves the reference, and declared as
168
+ * REFERENCE relationships beside the configs so the engine's reference machinery (labels,
169
+ * navigation, related lists) does the linking — no bespoke link code.
170
+ */
171
+ /** The playbook this run executed — every record has one. */
172
+ workbenchPlaybookId: z.string().min(1).isForeignKey().isSummaryField(),
173
+ /**
174
+ * The execution-trace session the run recorded under, resolved by PREFIX (a runId is
175
+ * `<sessionId>-<playbookRef>-<ts>`). NULL when no listed session matches — a register can
176
+ * legitimately outlive its trace directory, and a dangling id would render as a broken link.
177
+ */
178
+ workbenchTraceSessionId: z.string().min(1).isForeignKey().isSummaryField().nullable(),
179
+ /** When the run recorded its writes (ISO). */
180
+ at: z.string().min(1).isSummaryField(),
181
+ files: z.array(z.object({
182
+ /** App-root-relative path of the written file. */
183
+ path: z.string().min(1),
184
+ /** What makes a revert honest: whether the file existed before the run. */
185
+ existedBefore: z.boolean(),
186
+ })).isSummaryField(),
187
+ /** Projected count, so a list can say "wrote 7 files" without rendering the array. */
188
+ fileCount: z.number().int().isSummaryField(),
189
+ });
190
+ /** One execution-trace session — the queryable index the board links from. */
191
+ export const Workbench_TraceSession_Schema = z.object({
192
+ /** Emitted by the behavior — session ids admit `.` (`dev-<ISO-ish>` directory names), so sanitized (see the playbook id note). */
193
+ workbenchTraceSessionId: z.string().min(1).isPrimaryKey().isSummaryField(),
194
+ sessionId: z.string().min(1).isSummaryField(),
195
+ /** When the session started (ISO-ish; embedded in the session directory name). */
196
+ startedAt: z.string().min(1).isSummaryField(),
197
+ label: z.string().min(1).isSummaryField().nullable(),
198
+ eventCount: z.number().int().isSummaryField(),
199
+ stepCount: z.number().int().isSummaryField(),
200
+ });
201
+ /*
202
+ * ────────────────────────── Phase 3: dispatch OPERATIONS ──────────────────────────
203
+ *
204
+ * The creation board's dispatches as CUSTOM OPERATIONS (plan D3): declared here beside the
205
+ * resources they act on, implemented COMPANION-SIDE as `OVERRIDE_ALL` custom implementations
206
+ * delegating to the companion's own services — never as generated writes, which the introspection
207
+ * repository refuses by contract. `OVERRIDE_ALL` returns before the framework's repository and
208
+ * transaction machinery, which is exactly what a dispatch onto a derived resource needs (verified,
209
+ * plan Phase 0), and none of these declares a transaction contract, so the
210
+ * `override_all_not_supported_for_transaction_requiring_operation` refusal never applies.
211
+ */
212
+ /** The playbook resource's dispatch verbs. */
213
+ export var WorkbenchPlaybooks_Operations;
214
+ (function (WorkbenchPlaybooks_Operations) {
215
+ /** Fire one playbook run (the row is the playbook; the body carries brief/answers/dryRun). */
216
+ WorkbenchPlaybooks_Operations["RUN"] = "run";
217
+ /** Answer a run that stopped at a clarification — accept with answers, decline, or cancel. */
218
+ WorkbenchPlaybooks_Operations["RESUME"] = "resume_run";
219
+ })(WorkbenchPlaybooks_Operations || (WorkbenchPlaybooks_Operations = {}));
220
+ /** The build-plan resource's dispatch verb. */
221
+ export var WorkbenchBuildPlanTasks_Operations;
222
+ (function (WorkbenchBuildPlanTasks_Operations) {
223
+ /**
224
+ * Run the NEXT ready build-plan task — collection-level on purpose: the graph already encodes
225
+ * the order its author intended, and a per-row dispatch would be a second scheduler disagreeing
226
+ * with the first (the dispatch service's own doctrine).
227
+ */
228
+ WorkbenchBuildPlanTasks_Operations["DISPATCH_NEXT"] = "dispatch_next";
229
+ })(WorkbenchBuildPlanTasks_Operations || (WorkbenchBuildPlanTasks_Operations = {}));
230
+ /** The write-record resource's dispatch verb. */
231
+ export var WorkbenchRunWriteRecords_Operations;
232
+ (function (WorkbenchRunWriteRecords_Operations) {
233
+ /** Revert this run's writes. Files edited since are refused by name unless `force`. */
234
+ WorkbenchRunWriteRecords_Operations["REVERT"] = "revert_writes";
235
+ })(WorkbenchRunWriteRecords_Operations || (WorkbenchRunWriteRecords_Operations = {}));
236
+ export const Workbench_PlaybookRunRequest_Schema = z.object({
237
+ /** Optional product brief forwarded to the derivation. */
238
+ creatorBrief: z.string().min(1).optional(),
239
+ /**
240
+ * Answers to a playbook's declared elicitation, when the creator pre-answers. Keyed by
241
+ * `questionRef` — the elicitation vocabulary's own key, DISTINCT from a clarification answer's
242
+ * `ref` (resume below): two different question planes, two different key names, kept as they are.
243
+ */
244
+ elicitationAnswers: z.array(z.object({
245
+ questionRef: z.string().min(1),
246
+ answer: z.string().min(1),
247
+ })).optional(),
248
+ /** Full pipe — generation, validation, rendering, judge — with NO filesystem writes. */
249
+ dryRun: z.boolean().optional(),
250
+ });
251
+ export const Workbench_PlaybookResumeRequest_Schema = z.object({
252
+ /** The suspended run being answered — the handle `run` returned when it stopped to ask. */
253
+ runId: z.string().min(1),
254
+ /** `accept` (requires ≥1 answer), `decline`, or `cancel` — the industry three-action model. */
255
+ action: z.string().min(1),
256
+ answers: z.array(z.object({
257
+ ref: z.string().min(1),
258
+ answer: z.string().min(1),
259
+ })).optional(),
260
+ });
261
+ export const Workbench_BuildPlanDispatchNextRequest_Schema = z.object({
262
+ /** Optional model-token ceiling forwarded to the dispatch. */
263
+ maximumTokenBudget: z.number().int().positive().optional(),
264
+ });
265
+ export const Workbench_RunWriteRevertRequest_Schema = z.object({
266
+ /** Overwrite files edited since the run. NOT defaulted on — a human edit is never silently destroyed. */
267
+ force: z.boolean().optional(),
268
+ });
269
+ /**
270
+ * Dispatch RESPONSES are LOOSE objects, deliberately: each names the fields the board branches on
271
+ * and forwards the rest verbatim. The companion routes already spread the whole service result, and
272
+ * the recorded lesson stands — naming a closed subset is how five computed fields once vanished
273
+ * from every creator's view until someone noticed live.
274
+ */
275
+ export const Workbench_PlaybookRunOutcome_Schema = z.looseObject({
276
+ runId: z.string().optional(),
277
+ /** Present exactly when the run is HEALTHY and waiting at a clarification. */
278
+ status: z.string().optional(),
279
+ note: z.string().optional(),
280
+ });
281
+ export const Workbench_BuildPlanDispatchOutcome_Schema = z.looseObject({
282
+ taskRef: z.string().optional(),
283
+ note: z.string().optional(),
284
+ });
285
+ export const Workbench_RunWriteRevertOutcome_Schema = z.looseObject({
286
+ runId: z.string().optional(),
287
+ reverted: z.array(z.string()).optional(),
288
+ /** Files whose current bytes differ from what the run wrote — refused by name, revertable with force. */
289
+ refusedDiverged: z.array(z.string()).optional(),
290
+ note: z.string().optional(),
291
+ });
292
+ //# sourceMappingURL=workbench-creation-plane.custom.shared.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbench-creation-plane.custom.shared.schemas.js","sourceRoot":"","sources":["../../../../src/workbench/workbench-creation-plane.custom.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK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AE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,WAAW,CAAC;IAClE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,yGAAyG;IACzG,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\n\ninitZodDecorators(z);\n\n/**\n * The CREATION PLANE's shared vocabulary — schemas for the four companion-runtime resource\n * families, and the behavior ids their bindings name.\n *\n * ## What these rows are, and are not\n *\n * They are the companion's OWN RUNTIME projections for the one application it serves: the playbook\n * eligibility board, the build-plan dispatch view, the run write-register and the execution-trace\n * index. Unlike every other workbench resource, nothing here is derived from the application's\n * source by a subprocess — the behaviors materialize IN-PROCESS from the companion's running\n * services, which is why their binding declares `IntrospectionTenancyStance.APPLICATION_RUNTIME`\n * and their variants are authenticated rather than `APP_PUBLIC`.\n *\n * ## Why the vocabularies stay plain strings\n *\n * Same argument as the domain-model schema one file over: `phase`, `functionalTopic` and\n * `targetKind` are owned by `@wildo-ai/saas-specifications`, which this package deliberately does\n * not depend on (it would drag the whole specification graph into every platform consumer). The\n * companion produces the values from the real enums; binding them here would make a row a newer\n * companion legitimately produces unparseable by an older workbench — refusing to show exactly the\n * state the board exists to reveal.\n */\n\n/**\n * The behavior ids the creation-plane bindings declare — the companion's IN-PROCESS catalog.\n *\n * ONE named source, consumed from both ends: the resource configs (this package) write these into\n * `introspectionBinding.behavior`, and the companion's introspection source routes on membership —\n * an id in this set is served by `CreationPlaneProjectionCompanionService` in-process; any other id\n * flows to the subprocess lane. Deliberately NOT added to the companion's\n * `CompanionIntrospectionBehaviorIdValues`: that vocabulary's execution contract\n * (`materializationBoundary: 'subprocess'`, routing targets, service kinds) describes a machinery\n * these behaviors never enter.\n */\nexport enum WorkbenchCreationPlaneBehavior {\n /** `listPlaybookEligibility()` rows + projected `computedAt`/`phase`, behind the eligibility cache. */\n PLAYBOOK_ELIGIBILITY = 'creation-plane.playbook-eligibility',\n /** The build-plan graph's tasks with dispatch `status` computed against git (ready / landed / blocked). */\n BUILD_PLAN_TASKS = 'creation-plane.build-plan-tasks',\n /** The write register's records, pre-image bytes stripped. */\n RUN_WRITE_RECORDS = 'creation-plane.run-write-records',\n /** The execution-trace session index. */\n TRACE_SESSIONS = 'creation-plane.trace-sessions',\n}\n\n/** Membership test the companion's source routes by. */\nexport const WORKBENCH_CREATION_PLANE_BEHAVIOR_IDS: readonly string[] = Object.freeze(\n Object.values(WorkbenchCreationPlaneBehavior),\n);\n\n/**\n * The creation plane's IDENTITY RULE — part of the shared contract, deliberately, because both ends\n * apply it: the companion's projections emit each row's id from its business key\n * (`identityFields` composition refuses values outside `[a-zA-Z0-9_-]`, and playbook refs and trace\n * session ids legitimately carry dots), and a frontend surface holding only the business key\n * (an interrupted run's `playbookRef`) derives the row address the same way. Two copies of this\n * function would be the drift this package exists to prevent.\n *\n * `.` becomes `__`; anything else outside the charset becomes `-`. NOT injective in general —\n * which is why the companion's projections refuse post-sanitization duplicates rather than serving\n * two rows under one id, and why server-side lookups match sanitized forms instead of reversing.\n */\nexport function sanitizeWorkbenchCreationPlaneIdentity(value: string): string {\n return value.replaceAll('.', '__').replace(/[^a-zA-Z0-9_-]/g, '-');\n}\n\n/**\n * The dispatch status of one build-plan task — computed, never stored.\n *\n * `LANDED` = the dispatch service's landed-refs resolution (evidence in git) includes it.\n * `READY` = every prerequisite landed and it has not. `BLOCKED` = at least one prerequisite has\n * not landed. Exactly one holds per task, derived per read.\n */\nexport enum WorkbenchBuildPlanTaskStatus {\n READY = 'ready',\n LANDED = 'landed',\n BLOCKED = 'blocked',\n}\n\n/**\n * One playbook's row on the eligibility board.\n *\n * A projection of the application-creation runtime's `PlaybookEligibility` (whose docs carry the\n * semantics), flattened for a list row: the per-precondition verdict objects are NOT carried —\n * `unmet` is their already-rendered \"why not\" — and two board-level scalars are projected ONTO each\n * row (`phase`, `computedAt`) because a resource row must be complete on its own.\n */\nexport const Workbench_Playbook_Schema = z.object({\n /**\n * EMITTED BY THE BEHAVIOR — `playbookRef` sanitized to the URL-safe identity charset — NOT\n * composed by the binding's `identityFields`. Composition refuses any value outside\n * `[a-zA-Z0-9_-]`, and playbook refs legitimately carry dots (`top_down.phase-gate`), so the\n * projection service derives the field itself (`.` → `__`, anything else invalid → `-`) and\n * REFUSES on a post-sanitization duplicate rather than serving two rows under one id.\n */\n workbenchPlaybookId: z.string().min(1).isPrimaryKey().isSummaryField(),\n playbookRef: z.string().min(1).isSummaryField(),\n playbookVersion: z.string().min(1).isSummaryField(),\n /**\n * The PLAYBOOK's own taxonomy label (`top_down`, `bottom_up`, `refinement`, `cross_cutting`) — what\n * kind of reasoning it embodies.\n *\n * It said \"the derived journey phase — board-level, projected per row\" until 2026-09-04, and that is\n * what it carried: one application-level value stamped onto every row, while the workbench rendered\n * it beside each playbook as if it described that playbook. The derived application phase is gone\n * (`MetaWorkflow_Phase`); this is the label that was always true of the row.\n */\n phase: z.string().min(1).isSummaryField(),\n /** One sentence: what running this playbook produces. */\n intent: z.string().isSummaryField(),\n /** The deterministic gate's verdict: may this playbook run right now. */\n eligible: z.boolean().isSummaryField(),\n /** The `detail` of every unsatisfied precondition — \"why not\", already rendered by the runtime. */\n unmet: z.array(z.string()).isSummaryField(),\n /** Every READINESS precondition holds and only SEQUENCING ones do not: information, not a refusal. */\n blockedOnlyBySequencing: z.boolean().isSummaryField(),\n /** This playbook interviews the creator, so a run will stop and ask. */\n requiresElicitation: z.boolean().isSummaryField(),\n /** Families this playbook writes that ALREADY have content — a run implies an overwrite. */\n wouldReplace: z.array(z.string()).isSummaryField(),\n /** Families no render profile can land yet. A run would refuse; the board says so first. */\n unlandableFamilies: z.array(z.string()).isSummaryField(),\n /** Landed outputs whose declared inputs have moved since. An ANNOTATION, never a gate. */\n staleOutputs: z.array(z.object({\n family: z.string().min(1),\n changedInputs: z.array(z.string()),\n })).isSummaryField(),\n /** When the served board was computed — the cache's honesty field, rendered as \"as of\". */\n computedAt: z.string().min(1).isSummaryField(),\n});\nexport type Workbench_Playbook = z.infer<typeof Workbench_Playbook_Schema>;\n\n/**\n * One build-plan task in the DISPATCH view.\n *\n * DELIBERATELY THIN beside the `workbenchBuildTasks` aspect resource, which projects the same\n * authored population from the specification artifact with its traceability edges. This row\n * answers \"what can run next and what has landed\"; authored detail (skill refs, serves edges)\n * stays on the aspect row sharing the same `taskRef`.\n */\nexport const Workbench_BuildPlanTask_Schema = z.object({\n /** Emitted by the behavior (task refs are already URL-safe by their own regex; same lane as its siblings). */\n workbenchBuildPlanTaskId: z.string().min(1).isPrimaryKey().isSummaryField(),\n taskRef: z.string().min(1).isSummaryField(),\n /** One sentence of intent: what this task delivers. */\n objective: z.string().min(1).isSummaryField(),\n /** The target's `kind` discriminant only — the physical detail belongs to the dispatch plan. */\n targetKind: z.string().min(1).isSummaryField(),\n /** Which phase of building the application this task belongs to (context, never ordering). */\n functionalTopic: z.string().min(1).isSummaryField(),\n status: z.enum(WorkbenchBuildPlanTaskStatus).isSummaryField(),\n /** Task refs that must land first — the only thing that decides what may run next. */\n prerequisiteTaskRefs: z.array(z.string()).isSummaryField(),\n});\nexport type Workbench_BuildPlanTask = z.infer<typeof Workbench_BuildPlanTask_Schema>;\n\n/**\n * One run's write record — the evidence lane behind every dispatch.\n *\n * Pre-image BYTES (`previousContent`) are deliberately not projected: they belong to the revert\n * mechanism, and a list row carrying every pre-image would ship the working tree's history through\n * every LIST.\n */\nexport const Workbench_RunWriteRecord_Schema = z.object({\n /** Emitted by the behavior — `runId` sanitized to the identity charset (see the playbook id note). */\n workbenchRunWriteRecordId: z.string().min(1).isPrimaryKey().isSummaryField(),\n runId: z.string().min(1).isSummaryField(),\n playbookRef: z.string().min(1).isSummaryField(),\n /*\n * The JOIN KEYS (Phase 4, requirement R5), emitted by the projection as SANITIZED identities so\n * the values match the target rows' ids — `playbookRef` is the human-readable business key,\n * `workbenchPlaybookId` is the addressable one. Named exactly as the target's own field\n * identifier so the global field-identifier map resolves the reference, and declared as\n * REFERENCE relationships beside the configs so the engine's reference machinery (labels,\n * navigation, related lists) does the linking — no bespoke link code.\n */\n /** The playbook this run executed — every record has one. */\n workbenchPlaybookId: z.string().min(1).isForeignKey().isSummaryField(),\n /**\n * The execution-trace session the run recorded under, resolved by PREFIX (a runId is\n * `<sessionId>-<playbookRef>-<ts>`). NULL when no listed session matches — a register can\n * legitimately outlive its trace directory, and a dangling id would render as a broken link.\n */\n workbenchTraceSessionId: z.string().min(1).isForeignKey().isSummaryField().nullable(),\n /** When the run recorded its writes (ISO). */\n at: z.string().min(1).isSummaryField(),\n files: z.array(z.object({\n /** App-root-relative path of the written file. */\n path: z.string().min(1),\n /** What makes a revert honest: whether the file existed before the run. */\n existedBefore: z.boolean(),\n })).isSummaryField(),\n /** Projected count, so a list can say \"wrote 7 files\" without rendering the array. */\n fileCount: z.number().int().isSummaryField(),\n});\nexport type Workbench_RunWriteRecord = z.infer<typeof Workbench_RunWriteRecord_Schema>;\n\n/** One execution-trace session — the queryable index the board links from. */\nexport const Workbench_TraceSession_Schema = z.object({\n /** Emitted by the behavior — session ids admit `.` (`dev-<ISO-ish>` directory names), so sanitized (see the playbook id note). */\n workbenchTraceSessionId: z.string().min(1).isPrimaryKey().isSummaryField(),\n sessionId: z.string().min(1).isSummaryField(),\n /** When the session started (ISO-ish; embedded in the session directory name). */\n startedAt: z.string().min(1).isSummaryField(),\n label: z.string().min(1).isSummaryField().nullable(),\n eventCount: z.number().int().isSummaryField(),\n stepCount: z.number().int().isSummaryField(),\n});\nexport type Workbench_TraceSession = z.infer<typeof Workbench_TraceSession_Schema>;\n\n/*\n * ────────────────────────── Phase 3: dispatch OPERATIONS ──────────────────────────\n *\n * The creation board's dispatches as CUSTOM OPERATIONS (plan D3): declared here beside the\n * resources they act on, implemented COMPANION-SIDE as `OVERRIDE_ALL` custom implementations\n * delegating to the companion's own services — never as generated writes, which the introspection\n * repository refuses by contract. `OVERRIDE_ALL` returns before the framework's repository and\n * transaction machinery, which is exactly what a dispatch onto a derived resource needs (verified,\n * plan Phase 0), and none of these declares a transaction contract, so the\n * `override_all_not_supported_for_transaction_requiring_operation` refusal never applies.\n */\n\n/** The playbook resource's dispatch verbs. */\nexport enum WorkbenchPlaybooks_Operations {\n /** Fire one playbook run (the row is the playbook; the body carries brief/answers/dryRun). */\n RUN = 'run',\n /** Answer a run that stopped at a clarification — accept with answers, decline, or cancel. */\n RESUME = 'resume_run',\n}\n\n/** The build-plan resource's dispatch verb. */\nexport enum WorkbenchBuildPlanTasks_Operations {\n /**\n * Run the NEXT ready build-plan task — collection-level on purpose: the graph already encodes\n * the order its author intended, and a per-row dispatch would be a second scheduler disagreeing\n * with the first (the dispatch service's own doctrine).\n */\n DISPATCH_NEXT = 'dispatch_next',\n}\n\n/** The write-record resource's dispatch verb. */\nexport enum WorkbenchRunWriteRecords_Operations {\n /** Revert this run's writes. Files edited since are refused by name unless `force`. */\n REVERT = 'revert_writes',\n}\n\nexport const Workbench_PlaybookRunRequest_Schema = z.object({\n /** Optional product brief forwarded to the derivation. */\n creatorBrief: z.string().min(1).optional(),\n /**\n * Answers to a playbook's declared elicitation, when the creator pre-answers. Keyed by\n * `questionRef` — the elicitation vocabulary's own key, DISTINCT from a clarification answer's\n * `ref` (resume below): two different question planes, two different key names, kept as they are.\n */\n elicitationAnswers: z.array(z.object({\n questionRef: z.string().min(1),\n answer: z.string().min(1),\n })).optional(),\n /** Full pipe — generation, validation, rendering, judge — with NO filesystem writes. */\n dryRun: z.boolean().optional(),\n});\nexport type Workbench_PlaybookRunRequest = z.infer<typeof Workbench_PlaybookRunRequest_Schema>;\n\nexport const Workbench_PlaybookResumeRequest_Schema = z.object({\n /** The suspended run being answered — the handle `run` returned when it stopped to ask. */\n runId: z.string().min(1),\n /** `accept` (requires ≥1 answer), `decline`, or `cancel` — the industry three-action model. */\n action: z.string().min(1),\n answers: z.array(z.object({\n ref: z.string().min(1),\n answer: z.string().min(1),\n })).optional(),\n});\nexport type Workbench_PlaybookResumeRequest = z.infer<typeof Workbench_PlaybookResumeRequest_Schema>;\n\nexport const Workbench_BuildPlanDispatchNextRequest_Schema = z.object({\n /** Optional model-token ceiling forwarded to the dispatch. */\n maximumTokenBudget: z.number().int().positive().optional(),\n});\nexport type Workbench_BuildPlanDispatchNextRequest = z.infer<typeof Workbench_BuildPlanDispatchNextRequest_Schema>;\n\nexport const Workbench_RunWriteRevertRequest_Schema = z.object({\n /** Overwrite files edited since the run. NOT defaulted on — a human edit is never silently destroyed. */\n force: z.boolean().optional(),\n});\nexport type Workbench_RunWriteRevertRequest = z.infer<typeof Workbench_RunWriteRevertRequest_Schema>;\n\n/**\n * Dispatch RESPONSES are LOOSE objects, deliberately: each names the fields the board branches on\n * and forwards the rest verbatim. The companion routes already spread the whole service result, and\n * the recorded lesson stands — naming a closed subset is how five computed fields once vanished\n * from every creator's view until someone noticed live.\n */\nexport const Workbench_PlaybookRunOutcome_Schema = z.looseObject({\n runId: z.string().optional(),\n /** Present exactly when the run is HEALTHY and waiting at a clarification. */\n status: z.string().optional(),\n note: z.string().optional(),\n});\nexport type Workbench_PlaybookRunOutcome = z.infer<typeof Workbench_PlaybookRunOutcome_Schema>;\n\nexport const Workbench_BuildPlanDispatchOutcome_Schema = z.looseObject({\n taskRef: z.string().optional(),\n note: z.string().optional(),\n});\nexport type Workbench_BuildPlanDispatchOutcome = z.infer<typeof Workbench_BuildPlanDispatchOutcome_Schema>;\n\nexport const Workbench_RunWriteRevertOutcome_Schema = z.looseObject({\n runId: z.string().optional(),\n reverted: z.array(z.string()).optional(),\n /** Files whose current bytes differ from what the run wrote — refused by name, revertable with force. */\n refusedDiverged: z.array(z.string()).optional(),\n note: z.string().optional(),\n});\nexport type Workbench_RunWriteRevertOutcome = z.infer<typeof Workbench_RunWriteRevertOutcome_Schema>;\n"]}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The domain-model graph's identity, shared for the same reason its sibling board's is: THREE
3
+ * packages must agree on it and none of them can see the others.
4
+ *
5
+ * - the workbench declares the composite view under {@link WORKBENCH_DOMAIN_MODEL_VIEW_REF} and
6
+ * addresses it by that ref;
7
+ * - the companion authors the labels the view resolves, keyed by exactly those refs;
8
+ * - the engine's launcher resolution and router address the view by that same ref.
9
+ *
10
+ * Three string literals in three packages compile perfectly and fail at runtime as a blank sidebar
11
+ * row and a headless section — `tCompositeView` and `tCompositeViewSection` answer the EMPTY STRING
12
+ * for a missing key rather than echoing it, so nothing reports the drift.
13
+ *
14
+ * This carries NO React and NO Node: it is a vocabulary, which is what makes it importable by a
15
+ * browser bundle and by a daemon at once.
16
+ */
17
+ /**
18
+ * The view's `ref` — the composite-view key, the launcher target, and the `/composite/<ref>` route.
19
+ *
20
+ * It MUST NOT contain a dot, for the reason its sibling board's ref records: the label lookup path is
21
+ * `composite_views.<translationRef>.<key>` and BOTH readers split that whole path on `.` and walk it
22
+ * segment by segment, so a dotted ref nests its labels one level deeper than anything that reads them
23
+ * expects — silently, because `tCompositeView` answers the empty string.
24
+ */
25
+ export declare const WORKBENCH_DOMAIN_MODEL_VIEW_REF = "domain-model";
26
+ /**
27
+ * The label key the view's title and description hang off.
28
+ *
29
+ * DERIVED by the engine's `buildApplicationViewTranslationRef` (`app.<ref>`), not chosen here. It is
30
+ * restated because the companion cannot import a frontend package to compute it, and the workbench's
31
+ * own test asserts this constant against the engine's derivation — so the copy cannot drift silently
32
+ * from the function that produces it at runtime.
33
+ */
34
+ export declare const WORKBENCH_DOMAIN_MODEL_TRANSLATION_REF = "app.domain-model";
35
+ /**
36
+ * The view declares NO sections, and that is a decision rather than an omission.
37
+ *
38
+ * `CompositeLayout` groups SEVERAL embedded surfaces under their own headings. This view has one
39
+ * surface — a canvas with a rail beside it — so a section would be a second heading over the same
40
+ * thing, and that is exactly what it was: `ViewLayout_Header` rendered "Domain model" from
41
+ * `composite_views.app.domain-model.title` and the lone section rendered "Domain model" again
42
+ * immediately beneath it, with two descriptions saying the same thing in different words.
43
+ *
44
+ * There is therefore no `WorkbenchDomainModelSection` enum, no section-refs list and no section-label
45
+ * contract. If the view ever grows a second surface — a journey timeline beside the graph, say — that
46
+ * is when sections earn their place, and they are added here as its sibling board's are.
47
+ */
48
+ //# sourceMappingURL=workbench-domain-model.custom.shared.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbench-domain-model.custom.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/workbench/workbench-domain-model.custom.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC,qBAA2C,CAAC;AAE/F;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The domain-model graph's identity, shared for the same reason its sibling board's is: THREE
3
+ * packages must agree on it and none of them can see the others.
4
+ *
5
+ * - the workbench declares the composite view under {@link WORKBENCH_DOMAIN_MODEL_VIEW_REF} and
6
+ * addresses it by that ref;
7
+ * - the companion authors the labels the view resolves, keyed by exactly those refs;
8
+ * - the engine's launcher resolution and router address the view by that same ref.
9
+ *
10
+ * Three string literals in three packages compile perfectly and fail at runtime as a blank sidebar
11
+ * row and a headless section — `tCompositeView` and `tCompositeViewSection` answer the EMPTY STRING
12
+ * for a missing key rather than echoing it, so nothing reports the drift.
13
+ *
14
+ * This carries NO React and NO Node: it is a vocabulary, which is what makes it importable by a
15
+ * browser bundle and by a daemon at once.
16
+ */
17
+ /**
18
+ * The view's `ref` — the composite-view key, the launcher target, and the `/composite/<ref>` route.
19
+ *
20
+ * It MUST NOT contain a dot, for the reason its sibling board's ref records: the label lookup path is
21
+ * `composite_views.<translationRef>.<key>` and BOTH readers split that whole path on `.` and walk it
22
+ * segment by segment, so a dotted ref nests its labels one level deeper than anything that reads them
23
+ * expects — silently, because `tCompositeView` answers the empty string.
24
+ */
25
+ export const WORKBENCH_DOMAIN_MODEL_VIEW_REF = 'domain-model';
26
+ /**
27
+ * The label key the view's title and description hang off.
28
+ *
29
+ * DERIVED by the engine's `buildApplicationViewTranslationRef` (`app.<ref>`), not chosen here. It is
30
+ * restated because the companion cannot import a frontend package to compute it, and the workbench's
31
+ * own test asserts this constant against the engine's derivation — so the copy cannot drift silently
32
+ * from the function that produces it at runtime.
33
+ */
34
+ export const WORKBENCH_DOMAIN_MODEL_TRANSLATION_REF = `app.${WORKBENCH_DOMAIN_MODEL_VIEW_REF}`;
35
+ /**
36
+ * The view declares NO sections, and that is a decision rather than an omission.
37
+ *
38
+ * `CompositeLayout` groups SEVERAL embedded surfaces under their own headings. This view has one
39
+ * surface — a canvas with a rail beside it — so a section would be a second heading over the same
40
+ * thing, and that is exactly what it was: `ViewLayout_Header` rendered "Domain model" from
41
+ * `composite_views.app.domain-model.title` and the lone section rendered "Domain model" again
42
+ * immediately beneath it, with two descriptions saying the same thing in different words.
43
+ *
44
+ * There is therefore no `WorkbenchDomainModelSection` enum, no section-refs list and no section-label
45
+ * contract. If the view ever grows a second surface — a journey timeline beside the graph, say — that
46
+ * is when sections earn their place, and they are added here as its sibling board's are.
47
+ */
48
+ //# sourceMappingURL=workbench-domain-model.custom.shared.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbench-domain-model.custom.shared.schemas.js","sourceRoot":"","sources":["../../../../src/workbench/workbench-domain-model.custom.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,cAAc,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,OAAO,+BAA+B,EAAE,CAAC;AAE/F;;;;;;;;;;;;GAYG","sourcesContent":["/**\n * The domain-model graph's identity, shared for the same reason its sibling board's is: THREE\n * packages must agree on it and none of them can see the others.\n *\n * - the workbench declares the composite view under {@link WORKBENCH_DOMAIN_MODEL_VIEW_REF} and\n * addresses it by that ref;\n * - the companion authors the labels the view resolves, keyed by exactly those refs;\n * - the engine's launcher resolution and router address the view by that same ref.\n *\n * Three string literals in three packages compile perfectly and fail at runtime as a blank sidebar\n * row and a headless section — `tCompositeView` and `tCompositeViewSection` answer the EMPTY STRING\n * for a missing key rather than echoing it, so nothing reports the drift.\n *\n * This carries NO React and NO Node: it is a vocabulary, which is what makes it importable by a\n * browser bundle and by a daemon at once.\n */\n\n/**\n * The view's `ref` — the composite-view key, the launcher target, and the `/composite/<ref>` route.\n *\n * It MUST NOT contain a dot, for the reason its sibling board's ref records: the label lookup path is\n * `composite_views.<translationRef>.<key>` and BOTH readers split that whole path on `.` and walk it\n * segment by segment, so a dotted ref nests its labels one level deeper than anything that reads them\n * expects — silently, because `tCompositeView` answers the empty string.\n */\nexport const WORKBENCH_DOMAIN_MODEL_VIEW_REF = 'domain-model';\n\n/**\n * The label key the view's title and description hang off.\n *\n * DERIVED by the engine's `buildApplicationViewTranslationRef` (`app.<ref>`), not chosen here. It is\n * restated because the companion cannot import a frontend package to compute it, and the workbench's\n * own test asserts this constant against the engine's derivation — so the copy cannot drift silently\n * from the function that produces it at runtime.\n */\nexport const WORKBENCH_DOMAIN_MODEL_TRANSLATION_REF = `app.${WORKBENCH_DOMAIN_MODEL_VIEW_REF}`;\n\n/**\n * The view declares NO sections, and that is a decision rather than an omission.\n *\n * `CompositeLayout` groups SEVERAL embedded surfaces under their own headings. This view has one\n * surface — a canvas with a rail beside it — so a section would be a second heading over the same\n * thing, and that is exactly what it was: `ViewLayout_Header` rendered \"Domain model\" from\n * `composite_views.app.domain-model.title` and the lone section rendered \"Domain model\" again\n * immediately beneath it, with two descriptions saying the same thing in different words.\n *\n * There is therefore no `WorkbenchDomainModelSection` enum, no section-refs list and no section-label\n * contract. If the view ever grows a second surface — a journey timeline beside the graph, say — that\n * is when sections earn their place, and they are added here as its sibling board's are.\n */\n"]}