@voltro/plugin-ai-flows 0.84.0 → 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/errors.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Schema } from 'effect';
2
+ import { YieldableError } from 'effect/Cause';
2
3
 
3
4
  /**
4
5
  * An agent the host will not serve for this run: access revoked, a model it
@@ -9,52 +10,46 @@ import { Schema } from 'effect';
9
10
  export declare class FlowAgentUnavailable extends FlowAgentUnavailable_base {
10
11
  }
11
12
 
12
- declare const FlowAgentUnavailable_base: Schema.TaggedErrorClass<FlowAgentUnavailable, "FlowAgentUnavailable", {
13
- readonly _tag: Schema.tag<"FlowAgentUnavailable">;
14
- } & {
15
- agentRef: typeof Schema.String;
16
- reason: Schema.Literal<["not-found", "access-revoked", "model-unusable"]>;
17
- message: typeof Schema.String;
18
- publicMessage: Schema.optional<typeof Schema.String>;
19
- }>;
13
+ declare const FlowAgentUnavailable_base: Schema.Class<FlowAgentUnavailable, Schema.TaggedStruct<"FlowAgentUnavailable", {
14
+ readonly agentRef: Schema.String;
15
+ readonly reason: Schema.Literals<readonly ["not-found", "access-revoked", "model-unusable"]>;
16
+ readonly message: Schema.String;
17
+ readonly publicMessage: Schema.optional<Schema.String>;
18
+ }>, YieldableError>;
20
19
 
21
20
  /** A required brief field was blank at launch. */
22
21
  export declare class FlowBriefIncomplete extends FlowBriefIncomplete_base {
23
22
  }
24
23
 
25
- declare const FlowBriefIncomplete_base: Schema.TaggedErrorClass<FlowBriefIncomplete, "FlowBriefIncomplete", {
26
- readonly _tag: Schema.tag<"FlowBriefIncomplete">;
27
- } & {
28
- missing: Schema.Array$<typeof Schema.String>;
29
- message: typeof Schema.String;
30
- }>;
24
+ declare const FlowBriefIncomplete_base: Schema.Class<FlowBriefIncomplete, Schema.TaggedStruct<"FlowBriefIncomplete", {
25
+ readonly missing: Schema.$Array<Schema.String>;
26
+ readonly message: Schema.String;
27
+ }>, YieldableError>;
31
28
 
32
29
  /** A generation step required a capability the host did not provide (e.g. a
33
30
  * media modality with no configured generator, or storage for the artifact). */
34
31
  export declare class FlowCapabilityMissing extends FlowCapabilityMissing_base {
35
32
  }
36
33
 
