@fungi.computer/workflows-wire 0.0.1 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from "./run-contracts.js";
5
5
  export * from "./trigger-contracts.js";
6
6
  export * from "./published-definition.js";
7
7
  export * from "./workflow-repository.js";
8
+ export * from "./repository-app-source.js";
package/dist/index.js CHANGED
@@ -5,3 +5,4 @@ export * from "./run-contracts.js";
5
5
  export * from "./trigger-contracts.js";
6
6
  export * from "./published-definition.js";
7
7
  export * from "./workflow-repository.js";
8
+ export * from "./repository-app-source.js";
@@ -1,5 +1,6 @@
1
1
  import * as z from "zod";
2
- export declare const provenanceSchema: z.ZodUnion<readonly [z.ZodObject<{
2
+ /** Source Workflow and commit recorded when importing or forking a document. */
3
+ export declare const provenanceSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
3
4
  kind: z.ZodLiteral<"import">;
4
5
  workflowId: z.ZodString;
5
6
  version: z.ZodNumber;
@@ -14,25 +15,27 @@ export declare const provenanceSchema: z.ZodUnion<readonly [z.ZodObject<{
14
15
  kind: z.ZodLiteral<"fork">;
15
16
  workflowId: z.ZodString;
16
17
  commit: z.ZodString;
17
- }, z.core.$strict>]>;
18
+ }, z.core.$strict>]>>;
19
+ /** Shared run request fields: identity, bindings, JSON input and optional delivery. */
18
20
  export declare const runBase: z.ZodObject<{
19
21
  requestId: z.ZodString;
20
22
  workflowId: z.ZodString;
21
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
23
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
22
24
  kind: z.ZodLiteral<"team-source">;
23
- }, z.core.$strict>]>>;
25
+ }, z.core.$strict>>]>>;
24
26
  input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
25
27
  delivery: z.ZodOptional<z.ZodObject<{
26
28
  agentId: z.ZodString;
27
29
  sessionId: z.ZodString;
28
30
  }, z.core.$strict>>;
29
31
  }, z.core.$strict>;
30
- export declare const publishedRun: z.ZodUnion<readonly [z.ZodObject<{
32
+ /** Run request pinned to either a published version or an exact Git commit. */
33
+ export declare const publishedRun: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
31
34
  requestId: z.ZodString;
32
35
  workflowId: z.ZodString;
33
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
36
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
34
37
  kind: z.ZodLiteral<"team-source">;
35
- }, z.core.$strict>]>>;
38
+ }, z.core.$strict>>]>>;
36
39
  input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
37
40
  delivery: z.ZodOptional<z.ZodObject<{
38
41
  agentId: z.ZodString;
@@ -42,18 +45,19 @@ export declare const publishedRun: z.ZodUnion<readonly [z.ZodObject<{
42
45
  }, z.core.$strict>, z.ZodObject<{
43
46
  requestId: z.ZodString;
44
47
  workflowId: z.ZodString;
45
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
48
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
46
49
  kind: z.ZodLiteral<"team-source">;
47
- }, z.core.$strict>]>>;
50
+ }, z.core.$strict>>]>>;
48
51
  input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
49
52
  delivery: z.ZodOptional<z.ZodObject<{
50
53
  agentId: z.ZodString;
51
54
  sessionId: z.ZodString;
52
55
  }, z.core.$strict>>;
53
56
  commit: z.ZodString;
54
- }, z.core.$strict>]>;
57
+ }, z.core.$strict>]>>;
58
+ /** Wire document containing definition, node layout, provenance and commit. */
55
59
  export declare const document: z.ZodObject<{
56
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
60
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
57
61
  kind: z.ZodLiteral<"import">;
58
62
  workflowId: z.ZodString;
59
63
  version: z.ZodNumber;
@@ -68,7 +72,7 @@ export declare const document: z.ZodObject<{
68
72
  kind: z.ZodLiteral<"fork">;
69
73
  workflowId: z.ZodString;
70
74
  commit: z.ZodString;
71
- }, z.core.$strict>]>>;
75
+ }, z.core.$strict>]>>>;
72
76
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
73
77
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
74
78
  x: z.ZodNumber;
