@voltro/plugin-ai-flows 0.84.0 → 0.86.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/web.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
@@ -29,12 +29,12 @@ export declare interface BriefField {
29
29
  export declare const cadenceMatches: (cadence: FlowCadence, now: Date) => boolean;
30
30
 
31
31
  /** The comparison a `when:` performs. */
32
- declare const ConditionOp: Schema.Literal<["truthy", "falsy", "eq", "neq", "contains"]>;
32
+ declare const ConditionOp: Schema.Literals<readonly ["truthy", "falsy", "eq", "neq", "contains"]>;
33
33
 
34
34
  declare type ConditionOp = typeof ConditionOp.Type;
35
35
 
36
36
  /** Where a cost figure came from. `unpriced` means the number beside it is a placeholder, not a price. */
37
- declare const CostSource: Schema.Literal<["gateway", "estimated", "unpriced"]>;
37
+ declare const CostSource: Schema.Literals<readonly ["gateway", "estimated", "unpriced"]>;
38
38
 
39
39
  declare type CostSource = typeof CostSource.Type;
40
40
 
@@ -43,19 +43,19 @@ export declare const DEFAULT_FLOW_RPC_TAGS: FlowRpcTags;
43
43
  /** Schedule spec — richer than a single cron expr (weekly interval + anchor,
44
44
  * monthly weekOfMonth), evaluated by the shared `cadenceMatches` predicate. */
45
45
  export declare const FlowCadence: Schema.Struct<{
46
- frequency: Schema.optional<Schema.Literal<["weekly", "monthly"]>>;
46
+ readonly frequency: Schema.optional<Schema.Literals<readonly ["weekly", "monthly"]>>;
47
47
  /** Weekdays, 0=Monday … 6=Sunday. */
48
- repeats: Schema.Array$<typeof Schema.Number>;
48
+ readonly repeats: Schema.$Array<Schema.Number>;
49
49
  /** Weekly cycle length: 1 | 2 | 4 (anchored by anchorDate). */
50
- intervalWeeks: Schema.optional<typeof Schema.Number>;
50
+ readonly intervalWeeks: Schema.optional<Schema.Number>;
51
51
  /** ISO YYYY-MM-DD, cycle-0 week (interval > 1). */
52
- anchorDate: Schema.optional<typeof Schema.String>;
53
- weekOfMonth: Schema.optional<Schema.Union<[Schema.Literal<[1, 2, 3, 4]>, Schema.Literal<["last"]>]>>;
52
+ readonly anchorDate: Schema.optional<Schema.String>;
53
+ readonly weekOfMonth: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly [1, 2, 3, 4]>, Schema.Literal<"last">]>>;
54
54
  /** 0-23, default 9. */
55
- hour: Schema.optional<typeof Schema.Number>;
56
- minute: Schema.optional<Schema.Literal<[0, 15, 30, 45]>>;
55
+ readonly hour: Schema.optional<Schema.Number>;
56
+ readonly minute: Schema.optional<Schema.Literals<readonly [0, 15, 30, 45]>>;
57
57
  /** Brief for unattended cron runs. */
58
- defaultInput: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
58
+ readonly defaultInput: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
59
59
  }>;
60
60
 
61
61
  /**
@@ -81,12 +81,12 @@ export declare interface FlowCadence {
81
81
  /** Follow-up flow spec. On success, map source → the child's brief. */
