process-graph 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +85 -17
  2. package/dist/bin.d.ts +1 -0
  3. package/dist/bin.js +92 -0
  4. package/dist/cli.d.ts +512 -0
  5. package/dist/cli.js +3 -0
  6. package/dist/control-aDk9560d.js +294 -0
  7. package/dist/detail-panel-B1ZmMuJT.js +341 -0
  8. package/dist/dist-BpCBmnMl.js +582 -0
  9. package/dist/dist-HLlW8vgT.js +1388 -0
  10. package/dist/dist-IjrgWhHQ.js +3 -0
  11. package/dist/errors-BZe5WzCn.js +19 -0
  12. package/dist/exit-codes-0ultCqdS.js +23 -0
  13. package/dist/graphql-C1j5wQFz.d.ts +631 -0
  14. package/dist/index-CCfe0csl.d.ts +353 -0
  15. package/dist/index-CmZOswkx.d.ts +512 -0
  16. package/dist/index-CoA6vXqe.d.ts +404 -0
  17. package/dist/index-CptUHq6F.d.ts +58 -0
  18. package/dist/index-CrM5qWUA.d.ts +110 -0
  19. package/dist/index-DhbvDgK4.d.ts +1582 -0
  20. package/dist/index-DricKcyl.d.ts +421 -0
  21. package/dist/index.d.ts +111 -4
  22. package/dist/index.js +929 -5
  23. package/dist/layout-CCM-KBdp.js +307 -0
  24. package/dist/layout.d.ts +8 -0
  25. package/dist/layout.js +2 -0
  26. package/dist/node-AchI1T-K.js +40 -0
  27. package/dist/open-CyRXJ4bt.js +29 -0
  28. package/dist/parse-CuipC_2K.js +41 -0
  29. package/dist/queries-CCexJAE2.js +2202 -0
  30. package/dist/react-flow/style.css +658 -0
  31. package/dist/react-flow.d.ts +173 -0
  32. package/dist/react-flow.js +450 -0
  33. package/dist/react.d.ts +2 -0
  34. package/dist/react.js +107 -0
  35. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  36. package/dist/router-D4gtTlXm.js +188 -0
  37. package/dist/schema-CVnS6HiX.js +234 -0
  38. package/dist/selection-BW_xXWOy.js +314 -0
  39. package/dist/source/github/node.d.ts +16 -0
  40. package/dist/source/github/node.js +2 -0
  41. package/dist/source/github.d.ts +49 -0
  42. package/dist/source/github.js +201 -0
  43. package/dist/source-DRDpEA8Q.js +1316 -0
  44. package/dist/status-Bm1CGu9C.js +11 -0
  45. package/dist/store/node.d.ts +24 -0
  46. package/dist/store/node.js +2 -0
  47. package/dist/store/wasm/worker.d.ts +16 -0
  48. package/dist/store/wasm/worker.js +98 -0
  49. package/dist/store/wasm.d.ts +9 -0
  50. package/dist/store/wasm.js +11 -0
  51. package/dist/store-BcR70CaO.js +1287 -0
  52. package/dist/store.d.ts +1328 -0
  53. package/dist/store.js +238 -0
  54. package/dist/ui/style.css +351 -0
  55. package/dist/ui.d.ts +235 -0
  56. package/dist/ui.js +2 -0
  57. package/dist/validate-DF3mQZww.js +125 -0
  58. package/package.json +148 -13