@@ -76,9 +80,11 @@ export declare const document: z.ZodObject<{
76
80
  }, z.core.$strict>>;
77
81
  commit: z.ZodString;
78
82
  }, z.core.$strict>;
83
+ /** Nonnegative revision used to fence draft replacements. */
79
84
  export declare const revisionSchema: z.ZodNumber;
85
+ /** Editable document with a draft revision instead of a published commit. */
80
86
  export declare const draftDocument: z.ZodObject<{
81
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
87
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
82
88
  kind: z.ZodLiteral<"import">;
83
89
  workflowId: z.ZodString;
84
90
  version: z.ZodNumber;
@@ -93,7 +99,7 @@ export declare const draftDocument: z.ZodObject<{
93
99
  kind: z.ZodLiteral<"fork">;
94
100
  workflowId: z.ZodString;
95
101
  commit: z.ZodString;
96
- }, z.core.$strict>]>>;
102
+ }, z.core.$strict>]>>>;
97
103
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
98
104
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
99
105
  x: z.ZodNumber;
@@ -101,8 +107,9 @@ export declare const draftDocument: z.ZodObject<{
101
107
  }, z.core.$strict>>;
102
108
  revision: z.ZodNumber;
103
109
  }, z.core.$strict>;
110
+ /** Published document identified by Workflow, version, commit and content digest. */
104
111
  export declare const publishedDocument: z.ZodObject<{
105
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
112
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
106
113
  kind: z.ZodLiteral<"import">;
107
114
  workflowId: z.ZodString;
108
115
  version: z.ZodNumber;
@@ -117,7 +124,7 @@ export declare const publishedDocument: z.ZodObject<{
117
124
  kind: z.ZodLiteral<"fork">;
118
125
  workflowId: z.ZodString;
119
126
  commit: z.ZodString;
120
- }, z.core.$strict>]>>;
127
+ }, z.core.$strict>]>>>;
121
128
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
122
129
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
123
130
  x: z.ZodNumber;
@@ -132,13 +139,14 @@ export declare const publishedDocument: z.ZodObject<{
132
139
  readonly appReleaseKind: "Sha256Digest";
133
140
  }, string>>;
134
141
  }, z.core.$strict>;
142
+ /** Draft save result, including revision conflict or validation issues. */
135
143
  export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
136
144
  kind: z.ZodLiteral<"saved">;
137
145
  revision: z.ZodNumber;
138
146
  }, z.core.$strict>, z.ZodObject<{
139
147
  kind: z.ZodLiteral<"conflict">;
140
148
  current: z.ZodNullable<z.ZodObject<{
141
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
149
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
142
150
  kind: z.ZodLiteral<"import">;
143
151
  workflowId: z.ZodString;
144
152
  version: z.ZodNumber;
@@ -153,7 +161,7 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
153
161
  kind: z.ZodLiteral<"fork">;
154
162
  workflowId: z.ZodString;
155
163
  commit: z.ZodString;
156
- }, z.core.$strict>]>>;
164
+ }, z.core.$strict>]>>>;
157
165
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
158
166
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
159
167
  x: z.ZodNumber;
@@ -163,7 +171,7 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
163
171
  }, z.core.$strict>>;
164
172
  }, z.core.$strict>, z.ZodObject<{
165
173
  kind: z.ZodLiteral<"invalid">;
166
- issues: z.ZodArray<z.ZodObject<{
174
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
167
175
  code: z.ZodString;
168
176
  message: z.ZodString;
169
177
  graph: z.ZodOptional<z.ZodString>;
@@ -171,17 +179,18 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
171
179
  trigger: z.ZodOptional<z.ZodString>;
172
180
  port: z.ZodOptional<z.ZodString>;
173
181
  edge: z.ZodOptional<z.ZodNumber>;
174
- }, z.core.$strip>>;
182
+ }, z.core.$strip>>>;
175
183
  }, z.core.$strict>]>;
