@voltro/plugin-ai-flows 0.83.0 → 0.84.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/errors.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e } from "./ir-DcPJp738.js";
1
+ import { C as e } from "./ir-CdDUTf98.js";
2
2
  import { Schema as t } from "effect";
3
3
  //#region src/errors.ts
4
4
  var n = class extends t.TaggedError()("FlowNotFound", {
package/dist/index.d.ts CHANGED
@@ -434,6 +434,13 @@ export declare interface EngineDeps {
434
434
  readonly resolveTools?: (flowRef: string, run: FlowRunContext, planner: {
435
435
  readonly provider: () => ProviderConfig | undefined;
436
436
  }) => Effect.Effect<Record<string, AnyTool>, FlowCapabilityMissing, unknown>;
437
+ /** The agents the agentic planner may delegate to in this run — the same set
438
+ * `resolveAgent` admits. With it, `run_agent` accepts exactly these refs and
439
+ * the planner reads their descriptions; without it, the agent refs the plan's
440
+ * own agent steps name. A planner given no list guesses, and a guess is a
441
+ * failed step. An explicit empty list removes `run_agent`; a listing failure
442
+ * refuses planning instead of broadening delegation. */
443
+ readonly listAgents?: (run: FlowRunContext) => Effect.Effect<ReadonlyArray<PlannerAgent>, FlowCapabilityMissing, unknown>;
437
444
  /** Media generator for image/video/audio steps (`makeMediaGenerator` in
438
445
  * `mediaAdapter.ts` is the @voltro/ai-backed implementation). */
439
446
  readonly generateMedia?: MediaGenerator;
@@ -1318,6 +1325,13 @@ export declare const nonContiguousGroups: (segments: ReadonlyArray<FlowSegment>)
1318
1325
  */
1319
1326
  export declare const normalizeFlow: (def: FlowDefinitionInput) => FlowIR;
1320
1327
 
1328
+ /** One agent the agentic planner may call, as `listAgents` reports it. */
1329
+ export declare interface PlannerAgent {
1330
+ readonly ref: string;
1331
+ /** What the agent is for, in a sentence the planner reads. */
1332
+ readonly description?: string;
1333
+ }
1334
+
1321
1335
  /**
1322
1336
  * Converge every pending flow run whose start was recorded as `queued` onto
1323
1337
  * what that start has become. Bounded by `take` (newest-first is not needed:
@@ -1470,6 +1484,11 @@ export declare const RunStep: Schema.Struct<{
1470
1484
  description: Schema.optional<typeof Schema.String>;
1471
1485
  type: Schema.Literal<["agent", "generate", "structured", "note", "human"]>;
1472
1486
  status: Schema.Literal<["pending", "running", "waiting", "succeeded", "failed", "skipped"]>;
1487
+ /** The agent an `agent` step delegated to — a field, so a run view never
1488
+ * parses it out of `title`. */
1489
+ agentRef: Schema.optional<typeof Schema.String>;
1490
+ /** What a `generate` step produced. */
1491
+ modality: Schema.optional<Schema.Literal<["text", "image", "video", "audio"]>>;
1473
1492
  startedAt: Schema.optional<typeof Schema.String>;
1474
1493
  completedAt: Schema.optional<typeof Schema.String>;
1475
1494
  /** Per-step cost in micro-USD (the app view projects to €/cents). */
@@ -1523,6 +1542,8 @@ export declare interface RunStep {
1523
1542
  readonly description?: string | undefined;
1524
1543
  readonly type: StepType;
1525
1544
  readonly status: RunStepStatus;
1545
+ readonly agentRef?: string | undefined;
1546
+ readonly modality?: Modality | undefined;
1526
1547
  readonly startedAt?: string | undefined;
1527
1548
  readonly completedAt?: string | undefined;
1528
1549
  readonly costMicroUsd?: number | undefined;