@opencode/protocol 2.1.4 → 2.2.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/api.d.ts +4 -3
- package/dist/api.js +5 -3
- package/dist/client.d.ts +4 -0
- package/dist/client.js +13 -1
- package/dist/errors.d.ts +38 -0
- package/dist/errors.js +40 -0
- package/dist/groups/agent.d.ts +12 -2
- package/dist/groups/agent.js +2 -1
- package/dist/groups/event.d.ts +15 -2
- package/dist/groups/event.js +9 -0
- package/dist/groups/experimental.d.ts +523 -0
- package/dist/groups/experimental.js +5 -0
- package/dist/groups/fs.d.ts +15 -3
- package/dist/groups/fs.js +27 -1
- package/dist/groups/generate.d.ts +194 -3
- package/dist/groups/generate.js +41 -5
- package/dist/groups/mcp.d.ts +1 -0
- package/dist/groups/media.d.ts +8 -0
- package/dist/groups/media.js +18 -0
- package/dist/groups/message.d.ts +2240 -0
- package/dist/groups/message.js +29 -4
- package/dist/groups/model.d.ts +33 -6
- package/dist/groups/model.js +8 -2
- package/dist/groups/permission.d.ts +2 -2
- package/dist/groups/permission.js +4 -3
- package/dist/groups/persistent-pty.js +11 -10
- package/dist/groups/plugin.d.ts +18 -2
- package/dist/groups/plugin.js +15 -1
- package/dist/groups/provider.d.ts +24 -0
- package/dist/groups/schedule.d.ts +332 -0
- package/dist/groups/schedule.js +51 -0
- package/dist/groups/server.d.ts +2 -0
- package/dist/groups/server.js +2 -0
- package/dist/groups/session.d.ts +295 -11
- package/dist/groups/session.js +19 -35
- package/dist/groups/usage.d.ts +95 -0
- package/dist/groups/usage.js +22 -0
- package/dist/groups/vcs.d.ts +2 -0
- package/dist/groups/vcs.js +1 -0
- package/dist/groups/voice.d.ts +2 -18
- package/dist/groups/voice.js +3 -19
- package/package.json +3 -2
package/dist/groups/message.js
CHANGED
|
@@ -54,16 +54,41 @@ export const PublicSessionMessage = Schema.Union([
|
|
|
54
54
|
SessionMessage.Compaction,
|
|
55
55
|
SessionMessage.Idle,
|
|
56
56
|
]).annotate({ identifier: "Session.Message.Info" });
|
|
57
|
+
/**
|
|
58
|
+
* Experimental: {@link PublicSessionMessage} as sent to clients that opt in with `X-OpenCode-Capabilities:
|
|
59
|
+
* experimental-media-uri` while `experimental.media_blob` is on. User files stored in `blob` stay `media:` refs.
|
|
60
|
+
*/
|
|
61
|
+
export const PublicMediaSessionMessage = Schema.Union([
|
|
62
|
+
SessionMessage.AgentSelected,
|
|
63
|
+
SessionMessage.ModelSelected,
|
|
64
|
+
PublicLocationSwitched,
|
|
65
|
+
SessionMessage.MediaUser,
|
|
66
|
+
SessionMessage.Synthetic,
|
|
67
|
+
SessionMessage.System,
|
|
68
|
+
SessionMessage.Skill,
|
|
69
|
+
SessionMessage.Shell,
|
|
70
|
+
SessionMessage.Assistant,
|
|
71
|
+
SessionMessage.Compaction,
|
|
72
|
+
SessionMessage.Idle,
|
|
73
|
+
]).annotate({ identifier: "Session.Message.MediaInfo" });
|
|
74
|
+
const MessagesCursor = Schema.Struct({
|
|
75
|
+
previous: Schema.String.pipe(Schema.optional),
|
|
76
|
+
next: Schema.String.pipe(Schema.optional),
|
|
77
|
+
});
|
|
78
|
+
/** Experimental: the `session.messages` response for clients that opt into `experimental-media-uri`. */
|
|
79
|
+
export const SessionMediaMessagesResponse = Schema.Struct({
|
|
80
|
+
data: Schema.Array(PublicMediaSessionMessage),
|
|
81
|
+
cursor: MessagesCursor,
|
|
82
|
+
});
|
|
83
|
+
/** Experimental: the `session.message` response for clients that opt into `experimental-media-uri`. */
|
|
84
|
+
export const SessionMediaMessageResponse = Schema.Struct({ data: PublicMediaSessionMessage });
|
|
57
85
|
export const MessageGroup = HttpApiGroup.make("server.message")
|
|
58
86
|
.add(HttpApiEndpoint.get("session.messages", "/api/session/:sessionID/message", {
|
|
59
87
|
params: { sessionID: Session.ID },
|
|
60
88
|
query: SessionMessagesQuery,
|
|
61
89
|
success: Schema.Struct({
|
|
62
90
|
data: Schema.Array(PublicSessionMessage),
|
|
63
|
-
cursor:
|
|
64
|
-
previous: Schema.String.pipe(Schema.optional),
|
|
65
|
-
next: Schema.String.pipe(Schema.optional),
|
|
66
|
-
}),
|
|
91
|
+
cursor: MessagesCursor,
|
|
67
92
|
}).annotate({ identifier: "SessionMessagesResponse" }),
|
|
68
93
|
error: [InvalidCursorError, SessionNotFoundError, UnknownError],
|
|
69
94
|
}).annotateMerge(OpenApi.annotations({
|
package/dist/groups/model.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
21
21
|
}>, Schema.Struct<{
|
|
22
22
|
readonly type: Schema.Literal<"native">;
|
|
23
23
|
}>]>>, never, never>;
|
|
24
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
25
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
26
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
27
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
28
|
+
}>>, never, never>;
|
|
24
29
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
25
30
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
26
31
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -32,6 +37,11 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
32
37
|
}>, Schema.Struct<{
|
|
33
38
|
readonly type: Schema.Literal<"native">;
|
|
34
39
|
}>]>>, never, never>;
|
|
40
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
41
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
42
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
43
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
44
|
+
}>>, never, never>;
|
|
35
45
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
36
46
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
37
47
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
@@ -76,6 +86,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
76
86
|
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
77
87
|
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
78
88
|
}>, never, never>;
|
|
89
|
+
readonly type: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Model.Type, Model.Type, never, never>>>, Schema.optionalKey<Schema.Codec<Model.Type, Model.Type, never, never>>, never, never>;
|
|
79
90
|
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
|
|
80
91
|
readonly name: Schema.String;
|
|
81
92
|
readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
@@ -89,6 +100,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
89
100
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
90
101
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
91
102
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
103
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
92
104
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
93
105
|
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Model.ReasoningField, Model.ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<Model.ReasoningField, Model.ReasoningField, never, never>>, never, never>;
|
|
94
106
|
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
@@ -100,6 +112,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
100
112
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
101
113
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
102
114
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
115
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
103
116
|
}>>, never, never>;
|
|
104
117
|
readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
105
118
|
readonly capabilities: Schema.Struct<{
|
|
@@ -115,6 +128,9 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
115
128
|
};
|
|
116
129
|
};
|
|
117
130
|
readonly variants: Schema.$Array<Schema.Struct<{
|
|
131
|
+
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
132
|
+
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
133
|
+
readonly id: Schema.brand<Schema.String, "Model.VariantID">;
|
|
118
134
|
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
119
135
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
120
136
|
readonly type: Schema.Literal<"summary">;
|
|
@@ -138,9 +154,6 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
138
154
|
}>]>>, never, never>;
|
|
139
155
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
140
156
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
141
|
-
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
142
|
-
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
143
|
-
readonly id: Schema.brand<Schema.String, "Model.VariantID">;
|
|
144
157
|
}>>;
|
|
145
158
|
readonly time: Schema.Struct<{
|
|
146
159
|
readonly released: Schema.Finite;
|
|
@@ -203,6 +216,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
203
216
|
readonly location: Schema.optional<Schema.Struct<{
|
|
204
217
|
readonly directory: Schema.optional<Schema.String>;
|
|
205
218
|
}>>;
|
|
219
|
+
readonly types: Schema.optional<Schema.ArrayEnsure<Schema.Codec<Model.Type, Model.Type, never, never>>>;
|
|
206
220
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
207
221
|
readonly location: Schema.Struct<{
|
|
208
222
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
@@ -218,6 +232,11 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
218
232
|
}>, Schema.Struct<{
|
|
219
233
|
readonly type: Schema.Literal<"native">;
|
|
220
234
|
}>]>>, never, never>;
|
|
235
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
236
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
237
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
238
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
239
|
+
}>>, never, never>;
|
|
221
240
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
222
241
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
223
242
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -229,6 +248,11 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
229
248
|
}>, Schema.Struct<{
|
|
230
249
|
readonly type: Schema.Literal<"native">;
|
|
231
250
|
}>]>>, never, never>;
|
|
251
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
252
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
253
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
254
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
255
|
+
}>>, never, never>;
|
|
232
256
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
233
257
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
234
258
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
@@ -273,6 +297,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
273
297
|
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
274
298
|
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
275
299
|
}>, never, never>;
|
|
300
|
+
readonly type: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Model.Type, Model.Type, never, never>>>, Schema.optionalKey<Schema.Codec<Model.Type, Model.Type, never, never>>, never, never>;
|
|
276
301
|
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
|
|
277
302
|
readonly name: Schema.String;
|
|
278
303
|
readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
@@ -286,6 +311,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
286
311
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
287
312
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
288
313
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
314
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
289
315
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
290
316
|
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Model.ReasoningField, Model.ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<Model.ReasoningField, Model.ReasoningField, never, never>>, never, never>;
|
|
291
317
|
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
@@ -297,6 +323,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
297
323
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
298
324
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
299
325
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
326
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
300
327
|
}>>, never, never>;
|
|
301
328
|
readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
302
329
|
readonly capabilities: Schema.Struct<{
|
|
@@ -312,6 +339,9 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
312
339
|
};
|
|
313
340
|
};
|
|
314
341
|
readonly variants: Schema.$Array<Schema.Struct<{
|
|
342
|
+
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
343
|
+
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
344
|
+
readonly id: Schema.brand<Schema.String, "Model.VariantID">;
|
|
315
345
|
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
|
|
316
346
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
317
347
|
readonly type: Schema.Literal<"summary">;
|
|
@@ -335,9 +365,6 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
335
365
|
}>]>>, never, never>;
|
|
336
366
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
337
367
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
338
|
-
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
339
|
-
readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
340
|
-
readonly id: Schema.brand<Schema.String, "Model.VariantID">;
|
|
341
368
|
}>>;
|
|
342
369
|
readonly time: Schema.Struct<{
|
|
343
370
|
readonly released: Schema.Finite;
|
package/dist/groups/model.js
CHANGED
|
@@ -4,9 +4,15 @@ import { Schema } from "effect";
|
|
|
4
4
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { ServiceUnavailableError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
|
+
const ListQuery = Schema.Struct({
|
|
8
|
+
...LocationQuery.fields,
|
|
9
|
+
types: Schema.optional(Schema.ArrayEnsure(Model.Type)).annotate({
|
|
10
|
+
description: "Only list models of these types. Defaults to chat, the only type offered for sessions.",
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
7
13
|
export const ModelGroup = HttpApiGroup.make("server.model")
|
|
8
14
|
.add(HttpApiEndpoint.get("model.list", "/api/model", {
|
|
9
|
-
query:
|
|
15
|
+
query: ListQuery,
|
|
10
16
|
success: Location.response(Schema.Array(Model.Info)),
|
|
11
17
|
error: ServiceUnavailableError,
|
|
12
18
|
})
|
|
@@ -14,7 +20,7 @@ export const ModelGroup = HttpApiGroup.make("server.model")
|
|
|
14
20
|
.annotateMerge(OpenApi.annotations({
|
|
15
21
|
identifier: "model.list",
|
|
16
22
|
summary: "List models",
|
|
17
|
-
description: "Retrieve the current snapshot of available models ordered by release date. The snapshot may precede initial plugin settlement.",
|
|
23
|
+
description: "Retrieve the current snapshot of available models of the requested types, chat by default, ordered by release date within each type. The snapshot may precede initial plugin settlement.",
|
|
18
24
|
})))
|
|
19
25
|
.add(HttpApiEndpoint.get("model.default", "/api/model/default", {
|
|
20
26
|
query: LocationQuery,
|
|
@@ -54,7 +54,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
54
54
|
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
55
55
|
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
56
56
|
};
|
|
57
|
-
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never,
|
|
57
|
+
}>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
58
58
|
id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
|
|
59
59
|
create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
|
|
60
60
|
};
|
|
@@ -76,7 +76,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
|
|
|
76
76
|
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
77
77
|
}>;
|
|
78
78
|
}>;
|
|
79
|
-
}>>, Schema.toCodecJson<typeof ConflictError | typeof PermissionSavedNotFoundError>,
|
|
79
|
+
}>>, Schema.toCodecJson<typeof ConflictError | typeof PermissionSavedNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.create", "POST", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
|
|
80
80
|
sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
81
81
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
82
82
|
};
|
|
@@ -13,6 +13,7 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
|
|
|
13
13
|
query: LocationQuery,
|
|
14
14
|
success: Location.response(Schema.Array(Permission.Request)),
|
|
15
15
|
})
|
|
16
|
+
.middleware(locationMiddleware)
|
|
16
17
|
.annotateMerge(locationQueryOpenApi)
|
|
17
18
|
.annotateMerge(OpenApi.annotations({
|
|
18
19
|
identifier: "permission.request.list",
|
|
@@ -22,7 +23,9 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
|
|
|
22
23
|
.add(HttpApiEndpoint.get("permission.saved.list", "/api/permission/saved", {
|
|
23
24
|
query: Schema.Struct({ projectID: Project.ID.pipe(Schema.optional) }),
|
|
24
25
|
success: Schema.Struct({ data: Schema.Array(PermissionSaved.Info) }),
|
|
25
|
-
})
|
|
26
|
+
})
|
|
27
|
+
.middleware(locationMiddleware)
|
|
28
|
+
.annotateMerge(OpenApi.annotations({
|
|
26
29
|
identifier: "permission.saved.list",
|
|
27
30
|
summary: "List saved permissions",
|
|
28
31
|
description: "Retrieve saved permissions, optionally filtered by project.",
|
|
@@ -48,8 +51,6 @@ export const makePermissionGroup = (locationMiddleware, sessionLocationMiddlewar
|
|
|
48
51
|
summary: "Remove saved permission",
|
|
49
52
|
description: "Remove a saved permission by ID.",
|
|
50
53
|
})))
|
|
51
|
-
// Effect applies group middleware only to endpoints already added; session endpoints use session placement below.
|
|
52
|
-
.middleware(locationMiddleware)
|
|
53
54
|
.add(HttpApiEndpoint.post("session.permission.create", "/api/session/:sessionID/permission", {
|
|
54
55
|
params: { sessionID: Session.ID },
|
|
55
56
|
payload: Schema.Struct({
|
|
@@ -23,6 +23,7 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
|
|
|
23
23
|
success: Schema.Struct({ data: Schema.NullOr(PersistentPty.ReadResult) }),
|
|
24
24
|
error: [ServiceUnavailableError],
|
|
25
25
|
}).annotateMerge(OpenApi.annotations({
|
|
26
|
+
identifier: "experimental.persistentPty.read",
|
|
26
27
|
summary: "Read the session's most recently controlled terminal",
|
|
27
28
|
description: "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.",
|
|
28
29
|
})))
|
|
@@ -30,54 +31,54 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
|
|
|
30
31
|
params: { sessionID: Session.ID },
|
|
31
32
|
success: Schema.Struct({ data: Schema.Array(PersistentPty.Info) }),
|
|
32
33
|
error: errors,
|
|
33
|
-
}))
|
|
34
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.list" })))
|
|
34
35
|
.add(HttpApiEndpoint.post("persistentPty.create", "/api/experimental/session/:sessionID/terminal", {
|
|
35
36
|
params: { sessionID: Session.ID },
|
|
36
37
|
payload: PersistentPty.CreateInput,
|
|
37
38
|
success: Schema.Struct({ data: PersistentPty.Info }),
|
|
38
39
|
error: errors,
|
|
39
|
-
}))
|
|
40
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.create" })))
|
|
40
41
|
.add(HttpApiEndpoint.post("persistentPty.shutdown", "/api/experimental/persistent-pty/shutdown", {
|
|
41
42
|
success: HttpApiSchema.NoContent,
|
|
42
43
|
error: [ServiceUnavailableError],
|
|
43
|
-
}))
|
|
44
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.shutdown" })))
|
|
44
45
|
.add(HttpApiEndpoint.post("persistentPty.handoff", "/api/experimental/persistent-pty/handoff", {
|
|
45
46
|
success: Schema.Struct({ handoff: Schema.NullOr(PersistentPty.Handoff) }),
|
|
46
47
|
error: [ServiceUnavailableError],
|
|
47
|
-
}))
|
|
48
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.handoff" })))
|
|
48
49
|
.add(HttpApiEndpoint.get("persistentPty.get", "/api/experimental/persistent-pty/:ptyID", {
|
|
49
50
|
params: { ptyID: Pty.ID },
|
|
50
51
|
success: Schema.Struct({ data: PersistentPty.Info }),
|
|
51
52
|
error: terminalErrors,
|
|
52
|
-
}))
|
|
53
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.get" })))
|
|
53
54
|
.add(HttpApiEndpoint.put("persistentPty.update", "/api/experimental/persistent-pty/:ptyID", {
|
|
54
55
|
params: { ptyID: Pty.ID },
|
|
55
56
|
payload: PersistentPty.UpdateInput,
|
|
56
57
|
success: Schema.Struct({ data: PersistentPty.Info }),
|
|
57
58
|
error: terminalErrors,
|
|
58
|
-
}))
|
|
59
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.update" })))
|
|
59
60
|
.add(HttpApiEndpoint.get("persistentPty.snapshot", "/api/experimental/persistent-pty/:ptyID/snapshot", {
|
|
60
61
|
params: { ptyID: Pty.ID },
|
|
61
62
|
success: Schema.Struct({ data: PersistentPty.Snapshot }),
|
|
62
63
|
error: terminalErrors,
|
|
63
|
-
}))
|
|
64
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.snapshot" })))
|
|
64
65
|
.add(HttpApiEndpoint.delete("persistentPty.remove", "/api/experimental/persistent-pty/:ptyID", {
|
|
65
66
|
params: { ptyID: Pty.ID },
|
|
66
67
|
success: HttpApiSchema.NoContent,
|
|
67
68
|
error: terminalErrors,
|
|
68
|
-
}))
|
|
69
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.remove" })))
|
|
69
70
|
.add(HttpApiEndpoint.post("persistentPty.connectToken", "/api/experimental/persistent-pty/:ptyID/connect-token", {
|
|
70
71
|
params: { ptyID: Pty.ID },
|
|
71
72
|
headers: Schema.Struct({ [PTY_CONNECT_TOKEN_HEADER]: Schema.optional(Schema.String) }),
|
|
72
73
|
success: Schema.Struct({ data: PtyTicket.ConnectToken }),
|
|
73
74
|
error: [ForbiddenError, PtyNotFoundError, ServiceUnavailableError],
|
|
74
|
-
}))
|
|
75
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.connectToken" })))
|
|
75
76
|
.add(HttpApiEndpoint.get("persistentPty.connect", PERSISTENT_PTY_CONNECT_PATH, {
|
|
76
77
|
params: { ptyID: Pty.ID },
|
|
77
78
|
success: Schema.Boolean,
|
|
78
79
|
error: [ForbiddenError, PtyNotFoundError, ServiceUnavailableError],
|
|
79
80
|
}).annotateMerge(OpenApi.annotations({
|
|
80
|
-
identifier: "persistentPty.connect",
|
|
81
|
+
identifier: "experimental.persistentPty.connect",
|
|
81
82
|
summary: "Connect to a persistent PTY",
|
|
82
83
|
description: "Stream persistent PTY output through the OpenCode server.",
|
|
83
84
|
transform: (operation) => ({
|
package/dist/groups/plugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
|
-
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
3
|
+
import { InvalidRequestError, PluginNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
4
4
|
export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.check", "POST", "/api/plugin/check", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
6
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
@@ -31,6 +31,7 @@ export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", Htt
|
|
|
31
31
|
readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
32
32
|
readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
33
33
|
readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
34
|
+
readonly gui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
34
35
|
}>;
|
|
35
36
|
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
36
37
|
readonly status: Schema.Literal<"active">;
|
|
@@ -40,7 +41,21 @@ export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", Htt
|
|
|
40
41
|
readonly ref: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
41
42
|
}>]>;
|
|
42
43
|
}>>;
|
|
43
|
-
}>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.
|
|
44
|
+
}>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.gui", "GET", "/api/plugin/gui", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
45
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
46
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
47
|
+
}>>;
|
|
48
|
+
readonly id: Schema.brand<Schema.String, "Plugin.ID">;
|
|
49
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
50
|
+
readonly location: Schema.Struct<{
|
|
51
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
52
|
+
}>;
|
|
53
|
+
readonly data: Schema.Struct<{
|
|
54
|
+
readonly code: Schema.String;
|
|
55
|
+
readonly revision: Schema.String;
|
|
56
|
+
readonly options: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
57
|
+
}>;
|
|
58
|
+
}>>, Schema.toCodecJson<typeof PluginNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
44
59
|
readonly location: Schema.optional<Schema.Struct<{
|
|
45
60
|
readonly directory: Schema.optional<Schema.String>;
|
|
46
61
|
}>>;
|
|
@@ -68,6 +83,7 @@ export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", Htt
|
|
|
68
83
|
readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
69
84
|
readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
70
85
|
readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
86
|
+
readonly gui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
71
87
|
}>;
|
|
72
88
|
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
73
89
|
readonly status: Schema.Literal<"active">;
|
package/dist/groups/plugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Location } from "@opencode/schema/location";
|
|
|
2
2
|
import { Plugin } from "@opencode/schema/plugin";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
4
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
|
-
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
5
|
+
import { InvalidRequestError, PluginNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const PluginGroup = HttpApiGroup.make("server.plugin")
|
|
8
8
|
.add(HttpApiEndpoint.get("plugin.list", "/api/plugin", {
|
|
@@ -14,6 +14,20 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")
|
|
|
14
14
|
identifier: "plugin.list",
|
|
15
15
|
summary: "List plugins",
|
|
16
16
|
description: "Retrieve enabled server plugins and their current status.",
|
|
17
|
+
})))
|
|
18
|
+
.add(HttpApiEndpoint.get("plugin.gui", "/api/plugin/gui", {
|
|
19
|
+
query: Schema.Struct({
|
|
20
|
+
...LocationQuery.fields,
|
|
21
|
+
id: Plugin.ID,
|
|
22
|
+
}),
|
|
23
|
+
success: Location.response(Plugin.GuiBundle),
|
|
24
|
+
error: PluginNotFoundError,
|
|
25
|
+
})
|
|
26
|
+
.annotateMerge(locationQueryOpenApi)
|
|
27
|
+
.annotateMerge(OpenApi.annotations({
|
|
28
|
+
identifier: "plugin.gui",
|
|
29
|
+
summary: "Read plugin GUI bundle",
|
|
30
|
+
description: "Read an active plugin's prebuilt CommonJS `./gui-experimental` bundle. Desktop app windows run its default export; the desktop app's main process runs its `main` export. Fails with not found when no active plugin has the id or the plugin exports no `./gui-experimental`.",
|
|
17
31
|
})))
|
|
18
32
|
.add(HttpApiEndpoint.post("plugin.check", "/api/plugin/check", {
|
|
19
33
|
query: LocationQuery,
|
|
@@ -38,6 +38,11 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
38
38
|
}>, Schema.Struct<{
|
|
39
39
|
readonly type: Schema.Literal<"native">;
|
|
40
40
|
}>]>>, never, never>;
|
|
41
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
42
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
43
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
44
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
45
|
+
}>>, never, never>;
|
|
41
46
|
readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
|
|
42
47
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
43
48
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
@@ -53,6 +58,11 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
53
58
|
}>, Schema.Struct<{
|
|
54
59
|
readonly type: Schema.Literal<"native">;
|
|
55
60
|
}>]>>, never, never>;
|
|
61
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
62
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
63
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
64
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
65
|
+
}>>, never, never>;
|
|
56
66
|
readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
|
|
57
67
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
58
68
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
@@ -109,6 +119,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
109
119
|
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
110
120
|
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
111
121
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
122
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
112
123
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
113
124
|
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>, never, never>;
|
|
114
125
|
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
@@ -118,6 +129,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
118
129
|
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
119
130
|
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
120
131
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
132
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
121
133
|
}>>, never, never>;
|
|
122
134
|
}> & {
|
|
123
135
|
empty: (id: Provider.ID) => Provider.Info;
|
|
@@ -144,6 +156,11 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
144
156
|
}>, Schema.Struct<{
|
|
145
157
|
readonly type: Schema.Literal<"native">;
|
|
146
158
|
}>]>>, never, never>;
|
|
159
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
160
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
161
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
162
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
163
|
+
}>>, never, never>;
|
|
147
164
|
readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
|
|
148
165
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
149
166
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
@@ -159,6 +176,11 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
159
176
|
}>, Schema.Struct<{
|
|
160
177
|
readonly type: Schema.Literal<"native">;
|
|
161
178
|
}>]>>, never, never>;
|
|
179
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
180
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
181
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
182
|
+
readonly ttl: Schema.decodeTo<Schema.optional<Schema.toType<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>>, Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.Number, Schema.Literals<readonly ["ms", "s", "m", "h", "d"]>]>>, never, never>;
|
|
183
|
+
}>>, never, never>;
|
|
162
184
|
readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
|
|
163
185
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
164
186
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
@@ -215,6 +237,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
215
237
|
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
216
238
|
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
217
239
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
240
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
218
241
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
219
242
|
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>, never, never>;
|
|
220
243
|
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
@@ -224,6 +247,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
|
|
|
224
247
|
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
225
248
|
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
226
249
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
250
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
227
251
|
}>>, never, never>;
|
|
228
252
|
}> & {
|
|
229
253
|
empty: (id: Provider.ID) => Provider.Info;
|