184
+ /** Share review listing Git access, write/external nodes and trigger configuration. */
176
185
  export declare const shareReview: z.ZodObject<{
177
186
  gitAccess: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
178
- binding: z.ZodString;
187
+ binding: z.ZodLazy<z.ZodString>;
179
188
  repository: z.ZodString;
180
- branches: z.ZodArray<z.ZodString>;
189
+ branches: z.ZodLazy<z.ZodArray<z.ZodString>>;
181
190
  graph: z.ZodString;
182
191
  node: z.ZodString;
183
192
  }, z.core.$strict>, z.ZodObject<{
184
- binding: z.ZodString;
193
+ binding: z.ZodLazy<z.ZodString>;
185
194
  repository: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"$trigger.repository">]>;
186
195
  access: z.ZodLiteral<"read">;
187
196
  graph: z.ZodString;
@@ -199,19 +208,20 @@ export declare const shareReview: z.ZodObject<{
199
208
  }, z.core.$strict>>;
200
209
  triggers: z.ZodArray<z.ZodJSONSchema>;
201
210
  }, z.core.$strict>;
202
- export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
211
+ /** Import/fork result with the saved draft and review, or a typed refusal. */
212
+ export declare const shareCopyReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
203
213
  kind: z.ZodLiteral<"saved">;
204
214
  revision: z.ZodNumber;
205
215
  title: z.ZodString;
206
216
  review: z.ZodObject<{
207
217
  gitAccess: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
208
- binding: z.ZodString;
218
+ binding: z.ZodLazy<z.ZodString>;
209
219
  repository: z.ZodString;
210
- branches: z.ZodArray<z.ZodString>;
220
+ branches: z.ZodLazy<z.ZodArray<z.ZodString>>;
211
221
  graph: z.ZodString;
212
222
  node: z.ZodString;
213
223
  }, z.core.$strict>, z.ZodObject<{
214
- binding: z.ZodString;
224
+ binding: z.ZodLazy<z.ZodString>;
215
225
  repository: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"$trigger.repository">]>;
216
226
  access: z.ZodLiteral<"read">;
217
227
  graph: z.ZodString;
@@ -232,7 +242,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
232
242
  }, z.core.$strict>, z.ZodObject<{
233
243
  kind: z.ZodLiteral<"conflict">;
234
244
  current: z.ZodNullable<z.ZodObject<{
235
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
245
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
236
246
  kind: z.ZodLiteral<"import">;
237
247
  workflowId: z.ZodString;
238
248
  version: z.ZodNumber;
@@ -247,7 +257,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
247
257
  kind: z.ZodLiteral<"fork">;
248
258
  workflowId: z.ZodString;
249
259
  commit: z.ZodString;
250
- }, z.core.$strict>]>>;
260
+ }, z.core.$strict>]>>>;
251
261
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
252
262
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
253
263
  x: z.ZodNumber;
@@ -257,7 +267,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
257
267
  }, z.core.$strict>>;
258
268
  }, z.core.$strict>, z.ZodObject<{
259
269
  kind: z.ZodLiteral<"invalid">;
260
- issues: z.ZodArray<z.ZodObject<{
270
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
261
271
  code: z.ZodString;
262
272
  message: z.ZodString;
263
273
  graph: z.ZodOptional<z.ZodString>;
@@ -265,7 +275,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
265
275
  trigger: z.ZodOptional<z.ZodString>;
266
276
  port: z.ZodOptional<z.ZodString>;
267
277
  edge: z.ZodOptional<z.ZodNumber>;
268
- }, z.core.$strip>>;
278
+ }, z.core.$strip>>>;
269
279
  }, z.core.$strict>, z.ZodObject<{
270
280
  kind: z.ZodLiteral<"missing_apps">;
271
281
  appIds: z.ZodArray<z.ZodString>;
@@ -276,8 +286,9 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
276
286
  digest_mismatch: "digest_mismatch";
277
287
  invalid_bundle: "invalid_bundle";
278
288
  }>;
