@opencode/schema 2.2.7 → 2.3.1
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/agent.d.ts +9 -0
- package/dist/automation.d.ts +383 -0
- package/dist/automation.js +150 -0
- package/dist/blob-store.d.ts +16 -0
- package/dist/blob-store.js +15 -0
- package/dist/config/compaction.d.ts +1 -0
- package/dist/config/compaction.js +3 -0
- package/dist/config/experimental.d.ts +6 -3
- package/dist/config/experimental.js +11 -3
- package/dist/config/flag.d.ts +12 -7
- package/dist/config/flag.js +12 -7
- package/dist/config/provider.d.ts +47 -0
- package/dist/config/provider.js +1 -0
- package/dist/event-manifest.d.ts +248 -0
- package/dist/event-manifest.js +1 -1
- package/dist/generate.d.ts +134 -0
- package/dist/generate.js +57 -1
- package/dist/job.d.ts +28 -1
- package/dist/job.js +5 -2
- package/dist/mcp-event.d.ts +188 -0
- package/dist/mcp-event.js +26 -1
- package/dist/mcp.d.ts +21 -0
- package/dist/mcp.js +15 -0
- package/dist/model.d.ts +5 -1
- package/dist/model.js +4 -1
- package/dist/provider.d.ts +61 -0
- package/dist/provider.js +7 -0
- package/dist/session-event.d.ts +283 -0
- package/dist/session-event.js +10 -1
- package/dist/session-message.d.ts +6 -0
- package/dist/session-message.js +2 -0
- package/dist/session-transfer.d.ts +1 -0
- package/dist/tool.d.ts +18 -0
- package/dist/tool.js +9 -0
- package/package.json +1 -1
- package/dist/schedule.d.ts +0 -462
- package/dist/schedule.js +0 -206
package/dist/generate.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ export declare const File: Schema.Struct<{
|
|
|
7
7
|
readonly mime: Schema.String;
|
|
8
8
|
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
9
9
|
}>;
|
|
10
|
+
export interface ImageFile extends Schema.Schema.Type<typeof ImageFile> {
|
|
11
|
+
}
|
|
12
|
+
export declare const ImageFile: Schema.Struct<{
|
|
13
|
+
readonly data: Schema.String;
|
|
14
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
15
|
+
readonly mime: Schema.String;
|
|
16
|
+
}>;
|
|
10
17
|
export interface Usage extends Schema.Schema.Type<typeof Usage> {
|
|
11
18
|
}
|
|
12
19
|
export declare const Usage: Schema.Struct<{
|
|
@@ -92,6 +99,133 @@ export declare const ImageResult: Schema.Struct<{
|
|
|
92
99
|
}>>, never, never>;
|
|
93
100
|
readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
94
101
|
}>;
|
|
102
|
+
export declare const VideoID: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
103
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
104
|
+
};
|
|
105
|
+
export type VideoID = typeof VideoID.Type;
|
|
106
|
+
export type VideoAspect = `${number}:${number}` | "auto";
|
|
107
|
+
export declare const VideoAspect: Schema.Codec<VideoAspect>;
|
|
108
|
+
export type VideoResolution = "480p" | "720p" | "1080p" | "4k" | (string & {});
|
|
109
|
+
export declare const VideoResolution: Schema.Codec<VideoResolution>;
|
|
110
|
+
export interface VideoRequest extends Schema.Schema.Type<typeof VideoRequest> {
|
|
111
|
+
}
|
|
112
|
+
export declare const VideoRequest: Schema.Struct<{
|
|
113
|
+
readonly model: Schema.Struct<{
|
|
114
|
+
readonly id: Schema.brand<Schema.String, "Model.ID">;
|
|
115
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
116
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
117
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
118
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
119
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
120
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
121
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
122
|
+
claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
123
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
124
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
125
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
126
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
127
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
128
|
+
};
|
|
129
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
130
|
+
}> & {
|
|
131
|
+
parse: (input: string) => {
|
|
132
|
+
readonly id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
133
|
+
readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
134
|
+
readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
readonly prompt: Schema.String;
|
|
138
|
+
readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
139
|
+
readonly data: Schema.String;
|
|
140
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
141
|
+
readonly mime: Schema.String;
|
|
142
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
143
|
+
readonly data: Schema.String;
|
|
144
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
145
|
+
readonly mime: Schema.String;
|
|
146
|
+
}>>, never, never>;
|
|
147
|
+
readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
148
|
+
readonly data: Schema.String;
|
|
149
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
150
|
+
readonly mime: Schema.String;
|
|
151
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
152
|
+
readonly data: Schema.String;
|
|
153
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
154
|
+
readonly mime: Schema.String;
|
|
155
|
+
}>>, never, never>;
|
|
156
|
+
readonly references: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
157
|
+
readonly data: Schema.String;
|
|
158
|
+
readonly mime: Schema.String;
|
|
159
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
160
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
161
|
+
readonly data: Schema.String;
|
|
162
|
+
readonly mime: Schema.String;
|
|
163
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
164
|
+
}>>>, never, never>;
|
|
165
|
+
readonly duration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
166
|
+
readonly aspect: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<VideoAspect, VideoAspect, never, never>>>, Schema.optionalKey<Schema.Codec<VideoAspect, VideoAspect, never, never>>, never, never>;
|
|
167
|
+
readonly resolution: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<VideoResolution, VideoResolution, never, never>>>, Schema.optionalKey<Schema.Codec<VideoResolution, VideoResolution, never, never>>, never, never>;
|
|
168
|
+
readonly sound: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
169
|
+
}>;
|
|
170
|
+
export declare const VideoErrorReason: Schema.Literals<readonly ["failed", "cancelled", "expired", "unknown"]>;
|
|
171
|
+
export type VideoErrorReason = typeof VideoErrorReason.Type;
|
|
172
|
+
export interface VideoRunning extends Schema.Schema.Type<typeof VideoRunning> {
|
|
173
|
+
}
|
|
174
|
+
export declare const VideoRunning: Schema.Struct<{
|
|
175
|
+
readonly id: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
176
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
177
|
+
};
|
|
178
|
+
readonly status: Schema.Literal<"running">;
|
|
179
|
+
}>;
|
|
180
|
+
export interface VideoCompleted extends Schema.Schema.Type<typeof VideoCompleted> {
|
|
181
|
+
}
|
|
182
|
+
export declare const VideoCompleted: Schema.Struct<{
|
|
183
|
+
readonly id: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
184
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
185
|
+
};
|
|
186
|
+
readonly status: Schema.Literal<"completed">;
|
|
187
|
+
readonly blobs: Schema.$Array<Schema.Struct<{
|
|
188
|
+
readonly id: Schema.brand<Schema.String, "Blob.ID">;
|
|
189
|
+
readonly mime: Schema.String;
|
|
190
|
+
readonly bytes: Schema.Finite;
|
|
191
|
+
readonly expiresAt: Schema.Finite;
|
|
192
|
+
}>>;
|
|
193
|
+
}>;
|
|
194
|
+
export interface VideoError extends Schema.Schema.Type<typeof VideoError> {
|
|
195
|
+
}
|
|
196
|
+
export declare const VideoError: Schema.Struct<{
|
|
197
|
+
readonly id: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
198
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
199
|
+
};
|
|
200
|
+
readonly status: Schema.Literal<"error">;
|
|
201
|
+
readonly error: Schema.String;
|
|
202
|
+
readonly reason: Schema.Literals<readonly ["failed", "cancelled", "expired", "unknown"]>;
|
|
203
|
+
}>;
|
|
204
|
+
export type VideoJob = VideoRunning | VideoCompleted | VideoError;
|
|
205
|
+
export declare const VideoJob: Schema.Union<readonly [Schema.Struct<{
|
|
206
|
+
readonly id: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
207
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
208
|
+
};
|
|
209
|
+
readonly status: Schema.Literal<"running">;
|
|
210
|
+
}>, Schema.Struct<{
|
|
211
|
+
readonly id: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
212
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
213
|
+
};
|
|
214
|
+
readonly status: Schema.Literal<"completed">;
|
|
215
|
+
readonly blobs: Schema.$Array<Schema.Struct<{
|
|
216
|
+
readonly id: Schema.brand<Schema.String, "Blob.ID">;
|
|
217
|
+
readonly mime: Schema.String;
|
|
218
|
+
readonly bytes: Schema.Finite;
|
|
219
|
+
readonly expiresAt: Schema.Finite;
|
|
220
|
+
}>>;
|
|
221
|
+
}>, Schema.Struct<{
|
|
222
|
+
readonly id: Schema.brand<Schema.String, "Generate.VideoID"> & {
|
|
223
|
+
create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
|
|
224
|
+
};
|
|
225
|
+
readonly status: Schema.Literal<"error">;
|
|
226
|
+
readonly error: Schema.String;
|
|
227
|
+
readonly reason: Schema.Literals<readonly ["failed", "cancelled", "expired", "unknown"]>;
|
|
228
|
+
}>]>;
|
|
95
229
|
export interface DecisionTextPart extends Schema.Schema.Type<typeof DecisionTextPart> {
|
|
96
230
|
}
|
|
97
231
|
export declare const DecisionTextPart: Schema.Struct<{
|
package/dist/generate.js
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export * as Generate from "./generate.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
+
import { BlobStore } from "./blob-store.js";
|
|
4
|
+
import { descending } from "./identifier.js";
|
|
3
5
|
import { Model } from "./model.js";
|
|
4
6
|
import { Money } from "./money.js";
|
|
5
7
|
import { Base64 } from "./prompt.js";
|
|
6
|
-
import { PositiveInt, optional } from "./schema.js";
|
|
8
|
+
import { PositiveInt, optional, statics } from "./schema.js";
|
|
7
9
|
const description = (text) => ({ description: text });
|
|
8
10
|
export const File = Schema.Struct({
|
|
9
11
|
data: Base64,
|
|
10
12
|
mime: Schema.String,
|
|
11
13
|
name: Schema.String.pipe(optional),
|
|
12
14
|
}).annotate({ identifier: "Generate.File" });
|
|
15
|
+
export const ImageFile = Schema.Struct({
|
|
16
|
+
...File.fields,
|
|
17
|
+
mime: Schema.String.check(Schema.isPattern(/^image\//iu)),
|
|
18
|
+
}).annotate({ identifier: "Generate.ImageFile" });
|
|
13
19
|
export const Usage = Schema.Struct({
|
|
14
20
|
input: Schema.Finite.pipe(optional),
|
|
15
21
|
output: Schema.Finite.pipe(optional),
|
|
@@ -49,6 +55,56 @@ export const ImageResult = Schema.Struct({
|
|
|
49
55
|
tokens: Usage.pipe(optional),
|
|
50
56
|
native: Native.pipe(optional),
|
|
51
57
|
}).annotate({ identifier: "Generate.ImageResult" });
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Video
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
// Strict, because the server names files after it.
|
|
62
|
+
export const VideoID = Schema.String.check(Schema.isPattern(/^video_[0-9a-f]{12}[0-9A-Za-z]{14}$/u)).pipe(Schema.brand("Generate.VideoID"), Schema.annotate({ identifier: "Generate.VideoID" }), statics((schema) => ({
|
|
63
|
+
create: () => schema.make("video_" + descending()),
|
|
64
|
+
})));
|
|
65
|
+
export const VideoAspect = Schema.Union([ImageAspect, Schema.Literal("auto")]).annotate({
|
|
66
|
+
identifier: "Generate.VideoAspect",
|
|
67
|
+
description: "Aspect ratio as width:height, or auto to follow the start image",
|
|
68
|
+
});
|
|
69
|
+
export const VideoResolution = Schema.Union([
|
|
70
|
+
Schema.Literals(["480p", "720p", "1080p", "4k"]),
|
|
71
|
+
Schema.String,
|
|
72
|
+
]).annotate({ identifier: "Generate.VideoResolution" });
|
|
73
|
+
export const VideoRequest = Schema.Struct({
|
|
74
|
+
model: Model.Ref,
|
|
75
|
+
prompt: Schema.String,
|
|
76
|
+
start: ImageFile.pipe(optional).annotate(description("Image the video starts on exactly")),
|
|
77
|
+
end: ImageFile.pipe(optional).annotate(description("Image the video ends on exactly")),
|
|
78
|
+
references: Schema.Array(File)
|
|
79
|
+
.pipe(optional)
|
|
80
|
+
.annotate(description("Images, videos or audio that guide the subject or style without pinning a frame")),
|
|
81
|
+
duration: PositiveInt.pipe(optional).annotate(description("Length in seconds")),
|
|
82
|
+
aspect: VideoAspect.pipe(optional),
|
|
83
|
+
resolution: VideoResolution.pipe(optional),
|
|
84
|
+
sound: Schema.Boolean.pipe(optional).annotate(description("Whether the video has a generated soundtrack; unset leaves the model's default")),
|
|
85
|
+
}).annotate({ identifier: "Generate.VideoRequest" });
|
|
86
|
+
export const VideoErrorReason = Schema.Literals(["failed", "cancelled", "expired", "unknown"]).annotate({
|
|
87
|
+
identifier: "Generate.VideoErrorReason",
|
|
88
|
+
description: "failed: the provider failed the job. cancelled: the provider cancelled it. expired: the provider expired it. unknown: the provider gave no result in time",
|
|
89
|
+
});
|
|
90
|
+
export const VideoRunning = Schema.Struct({
|
|
91
|
+
id: VideoID,
|
|
92
|
+
status: Schema.Literal("running"),
|
|
93
|
+
}).annotate({ identifier: "Generate.VideoRunning" });
|
|
94
|
+
export const VideoCompleted = Schema.Struct({
|
|
95
|
+
id: VideoID,
|
|
96
|
+
status: Schema.Literal("completed"),
|
|
97
|
+
blobs: Schema.Array(BlobStore.Info).annotate(description("The finished videos, usually one. Read each with GET /api/experimental/blob/:id")),
|
|
98
|
+
}).annotate({ identifier: "Generate.VideoCompleted" });
|
|
99
|
+
export const VideoError = Schema.Struct({
|
|
100
|
+
id: VideoID,
|
|
101
|
+
status: Schema.Literal("error"),
|
|
102
|
+
error: Schema.String,
|
|
103
|
+
reason: VideoErrorReason,
|
|
104
|
+
}).annotate({ identifier: "Generate.VideoError" });
|
|
105
|
+
export const VideoJob = Schema.Union([VideoRunning, VideoCompleted, VideoError]).annotate({
|
|
106
|
+
identifier: "Generate.VideoJob",
|
|
107
|
+
});
|
|
52
108
|
export const DecisionTextPart = Schema.Struct({ type: Schema.Literal("text"), text: Schema.String }).annotate({
|
|
53
109
|
identifier: "Generate.DecisionTextPart",
|
|
54
110
|
});
|
package/dist/job.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as Job from "./job.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
export declare const Kind: Schema.Literals<readonly ["shell", "subagent", "image"]>;
|
|
3
|
+
export declare const Kind: Schema.Literals<readonly ["shell", "subagent", "image", "codemode"]>;
|
|
4
4
|
export type Kind = typeof Kind.Type;
|
|
5
5
|
export declare const Status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
6
6
|
export type Status = typeof Status.Type;
|
|
@@ -64,6 +64,21 @@ export declare const Image: Schema.Struct<{
|
|
|
64
64
|
readonly path: Schema.String;
|
|
65
65
|
readonly model: Schema.String;
|
|
66
66
|
}>;
|
|
67
|
+
export interface CodeMode extends Schema.Schema.Type<typeof CodeMode> {
|
|
68
|
+
}
|
|
69
|
+
export declare const CodeMode: Schema.Struct<{
|
|
70
|
+
readonly id: Schema.String;
|
|
71
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
72
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
73
|
+
};
|
|
74
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
75
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
76
|
+
readonly time: Schema.Struct<{
|
|
77
|
+
readonly started: Schema.Finite;
|
|
78
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
79
|
+
}>;
|
|
80
|
+
readonly kind: Schema.tag<"codemode">;
|
|
81
|
+
}>;
|
|
67
82
|
export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
68
83
|
readonly id: Schema.String;
|
|
69
84
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
@@ -109,5 +124,17 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
|
109
124
|
readonly kind: Schema.tag<"image">;
|
|
110
125
|
readonly path: Schema.String;
|
|
111
126
|
readonly model: Schema.String;
|
|
127
|
+
}>, Schema.Struct<{
|
|
128
|
+
readonly id: Schema.String;
|
|
129
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
130
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
131
|
+
};
|
|
132
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
133
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
134
|
+
readonly time: Schema.Struct<{
|
|
135
|
+
readonly started: Schema.Finite;
|
|
136
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
137
|
+
}>;
|
|
138
|
+
readonly kind: Schema.tag<"codemode">;
|
|
112
139
|
}>]>;
|
|
113
140
|
export type Info = typeof Info.Type;
|
package/dist/job.js
CHANGED
|
@@ -2,7 +2,7 @@ export * as Job from "./job.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { optional } from "./schema.js";
|
|
4
4
|
import { SessionID } from "./session-id.js";
|
|
5
|
-
export const Kind = Schema.Literals(["shell", "subagent", "image"]).annotate({ identifier: "Job.Kind" });
|
|
5
|
+
export const Kind = Schema.Literals(["shell", "subagent", "image", "codemode"]).annotate({ identifier: "Job.Kind" });
|
|
6
6
|
export const Status = Schema.Literals(["running", "completed", "error", "cancelled"]).annotate({
|
|
7
7
|
identifier: "Job.Status",
|
|
8
8
|
});
|
|
@@ -38,4 +38,7 @@ export const Image = Schema.Struct({
|
|
|
38
38
|
path: Schema.String,
|
|
39
39
|
model: Schema.String,
|
|
40
40
|
}).annotate({ identifier: "Job.Image" });
|
|
41
|
-
export const
|
|
41
|
+
export const CodeMode = Schema.Struct({ kind: Schema.tag("codemode"), ...Base }).annotate({
|
|
42
|
+
identifier: "Job.CodeMode",
|
|
43
|
+
});
|
|
44
|
+
export const Info = Schema.Union([Shell, Subagent, Image, CodeMode]).pipe(Schema.toTaggedUnion("kind"), Schema.annotate({ identifier: "Job.Info" }));
|
package/dist/mcp-event.d.ts
CHANGED
|
@@ -111,6 +111,102 @@ export declare const StatusChanged: Schema.Struct<{
|
|
|
111
111
|
readonly server: Schema.String;
|
|
112
112
|
}>;
|
|
113
113
|
};
|
|
114
|
+
/** One event from an MCP Events subscription. Delivery is at least once: dedupe on `id` and `eventId`. */
|
|
115
|
+
export declare const ExperimentalEvent: Schema.Struct<{
|
|
116
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
117
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
118
|
+
};
|
|
119
|
+
readonly created: Schema.Finite;
|
|
120
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
121
|
+
readonly type: Schema.Literal<"experimental.mcp.event">;
|
|
122
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
123
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
124
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
125
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
126
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
127
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
128
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
129
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
130
|
+
}>, never, never>;
|
|
131
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
132
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
133
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
134
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
135
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
136
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
137
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
138
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
139
|
+
}>, never, never>;
|
|
140
|
+
}>>, never, never>;
|
|
141
|
+
readonly data: Schema.Struct<{
|
|
142
|
+
/** The subscription that received it. */
|
|
143
|
+
readonly id: Schema.String;
|
|
144
|
+
readonly server: Schema.String;
|
|
145
|
+
readonly name: Schema.String;
|
|
146
|
+
readonly eventId: Schema.String;
|
|
147
|
+
readonly timestamp: Schema.String;
|
|
148
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
149
|
+
/** Where the subscription resumes from after this event; null when the event type has no replay. */
|
|
150
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
151
|
+
/** The server skipped events before this one, which it could not replay. */
|
|
152
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
153
|
+
}>;
|
|
154
|
+
}> & {
|
|
155
|
+
type: "experimental.mcp.event";
|
|
156
|
+
durability: "ephemeral";
|
|
157
|
+
durable: undefined;
|
|
158
|
+
data: Schema.Struct<{
|
|
159
|
+
/** The subscription that received it. */
|
|
160
|
+
readonly id: Schema.String;
|
|
161
|
+
readonly server: Schema.String;
|
|
162
|
+
readonly name: Schema.String;
|
|
163
|
+
readonly eventId: Schema.String;
|
|
164
|
+
readonly timestamp: Schema.String;
|
|
165
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
166
|
+
/** Where the subscription resumes from after this event; null when the event type has no replay. */
|
|
167
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
168
|
+
/** The server skipped events before this one, which it could not replay. */
|
|
169
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
170
|
+
}>;
|
|
171
|
+
};
|
|
172
|
+
/** A subscription's status changed; read it with the MCP service's `subscriptions`. */
|
|
173
|
+
export declare const ExperimentalSubscriptionChanged: Schema.Struct<{
|
|
174
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
175
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
176
|
+
};
|
|
177
|
+
readonly created: Schema.Finite;
|
|
178
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
179
|
+
readonly type: Schema.Literal<"experimental.mcp.subscription.changed">;
|
|
180
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
181
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
182
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
183
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
184
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
185
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
186
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
187
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
188
|
+
}>, never, never>;
|
|
189
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
190
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
191
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
192
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
193
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
194
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
195
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
196
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
197
|
+
}>, never, never>;
|
|
198
|
+
}>>, never, never>;
|
|
199
|
+
readonly data: Schema.Struct<{
|
|
200
|
+
readonly id: Schema.String;
|
|
201
|
+
}>;
|
|
202
|
+
}> & {
|
|
203
|
+
type: "experimental.mcp.subscription.changed";
|
|
204
|
+
durability: "ephemeral";
|
|
205
|
+
durable: undefined;
|
|
206
|
+
data: Schema.Struct<{
|
|
207
|
+
readonly id: Schema.String;
|
|
208
|
+
}>;
|
|
209
|
+
};
|
|
114
210
|
export declare const Definitions: readonly [Schema.Struct<{
|
|
115
211
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
116
212
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -219,4 +315,96 @@ export declare const Definitions: readonly [Schema.Struct<{
|
|
|
219
315
|
data: Schema.Struct<{
|
|
220
316
|
readonly server: Schema.String;
|
|
221
317
|
}>;
|
|
318
|
+
}, Schema.Struct<{
|
|
319
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
320
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
321
|
+
};
|
|
322
|
+
readonly created: Schema.Finite;
|
|
323
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
324
|
+
readonly type: Schema.Literal<"experimental.mcp.event">;
|
|
325
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
326
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
327
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
328
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
329
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
330
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
331
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
332
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
333
|
+
}>, never, never>;
|
|
334
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
335
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
336
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
337
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
338
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
339
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
340
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
341
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
342
|
+
}>, never, never>;
|
|
343
|
+
}>>, never, never>;
|
|
344
|
+
readonly data: Schema.Struct<{
|
|
345
|
+
/** The subscription that received it. */
|
|
346
|
+
readonly id: Schema.String;
|
|
347
|
+
readonly server: Schema.String;
|
|
348
|
+
readonly name: Schema.String;
|
|
349
|
+
readonly eventId: Schema.String;
|
|
350
|
+
readonly timestamp: Schema.String;
|
|
351
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
352
|
+
/** Where the subscription resumes from after this event; null when the event type has no replay. */
|
|
353
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
354
|
+
/** The server skipped events before this one, which it could not replay. */
|
|
355
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
356
|
+
}>;
|
|
357
|
+
}> & {
|
|
358
|
+
type: "experimental.mcp.event";
|
|
359
|
+
durability: "ephemeral";
|
|
360
|
+
durable: undefined;
|
|
361
|
+
data: Schema.Struct<{
|
|
362
|
+
/** The subscription that received it. */
|
|
363
|
+
readonly id: Schema.String;
|
|
364
|
+
readonly server: Schema.String;
|
|
365
|
+
readonly name: Schema.String;
|
|
366
|
+
readonly eventId: Schema.String;
|
|
367
|
+
readonly timestamp: Schema.String;
|
|
368
|
+
readonly data: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
369
|
+
/** Where the subscription resumes from after this event; null when the event type has no replay. */
|
|
370
|
+
readonly cursor: Schema.NullOr<Schema.String>;
|
|
371
|
+
/** The server skipped events before this one, which it could not replay. */
|
|
372
|
+
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
373
|
+
}>;
|
|
374
|
+
}, Schema.Struct<{
|
|
375
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
376
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
377
|
+
};
|
|
378
|
+
readonly created: Schema.Finite;
|
|
379
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
380
|
+
readonly type: Schema.Literal<"experimental.mcp.subscription.changed">;
|
|
381
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
382
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
383
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
384
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
385
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
386
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
387
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
388
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
389
|
+
}>, never, never>;
|
|
390
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
391
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
392
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
393
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
394
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
395
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
396
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
397
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
398
|
+
}>, never, never>;
|
|
399
|
+
}>>, never, never>;
|
|
400
|
+
readonly data: Schema.Struct<{
|
|
401
|
+
readonly id: Schema.String;
|
|
402
|
+
}>;
|
|
403
|
+
}> & {
|
|
404
|
+
type: "experimental.mcp.subscription.changed";
|
|
405
|
+
durability: "ephemeral";
|
|
406
|
+
durable: undefined;
|
|
407
|
+
data: Schema.Struct<{
|
|
408
|
+
readonly id: Schema.String;
|
|
409
|
+
}>;
|
|
222
410
|
}];
|
package/dist/mcp-event.js
CHANGED
|
@@ -21,4 +21,29 @@ export const StatusChanged = Event.ephemeral({
|
|
|
21
21
|
server: Schema.String,
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
|
-
|
|
24
|
+
// Experimental: MCP Events is a draft extension; may change without compatibility guarantees.
|
|
25
|
+
/** One event from an MCP Events subscription. Delivery is at least once: dedupe on `id` and `eventId`. */
|
|
26
|
+
export const ExperimentalEvent = Event.ephemeral({
|
|
27
|
+
type: "experimental.mcp.event",
|
|
28
|
+
schema: {
|
|
29
|
+
/** The subscription that received it. */
|
|
30
|
+
id: Schema.String,
|
|
31
|
+
server: Schema.String,
|
|
32
|
+
name: Schema.String,
|
|
33
|
+
eventId: Schema.String,
|
|
34
|
+
timestamp: Schema.String,
|
|
35
|
+
data: Schema.Json,
|
|
36
|
+
/** Where the subscription resumes from after this event; null when the event type has no replay. */
|
|
37
|
+
cursor: Schema.NullOr(Schema.String),
|
|
38
|
+
/** The server skipped events before this one, which it could not replay. */
|
|
39
|
+
truncated: Schema.optional(Schema.Boolean),
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
/** A subscription's status changed; read it with the MCP service's `subscriptions`. */
|
|
43
|
+
export const ExperimentalSubscriptionChanged = Event.ephemeral({
|
|
44
|
+
type: "experimental.mcp.subscription.changed",
|
|
45
|
+
schema: {
|
|
46
|
+
id: Schema.String,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
export const Definitions = Event.inventory(ToolsChanged, ResourcesChanged, StatusChanged, ExperimentalEvent, ExperimentalSubscriptionChanged);
|
package/dist/mcp.d.ts
CHANGED
|
@@ -61,6 +61,27 @@ export declare const Status: Schema.toTaggedUnion<"status", readonly [Schema.Str
|
|
|
61
61
|
readonly status: Schema.Literal<"needs_auth">;
|
|
62
62
|
readonly error: Schema.String;
|
|
63
63
|
}>]>;
|
|
64
|
+
/**
|
|
65
|
+
* An MCP Events subscription: `pending` until its server confirms the stream, `active` while it does, and `ended` when
|
|
66
|
+
* the server terminated or rejected it, or no longer offers events. Pending covers a server that is not connected.
|
|
67
|
+
* Experimental: MCP Events is a draft extension; may change without compatibility guarantees.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SubscriptionStatus: Schema.Union<readonly [Schema.Struct<{
|
|
70
|
+
readonly status: Schema.Literal<"pending">;
|
|
71
|
+
}>, Schema.Struct<{
|
|
72
|
+
readonly status: Schema.Literal<"active">;
|
|
73
|
+
}>, Schema.Struct<{
|
|
74
|
+
readonly status: Schema.Literal<"ended">;
|
|
75
|
+
readonly reason: Schema.Literal<"unavailable">;
|
|
76
|
+
}>, Schema.Struct<{
|
|
77
|
+
readonly status: Schema.Literal<"ended">;
|
|
78
|
+
readonly reason: Schema.Literals<readonly ["terminated", "rejected"]>;
|
|
79
|
+
readonly error: Schema.Struct<{
|
|
80
|
+
readonly code: Schema.Number;
|
|
81
|
+
readonly message: Schema.String;
|
|
82
|
+
}>;
|
|
83
|
+
}>]>;
|
|
84
|
+
export type SubscriptionStatus = typeof SubscriptionStatus.Type;
|
|
64
85
|
export interface Server extends Schema.Schema.Type<typeof Server> {
|
|
65
86
|
}
|
|
66
87
|
export declare const Server: Schema.Struct<{
|
package/dist/mcp.js
CHANGED
|
@@ -80,6 +80,21 @@ const NeedsAuth = Schema.Struct({ status: Schema.Literal("needs_auth"), error: S
|
|
|
80
80
|
identifier: "Mcp.Status.NeedsAuth",
|
|
81
81
|
});
|
|
82
82
|
export const Status = Schema.Union([Connected, Pending, Disabled, Failed, NeedsAuth]).pipe(Schema.toTaggedUnion("status"));
|
|
83
|
+
/**
|
|
84
|
+
* An MCP Events subscription: `pending` until its server confirms the stream, `active` while it does, and `ended` when
|
|
85
|
+
* the server terminated or rejected it, or no longer offers events. Pending covers a server that is not connected.
|
|
86
|
+
* Experimental: MCP Events is a draft extension; may change without compatibility guarantees.
|
|
87
|
+
*/
|
|
88
|
+
export const SubscriptionStatus = Schema.Union([
|
|
89
|
+
Schema.Struct({ status: Schema.Literal("pending") }),
|
|
90
|
+
Schema.Struct({ status: Schema.Literal("active") }),
|
|
91
|
+
Schema.Struct({ status: Schema.Literal("ended"), reason: Schema.Literal("unavailable") }),
|
|
92
|
+
Schema.Struct({
|
|
93
|
+
status: Schema.Literal("ended"),
|
|
94
|
+
reason: Schema.Literals(["terminated", "rejected"]),
|
|
95
|
+
error: Schema.Struct({ code: Schema.Number, message: Schema.String }),
|
|
96
|
+
}),
|
|
97
|
+
]).annotate({ identifier: "Mcp.SubscriptionStatus" });
|
|
83
98
|
export const Server = Schema.Struct({
|
|
84
99
|
name: Schema.String,
|
|
85
100
|
status: Status,
|
package/dist/model.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export { Compatibility, MaxTokensField, MediaInput, ReasoningField };
|
|
|
104
104
|
export declare const Family: Schema.brand<Schema.String, "Model.Family">;
|
|
105
105
|
export type Family = typeof Family.Type;
|
|
106
106
|
/** What a model produces, from models.dev. Open-ended: new types keep being added. Only chat models are offered for sessions; an unset type means chat. */
|
|
107
|
-
export type Type = "chat" | "decision" | "image" | (string & {});
|
|
107
|
+
export type Type = "chat" | "decision" | "image" | "video" | (string & {});
|
|
108
108
|
export declare const Type: Schema.Codec<Type>;
|
|
109
109
|
export declare const Settings: Schema.StructWithRest<Schema.Struct<{
|
|
110
110
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -207,6 +207,8 @@ export interface Capabilities extends Schema.Schema.Type<typeof Capabilities> {
|
|
|
207
207
|
}
|
|
208
208
|
export declare const Capabilities: Schema.Struct<{
|
|
209
209
|
readonly tools: Schema.Boolean;
|
|
210
|
+
/** Freeform tool input formats advertised by the selected API. Absent or empty means JSON tools only. */
|
|
211
|
+
readonly freeform: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Literals<("lark" | "regex" | "text")[]>>>>, Schema.optionalKey<Schema.$Array<Schema.Literals<("lark" | "regex" | "text")[]>>>, never, never>;
|
|
210
212
|
readonly input: Schema.$Array<Schema.String>;
|
|
211
213
|
readonly output: Schema.$Array<Schema.String>;
|
|
212
214
|
/** Whether the model accepts a sampling temperature. Unknown when unset. */
|
|
@@ -413,6 +415,8 @@ export declare const Info: Schema.Struct<{
|
|
|
413
415
|
readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
414
416
|
readonly capabilities: Schema.Struct<{
|
|
415
417
|
readonly tools: Schema.Boolean;
|
|
418
|
+
/** Freeform tool input formats advertised by the selected API. Absent or empty means JSON tools only. */
|
|
419
|
+
readonly freeform: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Literals<("lark" | "regex" | "text")[]>>>>, Schema.optionalKey<Schema.$Array<Schema.Literals<("lark" | "regex" | "text")[]>>>, never, never>;
|
|
416
420
|
readonly input: Schema.$Array<Schema.String>;
|
|
417
421
|
readonly output: Schema.$Array<Schema.String>;
|
|
418
422
|
/** Whether the model accepts a sampling temperature. Unknown when unset. */
|
package/dist/model.js
CHANGED
|
@@ -4,6 +4,7 @@ import { optional, statics } from "./schema.js";
|
|
|
4
4
|
import { Provider } from "./provider.js";
|
|
5
5
|
import { Compatibility, MaxTokensField, MediaInput, ReasoningField } from "./model-compatibility.js";
|
|
6
6
|
import { Money } from "./money.js";
|
|
7
|
+
import { FreeformFormat } from "./tool.js";
|
|
7
8
|
import { ephemeral, inventory } from "./event.js";
|
|
8
9
|
export const ID = Schema.String.pipe(Schema.brand("Model.ID"));
|
|
9
10
|
const Updated = ephemeral({ type: "model.updated", schema: {} });
|
|
@@ -36,7 +37,7 @@ export const Ref = Schema.Struct({
|
|
|
36
37
|
export { Compatibility, MaxTokensField, MediaInput, ReasoningField };
|
|
37
38
|
export const Family = Schema.String.pipe(Schema.brand("Model.Family"));
|
|
38
39
|
export const Type = Schema.Union([
|
|
39
|
-
Schema.Literals(["chat", "decision", "image"]),
|
|
40
|
+
Schema.Literals(["chat", "decision", "image", "video"]),
|
|
40
41
|
Schema.String,
|
|
41
42
|
]).annotate({ identifier: "Model.Type" });
|
|
42
43
|
export const Settings = Schema.StructWithRest(Schema.Struct(Struct.pick(Provider.Settings.schema.fields, ["compaction", "cache", "encoding"])),
|
|
@@ -51,6 +52,8 @@ export const Overlays = {
|
|
|
51
52
|
};
|
|
52
53
|
export const Capabilities = Schema.Struct({
|
|
53
54
|
tools: Schema.Boolean,
|
|
55
|
+
/** Freeform tool input formats advertised by the selected API. Absent or empty means JSON tools only. */
|
|
56
|
+
freeform: Schema.Array(FreeformFormat).pipe(optional),
|
|
54
57
|
input: Schema.Array(Schema.String),
|
|
55
58
|
output: Schema.Array(Schema.String),
|
|
56
59
|
/** Whether the model accepts a sampling temperature. Unknown when unset. */
|