@fungi.computer/workflows-wire 0.0.1 → 0.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.
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- export declare const provenanceSchema: z.ZodUnion<readonly [z.ZodObject<{
2
+ export declare const provenanceSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
3
3
  kind: z.ZodLiteral<"import">;
4
4
  workflowId: z.ZodString;
5
5
  version: z.ZodNumber;
@@ -14,25 +14,25 @@ export declare const provenanceSchema: z.ZodUnion<readonly [z.ZodObject<{
14
14
  kind: z.ZodLiteral<"fork">;
15
15
  workflowId: z.ZodString;
16
16
  commit: z.ZodString;
17
- }, z.core.$strict>]>;
17
+ }, z.core.$strict>]>>;
18
18
  export declare const runBase: z.ZodObject<{
19
19
  requestId: z.ZodString;
20
20
  workflowId: z.ZodString;
21
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
21
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
22
22
  kind: z.ZodLiteral<"team-source">;
23
- }, z.core.$strict>]>>;
23
+ }, z.core.$strict>>]>>;
24
24
  input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
25
25
  delivery: z.ZodOptional<z.ZodObject<{
26
26
  agentId: z.ZodString;
27
27
  sessionId: z.ZodString;
28
28
  }, z.core.$strict>>;
29
29
  }, z.core.$strict>;
30
- export declare const publishedRun: z.ZodUnion<readonly [z.ZodObject<{
30
+ export declare const publishedRun: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
31
31
  requestId: z.ZodString;
32
32
  workflowId: z.ZodString;
33
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
33
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
34
34
  kind: z.ZodLiteral<"team-source">;
35
- }, z.core.$strict>]>>;
35
+ }, z.core.$strict>>]>>;
36
36
  input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
37
37
  delivery: z.ZodOptional<z.ZodObject<{
38
38
  agentId: z.ZodString;
@@ -42,18 +42,18 @@ export declare const publishedRun: z.ZodUnion<readonly [z.ZodObject<{
42
42
  }, z.core.$strict>, z.ZodObject<{
43
43
  requestId: z.ZodString;
44
44
  workflowId: z.ZodString;
45
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
45
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
46
46
  kind: z.ZodLiteral<"team-source">;
47
- }, z.core.$strict>]>>;
47
+ }, z.core.$strict>>]>>;
48
48
  input: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
49
49
  delivery: z.ZodOptional<z.ZodObject<{
50
50
  agentId: z.ZodString;
51
51
  sessionId: z.ZodString;
52
52
  }, z.core.$strict>>;
53
53
  commit: z.ZodString;
54
- }, z.core.$strict>]>;
54
+ }, z.core.$strict>]>>;
55
55
  export declare const document: z.ZodObject<{
56
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
56
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
57
57
  kind: z.ZodLiteral<"import">;
58
58
  workflowId: z.ZodString;
59
59
  version: z.ZodNumber;
@@ -68,7 +68,7 @@ export declare const document: z.ZodObject<{
68
68
  kind: z.ZodLiteral<"fork">;
69
69
  workflowId: z.ZodString;
70
70
  commit: z.ZodString;
71
- }, z.core.$strict>]>>;
71
+ }, z.core.$strict>]>>>;
72
72
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
73
73
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
74
74
  x: z.ZodNumber;
@@ -78,7 +78,7 @@ export declare const document: z.ZodObject<{
78
78
  }, z.core.$strict>;
79
79
  export declare const revisionSchema: z.ZodNumber;
80
80
  export declare const draftDocument: z.ZodObject<{
81
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
81
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
82
82
  kind: z.ZodLiteral<"import">;
83
83
  workflowId: z.ZodString;
84
84
  version: z.ZodNumber;
@@ -93,7 +93,7 @@ export declare const draftDocument: z.ZodObject<{
93
93
  kind: z.ZodLiteral<"fork">;
94
94
  workflowId: z.ZodString;
95
95
  commit: z.ZodString;
96
- }, z.core.$strict>]>>;
96
+ }, z.core.$strict>]>>>;
97
97
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
98
98
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
99
99
  x: z.ZodNumber;
@@ -102,7 +102,7 @@ export declare const draftDocument: z.ZodObject<{
102
102
  revision: z.ZodNumber;
103
103
  }, z.core.$strict>;
104
104
  export declare const publishedDocument: z.ZodObject<{
105
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
105
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
106
106
  kind: z.ZodLiteral<"import">;
107
107
  workflowId: z.ZodString;
108
108
  version: z.ZodNumber;
@@ -117,7 +117,7 @@ export declare const publishedDocument: z.ZodObject<{
117
117
  kind: z.ZodLiteral<"fork">;
118
118
  workflowId: z.ZodString;
119
119
  commit: z.ZodString;
120
- }, z.core.$strict>]>>;
120
+ }, z.core.$strict>]>>>;
121
121
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
122
122
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
123
123
  x: z.ZodNumber;
@@ -138,7 +138,7 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
138
138
  }, z.core.$strict>, z.ZodObject<{
139
139
  kind: z.ZodLiteral<"conflict">;
140
140
  current: z.ZodNullable<z.ZodObject<{
141
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
141
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
142
142
  kind: z.ZodLiteral<"import">;
143
143
  workflowId: z.ZodString;
144
144
  version: z.ZodNumber;
@@ -153,7 +153,7 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
153
153
  kind: z.ZodLiteral<"fork">;
154
154
  workflowId: z.ZodString;
155
155
  commit: z.ZodString;
156
- }, z.core.$strict>]>>;
156
+ }, z.core.$strict>]>>>;
157
157
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
158
158
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
159
159
  x: z.ZodNumber;
@@ -163,7 +163,7 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
163
163
  }, z.core.$strict>>;
164
164
  }, z.core.$strict>, z.ZodObject<{
165
165
  kind: z.ZodLiteral<"invalid">;
166
- issues: z.ZodArray<z.ZodObject<{
166
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
167
167
  code: z.ZodString;
168
168
  message: z.ZodString;
169
169
  graph: z.ZodOptional<z.ZodString>;
@@ -171,17 +171,17 @@ export declare const saveReply: z.ZodUnion<readonly [z.ZodObject<{
171
171
  trigger: z.ZodOptional<z.ZodString>;
172
172
  port: z.ZodOptional<z.ZodString>;
173
173
  edge: z.ZodOptional<z.ZodNumber>;
174
- }, z.core.$strip>>;
174
+ }, z.core.$strip>>>;
175
175
  }, z.core.$strict>]>;
176
176
  export declare const shareReview: z.ZodObject<{
177
177
  gitAccess: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
178
- binding: z.ZodString;
178
+ binding: z.ZodLazy<z.ZodString>;
179
179
  repository: z.ZodString;
180
- branches: z.ZodArray<z.ZodString>;
180
+ branches: z.ZodLazy<z.ZodArray<z.ZodString>>;
181
181
  graph: z.ZodString;
182
182
  node: z.ZodString;
183
183
  }, z.core.$strict>, z.ZodObject<{
184
- binding: z.ZodString;
184
+ binding: z.ZodLazy<z.ZodString>;
185
185
  repository: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"$trigger.repository">]>;
186
186
  access: z.ZodLiteral<"read">;
187
187
  graph: z.ZodString;
@@ -199,19 +199,19 @@ export declare const shareReview: z.ZodObject<{
199
199
  }, z.core.$strict>>;
200
200
  triggers: z.ZodArray<z.ZodJSONSchema>;
201
201
  }, z.core.$strict>;
202
- export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
202
+ export declare const shareCopyReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
203
203
  kind: z.ZodLiteral<"saved">;
204
204
  revision: z.ZodNumber;
205
205
  title: z.ZodString;