279
- }, z.core.$strict>]>;
280
- export declare const shareExportReply: z.ZodUnion<readonly [z.ZodObject<{
289
+ }, z.core.$strict>]>>;
290
+ /** Exported bundle bytes and digest, or a missing/oversized bundle result. */
291
+ export declare const shareExportReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
281
292
  bytes: z.ZodString;
282
293
  sha256: z.ZodString & z.ZodType<string & {
283
294
  readonly appReleaseKind: "Sha256Digest";
@@ -289,27 +300,33 @@ export declare const shareExportReply: z.ZodUnion<readonly [z.ZodObject<{
289
300
  not_found: "not_found";
290
301
  too_large: "too_large";
291
302
  }>;
292
- }, z.core.$strict>]>;
303
+ }, z.core.$strict>]>>;
304
+ /** Mint and validate identities for asynchronous Workflow publication attempts. */
293
305
  export declare const publicationIds: Readonly<{
294
306
  readonly publication: import("@fungi.computer/cairn/id").IdCodec<"workflow-publication", "publication", 1>;
295
307
  }>;
296
- export declare const publicationIdSchema: z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>;
308
+ /** Publication identity accepted by the maintained publication id family. */
309
+ export declare const publicationIdSchema: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>>;
310
+ /** Publication failure categories returned by the host. */
297
311
  export declare const publicationFailure: z.ZodEnum<{
298
312
  too_large: "too_large";
299
313
  git_conflict: "git_conflict";
300
314
  publication_failed: "publication_failed";
301
315
  access_changed: "access_changed";
302
316
  }>;
