@voltro/plugin-ai-flows 0.83.1 → 0.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ir.d.ts CHANGED
@@ -2,11 +2,11 @@ import { Schema } from 'effect';
2
2
 
3
3
  /** A launch-form field. The run `input` is keyed by these `key`s. */
4
4
  export declare const BriefField: Schema.Struct<{
5
- key: typeof Schema.String;
6
- label: typeof Schema.String;
7
- type: Schema.Literal<["text", "textarea", "number", "boolean"]>;
8
- required: Schema.optional<typeof Schema.Boolean>;
9
- placeholder: Schema.optional<typeof Schema.String>;
5
+ readonly key: Schema.String;
6
+ readonly label: Schema.String;
7
+ readonly type: Schema.Literals<readonly ["text", "textarea", "number", "boolean"]>;
8
+ readonly required: Schema.optional<Schema.Boolean>;
9
+ readonly placeholder: Schema.optional<Schema.String>;
10
10
  }>;
11
11
 
12
12
  /** An INTERFACE for the same reason as {@link FlowStep} — it is reached from an
@@ -23,9 +23,9 @@ export declare interface BriefField {
23
23
 
24
24
  /** Staged follow-up when `chainTo.requireConfirmation` is set. */
25
25
  export declare const ChainPending: Schema.Struct<{
26
- flowRef: typeof Schema.String;
27
- input: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
28
- status: Schema.Literal<["pending", "confirmed", "dismissed"]>;
26
+ readonly flowRef: Schema.String;
27
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
28
+ readonly status: Schema.Literals<readonly ["pending", "confirmed", "dismissed"]>;
29
29
  }>;
30
30
 
31
31
  /** An INTERFACE — reached from `aiFlowRuns.chainPending`; see {@link BriefField}. */