206
206
  review: z.ZodObject<{
207
207
  gitAccess: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
208
- binding: z.ZodString;
208
+ binding: z.ZodLazy<z.ZodString>;
209
209
  repository: z.ZodString;
210
- branches: z.ZodArray<z.ZodString>;
210
+ branches: z.ZodLazy<z.ZodArray<z.ZodString>>;
211
211
  graph: z.ZodString;
212
212
  node: z.ZodString;
213
213
  }, z.core.$strict>, z.ZodObject<{
214
- binding: z.ZodString;
214
+ binding: z.ZodLazy<z.ZodString>;
215
215
  repository: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"$trigger.repository">]>;
216
216
  access: z.ZodLiteral<"read">;
217
217
  graph: z.ZodString;
@@ -232,7 +232,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
232
232
  }, z.core.$strict>, z.ZodObject<{
233
233
  kind: z.ZodLiteral<"conflict">;
234
234
  current: z.ZodNullable<z.ZodObject<{
235
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
235
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
236
236
  kind: z.ZodLiteral<"import">;
237
237
  workflowId: z.ZodString;
238
238
  version: z.ZodNumber;
@@ -247,7 +247,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
247
247
  kind: z.ZodLiteral<"fork">;
248
248
  workflowId: z.ZodString;
249
249
  commit: z.ZodString;
250
- }, z.core.$strict>]>>;
250
+ }, z.core.$strict>]>>>;
251
251
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
252
252
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
253
253
  x: z.ZodNumber;
@@ -257,7 +257,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
257
257
  }, z.core.$strict>>;
258
258
  }, z.core.$strict>, z.ZodObject<{
259
259
  kind: z.ZodLiteral<"invalid">;
260
- issues: z.ZodArray<z.ZodObject<{
260
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
261
261
  code: z.ZodString;
262
262
  message: z.ZodString;
263
263
  graph: z.ZodOptional<z.ZodString>;
@@ -265,7 +265,7 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
265
265
  trigger: z.ZodOptional<z.ZodString>;
266
266
  port: z.ZodOptional<z.ZodString>;
267
267
  edge: z.ZodOptional<z.ZodNumber>;
268
- }, z.core.$strip>>;
268
+ }, z.core.$strip>>>;
269
269
  }, z.core.$strict>, z.ZodObject<{
270
270
  kind: z.ZodLiteral<"missing_apps">;
271
271
  appIds: z.ZodArray<z.ZodString>;
@@ -276,8 +276,8 @@ export declare const shareCopyReply: z.ZodUnion<readonly [z.ZodObject<{
276
276
  digest_mismatch: "digest_mismatch";
277
277
  invalid_bundle: "invalid_bundle";
278
278
  }>;
279
- }, z.core.$strict>]>;
280
- export declare const shareExportReply: z.ZodUnion<readonly [z.ZodObject<{
279
+ }, z.core.$strict>]>>;
280
+ export declare const shareExportReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
281
281
  bytes: z.ZodString;
282
282
  sha256: z.ZodString & z.ZodType<string & {
283
283
  readonly appReleaseKind: "Sha256Digest";
@@ -289,27 +289,27 @@ export declare const shareExportReply: z.ZodUnion<readonly [z.ZodObject<{
289
289
  not_found: "not_found";
290
290
  too_large: "too_large";
291
291
  }>;
292
- }, z.core.$strict>]>;
292
+ }, z.core.$strict>]>>;
293
293
  export declare const publicationIds: Readonly<{
294
294
  readonly publication: import("@fungi.computer/cairn/id").IdCodec<"workflow-publication", "publication", 1>;
295
295
  }>;
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>>;
296
+ 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>>>;
297
297
  export declare const publicationFailure: z.ZodEnum<{
298
298
  too_large: "too_large";
299
299
  git_conflict: "git_conflict";
300
300
  publication_failed: "publication_failed";
301
301
  access_changed: "access_changed";
302
302
  }>;