37
- declare const FlowCapabilityMissing_base: Schema.TaggedErrorClass<FlowCapabilityMissing, "FlowCapabilityMissing", {
38
- readonly _tag: Schema.tag<"FlowCapabilityMissing">;
39
- } & {
40
- capability: typeof Schema.String;
41
- message: typeof Schema.String;
34
+ declare const FlowCapabilityMissing_base: Schema.Class<FlowCapabilityMissing, Schema.TaggedStruct<"FlowCapabilityMissing", {
35
+ readonly capability: Schema.String;
36
+ readonly message: Schema.String;
42
37
  /** A charge that happened before the failure — the generation succeeded and
43
38
  * was billed, then storing its artifact did not. The engine records it on
44
39
  * the failed step, so the run's cost is not reported as unknown when it is
45
40
  * merely incomplete. */
46
- receipt: Schema.optional<Schema.Struct<{
47
- costMicroUsd: Schema.optional<Schema.filter<typeof Schema.Finite>>;
48
- costSource: Schema.optional<Schema.Literal<["gateway", "estimated", "unpriced"]>>;
49
- requestId: Schema.optional<typeof Schema.NonEmptyString>;
50
- usage: Schema.optional<Schema.Struct<{
51
- status: Schema.Literal<["reported", "unreported"]>;
52
- unit: Schema.optional<Schema.Literal<["tokens", "characters", "seconds"]>>;
53
- input: Schema.optional<Schema.filter<typeof Schema.Finite>>;
54
- output: Schema.optional<Schema.filter<typeof Schema.Finite>>;
41
+ readonly receipt: Schema.optional<Schema.Struct<{
42
+ readonly costMicroUsd: Schema.optional<Schema.Finite>;
43
+ readonly costSource: Schema.optional<Schema.Literals<readonly ["gateway", "estimated", "unpriced"]>>;
44
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
45
+ readonly usage: Schema.optional<Schema.Struct<{
46
+ readonly status: Schema.Literals<readonly ["reported", "unreported"]>;
47
+ readonly unit: Schema.optional<Schema.Literals<readonly ["tokens", "characters", "seconds"]>>;
48
+ readonly input: Schema.optional<Schema.Finite>;
49
+ readonly output: Schema.optional<Schema.Finite>;
55
50
  }>>;
56
51
  }>>;
57
- }>;
52
+ }>, YieldableError>;
58
53
 
59
54
  /** A step's input still contains an unresolved `{{ref}}` (its producing step
60
55
  * failed / was skipped). The engine aborts rather than generate on placeholder
@@ -62,72 +57,60 @@ declare const FlowCapabilityMissing_base: Schema.TaggedErrorClass<FlowCapability
62
57
  export declare class FlowDependencyError extends FlowDependencyError_base {
63
58
  }
64
59
 
65
- declare const FlowDependencyError_base: Schema.TaggedErrorClass<FlowDependencyError, "FlowDependencyError", {
66
- readonly _tag: Schema.tag<"FlowDependencyError">;
67
- } & {
68
- stepId: typeof Schema.String;
69
- unresolvedRef: typeof Schema.String;
70
- message: typeof Schema.String;
71
- }>;
60
+ declare const FlowDependencyError_base: Schema.Class<FlowDependencyError, Schema.TaggedStruct<"FlowDependencyError", {
61
+ readonly stepId: Schema.String;
62
+ readonly unresolvedRef: Schema.String;
63
+ readonly message: Schema.String;
64
+ }>, YieldableError>;
72
65
 
73
66
  /** A run cannot accept a human response in its current state (not `waiting`,
74
67
  * already answered, or cancelled). */
75
68
  export declare class FlowNotAwaitingResponse extends FlowNotAwaitingResponse_base {
76
69
  }
77
70
 
78
- declare const FlowNotAwaitingResponse_base: Schema.TaggedErrorClass<FlowNotAwaitingResponse, "FlowNotAwaitingResponse", {
79
- readonly _tag: Schema.tag<"FlowNotAwaitingResponse">;
80
- } & {
81
- runId: typeof Schema.String;
82
- status: typeof Schema.String;
83
- message: typeof Schema.String;
84
- }>;
71
+ declare const FlowNotAwaitingResponse_base: Schema.Class<FlowNotAwaitingResponse, Schema.TaggedStruct<"FlowNotAwaitingResponse", {
72
+ readonly runId: Schema.String;
73
+ readonly status: Schema.String;
74
+ readonly message: Schema.String;
75
+ }>, YieldableError>;
85
76
 
86
77
  /** A flow (definition) could not be resolved by ref (code name or row id). */
87
78
  export declare class FlowNotFound extends FlowNotFound_base {
88
79
  }
89
80
 
90
- declare const FlowNotFound_base: Schema.TaggedErrorClass<FlowNotFound, "FlowNotFound", {
91
- readonly _tag: Schema.tag<"FlowNotFound">;
92
- } & {
93
- flowRef: typeof Schema.String;
94
- message: typeof Schema.String;
95
- }>;
81
+ declare const FlowNotFound_base: Schema.Class<FlowNotFound, Schema.TaggedStruct<"FlowNotFound", {
82
+ readonly flowRef: Schema.String;
83
+ readonly message: Schema.String;
84
+ }>, YieldableError>;
96
85
 
97
86
  /** No review-delivery confirmation. Unknown delivery may already have been consumed. */
98
87
  export declare class FlowReviewDeliveryError extends FlowReviewDeliveryError_base {
99
88
  }
100
89
 
101
- declare const FlowReviewDeliveryError_base: Schema.TaggedErrorClass<FlowReviewDeliveryError, "FlowReviewDeliveryError", {
102
- readonly _tag: Schema.tag<"FlowReviewDeliveryError">;
103
- } & {
104
- runId: typeof Schema.String;
105
- reason: Schema.Literal<["runtime-unavailable", "invalid-run", "invalid-response", "delivery-unknown"]>;
106
- message: typeof Schema.String;
107
- }>;
90
+ declare const FlowReviewDeliveryError_base: Schema.Class<FlowReviewDeliveryError, Schema.TaggedStruct<"FlowReviewDeliveryError", {
91
+ readonly runId: Schema.String;
92
+ readonly reason: Schema.Literals<readonly ["runtime-unavailable", "invalid-run", "invalid-response", "delivery-unknown"]>;
93
+ readonly message: Schema.String;
94
+ }>, YieldableError>;
108
95
 
109
96
  /** A flow run row could not be found. */
110
97
  export declare class FlowRunNotFound extends FlowRunNotFound_base {
111
98
  }
112
99
 
113
- declare const FlowRunNotFound_base: Schema.TaggedErrorClass<FlowRunNotFound, "FlowRunNotFound", {
114
- readonly _tag: Schema.tag<"FlowRunNotFound">;
115
- } & {
116
- runId: typeof Schema.String;
117
- message: typeof Schema.String;
118
- }>;
100
+ declare const FlowRunNotFound_base: Schema.Class<FlowRunNotFound, Schema.TaggedStruct<"FlowRunNotFound", {
101
+ readonly runId: Schema.String;
102
+ readonly message: Schema.String;
103
+ }>, YieldableError>;
119
104
 
120
105
  /** The flow definition is invalid (bad step graph, unknown agent, cycle, …). */
121
106
  export declare class FlowValidationError extends FlowValidationError_base {
122
107
  }
123
108
 
124
- declare const FlowValidationError_base: Schema.TaggedErrorClass<FlowValidationError, "FlowValidationError", {
125
- readonly _tag: Schema.tag<"FlowValidationError">;
126
- } & {
127
- flowRef: typeof Schema.String;
128
- message: typeof Schema.String;
109
+ declare const FlowValidationError_base: Schema.Class<FlowValidationError, Schema.TaggedStruct<"FlowValidationError", {
110
+ readonly flowRef: Schema.String;
111
+ readonly message: Schema.String;
129
112
  /** Optional per-issue detail for the editor. */
130
- issues: Schema.optional<Schema.Array$<typeof Schema.String>>;
131
- }>;
113
+ readonly issues: Schema.optional<Schema.$Array<Schema.String>>;
114
+ }>, YieldableError>;
132
115
 
133
116
  export { }
package/dist/errors.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e } from "./ir-CdDUTf98.js";
1
+ import { C as e } from "./ir-Cjk1kQl9.js";
2
2
  import { Schema as t } from "effect";
3
3
  //#region src/errors.ts
4
4
  var n = class extends t.TaggedError()("FlowNotFound", {
@@ -24,7 +24,12 @@ var n = class extends t.TaggedError()("FlowNotFound", {
24
24
  message: t.String
25
25
  }) {}, c = class extends t.TaggedError()("FlowReviewDeliveryError", {
26
26
  runId: t.String,
27
- reason: t.Literal("runtime-unavailable", "invalid-run", "invalid-response", "delivery-unknown"),
27
+ reason: t.Literals([
28
+ "runtime-unavailable",
29
+ "invalid-run",
30
+ "invalid-response",
31
+ "delivery-unknown"
32
+ ]),
28
33
  message: t.String
29
34
  }) {}, l = class extends t.TaggedError()("FlowCapabilityMissing", {
30
35
  capability: t.String,
@@ -32,7 +37,11 @@ var n = class extends t.TaggedError()("FlowNotFound", {
32
37
  receipt: t.optional(e)
33
38
  }) {}, u = class extends t.TaggedError()("FlowAgentUnavailable", {
34
39
  agentRef: t.String,
35
- reason: t.Literal("not-found", "access-revoked", "model-unusable"),
40
+ reason: t.Literals([
41
+ "not-found",
42
+ "access-revoked",
43
+ "model-unusable"
44
+ ]),
36
45
  message: t.String,
37
46
  publicMessage: t.optional(t.String)
38
47
  }) {};