@@ -38,17 +38,17 @@ export declare interface ChainPending {
38
38
  export declare const clampMaxSteps: (n: number | null | undefined) => number;
39
39
 
40
40
  /** The comparison a `when:` performs. */
41
- export declare const ConditionOp: Schema.Literal<["truthy", "falsy", "eq", "neq", "contains"]>;
41
+ export declare const ConditionOp: Schema.Literals<readonly ["truthy", "falsy", "eq", "neq", "contains"]>;
42
42
 
43
43
  export declare type ConditionOp = typeof ConditionOp.Type;
44
44
 
45
45
  /** A run's cost verdict over its steps: every step gateway-priced → `actual`; none unpriced → `estimated`; any unpriced → `incomplete`; no priced step → `unknown`. */
46
- export declare const CostCompleteness: Schema.Literal<["actual", "estimated", "incomplete", "unknown"]>;
46
+ export declare const CostCompleteness: Schema.Literals<readonly ["actual", "estimated", "incomplete", "unknown"]>;
47
47
 
48
48
  export declare type CostCompleteness = typeof CostCompleteness.Type;
49
49
 
50
50
  /** Where a cost figure came from. `unpriced` means the number beside it is a placeholder, not a price. */
51
- export declare const CostSource: Schema.Literal<["gateway", "estimated", "unpriced"]>;
51
+ export declare const CostSource: Schema.Literals<readonly ["gateway", "estimated", "unpriced"]>;
52
52
 
53
53
  export declare type CostSource = typeof CostSource.Type;
54
54
 
@@ -70,19 +70,19 @@ export declare const evaluateCondition: (condition: StepCondition, context: Read
70
70
  /** Schedule spec — richer than a single cron expr (weekly interval + anchor,
71
71
  * monthly weekOfMonth), evaluated by the shared `cadenceMatches` predicate. */
72
72
  export declare const FlowCadence: Schema.Struct<{
73
- frequency: Schema.optional<Schema.Literal<["weekly", "monthly"]>>;
73
+ readonly frequency: Schema.optional<Schema.Literals<readonly ["weekly", "monthly"]>>;
74
74
  /** Weekdays, 0=Monday … 6=Sunday. */
75
- repeats: Schema.Array$<typeof Schema.Number>;
75
+ readonly repeats: Schema.$Array<Schema.Number>;
76
76
  /** Weekly cycle length: 1 | 2 | 4 (anchored by anchorDate). */
77
- intervalWeeks: Schema.optional<typeof Schema.Number>;
77
+ readonly intervalWeeks: Schema.optional<Schema.Number>;
78
78
  /** ISO YYYY-MM-DD, cycle-0 week (interval > 1). */
79
- anchorDate: Schema.optional<typeof Schema.String>;
80
- weekOfMonth: Schema.optional<Schema.Union<[Schema.Literal<[1, 2, 3, 4]>, Schema.Literal<["last"]>]>>;
79
+ readonly anchorDate: Schema.optional<Schema.String>;
80
+ readonly weekOfMonth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly [1, 2, 3, 4]>, Schema.Literal<"last">]>>;
81
81
  /** 0-23, default 9. */
82
- hour: Schema.optional<typeof Schema.Number>;
83
- minute: Schema.optional<Schema.Literal<[0, 15, 30, 45]>>;
82
+ readonly hour: Schema.optional<Schema.Number>;
83
+ readonly minute: Schema.optional<Schema.Literals<readonly [0, 15, 30, 45]>>;
84
84
  /** Brief for unattended cron runs. */
85
- defaultInput: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
85
+ readonly defaultInput: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
86
86
  }>;
87
87
 
88
88
  /**
@@ -110,39 +110,39 @@ export declare interface FlowCadence {
110
110
  * The row never claims `cancelled` on its own: a confirmed engine cancellation
111
111
  * is the only receipt that reports a `cancelled` row, every other request
112
112
  * outcome leaves the row `cancelling` (or a completion that won a race). */
113
- export declare const FlowCancelReceipt: Schema.filter<Schema.Struct<{
114
- runId: typeof Schema.NonEmptyString;
115
- status: Schema.Literal<["pending", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled"]>;
116
- engine: Schema.Literal<["cancelled", "accepted", "unknown", "already-terminal", "unreachable", "not-requested"]>;
117
- control: Schema.NullOr<Schema.filter<Schema.Struct<{
118
- operation: Schema.Literal<["cancel", "resume"]>;
119
- kind: Schema.Literal<["accepted", "confirmed", "unknown", "already-terminal"]>;
120
- requestId: Schema.NullOr<typeof Schema.NonEmptyString>;
121
- snapshot: Schema.Struct<{
122
- id: typeof Schema.String;
123
- workflowName: typeof Schema.String;
124
- executionId: typeof Schema.String;
125
- status: Schema.Union<[Schema.Literal<["running", "succeeded", "failed", "cancelled", "suspended"]>, Schema.Literal<["unknown"]>]>;
126
- output: Schema.optional<typeof Schema.Unknown>;
127
- error: Schema.optional<Schema.Struct<{
128
- tag: Schema.NullOr<typeof Schema.String>;
129
- message: typeof Schema.String;
113
+ export declare const FlowCancelReceipt: Schema.Struct<{
114
+ readonly runId: Schema.NonEmptyString;
115
+ readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled"]>;
116
+ readonly engine: Schema.Literals<readonly ["cancelled", "accepted", "unknown", "already-terminal", "unreachable", "not-requested"]>;
117
+ readonly control: Schema.NullOr<Schema.Struct<{
118
+ readonly operation: Schema.Literals<readonly ["cancel", "resume"]>;
119
+ readonly kind: Schema.Literals<readonly ["accepted", "confirmed", "unknown", "already-terminal"]>;
120
+ readonly requestId: Schema.NullOr<Schema.NonEmptyString>;
121
+ readonly snapshot: Schema.Struct<{
122
+ readonly id: Schema.String;
123
+ readonly workflowName: Schema.String;
124
+ readonly executionId: Schema.String;
125
+ readonly status: Schema.Union<readonly [Schema.Literals<readonly ["running", "succeeded", "failed", "cancelled", "suspended"]>, Schema.Literal<"unknown">]>;
126
+ readonly output: Schema.optional<Schema.Unknown>;
127
+ readonly error: Schema.optional<Schema.Struct<{
128
+ readonly tag: Schema.NullOr<Schema.String>;
129
+ readonly message: Schema.String;
130
130
  }>>;
131
131
  }>;
132
- }>>>;
133
- }>>;
132
+ }>>;
133
+ }>;
134
134
 
135
135
  export declare type FlowCancelReceipt = typeof FlowCancelReceipt.Type;
136
136
 
137
137
  /** Follow-up flow spec. On success, map source → the child's brief. */
138
138
  export declare const FlowChain: Schema.Struct<{
139
139
  /** Child flow id (data) or name (code). */
140
- flowRef: typeof Schema.String;
141
- mappings: Schema.Array$<Schema.Struct<{
142
- targetKey: typeof Schema.String;
143
- sourceKey: typeof Schema.String;
140
+ readonly flowRef: Schema.String;
141
+ readonly mappings: Schema.$Array<Schema.Struct<{
142
+ readonly targetKey: Schema.String;
143
+ readonly sourceKey: Schema.String;
144
144
  }>>;
145
- requireConfirmation: Schema.optional<typeof Schema.Boolean>;
145
+ readonly requireConfirmation: Schema.optional<Schema.Boolean>;
146
146
  }>;
147
147
 
148
148
  /** An INTERFACE — reached from `aiFlows.chainTo`; see {@link BriefField}. */
@@ -192,19 +192,19 @@ export declare interface FlowIR {
192
192
  /** Execution mode. Replaces the legacy `allowDeviation` boolean — a mode is not
193
193
  * a boolean. `deterministic` runs the plan verbatim (resumable per step);
194
194
  * `agentic` lets an orchestrator LLM adapt the plan via the four tools. */
195
- export declare const FlowMode: Schema.Literal<["deterministic", "agentic"]>;
195
+ export declare const FlowMode: Schema.Literals<readonly ["deterministic", "agentic"]>;
196
196
 
197
197
  export declare type FlowMode = typeof FlowMode.Type;
198
198
 
199
199
  /** Bind the answer to the review actually displayed, not the latest waiting step. */
200
200
  export declare const FlowReviewInput: Schema.Struct<{
201
- runId: typeof Schema.NonEmptyString;
202
- stepIndex: Schema.filter<typeof Schema.Int>;
203
- response: Schema.Struct<{
204
- decision: Schema.optional<Schema.Literal<["approve", "reject"]>>;
205
- value: Schema.optional<typeof Schema.String>;
206
- text: Schema.optional<typeof Schema.String>;
207
- respondedAt: Schema.optional<typeof Schema.String>;
201
+ readonly runId: Schema.NonEmptyString;
202
+ readonly stepIndex: Schema.Int;
203
+ readonly response: Schema.Struct<{
204
+ readonly decision: Schema.optional<Schema.Literals<readonly ["approve", "reject"]>>;
205
+ readonly value: Schema.optional<Schema.String>;
206
+ readonly text: Schema.optional<Schema.String>;
207
+ readonly respondedAt: Schema.optional<Schema.String>;
208
208
  }>;
209
209
  }>;
210
210
 
@@ -212,29 +212,29 @@ export declare type FlowReviewInput = typeof FlowReviewInput.Type;
212
212
 
213
213
  /** Delivery accepted; consumption and the run's eventual outcome remain reactive state. */
214
214
  export declare const FlowReviewReceipt: Schema.Struct<{
215
- runId: typeof Schema.NonEmptyString;
216
- stepIndex: Schema.filter<typeof Schema.Int>;
217
- executionId: typeof Schema.NonEmptyString;
218
- eventId: typeof Schema.NonEmptyString;
219
- status: Schema.Literal<["accepted"]>;
215
+ readonly runId: Schema.NonEmptyString;
216
+ readonly stepIndex: Schema.Int;
217
+ readonly executionId: Schema.NonEmptyString;
218
+ readonly eventId: Schema.NonEmptyString;
219
+ readonly status: Schema.Literal<"accepted">;
220
220
  }>;
221
221
 
222
222
  export declare type FlowReviewReceipt = typeof FlowReviewReceipt.Type;
223
223
 
224
224
  /** Submission evidence, separate from the flow run's execution status. */
225
225
  export declare const FlowStartReceipt: Schema.Struct<{
226
- runId: typeof Schema.NonEmptyString;
227
- requestId: typeof Schema.NonEmptyString;
228
- admission: Schema.Struct<{
229
- id: typeof Schema.String;
230
- workflowName: typeof Schema.String;
231
- executionId: Schema.NullOr<typeof Schema.String>;
232
- status: Schema.Literal<["running", "succeeded", "queued", "dropped", "skipped", "replayed"]>;
233
- deferral: Schema.optional<Schema.Struct<{
234
- mode: typeof Schema.String;
235
- dueAt: Schema.NullOr<typeof Schema.Number>;
236
- retryAfterMs: Schema.NullOr<typeof Schema.Number>;
237
- intentId: Schema.NullOr<typeof Schema.String>;
226
+ readonly runId: Schema.NonEmptyString;
227
+ readonly requestId: Schema.NonEmptyString;
228
+ readonly admission: Schema.Struct<{
229
+ readonly id: Schema.String;
230
+ readonly workflowName: Schema.String;
231
+ readonly executionId: Schema.NullOr<Schema.String>;
232
+ readonly status: Schema.Literals<readonly ["running", "succeeded", "queued", "dropped", "skipped", "replayed"]>;
233
+ readonly deferral: Schema.optional<Schema.Struct<{
234
+ readonly mode: Schema.String;
235
+ readonly dueAt: Schema.NullOr<Schema.Number>;
236
+ readonly retryAfterMs: Schema.NullOr<Schema.Number>;
237
+ readonly intentId: Schema.NullOr<Schema.String>;
238
238
  }>>;
239
239
  }>;
240
240
  }>;
@@ -242,7 +242,7 @@ export declare const FlowStartReceipt: Schema.Struct<{
242
242
  export declare type FlowStartReceipt = typeof FlowStartReceipt.Type;
243
243
 
244
244
  /** Flow-definition lifecycle. */
245
- export declare const FlowStatus: Schema.Literal<["draft", "active", "archived"]>;
245
+ export declare const FlowStatus: Schema.Literals<readonly ["draft", "active", "archived"]>;
246
246
 
247
247
  export declare type FlowStatus = typeof FlowStatus.Type;
248
248
 
@@ -253,43 +253,43 @@ export declare type FlowStatus = typeof FlowStatus.Type;
253
253
  * `{{outputKey}}` in `prompt` / media refs.
254
254
  */
255
255
  export declare const FlowStep: Schema.Struct<{
256
- id: typeof Schema.String;
257
- title: Schema.optional<typeof Schema.String>;
256
+ readonly id: Schema.String;
257
+ readonly title: Schema.optional<Schema.String>;
258
258
  /** Informational; shown under the step in the run timeline. */
259
- description: Schema.optional<typeof Schema.String>;
260
- type: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
259
+ readonly description: Schema.optional<Schema.String>;
260
+ readonly type: Schema.Literals<readonly ["agent", "generate", "structured", "note", "human"]>;
261
261
  /** Sanitized [\w.-]; the result-bundle key + the `{{ref}}` name. */
262
- outputKey: Schema.optional<typeof Schema.String>;
262
+ readonly outputKey: Schema.optional<Schema.String>;
263
263
  /** Template with `{{key}}` placeholders (brief inputs + prior outputKeys). */
264
- prompt: Schema.optional<typeof Schema.String>;
265
- modality: Schema.optional<Schema.Literal<["text", "image", "video", "audio"]>>;
266
- model: Schema.optional<typeof Schema.String>;
267
- params: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
268
- mediaInputs: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
269
- from: Schema.Literal<["upload"]>;
270
- url: typeof Schema.String;
271
- mediaType: Schema.optional<typeof Schema.NonEmptyString>;
264
+ readonly prompt: Schema.optional<Schema.String>;
265
+ readonly modality: Schema.optional<Schema.Literals<readonly ["text", "image", "video", "audio"]>>;
266
+ readonly model: Schema.optional<Schema.String>;
267
+ readonly params: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
268
+ readonly mediaInputs: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
269
+ readonly from: Schema.Literal<"upload">;
270
+ readonly url: Schema.String;
271
+ readonly mediaType: Schema.optional<Schema.NonEmptyString>;
272
272
  }>, Schema.Struct<{
273
- from: Schema.Literal<["step"]>;
274
- ref: typeof Schema.String;
275
- artifact: Schema.optional<Schema.filter<typeof Schema.Int>>;
273
+ readonly from: Schema.Literal<"step">;
274
+ readonly ref: Schema.String;
275
+ readonly artifact: Schema.optional<Schema.Int>;
276
276
  }>]>>>;
277
277
  /** Allowed sub-agent id/name, resolved and authorized by the host. */
278
- agentRef: Schema.optional<typeof Schema.String>;
278
+ readonly agentRef: Schema.optional<Schema.String>;
279
279
  /** JSON Schema of the desired object, preserved and validated at run. */
280
- schema: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
281
- reviewMode: Schema.optional<Schema.Literal<["approve", "choice", "text"]>>;
282
- options: Schema.optional<Schema.Array$<Schema.Struct<{
283
- value: typeof Schema.String;
284
- label: typeof Schema.String;
280
+ readonly schema: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
281
+ readonly reviewMode: Schema.optional<Schema.Literals<readonly ["approve", "choice", "text"]>>;
282
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
283
+ readonly value: Schema.String;
284
+ readonly label: Schema.String;
285
285
  }>>>;
286
286
  /** Gate this step on a prior value. Absent → the step always runs. A step
287
287
  * whose condition is false is SKIPPED, not failed: it produces no output, so
288
288
  * anything referencing its `outputKey` sees an absent value. */
289
- when: Schema.optional<Schema.Struct<{
290
- ref: typeof Schema.String;
291
- op: Schema.Literal<["truthy", "falsy", "eq", "neq", "contains"]>;
292
- value: Schema.optional<typeof Schema.Unknown>;
289
+ readonly when: Schema.optional<Schema.Struct<{
290
+ readonly ref: Schema.String;
291
+ readonly op: Schema.Literals<readonly ["truthy", "falsy", "eq", "neq", "contains"]>;
292
+ readonly value: Schema.optional<Schema.Unknown>;
293
293
  }>>;
294
294
  /**
295
295
  * Fan-out group. CONSECUTIVE steps sharing a group name run CONCURRENTLY,
@@ -300,12 +300,12 @@ export declare const FlowStep: Schema.Struct<{
300
300
  * step may not join a group either: it suspends the whole workflow, which is
301
301
  * not a thing one branch of a fan-out can do.
302
302
  */
303
- group: Schema.optional<typeof Schema.String>;
303
+ readonly group: Schema.optional<Schema.String>;
304
304
  /** `human` step only — how long the run parks awaiting this review before it
305
305
  * fails, in milliseconds. Omitted → the flow's `humanTimeoutMs`, then the
306
306
  * engine/plugin default (see `resolveHumanReviewTimeoutMs`). `0` means WAIT
307
307
  * FOREVER (the park is slot-free, so an unbounded wait costs no worker). */
308
- timeoutMs: Schema.optional<typeof Schema.Number>;
308
+ readonly timeoutMs: Schema.optional<Schema.Number>;
309
309
  }>;
310
310
 
311
311
  /**
@@ -353,10 +353,10 @@ export declare interface FlowStep {
353
353
 
354
354
  /** The HITL answer; the engine projects it after consuming the durable signal. */
355
355
  export declare const HumanResponse: Schema.Struct<{
356
- decision: Schema.optional<Schema.Literal<["approve", "reject"]>>;
357
- value: Schema.optional<typeof Schema.String>;
358
- text: Schema.optional<typeof Schema.String>;
359
- respondedAt: Schema.optional<typeof Schema.String>;
356
+ readonly decision: Schema.optional<Schema.Literals<readonly ["approve", "reject"]>>;
357
+ readonly value: Schema.optional<Schema.String>;
358
+ readonly text: Schema.optional<Schema.String>;
359
+ readonly respondedAt: Schema.optional<Schema.String>;
360
360
  }>;
361
361
 
362
362
  /** An INTERFACE — reached from `aiFlowRuns.humanResponse`; see {@link BriefField}. */
@@ -382,7 +382,7 @@ export declare interface HumanResponse {
382
382
  export declare const isTruthy: (v: unknown) => boolean;
383
383
 
384
384
  /** A JSON value (for `params` / `input` / a `structured` step's JSON Schema). */
385
- export declare const Json: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
385
+ export declare const Json: Schema.$Record<Schema.String, Schema.Unknown>;
386
386
 
387
387
  export declare type Json = typeof Json.Type;
388
388
 
@@ -397,31 +397,31 @@ export declare const MAX_STEPS_MIN = 1;
397
397
  /** One persisted media artifact. Storage identity is not a provider request ID.
398
398
  * Exactly one artifact per result has role `primary`; other roles are host-defined. */
399
399
  export declare const MediaArtifact: Schema.Struct<{
400
- url: typeof Schema.NonEmptyString;
401
- mediaType: typeof Schema.NonEmptyString;
402
- role: typeof Schema.NonEmptyString;
403
- storageRefId: Schema.optional<typeof Schema.NonEmptyString>;
404
- providerMetadata: Schema.optional<typeof Schema.Unknown>;
400
+ readonly url: Schema.NonEmptyString;
401
+ readonly mediaType: Schema.NonEmptyString;
402
+ readonly role: Schema.NonEmptyString;
403
+ readonly storageRefId: Schema.optional<Schema.NonEmptyString>;
404
+ readonly providerMetadata: Schema.optional<Schema.Unknown>;
405
405
  }>;
406
406
 
407
407
  export declare type MediaArtifact = typeof MediaArtifact.Type;
408
408
 
409
- export declare const MediaArtifacts: Schema.filter<Schema.Array$<Schema.Struct<{
410
- url: typeof Schema.NonEmptyString;
411
- mediaType: typeof Schema.NonEmptyString;
412
- role: typeof Schema.NonEmptyString;
413
- storageRefId: Schema.optional<typeof Schema.NonEmptyString>;
414
- providerMetadata: Schema.optional<typeof Schema.Unknown>;
415
- }>>>;
416
-
417
- export declare const MediaInputs: Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
418
- from: Schema.Literal<["upload"]>;
419
- url: typeof Schema.String;
420
- mediaType: Schema.optional<typeof Schema.NonEmptyString>;
409
+ export declare const MediaArtifacts: Schema.$Array<Schema.Struct<{
410
+ readonly url: Schema.NonEmptyString;
411
+ readonly mediaType: Schema.NonEmptyString;
412
+ readonly role: Schema.NonEmptyString;
413
+ readonly storageRefId: Schema.optional<Schema.NonEmptyString>;
414
+ readonly providerMetadata: Schema.optional<Schema.Unknown>;
415
+ }>>;
416
+
417
+ export declare const MediaInputs: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
418
+ readonly from: Schema.Literal<"upload">;
419
+ readonly url: Schema.String;
420
+ readonly mediaType: Schema.optional<Schema.NonEmptyString>;
421
421
  }>, Schema.Struct<{
422
- from: Schema.Literal<["step"]>;
423
- ref: typeof Schema.String;
424
- artifact: Schema.optional<Schema.filter<typeof Schema.Int>>;
422
+ readonly from: Schema.Literal<"step">;
423
+ readonly ref: Schema.String;
424
+ readonly artifact: Schema.optional<Schema.Int>;
425
425
  }>]>>;
426
426
 
427
427
  export declare type MediaInputs = typeof MediaInputs.Type;
@@ -429,14 +429,14 @@ export declare type MediaInputs = typeof MediaInputs.Type;
429
429
  /** A media-input slot — an absolute HTTP(S) uploaded URL or a reference to a
430
430
  * brief field/prior step's URL output. Keyed by capability slot name
431
431
  * (`referenceImageUrl`, `lastFrameImageUrl`, `referenceVideoUrl`, …). */
432
- export declare const MediaInputSlot: Schema.Union<[Schema.Struct<{
433
- from: Schema.Literal<["upload"]>;
434
- url: typeof Schema.String;
435
- mediaType: Schema.optional<typeof Schema.NonEmptyString>;
432
+ export declare const MediaInputSlot: Schema.Union<readonly [Schema.Struct<{
433
+ readonly from: Schema.Literal<"upload">;
434
+ readonly url: Schema.String;
435
+ readonly mediaType: Schema.optional<Schema.NonEmptyString>;
436
436
  }>, Schema.Struct<{
437
- from: Schema.Literal<["step"]>;
438
- ref: typeof Schema.String;
439
- artifact: Schema.optional<Schema.filter<typeof Schema.Int>>;
437
+ readonly from: Schema.Literal<"step">;
438
+ readonly ref: Schema.String;
439
+ readonly artifact: Schema.optional<Schema.Int>;
440
440
  }>]>;
441
441
 
442
442
  export declare type MediaInputSlot = typeof MediaInputSlot.Type;
@@ -448,20 +448,20 @@ export declare type MediaInputSlot = typeof MediaInputSlot.Type;
448
448
  * succeeded one; the run's `costCompleteness` counts it.
449
449
  */
450
450
  export declare const MediaReceipt: Schema.Struct<{
451
- costMicroUsd: Schema.optional<Schema.filter<typeof Schema.Finite>>;
452
- costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
453
- requestId: Schema.optional<typeof Schema.NonEmptyString>;
454
- usage: Schema.optional<Schema.Struct<{
455
- status: Schema.Literal<["reported", "unreported"]>;
456
- unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
457
- input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
458
- output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
451
+ readonly costMicroUsd: Schema.optional<Schema.Finite>;
452
+ readonly costSource: Schema.optional<Schema.Literals<readonly ["gateway", "estimated", "unpriced"]>>;
453
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
454
+ readonly usage: Schema.optional<Schema.Struct<{
455
+ readonly status: Schema.Literals<readonly ["reported", "unreported"]>;
456
+ readonly unit: Schema.optional<Schema.Literals<readonly ["tokens", "characters", "seconds"]>>;
457
+ readonly input: Schema.optional<Schema.Finite>;
458
+ readonly output: Schema.optional<Schema.Finite>;
459
459
  }>>;
460
460
  }>;
461
461
 
462
462
  export declare type MediaReceipt = typeof MediaReceipt.Type;
463
463
 
464
- export declare const Modality: Schema.Literal<["text", "image", "video", "audio"]>;
464
+ export declare const Modality: Schema.Literals<readonly ["text", "image", "video", "audio"]>;
465
465
 
466
466
  export declare type Modality = typeof Modality.Type;
467
467
 
@@ -472,31 +472,31 @@ export declare type Modality = typeof Modality.Type;
472
472
  */
473
473
  export declare const normalizeFlow: (def: FlowDefinitionInput) => FlowIR;
474
474
 
475
- export declare const ReviewMode: Schema.Literal<["approve", "choice", "text"]>;
475
+ export declare const ReviewMode: Schema.Literals<readonly ["approve", "choice", "text"]>;
476
476
 
477
477
  export declare type ReviewMode = typeof ReviewMode.Type;
478
478
 
479
479
  export declare const ReviewOption: Schema.Struct<{
480
- value: typeof Schema.String;
481
- label: typeof Schema.String;
480
+ readonly value: Schema.String;
481
+ readonly label: Schema.String;
482
482
  }>;
483
483
 
484
484
  export declare type ReviewOption = typeof ReviewOption.Type;
485
485
 
486
486
  /** Human-review config projected onto a `waiting` run step. */
487
487
  export declare const RunReview: Schema.Struct<{
488
- mode: Schema.Literal<["approve", "choice", "text"]>;
489
- options: Schema.optional<Schema.Array$<Schema.Struct<{
490
- value: typeof Schema.String;
491
- label: typeof Schema.String;
488
+ readonly mode: Schema.Literals<readonly ["approve", "choice", "text"]>;
489
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
490
+ readonly value: Schema.String;
491
+ readonly label: Schema.String;
492
492
  }>>>;
493
- prompt: typeof Schema.String;
493
+ readonly prompt: Schema.String;
494
494
  }>;
495
495
 
496
496
  export declare type RunReview = typeof RunReview.Type;
497
497
 
498
498
  /** What triggered a run. */
499
- export declare const RunSource: Schema.Literal<["manual", "cron"]>;
499
+ export declare const RunSource: Schema.Literals<readonly ["manual", "cron"]>;
500
500
 
501
501
  export declare type RunSource = typeof RunSource.Type;
502
502
 
@@ -507,62 +507,62 @@ export declare type RunSource = typeof RunSource.Type;
507
507
  * confirmed: the row carries that uncertainty until the engine stops the run
508
508
  * (cooperatively, by interruption, or through a later confirmed request).
509
509
  * Only `succeeded`, `failed` and `cancelled` are terminal. */
510
- export declare const RunStatus: Schema.Literal<["pending", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled"]>;
510
+ export declare const RunStatus: Schema.Literals<readonly ["pending", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled"]>;
511
511
 
512
512
  export declare type RunStatus = typeof RunStatus.Type;
513
513
 
514
514
  export declare const RunStep: Schema.Struct<{
515
- id: typeof Schema.Number;
516
- title: typeof Schema.String;
517
- description: Schema.optional<typeof Schema.String>;
518
- type: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
519
- status: Schema.Literal<["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
515
+ readonly id: Schema.Number;
516
+ readonly title: Schema.String;
517
+ readonly description: Schema.optional<Schema.String>;
518
+ readonly type: Schema.Literals<readonly ["agent", "generate", "structured", "note", "human"]>;
519
+ readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
520
520
  /** The agent an `agent` step delegated to — a field, so a run view never
521
521
  * parses it out of `title`. */
522
- agentRef: Schema.optional<typeof Schema.String>;
522
+ readonly agentRef: Schema.optional<Schema.String>;
523
523
  /** What a `generate` step produced. */
524
- modality: Schema.optional<Schema.Literal<["text", "image", "video", "audio"]>>;
525
- startedAt: Schema.optional<typeof Schema.String>;
526
- completedAt: Schema.optional<typeof Schema.String>;
524
+ readonly modality: Schema.optional<Schema.Literals<readonly ["text", "image", "video", "audio"]>>;
525
+ readonly startedAt: Schema.optional<Schema.String>;
526
+ readonly completedAt: Schema.optional<Schema.String>;
527
527
  /** Per-step cost in micro-USD (the app view projects to €/cents). */
528
- costMicroUsd: Schema.optional<typeof Schema.Number>;
528
+ readonly costMicroUsd: Schema.optional<Schema.Number>;
529
529
  /** Where that number came from — the gateway's actual charge, a price-table
530
530
  * estimate, or nothing (`unpriced`: the 0 above is not a price). */
531
- costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
531
+ readonly costSource: Schema.optional<Schema.Literals<readonly ["gateway", "estimated", "unpriced"]>>;
532
532
  /** Links a media step to its generation/usage record. */
533
- requestId: Schema.optional<typeof Schema.String>;
533
+ readonly requestId: Schema.optional<Schema.String>;
534
534
  /** What the step consumed — also on a FAILED step that was charged. */
535
- usage: Schema.optional<Schema.Struct<{
536
- status: Schema.Literal<["reported", "unreported"]>;
537
- unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
538
- input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
539
- output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
535
+ readonly usage: Schema.optional<Schema.Struct<{
536
+ readonly status: Schema.Literals<readonly ["reported", "unreported"]>;
537
+ readonly unit: Schema.optional<Schema.Literals<readonly ["tokens", "characters", "seconds"]>>;
538
+ readonly input: Schema.optional<Schema.Finite>;
539
+ readonly output: Schema.optional<Schema.Finite>;
540
540
  }>>;
541
541
  /** Hosted media artifact URL (image/video/audio), via storage. */
542
- url: Schema.optional<typeof Schema.String>;
542
+ readonly url: Schema.optional<Schema.String>;
543
543
  /** All media variants, including roles and storage references; url projects the primary artifact. */
544
- artifacts: Schema.optional<Schema.filter<Schema.Array$<Schema.Struct<{
545
- url: typeof Schema.NonEmptyString;
546
- mediaType: typeof Schema.NonEmptyString;
547
- role: typeof Schema.NonEmptyString;
548
- storageRefId: Schema.optional<typeof Schema.NonEmptyString>;
549
- providerMetadata: Schema.optional<typeof Schema.Unknown>;
550
- }>>>>;
544
+ readonly artifacts: Schema.optional<Schema.$Array<Schema.Struct<{
545
+ readonly url: Schema.NonEmptyString;
546
+ readonly mediaType: Schema.NonEmptyString;
547
+ readonly role: Schema.NonEmptyString;
548
+ readonly storageRefId: Schema.optional<Schema.NonEmptyString>;
549
+ readonly providerMetadata: Schema.optional<Schema.Unknown>;
550
+ }>>>;
551
551
  /** Inline text output (rendered as markdown). */
552
- output: Schema.optional<Schema.Struct<{
553
- text: typeof Schema.String;
552
+ readonly output: Schema.optional<Schema.Struct<{
553
+ readonly text: Schema.String;
554
554
  }>>;
555
- errorMessage: Schema.optional<typeof Schema.String>;
555
+ readonly errorMessage: Schema.optional<Schema.String>;
556
556
  /** Why a `skipped` step was skipped — the rendered condition, so the timeline
557
557
  * says "{{approved}} is not set" instead of leaving a silent gap. */
558
- skipReason: Schema.optional<typeof Schema.String>;
559
- review: Schema.optional<Schema.Struct<{
560
- mode: Schema.Literal<["approve", "choice", "text"]>;
561
- options: Schema.optional<Schema.Array$<Schema.Struct<{
562
- value: typeof Schema.String;
563
- label: typeof Schema.String;
558
+ readonly skipReason: Schema.optional<Schema.String>;
559
+ readonly review: Schema.optional<Schema.Struct<{
560
+ readonly mode: Schema.Literals<readonly ["approve", "choice", "text"]>;
561
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
562
+ readonly value: Schema.String;
563
+ readonly label: Schema.String;
564
564
  }>>>;
565
- prompt: typeof Schema.String;
565
+ readonly prompt: Schema.String;
566
566
  }>>;
567
567
  }>;
568
568
 
@@ -594,7 +594,7 @@ export declare interface RunStep {
594
594
  readonly review?: RunReview | undefined;
595
595
  }
596
596
 
597
- export declare const RunStepStatus: Schema.Literal<["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
597
+ export declare const RunStepStatus: Schema.Literals<readonly ["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
598
598
 
599
599
  export declare type RunStepStatus = typeof RunStepStatus.Type;
600
600
 
@@ -603,10 +603,10 @@ export declare const sanitizeOutputKey: (key: string) => string;
603
603
 
604
604
  declare const StepCondition: Schema.Struct<{
605
605
  /** A brief-field key or an EARLIER step's `outputKey`. */
606
- ref: typeof Schema.String;
607
- op: Schema.Literal<["truthy", "falsy", "eq", "neq", "contains"]>;
606
+ readonly ref: Schema.String;
607
+ readonly op: Schema.Literals<readonly ["truthy", "falsy", "eq", "neq", "contains"]>;
608
608
  /** The right-hand side for `eq` / `neq` / `contains`. Ignored by the unary ops. */
609
- value: Schema.optional<typeof Schema.Unknown>;
609
+ readonly value: Schema.optional<Schema.Unknown>;
610
610
  }>;
611
611
 
612
612
  /** An INTERFACE, for the same api-report reason as `FlowStep` — it is reached
@@ -621,7 +621,7 @@ export { StepCondition }
621
621
  export { StepCondition as StepConditionType }
622
622
 
623
623
  /** The five step types. `generate` fans out to four modalities. */
624
- export declare const StepType: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
624
+ export declare const StepType: Schema.Literals<readonly ["agent", "generate", "structured", "note", "human"]>;
625
625
 
626
626
  export declare type StepType = typeof StepType.Type;
627
627
 
@@ -636,16 +636,16 @@ export declare type StepType = typeof StepType.Type;
636
636
  * later, or reconciled against an invoice.
637
637
  */
638
638
  export declare const StepUsage: Schema.Struct<{
639
- status: Schema.Literal<["reported", "unreported"]>;
640
- unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
641
- input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
642
- output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
639
+ readonly status: Schema.Literals<readonly ["reported", "unreported"]>;
640
+ readonly unit: Schema.optional<Schema.Literals<readonly ["tokens", "characters", "seconds"]>>;
641
+ readonly input: Schema.optional<Schema.Finite>;
642
+ readonly output: Schema.optional<Schema.Finite>;
643
643
  }>;
644
644
 
645
645
  export declare type StepUsage = typeof StepUsage.Type;
646
646
 
647
647
  /** Gallery scope. `shared` → per-subject share list; `organization` → tenant. */
648
- export declare const Visibility: Schema.Literal<["private", "organization", "shared"]>;
648
+ export declare const Visibility: Schema.Literals<readonly ["private", "organization", "shared"]>;
649
649
 
650
650
  export declare type Visibility = typeof Visibility.Type;
651
651