303
- export declare const publicationComplete: z.ZodObject<{
303
+ export declare const publicationComplete: z.ZodLazy<z.ZodObject<{
304
304
  kind: z.ZodLiteral<"published">;
305
305
  commit: z.ZodString;
306
306
  version: z.ZodNumber;
307
- }, z.core.$strict>;
308
- export declare const publicationPending: z.ZodObject<{
307
+ }, z.core.$strict>>;
308
+ export declare const publicationPending: z.ZodLazy<z.ZodObject<{
309
309
  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<{
310
+ 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>>>;
311
+ }, z.core.$strict>>;
312
+ export declare const publicationFailed: z.ZodLazy<z.ZodObject<{
313
313
  kind: z.ZodLiteral<"failed">;
314
314
  reason: z.ZodEnum<{
315
315
  too_large: "too_large";
@@ -317,15 +317,15 @@ export declare const publicationFailed: z.ZodObject<{
317
317
  publication_failed: "publication_failed";
318
318
  access_changed: "access_changed";
319
319
  }>;
320
- }, z.core.$strict>;
321
- export declare const publicationStatus: z.ZodUnion<readonly [z.ZodObject<{
320
+ }, z.core.$strict>>;
321
+ export declare const publicationStatus: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.ZodObject<{
322
322
  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<{
323
+ 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>>>;
324
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
325
325
  kind: z.ZodLiteral<"published">;
326
326
  commit: z.ZodString;
327
327
  version: z.ZodNumber;
328
- }, z.core.$strict>, z.ZodObject<{
328
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
329
329
  kind: z.ZodLiteral<"failed">;
330
330
  reason: z.ZodEnum<{
331
331
  too_large: "too_large";
@@ -333,22 +333,22 @@ export declare const publicationStatus: z.ZodUnion<readonly [z.ZodObject<{
333
333
  publication_failed: "publication_failed";
334
334
  access_changed: "access_changed";
335
335
  }>;
336
- }, z.core.$strict>, z.ZodObject<{
336
+ }, z.core.$strict>>, z.ZodObject<{
337
337
  kind: z.ZodLiteral<"not_found">;
338
- }, z.core.$strict>]>;
339
- export declare const publicationElsewhere: z.ZodObject<{
338
+ }, z.core.$strict>]>>;
339
+ export declare const publicationElsewhere: z.ZodLazy<z.ZodObject<{
340
340
  kind: z.ZodLiteral<"publishing_elsewhere">;
341
- }, z.core.$strict>;
342
- export declare const publishReply: z.ZodUnion<readonly [z.ZodObject<{
341
+ }, z.core.$strict>>;
342
+ export declare const publishReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.ZodObject<{
343
343
  kind: z.ZodLiteral<"publishing_elsewhere">;
344
- }, z.core.$strict>, z.ZodObject<{
344
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
345
345
  kind: z.ZodLiteral<"published">;
346
346
  commit: z.ZodString;
347
347
  version: z.ZodNumber;
348
- }, z.core.$strict>, z.ZodObject<{
348
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
349
349
  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<{
350
+ 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>>>;
351
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
352
352
  kind: z.ZodLiteral<"failed">;
353
353
  reason: z.ZodEnum<{
354
354
  too_large: "too_large";
@@ -356,12 +356,12 @@ export declare const publishReply: z.ZodUnion<readonly [z.ZodObject<{
356
356
  publication_failed: "publication_failed";
357
357
  access_changed: "access_changed";
358
358
  }>;
359
- }, z.core.$strict>, z.ZodObject<{
359
+ }, z.core.$strict>>, z.ZodObject<{
360
360
  kind: z.ZodLiteral<"conflict">;
361
361
  head: z.ZodNullable<z.ZodString>;
362
362
  }, z.core.$strict>, z.ZodObject<{
363
363
  kind: z.ZodLiteral<"invalid">;
364
- issues: z.ZodArray<z.ZodObject<{
364
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
365
365
  code: z.ZodString;
366
366
  message: z.ZodString;
367
367
  graph: z.ZodOptional<z.ZodString>;
@@ -369,8 +369,8 @@ export declare const publishReply: z.ZodUnion<readonly [z.ZodObject<{
369
369
  trigger: z.ZodOptional<z.ZodString>;
370
370
  port: z.ZodOptional<z.ZodString>;
371
371
  edge: z.ZodOptional<z.ZodNumber>;
372
- }, z.core.$strip>>;
373
- }, z.core.$strict>]>;
372
+ }, z.core.$strip>>>;
373
+ }, z.core.$strict>]>>;
374
374
  export declare const version: z.ZodObject<{
375
375
  version: z.ZodNumber;
376
376
  commit: z.ZodString;
@@ -380,7 +380,7 @@ export declare const version: z.ZodObject<{
380
380
  export declare const workflow: z.ZodObject<{
381
381
  workflowId: z.ZodString;
382
382
  }, z.core.$strict>;
383
- export declare const listings: z.ZodArray<z.ZodObject<{
383
+ export declare const listings: z.ZodLazy<z.ZodArray<z.ZodObject<{
384
384
  workflowId: z.ZodString;
385
385
  title: z.ZodString;
386
386
  draftRevision: z.ZodNullable<z.ZodNumber>;
@@ -388,19 +388,19 @@ export declare const listings: z.ZodArray<z.ZodObject<{
388
388
  commit: z.ZodString;
389
389
  version: z.ZodNullable<z.ZodNumber>;
390
390
  }, z.core.$strict>>;
391
- }, z.core.$strict>>;
391
+ }, z.core.$strict>>>;
392
392
  export declare const history: z.ZodArray<z.ZodObject<{
393
393
  message: z.ZodString;
394
394
  commit: z.ZodString;
395
395
  committedAt: z.ZodNumber;
396
396
  }, z.core.$strict>>;
397
397
  /** A missing index is not an empty Git repository; only write paths reconstruct it. */
398
- export declare const libraryPageInput: z.ZodObject<{
398
+ export declare const libraryPageInput: z.ZodLazy<z.ZodObject<{
399
399
  limit: z.ZodDefault<z.ZodNumber>;
400
400
  after: z.ZodOptional<z.ZodString>;
401
- }, z.core.$strict>;
402
- export declare const libraryPage: z.ZodObject<{
403
- items: z.ZodArray<z.ZodObject<{
401
+ }, z.core.$strict>>;
402
+ export declare const libraryPage: z.ZodLazy<z.ZodObject<{
403
+ items: z.ZodLazy<z.ZodArray<z.ZodObject<{
404
404
  workflowId: z.ZodString;
405
405
  title: z.ZodString;
406
406
  draftRevision: z.ZodNullable<z.ZodNumber>;
@@ -408,11 +408,11 @@ export declare const libraryPage: z.ZodObject<{
408
408
  commit: z.ZodString;
409
409
  version: z.ZodNullable<z.ZodNumber>;
410
410
  }, z.core.$strict>>;
411
- }, z.core.$strict>>;
411
+ }, z.core.$strict>>>;
412
412
  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<{
413
+ }, z.core.$strict>>;
414
+ export declare const libraryListing: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.ZodObject<{
415
+ items: z.ZodLazy<z.ZodArray<z.ZodObject<{
416
416
  workflowId: z.ZodString;
417
417
  title: z.ZodString;
418
418
  draftRevision: z.ZodNullable<z.ZodNumber>;
@@ -420,17 +420,17 @@ export declare const libraryListing: z.ZodUnion<readonly [z.ZodObject<{
420
420
  commit: z.ZodString;
421
421
  version: z.ZodNullable<z.ZodNumber>;
422
422
  }, z.core.$strict>>;
423
- }, z.core.$strict>>;
423
+ }, z.core.$strict>>>;
424
424
  next: z.ZodOptional<z.ZodString>;
425
- }, z.core.$strict>, z.ZodObject<{
425
+ }, z.core.$strict>>, z.ZodObject<{
426
426
  kind: z.ZodLiteral<"unindexed">;
427
- }, z.core.$strict>]>;
427
+ }, z.core.$strict>]>>;
428
428
  /** A missing screen copy needs an explicit foreground rebuild, never a hidden Git read. */
429
- export declare const rebuilding: z.ZodObject<{
429
+ export declare const rebuilding: z.ZodLazy<z.ZodObject<{
430
430
  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<{
431
+ }, z.core.$strict>>;
432
+ export declare const documentRead: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
433
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
434
434
  kind: z.ZodLiteral<"import">;
435
435
  workflowId: z.ZodString;
436
436
  version: z.ZodNumber;
@@ -445,7 +445,7 @@ export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
445
445
  kind: z.ZodLiteral<"fork">;
446
446
  workflowId: z.ZodString;
447
447
  commit: z.ZodString;
448
- }, z.core.$strict>]>>;
448
+ }, z.core.$strict>]>>>;
449
449
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
450
450
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
451
451
  x: z.ZodNumber;
@@ -453,7 +453,7 @@ export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
453
453
  }, z.core.$strict>>;
454
454
  revision: z.ZodNumber;
455
455
  }, z.core.$strict>, z.ZodObject<{
456
- provenance: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
456
+ provenance: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
457
457
  kind: z.ZodLiteral<"import">;
458
458
  workflowId: z.ZodString;
459
459
  version: z.ZodNumber;
@@ -468,25 +468,25 @@ export declare const documentRead: z.ZodUnion<readonly [z.ZodObject<{
468
468
  kind: z.ZodLiteral<"fork">;
469
469
  workflowId: z.ZodString;
470
470
  commit: z.ZodString;
471
- }, z.core.$strict>]>>;
471
+ }, z.core.$strict>]>>>;
472
472
  definition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
473
473
  layout: z.ZodRecord<z.ZodString, z.ZodObject<{
474
474
  x: z.ZodNumber;
475
475
  y: z.ZodNumber;
476
476
  }, z.core.$strict>>;
477
477
  commit: z.ZodString;
478
- }, z.core.$strict>, z.ZodNull, z.ZodObject<{
478
+ }, z.core.$strict>, z.ZodNull, z.ZodLazy<z.ZodObject<{
479
479
  kind: z.ZodLiteral<"rebuilding">;
480
- }, z.core.$strict>]>;
481
- export declare const versionsRead: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
480
+ }, z.core.$strict>>]>>;
481
+ export declare const versionsRead: z.ZodLazy<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
482
482
  version: z.ZodNumber;
483
483
  commit: z.ZodString;
484
484
  committedAt: z.ZodNumber;
485
485
  message: z.ZodString;
486
- }, z.core.$strict>>, z.ZodObject<{
486
+ }, z.core.$strict>>, z.ZodLazy<z.ZodObject<{
487
487
  kind: z.ZodLiteral<"rebuilding">;
488
- }, z.core.$strict>]>;
489
- export declare const rebuildCopiesInput: z.ZodObject<{
488
+ }, z.core.$strict>>]>>;
489
+ export declare const rebuildCopiesInput: z.ZodLazy<z.ZodObject<{
490
490
  cursor: z.ZodNullable<z.ZodString>;
491
491
  target: z.ZodOptional<z.ZodObject<{
492
492
  workflowId: z.ZodString;
@@ -494,8 +494,8 @@ export declare const rebuildCopiesInput: z.ZodObject<{
494
494
  commit: z.ZodString;
495
495
  }, z.core.$strict>;
496
496
  }, z.core.$strict>>;
497
- }, z.core.$strict>;
498
- export declare const rebuildCopiesReply: z.ZodObject<{
497
+ }, z.core.$strict>>;
498
+ export declare const rebuildCopiesReply: z.ZodLazy<z.ZodObject<{
499
499
  done: z.ZodBoolean;
500
500
  cursor: z.ZodNullable<z.ZodString>;
501
- }, z.core.$strict>;
501
+ }, z.core.$strict>>;
@@ -6,7 +6,7 @@ import { sha256DigestSchema } from "@fungi.computer/puffball/effect";
6
6
  import { gitAccessSchema, bindingsSelectionSchema, } from "@fungi.computer/braid/git-access";
7
7
  import { gitSha1Schema } from "@fungi.computer/puffball/git-representation";
8
8
  import { workflowIdSchema, workflowIssueSchema as issueSchema, } from "./outcomes.js";
