@opencode/ai 0.0.0-dev-21798 → 0.0.0-dev-21800
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/README.md +55 -55
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -1
- package/dist/decision-client.d.ts +21 -0
- package/dist/decision-client.js +55 -0
- package/dist/decision.d.ts +452 -0
- package/dist/decision.js +143 -0
- package/dist/experimental.d.ts +0 -3
- package/dist/experimental.js +0 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/promise.d.ts +10 -1
- package/dist/promise.js +5 -0
- package/dist/protocols/alibaba-messages.d.ts +34 -0
- package/dist/protocols/anthropic-messages.d.ts +102 -0
- package/dist/protocols/anthropic-messages.js +32 -8
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/meta-messages.d.ts +34 -0
- package/dist/protocols/meta-messages.js +12 -0
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +108 -0
- package/dist/protocols/shared.d.ts +1 -1
- package/dist/protocols/shared.js +2 -2
- package/dist/protocols/system-one.d.ts +99 -0
- package/dist/protocols/system-one.js +228 -0
- package/dist/protocols/zai-messages.d.ts +34 -0
- package/dist/providers/alibaba.d.ts +34 -0
- package/dist/providers/amazon-bedrock-mantle.d.ts +34 -0
- package/dist/providers/anthropic-compatible.d.ts +34 -0
- package/dist/providers/anthropic.d.ts +34 -0
- package/dist/providers/baseten.d.ts +4 -10
- package/dist/providers/baseten.js +21 -8
- package/dist/providers/cloudflare-ai-gateway.d.ts +69 -3
- package/dist/providers/cloudflare-ai-gateway.js +10 -10
- package/dist/providers/cloudflare-workers-ai.d.ts +1 -3
- package/dist/providers/cloudflare-workers-ai.js +11 -12
- package/dist/providers/digitalocean.d.ts +3 -9
- package/dist/providers/digitalocean.js +10 -10
- package/dist/providers/google-vertex-messages.d.ts +34 -0
- package/dist/providers/meta.d.ts +34 -0
- package/dist/providers/minimax.d.ts +34 -0
- package/dist/providers/moonshot.d.ts +34 -0
- package/dist/providers/openai.d.ts +5 -10
- package/dist/providers/openai.js +11 -7
- package/dist/providers/opencode.d.ts +3 -9
- package/dist/providers/opencode.js +9 -9
- package/dist/providers/openrouter.d.ts +4 -10
- package/dist/providers/openrouter.js +8 -9
- package/dist/providers/typesafe-ai.d.ts +3 -9
- package/dist/providers/typesafe-ai.js +9 -9
- package/dist/providers/vercel-ai-gateway.d.ts +4 -15
- package/dist/providers/vercel-ai-gateway.js +13 -80
- package/dist/providers/zai-coding-plan.d.ts +34 -0
- package/dist/route/client.js +11 -0
- package/dist/route/decision.d.ts +57 -0
- package/dist/route/decision.js +74 -0
- package/package.json +3 -3
- package/dist/experimental/cloudflare-run-evaluation.d.ts +0 -15
- package/dist/experimental/cloudflare-run-evaluation.js +0 -43
- package/dist/experimental/evaluation-client.d.ts +0 -21
- package/dist/experimental/evaluation-client.js +0 -64
- package/dist/experimental/evaluation.d.ts +0 -242
- package/dist/experimental/evaluation.js +0 -108
- package/dist/experimental/openai-decisions.d.ts +0 -23
- package/dist/experimental/openai-decisions.js +0 -115
- package/dist/experimental/system-one.d.ts +0 -114
- package/dist/experimental/system-one.js +0 -140
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { Service, type Execute } from "./decision-client.js";
|
|
3
|
+
import { Media } from "./media.js";
|
|
4
|
+
import { AIError, HttpOptions, ModelID, ProviderID, Usage } from "./schema/index.js";
|
|
5
|
+
export declare const DecisionTextPart: Schema.Struct<{
|
|
6
|
+
readonly type: Schema.Literal<"text">;
|
|
7
|
+
readonly text: Schema.String;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const DecisionJsonPart: Schema.Struct<{
|
|
10
|
+
readonly type: Schema.Literal<"json">;
|
|
11
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const DecisionMediaPart: Schema.Struct<{
|
|
14
|
+
readonly type: Schema.Literal<"media">;
|
|
15
|
+
readonly media: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
16
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
17
|
+
readonly type: Schema.Literal<"bytes">;
|
|
18
|
+
readonly data: Schema.Uint8Array;
|
|
19
|
+
readonly mediaType: Schema.String;
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly type: Schema.Literal<"base64">;
|
|
22
|
+
readonly data: Schema.String;
|
|
23
|
+
readonly mediaType: Schema.String;
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly type: Schema.Literal<"url">;
|
|
26
|
+
readonly url: Schema.String;
|
|
27
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
28
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly type: Schema.Literal<"ref">;
|
|
31
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
32
|
+
readonly id: Schema.String;
|
|
33
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
34
|
+
}>]>;
|
|
35
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
36
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
37
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
38
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
39
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
40
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
41
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
42
|
+
readonly format: Schema.optional<Schema.String>;
|
|
43
|
+
}>>;
|
|
44
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
45
|
+
}>, never, never>;
|
|
46
|
+
readonly filename: Schema.optional<Schema.String>;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const DecisionPart: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
49
|
+
readonly type: Schema.Literal<"text">;
|
|
50
|
+
readonly text: Schema.String;
|
|
51
|
+
}>, Schema.Struct<{
|
|
52
|
+
readonly type: Schema.Literal<"json">;
|
|
53
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
54
|
+
}>, Schema.Struct<{
|
|
55
|
+
readonly type: Schema.Literal<"media">;
|
|
56
|
+
readonly media: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
57
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
58
|
+
readonly type: Schema.Literal<"bytes">;
|
|
59
|
+
readonly data: Schema.Uint8Array;
|
|
60
|
+
readonly mediaType: Schema.String;
|
|
61
|
+
}>, Schema.Struct<{
|
|
62
|
+
readonly type: Schema.Literal<"base64">;
|
|
63
|
+
readonly data: Schema.String;
|
|
64
|
+
readonly mediaType: Schema.String;
|
|
65
|
+
}>, Schema.Struct<{
|
|
66
|
+
readonly type: Schema.Literal<"url">;
|
|
67
|
+
readonly url: Schema.String;
|
|
68
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
69
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
70
|
+
}>, Schema.Struct<{
|
|
71
|
+
readonly type: Schema.Literal<"ref">;
|
|
72
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
73
|
+
readonly id: Schema.String;
|
|
74
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
75
|
+
}>]>;
|
|
76
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
77
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
78
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
79
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
80
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
81
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
82
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
83
|
+
readonly format: Schema.optional<Schema.String>;
|
|
84
|
+
}>>;
|
|
85
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
86
|
+
}>, never, never>;
|
|
87
|
+
readonly filename: Schema.optional<Schema.String>;
|
|
88
|
+
}>]>;
|
|
89
|
+
export type DecisionPart = Schema.Schema.Type<typeof DecisionPart>;
|
|
90
|
+
/** A plain object is one `json` part. */
|
|
91
|
+
export type DecisionInput = typeof Schema.JsonObject.Type | ReadonlyArray<DecisionPart>;
|
|
92
|
+
/** Choice values are typed: `true` and `"true"` are different values. */
|
|
93
|
+
export declare const ChoiceValue: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
94
|
+
export type ChoiceValue = Schema.Schema.Type<typeof ChoiceValue>;
|
|
95
|
+
export declare const PredicateQuestion: Schema.Struct<{
|
|
96
|
+
readonly name: Schema.String;
|
|
97
|
+
readonly type: Schema.Literal<"predicate">;
|
|
98
|
+
readonly instructions: Schema.String;
|
|
99
|
+
}>;
|
|
100
|
+
export type PredicateQuestion = Schema.Schema.Type<typeof PredicateQuestion>;
|
|
101
|
+
export declare const ChoiceQuestion: Schema.Struct<{
|
|
102
|
+
readonly name: Schema.String;
|
|
103
|
+
readonly type: Schema.Literal<"choice">;
|
|
104
|
+
readonly instructions: Schema.String;
|
|
105
|
+
readonly choices: Schema.$Array<Schema.Struct<{
|
|
106
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
107
|
+
readonly description: Schema.optional<Schema.String>;
|
|
108
|
+
}>>;
|
|
109
|
+
}>;
|
|
110
|
+
export type ChoiceQuestion = Schema.Schema.Type<typeof ChoiceQuestion>;
|
|
111
|
+
export declare const ScoreQuestion: Schema.Struct<{
|
|
112
|
+
readonly name: Schema.String;
|
|
113
|
+
readonly type: Schema.Literal<"score">;
|
|
114
|
+
readonly instructions: Schema.String;
|
|
115
|
+
readonly levels: Schema.$Array<Schema.Struct<{
|
|
116
|
+
readonly label: Schema.String;
|
|
117
|
+
readonly description: Schema.optional<Schema.String>;
|
|
118
|
+
}>>;
|
|
119
|
+
}>;
|
|
120
|
+
export type ScoreQuestion = Schema.Schema.Type<typeof ScoreQuestion>;
|
|
121
|
+
export declare const DecisionQuestion: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
122
|
+
readonly name: Schema.String;
|
|
123
|
+
readonly type: Schema.Literal<"predicate">;
|
|
124
|
+
readonly instructions: Schema.String;
|
|
125
|
+
}>, Schema.Struct<{
|
|
126
|
+
readonly name: Schema.String;
|
|
127
|
+
readonly type: Schema.Literal<"choice">;
|
|
128
|
+
readonly instructions: Schema.String;
|
|
129
|
+
readonly choices: Schema.$Array<Schema.Struct<{
|
|
130
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
131
|
+
readonly description: Schema.optional<Schema.String>;
|
|
132
|
+
}>>;
|
|
133
|
+
}>, Schema.Struct<{
|
|
134
|
+
readonly name: Schema.String;
|
|
135
|
+
readonly type: Schema.Literal<"score">;
|
|
136
|
+
readonly instructions: Schema.String;
|
|
137
|
+
readonly levels: Schema.$Array<Schema.Struct<{
|
|
138
|
+
readonly label: Schema.String;
|
|
139
|
+
readonly description: Schema.optional<Schema.String>;
|
|
140
|
+
}>>;
|
|
141
|
+
}>]>;
|
|
142
|
+
export type DecisionQuestion = Schema.Schema.Type<typeof DecisionQuestion>;
|
|
143
|
+
export type DecisionQuestions = ReadonlyArray<DecisionQuestion>;
|
|
144
|
+
export declare const PredicateAnswer: Schema.Struct<{
|
|
145
|
+
readonly name: Schema.String;
|
|
146
|
+
readonly type: Schema.Literal<"predicate">;
|
|
147
|
+
readonly probability: Schema.Number;
|
|
148
|
+
}>;
|
|
149
|
+
export type PredicateAnswer = Schema.Schema.Type<typeof PredicateAnswer>;
|
|
150
|
+
export declare const ChoiceAnswer: Schema.Struct<{
|
|
151
|
+
readonly name: Schema.String;
|
|
152
|
+
readonly type: Schema.Literal<"choice">;
|
|
153
|
+
readonly choice: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
154
|
+
readonly probabilities: Schema.$Array<Schema.Struct<{
|
|
155
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
156
|
+
readonly probability: Schema.Number;
|
|
157
|
+
}>>;
|
|
158
|
+
readonly confidence: Schema.Number;
|
|
159
|
+
}>;
|
|
160
|
+
export type ChoiceAnswer = Schema.Schema.Type<typeof ChoiceAnswer>;
|
|
161
|
+
/** `score` is the probability-weighted level index; `probabilities` has one entry per level. */
|
|
162
|
+
export declare const ScoreAnswer: Schema.Struct<{
|
|
163
|
+
readonly name: Schema.String;
|
|
164
|
+
readonly type: Schema.Literal<"score">;
|
|
165
|
+
readonly score: Schema.Number;
|
|
166
|
+
readonly probabilities: Schema.$Array<Schema.Struct<{
|
|
167
|
+
readonly value: Schema.Int;
|
|
168
|
+
readonly label: Schema.String;
|
|
169
|
+
readonly probability: Schema.Number;
|
|
170
|
+
}>>;
|
|
171
|
+
readonly confidence: Schema.Number;
|
|
172
|
+
}>;
|
|
173
|
+
export type ScoreAnswer = Schema.Schema.Type<typeof ScoreAnswer>;
|
|
174
|
+
/** The host declined this one question; the other answers still came back. */
|
|
175
|
+
export declare const ErrorAnswer: Schema.Struct<{
|
|
176
|
+
readonly name: Schema.String;
|
|
177
|
+
readonly type: Schema.Literal<"error">;
|
|
178
|
+
readonly reason: Schema.Literal<"refusal">;
|
|
179
|
+
}>;
|
|
180
|
+
export type ErrorAnswer = Schema.Schema.Type<typeof ErrorAnswer>;
|
|
181
|
+
export declare const DecisionAnswer: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
182
|
+
readonly name: Schema.String;
|
|
183
|
+
readonly type: Schema.Literal<"predicate">;
|
|
184
|
+
readonly probability: Schema.Number;
|
|
185
|
+
}>, Schema.Struct<{
|
|
186
|
+
readonly name: Schema.String;
|
|
187
|
+
readonly type: Schema.Literal<"choice">;
|
|
188
|
+
readonly choice: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
189
|
+
readonly probabilities: Schema.$Array<Schema.Struct<{
|
|
190
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
191
|
+
readonly probability: Schema.Number;
|
|
192
|
+
}>>;
|
|
193
|
+
readonly confidence: Schema.Number;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly name: Schema.String;
|
|
196
|
+
readonly type: Schema.Literal<"score">;
|
|
197
|
+
readonly score: Schema.Number;
|
|
198
|
+
readonly probabilities: Schema.$Array<Schema.Struct<{
|
|
199
|
+
readonly value: Schema.Int;
|
|
200
|
+
readonly label: Schema.String;
|
|
201
|
+
readonly probability: Schema.Number;
|
|
202
|
+
}>>;
|
|
203
|
+
readonly confidence: Schema.Number;
|
|
204
|
+
}>, Schema.Struct<{
|
|
205
|
+
readonly name: Schema.String;
|
|
206
|
+
readonly type: Schema.Literal<"error">;
|
|
207
|
+
readonly reason: Schema.Literal<"refusal">;
|
|
208
|
+
}>]>;
|
|
209
|
+
export type DecisionAnswer = Schema.Schema.Type<typeof DecisionAnswer>;
|
|
210
|
+
type ChoiceValueOf<Question> = Question extends {
|
|
211
|
+
readonly choices: ReadonlyArray<{
|
|
212
|
+
readonly value: infer Value;
|
|
213
|
+
}>;
|
|
214
|
+
} ? Value : never;
|
|
215
|
+
export type AnswerFor<Question extends DecisionQuestion> = (Question extends {
|
|
216
|
+
readonly type: "predicate";
|
|
217
|
+
} ? PredicateAnswer & {
|
|
218
|
+
readonly name: Question["name"];
|
|
219
|
+
} : Question extends {
|
|
220
|
+
readonly type: "choice";
|
|
221
|
+
} ? {
|
|
222
|
+
readonly name: Question["name"];
|
|
223
|
+
readonly type: "choice";
|
|
224
|
+
readonly choice: ChoiceValueOf<Question>;
|
|
225
|
+
readonly probabilities: ReadonlyArray<{
|
|
226
|
+
readonly value: ChoiceValueOf<Question>;
|
|
227
|
+
readonly probability: number;
|
|
228
|
+
}>;
|
|
229
|
+
readonly confidence: number;
|
|
230
|
+
} : ScoreAnswer & {
|
|
231
|
+
readonly name: Question["name"];
|
|
232
|
+
}) | (ErrorAnswer & {
|
|
233
|
+
readonly name: Question["name"];
|
|
234
|
+
});
|
|
235
|
+
/** One answer per question, in question order. */
|
|
236
|
+
export type AnswersFor<Questions extends DecisionQuestions> = {
|
|
237
|
+
readonly [Index in keyof Questions]: AnswerFor<Questions[Index]>;
|
|
238
|
+
};
|
|
239
|
+
export type DecisionOptions = Record<string, unknown>;
|
|
240
|
+
/** What a decision model's route does; `DecisionRoute.make(...).model(...)` builds one from a protocol. */
|
|
241
|
+
export interface DecisionModelRoute<Options extends DecisionOptions = DecisionOptions> {
|
|
242
|
+
readonly id: string;
|
|
243
|
+
generate(request: DecisionRequestFor<Options>, execute: Execute): Effect.Effect<DecisionResponse, AIError>;
|
|
244
|
+
}
|
|
245
|
+
declare const DecisionModelCompatibility_base: Schema.Class<DecisionModelCompatibility, Schema.Struct<{
|
|
246
|
+
/**
|
|
247
|
+
* Where a System One host reads media, from models.dev `[api.systemone] compatibility.image_input`:
|
|
248
|
+
* `assets` (TypeSafe's assets map), `images` (top-level lists) or `state` (items inside a state list).
|
|
249
|
+
*/
|
|
250
|
+
readonly imageInput: Schema.optional<Schema.Literals<readonly ["assets", "images", "state"]>>;
|
|
251
|
+
}>, {}>;
|
|
252
|
+
/** Host quirks a protocol adapts to, like `LanguageModelCompatibility` for language models. */
|
|
253
|
+
export declare class DecisionModelCompatibility extends DecisionModelCompatibility_base {
|
|
254
|
+
}
|
|
255
|
+
export declare namespace DecisionModelCompatibility {
|
|
256
|
+
type Input = DecisionModelCompatibility | ConstructorParameters<typeof DecisionModelCompatibility>[0];
|
|
257
|
+
const make: (input: Input) => DecisionModelCompatibility;
|
|
258
|
+
}
|
|
259
|
+
export declare class DecisionModel<Options extends DecisionOptions = DecisionOptions> {
|
|
260
|
+
protected readonly _Options: Options;
|
|
261
|
+
readonly id: ModelID;
|
|
262
|
+
readonly provider: ProviderID;
|
|
263
|
+
readonly route: DecisionModelRoute<Options>;
|
|
264
|
+
readonly http?: HttpOptions;
|
|
265
|
+
readonly compatibility?: DecisionModelCompatibility;
|
|
266
|
+
constructor(input: DecisionModel.Input<Options>);
|
|
267
|
+
static make<Options extends DecisionOptions = DecisionOptions>(input: DecisionModel.MakeInput<Options>): DecisionModel<Options>;
|
|
268
|
+
}
|
|
269
|
+
export declare namespace DecisionModel {
|
|
270
|
+
interface Input<Options extends DecisionOptions = DecisionOptions> {
|
|
271
|
+
readonly id: ModelID;
|
|
272
|
+
readonly provider: ProviderID;
|
|
273
|
+
readonly route: DecisionModelRoute<Options>;
|
|
274
|
+
readonly http?: HttpOptions;
|
|
275
|
+
readonly compatibility?: DecisionModelCompatibility;
|
|
276
|
+
}
|
|
277
|
+
interface MakeInput<Options extends DecisionOptions = DecisionOptions> extends Omit<Input<Options>, "id" | "provider"> {
|
|
278
|
+
readonly id: string | ModelID;
|
|
279
|
+
readonly provider: string | ProviderID;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export declare const DecisionModelSchema: Schema.declare<DecisionModel<DecisionOptions>, DecisionModel<DecisionOptions>>;
|
|
283
|
+
export type DecisionModelOptions<Model> = Model extends DecisionModel<infer Options> ? Options : never;
|
|
284
|
+
declare const DecisionRequest_base: Schema.Class<DecisionRequest, Schema.Struct<{
|
|
285
|
+
readonly model: Schema.declare<DecisionModel<DecisionOptions>, DecisionModel<DecisionOptions>>;
|
|
286
|
+
readonly input: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
287
|
+
readonly type: Schema.Literal<"text">;
|
|
288
|
+
readonly text: Schema.String;
|
|
289
|
+
}>, Schema.Struct<{
|
|
290
|
+
readonly type: Schema.Literal<"json">;
|
|
291
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
292
|
+
}>, Schema.Struct<{
|
|
293
|
+
readonly type: Schema.Literal<"media">;
|
|
294
|
+
readonly media: Schema.decodeTo<Schema.declare<Media.Asset, Media.Asset>, Schema.Struct<{
|
|
295
|
+
readonly source: Schema.Union<readonly [Schema.Struct<{
|
|
296
|
+
readonly type: Schema.Literal<"bytes">;
|
|
297
|
+
readonly data: Schema.Uint8Array;
|
|
298
|
+
readonly mediaType: Schema.String;
|
|
299
|
+
}>, Schema.Struct<{
|
|
300
|
+
readonly type: Schema.Literal<"base64">;
|
|
301
|
+
readonly data: Schema.String;
|
|
302
|
+
readonly mediaType: Schema.String;
|
|
303
|
+
}>, Schema.Struct<{
|
|
304
|
+
readonly type: Schema.Literal<"url">;
|
|
305
|
+
readonly url: Schema.String;
|
|
306
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
307
|
+
readonly expiresAt: Schema.optional<Schema.Number>;
|
|
308
|
+
}>, Schema.Struct<{
|
|
309
|
+
readonly type: Schema.Literal<"ref">;
|
|
310
|
+
readonly provider: Schema.brand<Schema.String, "AI.ProviderID">;
|
|
311
|
+
readonly id: Schema.String;
|
|
312
|
+
readonly mediaType: Schema.optional<Schema.String>;
|
|
313
|
+
}>]>;
|
|
314
|
+
readonly info: Schema.optional<Schema.Struct<{
|
|
315
|
+
readonly width: Schema.optional<Schema.Number>;
|
|
316
|
+
readonly height: Schema.optional<Schema.Number>;
|
|
317
|
+
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
318
|
+
readonly sampleRate: Schema.optional<Schema.Number>;
|
|
319
|
+
readonly channels: Schema.optional<Schema.Number>;
|
|
320
|
+
readonly encoding: Schema.optional<Schema.String>;
|
|
321
|
+
readonly format: Schema.optional<Schema.String>;
|
|
322
|
+
}>>;
|
|
323
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
324
|
+
}>, never, never>;
|
|
325
|
+
readonly filename: Schema.optional<Schema.String>;
|
|
326
|
+
}>]>>;
|
|
327
|
+
readonly questions: Schema.refine<readonly ({
|
|
328
|
+
readonly name: string;
|
|
329
|
+
readonly type: "predicate";
|
|
330
|
+
readonly instructions: string;
|
|
331
|
+
} | {
|
|
332
|
+
readonly name: string;
|
|
333
|
+
readonly type: "choice";
|
|
334
|
+
readonly instructions: string;
|
|
335
|
+
readonly choices: readonly {
|
|
336
|
+
readonly value: string | boolean;
|
|
337
|
+
readonly description?: string | undefined;
|
|
338
|
+
}[];
|
|
339
|
+
} | {
|
|
340
|
+
readonly name: string;
|
|
341
|
+
readonly type: "score";
|
|
342
|
+
readonly instructions: string;
|
|
343
|
+
readonly levels: readonly {
|
|
344
|
+
readonly label: string;
|
|
345
|
+
readonly description?: string | undefined;
|
|
346
|
+
}[];
|
|
347
|
+
})[], Schema.refine<readonly ({
|
|
348
|
+
readonly name: string;
|
|
349
|
+
readonly type: "predicate";
|
|
350
|
+
readonly instructions: string;
|
|
351
|
+
} | {
|
|
352
|
+
readonly name: string;
|
|
353
|
+
readonly type: "choice";
|
|
354
|
+
readonly instructions: string;
|
|
355
|
+
readonly choices: readonly {
|
|
356
|
+
readonly value: string | boolean;
|
|
357
|
+
readonly description?: string | undefined;
|
|
358
|
+
}[];
|
|
359
|
+
} | {
|
|
360
|
+
readonly name: string;
|
|
361
|
+
readonly type: "score";
|
|
362
|
+
readonly instructions: string;
|
|
363
|
+
readonly levels: readonly {
|
|
364
|
+
readonly label: string;
|
|
365
|
+
readonly description?: string | undefined;
|
|
366
|
+
}[];
|
|
367
|
+
})[], Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
368
|
+
readonly name: Schema.String;
|
|
369
|
+
readonly type: Schema.Literal<"predicate">;
|
|
370
|
+
readonly instructions: Schema.String;
|
|
371
|
+
}>, Schema.Struct<{
|
|
372
|
+
readonly name: Schema.String;
|
|
373
|
+
readonly type: Schema.Literal<"choice">;
|
|
374
|
+
readonly instructions: Schema.String;
|
|
375
|
+
readonly choices: Schema.$Array<Schema.Struct<{
|
|
376
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
377
|
+
readonly description: Schema.optional<Schema.String>;
|
|
378
|
+
}>>;
|
|
379
|
+
}>, Schema.Struct<{
|
|
380
|
+
readonly name: Schema.String;
|
|
381
|
+
readonly type: Schema.Literal<"score">;
|
|
382
|
+
readonly instructions: Schema.String;
|
|
383
|
+
readonly levels: Schema.$Array<Schema.Struct<{
|
|
384
|
+
readonly label: Schema.String;
|
|
385
|
+
readonly description: Schema.optional<Schema.String>;
|
|
386
|
+
}>>;
|
|
387
|
+
}>]>>>>;
|
|
388
|
+
readonly providerOptions: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
389
|
+
readonly http: Schema.optional<typeof HttpOptions>;
|
|
390
|
+
}>, {}>;
|
|
391
|
+
export declare class DecisionRequest extends DecisionRequest_base {
|
|
392
|
+
protected readonly _DecisionRequest: void;
|
|
393
|
+
}
|
|
394
|
+
export type DecisionRequestFor<Options extends DecisionOptions = DecisionOptions, Questions extends DecisionQuestions = DecisionQuestions> = Omit<DecisionRequest, "model" | "questions" | "providerOptions"> & {
|
|
395
|
+
readonly model: DecisionModel<Options>;
|
|
396
|
+
readonly questions: Questions;
|
|
397
|
+
readonly providerOptions?: Options;
|
|
398
|
+
};
|
|
399
|
+
export type DecisionRequestInput<Model extends DecisionModel = DecisionModel, Questions extends DecisionQuestions = DecisionQuestions> = {
|
|
400
|
+
readonly model: Model;
|
|
401
|
+
readonly input: DecisionInput;
|
|
402
|
+
readonly questions: Questions;
|
|
403
|
+
readonly providerOptions?: NoInfer<DecisionModelOptions<Model>>;
|
|
404
|
+
readonly http?: HttpOptions.Input;
|
|
405
|
+
};
|
|
406
|
+
declare const DecisionResponse_base: Schema.Class<DecisionResponse, Schema.Struct<{
|
|
407
|
+
readonly answers: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
408
|
+
readonly name: Schema.String;
|
|
409
|
+
readonly type: Schema.Literal<"predicate">;
|
|
410
|
+
readonly probability: Schema.Number;
|
|
411
|
+
}>, Schema.Struct<{
|
|
412
|
+
readonly name: Schema.String;
|
|
413
|
+
readonly type: Schema.Literal<"choice">;
|
|
414
|
+
readonly choice: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
415
|
+
readonly probabilities: Schema.$Array<Schema.Struct<{
|
|
416
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Boolean]>;
|
|
417
|
+
readonly probability: Schema.Number;
|
|
418
|
+
}>>;
|
|
419
|
+
readonly confidence: Schema.Number;
|
|
420
|
+
}>, Schema.Struct<{
|
|
421
|
+
readonly name: Schema.String;
|
|
422
|
+
readonly type: Schema.Literal<"score">;
|
|
423
|
+
readonly score: Schema.Number;
|
|
424
|
+
readonly probabilities: Schema.$Array<Schema.Struct<{
|
|
425
|
+
readonly value: Schema.Int;
|
|
426
|
+
readonly label: Schema.String;
|
|
427
|
+
readonly probability: Schema.Number;
|
|
428
|
+
}>>;
|
|
429
|
+
readonly confidence: Schema.Number;
|
|
430
|
+
}>, Schema.Struct<{
|
|
431
|
+
readonly name: Schema.String;
|
|
432
|
+
readonly type: Schema.Literal<"error">;
|
|
433
|
+
readonly reason: Schema.Literal<"refusal">;
|
|
434
|
+
}>]>>;
|
|
435
|
+
readonly usage: Schema.optional<typeof Usage>;
|
|
436
|
+
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
437
|
+
}>, {}>;
|
|
438
|
+
export declare class DecisionResponse extends DecisionResponse_base {
|
|
439
|
+
}
|
|
440
|
+
export type DecisionResponseFor<Questions extends DecisionQuestions> = Omit<DecisionResponse, "answers"> & {
|
|
441
|
+
readonly answers: AnswersFor<Questions>;
|
|
442
|
+
};
|
|
443
|
+
export declare function request<const Model extends DecisionModel, const Questions extends DecisionQuestions>(input: DecisionRequestInput<Model, Questions>): DecisionRequestFor<DecisionModelOptions<Model>, Questions>;
|
|
444
|
+
export declare function request(input: DecisionRequest): DecisionRequest;
|
|
445
|
+
export declare function request(input: DecisionRequest | DecisionRequestInput): DecisionRequest;
|
|
446
|
+
export declare function generate<const Model extends DecisionModel, const Questions extends DecisionQuestions>(input: DecisionRequestInput<Model, Questions>): Effect.Effect<DecisionResponseFor<Questions>, AIError, Service>;
|
|
447
|
+
export declare function generate(input: DecisionRequest): Effect.Effect<DecisionResponse, AIError, Service>;
|
|
448
|
+
export declare const Decision: {
|
|
449
|
+
readonly request: typeof request;
|
|
450
|
+
readonly generate: typeof generate;
|
|
451
|
+
};
|
|
452
|
+
export {};
|
package/dist/decision.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { DecisionClient, Service } from "./decision-client.js";
|
|
3
|
+
import { Media } from "./media.js";
|
|
4
|
+
import { tryRequest } from "./media-model.js";
|
|
5
|
+
import { AIError, HttpOptions, ModelID, ProviderID, ProviderMetadata, ProviderOptions, Usage } from "./schema/index.js";
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Input
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
export const DecisionTextPart = Schema.Struct({ type: Schema.Literal("text"), text: Schema.String });
|
|
10
|
+
export const DecisionJsonPart = Schema.Struct({ type: Schema.Literal("json"), value: Schema.Json });
|
|
11
|
+
export const DecisionMediaPart = Schema.Struct({
|
|
12
|
+
type: Schema.Literal("media"),
|
|
13
|
+
media: Media.AssetSchema,
|
|
14
|
+
filename: Schema.optional(Schema.String),
|
|
15
|
+
});
|
|
16
|
+
export const DecisionPart = Schema.Union([DecisionTextPart, DecisionJsonPart, DecisionMediaPart]).pipe(Schema.toTaggedUnion("type"));
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Questions
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/** Choice values are typed: `true` and `"true"` are different values. */
|
|
21
|
+
export const ChoiceValue = Schema.Union([Schema.String, Schema.Boolean]);
|
|
22
|
+
export const PredicateQuestion = Schema.Struct({
|
|
23
|
+
name: Schema.String,
|
|
24
|
+
type: Schema.Literal("predicate"),
|
|
25
|
+
instructions: Schema.String,
|
|
26
|
+
});
|
|
27
|
+
export const ChoiceQuestion = Schema.Struct({
|
|
28
|
+
name: Schema.String,
|
|
29
|
+
type: Schema.Literal("choice"),
|
|
30
|
+
instructions: Schema.String,
|
|
31
|
+
choices: Schema.Array(Schema.Struct({ value: ChoiceValue, description: Schema.optional(Schema.String) })),
|
|
32
|
+
});
|
|
33
|
+
export const ScoreQuestion = Schema.Struct({
|
|
34
|
+
name: Schema.String,
|
|
35
|
+
type: Schema.Literal("score"),
|
|
36
|
+
instructions: Schema.String,
|
|
37
|
+
levels: Schema.Array(Schema.Struct({ label: Schema.String, description: Schema.optional(Schema.String) })),
|
|
38
|
+
});
|
|
39
|
+
export const DecisionQuestion = Schema.Union([PredicateQuestion, ChoiceQuestion, ScoreQuestion]).pipe(Schema.toTaggedUnion("type"));
|
|
40
|
+
// Only what makes a request meaningless is checked here; counts and sizes are the host's to enforce.
|
|
41
|
+
const DecisionQuestionList = Schema.Array(DecisionQuestion).pipe(Schema.refine((x) => x.length > 0, { message: "Decision questions must not be empty" }), Schema.refine((x) => new Set(x.map((question) => question.name)).size === x.length, {
|
|
42
|
+
message: "Decision question names must be unique",
|
|
43
|
+
}));
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// Answers
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
const Probability = Schema.Number.check(Schema.isBetween({ minimum: 0, maximum: 1 }));
|
|
48
|
+
export const PredicateAnswer = Schema.Struct({
|
|
49
|
+
name: Schema.String,
|
|
50
|
+
type: Schema.Literal("predicate"),
|
|
51
|
+
probability: Probability,
|
|
52
|
+
});
|
|
53
|
+
export const ChoiceAnswer = Schema.Struct({
|
|
54
|
+
name: Schema.String,
|
|
55
|
+
type: Schema.Literal("choice"),
|
|
56
|
+
choice: ChoiceValue,
|
|
57
|
+
probabilities: Schema.Array(Schema.Struct({ value: ChoiceValue, probability: Probability })),
|
|
58
|
+
confidence: Probability,
|
|
59
|
+
});
|
|
60
|
+
/** `score` is the probability-weighted level index; `probabilities` has one entry per level. */
|
|
61
|
+
export const ScoreAnswer = Schema.Struct({
|
|
62
|
+
name: Schema.String,
|
|
63
|
+
type: Schema.Literal("score"),
|
|
64
|
+
score: Schema.Number,
|
|
65
|
+
probabilities: Schema.Array(Schema.Struct({ value: Schema.Int, label: Schema.String, probability: Probability })),
|
|
66
|
+
confidence: Probability,
|
|
67
|
+
});
|
|
68
|
+
/** The host declined this one question; the other answers still came back. */
|
|
69
|
+
export const ErrorAnswer = Schema.Struct({
|
|
70
|
+
name: Schema.String,
|
|
71
|
+
type: Schema.Literal("error"),
|
|
72
|
+
reason: Schema.Literal("refusal"),
|
|
73
|
+
});
|
|
74
|
+
export const DecisionAnswer = Schema.Union([PredicateAnswer, ChoiceAnswer, ScoreAnswer, ErrorAnswer]).pipe(Schema.toTaggedUnion("type"));
|
|
75
|
+
/** Host quirks a protocol adapts to, like `LanguageModelCompatibility` for language models. */
|
|
76
|
+
export class DecisionModelCompatibility extends Schema.Class("Decision.ModelCompatibility")({
|
|
77
|
+
/**
|
|
78
|
+
* Where a System One host reads media, from models.dev `[api.systemone] compatibility.image_input`:
|
|
79
|
+
* `assets` (TypeSafe's assets map), `images` (top-level lists) or `state` (items inside a state list).
|
|
80
|
+
*/
|
|
81
|
+
imageInput: Schema.optional(Schema.Literals(["assets", "images", "state"])),
|
|
82
|
+
}) {
|
|
83
|
+
}
|
|
84
|
+
(function (DecisionModelCompatibility) {
|
|
85
|
+
DecisionModelCompatibility.make = (input) => input instanceof DecisionModelCompatibility ? input : new DecisionModelCompatibility(input);
|
|
86
|
+
})(DecisionModelCompatibility || (DecisionModelCompatibility = {}));
|
|
87
|
+
export class DecisionModel {
|
|
88
|
+
id;
|
|
89
|
+
provider;
|
|
90
|
+
route;
|
|
91
|
+
http;
|
|
92
|
+
compatibility;
|
|
93
|
+
constructor(input) {
|
|
94
|
+
this.id = input.id;
|
|
95
|
+
this.provider = input.provider;
|
|
96
|
+
this.route = input.route;
|
|
97
|
+
this.http = input.http;
|
|
98
|
+
this.compatibility = input.compatibility;
|
|
99
|
+
}
|
|
100
|
+
static make(input) {
|
|
101
|
+
return new DecisionModel({
|
|
102
|
+
...input,
|
|
103
|
+
id: ModelID.make(input.id),
|
|
104
|
+
provider: ProviderID.make(input.provider),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
export const DecisionModelSchema = Schema.declare((value) => value instanceof DecisionModel, {
|
|
109
|
+
expected: "Decision.Model",
|
|
110
|
+
});
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
// Request and response
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
export class DecisionRequest extends Schema.Class("Decision.Request")({
|
|
115
|
+
model: DecisionModelSchema,
|
|
116
|
+
input: Schema.Array(DecisionPart),
|
|
117
|
+
questions: DecisionQuestionList,
|
|
118
|
+
providerOptions: Schema.optional(ProviderOptions),
|
|
119
|
+
http: Schema.optional(HttpOptions),
|
|
120
|
+
}) {
|
|
121
|
+
}
|
|
122
|
+
export class DecisionResponse extends Schema.Class("Decision.Response")({
|
|
123
|
+
answers: Schema.Array(DecisionAnswer),
|
|
124
|
+
usage: Schema.optional(Usage),
|
|
125
|
+
providerMetadata: Schema.optional(ProviderMetadata),
|
|
126
|
+
}) {
|
|
127
|
+
}
|
|
128
|
+
export function request(input) {
|
|
129
|
+
if (input instanceof DecisionRequest)
|
|
130
|
+
return input;
|
|
131
|
+
return new DecisionRequest({
|
|
132
|
+
...input,
|
|
133
|
+
input: Array.isArray(input.input) ? input.input : [{ type: "json", value: input.input }],
|
|
134
|
+
http: HttpOptions.make(input.http),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
export function generate(input) {
|
|
138
|
+
return tryRequest(() => request(input)).pipe(Effect.flatMap(DecisionClient.generate));
|
|
139
|
+
}
|
|
140
|
+
export const Decision = {
|
|
141
|
+
request,
|
|
142
|
+
generate,
|
|
143
|
+
};
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export { EvaluationClient } from "./experimental/evaluation-client.js";
|
|
2
|
-
export { BooleanAnswer, BooleanQuestion, ChoiceAnswer, ChoiceQuestion, Evaluation, EvaluationAnswer, EvaluationInput, EvaluationModel, EvaluationModelSchema, EvaluationQuestion, EvaluationRequest, EvaluationResponse, EvaluationRounding, ScoreAnswer, ScoreQuestion, } from "./experimental/evaluation.js";
|
|
3
|
-
export type { AnswerFor, AnswersFor, EvaluationModelOptions, EvaluationOptions, EvaluationQuestions, EvaluationRequestFor, EvaluationRequestInput, EvaluationResponseFor, EvaluationRoute, } from "./experimental/evaluation.js";
|
|
4
1
|
export { Realtime } from "./experimental/realtime.js";
|
|
5
2
|
export type { RealtimeConnectInput, RealtimeSession, RealtimeTransport, RealtimeTransportInput, RealtimeTransportType, } from "./experimental/realtime.js";
|
package/dist/experimental.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export { EvaluationClient } from "./experimental/evaluation-client.js";
|
|
2
|
-
export { BooleanAnswer, BooleanQuestion, ChoiceAnswer, ChoiceQuestion, Evaluation, EvaluationAnswer, EvaluationInput, EvaluationModel, EvaluationModelSchema, EvaluationQuestion, EvaluationRequest, EvaluationResponse, EvaluationRounding, ScoreAnswer, ScoreQuestion, } from "./experimental/evaluation.js";
|
|
3
1
|
export { Realtime } from "./experimental/realtime.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,11 @@ export { TranscriptionClient } from "./transcription-client.js";
|
|
|
22
22
|
export { TranscriptionEvent, TranscriptionModel, TranscriptionModelSchema, TranscriptionRequest, TranscriptionResponse, TranscriptionSegment, TranscriptionTimestamps, TranscriptionWord, } from "./transcription.js";
|
|
23
23
|
export type { TranscriptionModelOptions, TranscriptionOptions, TranscriptionRequestFor, TranscriptionRequestInput, TranscriptionRoute, } from "./transcription.js";
|
|
24
24
|
export { Transcription } from "./transcription.js";
|
|
25
|
+
export { DecisionClient } from "./decision-client.js";
|
|
26
|
+
export { ChoiceAnswer, ChoiceQuestion, ChoiceValue, DecisionAnswer, DecisionJsonPart, DecisionMediaPart, DecisionModel, DecisionModelCompatibility, DecisionModelSchema, DecisionPart, DecisionQuestion, DecisionRequest, DecisionResponse, DecisionTextPart, ErrorAnswer, PredicateAnswer, PredicateQuestion, ScoreAnswer, ScoreQuestion, } from "./decision.js";
|
|
27
|
+
export type { AnswerFor, AnswersFor, DecisionInput, DecisionModelOptions, DecisionOptions, DecisionQuestions, DecisionRequestFor, DecisionRequestInput, DecisionResponseFor, DecisionModelRoute, } from "./decision.js";
|
|
28
|
+
export { Decision } from "./decision.js";
|
|
29
|
+
export { DecisionRoute } from "./route/decision.js";
|
|
25
30
|
export { Media } from "./media.js";
|
|
26
31
|
export { Generation } from "./generation.js";
|
|
27
32
|
export type { AwaitOptions as GenerationAwaitOptions, Event as GenerationEvent, Poll, Route as GenerationRoute, Snapshot as GenerationSnapshot, Status as GenerationStatus, } from "./generation.js";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,10 @@ export { Speech } from "./speech.js";
|
|
|
17
17
|
export { TranscriptionClient } from "./transcription-client.js";
|
|
18
18
|
export { TranscriptionEvent, TranscriptionModel, TranscriptionModelSchema, TranscriptionRequest, TranscriptionResponse, TranscriptionSegment, TranscriptionTimestamps, TranscriptionWord, } from "./transcription.js";
|
|
19
19
|
export { Transcription } from "./transcription.js";
|
|
20
|
+
export { DecisionClient } from "./decision-client.js";
|
|
21
|
+
export { ChoiceAnswer, ChoiceQuestion, ChoiceValue, DecisionAnswer, DecisionJsonPart, DecisionMediaPart, DecisionModel, DecisionModelCompatibility, DecisionModelSchema, DecisionPart, DecisionQuestion, DecisionRequest, DecisionResponse, DecisionTextPart, ErrorAnswer, PredicateAnswer, PredicateQuestion, ScoreAnswer, ScoreQuestion, } from "./decision.js";
|
|
22
|
+
export { Decision } from "./decision.js";
|
|
23
|
+
export { DecisionRoute } from "./route/decision.js";
|
|
20
24
|
export { Media } from "./media.js";
|
|
21
25
|
export { Generation } from "./generation.js";
|
|
22
26
|
export { Tool, ToolFailure, toDefinitions } from "./tool.js";
|