303
- export declare const publicationComplete: z.ZodObject<{
317
+ /** Completed publication's exact commit and assigned version. */
318
+ export declare const publicationComplete: z.ZodLazy<z.ZodObject<{
304
319
  kind: z.ZodLiteral<"published">;
305
320
  commit: z.ZodString;
306
321
  version: z.ZodNumber;
307
- }, z.core.$strict>;
308
- export declare const publicationPending: z.ZodObject<{
322
+ }, z.core.$strict>>;
323
+ /** Pending publication identified for subsequent status reads. */
324
+ export declare const publicationPending: z.ZodLazy<z.ZodObject<{
309
325
  kind: z.ZodLiteral<"publishing">;
310
- publicationId: z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>;
311
- }, z.core.$strict>;
312
- export declare const publicationFailed: z.ZodObject<{
326
+ publicationId: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>>;
327
+ }, z.core.$strict>>;
328
+ /** Failed publication and its typed failure reason. */
329
+ export declare const publicationFailed: z.ZodLazy<z.ZodObject<{
313
330
  kind: z.ZodLiteral<"failed">;
314
331
  reason: z.ZodEnum<{
315
332
  too_large: "too_large";
@@ -317,15 +334,16 @@ export declare const publicationFailed: z.ZodObject<{
317
334
  publication_failed: "publication_failed";
318
335
  access_changed: "access_changed";
319
336
  }>;
320
- }, z.core.$strict>;
321
- export declare const publicationStatus: z.ZodUnion<readonly [z.ZodObject<{
337
+ }, z.core.$strict>>;
338
+ /** Current publication outcome, including an unknown publication identity. */
339
+ export declare const publicationStatus: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.ZodObject<{
322
340
  kind: z.ZodLiteral<"publishing">;
323
- publicationId: z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>;
324
- }, z.core.$strict>, z.ZodObject<{
341
+ publicationId: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>>;
342
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
325
343
  kind: z.ZodLiteral<"published">;
326
344
  commit: z.ZodString;
327
345
  version: z.ZodNumber;
328
- }, z.core.$strict>, z.ZodObject<{
346
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
329
347
  kind: z.ZodLiteral<"failed">;
330
348
  reason: z.ZodEnum<{
331
349
  too_large: "too_large";
@@ -333,22 +351,24 @@ export declare const publicationStatus: z.ZodUnion<readonly [z.ZodObject<{
333
351
  publication_failed: "publication_failed";
334
352
  access_changed: "access_changed";
335
353
  }>;
336
- }, z.core.$strict>, z.ZodObject<{
354
+ }, z.core.$strict>>, z.ZodObject<{
337
355
  kind: z.ZodLiteral<"not_found">;
338
- }, z.core.$strict>]>;
339
- export declare const publicationElsewhere: z.ZodObject<{
356
+ }, z.core.$strict>]>>;
357
+ /** Another publication attempt currently owns the publication operation. */
358
+ export declare const publicationElsewhere: z.ZodLazy<z.ZodObject<{
340
359
  kind: z.ZodLiteral<"publishing_elsewhere">;
341
- }, z.core.$strict>;
342
- export declare const publishReply: z.ZodUnion<readonly [z.ZodObject<{
360
+ }, z.core.$strict>>;
361
+ /** Publication command result, including pending work, conflict or validation issues. */
362
+ export declare const publishReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.ZodObject<{
343
363
  kind: z.ZodLiteral<"publishing_elsewhere">;
344
- }, z.core.$strict>, z.ZodObject<{
364
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
345
365
  kind: z.ZodLiteral<"published">;
346
366
  commit: z.ZodString;
347
367
  version: z.ZodNumber;
348
- }, z.core.$strict>, z.ZodObject<{
368
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
349
369
  kind: z.ZodLiteral<"publishing">;
350
- publicationId: z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>;
351
- }, z.core.$strict>, z.ZodObject<{
370
+ publicationId: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn/id").CairnId<"workflow-publication", "publication", 1>, string>>>;
371
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
352
372
  kind: z.ZodLiteral<"failed">;
353
373
  reason: z.ZodEnum<{
354
374
  too_large: "too_large";
@@ -356,12 +376,12 @@ export declare const publishReply: z.ZodUnion<readonly [z.ZodObject<{
356
376
  publication_failed: "publication_failed";
357
377
  access_changed: "access_changed";
358
378
  }>;
359
- }, z.core.$strict>, z.ZodObject<{
379
+ }, z.core.$strict>>, z.ZodObject<{
360
380
  kind: z.ZodLiteral<"conflict">;
361
381
  head: z.ZodNullable<z.ZodString>;
362
382
  }, z.core.$strict>, z.ZodObject<{
363
383
  kind: z.ZodLiteral<"invalid">;
364
- issues: z.ZodArray<z.ZodObject<{
384
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
365
385
  code: z.ZodString;
366
386
  message: z.ZodString;
367
387
  graph: z.ZodOptional<z.ZodString>;
@@ -369,18 +389,21 @@ export declare const publishReply: z.ZodUnion<readonly [z.ZodObject<{
369
389
  trigger: z.ZodOptional<z.ZodString>;
370
390
  port: z.ZodOptional<z.ZodString>;
371
391
  edge: z.ZodOptional<z.ZodNumber>;
372
- }, z.core.$strip>>;
373
- }, z.core.$strict>]>;
392
+ }, z.core.$strip>>>;
393
+ }, z.core.$strict>]>>;
394
+ /** Published version with commit identity, commit time and commit message. */
374
395
  export declare const version: z.ZodObject<{
375
396
  version: z.ZodNumber;
376
397
  commit: z.ZodString;
377
398
  committedAt: z.ZodNumber;
378
399
  message: z.ZodString;
379
400
  }, z.core.$strict>;
401
+ /** Identify one Workflow within the library. */
380
402
  export declare const workflow: z.ZodObject<{
381
403
  workflowId: z.ZodString;
382
404
  }, z.core.$strict>;
383
- export declare const listings: z.ZodArray<z.ZodObject<{
405
+ /** Bounded library rows with draft revision and optional published reference. */
406
+ export declare const listings: z.ZodLazy<z.ZodArray<z.ZodObject<{
384
407
  workflowId: z.ZodString;
385
408
  title: z.ZodString;
386
409
  draftRevision: z.ZodNullable<z.ZodNumber>;
@@ -388,19 +411,21 @@ export declare const listings: z.ZodArray<z.ZodObject<{
388
411
  commit: z.ZodString;
389
412
  version: z.ZodNullable<z.ZodNumber>;
390
413
  }, z.core.$strict>>;
391
- }, z.core.$strict>>;
414
+ }, z.core.$strict>>>;
415
+ /** Bounded Git history rows without a published-version number. */
392
416
  export declare const history: z.ZodArray<z.ZodObject<{
393
417
  message: z.ZodString;
394
418
  commit: z.ZodString;
395
419
  committedAt: z.ZodNumber;
396
420
  }, z.core.$strict>>;
397
421
  /** A missing index is not an empty Git repository; only write paths reconstruct it. */
398
- export declare const libraryPageInput: z.ZodObject<{
422
+ export declare const libraryPageInput: z.ZodLazy<z.ZodObject<{
399
423
  limit: z.ZodDefault<z.ZodNumber>;
400
424
  after: z.ZodOptional<z.ZodString>;
401
- }, z.core.$strict>;
402
- export declare const libraryPage: z.ZodObject<{
403
- items: z.ZodArray<z.ZodObject<{
425
+ }, z.core.$strict>>;
426
+ /** One library page with an optional exclusive cursor for the next page. */
427
+ export declare const libraryPage: z.ZodLazy<z.ZodObject<{
428
+ items: z.ZodLazy<z.ZodArray<z.ZodObject<{
404
429
  workflowId: z.ZodString;
405
430
  title: z.ZodString;
406
431
  draftRevision: z.ZodNullable<z.ZodNumber>;
@@ -408,11 +433,12 @@ export declare const libraryPage: z.ZodObject<{
408
433
  commit: z.ZodString;
409
434
  version: z.ZodNullable<z.ZodNumber>;
410
435
  }, z.core.$strict>>;
411
- }, z.core.$strict>>;
436
+ }, z.core.$strict>>>;
412
437
  next: z.ZodOptional<z.ZodString>;
413
- }, z.core.$strict>;
414
- export declare const libraryListing: z.ZodUnion<readonly [z.ZodObject<{
415
- items: z.ZodArray<z.ZodObject<{
438
+ }, z.core.$strict>>;
439
+ /** Indexed library page, or an explicit indication that its index is missing. */
440
+ export declare const libraryListing: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.ZodObject<{
441
+ items: z.ZodLazy<z.ZodArray<z.ZodObject<{
416
442
  workflowId: z.ZodString;
417
443
  title: z.ZodString;
418
444
  draftRevision: z.ZodNullable<z.ZodNumber>;
@@ -420,17 +446,18 @@ export declare const libraryListing: z.ZodUnion<readonly [z.ZodObject<{
420
446
  commit: z.ZodString;
421
447
  version: z.ZodNullable<z.ZodNumber>;
422
448
  }, z.core.$strict>>;
423
- }, z.core.$strict>>;
449
+ }, z.core.$strict>>>;
424
450
  next: z.ZodOptional<z.ZodString>;
425
- }, z.core.$strict>, z.ZodObject<{
451
+ }, z.core.$strict>>, z.ZodObject<{
426
452
  kind: z.ZodLiteral<"unindexed">;
427
- }, z.core.$strict>]>;
453
+ }, z.core.$strict>]>>;
428
454
  /** A missing screen copy needs an explicit foreground rebuild, never a hidden Git read. */
429
- export declare const rebuilding: z.ZodObject<{
455
+ export declare const rebuilding: z.ZodLazy<z.ZodObject<{
430
456
  kind: z.ZodLiteral<"rebuilding">;
431
- }, z.core.$strict>;
432
- export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
433
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
457
+ }, z.core.$strict>>;
458
+ /** Draft/published document read, absence, or an explicit copy-rebuild state. */
459
+ export declare const documentRead: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
460
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
434
461
  kind: z.ZodLiteral<"import">;
435
462
  workflowId: z.ZodString;
436
463
  version: z.ZodNumber;
@@ -445,7 +472,7 @@ export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
445
472
  kind: z.ZodLiteral<"fork">;
446
473
  workflowId: z.ZodString;
447
474
  commit: z.ZodString;
448
- }, z.core.$strict>]>>;
475
+ }, z.core.$strict>]>>>;
449
476
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
450
477
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
451
478
  x: z.ZodNumber;