82
82
  export declare const FlowChain: Schema.Struct<{
83
83
  /** Child flow id (data) or name (code). */
84
- flowRef: typeof Schema.String;
85
- mappings: Schema.Array$<Schema.Struct<{
86
- targetKey: typeof Schema.String;
87
- sourceKey: typeof Schema.String;
84
+ readonly flowRef: Schema.String;
85
+ readonly mappings: Schema.$Array<Schema.Struct<{
86
+ readonly targetKey: Schema.String;
87
+ readonly sourceKey: Schema.String;
88
88
  }>>;
89
- requireConfirmation: Schema.optional<typeof Schema.Boolean>;
89
+ readonly requireConfirmation: Schema.optional<Schema.Boolean>;
90
90
  }>;
91
91
 
92
92
  /** An INTERFACE — reached from `aiFlows.chainTo`; see {@link BriefField}. */
@@ -110,19 +110,19 @@ export declare interface FlowHookOptions {
110
110
  /** Execution mode. Replaces the legacy `allowDeviation` boolean — a mode is not
111
111
  * a boolean. `deterministic` runs the plan verbatim (resumable per step);
112
112
  * `agentic` lets an orchestrator LLM adapt the plan via the four tools. */
113
- export declare const FlowMode: Schema.Literal<["deterministic", "agentic"]>;
113
+ export declare const FlowMode: Schema.Literals<readonly ["deterministic", "agentic"]>;
114
114
 
115
115
  export declare type FlowMode = typeof FlowMode.Type;
116
116
 
117
117
  /** Bind the answer to the review actually displayed, not the latest waiting step. */
118
118
  export declare const FlowReviewInput: Schema.Struct<{
119
- runId: typeof Schema.NonEmptyString;
120
- stepIndex: Schema.filter<typeof Schema.Int>;
121
- response: Schema.Struct<{
122
- decision: Schema.optional<Schema.Literal<["approve", "reject"]>>;
123
- value: Schema.optional<typeof Schema.String>;
124
- text: Schema.optional<typeof Schema.String>;
125
- respondedAt: Schema.optional<typeof Schema.String>;
119
+ readonly runId: Schema.NonEmptyString;
120
+ readonly stepIndex: Schema.Int;
121
+ readonly response: Schema.Struct<{
122
+ readonly decision: Schema.optional<Schema.Literals<readonly ["approve", "reject"]>>;
123
+ readonly value: Schema.optional<Schema.String>;
124
+ readonly text: Schema.optional<Schema.String>;
125
+ readonly respondedAt: Schema.optional<Schema.String>;
126
126
  }>;
127
127
  }>;
128
128
 
@@ -130,11 +130,11 @@ export declare type FlowReviewInput = typeof FlowReviewInput.Type;
130
130
 
131
131
  /** Delivery accepted; consumption and the run's eventual outcome remain reactive state. */
132
132
  export declare const FlowReviewReceipt: Schema.Struct<{
133
- runId: typeof Schema.NonEmptyString;
134
- stepIndex: Schema.filter<typeof Schema.Int>;
135
- executionId: typeof Schema.NonEmptyString;
136
- eventId: typeof Schema.NonEmptyString;
137
- status: Schema.Literal<["accepted"]>;
133
+ readonly runId: Schema.NonEmptyString;
134
+ readonly stepIndex: Schema.Int;
135
+ readonly executionId: Schema.NonEmptyString;
136
+ readonly eventId: Schema.NonEmptyString;
137
+ readonly status: Schema.Literal<"accepted">;
138
138
  }>;
139
139
 
140
140
  export declare type FlowReviewReceipt = typeof FlowReviewReceipt.Type;
@@ -191,18 +191,18 @@ export declare interface FlowRunView {
191
191
 
192
192
  /** Submission evidence, separate from the flow run's execution status. */
193
193
  declare const FlowStartReceipt: Schema.Struct<{
194
- runId: typeof Schema.NonEmptyString;
195
- requestId: typeof Schema.NonEmptyString;
196
- admission: Schema.Struct<{
197
- id: typeof Schema.String;
198
- workflowName: typeof Schema.String;
199
- executionId: Schema.NullOr<typeof Schema.String>;
200
- status: Schema.Literal<["running", "succeeded", "queued", "dropped", "skipped", "replayed"]>;
201
- deferral: Schema.optional<Schema.Struct<{
202
- mode: typeof Schema.String;
203
- dueAt: Schema.NullOr<typeof Schema.Number>;
204
- retryAfterMs: Schema.NullOr<typeof Schema.Number>;
205
- intentId: Schema.NullOr<typeof Schema.String>;
194
+ readonly runId: Schema.NonEmptyString;
195
+ readonly requestId: Schema.NonEmptyString;
196
+ readonly admission: Schema.Struct<{
197
+ readonly id: Schema.String;
198
+ readonly workflowName: Schema.String;
199
+ readonly executionId: Schema.NullOr<Schema.String>;
200
+ readonly status: Schema.Literals<readonly ["running", "succeeded", "queued", "dropped", "skipped", "replayed"]>;
201
+ readonly deferral: Schema.optional<Schema.Struct<{
202
+ readonly mode: Schema.String;
203
+ readonly dueAt: Schema.NullOr<Schema.Number>;
204
+ readonly retryAfterMs: Schema.NullOr<Schema.Number>;
205
+ readonly intentId: Schema.NullOr<Schema.String>;
206
206
  }>>;
207
207
  }>;
208
208
  }>;
@@ -210,7 +210,7 @@ declare const FlowStartReceipt: Schema.Struct<{
210
210
  declare type FlowStartReceipt = typeof FlowStartReceipt.Type;
211
211
 
212
212
  /** Flow-definition lifecycle. */
213
- export declare const FlowStatus: Schema.Literal<["draft", "active", "archived"]>;
213
+ export declare const FlowStatus: Schema.Literals<readonly ["draft", "active", "archived"]>;
214
214
 
215
215
  export declare type FlowStatus = typeof FlowStatus.Type;
216
216
 
@@ -221,43 +221,43 @@ export declare type FlowStatus = typeof FlowStatus.Type;
221
221
  * `{{outputKey}}` in `prompt` / media refs.
222
222
  */
223
223
  export declare const FlowStep: Schema.Struct<{
224
- id: typeof Schema.String;
225
- title: Schema.optional<typeof Schema.String>;
224
+ readonly id: Schema.String;
225
+ readonly title: Schema.optional<Schema.String>;
226
226
  /** Informational; shown under the step in the run timeline. */
227
- description: Schema.optional<typeof Schema.String>;
228
- type: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
227
+ readonly description: Schema.optional<Schema.String>;
228
+ readonly type: Schema.Literals<readonly ["agent", "generate", "structured", "note", "human"]>;
229
229
  /** Sanitized [\w.-]; the result-bundle key + the `{{ref}}` name. */
230
- outputKey: Schema.optional<typeof Schema.String>;
230
+ readonly outputKey: Schema.optional<Schema.String>;
231
231
  /** Template with `{{key}}` placeholders (brief inputs + prior outputKeys). */
232
- prompt: Schema.optional<typeof Schema.String>;
233
- modality: Schema.optional<Schema.Literal<["text", "image", "video", "audio"]>>;
234
- model: Schema.optional<typeof Schema.String>;
235
- params: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
236
- mediaInputs: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
237
- from: Schema.Literal<["upload"]>;
238
- url: typeof Schema.String;
239
- mediaType: Schema.optional<typeof Schema.NonEmptyString>;
232
+ readonly prompt: Schema.optional<Schema.String>;
233
+ readonly modality: Schema.optional<Schema.Literals<readonly ["text", "image", "video", "audio"]>>;
234
+ readonly model: Schema.optional<Schema.String>;
235
+ readonly params: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
236
+ readonly mediaInputs: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
237
+ readonly from: Schema.Literal<"upload">;
238
+ readonly url: Schema.String;
239
+ readonly mediaType: Schema.optional<Schema.NonEmptyString>;
240
240
  }>, Schema.Struct<{
241
- from: Schema.Literal<["step"]>;
242
- ref: typeof Schema.String;
243
- artifact: Schema.optional<Schema.filter<typeof Schema.Int>>;
241
+ readonly from: Schema.Literal<"step">;
242
+ readonly ref: Schema.String;
243
+ readonly artifact: Schema.optional<Schema.Int>;
244
244
  }>]>>>;
245
245
  /** Allowed sub-agent id/name, resolved and authorized by the host. */
246
- agentRef: Schema.optional<typeof Schema.String>;
246
+ readonly agentRef: Schema.optional<Schema.String>;
247
247
  /** JSON Schema of the desired object, preserved and validated at run. */
248
- schema: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
249
- reviewMode: Schema.optional<Schema.Literal<["approve", "choice", "text"]>>;
250
- options: Schema.optional<Schema.Array$<Schema.Struct<{
251
- value: typeof Schema.String;
252
- label: typeof Schema.String;
248
+ readonly schema: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
249
+ readonly reviewMode: Schema.optional<Schema.Literals<readonly ["approve", "choice", "text"]>>;
250
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
251
+ readonly value: Schema.String;
252
+ readonly label: Schema.String;
253
253
  }>>>;
254
254
  /** Gate this step on a prior value. Absent → the step always runs. A step
255
255
  * whose condition is false is SKIPPED, not failed: it produces no output, so
256
256
  * anything referencing its `outputKey` sees an absent value. */
257
- when: Schema.optional<Schema.Struct<{
258
- ref: typeof Schema.String;
259
- op: Schema.Literal<["truthy", "falsy", "eq", "neq", "contains"]>;
260
- value: Schema.optional<typeof Schema.Unknown>;
257
+ readonly when: Schema.optional<Schema.Struct<{
258
+ readonly ref: Schema.String;
259
+ readonly op: Schema.Literals<readonly ["truthy", "falsy", "eq", "neq", "contains"]>;
260
+ readonly value: Schema.optional<Schema.Unknown>;
261
261
  }>>;
262
262
  /**
263
263
  * Fan-out group. CONSECUTIVE steps sharing a group name run CONCURRENTLY,
@@ -268,12 +268,12 @@ export declare const FlowStep: Schema.Struct<{
268
268
  * step may not join a group either: it suspends the whole workflow, which is
269
269
  * not a thing one branch of a fan-out can do.
270
270
  */
271
- group: Schema.optional<typeof Schema.String>;
271
+ readonly group: Schema.optional<Schema.String>;
272
272
  /** `human` step only — how long the run parks awaiting this review before it
273
273
  * fails, in milliseconds. Omitted → the flow's `humanTimeoutMs`, then the
274
274
  * engine/plugin default (see `resolveHumanReviewTimeoutMs`). `0` means WAIT
275
275
  * FOREVER (the park is slot-free, so an unbounded wait costs no worker). */
276
- timeoutMs: Schema.optional<typeof Schema.Number>;
276
+ readonly timeoutMs: Schema.optional<Schema.Number>;
277
277
  }>;
278
278
 
279
279
  /**
@@ -321,10 +321,10 @@ export declare interface FlowStep {
321
321
 
322
322
  /** The HITL answer; the engine projects it after consuming the durable signal. */
323
323
  export declare const HumanResponse: Schema.Struct<{
324
- decision: Schema.optional<Schema.Literal<["approve", "reject"]>>;
325
- value: Schema.optional<typeof Schema.String>;
326
- text: Schema.optional<typeof Schema.String>;
327
- respondedAt: Schema.optional<typeof Schema.String>;
324
+ readonly decision: Schema.optional<Schema.Literals<readonly ["approve", "reject"]>>;
325
+ readonly value: Schema.optional<Schema.String>;
326
+ readonly text: Schema.optional<Schema.String>;
327
+ readonly respondedAt: Schema.optional<Schema.String>;
328
328
  }>;
329
329
 
330
330
  /** An INTERFACE — reached from `aiFlowRuns.humanResponse`; see {@link BriefField}. */
@@ -336,7 +336,7 @@ export declare interface HumanResponse {
336
336
  }
337
337
 
338
338
  /** A JSON value (for `params` / `input` / a `structured` step's JSON Schema). */
339
- declare const Json: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
339
+ declare const Json: Schema.$Record<Schema.String, Schema.Unknown>;
340
340
 
341
341
  declare type Json = typeof Json.Type;
342
342
 
@@ -351,28 +351,28 @@ export declare type LaunchFlowResult = FlowStartReceipt;
351
351
  /** One persisted media artifact. Storage identity is not a provider request ID.
352
352
  * Exactly one artifact per result has role `primary`; other roles are host-defined. */
353
353
  declare const MediaArtifact: Schema.Struct<{
354
- url: typeof Schema.NonEmptyString;
355
- mediaType: typeof Schema.NonEmptyString;
356
- role: typeof Schema.NonEmptyString;
357
- storageRefId: Schema.optional<typeof Schema.NonEmptyString>;
358
- providerMetadata: Schema.optional<typeof Schema.Unknown>;
354
+ readonly url: Schema.NonEmptyString;
355
+ readonly mediaType: Schema.NonEmptyString;
356
+ readonly role: Schema.NonEmptyString;
357
+ readonly storageRefId: Schema.optional<Schema.NonEmptyString>;
358
+ readonly providerMetadata: Schema.optional<Schema.Unknown>;
359
359
  }>;
360
360
 
361
361
  declare type MediaArtifact = typeof MediaArtifact.Type;
362
362
 
363
- declare const MediaInputs: Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
364
- from: Schema.Literal<["upload"]>;
365
- url: typeof Schema.String;
366
- mediaType: Schema.optional<typeof Schema.NonEmptyString>;
363
+ declare const MediaInputs: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
364
+ readonly from: Schema.Literal<"upload">;
365
+ readonly url: Schema.String;
366
+ readonly mediaType: Schema.optional<Schema.NonEmptyString>;
367
367
  }>, Schema.Struct<{
368
- from: Schema.Literal<["step"]>;
369
- ref: typeof Schema.String;
370
- artifact: Schema.optional<Schema.filter<typeof Schema.Int>>;
368
+ readonly from: Schema.Literal<"step">;
369
+ readonly ref: Schema.String;
370
+ readonly artifact: Schema.optional<Schema.Int>;
371
371
  }>]>>;
372
372
 
373
373
  declare type MediaInputs = typeof MediaInputs.Type;
374
374
 
375
- export declare const Modality: Schema.Literal<["text", "image", "video", "audio"]>;
375
+ export declare const Modality: Schema.Literals<readonly ["text", "image", "video", "audio"]>;
376
376
 
377
377
  export declare type Modality = typeof Modality.Type;
378
378
 
@@ -383,25 +383,25 @@ export declare type Modality = typeof Modality.Type;
383
383
  */
384
384
  export declare const nextRuns: (cadence: FlowCadence, from: Date, count?: number) => ReadonlyArray<Date>;
385
385
 
386
- export declare const ReviewMode: Schema.Literal<["approve", "choice", "text"]>;
386
+ export declare const ReviewMode: Schema.Literals<readonly ["approve", "choice", "text"]>;
387
387
 
388
388
  export declare type ReviewMode = typeof ReviewMode.Type;
389
389
 
390
390
  export declare const ReviewOption: Schema.Struct<{
391
- value: typeof Schema.String;
392
- label: typeof Schema.String;
391
+ readonly value: Schema.String;
392
+ readonly label: Schema.String;
393
393
  }>;
394
394
 
395
395
  export declare type ReviewOption = typeof ReviewOption.Type;
396
396
 
397
397
  /** Human-review config projected onto a `waiting` run step. */
398
398
  export declare const RunReview: Schema.Struct<{
399
- mode: Schema.Literal<["approve", "choice", "text"]>;
400
- options: Schema.optional<Schema.Array$<Schema.Struct<{
401
- value: typeof Schema.String;
402
- label: typeof Schema.String;
399
+ readonly mode: Schema.Literals<readonly ["approve", "choice", "text"]>;
400
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
401
+ readonly value: Schema.String;
402
+ readonly label: Schema.String;
403
403
  }>>>;
404
- prompt: typeof Schema.String;
404
+ readonly prompt: Schema.String;
405
405
  }>;
406
406
 
407
407
  export declare type RunReview = typeof RunReview.Type;
@@ -413,62 +413,62 @@ export declare type RunReview = typeof RunReview.Type;
413
413
  * confirmed: the row carries that uncertainty until the engine stops the run
414
414
  * (cooperatively, by interruption, or through a later confirmed request).
415
415
  * Only `succeeded`, `failed` and `cancelled` are terminal. */
416
- export declare const RunStatus: Schema.Literal<["pending", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled"]>;
416
+ export declare const RunStatus: Schema.Literals<readonly ["pending", "running", "waiting", "cancelling", "succeeded", "failed", "cancelled"]>;
417
417
 
418
418
  export declare type RunStatus = typeof RunStatus.Type;
419
419
 
420
420
  export declare const RunStep: Schema.Struct<{
421
- id: typeof Schema.Number;
422
- title: typeof Schema.String;
423
- description: Schema.optional<typeof Schema.String>;
424
- type: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
425
- status: Schema.Literal<["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
421
+ readonly id: Schema.Number;
422
+ readonly title: Schema.String;
423
+ readonly description: Schema.optional<Schema.String>;
424
+ readonly type: Schema.Literals<readonly ["agent", "generate", "structured", "note", "human"]>;
425
+ readonly status: Schema.Literals<readonly ["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
426
426
  /** The agent an `agent` step delegated to — a field, so a run view never
427
427
  * parses it out of `title`. */
428
- agentRef: Schema.optional<typeof Schema.String>;
428
+ readonly agentRef: Schema.optional<Schema.String>;
429
429
  /** What a `generate` step produced. */
430
- modality: Schema.optional<Schema.Literal<["text", "image", "video", "audio"]>>;
431
- startedAt: Schema.optional<typeof Schema.String>;
432
- completedAt: Schema.optional<typeof Schema.String>;
430
+ readonly modality: Schema.optional<Schema.Literals<readonly ["text", "image", "video", "audio"]>>;
431
+ readonly startedAt: Schema.optional<Schema.String>;
432
+ readonly completedAt: Schema.optional<Schema.String>;
433
433
  /** Per-step cost in micro-USD (the app view projects to €/cents). */
434
- costMicroUsd: Schema.optional<typeof Schema.Number>;
434
+ readonly costMicroUsd: Schema.optional<Schema.Number>;
435
435
  /** Where that number came from — the gateway's actual charge, a price-table
436
436
  * estimate, or nothing (`unpriced`: the 0 above is not a price). */
437
- costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
437
+ readonly costSource: Schema.optional<Schema.Literals<readonly ["gateway", "estimated", "unpriced"]>>;
438
438
  /** Links a media step to its generation/usage record. */
439
- requestId: Schema.optional<typeof Schema.String>;
439
+ readonly requestId: Schema.optional<Schema.String>;
440
440
  /** What the step consumed — also on a FAILED step that was charged. */
441
- usage: Schema.optional<Schema.Struct<{
442
- status: Schema.Literal<["reported", "unreported"]>;
443
- unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
444
- input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
445
- output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
441
+ readonly usage: Schema.optional<Schema.Struct<{
442
+ readonly status: Schema.Literals<readonly ["reported", "unreported"]>;
443
+ readonly unit: Schema.optional<Schema.Literals<readonly ["tokens", "characters", "seconds"]>>;
444
+ readonly input: Schema.optional<Schema.Finite>;
445
+ readonly output: Schema.optional<Schema.Finite>;
446
446
  }>>;
447
447
  /** Hosted media artifact URL (image/video/audio), via storage. */
448
- url: Schema.optional<typeof Schema.String>;
448
+ readonly url: Schema.optional<Schema.String>;
449
449
  /** All media variants, including roles and storage references; url projects the primary artifact. */
450
- artifacts: Schema.optional<Schema.filter<Schema.Array$<Schema.Struct<{
451
- url: typeof Schema.NonEmptyString;
452
- mediaType: typeof Schema.NonEmptyString;
453
- role: typeof Schema.NonEmptyString;
454
- storageRefId: Schema.optional<typeof Schema.NonEmptyString>;
455
- providerMetadata: Schema.optional<typeof Schema.Unknown>;
456
- }>>>>;
450
+ readonly artifacts: Schema.optional<Schema.$Array<Schema.Struct<{
451
+ readonly url: Schema.NonEmptyString;
452
+ readonly mediaType: Schema.NonEmptyString;
453
+ readonly role: Schema.NonEmptyString;
454
+ readonly storageRefId: Schema.optional<Schema.NonEmptyString>;
455
+ readonly providerMetadata: Schema.optional<Schema.Unknown>;
456
+ }>>>;
457
457
  /** Inline text output (rendered as markdown). */
458
- output: Schema.optional<Schema.Struct<{
459
- text: typeof Schema.String;
458
+ readonly output: Schema.optional<Schema.Struct<{
459
+ readonly text: Schema.String;
460
460
  }>>;
461
- errorMessage: Schema.optional<typeof Schema.String>;
461
+ readonly errorMessage: Schema.optional<Schema.String>;
462
462
  /** Why a `skipped` step was skipped — the rendered condition, so the timeline
463
463
  * says "{{approved}} is not set" instead of leaving a silent gap. */
464
- skipReason: Schema.optional<typeof Schema.String>;
465
- review: Schema.optional<Schema.Struct<{
466
- mode: Schema.Literal<["approve", "choice", "text"]>;
467
- options: Schema.optional<Schema.Array$<Schema.Struct<{
468
- value: typeof Schema.String;
469
- label: typeof Schema.String;
464
+ readonly skipReason: Schema.optional<Schema.String>;
465
+ readonly review: Schema.optional<Schema.Struct<{
466
+ readonly mode: Schema.Literals<readonly ["approve", "choice", "text"]>;
467
+ readonly options: Schema.optional<Schema.$Array<Schema.Struct<{
468
+ readonly value: Schema.String;
469
+ readonly label: Schema.String;
470
470
  }>>>;
471
- prompt: typeof Schema.String;
471
+ readonly prompt: Schema.String;
472
472
  }>>;
473
473
  }>;
474
474
 
@@ -500,16 +500,16 @@ export declare interface RunStep {
500
500
  readonly review?: RunReview | undefined;
501
501
  }
502
502
 
503
- declare const RunStepStatus: Schema.Literal<["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
503
+ declare const RunStepStatus: Schema.Literals<readonly ["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
504
504
 
505
505
  declare type RunStepStatus = typeof RunStepStatus.Type;
506
506
 
507
507
  declare const StepCondition: Schema.Struct<{
508
508
  /** A brief-field key or an EARLIER step's `outputKey`. */
509
- ref: typeof Schema.String;
510
- op: Schema.Literal<["truthy", "falsy", "eq", "neq", "contains"]>;
509
+ readonly ref: Schema.String;
510
+ readonly op: Schema.Literals<readonly ["truthy", "falsy", "eq", "neq", "contains"]>;
511
511
  /** The right-hand side for `eq` / `neq` / `contains`. Ignored by the unary ops. */
512
- value: Schema.optional<typeof Schema.Unknown>;
512
+ readonly value: Schema.optional<Schema.Unknown>;
513
513
  }>;
514
514
 
515
515
  /** An INTERFACE, for the same api-report reason as `FlowStep` — it is reached
@@ -522,7 +522,7 @@ declare interface StepCondition {
522
522
  }
523
523
 
524
524
  /** The five step types. `generate` fans out to four modalities. */
525
- export declare const StepType: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
525
+ export declare const StepType: Schema.Literals<readonly ["agent", "generate", "structured", "note", "human"]>;
526
526
 
527
527
  export declare type StepType = typeof StepType.Type;
528
528
 
@@ -537,10 +537,10 @@ export declare type StepType = typeof StepType.Type;
537
537
  * later, or reconciled against an invoice.
538
538
  */
539
539
  declare const StepUsage: Schema.Struct<{
540
- status: Schema.Literal<["reported", "unreported"]>;
541
- unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
542
- input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
543
- output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
540
+ readonly status: Schema.Literals<readonly ["reported", "unreported"]>;
541
+ readonly unit: Schema.optional<Schema.Literals<readonly ["tokens", "characters", "seconds"]>>;
542
+ readonly input: Schema.optional<Schema.Finite>;
543
+ readonly output: Schema.optional<Schema.Finite>;
544
544
  }>;
545
545
 
546
546
  declare type StepUsage = typeof StepUsage.Type;
@@ -569,41 +569,41 @@ export declare const useFlowReview: (runId: string | undefined, options?: FlowHo
569
569
  /** `true` when there is a review this caller can answer right now. */
570
570
  canRespond: boolean;
571
571
  respond: (runId: string, stepIndex: number, response: HumanResponse) => Promise<{
572
- readonly status: "accepted";
573
572
  readonly runId: string;
573
+ readonly stepIndex: number;
574
574
  readonly executionId: string;
575
575
  readonly eventId: string;
576
- readonly stepIndex: number;
576
+ readonly status: "accepted";
577
577
  }>;
578
578
  approve: (runId: string, stepIndex: number, text?: string) => Promise<{
579
- readonly status: "accepted";
580
579
  readonly runId: string;
580
+ readonly stepIndex: number;
581
581
  readonly executionId: string;
582
582
  readonly eventId: string;
583
- readonly stepIndex: number;
583
+ readonly status: "accepted";
584
584
  }>;
585
585
  reject: (runId: string, stepIndex: number, text?: string) => Promise<{
586
- readonly status: "accepted";
587
586
  readonly runId: string;
587
+ readonly stepIndex: number;
588
588
  readonly executionId: string;
589
589
  readonly eventId: string;
590
- readonly stepIndex: number;
590
+ readonly status: "accepted";
591
591
  }>;
592
592
  /** Pick one of a `choice` review's options. */
593
593
  choose: (runId: string, stepIndex: number, value: string) => Promise<{
594
- readonly status: "accepted";
595
594
  readonly runId: string;
595
+ readonly stepIndex: number;
596
596
  readonly executionId: string;
597
597
  readonly eventId: string;
598
- readonly stepIndex: number;
598
+ readonly status: "accepted";
599
599
  }>;
600
600
  /** Answer a `text` review. */
601
601
  submitText: (runId: string, stepIndex: number, text: string) => Promise<{
602
- readonly status: "accepted";
603
602
  readonly runId: string;
603
+ readonly stepIndex: number;
604
604
  readonly executionId: string;
605
605
  readonly eventId: string;
606
- readonly stepIndex: number;
606
+ readonly status: "accepted";
607
607
  }>;
608
608
  pending: boolean;
609
609
  error: unknown;
@@ -646,8 +646,8 @@ export declare const useLaunchFlow: (options?: FlowHookOptions) => {
646
646
  readonly workflowName: string;
647
647
  readonly deferral?: {
648
648
  readonly mode: string;
649
- readonly retryAfterMs: number | null;
650
649
  readonly dueAt: number | null;
650
+ readonly retryAfterMs: number | null;
651
651
  readonly intentId: string | null;
652
652
  } | undefined;
653
653
  };
@@ -664,8 +664,8 @@ export declare const useLaunchFlow: (options?: FlowHookOptions) => {
664
664
  readonly workflowName: string;
665
665
  readonly deferral?: {
666
666
  readonly mode: string;
667
- readonly retryAfterMs: number | null;
668
667
  readonly dueAt: number | null;
668
+ readonly retryAfterMs: number | null;
669
669
  readonly intentId: string | null;
670
670
  } | undefined;
671
671
  };
@@ -683,41 +683,41 @@ export declare const useLaunchFlow: (options?: FlowHookOptions) => {
683
683
  */
684
684
  export declare const useRespondToFlow: (options?: FlowHookOptions) => {
685
685
  respond: (runId: string, stepIndex: number, response: HumanResponse) => Promise<{
686
- readonly status: "accepted";
687
686
  readonly runId: string;
687
+ readonly stepIndex: number;
688
688
  readonly executionId: string;
689
689
  readonly eventId: string;
690
- readonly stepIndex: number;
690
+ readonly status: "accepted";
691
691
  }>;
692
692
  approve: (runId: string, stepIndex: number, text?: string) => Promise<{
693
- readonly status: "accepted";
694
693
  readonly runId: string;
694
+ readonly stepIndex: number;
695
695
  readonly executionId: string;
696
696
  readonly eventId: string;
697
- readonly stepIndex: number;
697
+ readonly status: "accepted";
698
698
  }>;
699
699
  reject: (runId: string, stepIndex: number, text?: string) => Promise<{
700
- readonly status: "accepted";
701
700
  readonly runId: string;
701
+ readonly stepIndex: number;
702
702
  readonly executionId: string;
703
703
  readonly eventId: string;
704
- readonly stepIndex: number;
704
+ readonly status: "accepted";
705
705
  }>;
706
706
  /** Pick one of a `choice` review's options. */
707
707
  choose: (runId: string, stepIndex: number, value: string) => Promise<{
708
- readonly status: "accepted";
709
708
  readonly runId: string;
709
+ readonly stepIndex: number;
710
710
  readonly executionId: string;
711
711
  readonly eventId: string;
712
- readonly stepIndex: number;
712
+ readonly status: "accepted";
713
713
  }>;
714
714
  /** Answer a `text` review. */
715
715
  submitText: (runId: string, stepIndex: number, text: string) => Promise<{
716
- readonly status: "accepted";
717
716
  readonly runId: string;
717
+ readonly stepIndex: number;
718
718
  readonly executionId: string;
719
719
  readonly eventId: string;
720
- readonly stepIndex: number;
720
+ readonly status: "accepted";
721
721
  }>;
722
722
  pending: boolean;
723
723
  error: unknown;
@@ -735,8 +735,8 @@ export declare const useRetryFlow: (options?: FlowHookOptions) => {
735
735
  readonly workflowName: string;
736
736
  readonly deferral?: {
737
737
  readonly mode: string;
738
- readonly retryAfterMs: number | null;
739
738
  readonly dueAt: number | null;
739
+ readonly retryAfterMs: number | null;
740
740
  readonly intentId: string | null;
741
741
  } | undefined;
742
742
  };
@@ -746,7 +746,7 @@ export declare const useRetryFlow: (options?: FlowHookOptions) => {
746
746
  };
747
747
 
748
748
  /** Gallery scope. `shared` → per-subject share list; `organization` → tenant. */
749
- export declare const Visibility: Schema.Literal<["private", "organization", "shared"]>;
749
+ export declare const Visibility: Schema.Literals<readonly ["private", "organization", "shared"]>;
750
750
 
751
751
  export declare type Visibility = typeof Visibility.Type;
752
752
 
package/dist/web.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./cadence-_9Izk_fL.js";
1
+ import { cadenceMatches as e, nextRuns as t } from "./cadence.js";
2
2
  import { useAction as n, useSubscription as r } from "@voltro/client";
3
3
  //#region src/web.ts
4
4
  var i = {
@@ -96,4 +96,4 @@ var i = {
96
96
  };
97
97
  };
98
98
  //#endregion
99
- export { i as DEFAULT_FLOW_RPC_TAGS, t as cadenceMatches, e as nextRuns, p as useCancelFlow, h as useFlowReview, c as useFlowRun, l as useFlowRuns, u as useFlows, d as useLaunchFlow, m as useRespondToFlow, f as useRetryFlow };
99
+ export { i as DEFAULT_FLOW_RPC_TAGS, e as cadenceMatches, t as nextRuns, p as useCancelFlow, h as useFlowReview, c as useFlowRun, l as useFlowRuns, u as useFlows, d as useLaunchFlow, m as useRespondToFlow, f as useRetryFlow };