@@ -0,0 +1,1582 @@
1
+ import { K as OpenIds, a as Overlay, d as Issue, g as Model } from "./index-CmZOswkx.js";
2
+ import { z } from "zod";
3
+ import { ContractRouterClient } from "@orpc/contract";
4
+ import { ContractedRouter } from "@orpc/server";
5
+ //#region ../../core/graph/store-contract/dist/contract.d.ts
6
+ /** The `GraphStore` port: an oRPC router contract, keyed by version. */
7
+ declare const graphStoreContract: {
8
+ v1: {
9
+ models: {
10
+ list: import("@orpc/contract").ProcedureContract<import("@orpc/contract").InitialInputSchema, z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
11
+ modelId: z.ZodString;
12
+ revision: z.ZodInt;
13
+ }, z.core.$strict>>>>, Omit<{
14
+ NOT_FOUND: {
15
+ message: string;
16
+ data: z.ZodObject<{
17
+ modelId: z.ZodString;
18
+ element: z.ZodExactOptional<z.ZodString>;
19
+ }, z.core.$strict>;
20
+ };
21
+ UNPROCESSABLE_CONTENT: {
22
+ message: string;
23
+ data: z.ZodObject<{
24
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
25
+ code: z.ZodString;
26
+ message: z.ZodString;
27
+ }, z.core.$strict>>>>;
28
+ }, z.core.$strict>;
29
+ };
30
+ }, never> & object>;
31
+ save: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
32
+ modelId: z.ZodString;
33
+ model: z.ZodReadonly<z.ZodObject<{
34
+ participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
35
+ id: z.ZodString;
36
+ label: z.ZodString;
37
+ kind: z.ZodEnum<{
38
+ role: "role";
39
+ system: "system";
40
+ entity: "entity";
41
+ }>;
42
+ }, z.core.$strict>>>>;
43
+ events: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
44
+ id: z.ZodString;
45
+ name: z.ZodString;
46
+ payload: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
47
+ }, z.core.$strict>>>>;
48
+ actions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
49
+ id: z.ZodString;
50
+ name: z.ZodString;
51
+ }, z.core.$strict>>>>;
52
+ artefacts: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
53
+ id: z.ZodString;
54
+ name: z.ZodString;
55
+ deliverable: z.ZodExactOptional<z.ZodBoolean>;
56
+ }, z.core.$strict>>>>;
57
+ elements: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
58
+ kind: z.ZodLiteral<"activity">;
59
+ id: z.ZodString;
60
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
61
+ label: z.ZodString;
62
+ actor: z.ZodExactOptional<z.ZodString>;
63
+ action: z.ZodExactOptional<z.ZodString>;
64
+ source: z.ZodExactOptional<z.ZodString>;
65
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
66
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
67
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
68
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
69
+ kind: z.ZodLiteral<"decision">;
70
+ id: z.ZodString;
71
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
72
+ label: z.ZodString;
73
+ actor: z.ZodExactOptional<z.ZodString>;
74
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
75
+ kind: z.ZodLiteral<"state">;
76
+ id: z.ZodString;
77
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
78
+ label: z.ZodString;
79
+ parent: z.ZodExactOptional<z.ZodString>;
80
+ entry: z.ZodExactOptional<z.ZodString>;
81
+ exit: z.ZodExactOptional<z.ZodString>;
82
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
83
+ kind: z.ZodLiteral<"pseudo">;
84
+ id: z.ZodString;
85
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
86
+ role: z.ZodEnum<{
87
+ initial: "initial";
88
+ final: "final";
89
+ fork: "fork";
90
+ join: "join";
91
+ history: "history";
92
+ }>;
93
+ parent: z.ZodExactOptional<z.ZodString>;
94
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
95
+ kind: z.ZodLiteral<"message">;
96
+ id: z.ZodString;
97
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
98
+ label: z.ZodString;
99
+ from: z.ZodString;
100
+ to: z.ZodString;
101
+ mode: z.ZodEnum<{
102
+ sync: "sync";
103
+ async: "async";
104
+ reply: "reply";
105
+ create: "create";
106
+ destroy: "destroy";
107
+ }>;
108
+ event: z.ZodExactOptional<z.ZodString>;
109
+ }, z.core.$strict>>], "kind">>>;
110
+ transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
111
+ id: z.ZodString;
112
+ source: z.ZodString;
113
+ target: z.ZodString;
114
+ trigger: z.ZodExactOptional<z.ZodString>;
115
+ guard: z.ZodExactOptional<z.ZodString>;
116
+ condition: z.ZodExactOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
117
+ kind: z.ZodLiteral<"not">;
118
+ operand: typeof import("trilean").PredicateNodeSchema;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ kind: z.ZodLiteral<"and">;
121
+ left: typeof import("trilean").PredicateNodeSchema;
122
+ right: typeof import("trilean").PredicateNodeSchema;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ kind: z.ZodLiteral<"or">;
125
+ left: typeof import("trilean").PredicateNodeSchema;
126
+ right: typeof import("trilean").PredicateNodeSchema;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ kind: z.ZodLiteral<"allOf">;
129
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
130
+ }, z.core.$strip>, z.ZodObject<{
131
+ kind: z.ZodLiteral<"anyOf">;
132
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ kind: z.ZodLiteral<"compare">;
135
+ op: z.ZodEnum<{
136
+ gt: "gt";
137
+ gte: "gte";
138
+ lt: "lt";
139
+ lte: "lte";
140
+ eq: "eq";
141
+ neq: "neq";
142
+ }>;
143
+ left: typeof import("trilean").ExpressionNodeSchema;
144
+ right: typeof import("trilean").ExpressionNodeSchema;
145
+ }, z.core.$strip>, z.ZodObject<{
146
+ kind: z.ZodLiteral<"textCompare">;
147
+ op: z.ZodEnum<{
148
+ equals: "equals";
149
+ notEquals: "notEquals";
150
+ matches: "matches";
151
+ notMatches: "notMatches";
152
+ portableMatches: "portableMatches";
153
+ portableNotMatches: "portableNotMatches";
154
+ }>;
155
+ left: typeof import("trilean").ExpressionNodeSchema;
156
+ right: typeof import("trilean").ExpressionNodeSchema;
157
+ }, z.core.$strip>, z.ZodObject<{
158
+ kind: z.ZodLiteral<"memberOf">;
159
+ op: z.ZodEnum<{
160
+ in: "in";
161
+ notIn: "notIn";
162
+ }>;
163
+ operand: typeof import("trilean").ExpressionNodeSchema;
164
+ candidates: z.ZodArray<typeof import("trilean").ExpressionNodeSchema>;
165
+ }, z.core.$strip>, z.ZodObject<{
166
+ kind: z.ZodLiteral<"exists">;
167
+ operand: typeof import("trilean").ExpressionNodeSchema;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ kind: z.ZodLiteral<"some">;
170
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
171
+ item: typeof import("trilean").PredicateNodeSchema;
172
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ kind: z.ZodLiteral<"every">;
175
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
176
+ item: typeof import("trilean").PredicateNodeSchema;
177
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ kind: z.ZodLiteral<"treeReference">;
180
+ key: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
181
+ }, z.core.$strip>], "kind">>;
182
+ effect: z.ZodExactOptional<z.ZodString>;
183
+ }, z.core.$strict>>>>;
184
+ fragments: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
185
+ id: z.ZodString;
186
+ operator: z.ZodEnum<{
187
+ alt: "alt";
188
+ opt: "opt";
189
+ loop: "loop";
190
+ par: "par";
191
+ break: "break";
192
+ }>;
193
+ operands: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
194
+ guard: z.ZodExactOptional<z.ZodString>;
195
+ body: z.ZodReadonly<z.ZodArray<z.ZodString>>;
196
+ }, z.core.$strict>>>>;
197
+ }, z.core.$strict>>>>;
198
+ projections: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
199
+ id: z.ZodString;
200
+ notation: z.ZodEnum<{
201
+ flowchart: "flowchart";
202
+ swimlane: "swimlane";
203
+ }>;
204
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
205
+ id: z.ZodString;
206
+ notation: z.ZodLiteral<"stateMachine">;
207
+ subject: z.ZodString;
208
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
209
+ id: z.ZodString;
210
+ notation: z.ZodLiteral<"sequence">;
211
+ scenario: z.ZodReadonly<z.ZodArray<z.ZodString>>;
212
+ }, z.core.$strict>>]>>>;
213
+ views: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodEnum<{
214
+ flowchart: "flowchart";
215
+ swimlane: "swimlane";
216
+ stateMachine: "stateMachine";
217
+ sequence: "sequence";
218
+ }> & z.core.$partial, z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodReadonly<z.ZodObject<{
219
+ x: z.ZodNumber;
220
+ y: z.ZodNumber;
221
+ }, z.core.$strict>>>>>>>;
222
+ }, z.core.$strict>>;
223
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
224
+ revision: z.ZodInt;
225
+ }, z.core.$strict>>, Omit<{
226
+ NOT_FOUND: {
227
+ message: string;
228
+ data: z.ZodObject<{
229
+ modelId: z.ZodString;
230
+ element: z.ZodExactOptional<z.ZodString>;
231
+ }, z.core.$strict>;
232
+ };
233
+ UNPROCESSABLE_CONTENT: {
234
+ message: string;
235
+ data: z.ZodObject<{
236
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
237
+ code: z.ZodString;
238
+ message: z.ZodString;
239
+ }, z.core.$strict>>>>;
240
+ }, z.core.$strict>;
241
+ };
242
+ }, never> & object>;
243
+ load: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
244
+ modelId: z.ZodString;
245
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
246
+ modelId: z.ZodString;
247
+ revision: z.ZodInt;
248
+ model: z.ZodReadonly<z.ZodObject<{
249
+ participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
250
+ id: z.ZodString;
251
+ label: z.ZodString;
252
+ kind: z.ZodEnum<{
253
+ role: "role";
254
+ system: "system";
255
+ entity: "entity";
256
+ }>;
257
+ }, z.core.$strict>>>>;
258
+ events: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
259
+ id: z.ZodString;
260
+ name: z.ZodString;
261
+ payload: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
262
+ }, z.core.$strict>>>>;
263
+ actions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
264
+ id: z.ZodString;
265
+ name: z.ZodString;
266
+ }, z.core.$strict>>>>;
267
+ artefacts: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
268
+ id: z.ZodString;
269
+ name: z.ZodString;
270
+ deliverable: z.ZodExactOptional<z.ZodBoolean>;
271
+ }, z.core.$strict>>>>;
272
+ elements: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
273
+ kind: z.ZodLiteral<"activity">;
274
+ id: z.ZodString;
275
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
276
+ label: z.ZodString;
277
+ actor: z.ZodExactOptional<z.ZodString>;
278
+ action: z.ZodExactOptional<z.ZodString>;
279
+ source: z.ZodExactOptional<z.ZodString>;
280
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
281
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
282
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
283
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
284
+ kind: z.ZodLiteral<"decision">;
285
+ id: z.ZodString;
286
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
287
+ label: z.ZodString;
288
+ actor: z.ZodExactOptional<z.ZodString>;
289
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
290
+ kind: z.ZodLiteral<"state">;
291
+ id: z.ZodString;
292
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
293
+ label: z.ZodString;
294
+ parent: z.ZodExactOptional<z.ZodString>;
295
+ entry: z.ZodExactOptional<z.ZodString>;
296
+ exit: z.ZodExactOptional<z.ZodString>;
297
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
298
+ kind: z.ZodLiteral<"pseudo">;
299
+ id: z.ZodString;
300
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
301
+ role: z.ZodEnum<{
302
+ initial: "initial";
303
+ final: "final";
304
+ fork: "fork";
305
+ join: "join";
306
+ history: "history";
307
+ }>;
308
+ parent: z.ZodExactOptional<z.ZodString>;
309
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
310
+ kind: z.ZodLiteral<"message">;
311
+ id: z.ZodString;
312
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
313
+ label: z.ZodString;
314
+ from: z.ZodString;
315
+ to: z.ZodString;
316
+ mode: z.ZodEnum<{
317
+ sync: "sync";
318
+ async: "async";
319
+ reply: "reply";
320
+ create: "create";
321
+ destroy: "destroy";
322
+ }>;
323
+ event: z.ZodExactOptional<z.ZodString>;
324
+ }, z.core.$strict>>], "kind">>>;
325
+ transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
326
+ id: z.ZodString;
327
+ source: z.ZodString;
328
+ target: z.ZodString;
329
+ trigger: z.ZodExactOptional<z.ZodString>;
330
+ guard: z.ZodExactOptional<z.ZodString>;
331
+ condition: z.ZodExactOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
332
+ kind: z.ZodLiteral<"not">;
333
+ operand: typeof import("trilean").PredicateNodeSchema;
334
+ }, z.core.$strip>, z.ZodObject<{
335
+ kind: z.ZodLiteral<"and">;
336
+ left: typeof import("trilean").PredicateNodeSchema;
337
+ right: typeof import("trilean").PredicateNodeSchema;
338
+ }, z.core.$strip>, z.ZodObject<{
339
+ kind: z.ZodLiteral<"or">;
340
+ left: typeof import("trilean").PredicateNodeSchema;
341
+ right: typeof import("trilean").PredicateNodeSchema;
342
+ }, z.core.$strip>, z.ZodObject<{
343
+ kind: z.ZodLiteral<"allOf">;
344
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
345
+ }, z.core.$strip>, z.ZodObject<{
346
+ kind: z.ZodLiteral<"anyOf">;
347
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
348
+ }, z.core.$strip>, z.ZodObject<{
349
+ kind: z.ZodLiteral<"compare">;
350
+ op: z.ZodEnum<{
351
+ gt: "gt";
352
+ gte: "gte";
353
+ lt: "lt";
354
+ lte: "lte";
355
+ eq: "eq";
356
+ neq: "neq";
357
+ }>;
358
+ left: typeof import("trilean").ExpressionNodeSchema;
359
+ right: typeof import("trilean").ExpressionNodeSchema;
360
+ }, z.core.$strip>, z.ZodObject<{
361
+ kind: z.ZodLiteral<"textCompare">;
362
+ op: z.ZodEnum<{
363
+ equals: "equals";
364
+ notEquals: "notEquals";
365
+ matches: "matches";
366
+ notMatches: "notMatches";
367
+ portableMatches: "portableMatches";
368
+ portableNotMatches: "portableNotMatches";
369
+ }>;
370
+ left: typeof import("trilean").ExpressionNodeSchema;
371
+ right: typeof import("trilean").ExpressionNodeSchema;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ kind: z.ZodLiteral<"memberOf">;
374
+ op: z.ZodEnum<{
375
+ in: "in";
376
+ notIn: "notIn";
377
+ }>;
378
+ operand: typeof import("trilean").ExpressionNodeSchema;
379
+ candidates: z.ZodArray<typeof import("trilean").ExpressionNodeSchema>;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ kind: z.ZodLiteral<"exists">;
382
+ operand: typeof import("trilean").ExpressionNodeSchema;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ kind: z.ZodLiteral<"some">;
385
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
386
+ item: typeof import("trilean").PredicateNodeSchema;
387
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
388
+ }, z.core.$strip>, z.ZodObject<{
389
+ kind: z.ZodLiteral<"every">;
390
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
391
+ item: typeof import("trilean").PredicateNodeSchema;
392
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
393
+ }, z.core.$strip>, z.ZodObject<{
394
+ kind: z.ZodLiteral<"treeReference">;
395
+ key: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
396
+ }, z.core.$strip>], "kind">>;
397
+ effect: z.ZodExactOptional<z.ZodString>;
398
+ }, z.core.$strict>>>>;
399
+ fragments: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
400
+ id: z.ZodString;
401
+ operator: z.ZodEnum<{
402
+ alt: "alt";
403
+ opt: "opt";
404
+ loop: "loop";
405
+ par: "par";
406
+ break: "break";
407
+ }>;
408
+ operands: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
409
+ guard: z.ZodExactOptional<z.ZodString>;
410
+ body: z.ZodReadonly<z.ZodArray<z.ZodString>>;
411
+ }, z.core.$strict>>>>;
412
+ }, z.core.$strict>>>>;
413
+ projections: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
414
+ id: z.ZodString;
415
+ notation: z.ZodEnum<{
416
+ flowchart: "flowchart";
417
+ swimlane: "swimlane";
418
+ }>;
419
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
420
+ id: z.ZodString;
421
+ notation: z.ZodLiteral<"stateMachine">;
422
+ subject: z.ZodString;
423
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
424
+ id: z.ZodString;
425
+ notation: z.ZodLiteral<"sequence">;
426
+ scenario: z.ZodReadonly<z.ZodArray<z.ZodString>>;
427
+ }, z.core.$strict>>]>>>;
428
+ views: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodEnum<{
429
+ flowchart: "flowchart";
430
+ swimlane: "swimlane";
431
+ stateMachine: "stateMachine";
432
+ sequence: "sequence";
433
+ }> & z.core.$partial, z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodReadonly<z.ZodObject<{
434
+ x: z.ZodNumber;
435
+ y: z.ZodNumber;
436
+ }, z.core.$strict>>>>>>>;
437
+ }, z.core.$strict>>;
438
+ overlay: z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodEnum<{
439
+ done: "done";
440
+ open: "open";
441
+ unknown: "unknown";
442
+ }>>>;
443
+ }, z.core.$strict>>, Omit<{
444
+ NOT_FOUND: {
445
+ message: string;
446
+ data: z.ZodObject<{
447
+ modelId: z.ZodString;
448
+ element: z.ZodExactOptional<z.ZodString>;
449
+ }, z.core.$strict>;
450
+ };
451
+ UNPROCESSABLE_CONTENT: {
452
+ message: string;
453
+ data: z.ZodObject<{
454
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
455
+ code: z.ZodString;
456
+ message: z.ZodString;
457
+ }, z.core.$strict>>>>;
458
+ }, z.core.$strict>;
459
+ };
460
+ }, never> & object>;
461
+ delete: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
462
+ modelId: z.ZodString;
463
+ }, z.core.$strict>>, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
464
+ deleted: z.ZodLiteral<true>;
465
+ revision: z.ZodInt;
466
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
467
+ deleted: z.ZodLiteral<false>;
468
+ }, z.core.$strict>>]>, Omit<{
469
+ NOT_FOUND: {
470
+ message: string;
471
+ data: z.ZodObject<{
472
+ modelId: z.ZodString;
473
+ element: z.ZodExactOptional<z.ZodString>;
474
+ }, z.core.$strict>;
475
+ };
476
+ UNPROCESSABLE_CONTENT: {
477
+ message: string;
478
+ data: z.ZodObject<{
479
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
480
+ code: z.ZodString;
481
+ message: z.ZodString;
482
+ }, z.core.$strict>>>>;
483
+ }, z.core.$strict>;
484
+ };
485
+ }, never> & object>;
486
+ };
487
+ overlay: {
488
+ set: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
489
+ modelId: z.ZodString;
490
+ overlay: z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodEnum<{
491
+ done: "done";
492
+ open: "open";
493
+ unknown: "unknown";
494
+ }>>>;
495
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
496
+ revision: z.ZodInt;
497
+ }, z.core.$strict>>, Omit<{
498
+ NOT_FOUND: {
499
+ message: string;
500
+ data: z.ZodObject<{
501
+ modelId: z.ZodString;
502
+ element: z.ZodExactOptional<z.ZodString>;
503
+ }, z.core.$strict>;
504
+ };
505
+ UNPROCESSABLE_CONTENT: {
506
+ message: string;
507
+ data: z.ZodObject<{
508
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
509
+ code: z.ZodString;
510
+ message: z.ZodString;
511
+ }, z.core.$strict>>>>;
512
+ }, z.core.$strict>;
513
+ };
514
+ }, never> & object>;
515
+ };
516
+ items: {
517
+ upsert: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
518
+ modelId: z.ZodString;
519
+ items: z.ZodReadonly<z.ZodObject<{
520
+ participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
521
+ id: z.ZodString;
522
+ label: z.ZodString;
523
+ kind: z.ZodEnum<{
524
+ role: "role";
525
+ system: "system";
526
+ entity: "entity";
527
+ }>;
528
+ }, z.core.$strict>>>>;
529
+ activities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
530
+ kind: z.ZodLiteral<"activity">;
531
+ id: z.ZodString;
532
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
533
+ label: z.ZodString;
534
+ actor: z.ZodExactOptional<z.ZodString>;
535
+ action: z.ZodExactOptional<z.ZodString>;
536
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
537
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
538
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
539
+ source: z.ZodString;
540
+ }, z.core.$strict>>>>;
541
+ transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
542
+ id: z.ZodString;
543
+ source: z.ZodString;
544
+ target: z.ZodString;
545
+ trigger: z.ZodExactOptional<z.ZodString>;
546
+ guard: z.ZodExactOptional<z.ZodString>;
547
+ condition: z.ZodExactOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
548
+ kind: z.ZodLiteral<"not">;
549
+ operand: typeof import("trilean").PredicateNodeSchema;
550
+ }, z.core.$strip>, z.ZodObject<{
551
+ kind: z.ZodLiteral<"and">;
552
+ left: typeof import("trilean").PredicateNodeSchema;
553
+ right: typeof import("trilean").PredicateNodeSchema;
554
+ }, z.core.$strip>, z.ZodObject<{
555
+ kind: z.ZodLiteral<"or">;
556
+ left: typeof import("trilean").PredicateNodeSchema;
557
+ right: typeof import("trilean").PredicateNodeSchema;
558
+ }, z.core.$strip>, z.ZodObject<{
559
+ kind: z.ZodLiteral<"allOf">;
560
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
561
+ }, z.core.$strip>, z.ZodObject<{
562
+ kind: z.ZodLiteral<"anyOf">;
563
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
564
+ }, z.core.$strip>, z.ZodObject<{
565
+ kind: z.ZodLiteral<"compare">;
566
+ op: z.ZodEnum<{
567
+ gt: "gt";
568
+ gte: "gte";
569
+ lt: "lt";
570
+ lte: "lte";
571
+ eq: "eq";
572
+ neq: "neq";
573
+ }>;
574
+ left: typeof import("trilean").ExpressionNodeSchema;
575
+ right: typeof import("trilean").ExpressionNodeSchema;
576
+ }, z.core.$strip>, z.ZodObject<{
577
+ kind: z.ZodLiteral<"textCompare">;
578
+ op: z.ZodEnum<{
579
+ equals: "equals";
580
+ notEquals: "notEquals";
581
+ matches: "matches";
582
+ notMatches: "notMatches";
583
+ portableMatches: "portableMatches";
584
+ portableNotMatches: "portableNotMatches";
585
+ }>;
586
+ left: typeof import("trilean").ExpressionNodeSchema;
587
+ right: typeof import("trilean").ExpressionNodeSchema;
588
+ }, z.core.$strip>, z.ZodObject<{
589
+ kind: z.ZodLiteral<"memberOf">;
590
+ op: z.ZodEnum<{
591
+ in: "in";
592
+ notIn: "notIn";
593
+ }>;
594
+ operand: typeof import("trilean").ExpressionNodeSchema;
595
+ candidates: z.ZodArray<typeof import("trilean").ExpressionNodeSchema>;
596
+ }, z.core.$strip>, z.ZodObject<{
597
+ kind: z.ZodLiteral<"exists">;
598
+ operand: typeof import("trilean").ExpressionNodeSchema;
599
+ }, z.core.$strip>, z.ZodObject<{
600
+ kind: z.ZodLiteral<"some">;
601
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
602
+ item: typeof import("trilean").PredicateNodeSchema;
603
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
604
+ }, z.core.$strip>, z.ZodObject<{
605
+ kind: z.ZodLiteral<"every">;
606
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
607
+ item: typeof import("trilean").PredicateNodeSchema;
608
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
609
+ }, z.core.$strip>, z.ZodObject<{
610
+ kind: z.ZodLiteral<"treeReference">;
611
+ key: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
612
+ }, z.core.$strip>], "kind">>;
613
+ effect: z.ZodExactOptional<z.ZodString>;
614
+ }, z.core.$strict>>>>;
615
+ overlay: z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodEnum<{
616
+ done: "done";
617
+ open: "open";
618
+ unknown: "unknown";
619
+ }>>>;
620
+ relations: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
621
+ kind: z.ZodEnum<{
622
+ "child-of": "child-of";
623
+ "assigned-to": "assigned-to";
624
+ "part-of": "part-of";
625
+ }>;
626
+ from: z.ZodString;
627
+ to: z.ZodString;
628
+ }, z.core.$strict>>>>>;
629
+ }, z.core.$strict>>;
630
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
631
+ revision: z.ZodInt;
632
+ }, z.core.$strict>>, Omit<{
633
+ NOT_FOUND: {
634
+ message: string;
635
+ data: z.ZodObject<{
636
+ modelId: z.ZodString;
637
+ element: z.ZodExactOptional<z.ZodString>;
638
+ }, z.core.$strict>;
639
+ };
640
+ UNPROCESSABLE_CONTENT: {
641
+ message: string;
642
+ data: z.ZodObject<{
643
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
644
+ code: z.ZodString;
645
+ message: z.ZodString;
646
+ }, z.core.$strict>>>>;
647
+ }, z.core.$strict>;
648
+ };
649
+ }, never> & object>;
650
+ };
651
+ relations: {
652
+ list: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
653
+ modelId: z.ZodString;
654
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
655
+ relations: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
656
+ kind: z.ZodEnum<{
657
+ "child-of": "child-of";
658
+ "assigned-to": "assigned-to";
659
+ "part-of": "part-of";
660
+ }>;
661
+ from: z.ZodString;
662
+ to: z.ZodString;
663
+ }, z.core.$strict>>>>;
664
+ }, z.core.$strict>>, Omit<{
665
+ NOT_FOUND: {
666
+ message: string;
667
+ data: z.ZodObject<{
668
+ modelId: z.ZodString;
669
+ element: z.ZodExactOptional<z.ZodString>;
670
+ }, z.core.$strict>;
671
+ };
672
+ UNPROCESSABLE_CONTENT: {
673
+ message: string;
674
+ data: z.ZodObject<{
675
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
676
+ code: z.ZodString;
677
+ message: z.ZodString;
678
+ }, z.core.$strict>>>>;
679
+ }, z.core.$strict>;
680
+ };
681
+ }, never> & object>;
682
+ };
683
+ query: {
684
+ ready: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
685
+ modelId: z.ZodString;
686
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
687
+ elements: z.ZodReadonly<z.ZodArray<z.ZodString>>;
688
+ }, z.core.$strict>>, Omit<{
689
+ NOT_FOUND: {
690
+ message: string;
691
+ data: z.ZodObject<{
692
+ modelId: z.ZodString;
693
+ element: z.ZodExactOptional<z.ZodString>;
694
+ }, z.core.$strict>;
695
+ };
696
+ UNPROCESSABLE_CONTENT: {
697
+ message: string;
698
+ data: z.ZodObject<{
699
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
700
+ code: z.ZodString;
701
+ message: z.ZodString;
702
+ }, z.core.$strict>>>>;
703
+ }, z.core.$strict>;
704
+ };
705
+ }, never> & object>;
706
+ blockedChain: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
707
+ modelId: z.ZodString;
708
+ element: z.ZodString;
709
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
710
+ chain: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
711
+ element: z.ZodString;
712
+ distance: z.ZodInt;
713
+ }, z.core.$strict>>>>;
714
+ }, z.core.$strict>>, Omit<{
715
+ NOT_FOUND: {
716
+ message: string;
717
+ data: z.ZodObject<{
718
+ modelId: z.ZodString;
719
+ element: z.ZodExactOptional<z.ZodString>;
720
+ }, z.core.$strict>;
721
+ };
722
+ UNPROCESSABLE_CONTENT: {
723
+ message: string;
724
+ data: z.ZodObject<{
725
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
726
+ code: z.ZodString;
727
+ message: z.ZodString;
728
+ }, z.core.$strict>>>>;
729
+ }, z.core.$strict>;
730
+ };
731
+ }, never> & object>;
732
+ impact: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
733
+ modelId: z.ZodString;
734
+ element: z.ZodString;
735
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
736
+ impacted: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
737
+ element: z.ZodString;
738
+ distance: z.ZodInt;
739
+ }, z.core.$strict>>>>;
740
+ }, z.core.$strict>>, Omit<{
741
+ NOT_FOUND: {
742
+ message: string;
743
+ data: z.ZodObject<{
744
+ modelId: z.ZodString;
745
+ element: z.ZodExactOptional<z.ZodString>;
746
+ }, z.core.$strict>;
747
+ };
748
+ UNPROCESSABLE_CONTENT: {
749
+ message: string;
750
+ data: z.ZodObject<{
751
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
752
+ code: z.ZodString;
753
+ message: z.ZodString;
754
+ }, z.core.$strict>>>>;
755
+ }, z.core.$strict>;
756
+ };
757
+ }, never> & object>;
758
+ children: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
759
+ modelId: z.ZodString;
760
+ element: z.ZodString;
761
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
762
+ children: z.ZodReadonly<z.ZodArray<z.ZodString>>;
763
+ }, z.core.$strict>>, Omit<{
764
+ NOT_FOUND: {
765
+ message: string;
766
+ data: z.ZodObject<{
767
+ modelId: z.ZodString;
768
+ element: z.ZodExactOptional<z.ZodString>;
769
+ }, z.core.$strict>;
770
+ };
771
+ UNPROCESSABLE_CONTENT: {
772
+ message: string;
773
+ data: z.ZodObject<{
774
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
775
+ code: z.ZodString;
776
+ message: z.ZodString;
777
+ }, z.core.$strict>>>>;
778
+ }, z.core.$strict>;
779
+ };
780
+ }, never> & object>;
781
+ descendants: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
782
+ modelId: z.ZodString;
783
+ element: z.ZodString;
784
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
785
+ descendants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
786
+ element: z.ZodString;
787
+ distance: z.ZodInt;
788
+ }, z.core.$strict>>>>;
789
+ }, z.core.$strict>>, Omit<{
790
+ NOT_FOUND: {
791
+ message: string;
792
+ data: z.ZodObject<{
793
+ modelId: z.ZodString;
794
+ element: z.ZodExactOptional<z.ZodString>;
795
+ }, z.core.$strict>;
796
+ };
797
+ UNPROCESSABLE_CONTENT: {
798
+ message: string;
799
+ data: z.ZodObject<{
800
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
801
+ code: z.ZodString;
802
+ message: z.ZodString;
803
+ }, z.core.$strict>>>>;
804
+ }, z.core.$strict>;
805
+ };
806
+ }, never> & object>;
807
+ ancestors: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
808
+ modelId: z.ZodString;
809
+ element: z.ZodString;
810
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
811
+ ancestors: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
812
+ element: z.ZodString;
813
+ distance: z.ZodInt;
814
+ }, z.core.$strict>>>>;
815
+ }, z.core.$strict>>, Omit<{
816
+ NOT_FOUND: {
817
+ message: string;
818
+ data: z.ZodObject<{
819
+ modelId: z.ZodString;
820
+ element: z.ZodExactOptional<z.ZodString>;
821
+ }, z.core.$strict>;
822
+ };
823
+ UNPROCESSABLE_CONTENT: {
824
+ message: string;
825
+ data: z.ZodObject<{
826
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
827
+ code: z.ZodString;
828
+ message: z.ZodString;
829
+ }, z.core.$strict>>>>;
830
+ }, z.core.$strict>;
831
+ };
832
+ }, never> & object>;
833
+ };
834
+ changes: import("@orpc/contract").ProcedureContract<z.ZodReadonly<z.ZodObject<{
835
+ modelId: z.ZodString;
836
+ since: z.ZodExactOptional<z.ZodInt>;
837
+ }, z.core.$strict>>, import("@orpc/contract").Schema<AsyncIteratorObject<Readonly<{
838
+ modelId: string;
839
+ kind: "overlay" | "saved" | "items" | "deleted";
840
+ revision: number;
841
+ }> | Readonly<{
842
+ modelId: string;
843
+ kind: "missed";
844
+ }>, unknown, void>, import("@orpc/server").AsyncIteratorClass<Readonly<{
845
+ modelId: string;
846
+ kind: "overlay" | "saved" | "items" | "deleted";
847
+ revision: number;
848
+ }> | Readonly<{
849
+ modelId: string;
850
+ kind: "missed";
851
+ }>, unknown, void>>, Omit<{
852
+ NOT_FOUND: {
853
+ message: string;
854
+ data: z.ZodObject<{
855
+ modelId: z.ZodString;
856
+ element: z.ZodExactOptional<z.ZodString>;
857
+ }, z.core.$strict>;
858
+ };
859
+ UNPROCESSABLE_CONTENT: {
860
+ message: string;
861
+ data: z.ZodObject<{
862
+ issues: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
863
+ code: z.ZodString;
864
+ message: z.ZodString;
865
+ }, z.core.$strict>>>>;
866
+ }, z.core.$strict>;
867
+ };
868
+ }, never> & object>;
869
+ };
870
+ };
871
+ /** A client for the `GraphStore` port over any transport: an in-process router client or one built on an oRPC link. */
872
+ type GraphStoreClient = ContractRouterClient<typeof graphStoreContract>;
873
+ //#endregion
874
+ //#region ../../core/graph/store-contract/dist/schema.d.ts
875
+ /** The name a store files a model under. Any non-empty string; the store gives it no structure. */
876
+ declare const modelIdSchema: z.ZodString;
877
+ /**
878
+ * A position in the store's history. Every change to any model takes the next revision from one store-wide sequence, so revisions only grow, a model's revision is the revision of its last change, and a model deleted and saved again never reuses an earlier one.
879
+ */
880
+ declare const revisionSchema: z.ZodInt;
881
+ /**
882
+ * An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional: a bound item's identity is its source record, and the source-qualified identifier is its element id.
883
+ */
884
+ declare const boundActivitySchema: z.ZodReadonly<z.ZodObject<{
885
+ kind: z.ZodLiteral<"activity">;
886
+ id: z.ZodString;
887
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
888
+ label: z.ZodString;
889
+ actor: z.ZodExactOptional<z.ZodString>;
890
+ action: z.ZodExactOptional<z.ZodString>;
891
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
892
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
893
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
894
+ source: z.ZodString;
895
+ }, z.core.$strict>>;
896
+ /** The relation kinds a store keeps beside a model, the same kinds a source reports. */
897
+ declare const relationKinds: readonly ["child-of", "assigned-to", "part-of"];
898
+ /**
899
+ * A structural link the model has no field for, kept beside it: `child-of` from a sub-task element to its parent element, `assigned-to` from an element to a person participant, `part-of` from one participant to the participant that contains it (a repository to its organisation). A relation is identified by its kind and its two ends. Relations carry no ordering, so the structural queries never treat a parent as waiting on its children.
900
+ */
901
+ declare const relationSchema: z.ZodReadonly<z.ZodObject<{
902
+ kind: z.ZodEnum<{
903
+ "child-of": "child-of";
904
+ "assigned-to": "assigned-to";
905
+ "part-of": "part-of";
906
+ }>;
907
+ from: z.ZodString;
908
+ to: z.ZodString;
909
+ }, z.core.$strict>>;
910
+ /**
911
+ * Items read from a source, to be merged into a stored model by identifier. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
912
+ */
913
+ declare const boundItemsSchema: z.ZodReadonly<z.ZodObject<{
914
+ participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
915
+ id: z.ZodString;
916
+ label: z.ZodString;
917
+ kind: z.ZodEnum<{
918
+ role: "role";
919
+ system: "system";
920
+ entity: "entity";
921
+ }>;
922
+ }, z.core.$strict>>>>;
923
+ activities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
924
+ kind: z.ZodLiteral<"activity">;
925
+ id: z.ZodString;
926
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
927
+ label: z.ZodString;
928
+ actor: z.ZodExactOptional<z.ZodString>;
929
+ action: z.ZodExactOptional<z.ZodString>;
930
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
931
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
932
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
933
+ source: z.ZodString;
934
+ }, z.core.$strict>>>>;
935
+ transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
936
+ id: z.ZodString;
937
+ source: z.ZodString;
938
+ target: z.ZodString;
939
+ trigger: z.ZodExactOptional<z.ZodString>;
940
+ guard: z.ZodExactOptional<z.ZodString>;
941
+ condition: z.ZodExactOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
942
+ kind: z.ZodLiteral<"not">;
943
+ operand: typeof import("trilean").PredicateNodeSchema;
944
+ }, z.core.$strip>, z.ZodObject<{
945
+ kind: z.ZodLiteral<"and">;
946
+ left: typeof import("trilean").PredicateNodeSchema;
947
+ right: typeof import("trilean").PredicateNodeSchema;
948
+ }, z.core.$strip>, z.ZodObject<{
949
+ kind: z.ZodLiteral<"or">;
950
+ left: typeof import("trilean").PredicateNodeSchema;
951
+ right: typeof import("trilean").PredicateNodeSchema;
952
+ }, z.core.$strip>, z.ZodObject<{
953
+ kind: z.ZodLiteral<"allOf">;
954
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
955
+ }, z.core.$strip>, z.ZodObject<{
956
+ kind: z.ZodLiteral<"anyOf">;
957
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
958
+ }, z.core.$strip>, z.ZodObject<{
959
+ kind: z.ZodLiteral<"compare">;
960
+ op: z.ZodEnum<{
961
+ gt: "gt";
962
+ gte: "gte";
963
+ lt: "lt";
964
+ lte: "lte";
965
+ eq: "eq";
966
+ neq: "neq";
967
+ }>;
968
+ left: typeof import("trilean").ExpressionNodeSchema;
969
+ right: typeof import("trilean").ExpressionNodeSchema;
970
+ }, z.core.$strip>, z.ZodObject<{
971
+ kind: z.ZodLiteral<"textCompare">;
972
+ op: z.ZodEnum<{
973
+ equals: "equals";
974
+ notEquals: "notEquals";
975
+ matches: "matches";
976
+ notMatches: "notMatches";
977
+ portableMatches: "portableMatches";
978
+ portableNotMatches: "portableNotMatches";
979
+ }>;
980
+ left: typeof import("trilean").ExpressionNodeSchema;
981
+ right: typeof import("trilean").ExpressionNodeSchema;
982
+ }, z.core.$strip>, z.ZodObject<{
983
+ kind: z.ZodLiteral<"memberOf">;
984
+ op: z.ZodEnum<{
985
+ in: "in";
986
+ notIn: "notIn";
987
+ }>;
988
+ operand: typeof import("trilean").ExpressionNodeSchema;
989
+ candidates: z.ZodArray<typeof import("trilean").ExpressionNodeSchema>;
990
+ }, z.core.$strip>, z.ZodObject<{
991
+ kind: z.ZodLiteral<"exists">;
992
+ operand: typeof import("trilean").ExpressionNodeSchema;
993
+ }, z.core.$strip>, z.ZodObject<{
994
+ kind: z.ZodLiteral<"some">;
995
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
996
+ item: typeof import("trilean").PredicateNodeSchema;
997
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
998
+ }, z.core.$strip>, z.ZodObject<{
999
+ kind: z.ZodLiteral<"every">;
1000
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
1001
+ item: typeof import("trilean").PredicateNodeSchema;
1002
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
1003
+ }, z.core.$strip>, z.ZodObject<{
1004
+ kind: z.ZodLiteral<"treeReference">;
1005
+ key: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
1006
+ }, z.core.$strip>], "kind">>;
1007
+ effect: z.ZodExactOptional<z.ZodString>;
1008
+ }, z.core.$strict>>>>;
1009
+ overlay: z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodEnum<{
1010
+ done: "done";
1011
+ open: "open";
1012
+ unknown: "unknown";
1013
+ }>>>;
1014
+ relations: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1015
+ kind: z.ZodEnum<{
1016
+ "child-of": "child-of";
1017
+ "assigned-to": "assigned-to";
1018
+ "part-of": "part-of";
1019
+ }>;
1020
+ from: z.ZodString;
1021
+ to: z.ZodString;
1022
+ }, z.core.$strict>>>>>;
1023
+ }, z.core.$strict>>;
1024
+ /** One stored model and the run state laid over it, at the revision of its last change. */
1025
+ declare const storedModelSchema: z.ZodReadonly<z.ZodObject<{
1026
+ modelId: z.ZodString;
1027
+ revision: z.ZodInt;
1028
+ model: z.ZodReadonly<z.ZodObject<{
1029
+ participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1030
+ id: z.ZodString;
1031
+ label: z.ZodString;
1032
+ kind: z.ZodEnum<{
1033
+ role: "role";
1034
+ system: "system";
1035
+ entity: "entity";
1036
+ }>;
1037
+ }, z.core.$strict>>>>;
1038
+ events: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1039
+ id: z.ZodString;
1040
+ name: z.ZodString;
1041
+ payload: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
1042
+ }, z.core.$strict>>>>;
1043
+ actions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1044
+ id: z.ZodString;
1045
+ name: z.ZodString;
1046
+ }, z.core.$strict>>>>;
1047
+ artefacts: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1048
+ id: z.ZodString;
1049
+ name: z.ZodString;
1050
+ deliverable: z.ZodExactOptional<z.ZodBoolean>;
1051
+ }, z.core.$strict>>>>;
1052
+ elements: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
1053
+ kind: z.ZodLiteral<"activity">;
1054
+ id: z.ZodString;
1055
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
1056
+ label: z.ZodString;
1057
+ actor: z.ZodExactOptional<z.ZodString>;
1058
+ action: z.ZodExactOptional<z.ZodString>;
1059
+ source: z.ZodExactOptional<z.ZodString>;
1060
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1061
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1062
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1063
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1064
+ kind: z.ZodLiteral<"decision">;
1065
+ id: z.ZodString;
1066
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
1067
+ label: z.ZodString;
1068
+ actor: z.ZodExactOptional<z.ZodString>;
1069
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1070
+ kind: z.ZodLiteral<"state">;
1071
+ id: z.ZodString;
1072
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
1073
+ label: z.ZodString;
1074
+ parent: z.ZodExactOptional<z.ZodString>;
1075
+ entry: z.ZodExactOptional<z.ZodString>;
1076
+ exit: z.ZodExactOptional<z.ZodString>;
1077
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1078
+ kind: z.ZodLiteral<"pseudo">;
1079
+ id: z.ZodString;
1080
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
1081
+ role: z.ZodEnum<{
1082
+ initial: "initial";
1083
+ final: "final";
1084
+ fork: "fork";
1085
+ join: "join";
1086
+ history: "history";
1087
+ }>;
1088
+ parent: z.ZodExactOptional<z.ZodString>;
1089
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1090
+ kind: z.ZodLiteral<"message">;
1091
+ id: z.ZodString;
1092
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
1093
+ label: z.ZodString;
1094
+ from: z.ZodString;
1095
+ to: z.ZodString;
1096
+ mode: z.ZodEnum<{
1097
+ sync: "sync";
1098
+ async: "async";
1099
+ reply: "reply";
1100
+ create: "create";
1101
+ destroy: "destroy";
1102
+ }>;
1103
+ event: z.ZodExactOptional<z.ZodString>;
1104
+ }, z.core.$strict>>], "kind">>>;
1105
+ transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1106
+ id: z.ZodString;
1107
+ source: z.ZodString;
1108
+ target: z.ZodString;
1109
+ trigger: z.ZodExactOptional<z.ZodString>;
1110
+ guard: z.ZodExactOptional<z.ZodString>;
1111
+ condition: z.ZodExactOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1112
+ kind: z.ZodLiteral<"not">;
1113
+ operand: typeof import("trilean").PredicateNodeSchema;
1114
+ }, z.core.$strip>, z.ZodObject<{
1115
+ kind: z.ZodLiteral<"and">;
1116
+ left: typeof import("trilean").PredicateNodeSchema;
1117
+ right: typeof import("trilean").PredicateNodeSchema;
1118
+ }, z.core.$strip>, z.ZodObject<{
1119
+ kind: z.ZodLiteral<"or">;
1120
+ left: typeof import("trilean").PredicateNodeSchema;
1121
+ right: typeof import("trilean").PredicateNodeSchema;
1122
+ }, z.core.$strip>, z.ZodObject<{
1123
+ kind: z.ZodLiteral<"allOf">;
1124
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
1125
+ }, z.core.$strip>, z.ZodObject<{
1126
+ kind: z.ZodLiteral<"anyOf">;
1127
+ operands: z.ZodArray<typeof import("trilean").PredicateNodeSchema>;
1128
+ }, z.core.$strip>, z.ZodObject<{
1129
+ kind: z.ZodLiteral<"compare">;
1130
+ op: z.ZodEnum<{
1131
+ gt: "gt";
1132
+ gte: "gte";
1133
+ lt: "lt";
1134
+ lte: "lte";
1135
+ eq: "eq";
1136
+ neq: "neq";
1137
+ }>;
1138
+ left: typeof import("trilean").ExpressionNodeSchema;
1139
+ right: typeof import("trilean").ExpressionNodeSchema;
1140
+ }, z.core.$strip>, z.ZodObject<{
1141
+ kind: z.ZodLiteral<"textCompare">;
1142
+ op: z.ZodEnum<{
1143
+ equals: "equals";
1144
+ notEquals: "notEquals";
1145
+ matches: "matches";
1146
+ notMatches: "notMatches";
1147
+ portableMatches: "portableMatches";
1148
+ portableNotMatches: "portableNotMatches";
1149
+ }>;
1150
+ left: typeof import("trilean").ExpressionNodeSchema;
1151
+ right: typeof import("trilean").ExpressionNodeSchema;
1152
+ }, z.core.$strip>, z.ZodObject<{
1153
+ kind: z.ZodLiteral<"memberOf">;
1154
+ op: z.ZodEnum<{
1155
+ in: "in";
1156
+ notIn: "notIn";
1157
+ }>;
1158
+ operand: typeof import("trilean").ExpressionNodeSchema;
1159
+ candidates: z.ZodArray<typeof import("trilean").ExpressionNodeSchema>;
1160
+ }, z.core.$strip>, z.ZodObject<{
1161
+ kind: z.ZodLiteral<"exists">;
1162
+ operand: typeof import("trilean").ExpressionNodeSchema;
1163
+ }, z.core.$strip>, z.ZodObject<{
1164
+ kind: z.ZodLiteral<"some">;
1165
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
1166
+ item: typeof import("trilean").PredicateNodeSchema;
1167
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
1168
+ }, z.core.$strip>, z.ZodObject<{
1169
+ kind: z.ZodLiteral<"every">;
1170
+ collection: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
1171
+ item: typeof import("trilean").PredicateNodeSchema;
1172
+ filter: z.ZodOptional<typeof import("trilean").PredicateNodeSchema>;
1173
+ }, z.core.$strip>, z.ZodObject<{
1174
+ kind: z.ZodLiteral<"treeReference">;
1175
+ key: z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>;
1176
+ }, z.core.$strip>], "kind">>;
1177
+ effect: z.ZodExactOptional<z.ZodString>;
1178
+ }, z.core.$strict>>>>;
1179
+ fragments: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1180
+ id: z.ZodString;
1181
+ operator: z.ZodEnum<{
1182
+ alt: "alt";
1183
+ opt: "opt";
1184
+ loop: "loop";
1185
+ par: "par";
1186
+ break: "break";
1187
+ }>;
1188
+ operands: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
1189
+ guard: z.ZodExactOptional<z.ZodString>;
1190
+ body: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1191
+ }, z.core.$strict>>>>;
1192
+ }, z.core.$strict>>>>;
1193
+ projections: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
1194
+ id: z.ZodString;
1195
+ notation: z.ZodEnum<{
1196
+ flowchart: "flowchart";
1197
+ swimlane: "swimlane";
1198
+ }>;
1199
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1200
+ id: z.ZodString;
1201
+ notation: z.ZodLiteral<"stateMachine">;
1202
+ subject: z.ZodString;
1203
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1204
+ id: z.ZodString;
1205
+ notation: z.ZodLiteral<"sequence">;
1206
+ scenario: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1207
+ }, z.core.$strict>>]>>>;
1208
+ views: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodEnum<{
1209
+ flowchart: "flowchart";
1210
+ swimlane: "swimlane";
1211
+ stateMachine: "stateMachine";
1212
+ sequence: "sequence";
1213
+ }> & z.core.$partial, z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodReadonly<z.ZodObject<{
1214
+ x: z.ZodNumber;
1215
+ y: z.ZodNumber;
1216
+ }, z.core.$strict>>>>>>>;
1217
+ }, z.core.$strict>>;
1218
+ overlay: z.ZodReadonly<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodEnum<{
1219
+ done: "done";
1220
+ open: "open";
1221
+ unknown: "unknown";
1222
+ }>>>;
1223
+ }, z.core.$strict>>;
1224
+ /** A stored model's name and the revision of its last change. */
1225
+ declare const modelSummarySchema: z.ZodReadonly<z.ZodObject<{
1226
+ modelId: z.ZodString;
1227
+ revision: z.ZodInt;
1228
+ }, z.core.$strict>>;
1229
+ /** An element reached by a traversal and its distance from the start, in transitions. */
1230
+ declare const reachSchema: z.ZodReadonly<z.ZodObject<{
1231
+ element: z.ZodString;
1232
+ distance: z.ZodInt;
1233
+ }, z.core.$strict>>;
1234
+ /** The kinds of change a store reports. */
1235
+ declare const changeKinds: readonly ["saved", "overlay", "items", "deleted"];
1236
+ /**
1237
+ * A change to a model. `revision` is the revision the change took. `missed` says the subscriber missed one or more changes and should load the model again: it is sent at the start of a subscription that names a revision the model is no longer at (the model changed, or has gone), and in place of the changes a subscriber that reads too slowly has let pile up beyond its subscription's capacity.
1238
+ */
1239
+ declare const storeChangeSchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
1240
+ modelId: z.ZodString;
1241
+ kind: z.ZodEnum<{
1242
+ overlay: "overlay";
1243
+ saved: "saved";
1244
+ items: "items";
1245
+ deleted: "deleted";
1246
+ }>;
1247
+ revision: z.ZodInt;
1248
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1249
+ modelId: z.ZodString;
1250
+ kind: z.ZodLiteral<"missed">;
1251
+ }, z.core.$strict>>]>;
1252
+ /** A structural issue in a model or overlay, as `validate` and `validateOverlay` report it. */
1253
+ declare const issueSchema: z.ZodReadonly<z.ZodObject<{
1254
+ code: z.ZodString;
1255
+ message: z.ZodString;
1256
+ }, z.core.$strict>>;
1257
+ type ModelId = z.infer<typeof modelIdSchema>;
1258
+ type Revision = z.infer<typeof revisionSchema>;
1259
+ type BoundActivity = z.infer<typeof boundActivitySchema>;
1260
+ type BoundItems = z.infer<typeof boundItemsSchema>;
1261
+ type Relation = z.infer<typeof relationSchema>;
1262
+ type RelationKind = (typeof relationKinds)[number];
1263
+ type StoredModel = z.infer<typeof storedModelSchema>;
1264
+ type ModelSummary = z.infer<typeof modelSummarySchema>;
1265
+ type Reach = z.infer<typeof reachSchema>;
1266
+ type ChangeKind = (typeof changeKinds)[number];
1267
+ type StoreChange = z.infer<typeof storeChangeSchema>;
1268
+ //#endregion
1269
+ //#region ../../core/graph/store-contract/dist/errors.d.ts
1270
+ /** Why a store operation failed, as data. */
1271
+ type GraphStoreFailure = {
1272
+ /** The model does not exist, or `element` is not one of its elements. */
1273
+ readonly kind: "not-found";
1274
+ readonly modelId: string;
1275
+ readonly element?: string;
1276
+ } | {
1277
+ /** The change would leave the model or its overlay invalid, as `validate` and `validateOverlay` report it; nothing was written. */
1278
+ readonly kind: "invalid";
1279
+ readonly issues: readonly Issue[];
1280
+ };
1281
+ /**
1282
+ * The one error a `GraphStore` implementation throws for an expected failure. `createGraphStoreRouter` turns it into the contract's typed oRPC error, so every store reports failures the same way over every transport.
1283
+ */
1284
+ declare class GraphStoreError extends Error {
1285
+ /** What went wrong. */
1286
+ readonly failure: GraphStoreFailure;
1287
+ /**
1288
+ * @param failure - What went wrong.
1289
+ */
1290
+ constructor(failure: GraphStoreFailure);
1291
+ }
1292
+ //#endregion
1293
+ //#region ../../core/graph/store-contract/dist/feed.d.ts
1294
+ /** A live subscription to one model's changes. Iterate it to receive them; `close` ends it. */
1295
+ interface ChangeSubscription extends AsyncIterable<StoreChange> {
1296
+ /** Stops delivery and ends the iteration. Idempotent. */
1297
+ readonly close: () => void;
1298
+ }
1299
+ /**
1300
+ * How many undelivered changes a subscription holds by default before it collapses them into `missed`.
1301
+ *
1302
+ * A change tells a subscriber only that its model has moved on to a later revision, and the one thing a subscriber can do about it is read the model again. A subscriber that has not yet taken one pending change will read the model after that change, and the model it reads already reflects every later one, so a second pending change gives it nothing it could act on: one held change is all a lagging subscriber can use. A subscriber that is waiting when a change commits receives it directly and never touches the buffer, so a subscriber that keeps reading misses nothing at this capacity.
1303
+ */
1304
+ declare const defaultSubscriptionCapacity = 1;
1305
+ /** Options for one subscription. */
1306
+ interface SubscribeOptions {
1307
+ /** Ends the subscription when it fires. */
1308
+ readonly signal?: AbortSignal | undefined;
1309
+ /** Overrides the feed's capacity for this subscription; see `ChangeFeedOptions.capacity`. */
1310
+ readonly capacity?: number;
1311
+ }
1312
+ /** Options for a feed. */
1313
+ interface ChangeFeedOptions {
1314
+ /**
1315
+ * The most undelivered changes a subscription holds; `defaultSubscriptionCapacity` when absent. When a change arrives and the subscription already holds this many, every held change is dropped and replaced by one `missed` event, so the buffer never grows past the capacity and the subscriber knows to load the model again. A positive integer.
1316
+ */
1317
+ readonly capacity?: number;
1318
+ }
1319
+ /**
1320
+ * Fans the changes one store makes out to every subscriber of the model they touch. A store publishes after each committed write; the router reads a subscription for `changes`.
1321
+ *
1322
+ * A subscription is registered the moment `subscribe` returns, so a caller can subscribe first and then read the current revision without missing a change made in between. A change that arrives while the subscriber is waiting is handed straight to it; one that arrives while it is busy is held, up to the subscription's capacity. Past that, the held changes are replaced by a single `missed` event: memory stays bounded however slowly a subscriber reads, and a subscriber is never left unaware that it fell behind.
1323
+ *
1324
+ * A feed only sees the writes made through the store that owns it. Several processes or tabs writing to one database each need their own bridge (a `BroadcastChannel`, a database notification) that publishes the others' changes into their feed.
1325
+ */
1326
+ declare class ChangeFeed {
1327
+ #private;
1328
+ /**
1329
+ * @param options - The capacity every subscription gets unless it sets its own.
1330
+ * @throws RangeError when the capacity is not a positive integer.
1331
+ */
1332
+ constructor(options?: ChangeFeedOptions);
1333
+ /**
1334
+ * Delivers a change to every current subscriber of its model.
1335
+ * @param change - The change, after it is committed.
1336
+ */
1337
+ publish(change: StoreChange): void;
1338
+ /**
1339
+ * Subscribes to one model's changes from now on.
1340
+ * @param modelId - The model to follow.
1341
+ * @param options - The signal that ends it, and a capacity overriding the feed's.
1342
+ * @returns The live subscription.
1343
+ * @throws RangeError when the capacity is not a positive integer.
1344
+ */
1345
+ subscribe(modelId: string, options?: SubscribeOptions): ChangeSubscription;
1346
+ }
1347
+ //#endregion
1348
+ //#region ../../core/graph/store-contract/dist/store.d.ts
1349
+ /** What every store request carries: the model it is about and the caller's abort signal. */
1350
+ interface ModelRequest {
1351
+ readonly modelId: string;
1352
+ /** Fires when the caller gives up. A write checks it before committing, so an aborted write changes nothing. */
1353
+ readonly signal: AbortSignal | undefined;
1354
+ }
1355
+ /** A request about one element of a model. */
1356
+ interface ElementRequest extends ModelRequest {
1357
+ readonly element: string;
1358
+ }
1359
+ /**
1360
+ * What a store adapter implements. `createGraphStoreRouter` builds the whole port on it, so validation, error mapping, abort handling and change subscriptions behave identically for every store.
1361
+ *
1362
+ * Every write is atomic: it checks the result with `checkStored` (and `relationIssues` for the relations it stores) and throws `GraphStoreError` with `invalid` before anything is visible, takes the next store-wide revision, and publishes the change to `feed` after it commits. A read or query of a model that does not exist, or of an element the model does not declare, throws `GraphStoreError` with `not-found`.
1363
+ */
1364
+ interface GraphStore {
1365
+ /** The feed this store publishes its committed changes to. */
1366
+ readonly feed: ChangeFeed;
1367
+ /**
1368
+ * Lists the stored models.
1369
+ * @returns Every model's id and revision, ordered by id.
1370
+ */
1371
+ readonly listModels: (request: {
1372
+ readonly signal: AbortSignal | undefined;
1373
+ }) => Promise<readonly ModelSummary[]>;
1374
+ /**
1375
+ * Stores a model under an id, replacing any model stored there and dropping the run state and relations of what the new model does not declare (see `relationsWithin`).
1376
+ * @returns The revision the save took.
1377
+ */
1378
+ readonly saveModel: (request: ModelRequest & {
1379
+ readonly model: Model<OpenIds>;
1380
+ }) => Promise<Revision>;
1381
+ /**
1382
+ * Reads a model back exactly as saved or merged, in its declared order, with its run state.
1383
+ * @returns The model, its overlay and its revision.
1384
+ */
1385
+ readonly loadModel: (request: ModelRequest) => Promise<StoredModel>;
1386
+ /**
1387
+ * Removes a model, its run state and its relations.
1388
+ * @returns The revision the deletion took, or `undefined` when there was no such model and nothing changed.
1389
+ */
1390
+ readonly deleteModel: (request: ModelRequest) => Promise<Revision | undefined>;
1391
+ /**
1392
+ * Sets the run state of the elements an overlay names, leaving the others as they are.
1393
+ * @returns The revision the change took.
1394
+ */
1395
+ readonly applyOverlay: (request: ModelRequest & {
1396
+ readonly overlay: Overlay<OpenIds>;
1397
+ }) => Promise<Revision>;
1398
+ /**
1399
+ * Merges items read from a source into a model by id (see `mergeBoundItems`), and adds their relations (see `mergeRelations`), creating the model from an empty one when it does not exist. Every relation stored must name what the merged model declares (`relationIssues`); otherwise nothing is written.
1400
+ * @returns The revision the change took.
1401
+ */
1402
+ readonly upsertItems: (request: ModelRequest & {
1403
+ readonly items: BoundItems;
1404
+ }) => Promise<Revision>;
1405
+ /**
1406
+ * The relations kept beside a model.
1407
+ * @returns The relations, in the order they were first stored.
1408
+ */
1409
+ readonly relations: (request: ModelRequest) => Promise<readonly Relation[]>;
1410
+ /**
1411
+ * The direct children of an element (see `childrenOf`).
1412
+ * @returns The children, in model order.
1413
+ */
1414
+ readonly children: (request: ElementRequest) => Promise<readonly string[]>;
1415
+ /**
1416
+ * Everything beneath an element along `child-of` relations (see `descendantsOf`).
1417
+ * @returns The descendants, by distance and then model order.
1418
+ */
1419
+ readonly descendants: (request: ElementRequest) => Promise<readonly Reach[]>;
1420
+ /**
1421
+ * Everything above an element along `child-of` relations (see `ancestorsOf`).
1422
+ * @returns The ancestors, by distance and then model order.
1423
+ */
1424
+ readonly ancestors: (request: ElementRequest) => Promise<readonly Reach[]>;
1425
+ /**
1426
+ * The work that can start now (see `readyOf`).
1427
+ * @returns The ready elements, in model order.
1428
+ */
1429
+ readonly ready: (request: ModelRequest) => Promise<readonly string[]>;
1430
+ /**
1431
+ * The unfinished work upstream of an element (see `blockedChainOf`).
1432
+ * @returns The chain, by distance and then model order.
1433
+ */
1434
+ readonly blockedChain: (request: ElementRequest) => Promise<readonly Reach[]>;
1435
+ /**
1436
+ * The unfinished work downstream of an element (see `impactOf`).
1437
+ * @returns The impacted elements, by distance and then model order.
1438
+ */
1439
+ readonly impact: (request: ElementRequest) => Promise<readonly Reach[]>;
1440
+ /**
1441
+ * The revision of a model's last change.
1442
+ * @returns The revision, or `undefined` when there is no such model.
1443
+ */
1444
+ readonly revisionOf: (request: ModelRequest) => Promise<Revision | undefined>;
1445
+ }
1446
+ //#endregion
1447
+ //#region ../../core/graph/store-contract/dist/merge.d.ts
1448
+ /** A model with nothing in it, which `items.upsert` starts from when the model does not exist yet. */
1449
+ declare const emptyModel: Model<OpenIds>;
1450
+ /**
1451
+ * Merges items read from a source into a model and its overlay: participants, activities and transitions by id, replacing a record in its place or appending a new one; overlay entries replace the run state of the elements they name. The result is not checked; see `checkStored`.
1452
+ * @param model - The stored model.
1453
+ * @param overlay - The stored overlay.
1454
+ * @param items - The items to merge.
1455
+ * @returns The merged model and overlay.
1456
+ */
1457
+ declare const mergeBoundItems: (model: Model<OpenIds>, overlay: Overlay<OpenIds>, items: BoundItems) => {
1458
+ readonly model: Model<OpenIds>;
1459
+ readonly overlay: Overlay<OpenIds>;
1460
+ };
1461
+ /**
1462
+ * Keeps only the overlay entries that name an element of the model, so replacing a model drops the run state of elements it no longer declares.
1463
+ * @param model - The model the overlay is for.
1464
+ * @param overlay - The overlay to narrow.
1465
+ * @returns The entries whose key is an element of `model`.
1466
+ */
1467
+ declare const overlayWithin: (model: Model<OpenIds>, overlay: Overlay<OpenIds>) => Overlay<OpenIds>;
1468
+ /**
1469
+ * Checks a model and overlay a write is about to store. Every store runs this before committing, so a store never holds a model `validate` rejects or an overlay entry for an element the model does not declare.
1470
+ * @param model - The model to store.
1471
+ * @param overlay - The overlay to store with it.
1472
+ * @throws GraphStoreError with `invalid` and every issue found, when there is any.
1473
+ */
1474
+ declare const checkStored: (model: Model<OpenIds>, overlay: Overlay<OpenIds>) => void;
1475
+ //#endregion
1476
+ //#region ../../core/graph/store-contract/dist/hierarchy.d.ts
1477
+ /**
1478
+ * Adds relations to a stored list: one already there is kept in its place, and a new one is appended in its incoming order, each distinct relation once.
1479
+ * @param current - The stored relations.
1480
+ * @param incoming - The relations to add.
1481
+ * @returns The merged relations.
1482
+ */
1483
+ declare const mergeRelations: (current: readonly Relation[], incoming: readonly Relation[]) => readonly Relation[];
1484
+ /**
1485
+ * Keeps only the relations both of whose ends the model still declares, in the space their kind names, so replacing a model drops the relations of what it no longer has.
1486
+ * @param model - The model the relations are for.
1487
+ * @param relations - The relations to narrow.
1488
+ * @returns The relations whose ends are both declared.
1489
+ */
1490
+ declare const relationsWithin: (model: Model<OpenIds>, relations: readonly Relation[]) => readonly Relation[];
1491
+ /**
1492
+ * The issues with a model's relations: an end that names nothing the model declares in the space its kind requires is an `unknown-reference`, as an unknown reference anywhere else in a model is.
1493
+ * @param model - The model the relations are for.
1494
+ * @param relations - The relations to check.
1495
+ * @returns One issue per end that names nothing, empty when every end resolves.
1496
+ */
1497
+ declare const relationIssues: (model: Model<OpenIds>, relations: readonly Relation[]) => readonly Issue[];
1498
+ /**
1499
+ * The direct children of an element: every element related to it by `child-of`.
1500
+ * @param model - The model, which declares `element`.
1501
+ * @param relations - The model's relations.
1502
+ * @param element - The parent.
1503
+ * @returns The children, in model order.
1504
+ */
1505
+ declare const childrenOf: (model: Model<OpenIds>, relations: readonly Relation[], element: string) => readonly string[];
1506
+ /**
1507
+ * Everything beneath an element: its children, their children and so on, each with the fewest `child-of` steps between them.
1508
+ * @param model - The model, which declares `element`.
1509
+ * @param relations - The model's relations.
1510
+ * @param element - The element at the top.
1511
+ * @returns The descendants, by distance and then model order.
1512
+ */
1513
+ declare const descendantsOf: (model: Model<OpenIds>, relations: readonly Relation[], element: string) => readonly Reach[];
1514
+ /**
1515
+ * Everything above an element: its parents, their parents and so on, nearest first.
1516
+ * @param model - The model, which declares `element`.
1517
+ * @param relations - The model's relations.
1518
+ * @param element - The element at the bottom.
1519
+ * @returns The ancestors, by distance and then model order.
1520
+ */
1521
+ declare const ancestorsOf: (model: Model<OpenIds>, relations: readonly Relation[], element: string) => readonly Reach[];
1522
+ //#endregion
1523
+ //#region ../../core/graph/store-contract/dist/structure.d.ts
1524
+ /**
1525
+ * The structural view of a stored model that the store's queries read: its elements in model order, its transitions without the loop edges `graph-domain` identifies, and its run state.
1526
+ */
1527
+ interface Structure {
1528
+ readonly order: ReadonlyMap<string, number>;
1529
+ readonly control: ReadonlySet<string>;
1530
+ readonly done: ReadonlySet<string>;
1531
+ readonly open: ReadonlySet<string>;
1532
+ readonly upstream: ReadonlyMap<string, readonly string[]>;
1533
+ readonly downstream: ReadonlyMap<string, readonly string[]>;
1534
+ }
1535
+ /**
1536
+ * Builds the structural view of a model and its overlay.
1537
+ * @param model - A valid model.
1538
+ * @param overlay - Its run state.
1539
+ * @returns The view the queries below read.
1540
+ */
1541
+ declare const structureOf: (model: Model<OpenIds>, overlay: Overlay<OpenIds>) => Structure;
1542
+ /**
1543
+ * What still stands before an element: the unfinished work upstream of it. An element that is done waits on nothing.
1544
+ * @param structure - The structural view.
1545
+ * @param element - An element of the model.
1546
+ * @returns The upstream elements that are not done and are not control elements, by distance and then model order.
1547
+ */
1548
+ declare const blockedChainOf: (structure: Structure, element: string) => readonly Reach[];
1549
+ /**
1550
+ * What depends on an element: the unfinished work downstream of it, whatever the element's own state.
1551
+ * @param structure - The structural view.
1552
+ * @param element - An element of the model.
1553
+ * @returns The downstream elements that are not done and are not control elements, by distance and then model order.
1554
+ */
1555
+ declare const impactOf: (structure: Structure, element: string) => readonly Reach[];
1556
+ /**
1557
+ * The work that can start now: every open element (no run state, or `open`) that is not a control element and has nothing unfinished upstream.
1558
+ * @param structure - The structural view.
1559
+ * @returns The ready elements, in model order.
1560
+ */
1561
+ declare const readyOf: (structure: Structure) => readonly string[];
1562
+ //#endregion
1563
+ //#region ../../core/graph/store-contract/dist/router.d.ts
1564
+ /**
1565
+ * Builds the `GraphStore` router over a store. Serve it over any oRPC transport, or call it in process with `createRouterClient`.
1566
+ *
1567
+ * `changes` subscribes to the store's feed before it reads the model's revision and before it returns, so no change is lost between the two, and a caller holding the iterator is already subscribed. When the caller names a revision `since` and the model is no longer at it, the first event is `missed`; every later change follows as it commits.
1568
+ * @param store - The adapter.
1569
+ * @returns The implemented router for `graphStoreContract`.
1570
+ */
1571
+ declare const createGraphStoreRouter: (store: GraphStore) => GraphStoreRouter;
1572
+ /** The router `createGraphStoreRouter` builds: every procedure of `graphStoreContract`, needing no initial context. */
1573
+ type GraphStoreRouter = ContractedRouter<typeof graphStoreContract, object>;
1574
+ //#endregion
1575
+ //#region ../../core/graph/store-contract/dist/fake.d.ts
1576
+ /**
1577
+ * The reference in-memory store: the behaviour every adapter's conformance run is compared with. Models are held as values and replaced on every write, so a failed check leaves the previous value in place.
1578
+ * @returns A store with no models, revisions starting after zero.
1579
+ */
1580
+ declare const createFakeGraphStore: () => GraphStore;
1581
+ //#endregion
1582
+ export { graphStoreContract as $, BoundItems as A, boundActivitySchema as B, ChangeFeedOptions as C, GraphStoreError as D, defaultSubscriptionCapacity as E, Relation as F, modelSummarySchema as G, changeKinds as H, RelationKind as I, relationSchema as J, reachSchema as K, Revision as L, ModelId as M, ModelSummary as N, GraphStoreFailure as O, Reach as P, GraphStoreClient as Q, StoreChange as R, ChangeFeed as S, SubscribeOptions as T, issueSchema as U, boundItemsSchema as V, modelIdSchema as W, storeChangeSchema as X, revisionSchema as Y, storedModelSchema as Z, mergeBoundItems as _, blockedChainOf as a, GraphStore as b, structureOf as c, descendantsOf as d, mergeRelations as f, emptyModel as g, checkStored as h, Structure as i, ChangeKind as j, BoundActivity as k, ancestorsOf as l, relationsWithin as m, GraphStoreRouter as n, impactOf as o, relationIssues as p, relationKinds as q, createGraphStoreRouter as r, readyOf as s, createFakeGraphStore as t, childrenOf as u, overlayWithin as v, ChangeSubscription as w, ModelRequest as x, ElementRequest as y, StoredModel as z };