@@ -453,7 +480,7 @@ export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
453
480
  }, z.core.$strict>>;
454
481
  revision: z.ZodNumber;
455
482
  }, z.core.$strict>, z.ZodObject<{
456
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
483
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
457
484
  kind: z.ZodLiteral<"import">;
458
485
  workflowId: z.ZodString;
459
486
  version: z.ZodNumber;
@@ -468,25 +495,27 @@ export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
468
495
  kind: z.ZodLiteral<"fork">;
469
496
  workflowId: z.ZodString;
470
497
  commit: z.ZodString;
471
- }, z.core.$strict>]>>;
498
+ }, z.core.$strict>]>>>;
472
499
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
473
500
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
474
501
  x: z.ZodNumber;
475
502
  y: z.ZodNumber;
476
503
  }, z.core.$strict>>;
477
504
  commit: z.ZodString;
478
- }, z.core.$strict>, z.ZodNull, z.ZodObject<{
505
+ }, z.core.$strict>, z.ZodNull, z.ZodLazy<z.ZodObject<{
479
506
  kind: z.ZodLiteral<"rebuilding">;
480
- }, z.core.$strict>]>;
481
- export declare const versionsRead: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
507
+ }, z.core.$strict>>]>>;
508
+ /** Published version rows, or an explicit copy-rebuild state. */
509
+ export declare const versionsRead: z.ZodLazy<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
482
510
  version: z.ZodNumber;
