@fungi.computer/braid 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.
@@ -191,6 +191,7 @@ export declare const graphRunSchema: S.Struct<{
191
191
  readonly id: S.String;
192
192
  readonly kind: S.Literal<"review">;
193
193
  readonly title: S.String;
194
+ readonly detail: S.optionalKey<S.String>;
194
195
  readonly show: S.$Array<S.Struct<{
195
196
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
196
197
  readonly port: S.String;
@@ -200,6 +201,7 @@ export declare const graphRunSchema: S.Struct<{
200
201
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
201
202
  readonly id: S.String;
202
203
  readonly label: S.String;
204
+ readonly description: S.optionalKey<S.String>;
203
205
  }>>>;
204
206
  }>, S.Struct<{
205
207
  readonly id: S.String;
@@ -310,6 +312,7 @@ export declare const graphRunSchema: S.Struct<{
310
312
  readonly id: S.String;
311
313
  readonly kind: S.Literal<"review">;
312
314
  readonly title: S.String;
315
+ readonly detail: S.optionalKey<S.String>;
313
316
  readonly show: S.$Array<S.Struct<{
314
317
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
315
318
  readonly port: S.String;
@@ -319,6 +322,7 @@ export declare const graphRunSchema: S.Struct<{
319
322
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
320
323
  readonly id: S.String;
321
324
  readonly label: S.String;
325
+ readonly description: S.optionalKey<S.String>;
322
326
  }>>>;
323
327
  }>, S.Struct<{
324
328
  readonly id: S.String;
@@ -412,7 +416,7 @@ export declare const graphRunSchema: S.Struct<{
412
416
  readonly graphId: S.optionalKey<S.String>;
413
417
  readonly nodeId: S.String;
414
418
  readonly level: S.Literals<readonly ["read", "write"]>;
415
- readonly capabilities: S.$Array<S.Literals<readonly ["agent.list", "agent.manage", "agent.rename", "agent.toolPolicy", "agent.read", "agent.send", "computer.list", "computer.readFile", "computer.writeFile", "computer.execute", "llm.generation", "media.generation", "games:servers", "git.repository", "apps.open", "apps.call", "app.storage", "app.events.emit", "team.workbenchHost", "marketplace.browse", "marketplace.purchase", "workflow.run", "workflow.publish", "workflow.arm", "world", "channels.read", "channels.personal.manage"]>>;
419
+ readonly capabilities: S.$Array<S.Literals<readonly ["agent.list", "agent.manage", "agent.rename", "agent.avatar", "agent.toolPolicy", "agent.read", "agent.send", "computer.list", "computer.readFile", "computer.writeFile", "computer.execute", "llm.generation", "media.generation", "games:servers", "git.repository", "apps.open", "apps.call", "app.storage", "app.events.emit", "team.workbenchHost", "marketplace.browse", "marketplace.purchase", "workflow.run", "workflow.publish", "workflow.arm", "world", "channels.read", "channels.personal.manage"]>>;
416
420
  readonly bindings: S.$Array<S.Union<S.Struct<{
417
421
  readonly name: S.Literal<"BACKGROUND" | "GIT" | "EVENTS" | "APPS" | "WORKFLOWS" | "APP_STORAGE" | "MEDIA" | "COMPUTER" | "INBOX" | "AGENTS">;
418
422
  readonly operations: S.$Array<S.Literals<string[]>>;
@@ -59,6 +59,12 @@ export declare function createGraphWorkflowRuns(options: {
59
59
  readonly iteration: string;
60
60
  readonly instanceId: string;
61
61
  readonly eventType: string;
62
+ readonly position?: readonly {
63
+ readonly node: string;
64
+ readonly loop: "repeat" | "map";
65
+ readonly index: number;
66
+ readonly count: number;
67
+ }[];
62
68
  readonly choices?: readonly string[];
63
69
  };
64
70
  status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
@@ -1,4 +1,5 @@
1
1
  import type { Pending } from "@fungi.computer/agar/backend-definition";
2
+ import type { ResultRow } from "@fungi.computer/gills";
2
3
  import type { RunCeiling } from "./run-ceiling.js";
3
4
  import type { Catalog } from "../index.js";
4
5
  import type * as Schema from "effect/Schema";
@@ -35,6 +36,8 @@ export type WorkflowAppCallResult = Pending | Readonly<{
35
36
  kind: "complete";
36
37
  output: Schema.Json;
37
38
  costMilliunits: number;
39
+ /** How the finished call reads to a person, when the App declares a presentation. */
40
+ row?: ResultRow;
38
41
  }> | Readonly<{
39
42
  kind: "refused";
40
43
  code: "not_granted" | "invalid_input" | "invalid_output" | "revoked" | "unknown_method";
@@ -51,7 +51,7 @@ export declare const runCeilingSchema: S.Struct<{
51
51
  readonly graphId: S.optionalKey<S.String>;
52
52
  readonly nodeId: S.String;
53
53
  readonly level: S.Literals<readonly ["read", "write"]>;
54
- readonly capabilities: S.$Array<S.Literals<readonly ["agent.list", "agent.manage", "agent.rename", "agent.toolPolicy", "agent.read", "agent.send", "computer.list", "computer.readFile", "computer.writeFile", "computer.execute", "llm.generation", "media.generation", "games:servers", "git.repository", "apps.open", "apps.call", "app.storage", "app.events.emit", "team.workbenchHost", "marketplace.browse", "marketplace.purchase", "workflow.run", "workflow.publish", "workflow.arm", "world", "channels.read", "channels.personal.manage"]>>;
54
+ readonly capabilities: S.$Array<S.Literals<readonly ["agent.list", "agent.manage", "agent.rename", "agent.avatar", "agent.toolPolicy", "agent.read", "agent.send", "computer.list", "computer.readFile", "computer.writeFile", "computer.execute", "llm.generation", "media.generation", "games:servers", "git.repository", "apps.open", "apps.call", "app.storage", "app.events.emit", "team.workbenchHost", "marketplace.browse", "marketplace.purchase", "workflow.run", "workflow.publish", "workflow.arm", "world", "channels.read", "channels.personal.manage"]>>;
55
55
  readonly bindings: S.$Array<S.Union<S.Struct<{
56
56
  readonly name: S.Literal<"BACKGROUND" | "GIT" | "EVENTS" | "APPS" | "WORKFLOWS" | "APP_STORAGE" | "MEDIA" | "COMPUTER" | "INBOX" | "AGENTS">;
57
57
  readonly operations: S.$Array<S.Literals<string[]>>;
@@ -66,6 +66,7 @@ export declare const memberCompiledGraphStartSchema: S.Struct<{
66
66
  readonly id: S.String;
67
67
  readonly kind: S.Literal<"review">;
68
68
  readonly title: S.String;
69
+ readonly detail: S.optionalKey<S.String>;
69
70
  readonly show: S.$Array<S.Struct<{
70
71
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
71
72
  readonly port: S.String;
@@ -75,6 +76,7 @@ export declare const memberCompiledGraphStartSchema: S.Struct<{
75
76
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
76
77
  readonly id: S.String;
77
78
  readonly label: S.String;
79
+ readonly description: S.optionalKey<S.String>;
78
80
  }>>>;
79
81
  }>, S.Struct<{
80
82
  readonly id: S.String;
@@ -185,6 +187,7 @@ export declare const memberCompiledGraphStartSchema: S.Struct<{
185
187
  readonly id: S.String;
186
188
  readonly kind: S.Literal<"review">;
187
189
  readonly title: S.String;
190
+ readonly detail: S.optionalKey<S.String>;
188
191
  readonly show: S.$Array<S.Struct<{
189
192
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
190
193
  readonly port: S.String;
@@ -194,6 +197,7 @@ export declare const memberCompiledGraphStartSchema: S.Struct<{
194
197
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
195
198
  readonly id: S.String;
196
199
  readonly label: S.String;
200
+ readonly description: S.optionalKey<S.String>;
197
201
  }>>>;
198
202
  }>, S.Struct<{
199
203
  readonly id: S.String;
@@ -336,6 +340,7 @@ export declare function createTeamWorkflowRuns(options: {
336
340
  readonly source: "key" | "manual" | "event" | "schedule" | "agent";
337
341
  readonly runId: string;
338
342
  readonly computerId: string | null;
343
+ readonly teamId: string;
339
344
  readonly plan: {
340
345
  readonly planDigest: string;
341
346
  readonly definition: {
@@ -394,9 +399,11 @@ export declare function createTeamWorkflowRuns(options: {
394
399
  readonly timeout: number;
395
400
  readonly kind: "review";
396
401
  readonly reviewers: "runner" | "owners";
402
+ readonly detail?: string;
397
403
  readonly choices?: readonly {
398
404
  readonly id: string;
399
405
  readonly label: string;
406
+ readonly description?: string;
400
407
  }[];
401
408
  } | {
402
409
  readonly id: string;
@@ -495,9 +502,11 @@ export declare function createTeamWorkflowRuns(options: {
495
502
  readonly timeout: number;
496
503
  readonly kind: "review";
497
504
  readonly reviewers: "runner" | "owners";
505
+ readonly detail?: string;
498
506
  readonly choices?: readonly {
499
507
  readonly id: string;
500
508
  readonly label: string;
509
+ readonly description?: string;
501
510
  }[];
502
511
  } | {
503
512
  readonly id: string;
@@ -636,7 +645,6 @@ export declare function createTeamWorkflowRuns(options: {
636
645
  readonly pending?: true;
637
646
  }[];
638
647
  };
639
- readonly teamId: string;
640
648
  readonly requestId: string;
641
649
  readonly actorId: string;
642
650
  readonly ceiling: {
@@ -647,7 +655,7 @@ export declare function createTeamWorkflowRuns(options: {
647
655
  readonly operations: readonly string[];
648
656
  }[];
649
657
  readonly nodeId: string;
650
- readonly capabilities: readonly ("agent.list" | "agent.manage" | "agent.rename" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
658
+ readonly capabilities: readonly ("agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
651
659
  readonly graphId?: string;
652
660
  }[];
653
661
  readonly nodeGitAccess: readonly {
@@ -896,9 +904,11 @@ export declare function createTeamWorkflowRuns(options: {
896
904
  readonly timeout: number;
897
905
  readonly kind: "review";
898
906
  readonly reviewers: "runner" | "owners";
907
+ readonly detail?: string;
899
908
  readonly choices?: readonly {
900
909
  readonly id: string;
901
910
  readonly label: string;
911
+ readonly description?: string;
902
912
  }[];
903
913
  } | {
904
914
  readonly id: string;
@@ -997,9 +1007,11 @@ export declare function createTeamWorkflowRuns(options: {
997
1007
  readonly timeout: number;
998
1008
  readonly kind: "review";
999
1009
  readonly reviewers: "runner" | "owners";
1010
+ readonly detail?: string;
1000
1011
  readonly choices?: readonly {
1001
1012
  readonly id: string;
1002
1013
  readonly label: string;
1014
+ readonly description?: string;
1003
1015
  }[];
1004
1016
  } | {
1005
1017
  readonly id: string;
@@ -1274,9 +1286,11 @@ export declare function createTeamWorkflowRuns(options: {
1274
1286
  readonly timeout: number;
1275
1287
  readonly kind: "review";
1276
1288
  readonly reviewers: "runner" | "owners";
1289
+ readonly detail?: string;
1277
1290
  readonly choices?: readonly {
1278
1291
  readonly id: string;
1279
1292
  readonly label: string;
1293
+ readonly description?: string;
1280
1294
  }[];
1281
1295
  } | {
1282
1296
  readonly id: string;
@@ -1375,9 +1389,11 @@ export declare function createTeamWorkflowRuns(options: {
1375
1389
  readonly timeout: number;
1376
1390
  readonly kind: "review";
1377
1391
  readonly reviewers: "runner" | "owners";
1392
+ readonly detail?: string;
1378
1393
  readonly choices?: readonly {
1379
1394
  readonly id: string;
1380
1395
  readonly label: string;
1396
+ readonly description?: string;
1381
1397
  }[];
1382
1398
  } | {
1383
1399
  readonly id: string;
@@ -1583,7 +1599,7 @@ export declare function createTeamWorkflowRuns(options: {
1583
1599
  list(filter: {
1584
1600
  installationId: string;
1585
1601
  actorId?: string;
1586
- workflowId?: string;
1602
+ workflowId? /** A report names its Workflows library, so only a library run may declare one. */: string;
1587
1603
  }): readonly (GraphRun & {
1588
1604
  startedAt: number;
1589
1605
  })[];
@@ -1606,6 +1622,12 @@ export declare function createTeamWorkflowRuns(options: {
1606
1622
  readonly iteration: string;
1607
1623
  readonly instanceId: string;
1608
1624
  readonly eventType: string;
1625
+ readonly position?: readonly {
1626
+ readonly node: string;
1627
+ readonly loop: "repeat" | "map";
1628
+ readonly index: number;
1629
+ readonly count: number;
1630
+ }[];
1609
1631
  readonly choices?: readonly string[];
1610
1632
  };
1611
1633
  status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
@@ -25,10 +25,10 @@ export const memberCompiledGraphStartSchema = graphRunSchema.mapFields(Struct.om
25
25
  const publisherGranted = (entries, installationId) => entries.some((entry) => entry.installationId === installationId &&
26
26
  entry.workflowPublishGranted === true &&
27
27
  entry.capabilities?.includes("workflow.publish") === true);
28
- const workflowNodeTargetSchema = z.strictObject({
28
+ const workflowNodeTargetSchema = z.lazy(() => z.strictObject({
29
29
  installationId: z.string().min(1).max(256),
30
30
  method: z.string().min(1).max(256),
31
- });
31
+ }));
32
32
  /**
33
33
  * The one Workflow run owner: graph runs, their captured authority, trigger
34
34
  * reservations and revocation. Every run, Storyboard included, is a graph run.
@@ -14,9 +14,9 @@ export declare const workflowTriggerTargetSchema: z.ZodObject<{
14
14
  readonly appReleaseKind: "Sha256Digest";
15
15
  }, string>>;
16
16
  triggerId: z.ZodString;
17
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
17
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
18
18
  kind: z.ZodLiteral<"team-source">;
19
- }, z.core.$strict>]>>;
19
+ }, z.core.$strict>>]>>;
20
20
  delivery: z.ZodOptional<z.ZodCustom<{
21
21
  readonly agentId: string;
22
22
  readonly sessionId: string;
@@ -65,9 +65,9 @@ export declare const armedWorkflowTriggerSchema: z.ZodObject<{
65
65
  readonly appReleaseKind: "Sha256Digest";
66
66
  }, string>>;
67
67
  triggerId: z.ZodString;
68
- bindings: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
68
+ bindings: z.ZodRecord<z.ZodLazy<z.ZodString>, z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodObject<{
69
69
  kind: z.ZodLiteral<"team-source">;
70
- }, z.core.$strict>]>>;
70
+ }, z.core.$strict>>]>>;
71
71
  delivery: z.ZodOptional<z.ZodCustom<{
72
72
  readonly agentId: string;
73
73
  readonly sessionId: string;
@@ -382,9 +382,11 @@ export declare function createTeamWorkflowTriggers(options: {
382
382
  readonly timeout: number;
383
383
  readonly kind: "review";
384
384
  readonly reviewers: "runner" | "owners";
385
+ readonly detail?: string;
385
386
  readonly choices?: readonly {
386
387
  readonly id: string;
387
388
  readonly label: string;
389
+ readonly description?: string;
388
390
  }[];
389
391
  } | {
390
392
  readonly id: string;
@@ -483,9 +485,11 @@ export declare function createTeamWorkflowTriggers(options: {
483
485
  readonly timeout: number;
484
486
  readonly kind: "review";
485
487
  readonly reviewers: "runner" | "owners";
488
+ readonly detail?: string;
486
489
  readonly choices?: readonly {
487
490
  readonly id: string;
488
491
  readonly label: string;
492
+ readonly description?: string;
489
493
  }[];
490
494
  } | {
491
495
  readonly id: string;
@@ -138,9 +138,11 @@ export declare function createTriggerPlans(sql: WatchdogSqliteOwner["sql"]): {
138
138
  readonly timeout: number;
139
139
  readonly kind: "review";
140
140
  readonly reviewers: "runner" | "owners";
141
+ readonly detail?: string;
141
142
  readonly choices?: readonly {
142
143
  readonly id: string;
143
144
  readonly label: string;
145
+ readonly description?: string;
144
146
  }[];
145
147
  } | {
146
148
  readonly id: string;
@@ -239,9 +241,11 @@ export declare function createTriggerPlans(sql: WatchdogSqliteOwner["sql"]): {
239
241
  readonly timeout: number;
240
242
  readonly kind: "review";
241
243
  readonly reviewers: "runner" | "owners";
244
+ readonly detail?: string;
242
245
  readonly choices?: readonly {
243
246
  readonly id: string;
244
247
  readonly label: string;
248
+ readonly description?: string;
245
249
  }[];
246
250
  } | {
247
251
  readonly id: string;
@@ -516,9 +520,11 @@ export declare function createTriggerPlans(sql: WatchdogSqliteOwner["sql"]): {
516
520
  readonly timeout: number;
517
521
  readonly kind: "review";
518
522
  readonly reviewers: "runner" | "owners";
523
+ readonly detail?: string;
519
524
  readonly choices?: readonly {
520
525
  readonly id: string;
521
526
  readonly label: string;
527
+ readonly description?: string;
522
528
  }[];
523
529
  } | {
524
530
  readonly id: string;
@@ -617,9 +623,11 @@ export declare function createTriggerPlans(sql: WatchdogSqliteOwner["sql"]): {
617
623
  readonly timeout: number;
618
624
  readonly kind: "review";
619
625
  readonly reviewers: "runner" | "owners";
626
+ readonly detail?: string;
620
627
  readonly choices?: readonly {
621
628
  readonly id: string;
622
629
  readonly label: string;
630
+ readonly description?: string;
623
631
  }[];
624
632
  } | {
625
633
  readonly id: string;
@@ -1,11 +1,11 @@
1
1
  import { z } from "zod";
2
2
  import type { WatchdogSqliteOwner } from "@fungi.computer/watchdog";
3
- declare const triggerRunScopeSchema: z.ZodObject<{
3
+ declare const triggerRunScopeSchema: z.ZodLazy<z.ZodObject<{
4
4
  installationId: z.ZodString;
5
5
  workflowId: z.ZodString;
6
6
  commit: z.ZodString;
7
7
  triggerId: z.ZodString;
8
- }, z.core.$strict>;
8
+ }, z.core.$strict>>;
9
9
  export type TriggerRunScope = z.output<typeof triggerRunScopeSchema>;
10
10
  /** The enclosing Team owner supplies SQLite; callers never select the Team. */
11
11
  export declare function createTriggerRunReservations(options: Pick<WatchdogSqliteOwner, "sql" | "transactionSync">): {
@@ -8,22 +8,22 @@ const reservationIds = defineIdFamily({
8
8
  kinds: { reservation: { prefix: "wf_trigger_reservation" } },
9
9
  });
10
10
  const identity = z.string().min(1).max(256);
11
- const triggerRunScopeSchema = z.strictObject({
11
+ const triggerRunScopeSchema = z.lazy(() => z.strictObject({
12
12
  installationId: identity,
13
13
  workflowId: workflowIdSchema,
14
14
  commit: gitSha1Schema,
15
15
  triggerId: z.string().min(1).max(80),
16
- });
17
- const reservationInputSchema = z.strictObject({
16
+ }));
17
+ const reservationInputSchema = z.lazy(() => z.strictObject({
18
18
  scope: triggerRunScopeSchema,
19
19
  requestId: z.string().min(1).max(1024),
20
- });
21
- const rowSchema = z.object({
20
+ }));
21
+ const rowSchema = z.lazy(() => z.object({
22
22
  reservation_id: identity,
23
23
  run_id: identity.nullable(),
24
24
  status: z.enum(["active", "released", "terminal"]),
25
- });
26
- const countSchema = z.object({ count: z.number().int().nonnegative() });
25
+ }));
26
+ const countSchema = z.lazy(() => z.object({ count: z.number().int().nonnegative() }));
27
27
  const scopeKey = (scope) => {
28
28
  const parsed = triggerRunScopeSchema.parse(scope);
29
29
  return JSON.stringify([
package/dist/schema.d.ts CHANGED
@@ -94,6 +94,12 @@ export declare const nodeSchema: S.Union<readonly [S.Struct<{
94
94
  readonly id: S.String;
95
95
  readonly kind: S.Literal<"review">;
96
96
  readonly title: S.String;
97
+ /**
98
+ * One plain line under the title saying where the run is, such as
99
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
100
+ * filled from the loops around the review (see `fillReviewText`).
101
+ */
102
+ readonly detail: S.optionalKey<S.String>;
97
103
  readonly show: S.$Array<S.Struct<{
98
104
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
99
105
  readonly port: S.String;
@@ -102,11 +108,14 @@ export declare const nodeSchema: S.Union<readonly [S.Struct<{
102
108
  readonly timeout: S.Number;
103
109
  /**
104
110
  * Named outcomes a reviewer picks from; each is an output port carrying
105
- * the shown item. Without choices the review approves or rejects.
111
+ * the shown item. Without choices the review approves or rejects. A
112
+ * choice's `description` says in plain words what picking it does, with
113
+ * the same placeholders as `detail`.
106
114
  */
107
115
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
108
116
  readonly id: S.String;
109
117
  readonly label: S.String;
118
+ readonly description: S.optionalKey<S.String>;
110
119
  }>>>;
111
120
  }>, S.Struct<{
112
121
  readonly id: S.String;
@@ -199,6 +208,12 @@ export declare const graphSchema: S.Struct<{
199
208
  readonly id: S.String;
200
209
  readonly kind: S.Literal<"review">;
201
210
  readonly title: S.String;
211
+ /**
212
+ * One plain line under the title saying where the run is, such as
213
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
214
+ * filled from the loops around the review (see `fillReviewText`).
215
+ */
216
+ readonly detail: S.optionalKey<S.String>;
202
217
  readonly show: S.$Array<S.Struct<{
203
218
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
204
219
  readonly port: S.String;
@@ -207,11 +222,14 @@ export declare const graphSchema: S.Struct<{
207
222
  readonly timeout: S.Number;
208
223
  /**
209
224
  * Named outcomes a reviewer picks from; each is an output port carrying
210
- * the shown item. Without choices the review approves or rejects.
225
+ * the shown item. Without choices the review approves or rejects. A
226
+ * choice's `description` says in plain words what picking it does, with
227
+ * the same placeholders as `detail`.
211
228
  */
212
229
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
213
230
  readonly id: S.String;
214
231
  readonly label: S.String;
232
+ readonly description: S.optionalKey<S.String>;
215
233
  }>>>;
216
234
  }>, S.Struct<{
217
235
  readonly id: S.String;
@@ -306,6 +324,12 @@ export declare const workflowDefinitionSchema: S.Struct<{
306
324
  readonly id: S.String;
307
325
  readonly kind: S.Literal<"review">;
308
326
  readonly title: S.String;
327
+ /**
328
+ * One plain line under the title saying where the run is, such as
329
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
330
+ * filled from the loops around the review (see `fillReviewText`).
331
+ */
332
+ readonly detail: S.optionalKey<S.String>;
309
333
  readonly show: S.$Array<S.Struct<{
310
334
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
311
335
  readonly port: S.String;
@@ -314,11 +338,14 @@ export declare const workflowDefinitionSchema: S.Struct<{
314
338
  readonly timeout: S.Number;
315
339
  /**
316
340
  * Named outcomes a reviewer picks from; each is an output port carrying
317
- * the shown item. Without choices the review approves or rejects.
341
+ * the shown item. Without choices the review approves or rejects. A
342
+ * choice's `description` says in plain words what picking it does, with
343
+ * the same placeholders as `detail`.
318
344
  */
319
345
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
320
346
  readonly id: S.String;
321
347
  readonly label: S.String;
348
+ readonly description: S.optionalKey<S.String>;
322
349
  }>>>;
323
350
  }>, S.Struct<{
324
351
  readonly id: S.String;
@@ -434,6 +461,12 @@ export declare const workflowDefinitionSchema: S.Struct<{
434
461
  readonly id: S.String;
435
462
  readonly kind: S.Literal<"review">;
436
463
  readonly title: S.String;
464
+ /**
465
+ * One plain line under the title saying where the run is, such as
466
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
467
+ * filled from the loops around the review (see `fillReviewText`).
468
+ */
469
+ readonly detail: S.optionalKey<S.String>;
437
470
  readonly show: S.$Array<S.Struct<{
438
471
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
439
472
  readonly port: S.String;
@@ -442,11 +475,14 @@ export declare const workflowDefinitionSchema: S.Struct<{
442
475
  readonly timeout: S.Number;
443
476
  /**
444
477
  * Named outcomes a reviewer picks from; each is an output port carrying
445
- * the shown item. Without choices the review approves or rejects.
478
+ * the shown item. Without choices the review approves or rejects. A
479
+ * choice's `description` says in plain words what picking it does, with
480
+ * the same placeholders as `detail`.
446
481
  */
447
482
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
448
483
  readonly id: S.String;
449
484
  readonly label: S.String;
485
+ readonly description: S.optionalKey<S.String>;
450
486
  }>>>;
451
487
  }>, S.Struct<{
452
488
  readonly id: S.String;
@@ -595,6 +631,12 @@ export declare const planContentSchema: S.Struct<{
595
631
  readonly id: S.String;
596
632
  readonly kind: S.Literal<"review">;
597
633
  readonly title: S.String;
634
+ /**
635
+ * One plain line under the title saying where the run is, such as
636
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
637
+ * filled from the loops around the review (see `fillReviewText`).
638
+ */
639
+ readonly detail: S.optionalKey<S.String>;
598
640
  readonly show: S.$Array<S.Struct<{
599
641
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
600
642
  readonly port: S.String;
@@ -603,11 +645,14 @@ export declare const planContentSchema: S.Struct<{
603
645
  readonly timeout: S.Number;
604
646
  /**
605
647
  * Named outcomes a reviewer picks from; each is an output port carrying
606
- * the shown item. Without choices the review approves or rejects.
648
+ * the shown item. Without choices the review approves or rejects. A
649
+ * choice's `description` says in plain words what picking it does, with
650
+ * the same placeholders as `detail`.
607
651
  */
608
652
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
609
653
  readonly id: S.String;
610
654
  readonly label: S.String;
655
+ readonly description: S.optionalKey<S.String>;
611
656
  }>>>;
612
657
  }>, S.Struct<{
613
658
  readonly id: S.String;
@@ -723,6 +768,12 @@ export declare const planContentSchema: S.Struct<{
723
768
  readonly id: S.String;
724
769
  readonly kind: S.Literal<"review">;
725
770
  readonly title: S.String;
771
+ /**
772
+ * One plain line under the title saying where the run is, such as
773
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
774
+ * filled from the loops around the review (see `fillReviewText`).
775
+ */
776
+ readonly detail: S.optionalKey<S.String>;
726
777
  readonly show: S.$Array<S.Struct<{
727
778
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
728
779
  readonly port: S.String;
@@ -731,11 +782,14 @@ export declare const planContentSchema: S.Struct<{
731
782
  readonly timeout: S.Number;
732
783
  /**
733
784
  * Named outcomes a reviewer picks from; each is an output port carrying
734
- * the shown item. Without choices the review approves or rejects.
785
+ * the shown item. Without choices the review approves or rejects. A
786
+ * choice's `description` says in plain words what picking it does, with
787
+ * the same placeholders as `detail`.
735
788
  */
736
789
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
737
790
  readonly id: S.String;
738
791
  readonly label: S.String;
792
+ readonly description: S.optionalKey<S.String>;
739
793
  }>>>;
740
794
  }>, S.Struct<{
741
795
  readonly id: S.String;
@@ -876,6 +930,12 @@ export declare const executionPlanSchema: S.Struct<{
876
930
  readonly id: S.String;
877
931
  readonly kind: S.Literal<"review">;
878
932
  readonly title: S.String;
933
+ /**
934
+ * One plain line under the title saying where the run is, such as
935
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
936
+ * filled from the loops around the review (see `fillReviewText`).
937
+ */
938
+ readonly detail: S.optionalKey<S.String>;
879
939
  readonly show: S.$Array<S.Struct<{
880
940
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
881
941
  readonly port: S.String;
@@ -884,11 +944,14 @@ export declare const executionPlanSchema: S.Struct<{
884
944
  readonly timeout: S.Number;
885
945
  /**
886
946
  * Named outcomes a reviewer picks from; each is an output port carrying
887
- * the shown item. Without choices the review approves or rejects.
947
+ * the shown item. Without choices the review approves or rejects. A
948
+ * choice's `description` says in plain words what picking it does, with
949
+ * the same placeholders as `detail`.
888
950
  */
889
951
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
890
952
  readonly id: S.String;
891
953
  readonly label: S.String;
954
+ readonly description: S.optionalKey<S.String>;
892
955
  }>>>;
893
956
  }>, S.Struct<{
894
957
  readonly id: S.String;
@@ -1004,6 +1067,12 @@ export declare const executionPlanSchema: S.Struct<{
1004
1067
  readonly id: S.String;
1005
1068
  readonly kind: S.Literal<"review">;
1006
1069
  readonly title: S.String;
1070
+ /**
1071
+ * One plain line under the title saying where the run is, such as
1072
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
1073
+ * filled from the loops around the review (see `fillReviewText`).
1074
+ */
1075
+ readonly detail: S.optionalKey<S.String>;
1007
1076
  readonly show: S.$Array<S.Struct<{
1008
1077
  readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
1009
1078
  readonly port: S.String;
@@ -1012,11 +1081,14 @@ export declare const executionPlanSchema: S.Struct<{
1012
1081
  readonly timeout: S.Number;
1013
1082
  /**
1014
1083
  * Named outcomes a reviewer picks from; each is an output port carrying
1015
- * the shown item. Without choices the review approves or rejects.
1084
+ * the shown item. Without choices the review approves or rejects. A
1085
+ * choice's `description` says in plain words what picking it does, with
1086
+ * the same placeholders as `detail`.
1016
1087
  */
1017
1088
  readonly choices: S.optionalKey<S.$Array<S.Struct<{
1018
1089
  readonly id: S.String;
1019
1090
  readonly label: S.String;
1091
+ readonly description: S.optionalKey<S.String>;
1020
1092
  }>>>;
1021
1093
  }>, S.Struct<{
1022
1094
  readonly id: S.String;
package/dist/schema.js CHANGED
@@ -84,14 +84,26 @@ export const nodeSchema = S.Union([
84
84
  id: name,
85
85
  kind: S.Literal("review"),
86
86
  title: boundedString(120),
87
+ /**
88
+ * One plain line under the title saying where the run is, such as
89
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
90
+ * filled from the loops around the review (see `fillReviewText`).
91
+ */
92
+ detail: S.optionalKey(boundedString(160)),
87
93
  show: array(portRefSchema, 64),
88
94
  reviewers: S.Literals(["runner", "owners"]),
89
95
  timeout: duration,
90
96
  /**
91
97
  * Named outcomes a reviewer picks from; each is an output port carrying
92
- * the shown item. Without choices the review approves or rejects.
98
+ * the shown item. Without choices the review approves or rejects. A
99
+ * choice's `description` says in plain words what picking it does, with
100
+ * the same placeholders as `detail`.
93
101
  */
94
- choices: S.optionalKey(array(S.Struct({ id: name, label: boundedString(80) }), 8)),
102
+ choices: S.optionalKey(array(S.Struct({
103
+ id: name,
104
+ label: boundedString(80),
105
+ description: S.optionalKey(boundedString(160)),
106
+ }), 8)),
95
107
  }),
96
108
  S.Struct({ id: name, kind: S.Literal("condition"), test: predicateSchema }),
97
109
  S.Struct({