@voltro/plugin-ai-flows 0.73.0 → 0.75.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/CHANGELOG.md +449 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.js +37 -35
- package/dist/index.d.ts +70 -0
- package/dist/index.js +628 -587
- package/dist/{ir-BP8rOTuf.js → ir-C2ewescS.js} +20 -9
- package/dist/ir.d.ts +48 -0
- package/dist/ir.js +2 -2
- package/dist/web.d.ts +28 -0
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -545,6 +545,21 @@ declare const FlowCapabilityMissing_base: Schema.TaggedErrorClass<FlowCapability
|
|
|
545
545
|
} & {
|
|
546
546
|
capability: typeof Schema.String;
|
|
547
547
|
message: typeof Schema.String;
|
|
548
|
+
/** A charge that happened before the failure — the generation succeeded and
|
|
549
|
+
* was billed, then storing its artifact did not. The engine records it on
|
|
550
|
+
* the failed step, so the run's cost is not reported as unknown when it is
|
|
551
|
+
* merely incomplete. */
|
|
552
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
553
|
+
costMicroUsd: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
554
|
+
costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
|
|
555
|
+
requestId: Schema.optional<typeof Schema.NonEmptyString>;
|
|
556
|
+
usage: Schema.optional<Schema.Struct<{
|
|
557
|
+
status: Schema.Literal<["reported", "unreported"]>;
|
|
558
|
+
unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
|
|
559
|
+
input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
560
|
+
output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
561
|
+
}>>;
|
|
562
|
+
}>>;
|
|
548
563
|
}>;
|
|
549
564
|
|
|
550
565
|
/** Follow-up flow spec. On success, map source → the child's brief. */
|
|
@@ -1190,6 +1205,26 @@ export declare interface MediaPersist {
|
|
|
1190
1205
|
readonly ingestUrl?: (url: string, run: FlowRunContext) => Effect.Effect<StoredMedia, unknown, unknown>;
|
|
1191
1206
|
}
|
|
1192
1207
|
|
|
1208
|
+
/**
|
|
1209
|
+
* The evidence of a charge that happened BEFORE a step failed — a provider that
|
|
1210
|
+
* generated (and billed) while a later part of the step, typically storing the
|
|
1211
|
+
* artifact, did not succeed. A failed step that carries one is priced like a
|
|
1212
|
+
* succeeded one; the run's `costCompleteness` counts it.
|
|
1213
|
+
*/
|
|
1214
|
+
export declare const MediaReceipt: Schema.Struct<{
|
|
1215
|
+
costMicroUsd: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1216
|
+
costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
|
|
1217
|
+
requestId: Schema.optional<typeof Schema.NonEmptyString>;
|
|
1218
|
+
usage: Schema.optional<Schema.Struct<{
|
|
1219
|
+
status: Schema.Literal<["reported", "unreported"]>;
|
|
1220
|
+
unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
|
|
1221
|
+
input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1222
|
+
output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1223
|
+
}>>;
|
|
1224
|
+
}>;
|
|
1225
|
+
|
|
1226
|
+
export declare type MediaReceipt = typeof MediaReceipt.Type;
|
|
1227
|
+
|
|
1193
1228
|
export declare const MediaResult: Schema.Struct<{
|
|
1194
1229
|
artifacts: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
1195
1230
|
url: typeof Schema.NonEmptyString;
|
|
@@ -1202,6 +1237,13 @@ export declare const MediaResult: Schema.Struct<{
|
|
|
1202
1237
|
costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
|
|
1203
1238
|
/** A provider/usage correlation only, never a storage reference. */
|
|
1204
1239
|
requestId: Schema.optional<typeof Schema.NonEmptyString>;
|
|
1240
|
+
/** What the generation consumed — the quantity behind `costMicroUsd`. */
|
|
1241
|
+
usage: Schema.optional<Schema.Struct<{
|
|
1242
|
+
status: Schema.Literal<["reported", "unreported"]>;
|
|
1243
|
+
unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
|
|
1244
|
+
input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1245
|
+
output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1246
|
+
}>>;
|
|
1205
1247
|
}>;
|
|
1206
1248
|
|
|
1207
1249
|
export declare type MediaResult = typeof MediaResult.Type;
|
|
@@ -1384,6 +1426,13 @@ export declare const RunStep: Schema.Struct<{
|
|
|
1384
1426
|
costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
|
|
1385
1427
|
/** Links a media step to its generation/usage record. */
|
|
1386
1428
|
requestId: Schema.optional<typeof Schema.String>;
|
|
1429
|
+
/** What the step consumed — also on a FAILED step that was charged. */
|
|
1430
|
+
usage: Schema.optional<Schema.Struct<{
|
|
1431
|
+
status: Schema.Literal<["reported", "unreported"]>;
|
|
1432
|
+
unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
|
|
1433
|
+
input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1434
|
+
output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1435
|
+
}>>;
|
|
1387
1436
|
/** Hosted media artifact URL (image/video/audio), via storage. */
|
|
1388
1437
|
url: Schema.optional<typeof Schema.String>;
|
|
1389
1438
|
/** All media variants, including roles and storage references; url projects the primary artifact. */
|
|
@@ -1426,6 +1475,8 @@ export declare interface RunStep {
|
|
|
1426
1475
|
readonly costMicroUsd?: number | undefined;
|
|
1427
1476
|
readonly costSource?: CostSource | undefined;
|
|
1428
1477
|
readonly requestId?: string | undefined;
|
|
1478
|
+
/** What the step consumed — also on a FAILED step that was charged. */
|
|
1479
|
+
readonly usage?: StepUsage | undefined;
|
|
1429
1480
|
readonly url?: string | undefined;
|
|
1430
1481
|
readonly artifacts?: ReadonlyArray<MediaArtifact> | undefined;
|
|
1431
1482
|
readonly output?: {
|
|
@@ -1479,6 +1530,25 @@ export declare const StepType: Schema.Literal<["agent", "generate", "structured"
|
|
|
1479
1530
|
|
|
1480
1531
|
export declare type StepType = typeof StepType.Type;
|
|
1481
1532
|
|
|
1533
|
+
/**
|
|
1534
|
+
* What a step CONSUMED, in the provider's own unit — the quantity a cost was, or
|
|
1535
|
+
* could have been, priced from. `reported`: the provider said so. `unreported`:
|
|
1536
|
+
* the call returned no tally, so there is nothing to price and nothing to
|
|
1537
|
+
* dispute, and saying that is different from saying zero.
|
|
1538
|
+
*
|
|
1539
|
+
* Without it a step priced `unpriced` read the same whether the provider had
|
|
1540
|
+
* reported 7/150 tokens or nothing at all — and only the first can be priced
|
|
1541
|
+
* later, or reconciled against an invoice.
|
|
1542
|
+
*/
|
|
1543
|
+
export declare const StepUsage: Schema.Struct<{
|
|
1544
|
+
status: Schema.Literal<["reported", "unreported"]>;
|
|
1545
|
+
unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
|
|
1546
|
+
input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1547
|
+
output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
|
|
1548
|
+
}>;
|
|
1549
|
+
|
|
1550
|
+
export declare type StepUsage = typeof StepUsage.Type;
|
|
1551
|
+
|
|
1482
1552
|
/** A persisted artifact — a hosted URL + optional storage ref id. */
|
|
1483
1553
|
export declare interface StoredMedia {
|
|
1484
1554
|
readonly url: string;
|