483
511
  commit: z.ZodString;
484
512
  committedAt: z.ZodNumber;
485
513
  message: z.ZodString;
486
- }, z.core.$strict>>, z.ZodObject<{
514
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
487
515
  kind: z.ZodLiteral<"rebuilding">;
488
- }, z.core.$strict>]>;
489
- export declare const rebuildCopiesInput: z.ZodObject<{
516
+ }, z.core.$strict>>]>>;
517
+ /** Bounded copy-rebuild continuation, optionally targeting one pinned document. */
518
+ export declare const rebuildCopiesInput: z.ZodLazy<z.ZodObject<{
490
519
  cursor: z.ZodNullable<z.ZodString>;
491
520
  target: z.ZodOptional<z.ZodObject<{
492
521
  workflowId: z.ZodString;
@@ -494,8 +523,9 @@ export declare const rebuildCopiesInput: z.ZodObject<{
494
523
  commit: z.ZodString;
495
524
  }, z.core.$strict>;
496
525
  }, z.core.$strict>>;
497
- }, z.core.$strict>;
498
- export declare const rebuildCopiesReply: z.ZodObject<{
526
+ }, z.core.$strict>>;
527
+ /** Copy-rebuild progress and the cursor needed to continue unfinished work. */
528
+ export declare const rebuildCopiesReply: z.ZodLazy<z.ZodObject<{
499
529
  done: z.ZodBoolean;
500
530
  cursor: z.ZodNullable<z.ZodString>;
501
- }, z.core.$strict>;
531
+ }, z.core.$strict>>;