@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.
@@ -0,0 +1,2445 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ **@fungi.computer/workflows-wire**
4
+
5
+ ---
6
+
7
+ # @fungi.computer/workflows-wire
8
+
9
+ ## Type Aliases
10
+
11
+ ### WorkflowPublishedDefinitionContext
12
+
13
+ ```ts
14
+ type WorkflowPublishedDefinitionContext = Pick<
15
+ WorkflowPublicationContext,
16
+ "installationId" | "git"
17
+ >;
18
+ ```
19
+
20
+ The installation identity and Git access read from the Workflow publication
21
+ context.
22
+
23
+ ---
24
+
25
+ ### WorkflowPublishedReader
26
+
27
+ ```ts
28
+ type WorkflowPublishedReader = Readonly<{
29
+ published: Promise<Readonly<{
30
+ definition: WorkflowDefinition;
31
+ commit: string;
32
+ version: number | null;
33
+ }> | null>;
34
+ }>;
35
+ ```
36
+
37
+ How a host reads one published Workflow definition back out of Git. The Trellis
38
+ App owns the Git layout (drafts, versions, the copy index); this port only wraps
39
+ that read into the braid-shaped `PublishedDefinition`.
40
+
41
+ ---
42
+
43
+ ### WorkflowRunListItem
44
+
45
+ ```ts
46
+ type WorkflowRunListItem = z.output<typeof runListItemSchema>;
47
+ ```
48
+
49
+ Decoded run row with its pinned publication and display metadata.
50
+
51
+ ---
52
+
53
+ ### ViewerReply
54
+
55
+ ```ts
56
+ type ViewerReply = z.output<typeof viewerReplySchema>;
57
+ ```
58
+
59
+ Calling member identity, or a refusal returned by the viewer read.
60
+
61
+ ---
62
+
63
+ ### RunDelivery
64
+
65
+ ```ts
66
+ type RunDelivery = z.output<typeof runDeliverySchema>;
67
+ ```
68
+
69
+ Agent and Session selected to receive run endings.
70
+
71
+ ---
72
+
73
+ ### WorkflowTriggerTarget
74
+
75
+ ```ts
76
+ type WorkflowTriggerTarget = z.output<typeof triggerTargetSchema>;
77
+ ```
78
+
79
+ Published trigger, pinned commit, selected bindings and optional run delivery.
80
+
81
+ ---
82
+
83
+ ### WorkflowTriggerArmTarget
84
+
85
+ ```ts
86
+ type WorkflowTriggerArmTarget = WorkflowTriggerTarget &
87
+ Readonly<{
88
+ digest: string;
89
+ }>;
90
+ ```
91
+
92
+ Host binding input carries the App-owned immutable row digest, never caller
93
+ input.
94
+
95
+ ---
96
+
97
+ ### WorkflowDraft
98
+
99
+ ```ts
100
+ type WorkflowDraft = typeof workflowDraftSchema.Type;
101
+ ```
102
+
103
+ One Workflow file's decoded content.
104
+
105
+ ---
106
+
107
+ ### WorkflowDocument
108
+
109
+ ```ts
110
+ type WorkflowDocument = WorkflowDraft & object;
111
+ ```
112
+
113
+ A Workflow file's content at the commit it was read from.
114
+
115
+ #### Type Declaration
116
+
117
+ | Name | Type | Description |
118
+ | -------- | -------- | -------------------------------------------------- |
119
+ | `commit` | `string` | Exact Git commit from which the document was read. |
120
+
121
+ ---
122
+
123
+ ### WorkflowReadGit
124
+
125
+ ```ts
126
+ type WorkflowReadGit = Pick<GitBinding, "readCommit" | "readTree" | "readBlob">;
127
+ ```
128
+
129
+ Read-only Git operations needed to traverse and decode library files.
130
+
131
+ ## Variables
132
+
133
+ ### provenanceSchema
134
+
135
+ ```ts
136
+ const provenanceSchema: ZodLazy<
137
+ ZodUnion<
138
+ readonly [
139
+ ZodObject<
140
+ {
141
+ kind: ZodLiteral<"import">;
142
+ workflowId: ZodString;
143
+ version: ZodNumber;
144
+ commit: ZodString;
145
+ sha256: ZodString &
146
+ ZodType<
147
+ string & object,
148
+ string,
149
+ $ZodTypeInternals<string & object, string>
150
+ >;
151
+ origin: ZodOptional<ZodString>;
152
+ },
153
+ $strict
154
+ >,
155
+ ZodObject<
156
+ {
157
+ kind: ZodLiteral<"fork">;
158
+ workflowId: ZodString;
159
+ commit: ZodString;
160
+ },
161
+ $strict
162
+ >,
163
+ ]
164
+ >
165
+ >;
166
+ ```
167
+
168
+ Source Workflow and commit recorded when importing or forking a document.
169
+
170
+ ---
171
+
172
+ ### runBase
173
+
174
+ ```ts
175
+ const runBase: ZodObject<
176
+ {
177
+ requestId: ZodString;
178
+ workflowId: ZodString;
179
+ bindings: ZodRecord<
180
+ ZodLazy<ZodString>,
181
+ ZodUnion<
182
+ readonly [
183
+ ZodString,
184
+ ZodLazy<
185
+ ZodObject<
186
+ {
187
+ kind: ZodLiteral<"team-source">;
188
+ },
189
+ $strict
190
+ >
191
+ >,
192
+ ]
193
+ >
194
+ >;
195
+ input: ZodRecord<ZodString, ZodJSONSchema>;
196
+ delivery: ZodOptional<
197
+ ZodObject<
198
+ {
199
+ agentId: ZodString;
200
+ sessionId: ZodString;
201
+ },
202
+ $strict
203
+ >
204
+ >;
205
+ },
206
+ $strict
207
+ >;
208
+ ```
209
+
210
+ Shared run request fields: identity, bindings, JSON input and optional delivery.
211
+
212
+ ---
213
+
214
+ ### publishedRun
215
+
216
+ ```ts
217
+ const publishedRun: ZodLazy<ZodUnion<readonly [ZodObject<{
218
+ requestId: ZodString;
219
+ workflowId: ZodString;
220
+ bindings: ZodRecord<ZodLazy<ZodString>, ZodUnion<readonly [ZodString, ZodLazy<ZodObject<{
221
+ kind: ...;
222
+ }, $strict>>]>>;
223
+ input: ZodRecord<ZodString, ZodJSONSchema>;
224
+ delivery: ZodOptional<ZodObject<{
225
+ agentId: ZodString;
226
+ sessionId: ZodString;
227
+ }, $strict>>;
228
+ version: ZodNumber;
229
+ }, $strict>, ZodObject<{
230
+ requestId: ZodString;
231
+ workflowId: ZodString;
232
+ bindings: ZodRecord<ZodLazy<ZodString>, ZodUnion<readonly [ZodString, ZodLazy<ZodObject<{
233
+ kind: ...;
234
+ }, $strict>>]>>;
235
+ input: ZodRecord<ZodString, ZodJSONSchema>;
236
+ delivery: ZodOptional<ZodObject<{
237
+ agentId: ZodString;
238
+ sessionId: ZodString;
239
+ }, $strict>>;
240
+ commit: ZodString;
241
+ }, $strict>]>>;
242
+ ```
243
+
244
+ Run request pinned to either a published version or an exact Git commit.
245
+
246
+ ---
247
+
248
+ ### document
249
+
250
+ ```ts
251
+ const document: ZodObject<{
252
+ provenance: ZodOptional<ZodLazy<ZodUnion<readonly [ZodObject<{
253
+ kind: ZodLiteral<"import">;
254
+ workflowId: ZodString;
255
+ version: ZodNumber;
256
+ commit: ZodString;
257
+ sha256: ZodString & ZodType<... & ..., string, $ZodTypeInternals<..., ...>>;
258
+ origin: ZodOptional<ZodString>;
259
+ }, $strict>, ZodObject<{
260
+ kind: ZodLiteral<"fork">;
261
+ workflowId: ZodString;
262
+ commit: ZodString;
263
+ }, $strict>]>>>;
264
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
265
+ layout: ZodRecord<ZodString, ZodObject<{
266
+ x: ZodNumber;
267
+ y: ZodNumber;
268
+ }, $strict>>;
269
+ commit: ZodString;
270
+ }, $strict>;
271
+ ```
272
+
273
+ Wire document containing definition, node layout, provenance and commit.
274
+
275
+ ---
276
+
277
+ ### revisionSchema
278
+
279
+ ```ts
280
+ const revisionSchema: ZodNumber;
281
+ ```
282
+
283
+ Nonnegative revision used to fence draft replacements.
284
+
285
+ ---
286
+
287
+ ### draftDocument
288
+
289
+ ```ts
290
+ const draftDocument: ZodObject<{
291
+ provenance: ZodOptional<ZodLazy<ZodUnion<readonly [ZodObject<{
292
+ kind: ZodLiteral<"import">;
293
+ workflowId: ZodString;
294
+ version: ZodNumber;
295
+ commit: ZodString;
296
+ sha256: ZodString & ZodType<... & ..., string, $ZodTypeInternals<..., ...>>;
297
+ origin: ZodOptional<ZodString>;
298
+ }, $strict>, ZodObject<{
299
+ kind: ZodLiteral<"fork">;
300
+ workflowId: ZodString;
301
+ commit: ZodString;
302
+ }, $strict>]>>>;
303
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
304
+ layout: ZodRecord<ZodString, ZodObject<{
305
+ x: ZodNumber;
306
+ y: ZodNumber;
307
+ }, $strict>>;
308
+ revision: ZodNumber;
309
+ }, $strict>;
310
+ ```
311
+
312
+ Editable document with a draft revision instead of a published commit.
313
+
314
+ ---
315
+
316
+ ### publishedDocument
317
+
318
+ ```ts
319
+ const publishedDocument: ZodObject<{
320
+ provenance: ZodOptional<ZodLazy<ZodUnion<readonly [ZodObject<{
321
+ kind: ZodLiteral<"import">;
322
+ workflowId: ZodString;
323
+ version: ZodNumber;
324
+ commit: ZodString;
325
+ sha256: ZodString & ZodType<... & ..., string, $ZodTypeInternals<..., ...>>;
326
+ origin: ZodOptional<ZodString>;
327
+ }, $strict>, ZodObject<{
328
+ kind: ZodLiteral<"fork">;
329
+ workflowId: ZodString;
330
+ commit: ZodString;
331
+ }, $strict>]>>>;
332
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
333
+ layout: ZodRecord<ZodString, ZodObject<{
334
+ x: ZodNumber;
335
+ y: ZodNumber;
336
+ }, $strict>>;
337
+ commit: ZodString;
338
+ workflowId: ZodString;
339
+ version: ZodNumber;
340
+ digest: ZodString & ZodType<string & object, string, $ZodTypeInternals<string & object, string>>;
341
+ }, $strict>;
342
+ ```
343
+
344
+ Published document identified by Workflow, version, commit and content digest.
345
+
346
+ ---
347
+
348
+ ### saveReply
349
+
350
+ ```ts
351
+ const saveReply: ZodUnion<readonly [ZodObject<{
352
+ kind: ZodLiteral<"saved">;
353
+ revision: ZodNumber;
354
+ }, $strict>, ZodObject<{
355
+ kind: ZodLiteral<"conflict">;
356
+ current: ZodNullable<ZodObject<{
357
+ provenance: ZodOptional<ZodLazy<ZodUnion<readonly [..., ...]>>>;
358
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
359
+ layout: ZodRecord<ZodString, ZodObject<{
360
+ x: ZodNumber;
361
+ y: ZodNumber;
362
+ }, $strict>>;
363
+ revision: ZodNumber;
364
+ }, $strict>>;
365
+ }, $strict>, ZodObject<{
366
+ kind: ZodLiteral<"invalid">;
367
+ issues: ZodArray<ZodLazy<ZodObject<{
368
+ code: ZodString;
369
+ message: ZodString;
370
+ graph: ZodOptional<ZodString>;
371
+ node: ZodOptional<ZodString>;
372
+ trigger: ZodOptional<ZodString>;
373
+ port: ZodOptional<ZodString>;
374
+ edge: ZodOptional<ZodNumber>;
375
+ }, $strip>>>;
376
+ }, $strict>]>;
377
+ ```
378
+
379
+ Draft save result, including revision conflict or validation issues.
380
+
381
+ ---
382
+
383
+ ### shareReview
384
+
385
+ ```ts
386
+ const shareReview: ZodObject<
387
+ {
388
+ gitAccess: ZodArray<
389
+ ZodUnion<
390
+ readonly [
391
+ ZodObject<
392
+ {
393
+ binding: ZodLazy<ZodString>;
394
+ repository: ZodString;
395
+ branches: ZodLazy<ZodArray<ZodString>>;
396
+ graph: ZodString;
397
+ node: ZodString;
398
+ },
399
+ $strict
400
+ >,
401
+ ZodObject<
402
+ {
403
+ binding: ZodLazy<ZodString>;
404
+ repository: ZodUnion<
405
+ readonly [ZodString, ZodLiteral<"$trigger.repository">]
406
+ >;
407
+ access: ZodLiteral<"read">;
408
+ graph: ZodString;
409
+ node: ZodString;
410
+ },
411
+ $strict
412
+ >,
413
+ ]
414
+ >
415
+ >;
416
+ writeNodes: ZodArray<
417
+ ZodObject<
418
+ {
419
+ graph: ZodString;
420
+ node: ZodString;
421
+ appId: ZodString;
422
+ method: ZodString;
423
+ effect: ZodEnum<{
424
+ write: "write";
425
+ external: "external";
426
+ }>;
427
+ },
428
+ $strict
429
+ >
430
+ >;
431
+ triggers: ZodArray<ZodJSONSchema>;
432
+ },
433
+ $strict
434
+ >;
435
+ ```
436
+
437
+ Share review listing Git access, write/external nodes and trigger configuration.
438
+
439
+ ---
440
+
441
+ ### shareCopyReply
442
+
443
+ ```ts
444
+ const shareCopyReply: ZodLazy<ZodUnion<readonly [ZodObject<{
445
+ kind: ZodLiteral<"saved">;
446
+ revision: ZodNumber;
447
+ title: ZodString;
448
+ review: ZodObject<{
449
+ gitAccess: ZodArray<ZodUnion<readonly [ZodObject<..., ...>, ZodObject<..., ...>]>>;
450
+ writeNodes: ZodArray<ZodObject<{
451
+ graph: ZodString;
452
+ node: ZodString;
453
+ appId: ZodString;
454
+ method: ZodString;
455
+ effect: ZodEnum<...>;
456
+ }, $strict>>;
457
+ triggers: ZodArray<ZodJSONSchema>;
458
+ }, $strict>;
459
+ }, $strict>, ZodObject<{
460
+ kind: ZodLiteral<"conflict">;
461
+ current: ZodNullable<ZodObject<{
462
+ provenance: ZodOptional<ZodLazy<ZodUnion<...>>>;
463
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
464
+ layout: ZodRecord<ZodString, ZodObject<{
465
+ x: ...;
466
+ y: ...;
467
+ }, $strict>>;
468
+ revision: ZodNumber;
469
+ }, $strict>>;
470
+ }, $strict>, ZodObject<{
471
+ kind: ZodLiteral<"invalid">;
472
+ issues: ZodArray<ZodLazy<ZodObject<{
473
+ code: ZodString;
474
+ message: ZodString;
475
+ graph: ZodOptional<ZodString>;
476
+ node: ZodOptional<ZodString>;
477
+ trigger: ZodOptional<ZodString>;
478
+ port: ZodOptional<ZodString>;
479
+ edge: ZodOptional<ZodNumber>;
480
+ }, $strip>>>;
481
+ }, $strict>, ZodObject<{
482
+ kind: ZodLiteral<"missing_apps">;
483
+ appIds: ZodArray<ZodString>;
484
+ }, $strict>, ZodObject<{
485
+ kind: ZodEnum<{
486
+ not_found: "not_found";
487
+ too_large: "too_large";
488
+ digest_mismatch: "digest_mismatch";
489
+ invalid_bundle: "invalid_bundle";
490
+ }>;
491
+ }, $strict>]>>;
492
+ ```
493
+
494
+ Import/fork result with the saved draft and review, or a typed refusal.
495
+
496
+ ---
497
+
498
+ ### shareExportReply
499
+
500
+ ```ts
501
+ const shareExportReply: ZodLazy<
502
+ ZodUnion<
503
+ readonly [
504
+ ZodObject<
505
+ {
506
+ bytes: ZodString;
507
+ sha256: ZodString &
508
+ ZodType<
509
+ string & object,
510
+ string,
511
+ $ZodTypeInternals<string & object, string>
512
+ >;
513
+ },
514
+ $strict
515
+ >,
516
+ ZodObject<
517
+ {
518
+ kind: ZodEnum<{
519
+ not_found: "not_found";
520
+ too_large: "too_large";
521
+ }>;
522
+ },
523
+ $strict
524
+ >,
525
+ ]
526
+ >
527
+ >;
528
+ ```
529
+
530
+ Exported bundle bytes and digest, or a missing/oversized bundle result.
531
+
532
+ ---
533
+
534
+ ### publicationIds
535
+
536
+ ```ts
537
+ const publicationIds: Readonly<{
538
+ publication: IdCodec<"workflow-publication", "publication", 1>;
539
+ }>;
540
+ ```
541
+
542
+ Mint and validate identities for asynchronous Workflow publication attempts.
543
+
544
+ ---
545
+
546
+ ### publicationIdSchema
547
+
548
+ ```ts
549
+ const publicationIdSchema: ZodLazy<
550
+ ZodString &
551
+ ZodType<
552
+ CairnId<"workflow-publication", "publication", 1>,
553
+ string,
554
+ $ZodTypeInternals<
555
+ CairnId<"workflow-publication", "publication", 1>,
556
+ string
557
+ >
558
+ >
559
+ >;
560
+ ```
561
+
562
+ Publication identity accepted by the maintained publication id family.
563
+
564
+ ---
565
+
566
+ ### publicationFailure
567
+
568
+ ```ts
569
+ const publicationFailure: ZodEnum<{
570
+ too_large: "too_large";
571
+ git_conflict: "git_conflict";
572
+ publication_failed: "publication_failed";
573
+ access_changed: "access_changed";
574
+ }>;
575
+ ```
576
+
577
+ Publication failure categories returned by the host.
578
+
579
+ ---
580
+
581
+ ### publicationComplete
582
+
583
+ ```ts
584
+ const publicationComplete: ZodLazy<
585
+ ZodObject<
586
+ {
587
+ kind: ZodLiteral<"published">;
588
+ commit: ZodString;
589
+ version: ZodNumber;
590
+ },
591
+ $strict
592
+ >
593
+ >;
594
+ ```
595
+
596
+ Completed publication's exact commit and assigned version.
597
+
598
+ ---
599
+
600
+ ### publicationPending
601
+
602
+ ```ts
603
+ const publicationPending: ZodLazy<
604
+ ZodObject<
605
+ {
606
+ kind: ZodLiteral<"publishing">;
607
+ publicationId: ZodLazy<
608
+ ZodString &
609
+ ZodType<
610
+ CairnId<"workflow-publication", "publication", 1>,
611
+ string,
612
+ $ZodTypeInternals<
613
+ CairnId<"workflow-publication", "publication", 1>,
614
+ string
615
+ >
616
+ >
617
+ >;
618
+ },
619
+ $strict
620
+ >
621
+ >;
622
+ ```
623
+
624
+ Pending publication identified for subsequent status reads.
625
+
626
+ ---
627
+
628
+ ### publicationFailed
629
+
630
+ ```ts
631
+ const publicationFailed: ZodLazy<
632
+ ZodObject<
633
+ {
634
+ kind: ZodLiteral<"failed">;
635
+ reason: ZodEnum<{
636
+ too_large: "too_large";
637
+ git_conflict: "git_conflict";
638
+ publication_failed: "publication_failed";
639
+ access_changed: "access_changed";
640
+ }>;
641
+ },
642
+ $strict
643
+ >
644
+ >;
645
+ ```
646
+
647
+ Failed publication and its typed failure reason.
648
+
649
+ ---
650
+
651
+ ### publicationStatus
652
+
653
+ ```ts
654
+ const publicationStatus: ZodLazy<ZodUnion<readonly [ZodLazy<ZodObject<{
655
+ kind: ZodLiteral<"publishing">;
656
+ publicationId: ZodLazy<ZodString & ZodType<CairnId<"workflow-publication", "publication", 1>, string, $ZodTypeInternals<CairnId<..., ..., ...>, string>>>;
657
+ }, $strict>>, ZodLazy<ZodObject<{
658
+ kind: ZodLiteral<"published">;
659
+ commit: ZodString;
660
+ version: ZodNumber;
661
+ }, $strict>>, ZodLazy<ZodObject<{
662
+ kind: ZodLiteral<"failed">;
663
+ reason: ZodEnum<{
664
+ too_large: "too_large";
665
+ git_conflict: "git_conflict";
666
+ publication_failed: "publication_failed";
667
+ access_changed: "access_changed";
668
+ }>;
669
+ }, $strict>>, ZodObject<{
670
+ kind: ZodLiteral<"not_found">;
671
+ }, $strict>]>>;
672
+ ```
673
+
674
+ Current publication outcome, including an unknown publication identity.
675
+
676
+ ---
677
+
678
+ ### publicationElsewhere
679
+
680
+ ```ts
681
+ const publicationElsewhere: ZodLazy<
682
+ ZodObject<
683
+ {
684
+ kind: ZodLiteral<"publishing_elsewhere">;
685
+ },
686
+ $strict
687
+ >
688
+ >;
689
+ ```
690
+
691
+ Another publication attempt currently owns the publication operation.
692
+
693
+ ---
694
+
695
+ ### publishReply
696
+
697
+ ```ts
698
+ const publishReply: ZodLazy<ZodUnion<readonly [ZodLazy<ZodObject<{
699
+ kind: ZodLiteral<"publishing_elsewhere">;
700
+ }, $strict>>, ZodLazy<ZodObject<{
701
+ kind: ZodLiteral<"published">;
702
+ commit: ZodString;
703
+ version: ZodNumber;
704
+ }, $strict>>, ZodLazy<ZodObject<{
705
+ kind: ZodLiteral<"publishing">;
706
+ publicationId: ZodLazy<ZodString & ZodType<CairnId<"workflow-publication", "publication", 1>, string, $ZodTypeInternals<CairnId<..., ..., ...>, string>>>;
707
+ }, $strict>>, ZodLazy<ZodObject<{
708
+ kind: ZodLiteral<"failed">;
709
+ reason: ZodEnum<{
710
+ too_large: "too_large";
711
+ git_conflict: "git_conflict";
712
+ publication_failed: "publication_failed";
713
+ access_changed: "access_changed";
714
+ }>;
715
+ }, $strict>>, ZodObject<{
716
+ kind: ZodLiteral<"conflict">;
717
+ head: ZodNullable<ZodString>;
718
+ }, $strict>, ZodObject<{
719
+ kind: ZodLiteral<"invalid">;
720
+ issues: ZodArray<ZodLazy<ZodObject<{
721
+ code: ZodString;
722
+ message: ZodString;
723
+ graph: ZodOptional<ZodString>;
724
+ node: ZodOptional<ZodString>;
725
+ trigger: ZodOptional<ZodString>;
726
+ port: ZodOptional<ZodString>;
727
+ edge: ZodOptional<ZodNumber>;
728
+ }, $strip>>>;
729
+ }, $strict>]>>;
730
+ ```
731
+
732
+ Publication command result, including pending work, conflict or validation
733
+ issues.
734
+
735
+ ---
736
+
737
+ ### version
738
+
739
+ ```ts
740
+ const version: ZodObject<
741
+ {
742
+ version: ZodNumber;
743
+ commit: ZodString;
744
+ committedAt: ZodNumber;
745
+ message: ZodString;
746
+ },
747
+ $strict
748
+ >;
749
+ ```
750
+
751
+ Published version with commit identity, commit time and commit message.
752
+
753
+ ---
754
+
755
+ ### workflow
756
+
757
+ ```ts
758
+ const workflow: ZodObject<
759
+ {
760
+ workflowId: ZodString;
761
+ },
762
+ $strict
763
+ >;
764
+ ```
765
+
766
+ Identify one Workflow within the library.
767
+
768
+ ---
769
+
770
+ ### listings
771
+
772
+ ```ts
773
+ const listings: ZodLazy<
774
+ ZodArray<
775
+ ZodObject<
776
+ {
777
+ workflowId: ZodString;
778
+ title: ZodString;
779
+ draftRevision: ZodNullable<ZodNumber>;
780
+ published: ZodNullable<
781
+ ZodObject<
782
+ {
783
+ commit: ZodString;
784
+ version: ZodNullable<ZodNumber>;
785
+ },
786
+ $strict
787
+ >
788
+ >;
789
+ },
790
+ $strict
791
+ >
792
+ >
793
+ >;
794
+ ```
795
+
796
+ Bounded library rows with draft revision and optional published reference.
797
+
798
+ ---
799
+
800
+ ### history
801
+
802
+ ```ts
803
+ const history: ZodArray<
804
+ ZodObject<
805
+ {
806
+ commit: ZodString;
807
+ committedAt: ZodNumber;
808
+ message: ZodString;
809
+ },
810
+ $strict
811
+ >
812
+ >;
813
+ ```
814
+
815
+ Bounded Git history rows without a published-version number.
816
+
817
+ ---
818
+
819
+ ### libraryPageInput
820
+
821
+ ```ts
822
+ const libraryPageInput: ZodLazy<
823
+ ZodObject<
824
+ {
825
+ limit: ZodDefault<ZodNumber>;
826
+ after: ZodOptional<ZodString>;
827
+ },
828
+ $strict
829
+ >
830
+ >;
831
+ ```
832
+
833
+ A missing index is not an empty Git repository; only write paths reconstruct it.
834
+
835
+ ---
836
+
837
+ ### libraryPage
838
+
839
+ ```ts
840
+ const libraryPage: ZodLazy<ZodObject<{
841
+ items: ZodLazy<ZodArray<ZodObject<{
842
+ workflowId: ZodString;
843
+ title: ZodString;
844
+ draftRevision: ZodNullable<ZodNumber>;
845
+ published: ZodNullable<ZodObject<{
846
+ commit: ZodString;
847
+ version: ZodNullable<...>;
848
+ }, $strict>>;
849
+ }, $strict>>>;
850
+ next: ZodOptional<ZodString>;
851
+ }, $strict>>;
852
+ ```
853
+
854
+ One library page with an optional exclusive cursor for the next page.
855
+
856
+ ---
857
+
858
+ ### libraryListing
859
+
860
+ ```ts
861
+ const libraryListing: ZodLazy<ZodUnion<readonly [ZodLazy<ZodObject<{
862
+ items: ZodLazy<ZodArray<ZodObject<{
863
+ workflowId: ZodString;
864
+ title: ZodString;
865
+ draftRevision: ZodNullable<...>;
866
+ published: ZodNullable<...>;
867
+ }, $strict>>>;
868
+ next: ZodOptional<ZodString>;
869
+ }, $strict>>, ZodObject<{
870
+ kind: ZodLiteral<"unindexed">;
871
+ }, $strict>]>>;
872
+ ```
873
+
874
+ Indexed library page, or an explicit indication that its index is missing.
875
+
876
+ ---
877
+
878
+ ### rebuilding
879
+
880
+ ```ts
881
+ const rebuilding: ZodLazy<
882
+ ZodObject<
883
+ {
884
+ kind: ZodLiteral<"rebuilding">;
885
+ },
886
+ $strict
887
+ >
888
+ >;
889
+ ```
890
+
891
+ A missing screen copy needs an explicit foreground rebuild, never a hidden Git
892
+ read.
893
+
894
+ ---
895
+
896
+ ### documentRead
897
+
898
+ ```ts
899
+ const documentRead: ZodLazy<ZodUnion<readonly [ZodObject<{
900
+ provenance: ZodOptional<ZodLazy<ZodUnion<readonly [ZodObject<{
901
+ kind: ...;
902
+ workflowId: ...;
903
+ version: ...;
904
+ commit: ...;
905
+ sha256: ...;
906
+ origin: ...;
907
+ }, $strict>, ZodObject<{
908
+ kind: ...;
909
+ workflowId: ...;
910
+ commit: ...;
911
+ }, $strict>]>>>;
912
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
913
+ layout: ZodRecord<ZodString, ZodObject<{
914
+ x: ZodNumber;
915
+ y: ZodNumber;
916
+ }, $strict>>;
917
+ revision: ZodNumber;
918
+ }, $strict>, ZodObject<{
919
+ provenance: ZodOptional<ZodLazy<ZodUnion<readonly [ZodObject<{
920
+ kind: ...;
921
+ workflowId: ...;
922
+ version: ...;
923
+ commit: ...;
924
+ sha256: ...;
925
+ origin: ...;
926
+ }, $strict>, ZodObject<{
927
+ kind: ...;
928
+ workflowId: ...;
929
+ commit: ...;
930
+ }, $strict>]>>>;
931
+ definition: ZodRecord<ZodString, ZodJSONSchema>;
932
+ layout: ZodRecord<ZodString, ZodObject<{
933
+ x: ZodNumber;
934
+ y: ZodNumber;
935
+ }, $strict>>;
936
+ commit: ZodString;
937
+ }, $strict>, ZodNull, ZodLazy<ZodObject<{
938
+ kind: ZodLiteral<"rebuilding">;
939
+ }, $strict>>]>>;
940
+ ```
941
+
942
+ Draft/published document read, absence, or an explicit copy-rebuild state.
943
+
944
+ ---
945
+
946
+ ### versionsRead
947
+
948
+ ```ts
949
+ const versionsRead: ZodLazy<
950
+ ZodUnion<
951
+ readonly [
952
+ ZodArray<
953
+ ZodObject<
954
+ {
955
+ version: ZodNumber;
956
+ commit: ZodString;
957
+ committedAt: ZodNumber;
958
+ message: ZodString;
959
+ },
960
+ $strict
961
+ >
962
+ >,
963
+ ZodLazy<
964
+ ZodObject<
965
+ {
966
+ kind: ZodLiteral<"rebuilding">;
967
+ },
968
+ $strict
969
+ >
970
+ >,
971
+ ]
972
+ >
973
+ >;
974
+ ```
975
+
976
+ Published version rows, or an explicit copy-rebuild state.
977
+
978
+ ---
979
+
980
+ ### rebuildCopiesInput
981
+
982
+ ```ts
983
+ const rebuildCopiesInput: ZodLazy<
984
+ ZodObject<
985
+ {
986
+ cursor: ZodNullable<ZodString>;
987
+ target: ZodOptional<
988
+ ZodObject<
989
+ {
990
+ workflowId: ZodString;
991
+ at: ZodObject<
992
+ {
993
+ commit: ZodString;
994
+ },
995
+ $strict
996
+ >;
997
+ },
998
+ $strict
999
+ >
1000
+ >;
1001
+ },
1002
+ $strict
1003
+ >
1004
+ >;
1005
+ ```
1006
+
1007
+ Bounded copy-rebuild continuation, optionally targeting one pinned document.
1008
+
1009
+ ---
1010
+
1011
+ ### rebuildCopiesReply
1012
+
1013
+ ```ts
1014
+ const rebuildCopiesReply: ZodLazy<
1015
+ ZodObject<
1016
+ {
1017
+ done: ZodBoolean;
1018
+ cursor: ZodNullable<ZodString>;
1019
+ },
1020
+ $strict
1021
+ >
1022
+ >;
1023
+ ```
1024
+
1025
+ Copy-rebuild progress and the cursor needed to continue unfinished work.
1026
+
1027
+ ---
1028
+
1029
+ ### workflowIdSchema
1030
+
1031
+ ```ts
1032
+ const workflowIdSchema: ZodString;
1033
+ ```
1034
+
1035
+ Lowercase Workflow slug used by library files and host commands.
1036
+
1037
+ ---
1038
+
1039
+ ### catalogInputSchema
1040
+
1041
+ ```ts
1042
+ const catalogInputSchema: ZodLazy<
1043
+ ZodObject<
1044
+ {
1045
+ installationId: ZodOptional<ZodString>;
1046
+ },
1047
+ $strict
1048
+ >
1049
+ >;
1050
+ ```
1051
+
1052
+ Select the palette index, or one installation's complete port declarations.
1053
+
1054
+ ---
1055
+
1056
+ ### catalogReplySchema
1057
+
1058
+ ```ts
1059
+ const catalogReplySchema: ZodLazy<ZodUnion<readonly [ZodObject<{
1060
+ apps: ZodArray<ZodLazy<ZodObject<{
1061
+ installationId: ZodString;
1062
+ appId: ZodString;
1063
+ displayName: ZodString;
1064
+ icon: ZodOptional<ZodString>;
1065
+ capabilities: ZodOptional<ZodArray<...>>;
1066
+ workflowPublishGranted: ZodOptional<ZodBoolean>;
1067
+ workflowRunGranted: ZodOptional<ZodBoolean>;
1068
+ methods: ZodRecord<ZodString, ZodLazy<...>>;
1069
+ events: ZodOptional<ZodRecord<..., ...>>;
1070
+ }, $strict>>>;
1071
+ }, $strict>, ZodObject<{
1072
+ app: ZodLazy<ZodObject<{
1073
+ installationId: ZodString;
1074
+ appId: ZodString;
1075
+ displayName: ZodString;
1076
+ icon: ZodOptional<ZodString>;
1077
+ capabilities: ZodOptional<ZodArray<ZodEnum<...>>>;
1078
+ workflowPublishGranted: ZodOptional<ZodBoolean>;
1079
+ workflowRunGranted: ZodOptional<ZodBoolean>;
1080
+ methods: ZodRecord<ZodString, ZodJSONSchema>;
1081
+ events: ZodOptional<ZodRecord<ZodString, ZodJSONSchema>>;
1082
+ }, $strict>>;
1083
+ }, $strict>, ZodObject<{
1084
+ error: ZodString;
1085
+ }, $strict>]>>;
1086
+ ```
1087
+
1088
+ App method declarations admitted by the host for the current invocation.
1089
+
1090
+ ---
1091
+
1092
+ ### workflowIssueSchema
1093
+
1094
+ ```ts
1095
+ const workflowIssueSchema: ZodLazy<
1096
+ ZodObject<
1097
+ {
1098
+ code: ZodString;
1099
+ message: ZodString;
1100
+ graph: ZodOptional<ZodString>;
1101
+ node: ZodOptional<ZodString>;
1102
+ trigger: ZodOptional<ZodString>;
1103
+ port: ZodOptional<ZodString>;
1104
+ edge: ZodOptional<ZodNumber>;
1105
+ },
1106
+ $strip
1107
+ >
1108
+ >;
1109
+ ```
1110
+
1111
+ Validation issue with optional graph, node, trigger, port or edge location.
1112
+
1113
+ ---
1114
+
1115
+ ### runReply
1116
+
1117
+ ```ts
1118
+ const runReply: ZodLazy<
1119
+ ZodUnion<
1120
+ readonly [
1121
+ ZodObject<
1122
+ {
1123
+ kind: ZodEnum<{
1124
+ started: "started";
1125
+ replay: "replay";
1126
+ conflict: "conflict";
1127
+ }>;
1128
+ runId: ZodString;
1129
+ planDigest: ZodString;
1130
+ },
1131
+ $strict
1132
+ >,
1133
+ ZodObject<
1134
+ {
1135
+ kind: ZodLiteral<"invalid">;
1136
+ issues: ZodArray<
1137
+ ZodLazy<
1138
+ ZodObject<
1139
+ {
1140
+ code: ZodString;
1141
+ message: ZodString;
1142
+ graph: ZodOptional<ZodString>;
1143
+ node: ZodOptional<ZodString>;
1144
+ trigger: ZodOptional<ZodString>;
1145
+ port: ZodOptional<ZodString>;
1146
+ edge: ZodOptional<ZodNumber>;
1147
+ },
1148
+ $strip
1149
+ >
1150
+ >
1151
+ >;
1152
+ },
1153
+ $strict
1154
+ >,
1155
+ ZodObject<
1156
+ {
1157
+ error: ZodString;
1158
+ },
1159
+ $strict
1160
+ >,
1161
+ ]
1162
+ >
1163
+ >;
1164
+ ```
1165
+
1166
+ Run admission result, including replay/conflict, invalid input or refusal.
1167
+
1168
+ ---
1169
+
1170
+ ### cancelReplySchema
1171
+
1172
+ ```ts
1173
+ const cancelReplySchema: ZodLazy<
1174
+ ZodUnion<
1175
+ readonly [
1176
+ ZodObject<
1177
+ {
1178
+ kind: ZodEnum<{
1179
+ cancelled: "cancelled";
1180
+ terminal: "terminal";
1181
+ }>;
1182
+ },
1183
+ $strict
1184
+ >,
1185
+ ZodObject<
1186
+ {
1187
+ kind: ZodLiteral<"refused">;
1188
+ reason: ZodLiteral<"denied">;
1189
+ },
1190
+ $strict
1191
+ >,
1192
+ ZodObject<
1193
+ {
1194
+ error: ZodString;
1195
+ },
1196
+ $strict
1197
+ >,
1198
+ ]
1199
+ >
1200
+ >;
1201
+ ```
1202
+
1203
+ Cancellation result, an already-terminal run, or an authority refusal.
1204
+
1205
+ ---
1206
+
1207
+ ### runOutcomeSchema
1208
+
1209
+ ```ts
1210
+ const runOutcomeSchema: ZodEnum<{
1211
+ cancelled: "cancelled";
1212
+ terminal: "terminal";
1213
+ active: "active";
1214
+ }>;
1215
+ ```
1216
+
1217
+ Lifecycle outcome reported for a Workflow run.
1218
+
1219
+ ---
1220
+
1221
+ ### statusReply
1222
+
1223
+ ```ts
1224
+ const statusReply: ZodLazy<
1225
+ ZodUnion<
1226
+ readonly [
1227
+ ZodObject<
1228
+ {
1229
+ runId: ZodString;
1230
+ planDigest: ZodString;
1231
+ outcome: ZodEnum<{
1232
+ cancelled: "cancelled";
1233
+ terminal: "terminal";
1234
+ active: "active";
1235
+ }>;
1236
+ title: ZodString;
1237
+ events: ZodArray<ZodRecord<ZodString, ZodJSONSchema>>;
1238
+ reviews: ZodArray<ZodRecord<ZodString, ZodJSONSchema>>;
1239
+ status: ZodString;
1240
+ output: ZodJSONSchema;
1241
+ error: ZodJSONSchema;
1242
+ },
1243
+ $strict
1244
+ >,
1245
+ ZodObject<
1246
+ {
1247
+ error: ZodString;
1248
+ },
1249
+ $strict
1250
+ >,
1251
+ ]
1252
+ >
1253
+ >;
1254
+ ```
1255
+
1256
+ Bounded run status snapshot with events, reviews, output and error.
1257
+
1258
+ ---
1259
+
1260
+ ### answerReviewReply
1261
+
1262
+ ```ts
1263
+ const answerReviewReply: ZodLazy<
1264
+ ZodUnion<
1265
+ readonly [
1266
+ ZodObject<
1267
+ {
1268
+ result: ZodEnum<{
1269
+ invalid: "invalid";
1270
+ denied: "denied";
1271
+ accepted: "accepted";
1272
+ not_waiting: "not_waiting";
1273
+ }>;
1274
+ },
1275
+ $strict
1276
+ >,
1277
+ ZodObject<
1278
+ {
1279
+ error: ZodString;
1280
+ },
1281
+ $strict
1282
+ >,
1283
+ ]
1284
+ >
1285
+ >;
1286
+ ```
1287
+
1288
+ Result of answering a waiting run review, or an invocation refusal.
1289
+
1290
+ ---
1291
+
1292
+ ### scheduleArmReplySchema
1293
+
1294
+ ```ts
1295
+ const scheduleArmReplySchema: ZodLazy<
1296
+ ZodUnion<
1297
+ readonly [
1298
+ ZodObject<
1299
+ {
1300
+ kind: ZodLiteral<"armed">;
1301
+ scheduleId: ZodString;
1302
+ },
1303
+ $strict
1304
+ >,
1305
+ ZodObject<
1306
+ {
1307
+ kind: ZodLiteral<"refused">;
1308
+ reason: ZodString;
1309
+ issues: ZodOptional<ZodArray<ZodJSONSchema>>;
1310
+ },
1311
+ $strict
1312
+ >,
1313
+ ZodObject<
1314
+ {
1315
+ error: ZodString;
1316
+ },
1317
+ $strict
1318
+ >,
1319
+ ]
1320
+ >
1321
+ >;
1322
+ ```
1323
+
1324
+ Schedule-trigger admission or its refusal details.
1325
+
1326
+ ---
1327
+
1328
+ ### triggerDisarmReplySchema
1329
+
1330
+ ```ts
1331
+ const triggerDisarmReplySchema: ZodLazy<
1332
+ ZodUnion<
1333
+ readonly [
1334
+ ZodObject<
1335
+ {
1336
+ kind: ZodEnum<{
1337
+ disarmed: "disarmed";
1338
+ not_found: "not_found";
1339
+ }>;
1340
+ },
1341
+ $strict
1342
+ >,
1343
+ ZodObject<
1344
+ {
1345
+ error: ZodString;
1346
+ },
1347
+ $strict
1348
+ >,
1349
+ ]
1350
+ >
1351
+ >;
1352
+ ```
1353
+
1354
+ Trigger disarm result, including an absent trigger or denied invocation.
1355
+
1356
+ ---
1357
+
1358
+ ### schedulesReplySchema
1359
+
1360
+ ```ts
1361
+ const schedulesReplySchema: ZodLazy<
1362
+ ZodUnion<
1363
+ readonly [
1364
+ ZodObject<
1365
+ {
1366
+ schedules: ZodArray<
1367
+ ZodObject<
1368
+ {
1369
+ scheduleId: ZodString;
1370
+ installationId: ZodString;
1371
+ workflowId: ZodString;
1372
+ triggerId: ZodString;
1373
+ nextDueAt: ZodNumber;
1374
+ state: ZodEnum<{
1375
+ cancelled: "cancelled";
1376
+ active: "active";
1377
+ paused: "paused";
1378
+ finished: "finished";
1379
+ }>;
1380
+ lastError: ZodNullable<ZodString>;
1381
+ },
1382
+ $strict
1383
+ >
1384
+ >;
1385
+ },
1386
+ $strict
1387
+ >,
1388
+ ZodObject<
1389
+ {
1390
+ error: ZodString;
1391
+ },
1392
+ $strict
1393
+ >,
1394
+ ]
1395
+ >
1396
+ >;
1397
+ ```
1398
+
1399
+ Visible schedule-trigger rows with their next due time and lifecycle state.
1400
+
1401
+ ---
1402
+
1403
+ ### workflowRunSourceSchema
1404
+
1405
+ ```ts
1406
+ const workflowRunSourceSchema: ZodEnum<{
1407
+ manual: "manual";
1408
+ schedule: "schedule";
1409
+ event: "event";
1410
+ agent: "agent";
1411
+ key: "key";
1412
+ }>;
1413
+ ```
1414
+
1415
+ Origin category recorded for a run: manual, schedule, event, Agent or key.
1416
+
1417
+ ---
1418
+
1419
+ ### workflowRunInitiatedBySchema
1420
+
1421
+ ```ts
1422
+ const workflowRunInitiatedBySchema: ZodLazy<
1423
+ ZodUnion<
1424
+ readonly [
1425
+ ZodObject<
1426
+ {
1427
+ kind: ZodLiteral<"member">;
1428
+ memberId: ZodString;
1429
+ },
1430
+ $strict
1431
+ >,
1432
+ ZodObject<
1433
+ {
1434
+ kind: ZodLiteral<"agent">;
1435
+ agentId: ZodString;
1436
+ grantorMemberId: ZodString;
1437
+ },
1438
+ $strict
1439
+ >,
1440
+ ZodObject<
1441
+ {
1442
+ kind: ZodLiteral<"key">;
1443
+ keyId: ZodString;
1444
+ grantorMemberId: ZodString;
1445
+ },
1446
+ $strict
1447
+ >,
1448
+ ]
1449
+ >
1450
+ >;
1451
+ ```
1452
+
1453
+ The Agent Session (`sessionId`) stays host-side; the wire names only the
1454
+ Agent/key and its grantor.
1455
+
1456
+ ---
1457
+
1458
+ ### runsReplySchema
1459
+
1460
+ ```ts
1461
+ const runsReplySchema: ZodLazy<ZodUnion<readonly [ZodObject<{
1462
+ runs: ZodArray<ZodObject<{
1463
+ runId: ZodString;
1464
+ workflowId: ZodString;
1465
+ commit: ZodString;
1466
+ source: ZodEnum<{
1467
+ manual: "manual";
1468
+ schedule: "schedule";
1469
+ event: "event";
1470
+ agent: "agent";
1471
+ key: "key";
1472
+ }>;
1473
+ triggerId: ZodOptional<ZodString>;
1474
+ initiatedBy: ZodLazy<ZodUnion<readonly [..., ..., ...]>>;
1475
+ startedAt: ZodNumber;
1476
+ }, $strict>>;
1477
+ }, $strict>, ZodObject<{
1478
+ error: ZodString;
1479
+ }, $strict>]>>;
1480
+ ```
1481
+
1482
+ Bounded recent-run rows with their source, initiator and pinned commit.
1483
+
1484
+ ---
1485
+
1486
+ ### eventArmReplySchema
1487
+
1488
+ ```ts
1489
+ const eventArmReplySchema: ZodLazy<
1490
+ ZodUnion<
1491
+ readonly [
1492
+ ZodObject<
1493
+ {
1494
+ kind: ZodLiteral<"armed">;
1495
+ eventTriggerId: ZodString;
1496
+ },
1497
+ $strict
1498
+ >,
1499
+ ZodObject<
1500
+ {
1501
+ kind: ZodLiteral<"refused">;
1502
+ reason: ZodString;
1503
+ issues: ZodOptional<ZodArray<ZodJSONSchema>>;
1504
+ },
1505
+ $strict
1506
+ >,
1507
+ ZodObject<
1508
+ {
1509
+ error: ZodString;
1510
+ },
1511
+ $strict
1512
+ >,
1513
+ ]
1514
+ >
1515
+ >;
1516
+ ```
1517
+
1518
+ Event-trigger admission or its refusal details.
1519
+
1520
+ ---
1521
+
1522
+ ### eventTriggersReplySchema
1523
+
1524
+ ```ts
1525
+ const eventTriggersReplySchema: ZodLazy<
1526
+ ZodUnion<
1527
+ readonly [
1528
+ ZodObject<
1529
+ {
1530
+ eventTriggers: ZodArray<
1531
+ ZodObject<
1532
+ {
1533
+ eventTriggerId: ZodString;
1534
+ workflowId: ZodString;
1535
+ triggerId: ZodString;
1536
+ emitterInstallationId: ZodString;
1537
+ event: ZodString;
1538
+ state: ZodEnum<{
1539
+ active: "active";
1540
+ paused: "paused";
1541
+ }>;
1542
+ lastError: ZodNullable<ZodString>;
1543
+ },
1544
+ $strict
1545
+ >
1546
+ >;
1547
+ },
1548
+ $strict
1549
+ >,
1550
+ ZodObject<
1551
+ {
1552
+ error: ZodString;
1553
+ },
1554
+ $strict
1555
+ >,
1556
+ ]
1557
+ >
1558
+ >;
1559
+ ```
1560
+
1561
+ Visible event-trigger rows with emitter, event and current state.
1562
+
1563
+ ---
1564
+
1565
+ ### repositoryWorkflowSourceSchema
1566
+
1567
+ ```ts
1568
+ const repositoryWorkflowSourceSchema: Struct<{
1569
+ appId: refine<AppId, String>;
1570
+ installationId: String;
1571
+ callerAppId: refine<AppId, String>;
1572
+ callerSourceRevision: refine<SourceRevision, String>;
1573
+ }>;
1574
+ ```
1575
+
1576
+ A registered repository App as the host reports it to the calling installation:
1577
+ read-only identity from the source owner and the live caller. Hosts and Apps
1578
+ share this wire; an App never imports the host package for it. Reading it
1579
+ neither registers a repository nor selects or runs a Computer.
1580
+
1581
+ ---
1582
+
1583
+ ### runsInputSchema
1584
+
1585
+ ```ts
1586
+ const runsInputSchema: ZodLazy<
1587
+ ZodObject<
1588
+ {
1589
+ workflowId: ZodOptional<ZodString>;
1590
+ },
1591
+ $strict
1592
+ >
1593
+ >;
1594
+ ```
1595
+
1596
+ The App's `WORKFLOWS.runs` read, scoped to one Workflow when given.
1597
+
1598
+ ---
1599
+
1600
+ ### runListItemSchema
1601
+
1602
+ ```ts
1603
+ const runListItemSchema: ZodLazy<
1604
+ ZodObject<
1605
+ {
1606
+ runId: ZodString;
1607
+ workflowId: ZodString;
1608
+ commit: ZodString;
1609
+ version: ZodNullable<ZodNumber>;
1610
+ startedAt: ZodNumber;
1611
+ title: ZodNullable<ZodString>;
1612
+ source: ZodEnum<{
1613
+ manual: "manual";
1614
+ schedule: "schedule";
1615
+ event: "event";
1616
+ agent: "agent";
1617
+ key: "key";
1618
+ }>;
1619
+ triggerId: ZodOptional<ZodString>;
1620
+ initiatedBy: ZodLazy<
1621
+ ZodUnion<
1622
+ readonly [
1623
+ ZodObject<
1624
+ {
1625
+ kind: ZodLiteral<"member">;
1626
+ memberId: ZodString;
1627
+ },
1628
+ $strict
1629
+ >,
1630
+ ZodObject<
1631
+ {
1632
+ kind: ZodLiteral<"agent">;
1633
+ agentId: ZodString;
1634
+ grantorMemberId: ZodString;
1635
+ },
1636
+ $strict
1637
+ >,
1638
+ ZodObject<
1639
+ {
1640
+ kind: ZodLiteral<"key">;
1641
+ keyId: ZodString;
1642
+ grantorMemberId: ZodString;
1643
+ },
1644
+ $strict
1645
+ >,
1646
+ ]
1647
+ >
1648
+ >;
1649
+ },
1650
+ $strict
1651
+ >
1652
+ >;
1653
+ ```
1654
+
1655
+ One listed run, from the stored source of truth plus the App's own copy of the
1656
+ published document at `commit`; display metadata never comes from Git.
1657
+
1658
+ ---
1659
+
1660
+ ### viewerReplySchema
1661
+
1662
+ ```ts
1663
+ const viewerReplySchema: ZodLazy<
1664
+ ZodUnion<
1665
+ readonly [
1666
+ ZodObject<
1667
+ {
1668
+ memberId: ZodString;
1669
+ },
1670
+ $strict
1671
+ >,
1672
+ ZodObject<
1673
+ {
1674
+ error: ZodString;
1675
+ },
1676
+ $strict
1677
+ >,
1678
+ ]
1679
+ >
1680
+ >;
1681
+ ```
1682
+
1683
+ The calling member's own id, so the Runs UI can tell its own runs from a
1684
+ teammate's (an owner now sees every run in the installation, not only their own)
1685
+ without guessing identity from the list itself.
1686
+
1687
+ ---
1688
+
1689
+ ### workflowRunRequestIds
1690
+
1691
+ ```ts
1692
+ const workflowRunRequestIds: Readonly<{
1693
+ request: IdCodec<"agar-workflow-run", "request", 1>;
1694
+ }>;
1695
+ ```
1696
+
1697
+ Typed id codec for Workflow run requests: mint and validate `workflow_request_*`
1698
+ ids. Hosts derive run ids from the request.
1699
+
1700
+ ---
1701
+
1702
+ ### runDeliverySchema
1703
+
1704
+ ```ts
1705
+ const runDeliverySchema: ZodObject<
1706
+ {
1707
+ agentId: ZodString;
1708
+ sessionId: ZodString;
1709
+ },
1710
+ $strict
1711
+ >;
1712
+ ```
1713
+
1714
+ The Agent Session (chat) that receives the ending of every run it covers.
1715
+
1716
+ ---
1717
+
1718
+ ### chatsReplySchema
1719
+
1720
+ ```ts
1721
+ const chatsReplySchema: ZodLazy<
1722
+ ZodUnion<
1723
+ readonly [
1724
+ ZodObject<
1725
+ {
1726
+ chats: ZodArray<
1727
+ ZodObject<
1728
+ {
1729
+ agentId: ZodString;
1730
+ sessionId: ZodString;
1731
+ title: ZodString;
1732
+ },
1733
+ $strict
1734
+ >
1735
+ >;
1736
+ },
1737
+ $strict
1738
+ >,
1739
+ ZodObject<
1740
+ {
1741
+ error: ZodLiteral<"not_granted">;
1742
+ },
1743
+ $strict
1744
+ >,
1745
+ ]
1746
+ >
1747
+ >;
1748
+ ```
1749
+
1750
+ One chat the member may choose for run reports: an existing Agent Session.
1751
+
1752
+ ---
1753
+
1754
+ ### triggerTargetSchema
1755
+
1756
+ ```ts
1757
+ const triggerTargetSchema: ZodLazy<
1758
+ ZodObject<
1759
+ {
1760
+ workflowId: ZodString;
1761
+ commit: ZodString;
1762
+ triggerId: ZodString;
1763
+ bindings: ZodRecord<
1764
+ ZodLazy<ZodString>,
1765
+ ZodUnion<
1766
+ readonly [
1767
+ ZodString,
1768
+ ZodLazy<
1769
+ ZodObject<
1770
+ {
1771
+ kind: ZodLiteral<"team-source">;
1772
+ },
1773
+ $strict
1774
+ >
1775
+ >,
1776
+ ]
1777
+ >
1778
+ >;
1779
+ delivery: ZodOptional<
1780
+ ZodObject<
1781
+ {
1782
+ agentId: ZodString;
1783
+ sessionId: ZodString;
1784
+ },
1785
+ $strict
1786
+ >
1787
+ >;
1788
+ },
1789
+ $strict
1790
+ >
1791
+ >;
1792
+ ```
1793
+
1794
+ The published trigger supplies cadence or event matching; the host supplies
1795
+ authority scope.
1796
+
1797
+ ---
1798
+
1799
+ ### scheduleDisarmInputSchema
1800
+
1801
+ ```ts
1802
+ const scheduleDisarmInputSchema: ZodObject<
1803
+ {
1804
+ scheduleId: ZodString;
1805
+ },
1806
+ $strict
1807
+ >;
1808
+ ```
1809
+
1810
+ Identify the schedule-trigger registration to disarm.
1811
+
1812
+ ---
1813
+
1814
+ ### eventDisarmInputSchema
1815
+
1816
+ ```ts
1817
+ const eventDisarmInputSchema: ZodObject<
1818
+ {
1819
+ eventTriggerId: ZodString;
1820
+ },
1821
+ $strict
1822
+ >;
1823
+ ```
1824
+
1825
+ Identify the event-trigger registration to disarm.
1826
+
1827
+ ---
1828
+
1829
+ ### triggerListInputSchema
1830
+
1831
+ ```ts
1832
+ const triggerListInputSchema: ZodObject<{}, $strict>;
1833
+ ```
1834
+
1835
+ Trigger listing takes no caller-supplied filters.
1836
+
1837
+ ---
1838
+
1839
+ ### workflowLibraryRepository
1840
+
1841
+ ```ts
1842
+ const workflowLibraryRepository: "trellis" = "trellis";
1843
+ ```
1844
+
1845
+ The read side of a Workflows library's Git layout, shared by the Workflows App
1846
+ and the hosts that read its published definitions: one repository, `trellis`,
1847
+ one `workflows/<id>.json` file per Workflow (its definition plus `layout` and
1848
+ optional `provenance`), and one `<id>@v<n>` tag per published version on
1849
+ `main`'s ancestry.
1850
+
1851
+ ---
1852
+
1853
+ ### workflowDraftSchema
1854
+
1855
+ ```ts
1856
+ const workflowDraftSchema: Struct<{
1857
+ definition: Struct<{
1858
+ format: Literal<"fungi.workflow/v1">;
1859
+ title: String;
1860
+ description: optionalKey<String>;
1861
+ apps: $Record<String, Struct<{
1862
+ appId: String;
1863
+ role: optionalKey<String>;
1864
+ }>>;
1865
+ subgraphs: optionalKey<$Record<String, Struct<{
1866
+ input: $Record<String, Codec<Json, Json, never, never>>;
1867
+ nodes: $Array<Union<readonly [..., ..., ..., ..., ..., ..., ..., ...]>>;
1868
+ edges: $Array<Struct<{
1869
+ from: ...;
1870
+ to: ...;
1871
+ }>>;
1872
+ output: $Record<String, Struct<{
1873
+ node: ...;
1874
+ port: ...;
1875
+ }>>;
1876
+ }>>>;
1877
+ triggers: optionalKey<$Array<Union<readonly [Struct<{
1878
+ id: String;
1879
+ on: Literal<...>;
1880
+ title: optionalKey<...>;
1881
+ when: optionalKey<...>;
1882
+ input: optionalKey<...>;
1883
+ }>, Struct<{
1884
+ id: String;
1885
+ on: Literal<...>;
1886
+ title: optionalKey<...>;
1887
+ cron: Struct<...>;
1888
+ input: optionalKey<...>;
1889
+ }>, Struct<{
1890
+ id: String;
1891
+ on: Literal<...>;
1892
+ title: optionalKey<...>;
1893
+ app: String;
1894
+ event: String;
1895
+ eventDigest: String;
1896
+ when: optionalKey<...>;
1897
+ input: optionalKey<...>;
1898
+ repository: optionalKey<...>;
1899
+ }>]>>>;
1900
+ input: $Record<String, Codec<Json, Json, never, never>>;
1901
+ nodes: $Array<Union<readonly [Struct<{
1902
+ id: String;
1903
+ kind: Literal<"code">;
1904
+ source: String;
1905
+ input: $Record<String, Codec<..., ..., ..., ...>>;
1906
+ output: $Record<String, Codec<..., ..., ..., ...>>;
1907
+ values: $Record<String, Codec<..., ..., ..., ...>>;
1908
+ }>, Struct<{
1909
+ id: String;
1910
+ kind: Literal<"app">;
1911
+ app: String;
1912
+ method: String;
1913
+ methodDigest: String;
1914
+ values: $Record<String, Codec<..., ..., ..., ...>>;
1915
+ gitAccess: optionalKey<declare<..., ...>>;
1916
+ retry: optionalKey<Struct<...>>;
1917
+ }>, Struct<{
1918
+ id: String;
1919
+ kind: Literal<"review">;
1920
+ title: String;
1921
+ detail: optionalKey<String>;
1922
+ show: $Array<Struct<...>>;
1923
+ reviewers: Literals<readonly [..., ...]>;
1924
+ timeout: Number;
1925
+ choices: optionalKey<$Array<...>>;
1926
+ }>, Struct<{
1927
+ id: String;
1928
+ kind: Literal<"condition">;
1929
+ test: Codec<Predicate, Predicate, never, never>;
1930
+ }>, Struct<{
1931
+ id: String;
1932
+ kind: Literal<"map">;
1933
+ over: Struct<{
1934
+ node: ...;
1935
+ port: ...;
1936
+ }>;
1937
+ body: String;
1938
+ concurrency: Number;
1939
+ maxItems: Number;
1940
+ }>, Struct<{
1941
+ id: String;
1942
+ kind: Literal<"repeat">;
1943
+ body: String;
1944
+ maxRounds: Number;
1945
+ until: Codec<Predicate, Predicate, never, never>;
1946
+ }>, Struct<{
1947
+ id: String;
1948
+ kind: Literal<"wait">;
1949
+ for: Number;
1950
+ }>, Struct<{
1951
+ id: String;
1952
+ kind: Literal<"transform">;
1953
+ fields: $Record<String, Codec<..., ..., ..., ...>>;
1954
+ }>]>>;
1955
+ edges: $Array<Struct<{
1956
+ from: Struct<{
1957
+ node: Union<readonly [..., ...]>;
1958
+ port: String;
1959
+ }>;
1960
+ to: Struct<{
1961
+ node: Union<readonly [..., ...]>;
1962
+ port: String;
1963
+ }>;
1964
+ }>>;
1965
+ output: $Record<String, Struct<{
1966
+ node: Union<readonly [String, Literals<readonly [..., ...]>]>;
1967
+ port: String;
1968
+ }>>;
1969
+ }>;
1970
+ layout: $Record<String, Struct<{
1971
+ x: Finite;
1972
+ y: Finite;
1973
+ }>>;
1974
+ provenance: optionalKey<declare<
1975
+ | {
1976
+ kind: "import";
1977
+ workflowId: string;
1978
+ version: number;
1979
+ commit: string;
1980
+ sha256: string & object;
1981
+ origin?: string;
1982
+ }
1983
+ | {
1984
+ kind: "fork";
1985
+ workflowId: string;
1986
+ commit: string;
1987
+ },
1988
+ | {
1989
+ kind: "import";
1990
+ workflowId: string;
1991
+ version: number;
1992
+ commit: string;
1993
+ sha256: string & object;
1994
+ origin?: string;
1995
+ }
1996
+ | {
1997
+ kind: "fork";
1998
+ workflowId: string;
1999
+ commit: string;
2000
+ }>>;
2001
+ }>;
2002
+ ```
2003
+
2004
+ Decode stored definition, node layout and optional import/fork provenance.
2005
+
2006
+ ## Functions
2007
+
2008
+ ### createWorkflowPublishedDefinitionPort()
2009
+
2010
+ ```ts
2011
+ function createWorkflowPublishedDefinitionPort(
2012
+ createReader,
2013
+ ): PublishedDefinitionPort<WorkflowPublishedDefinitionContext>;
2014
+ ```
2015
+
2016
+ Trigger arm verification uses current admitted Git; direct starts carry the
2017
+ App's original row.
2018
+
2019
+ #### Parameters
2020
+
2021
+ | Parameter | Type |
2022
+ | -------------- | ---------------------------------------------------------------- |
2023
+ | `createReader` | (`git`) => [`WorkflowPublishedReader`](#workflowpublishedreader) |
2024
+
2025
+ #### Returns
2026
+
2027
+ `PublishedDefinitionPort`\<[`WorkflowPublishedDefinitionContext`](#workflowpublisheddefinitioncontext)\>
2028
+
2029
+ ---
2030
+
2031
+ ### workflowFilePath()
2032
+
2033
+ ```ts
2034
+ function workflowFilePath(id): string;
2035
+ ```
2036
+
2037
+ Where one Workflow's file lives in its library repository.
2038
+
2039
+ #### Parameters
2040
+
2041
+ | Parameter | Type |
2042
+ | --------- | -------- |
2043
+ | `id` | `string` |
2044
+
2045
+ #### Returns
2046
+
2047
+ `string`
2048
+
2049
+ ---
2050
+
2051
+ ### workflowFiles()
2052
+
2053
+ ```ts
2054
+ function workflowFiles(
2055
+ git,
2056
+ commit,
2057
+ ): Promise<
2058
+ Readonly<{
2059
+ name: string;
2060
+ mode: string;
2061
+ hash: string;
2062
+ type: "commit" | "blob" | "tree";
2063
+ }>[]
2064
+ >;
2065
+ ```
2066
+
2067
+ Read the immediate Workflow directory without following symlinks or submodules.
2068
+
2069
+ #### Parameters
2070
+
2071
+ | Parameter | Type |
2072
+ | --------- | ------------------------------------- |
2073
+ | `git` | [`WorkflowReadGit`](#workflowreadgit) |
2074
+ | `commit` | `string` \| `null` |
2075
+
2076
+ #### Returns
2077
+
2078
+ `Promise`\<`Readonly`\<\{ `name`: `string`; `mode`: `string`; `hash`: `string`;
2079
+ `type`: `"commit"` \| `"blob"` \| `"tree"`; \}\>[]\>
2080
+
2081
+ ---
2082
+
2083
+ ### changedWorkflowIds()
2084
+
2085
+ ```ts
2086
+ function changedWorkflowIds(git, before, after): Promise<string[]>;
2087
+ ```
2088
+
2089
+ Changed Workflow IDs in one accepted ref update, including deletions and mode
2090
+ changes.
2091
+
2092
+ #### Parameters
2093
+
2094
+ | Parameter | Type |
2095
+ | --------- | ------------------------------------- |
2096
+ | `git` | [`WorkflowReadGit`](#workflowreadgit) |
2097
+ | `before` | `string` |
2098
+ | `after` | `string` |
2099
+
2100
+ #### Returns
2101
+
2102
+ `Promise`\<`string`[]\>
2103
+
2104
+ ---
2105
+
2106
+ ### inspectWorkflowFile()
2107
+
2108
+ ```ts
2109
+ function inspectWorkflowFile(
2110
+ git,
2111
+ workflowId,
2112
+ commit
2113
+ ): Promise<
2114
+ | {
2115
+ kind: "missing";
2116
+ }
2117
+ | {
2118
+ kind: "valid";
2119
+ draft: {
2120
+ definition: {
2121
+ format: "fungi.workflow/v1";
2122
+ title: string;
2123
+ description?: string;
2124
+ apps: {
2125
+ [key: string]: object;
2126
+ };
2127
+ subgraphs?: {
2128
+ [key: string]: object;
2129
+ };
2130
+ triggers?: readonly (
2131
+ | {
2132
+ id: string;
2133
+ on: "webhook";
2134
+ title?: string;
2135
+ when?: Predicate;
2136
+ input?: {
2137
+ [key: ...]: ...;
2138
+ };
2139
+ }
2140
+ | {
2141
+ id: string;
2142
+ on: "schedule";
2143
+ title?: string;
2144
+ cron: {
2145
+ expression: string;
2146
+ timeZone: string;
2147
+ };
2148
+ input?: {
2149
+ [key: ...]: ...;
2150
+ };
2151
+ }
2152
+ | {
2153
+ id: string;
2154
+ on: "event";
2155
+ title?: string;
2156
+ app: string;
2157
+ event: string;
2158
+ eventDigest: string;
2159
+ when?: Predicate;
2160
+ input?: {
2161
+ [key: ...]: ...;
2162
+ };
2163
+ repository?: Mapping;
2164
+ })[];
2165
+ input: {
2166
+ [key: string]: Json;
2167
+ };
2168
+ nodes: readonly (
2169
+ | {
2170
+ id: string;
2171
+ kind: "code";
2172
+ source: string;
2173
+ input: {
2174
+ [key: string]: Json;
2175
+ };
2176
+ output: {
2177
+ [key: string]: Json;
2178
+ };
2179
+ values: {
2180
+ [key: string]: Mapping;
2181
+ };
2182
+ }
2183
+ | {
2184
+ id: string;
2185
+ kind: "app";
2186
+ app: string;
2187
+ method: string;
2188
+ methodDigest: string;
2189
+ values: {
2190
+ [key: string]: Mapping;
2191
+ };
2192
+ gitAccess?: | {
2193
+ binding: string;
2194
+ repository: string;
2195
+ branches: ...[];
2196
+ }
2197
+ | {
2198
+ binding: string;
2199
+ repository: string;
2200
+ access: "read";
2201
+ };
2202
+ retry?: {
2203
+ attempts: number;
2204
+ };
2205
+ }
2206
+ | {
2207
+ id: string;
2208
+ kind: "review";
2209
+ title: string;
2210
+ detail?: string;
2211
+ show: readonly object[];
2212
+ reviewers: "runner" | "owners";
2213
+ timeout: number;
2214
+ choices?: readonly object[];
2215
+ }
2216
+ | {
2217
+ id: string;
2218
+ kind: "condition";
2219
+ test: Predicate;
2220
+ }
2221
+ | {
2222
+ id: string;
2223
+ kind: "map";
2224
+ over: {
2225
+ node: string;
2226
+ port: string;
2227
+ };
2228
+ body: string;
2229
+ concurrency: number;
2230
+ maxItems: number;
2231
+ }
2232
+ | {
2233
+ id: string;
2234
+ kind: "repeat";
2235
+ body: string;
2236
+ maxRounds: number;
2237
+ until: Predicate;
2238
+ }
2239
+ | {
2240
+ id: string;
2241
+ kind: "wait";
2242
+ for: number;
2243
+ }
2244
+ | {
2245
+ id: string;
2246
+ kind: "transform";
2247
+ fields: {
2248
+ [key: string]: Mapping;
2249
+ };
2250
+ })[];
2251
+ edges: readonly object[];
2252
+ output: {
2253
+ [key: string]: object;
2254
+ };
2255
+ };
2256
+ layout: {
2257
+ [key: string]: object;
2258
+ };
2259
+ provenance?: | {
2260
+ kind: "import";
2261
+ workflowId: string;
2262
+ version: number;
2263
+ commit: string;
2264
+ sha256: string & object;
2265
+ origin?: string;
2266
+ }
2267
+ | {
2268
+ kind: "fork";
2269
+ workflowId: string;
2270
+ commit: string;
2271
+ };
2272
+ };
2273
+ }
2274
+ | {
2275
+ kind: "invalid";
2276
+ issues: readonly Issue[];
2277
+ }>;
2278
+ ```
2279
+
2280
+ Decode a pushed file separately from the admitted catalog's semantic validation.
2281
+
2282
+ #### Parameters
2283
+
2284
+ | Parameter | Type |
2285
+ | ------------ | ------------------------------------- |
2286
+ | `git` | [`WorkflowReadGit`](#workflowreadgit) |
2287
+ | `workflowId` | `string` |
2288
+ | `commit` | `string` |
2289
+
2290
+ #### Returns
2291
+
2292
+ `Promise`\< \| \{ `kind`: `"missing"`; \} \| \{ `kind`: `"valid"`; `draft`: \{
2293
+ `definition`: \{ `format`: `"fungi.workflow/v1"`; `title`: `string`;
2294
+ `description?`: `string`; `apps`: \{ \[`key`: `string`\]: `object`; \};
2295
+ `subgraphs?`: \{ \[`key`: `string`\]: `object`; \}; `triggers?`: readonly ( \|
2296
+ \{ `id`: `string`; `on`: `"webhook"`; `title?`: `string`; `when?`: `Predicate`;
2297
+ `input?`: \{ \[`key`: ...\]: ...; \}; \} \| \{ `id`: `string`; `on`:
2298
+ `"schedule"`; `title?`: `string`; `cron`: \{ `expression`: `string`; `timeZone`:
2299
+ `string`; \}; `input?`: \{ \[`key`: ...\]: ...; \}; \} \| \{ `id`: `string`;
2300
+ `on`: `"event"`; `title?`: `string`; `app`: `string`; `event`: `string`;
2301
+ `eventDigest`: `string`; `when?`: `Predicate`; `input?`: \{ \[`key`: ...\]: ...;
2302
+ \}; `repository?`: `Mapping`; \})[]; `input`: \{ \[`key`: `string`\]: `Json`;
2303
+ \}; `nodes`: readonly ( \| \{ `id`: `string`; `kind`: `"code"`; `source`:
2304
+ `string`; `input`: \{ \[`key`: `string`\]: `Json`; \}; `output`: \{ \[`key`:
2305
+ `string`\]: `Json`; \}; `values`: \{ \[`key`: `string`\]: `Mapping`; \}; \} \|
2306
+ \{ `id`: `string`; `kind`: `"app"`; `app`: `string`; `method`: `string`;
2307
+ `methodDigest`: `string`; `values`: \{ \[`key`: `string`\]: `Mapping`; \};
2308
+ `gitAccess?`: \| \{ `binding`: `string`; `repository`: `string`; `branches`:
2309
+ ...[]; \} \| \{ `binding`: `string`; `repository`: `string`; `access`: `"read"`;
2310
+ \}; `retry?`: \{ `attempts`: `number`; \}; \} \| \{ `id`: `string`; `kind`:
2311
+ `"review"`; `title`: `string`; `detail?`: `string`; `show`: readonly `object`[];
2312
+ `reviewers`: `"runner"` \| `"owners"`; `timeout`: `number`; `choices?`: readonly
2313
+ `object`[]; \} \| \{ `id`: `string`; `kind`: `"condition"`; `test`: `Predicate`;
2314
+ \} \| \{ `id`: `string`; `kind`: `"map"`; `over`: \{ `node`: `string`; `port`:
2315
+ `string`; \}; `body`: `string`; `concurrency`: `number`; `maxItems`: `number`;
2316
+ \} \| \{ `id`: `string`; `kind`: `"repeat"`; `body`: `string`; `maxRounds`:
2317
+ `number`; `until`: `Predicate`; \} \| \{ `id`: `string`; `kind`: `"wait"`;
2318
+ `for`: `number`; \} \| \{ `id`: `string`; `kind`: `"transform"`; `fields`: \{
2319
+ \[`key`: `string`\]: `Mapping`; \}; \})[]; `edges`: readonly `object`[];
2320
+ `output`: \{ \[`key`: `string`\]: `object`; \}; \}; `layout`: \{ \[`key`:
2321
+ `string`\]: `object`; \}; `provenance?`: \| \{ `kind`: `"import"`; `workflowId`:
2322
+ `string`; `version`: `number`; `commit`: `string`; `sha256`: `string` &
2323
+ `object`; `origin?`: `string`; \} \| \{ `kind`: `"fork"`; `workflowId`:
2324
+ `string`; `commit`: `string`; \}; \}; \} \| \{ `kind`: `"invalid"`; `issues`:
2325
+ readonly `Issue`[]; \}\>
2326
+
2327
+ ---
2328
+
2329
+ ### readWorkflowAt()
2330
+
2331
+ ```ts
2332
+ function readWorkflowAt(
2333
+ git,
2334
+ workflowId,
2335
+ commit,
2336
+ ): Promise<WorkflowDocument | null>;
2337
+ ```
2338
+
2339
+ One Workflow's file at `commit`, or null when it is absent or invalid.
2340
+
2341
+ #### Parameters
2342
+
2343
+ | Parameter | Type |
2344
+ | ------------ | ------------------------------------- |
2345
+ | `git` | [`WorkflowReadGit`](#workflowreadgit) |
2346
+ | `workflowId` | `string` |
2347
+ | `commit` | `string` \| `null` |
2348
+
2349
+ #### Returns
2350
+
2351
+ `Promise`\<[`WorkflowDocument`](#workflowdocument) \| `null`\>
2352
+
2353
+ ---
2354
+
2355
+ ### versionRefs()
2356
+
2357
+ ```ts
2358
+ function versionRefs(workflowId, references): object[];
2359
+ ```
2360
+
2361
+ A Workflow's published versions, newest first, from its `<id>@v<n>` tags.
2362
+
2363
+ #### Parameters
2364
+
2365
+ | Parameter | Type |
2366
+ | ------------ | ---------- |
2367
+ | `workflowId` | `string` |
2368
+ | `references` | `object`[] |
2369
+
2370
+ #### Returns
2371
+
2372
+ `object`[]
2373
+
2374
+ ---
2375
+
2376
+ ### workflowCommitIsAncestor()
2377
+
2378
+ ```ts
2379
+ function workflowCommitIsAncestor(git, before, after): Promise<boolean>;
2380
+ ```
2381
+
2382
+ Batched first-parent reads retain every merge parent; the caller owns its IO
2383
+ budget.
2384
+
2385
+ #### Parameters
2386
+
2387
+ | Parameter | Type |
2388
+ | --------- | ------------ |
2389
+ | `git` | `GitBinding` |
2390
+ | `before` | `string` |
2391
+ | `after` | `string` |
2392
+
2393
+ #### Returns
2394
+
2395
+ `Promise`\<`boolean`\>
2396
+
2397
+ ---
2398
+
2399
+ ### listingGit()
2400
+
2401
+ ```ts
2402
+ function listingGit(git): WorkflowReadGit;
2403
+ ```
2404
+
2405
+ Each Git object read at most once while one listing runs.
2406
+
2407
+ #### Parameters
2408
+
2409
+ | Parameter | Type |
2410
+ | --------- | ------------ |
2411
+ | `git` | `GitBinding` |
2412
+
2413
+ #### Returns
2414
+
2415
+ [`WorkflowReadGit`](#workflowreadgit)
2416
+
2417
+ ---
2418
+
2419
+ ### readPublishedWorkflow()
2420
+
2421
+ ```ts
2422
+ function readPublishedWorkflow(
2423
+ git,
2424
+ workflowId,
2425
+ at,
2426
+ copied?,
2427
+ ): Promise<(object & object & object) | null>;
2428
+ ```
2429
+
2430
+ One published Workflow: a version tag, or a commit, on `main`'s ancestry.
2431
+ `copied` answers from a caller's own read copy of that commit when it has one;
2432
+ otherwise the file is read from Git within a bounded read budget.
2433
+
2434
+ #### Parameters
2435
+
2436
+ | Parameter | Type |
2437
+ | ------------ | --------------------------------------------------------------- |
2438
+ | `git` | `GitBinding` |
2439
+ | `workflowId` | `string` |
2440
+ | `at` | \| \{ `version`: `number`; \} \| \{ `commit`: `string`; \} |
2441
+ | `copied` | (`commit`) => [`WorkflowDocument`](#workflowdocument) \| `null` |
2442
+
2443
+ #### Returns
2444
+
2445
+ `Promise`\<`object` & `object` & `object` \| `null`\>