9
- export const provenanceSchema = z.union([
9
+ export const provenanceSchema = z.lazy(() => z.union([
10
10
  z.strictObject({
11
11
  kind: z.literal("import"),
12
12
  workflowId: workflowIdSchema,
@@ -20,7 +20,7 @@ export const provenanceSchema = z.union([
20
20
  workflowId: workflowIdSchema,
21
21
  commit: gitSha1Schema,
22
22
  }),
23
- ]);
23
+ ]));
24
24
  const identity = z.string().min(1).max(256);
25
25
  export const runBase = z.strictObject({
26
26
  requestId: identity,
@@ -29,10 +29,10 @@ export const runBase = z.strictObject({
29
29
  input: z.record(z.string(), z.json()),
30
30
  delivery: runDeliverySchema.optional(),
31
31
  });
32
- export const publishedRun = z.union([
32
+ export const publishedRun = z.lazy(() => z.union([
33
33
  runBase.extend({ version: z.number().int().positive() }),
34
34
  runBase.extend({ commit: gitSha1Schema }),
35
- ]);
35
+ ]));
36
36
  export const document = z.strictObject({
37
37
  provenance: provenanceSchema.optional(),
38
38
  definition: z.record(z.string(), z.json()),
@@ -76,7 +76,7 @@ export const shareReview = z.strictObject({
76
76
  // Definition decoding owns trigger grammar; this reply transports configuration only.
77
77
  triggers: z.array(z.json()),
78
78
  });
79
- export const shareCopyReply = z.union([
79
+ export const shareCopyReply = z.lazy(() => z.union([
80
80
  z.strictObject({
81
81
  kind: z.literal("saved"),
82
82
  revision: revisionSchema,
@@ -97,53 +97,53 @@ export const shareCopyReply = z.union([
97
97
  "not_found",
98
98
  ]),
99
99
  }),
100
- ]);
101
- export const shareExportReply = z.union([
100
+ ]));
101
+ export const shareExportReply = z.lazy(() => z.union([
102
102
  z.strictObject({
103
103
  bytes: z.string(),
104
104
  sha256: z.string().refine(S.is(sha256DigestSchema)),
105
105
  }),
106
106
  z.strictObject({ kind: z.enum(["not_found", "too_large"]) }),
107
- ]);
107
+ ]));
108
108
  export const publicationIds = defineIdFamily({
109
109
  family: "workflow-publication",
110
110
  version: 1,
111
111
  kinds: { publication: { prefix: "publication" } },
112
112
  });
113
- export const publicationIdSchema = z
113
+ export const publicationIdSchema = z.lazy(() => z
114
114
  .string()
115
115
  .min(1)
116
116
  .max(256)
117
- .refine((value) => publicationIds.publication.is(value));
117
+ .refine((value) => publicationIds.publication.is(value)));
118
118
  export const publicationFailure = z.enum([
119
119
  "git_conflict",
120
120
  "publication_failed",
121
121
  "too_large",
122
122
  "access_changed",
123
123
  ]);
124
- export const publicationComplete = z.strictObject({
124
+ export const publicationComplete = z.lazy(() => z.strictObject({
125
125
  kind: z.literal("published"),
126
126
  commit: gitSha1Schema,
127
127
  version: z.number().int().positive(),
128
- });
129
- export const publicationPending = z.strictObject({
128
+ }));
129
+ export const publicationPending = z.lazy(() => z.strictObject({
130
130
  kind: z.literal("publishing"),
131
131
  publicationId: publicationIdSchema,
132
- });
133
- export const publicationFailed = z.strictObject({
132
+ }));
133
+ export const publicationFailed = z.lazy(() => z.strictObject({
134
134
  kind: z.literal("failed"),
135
135
  reason: publicationFailure,
136
- });
137
- export const publicationStatus = z.union([
136
+ }));
137
+ export const publicationStatus = z.lazy(() => z.union([
138
138
  publicationPending,
139
139
  publicationComplete,
140
140
  publicationFailed,
141
141
  z.strictObject({ kind: z.literal("not_found") }),
142
- ]);
143
- export const publicationElsewhere = z.strictObject({
142
+ ]));
143
+ export const publicationElsewhere = z.lazy(() => z.strictObject({
144
144
  kind: z.literal("publishing_elsewhere"),
145
- });
146
- export const publishReply = z.union([
145
+ }));
146
+ export const publishReply = z.lazy(() => z.union([
147
147
  publicationElsewhere,
148
148
  publicationComplete,
149
149
  publicationPending,
@@ -153,7 +153,7 @@ export const publishReply = z.union([
153
153
  head: gitSha1Schema.nullable(),
154
154
  }),
155
155
  invalid,
156
- ]);
156
+ ]));
157
157
  export const version = z.strictObject({
158
158
  version: z.number().int().positive(),
159
159
  commit: gitSha1Schema,
@@ -161,7 +161,7 @@ export const version = z.strictObject({
161
161
  message: z.string(),
162
162
  });
163
163
  export const workflow = z.strictObject({ workflowId: workflowIdSchema });
164
- export const listings = z
164
+ export const listings = z.lazy(() => z
165
165
  .array(z.strictObject({
166
166
  workflowId: workflowIdSchema,
167
167
  title: z.string(),
@@ -173,39 +173,31 @@ export const listings = z
173
173
  })
174
174
  .nullable(),
175
175
  }))
176
- .max(100);
176
+ .max(100));
177
177
  export const history = z.array(version.omit({ version: true })).max(50);
178
178
  /** A missing index is not an empty Git repository; only write paths reconstruct it. */
179
- export const libraryPageInput = z.strictObject({
179
+ export const libraryPageInput = z.lazy(() => z.strictObject({
180
180
  limit: z.number().int().min(1).max(100).default(100),
181
181
  after: workflowIdSchema.optional(),
182
- });
183
- export const libraryPage = z.strictObject({
182
+ }));
183
+ export const libraryPage = z.lazy(() => z.strictObject({
184
184
  items: listings,
185
185
  next: workflowIdSchema.optional(),
186
- });
187
- export const libraryListing = z.union([
188
- libraryPage,
189
- z.strictObject({ kind: z.literal("unindexed") }),
190
- ]);
186
+ }));
187
+ export const libraryListing = z.lazy(() => z.union([libraryPage, z.strictObject({ kind: z.literal("unindexed") })]));
191
188
  /** A missing screen copy needs an explicit foreground rebuild, never a hidden Git read. */
192
- export const rebuilding = z.strictObject({ kind: z.literal("rebuilding") });
193
- export const documentRead = z.union([
194
- draftDocument,
195
- document,
196
- z.null(),
197
- rebuilding,
198
- ]);
199
- export const versionsRead = z.union([z.array(version), rebuilding]);
200
- export const rebuildCopiesInput = z.strictObject({
189
+ export const rebuilding = z.lazy(() => z.strictObject({ kind: z.literal("rebuilding") }));
190
+ export const documentRead = z.lazy(() => z.union([draftDocument, document, z.null(), rebuilding]));
191
+ export const versionsRead = z.lazy(() => z.union([z.array(version), rebuilding]));
192
+ export const rebuildCopiesInput = z.lazy(() => z.strictObject({
201
193
  cursor: z.string().max(1024).nullable(),
202
194
  target: workflow
203
195
  .extend({
204
196
  at: z.strictObject({ commit: gitSha1Schema }),
205
197
  })
206
198
  .optional(),
207
- });
208
- export const rebuildCopiesReply = z.strictObject({
199
+ }));
200
+ export const rebuildCopiesReply = z.lazy(() => z.strictObject({
209
201
  done: z.boolean(),
210
202
  cursor: z.string().max(1024).nullable(),
211
- });
203
+ }));
@@ -1,12 +1,12 @@
1
1
  import * as z from "zod";
2
2
  export declare const workflowIdSchema: z.ZodString;
3
- export declare const catalogInputSchema: z.ZodObject<{
3
+ export declare const catalogInputSchema: z.ZodLazy<z.ZodObject<{
4
4
  installationId: z.ZodOptional<z.ZodString>;
5
- }, z.core.$strict>;
5
+ }, z.core.$strict>>;
6
6
  /** App method declarations admitted by the host for the current invocation. */
7
- export declare const catalogReplySchema: z.ZodUnion<readonly [z.ZodObject<{
8
- apps: z.ZodArray<z.ZodObject<{
9
- methods: z.ZodRecord<z.ZodString, z.ZodObject<{
7
+ export declare const catalogReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
8
+ apps: z.ZodArray<z.ZodLazy<z.ZodObject<{
9
+ methods: z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodObject<{
10
10
  pending: z.ZodOptional<z.ZodLiteral<true>>;
11
11
  description: z.ZodString;
12
12
  effect: z.ZodEnum<{
@@ -21,11 +21,11 @@ export declare const catalogReplySchema: z.ZodUnion<readonly [z.ZodObject<{
21
21
  }>;
22
22
  requires: z.ZodArray<z.ZodString>;
23
23
  digest: z.ZodString;
24
- }, z.core.$strict>>;
25
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
24
+ }, z.core.$strict>>>;
25
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodObject<{
26
26
  description: z.ZodString;
27
27
  digest: z.ZodString;
28
- }, z.core.$strict>>>;
28
+ }, z.core.$strict>>>>;
29
29
  installationId: z.ZodString;
30
30
  appId: z.ZodString;
31
31
  displayName: z.ZodString;
@@ -34,6 +34,7 @@ export declare const catalogReplySchema: z.ZodUnion<readonly [z.ZodObject<{
34
34
  "agent.list": "agent.list";
35
35
  "agent.manage": "agent.manage";
36
36
  "agent.rename": "agent.rename";
37
+ "agent.avatar": "agent.avatar";
37
38
  "agent.toolPolicy": "agent.toolPolicy";
38
39
  "agent.read": "agent.read";
39
40
  "agent.send": "agent.send";
@@ -61,9 +62,9 @@ export declare const catalogReplySchema: z.ZodUnion<readonly [z.ZodObject<{
61
62
  }>>>;
62
63
  workflowPublishGranted: z.ZodOptional<z.ZodBoolean>;
63
64
  workflowRunGranted: z.ZodOptional<z.ZodBoolean>;
64
- }, z.core.$strict>>;
65
+ }, z.core.$strict>>>;
65
66
  }, z.core.$strict>, z.ZodObject<{
66
- app: z.ZodObject<{
67
+ app: z.ZodLazy<z.ZodObject<{
67
68
  methods: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
68
69
  events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
69
70
  installationId: z.ZodString;
@@ -74,6 +75,7 @@ export declare const catalogReplySchema: z.ZodUnion<readonly [z.ZodObject<{
74
75
  "agent.list": "agent.list";
75
76
  "agent.manage": "agent.manage";
76
77
  "agent.rename": "agent.rename";
78
+ "agent.avatar": "agent.avatar";
77
79
  "agent.toolPolicy": "agent.toolPolicy";
78
80
  "agent.read": "agent.read";
79
81
  "agent.send": "agent.send";
@@ -101,11 +103,11 @@ export declare const catalogReplySchema: z.ZodUnion<readonly [z.ZodObject<{
101
103
  }>>>;
102
104
  workflowPublishGranted: z.ZodOptional<z.ZodBoolean>;
103
105
  workflowRunGranted: z.ZodOptional<z.ZodBoolean>;
104
- }, z.core.$strict>;
106
+ }, z.core.$strict>>;
105
107
  }, z.core.$strict>, z.ZodObject<{
106
108
  error: z.ZodString;
107
- }, z.core.$strict>]>;
108
- export declare const workflowIssueSchema: z.ZodObject<{
109
+ }, z.core.$strict>]>>;
110
+ export declare const workflowIssueSchema: z.ZodLazy<z.ZodObject<{
109
111
  code: z.ZodString;
110
112
  message: z.ZodString;
111
113
  graph: z.ZodOptional<z.ZodString>;
@@ -113,8 +115,8 @@ export declare const workflowIssueSchema: z.ZodObject<{
113
115
  trigger: z.ZodOptional<z.ZodString>;
114
116
  port: z.ZodOptional<z.ZodString>;
115
117
  edge: z.ZodOptional<z.ZodNumber>;
116
- }, z.core.$strip>;
117
- export declare const runReply: z.ZodUnion<readonly [z.ZodObject<{
118
+ }, z.core.$strip>>;
119
+ export declare const runReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
118
120
  kind: z.ZodEnum<{
119
121
  started: "started";
120
122
  replay: "replay";
@@ -124,7 +126,7 @@ export declare const runReply: z.ZodUnion<readonly [z.ZodObject<{
124
126
  planDigest: z.ZodString;
125
127
  }, z.core.$strict>, z.ZodObject<{
126
128
  kind: z.ZodLiteral<"invalid">;
127
- issues: z.ZodArray<z.ZodObject<{
129
+ issues: z.ZodArray<z.ZodLazy<z.ZodObject<{
128
130
  code: z.ZodString;
129
131
  message: z.ZodString;
130
132
  graph: z.ZodOptional<z.ZodString>;
@@ -132,11 +134,11 @@ export declare const runReply: z.ZodUnion<readonly [z.ZodObject<{
132
134
  trigger: z.ZodOptional<z.ZodString>;
133
135
  port: z.ZodOptional<z.ZodString>;
134
136
  edge: z.ZodOptional<z.ZodNumber>;
135
- }, z.core.$strip>>;
137
+ }, z.core.$strip>>>;
136
138
  }, z.core.$strict>, z.ZodObject<{
137
139
  error: z.ZodString;
138
- }, z.core.$strict>]>;
139
- export declare const cancelReplySchema: z.ZodUnion<readonly [z.ZodObject<{
140
+ }, z.core.$strict>]>>;
141
+ export declare const cancelReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
140
142
  kind: z.ZodEnum<{
141
143
  cancelled: "cancelled";
142
144
  terminal: "terminal";
@@ -146,13 +148,13 @@ export declare const cancelReplySchema: z.ZodUnion<readonly [z.ZodObject<{
146
148
  reason: z.ZodLiteral<"denied">;
147
149
  }, z.core.$strict>, z.ZodObject<{
148
150
  error: z.ZodString;
149
- }, z.core.$strict>]>;
151
+ }, z.core.$strict>]>>;
150
152
  export declare const runOutcomeSchema: z.ZodEnum<{
151
153
  cancelled: "cancelled";
152
154
  terminal: "terminal";
153
155
  active: "active";
154
156
  }>;
155
- export declare const statusReply: z.ZodUnion<readonly [z.ZodObject<{
157
+ export declare const statusReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
156
158
  runId: z.ZodString;
157
159
  planDigest: z.ZodString;
158
160
  outcome: z.ZodEnum<{
@@ -168,8 +170,8 @@ export declare const statusReply: z.ZodUnion<readonly [z.ZodObject<{
168
170
  error: z.ZodJSONSchema;
169
171
  }, z.core.$strict>, z.ZodObject<{
170
172
  error: z.ZodString;
171
- }, z.core.$strict>]>;
172
- export declare const answerReviewReply: z.ZodUnion<readonly [z.ZodObject<{
173
+ }, z.core.$strict>]>>;
174
+ export declare const answerReviewReply: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
173
175
  result: z.ZodEnum<{
174
176
  invalid: "invalid";
175
177
  denied: "denied";
@@ -178,8 +180,8 @@ export declare const answerReviewReply: z.ZodUnion<readonly [z.ZodObject<{
178
180
  }>;
179
181
  }, z.core.$strict>, z.ZodObject<{
180
182
  error: z.ZodString;
181
- }, z.core.$strict>]>;
182
- export declare const scheduleArmReplySchema: z.ZodUnion<readonly [z.ZodObject<{
183
+ }, z.core.$strict>]>>;
184
+ export declare const scheduleArmReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
183
185
  kind: z.ZodLiteral<"armed">;
184
186
  scheduleId: z.ZodString;
185
187
  }, z.core.$strict>, z.ZodObject<{
@@ -188,16 +190,16 @@ export declare const scheduleArmReplySchema: z.ZodUnion<readonly [z.ZodObject<{
188
190
  issues: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>;
189
191
  }, z.core.$strict>, z.ZodObject<{
190
192
  error: z.ZodString;
191
- }, z.core.$strict>]>;
192
- export declare const triggerDisarmReplySchema: z.ZodUnion<readonly [z.ZodObject<{
193
+ }, z.core.$strict>]>>;
194
+ export declare const triggerDisarmReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
193
195
  kind: z.ZodEnum<{
194
196
  disarmed: "disarmed";
195
197
  not_found: "not_found";
196
198
  }>;
197
199
  }, z.core.$strict>, z.ZodObject<{
198
200
  error: z.ZodString;
199
- }, z.core.$strict>]>;
200
- export declare const schedulesReplySchema: z.ZodUnion<readonly [z.ZodObject<{
201
+ }, z.core.$strict>]>>;
202
+ export declare const schedulesReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
201
203
  schedules: z.ZodArray<z.ZodObject<{
202
204
  scheduleId: z.ZodString;
203
205
  workflowId: z.ZodString;
@@ -213,7 +215,7 @@ export declare const schedulesReplySchema: z.ZodUnion<readonly [z.ZodObject<{
213
215
  }, z.core.$strict>>;
214
216
  }, z.core.$strict>, z.ZodObject<{
215
217
  error: z.ZodString;
216
- }, z.core.$strict>]>;
218
+ }, z.core.$strict>]>>;
217
219
  export declare const workflowRunSourceSchema: z.ZodEnum<{
218
220
  manual: "manual";
219
221
  schedule: "schedule";
@@ -222,7 +224,7 @@ export declare const workflowRunSourceSchema: z.ZodEnum<{
222
224
  key: "key";
223
225
  }>;
224
226
  /** The Agent Session (`sessionId`) stays host-side; the wire names only the Agent/key and its grantor. */
225
- export declare const workflowRunInitiatedBySchema: z.ZodUnion<readonly [z.ZodObject<{
227
+ export declare const workflowRunInitiatedBySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
226
228
  kind: z.ZodLiteral<"member">;
227
229
  memberId: z.ZodString;
228
230
  }, z.core.$strict>, z.ZodObject<{
@@ -233,8 +235,8 @@ export declare const workflowRunInitiatedBySchema: z.ZodUnion<readonly [z.ZodObj
233
235
  kind: z.ZodLiteral<"key">;
234
236
  keyId: z.ZodString;
235
237
  grantorMemberId: z.ZodString;
236
- }, z.core.$strict>]>;
237
- export declare const runsReplySchema: z.ZodUnion<readonly [z.ZodObject<{
238
+ }, z.core.$strict>]>>;
239
+ export declare const runsReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
238
240
  runs: z.ZodArray<z.ZodObject<{
239
241
  runId: z.ZodString;
240
242
  workflowId: z.ZodString;
@@ -247,7 +249,7 @@ export declare const runsReplySchema: z.ZodUnion<readonly [z.ZodObject<{
247
249
  key: "key";
248
250
  }>;
249
251
  triggerId: z.ZodOptional<z.ZodString>;
250
- initiatedBy: z.ZodUnion<readonly [z.ZodObject<{
252
+ initiatedBy: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
251
253
  kind: z.ZodLiteral<"member">;
252
254
  memberId: z.ZodString;
253
255
  }, z.core.$strict>, z.ZodObject<{
@@ -258,13 +260,13 @@ export declare const runsReplySchema: z.ZodUnion<readonly [z.ZodObject<{
258
260
  kind: z.ZodLiteral<"key">;
259
261
  keyId: z.ZodString;
260
262
  grantorMemberId: z.ZodString;
261
- }, z.core.$strict>]>;
263
+ }, z.core.$strict>]>>;
262
264
  startedAt: z.ZodNumber;
263
265
  }, z.core.$strict>>;
264
266
  }, z.core.$strict>, z.ZodObject<{
265
267
  error: z.ZodString;
266
- }, z.core.$strict>]>;
267
- export declare const eventArmReplySchema: z.ZodUnion<readonly [z.ZodObject<{
268
+ }, z.core.$strict>]>>;
269
+ export declare const eventArmReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
268
270
  kind: z.ZodLiteral<"armed">;
269
271
  eventTriggerId: z.ZodString;
270
272
  }, z.core.$strict>, z.ZodObject<{
@@ -273,8 +275,8 @@ export declare const eventArmReplySchema: z.ZodUnion<readonly [z.ZodObject<{
273
275
  issues: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>;
274
276
  }, z.core.$strict>, z.ZodObject<{
275
277
  error: z.ZodString;
276
- }, z.core.$strict>]>;
277
- export declare const eventTriggersReplySchema: z.ZodUnion<readonly [z.ZodObject<{
278
+ }, z.core.$strict>]>>;
279
+ export declare const eventTriggersReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
278
280
  eventTriggers: z.ZodArray<z.ZodObject<{
279
281
  eventTriggerId: z.ZodString;
280
282
  workflowId: z.ZodString;
@@ -289,4 +291,4 @@ export declare const eventTriggersReplySchema: z.ZodUnion<readonly [z.ZodObject<
289
291
  }, z.core.$strict>>;
290
292
  }, z.core.$strict>, z.ZodObject<{
291
293
  error: z.ZodString;
292
- }, z.core.$strict>]>;
294
+ }, z.core.$strict>]>>;
package/dist/outcomes.js CHANGED
@@ -4,18 +4,18 @@ export const workflowIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/);
4
4
  const identity = z.string().min(1).max(256);
5
5
  const refusal = z.strictObject({ error: identity });
6
6
  /** What the palette shows before a method's ports are ever fetched. */
7
- const methodSummarySchema = z.strictObject({
7
+ const methodSummarySchema = z.lazy(() => z.strictObject({
8
8
  pending: z.literal(true).optional(),
9
9
  description: z.string().max(1000),
10
10
  effect: z.enum(["read", "write", "external"]),
11
11
  approval: z.enum(["none", "queue", "simulate"]),
12
12
  requires: z.array(z.string().max(80)).max(64),
13
13
  digest: z.string().max(128),
14
- });
15
- const eventSummarySchema = z.strictObject({
14
+ }));
15
+ const eventSummarySchema = z.lazy(() => z.strictObject({
16
16
  description: z.string().max(1000),
17
17
  digest: z.string().max(128),
18
- });
18
+ }));
19
19
  const entryIdentity = {
20
20
  installationId: identity,
21
21
  appId: identity,
@@ -26,27 +26,27 @@ const entryIdentity = {
26
26
  workflowRunGranted: z.boolean().optional(),
27
27
  };
28
28
  /** `catalog({})`: a palette index over every installation, with no port schemas. */
29
- const catalogIndexEntrySchema = z.strictObject({
29
+ const catalogIndexEntrySchema = z.lazy(() => z.strictObject({
30
30
  ...entryIdentity,
31
31
  methods: z.record(z.string(), methodSummarySchema),
32
32
  events: z.record(z.string(), eventSummarySchema).optional(),
33
- });
33
+ }));
34
34
  /** `catalog({installationId})`: that one installation's full declared ports. */
35
- const catalogFullEntrySchema = z.strictObject({
35
+ const catalogFullEntrySchema = z.lazy(() => z.strictObject({
36
36
  ...entryIdentity,
37
37
  methods: z.record(z.string(), z.json()),
38
38
  events: z.record(z.string(), z.json()).optional(),
39
- });
40
- export const catalogInputSchema = z.strictObject({
39
+ }));
40
+ export const catalogInputSchema = z.lazy(() => z.strictObject({
41
41
  installationId: identity.optional(),
42
- });
42
+ }));
43
43
  /** App method declarations admitted by the host for the current invocation. */
44
- export const catalogReplySchema = z.union([
44
+ export const catalogReplySchema = z.lazy(() => z.union([
45
45
  z.strictObject({ apps: z.array(catalogIndexEntrySchema).max(200) }),
46
46
  z.strictObject({ app: catalogFullEntrySchema }),
47
47
  refusal,
48
- ]);
49
- export const workflowIssueSchema = z.object({
48
+ ]));
49
+ export const workflowIssueSchema = z.lazy(() => z.object({
50
50
  code: z.string(),
51
51
  message: z.string(),
52
52
  graph: z.string().optional(),
@@ -54,8 +54,8 @@ export const workflowIssueSchema = z.object({
54
54
  trigger: z.string().optional(),
55
55
  port: z.string().optional(),
56
56
  edge: z.number().optional(),
57
- });
58
- export const runReply = z.union([
57
+ }));
58
+ export const runReply = z.lazy(() => z.union([
59
59
  z.strictObject({
60
60
  kind: z.enum(["started", "replay", "conflict"]),
61
61
  runId: identity,
@@ -66,14 +66,14 @@ export const runReply = z.union([
66
66
  issues: z.array(workflowIssueSchema),
67
67
  }),
68
68
  z.strictObject({ error: identity }),
69
- ]);
70
- export const cancelReplySchema = z.union([
69
+ ]));
70
+ export const cancelReplySchema = z.lazy(() => z.union([
71
71
  z.strictObject({ kind: z.enum(["cancelled", "terminal"]) }),
72
72
  z.strictObject({ kind: z.literal("refused"), reason: z.literal("denied") }),
73
73
  z.strictObject({ error: z.string() }),
74
- ]);
74
+ ]));
75
75
  export const runOutcomeSchema = z.enum(["active", "terminal", "cancelled"]);
76
- export const statusReply = z.union([
76
+ export const statusReply = z.lazy(() => z.union([
77
77
  z.strictObject({
78
78
  runId: identity,
79
79
  planDigest: identity,
@@ -86,16 +86,16 @@ export const statusReply = z.union([
86
86
  error: z.json(),
87
87
  }),
88
88
  refusal,
89
- ]);
90
- export const answerReviewReply = z.union([
89
+ ]));
90
+ export const answerReviewReply = z.lazy(() => z.union([
91
91
  z.strictObject({
92
92
  result: z.enum(["accepted", "denied", "not_waiting", "invalid"]),
93
93
  }),
94
94
  refusal,
95
- ]);
95
+ ]));
96
96
  const id = z.string().min(1).max(256);
97
97
  const denied = z.strictObject({ error: id });
98
- export const scheduleArmReplySchema = z.union([
98
+ export const scheduleArmReplySchema = z.lazy(() => z.union([
99
99
  z.strictObject({ kind: z.literal("armed"), scheduleId: id }),
100
100
  z.strictObject({
101
101
  kind: z.literal("refused"),
@@ -103,12 +103,12 @@ export const scheduleArmReplySchema = z.union([
103
103
  issues: z.array(z.json()).optional(),
104
104
  }),
105
105
  denied,
106
- ]);
107
- export const triggerDisarmReplySchema = z.union([
106
+ ]));
107
+ export const triggerDisarmReplySchema = z.lazy(() => z.union([
108
108
  z.strictObject({ kind: z.enum(["disarmed", "not_found"]) }),
109
109
  denied,
110
- ]);
111
- export const schedulesReplySchema = z.union([
110
+ ]));
111
+ export const schedulesReplySchema = z.lazy(() => z.union([
112
112
  z.strictObject({
113
113
  schedules: z.array(z.strictObject({
114
114
  scheduleId: id,
@@ -120,7 +120,7 @@ export const schedulesReplySchema = z.union([
120
120
  })),
121
121
  }),
122
122
  denied,
123
- ]);
123
+ ]));
124
124
  export const workflowRunSourceSchema = z.enum([
125
125
  "manual",
126
126
  "schedule",
@@ -129,7 +129,7 @@ export const workflowRunSourceSchema = z.enum([
129
129
  "key",
130
130
  ]);
131
131
  /** The Agent Session (`sessionId`) stays host-side; the wire names only the Agent/key and its grantor. */
132
- export const workflowRunInitiatedBySchema = z.union([
132
+ export const workflowRunInitiatedBySchema = z.lazy(() => z.union([
133
133
  z.strictObject({ kind: z.literal("member"), memberId: id }),
134
134
  z.strictObject({
135
135
  kind: z.literal("agent"),
@@ -141,8 +141,8 @@ export const workflowRunInitiatedBySchema = z.union([
141
141
  keyId: id,
142
142
  grantorMemberId: id,
143
143
  }),
144
- ]);
145
- export const runsReplySchema = z.union([
144
+ ]));
145
+ export const runsReplySchema = z.lazy(() => z.union([
146
146
  z.strictObject({
147
147
  runs: z
148
148
  .array(z.strictObject({
@@ -157,8 +157,8 @@ export const runsReplySchema = z.union([
157
157
  .max(50),
158
158
  }),
159
159
  denied,
160
- ]);
161
- export const eventArmReplySchema = z.union([
160
+ ]));
161
+ export const eventArmReplySchema = z.lazy(() => z.union([
162
162
  z.strictObject({ kind: z.literal("armed"), eventTriggerId: id }),
163
163
  z.strictObject({
164
164
  kind: z.literal("refused"),
@@ -166,8 +166,8 @@ export const eventArmReplySchema = z.union([
166
166
  issues: z.array(z.json()).optional(),
167
167
  }),
168
168
  denied,
169
- ]);
170
- export const eventTriggersReplySchema = z.union([
169
+ ]));
170
+ export const eventTriggersReplySchema = z.lazy(() => z.union([
171
171
  z.strictObject({
172
172
  eventTriggers: z.array(z.strictObject({
173
173
  eventTriggerId: id,
@@ -180,4 +180,4 @@ export const eventTriggersReplySchema = z.union([
180
180
  })),
181
181
  }),
182
182
  denied,
183
- ]);
183
+ ]));
@@ -1,13 +1,13 @@
1
1
  import * as z from "zod";
2
2
  /** The App's `WORKFLOWS.runs` read, scoped to one Workflow when given. */
3
- export declare const runsInputSchema: z.ZodObject<{
3
+ export declare const runsInputSchema: z.ZodLazy<z.ZodObject<{
4
4
  workflowId: z.ZodOptional<z.ZodString>;
5
- }, z.core.$strict>;
5
+ }, z.core.$strict>>;
6
6
  /**
7
7
  * One listed run, from the stored source of truth plus the App's own copy of
8
8
  * the published document at `commit`; display metadata never comes from Git.
9
9
  */
10
- export declare const runListItemSchema: z.ZodObject<{
10
+ export declare const runListItemSchema: z.ZodLazy<z.ZodObject<{
11
11
  runId: z.ZodString;
12
12
  workflowId: z.ZodString;
13
13
  commit: z.ZodString;
@@ -22,7 +22,7 @@ export declare const runListItemSchema: z.ZodObject<{
22
22
  key: "key";
23
23
  }>;
24
24
  triggerId: z.ZodOptional<z.ZodString>;
25
- initiatedBy: z.ZodUnion<readonly [z.ZodObject<{
25
+ initiatedBy: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
26
26
  kind: z.ZodLiteral<"member">;
27
27
  memberId: z.ZodString;
28
28
  }, z.core.$strict>, z.ZodObject<{
@@ -33,17 +33,17 @@ export declare const runListItemSchema: z.ZodObject<{
33
33
  kind: z.ZodLiteral<"key">;
34
34
  keyId: z.ZodString;
35
35
  grantorMemberId: z.ZodString;
36
- }, z.core.$strict>]>;
37
- }, z.core.$strict>;
36
+ }, z.core.$strict>]>>;
37
+ }, z.core.$strict>>;
38
38
  export type WorkflowRunListItem = z.output<typeof runListItemSchema>;
39
39
  /**
40
40
  * The calling member's own id, so the Runs UI can tell its own runs from a
41
41
  * teammate's (an owner now sees every run in the installation, not only
42
42
  * their own) without guessing identity from the list itself.
43
43
  */
44
- export declare const viewerReplySchema: z.ZodUnion<readonly [z.ZodObject<{
44
+ export declare const viewerReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
45
45
  memberId: z.ZodString;
46
46
  }, z.core.$strict>, z.ZodObject<{
47
47
  error: z.ZodString;
48
- }, z.core.$strict>]>;
48
+ }, z.core.$strict>]>>;
49
49
  export type ViewerReply = z.output<typeof viewerReplySchema>;
@@ -2,14 +2,14 @@ import * as z from "zod";
2
2
  import { workflowIdSchema } from "@fungi.computer/braid";
3
3
  import { workflowRunSourceSchema, workflowRunInitiatedBySchema, } from "./outcomes.js";
4
4
  /** The App's `WORKFLOWS.runs` read, scoped to one Workflow when given. */
5
- export const runsInputSchema = z.strictObject({
5
+ export const runsInputSchema = z.lazy(() => z.strictObject({
6
6
  workflowId: workflowIdSchema.optional(),
7
- });
7
+ }));
8
8
  /**
9
9
  * One listed run, from the stored source of truth plus the App's own copy of
10
10
  * the published document at `commit`; display metadata never comes from Git.
11
11
  */
12
- export const runListItemSchema = z.strictObject({
12
+ export const runListItemSchema = z.lazy(() => z.strictObject({
13
13
  runId: z.string(),
14
14
  workflowId: workflowIdSchema,
15
15
  commit: z.string(),
@@ -19,13 +19,13 @@ export const runListItemSchema = z.strictObject({
19
19
  source: workflowRunSourceSchema,
20
20
  triggerId: z.string().optional(),
21
21
  initiatedBy: workflowRunInitiatedBySchema,
22
- });
22
+ }));
23
23
  /**
24
24
  * The calling member's own id, so the Runs UI can tell its own runs from a
25
25
  * teammate's (an owner now sees every run in the installation, not only
26
26
  * their own) without guessing identity from the list itself.
27
27
  */
28
- export const viewerReplySchema = z.union([
28
+ export const viewerReplySchema = z.lazy(() => z.union([
29
29
  z.strictObject({ memberId: z.string() }),
30
30
  z.strictObject({ error: z.string() }),
31
- ]);
31
+ ]));
@@ -6,7 +6,7 @@ export declare const runDeliverySchema: z.ZodObject<{
6
6
  }, z.core.$strict>;
7
7
  export type RunDelivery = z.output<typeof runDeliverySchema>;
8
8
  /** One chat the member may choose for run reports: an existing Agent Session. */
9
- export declare const chatsReplySchema: z.ZodUnion<readonly [z.ZodObject<{
9
+ export declare const chatsReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
10
10
  chats: z.ZodArray<z.ZodObject<{
11
11
  agentId: z.ZodString;
12
12
  sessionId: z.ZodString;
@@ -14,20 +14,20 @@ export declare const chatsReplySchema: z.ZodUnion<readonly [z.ZodObject<{
14
14
  }, z.core.$strict>>;
15
15
  }, z.core.$strict>, z.ZodObject<{
16
16
  error: z.ZodLiteral<"not_granted">;
17
- }, z.core.$strict>]>;
17
+ }, z.core.$strict>]>>;
18
18
  /** The published trigger supplies cadence or event matching; the host supplies authority scope. */
19
- export declare const triggerTargetSchema: z.ZodObject<{
19
+ export declare const triggerTargetSchema: z.ZodLazy<z.ZodObject<{
20
20
  workflowId: z.ZodString;
21
21
  commit: z.ZodString;
22
22
  triggerId: z.ZodString;
23
- 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<{
24
24
  kind: z.ZodLiteral<"team-source">;
25
- }, z.core.$strict>]>>;
25
+ }, z.core.$strict>>]>>;
26
26
  delivery: z.ZodOptional<z.ZodObject<{
27
27
  agentId: z.ZodString;
28
28
  sessionId: z.ZodString;
29
29
  }, z.core.$strict>>;
30
- }, z.core.$strict>;
30
+ }, z.core.$strict>>;
31
31
  export declare const scheduleDisarmInputSchema: z.ZodObject<{
32
32
  scheduleId: z.ZodString;
33
33
  }, z.core.$strict>;
@@ -6,22 +6,22 @@ const id = z.string().min(1).max(256);
6
6
  /** The Agent Session (chat) that receives the ending of every run it covers. */
7
7
  export const runDeliverySchema = z.strictObject({ agentId: id, sessionId: id });
8
8
  /** One chat the member may choose for run reports: an existing Agent Session. */
9
- export const chatsReplySchema = z.union([
9
+ export const chatsReplySchema = z.lazy(() => z.union([
10
10
  z.strictObject({
11
11
  chats: z
12
12
  .array(runDeliverySchema.extend({ title: z.string().max(4_096) }))
13
13
  .max(200),
14
14
  }),
15
15
  z.strictObject({ error: z.literal("not_granted") }),
16
- ]);
16
+ ]));
17
17
  /** The published trigger supplies cadence or event matching; the host supplies authority scope. */
18
- export const triggerTargetSchema = z.strictObject({
18
+ export const triggerTargetSchema = z.lazy(() => z.strictObject({
19
19
  workflowId: workflowIdSchema,
20
20
  commit: gitSha1Schema,
21
21
  triggerId: z.string().min(1).max(80),
22
22
  bindings: bindingsSelectionSchema,
23
23
  delivery: runDeliverySchema.optional(),
24
- });
24
+ }));
25
25
  export const scheduleDisarmInputSchema = z.strictObject({ scheduleId: id });
26
26
  export const eventDisarmInputSchema = z.strictObject({ eventTriggerId: id });
27
27
  export const triggerListInputSchema = z.strictObject({});
@@ -60,6 +60,7 @@ export declare const workflowDraftSchema: S.Struct<{
60
60
  readonly id: S.String;
61
61
  readonly kind: S.Literal<"review">;
62
62
  readonly title: S.String;
63
+ readonly detail: S.optionalKey<S.String>;
63
64
  readonly show: S.$Array<S.Struct<{
64
65
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
65
66
  readonly port: S.String;
@@ -69,6 +70,7 @@ export declare const workflowDraftSchema: S.Struct<{
69
70
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
70
71
  readonly id: S.String;
71
72
  readonly label: S.String;
73
+ readonly description: S.optionalKey<S.String>;
72
74
  }>>>;
73
75
  }>, S.Struct<{
74
76
  readonly id: S.String;
@@ -179,6 +181,7 @@ export declare const workflowDraftSchema: S.Struct<{
179
181
  readonly id: S.String;
180
182
  readonly kind: S.Literal<"review">;
181
183
  readonly title: S.String;
184
+ readonly detail: S.optionalKey<S.String>;
182
185
  readonly show: S.$Array<S.Struct<{
183
186
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
184
187
  readonly port: S.String;
@@ -188,6 +191,7 @@ export declare const workflowDraftSchema: S.Struct<{
188
191
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
189
192
  readonly id: S.String;
190
193
  readonly label: S.String;
194
+ readonly description: S.optionalKey<S.String>;
191
195
  }>>>;
192
196
  }>, S.Struct<{
193
197
  readonly id: S.String;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/workflows-wire",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Workflow run ids and generic graph wire contract shared by Hub and the Trellis App",
@@ -12,12 +12,12 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@fungi.computer/braid": "0.0.1",
15
+ "@fungi.computer/braid": "0.1.0",
16
16
  "@fungi.computer/cairn": "0.0.1",
17
- "@fungi.computer/puffball": "0.0.2",
17
+ "@fungi.computer/puffball": "0.1.0",
18
18
  "effect": "4.0.2",
19
19
  "zod": "4.4.3",
20
- "@fungi.computer/agar": "0.1.0"
20
+ "@fungi.computer/agar": "0.2.0"
21
21
  },
22
22
  "license": "MIT",
23
23
  "repository": {