@opencode/schema 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +5 -0
- package/dist/config/experimental.d.ts +2 -0
- package/dist/config/experimental.js +6 -0
- package/dist/config/provider.d.ts +73 -7
- package/dist/config/provider.js +10 -15
- package/dist/event-manifest.d.ts +128 -366
- package/dist/file-diff.d.ts +2 -0
- package/dist/file-diff.js +2 -0
- package/dist/generate.d.ts +355 -0
- package/dist/generate.js +134 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +2 -0
- package/dist/model-compatibility.d.ts +15 -4
- package/dist/model-compatibility.js +15 -4
- package/dist/model.d.ts +53 -2
- package/dist/model.js +9 -7
- package/dist/permission.d.ts +0 -9
- package/dist/persistent-pty.d.ts +0 -20
- package/dist/plugin.d.ts +15 -0
- package/dist/plugin.js +11 -1
- package/dist/prompt-input.d.ts +3 -36
- package/dist/prompt-input.js +2 -6
- package/dist/prompt.d.ts +96 -0
- package/dist/prompt.js +17 -1
- package/dist/provider.d.ts +40 -0
- package/dist/provider.js +14 -3
- package/dist/session-event.d.ts +320 -852
- package/dist/session-event.js +0 -7
- package/dist/session-fork.d.ts +2 -2
- package/dist/session-id.d.ts +0 -1
- package/dist/session-id.js +3 -7
- package/dist/session-inbox.d.ts +721 -101
- package/dist/session-inbox.js +10 -1
- package/dist/session-message.d.ts +998 -31
- package/dist/session-message.js +19 -2
- package/dist/session-revert.d.ts +64 -27
- package/dist/session-status-event.d.ts +0 -8
- package/dist/session-transfer.d.ts +23 -24
- package/dist/session.d.ts +12 -22
- package/dist/usage-limits.d.ts +227 -0
- package/dist/usage-limits.js +59 -0
- package/dist/v1/legacy-event.d.ts +0 -4
- package/dist/v1/permission.d.ts +0 -10
- package/dist/v1/session.d.ts +0 -177
- package/dist/vcs.d.ts +3 -0
- package/dist/vcs.js +2 -0
- package/dist/workspace-id.js +0 -2
- package/package.json +5 -3
package/dist/model.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * as Model from "./model.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { Provider } from "./provider.js";
|
|
4
|
-
import { Compatibility, MaxTokensField, ReasoningField } from "./model-compatibility.js";
|
|
4
|
+
import { Compatibility, MaxTokensField, MediaInput, ReasoningField } from "./model-compatibility.js";
|
|
5
5
|
export declare const ID: Schema.brand<Schema.String, "Model.ID">;
|
|
6
6
|
export type ID = typeof ID.Type;
|
|
7
7
|
export declare const Event: {
|
|
@@ -99,9 +99,12 @@ export declare const Ref: Schema.Struct<{
|
|
|
99
99
|
};
|
|
100
100
|
export interface Ref extends Schema.Schema.Type<typeof Ref> {
|
|
101
101
|
}
|
|
102
|
-
export { Compatibility, MaxTokensField, ReasoningField };
|
|
102
|
+
export { Compatibility, MaxTokensField, MediaInput, ReasoningField };
|
|
103
103
|
export declare const Family: Schema.brand<Schema.String, "Model.Family">;
|
|
104
104
|
export type Family = typeof Family.Type;
|
|
105
|
+
/** 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. */
|
|
106
|
+
export type Type = "chat" | "decision" | "image" | (string & {});
|
|
107
|
+
export declare const Type: Schema.Codec<Type>;
|
|
105
108
|
export declare const Settings: Schema.StructWithRest<Schema.Struct<{
|
|
106
109
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
107
110
|
readonly type: Schema.Literal<"summary">;
|
|
@@ -112,6 +115,11 @@ export declare const Settings: Schema.StructWithRest<Schema.Struct<{
|
|
|
112
115
|
}>, Schema.Struct<{
|
|
113
116
|
readonly type: Schema.Literal<"native">;
|
|
114
117
|
}>]>>, never, never>;
|
|
118
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
119
|
+
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>;
|
|
120
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
121
|
+
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>;
|
|
122
|
+
}>>, never, never>;
|
|
115
123
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
116
124
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>;
|
|
117
125
|
export type Settings = typeof Settings.Type;
|
|
@@ -126,6 +134,11 @@ export declare const Overlays: {
|
|
|
126
134
|
}>, Schema.Struct<{
|
|
127
135
|
readonly type: Schema.Literal<"native">;
|
|
128
136
|
}>]>>, never, never>;
|
|
137
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
138
|
+
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>;
|
|
139
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
140
|
+
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>;
|
|
141
|
+
}>>, never, never>;
|
|
129
142
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
130
143
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
131
144
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -137,6 +150,11 @@ export declare const Overlays: {
|
|
|
137
150
|
}>, Schema.Struct<{
|
|
138
151
|
readonly type: Schema.Literal<"native">;
|
|
139
152
|
}>]>>, never, never>;
|
|
153
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
154
|
+
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>;
|
|
155
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
156
|
+
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>;
|
|
157
|
+
}>>, never, never>;
|
|
140
158
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
141
159
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
142
160
|
headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
@@ -195,6 +213,11 @@ export declare const Variant: Schema.Struct<{
|
|
|
195
213
|
}>, Schema.Struct<{
|
|
196
214
|
readonly type: Schema.Literal<"native">;
|
|
197
215
|
}>]>>, never, never>;
|
|
216
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
217
|
+
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>;
|
|
218
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
219
|
+
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>;
|
|
220
|
+
}>>, never, never>;
|
|
198
221
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
199
222
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
200
223
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -206,6 +229,11 @@ export declare const Variant: Schema.Struct<{
|
|
|
206
229
|
}>, Schema.Struct<{
|
|
207
230
|
readonly type: Schema.Literal<"native">;
|
|
208
231
|
}>]>>, never, never>;
|
|
232
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
233
|
+
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>;
|
|
234
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
235
|
+
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>;
|
|
236
|
+
}>>, never, never>;
|
|
209
237
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
210
238
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
211
239
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
@@ -225,6 +253,11 @@ export declare const Info: Schema.Struct<{
|
|
|
225
253
|
}>, Schema.Struct<{
|
|
226
254
|
readonly type: Schema.Literal<"native">;
|
|
227
255
|
}>]>>, never, never>;
|
|
256
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
257
|
+
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>;
|
|
258
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
259
|
+
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>;
|
|
260
|
+
}>>, never, never>;
|
|
228
261
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
229
262
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
230
263
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -236,6 +269,11 @@ export declare const Info: Schema.Struct<{
|
|
|
236
269
|
}>, Schema.Struct<{
|
|
237
270
|
readonly type: Schema.Literal<"native">;
|
|
238
271
|
}>]>>, never, never>;
|
|
272
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
273
|
+
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>;
|
|
274
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
275
|
+
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>;
|
|
276
|
+
}>>, never, never>;
|
|
239
277
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
240
278
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
241
279
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
@@ -280,6 +318,7 @@ export declare const Info: Schema.Struct<{
|
|
|
280
318
|
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
281
319
|
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
282
320
|
}>, never, never>;
|
|
321
|
+
readonly type: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Type, Type, never, never>>>, Schema.optionalKey<Schema.Codec<Type, Type, never, never>>, never, never>;
|
|
283
322
|
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
|
|
284
323
|
readonly name: Schema.String;
|
|
285
324
|
readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
@@ -293,6 +332,7 @@ export declare const Info: Schema.Struct<{
|
|
|
293
332
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
294
333
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
295
334
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
335
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
296
336
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
297
337
|
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
|
|
298
338
|
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
@@ -304,6 +344,7 @@ export declare const Info: Schema.Struct<{
|
|
|
304
344
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
305
345
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
306
346
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
347
|
+
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
307
348
|
}>>, never, never>;
|
|
308
349
|
readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
309
350
|
readonly capabilities: Schema.Struct<{
|
|
@@ -330,6 +371,11 @@ export declare const Info: Schema.Struct<{
|
|
|
330
371
|
}>, Schema.Struct<{
|
|
331
372
|
readonly type: Schema.Literal<"native">;
|
|
332
373
|
}>]>>, never, never>;
|
|
374
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
375
|
+
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>;
|
|
376
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
377
|
+
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>;
|
|
378
|
+
}>>, never, never>;
|
|
333
379
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
334
380
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
335
381
|
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -341,6 +387,11 @@ export declare const Info: Schema.Struct<{
|
|
|
341
387
|
}>, Schema.Struct<{
|
|
342
388
|
readonly type: Schema.Literal<"native">;
|
|
343
389
|
}>]>>, never, never>;
|
|
390
|
+
readonly cache: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
391
|
+
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>;
|
|
392
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
393
|
+
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>;
|
|
394
|
+
}>>, never, never>;
|
|
344
395
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
345
396
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
346
397
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
package/dist/model.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * as Model from "./model.js";
|
|
2
|
-
import { Schema } from "effect";
|
|
2
|
+
import { Schema, Struct } from "effect";
|
|
3
3
|
import { optional, statics } from "./schema.js";
|
|
4
4
|
import { Provider } from "./provider.js";
|
|
5
|
-
import { Compatibility, MaxTokensField, ReasoningField } from "./model-compatibility.js";
|
|
5
|
+
import { Compatibility, MaxTokensField, MediaInput, ReasoningField } from "./model-compatibility.js";
|
|
6
6
|
import { Money } from "./money.js";
|
|
7
7
|
import { ephemeral, inventory } from "./event.js";
|
|
8
8
|
export const ID = Schema.String.pipe(Schema.brand("Model.ID"));
|
|
@@ -33,12 +33,13 @@ export const Ref = Schema.Struct({
|
|
|
33
33
|
});
|
|
34
34
|
},
|
|
35
35
|
})));
|
|
36
|
-
export { Compatibility, MaxTokensField, ReasoningField };
|
|
36
|
+
export { Compatibility, MaxTokensField, MediaInput, ReasoningField };
|
|
37
37
|
export const Family = Schema.String.pipe(Schema.brand("Model.Family"));
|
|
38
|
-
export const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
38
|
+
export const Type = Schema.Union([
|
|
39
|
+
Schema.Literals(["chat", "decision", "image"]),
|
|
40
|
+
Schema.String,
|
|
41
|
+
]).annotate({ identifier: "Model.Type" });
|
|
42
|
+
export const Settings = Schema.StructWithRest(Schema.Struct(Struct.pick(Provider.Settings.schema.fields, ["compaction", "cache", "encoding"])),
|
|
42
43
|
// Provider packages may define arbitrary model-level options beyond OpenCode's shared compaction policy.
|
|
43
44
|
[Schema.Record(Schema.String, Schema.Any)]).annotate({ identifier: "Model.Settings" });
|
|
44
45
|
export const Overlays = {
|
|
@@ -78,6 +79,7 @@ export const Info = Schema.Struct({
|
|
|
78
79
|
modelID: ID,
|
|
79
80
|
providerID: Provider.ID,
|
|
80
81
|
canonical: Provider.ID.pipe(optional),
|
|
82
|
+
type: Type.pipe(optional),
|
|
81
83
|
family: Family.pipe(optional),
|
|
82
84
|
name: Schema.String,
|
|
83
85
|
compatibility: Compatibility.pipe(optional),
|
package/dist/permission.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export type Source = typeof Source.Type;
|
|
|
13
13
|
export declare const Request: Schema.Struct<{
|
|
14
14
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
15
15
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
16
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
17
16
|
};
|
|
18
17
|
readonly action: Schema.String;
|
|
19
18
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -67,7 +66,6 @@ export declare const Event: {
|
|
|
67
66
|
readonly data: Schema.Struct<{
|
|
68
67
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
69
68
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
70
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
71
69
|
};
|
|
72
70
|
readonly action: Schema.String;
|
|
73
71
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -94,7 +92,6 @@ export declare const Event: {
|
|
|
94
92
|
data: Schema.Struct<{
|
|
95
93
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
96
94
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
97
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
98
95
|
};
|
|
99
96
|
readonly action: Schema.String;
|
|
100
97
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -144,7 +141,6 @@ export declare const Event: {
|
|
|
144
141
|
readonly data: Schema.Struct<{
|
|
145
142
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
146
143
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
147
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
148
144
|
};
|
|
149
145
|
readonly requestID: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
150
146
|
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
@@ -158,7 +154,6 @@ export declare const Event: {
|
|
|
158
154
|
data: Schema.Struct<{
|
|
159
155
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
160
156
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
161
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
162
157
|
};
|
|
163
158
|
readonly requestID: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
164
159
|
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
@@ -195,7 +190,6 @@ export declare const Event: {
|
|
|
195
190
|
readonly data: Schema.Struct<{
|
|
196
191
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
197
192
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
198
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
199
193
|
};
|
|
200
194
|
readonly action: Schema.String;
|
|
201
195
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -222,7 +216,6 @@ export declare const Event: {
|
|
|
222
216
|
data: Schema.Struct<{
|
|
223
217
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
224
218
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
225
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
226
219
|
};
|
|
227
220
|
readonly action: Schema.String;
|
|
228
221
|
readonly resources: Schema.$Array<Schema.String>;
|
|
@@ -271,7 +264,6 @@ export declare const Event: {
|
|
|
271
264
|
readonly data: Schema.Struct<{
|
|
272
265
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
273
266
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
274
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
275
267
|
};
|
|
276
268
|
readonly requestID: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
277
269
|
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
|
@@ -285,7 +277,6 @@ export declare const Event: {
|
|
|
285
277
|
data: Schema.Struct<{
|
|
286
278
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
287
279
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
288
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
289
280
|
};
|
|
290
281
|
readonly requestID: Schema.brand<Schema.String, "Permission.ID"> & {
|
|
291
282
|
create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
|
package/dist/persistent-pty.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare const Info: Schema.Struct<{
|
|
|
14
14
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
15
15
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
16
16
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
17
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
18
17
|
};
|
|
19
18
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
20
19
|
readonly size: Schema.Struct<{
|
|
@@ -76,7 +75,6 @@ export declare const Snapshot: Schema.Struct<{
|
|
|
76
75
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
77
76
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
78
77
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
79
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
80
78
|
};
|
|
81
79
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
82
80
|
readonly size: Schema.Struct<{
|
|
@@ -147,7 +145,6 @@ export declare const Added: Schema.Struct<{
|
|
|
147
145
|
readonly data: Schema.Struct<{
|
|
148
146
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
149
147
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
150
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
151
148
|
};
|
|
152
149
|
readonly terminal: Schema.Struct<{
|
|
153
150
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -163,7 +160,6 @@ export declare const Added: Schema.Struct<{
|
|
|
163
160
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
164
161
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
165
162
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
166
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
167
163
|
};
|
|
168
164
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
169
165
|
readonly size: Schema.Struct<{
|
|
@@ -183,7 +179,6 @@ export declare const Added: Schema.Struct<{
|
|
|
183
179
|
data: Schema.Struct<{
|
|
184
180
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
185
181
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
186
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
187
182
|
};
|
|
188
183
|
readonly terminal: Schema.Struct<{
|
|
189
184
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -199,7 +194,6 @@ export declare const Added: Schema.Struct<{
|
|
|
199
194
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
200
195
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
201
196
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
202
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
203
197
|
};
|
|
204
198
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
205
199
|
readonly size: Schema.Struct<{
|
|
@@ -242,7 +236,6 @@ export declare const Removed: Schema.Struct<{
|
|
|
242
236
|
readonly data: Schema.Struct<{
|
|
243
237
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
244
238
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
245
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
246
239
|
};
|
|
247
240
|
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
248
241
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -256,7 +249,6 @@ export declare const Removed: Schema.Struct<{
|
|
|
256
249
|
data: Schema.Struct<{
|
|
257
250
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
258
251
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
259
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
260
252
|
};
|
|
261
253
|
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
262
254
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -294,7 +286,6 @@ export declare const Event: {
|
|
|
294
286
|
readonly data: Schema.Struct<{
|
|
295
287
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
296
288
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
297
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
298
289
|
};
|
|
299
290
|
readonly terminal: Schema.Struct<{
|
|
300
291
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -310,7 +301,6 @@ export declare const Event: {
|
|
|
310
301
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
311
302
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
312
303
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
313
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
314
304
|
};
|
|
315
305
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
316
306
|
readonly size: Schema.Struct<{
|
|
@@ -330,7 +320,6 @@ export declare const Event: {
|
|
|
330
320
|
data: Schema.Struct<{
|
|
331
321
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
332
322
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
333
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
334
323
|
};
|
|
335
324
|
readonly terminal: Schema.Struct<{
|
|
336
325
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -346,7 +335,6 @@ export declare const Event: {
|
|
|
346
335
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
347
336
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
348
337
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
349
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
350
338
|
};
|
|
351
339
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
352
340
|
readonly size: Schema.Struct<{
|
|
@@ -389,7 +377,6 @@ export declare const Event: {
|
|
|
389
377
|
readonly data: Schema.Struct<{
|
|
390
378
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
391
379
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
392
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
393
380
|
};
|
|
394
381
|
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
395
382
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -403,7 +390,6 @@ export declare const Event: {
|
|
|
403
390
|
data: Schema.Struct<{
|
|
404
391
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
405
392
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
406
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
407
393
|
};
|
|
408
394
|
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
409
395
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -440,7 +426,6 @@ export declare const Event: {
|
|
|
440
426
|
readonly data: Schema.Struct<{
|
|
441
427
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
442
428
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
443
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
444
429
|
};
|
|
445
430
|
readonly terminal: Schema.Struct<{
|
|
446
431
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -456,7 +441,6 @@ export declare const Event: {
|
|
|
456
441
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
457
442
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
458
443
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
459
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
460
444
|
};
|
|
461
445
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
462
446
|
readonly size: Schema.Struct<{
|
|
@@ -476,7 +460,6 @@ export declare const Event: {
|
|
|
476
460
|
data: Schema.Struct<{
|
|
477
461
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
478
462
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
479
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
480
463
|
};
|
|
481
464
|
readonly terminal: Schema.Struct<{
|
|
482
465
|
readonly id: Schema.brand<Schema.String, "PtyID"> & {
|
|
@@ -492,7 +475,6 @@ export declare const Event: {
|
|
|
492
475
|
readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
493
476
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
494
477
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
495
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
496
478
|
};
|
|
497
479
|
readonly foregroundProcess: Schema.NullOr<Schema.String>;
|
|
498
480
|
readonly size: Schema.Struct<{
|
|
@@ -534,7 +516,6 @@ export declare const Event: {
|
|
|
534
516
|
readonly data: Schema.Struct<{
|
|
535
517
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
536
518
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
537
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
538
519
|
};
|
|
539
520
|
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
540
521
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
|
@@ -548,7 +529,6 @@ export declare const Event: {
|
|
|
548
529
|
data: Schema.Struct<{
|
|
549
530
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
550
531
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
551
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
552
532
|
};
|
|
553
533
|
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
|
|
554
534
|
create: () => string & import("effect/Brand").Brand<"PtyID">;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -21,8 +21,21 @@ export declare const Features: Schema.Struct<{
|
|
|
21
21
|
readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
22
22
|
readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
23
23
|
readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
24
|
+
/** The package exports `./gui-experimental`, the GUI bundle the desktop app loads. */
|
|
25
|
+
readonly gui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
24
26
|
}>;
|
|
25
27
|
export type Features = typeof Features.Type;
|
|
28
|
+
/** A plugin's prebuilt CommonJS `./gui-experimental` bundle. */
|
|
29
|
+
export interface GuiBundle extends Schema.Schema.Type<typeof GuiBundle> {
|
|
30
|
+
}
|
|
31
|
+
export declare const GuiBundle: Schema.Struct<{
|
|
32
|
+
/** The bundle's CommonJS code. */
|
|
33
|
+
readonly code: Schema.String;
|
|
34
|
+
/** An opaque value that changes whenever the plugin, its options or its bundle change. */
|
|
35
|
+
readonly revision: Schema.String;
|
|
36
|
+
/** The plugin's options from its `opencode.json` entry, as its server entry receives them. */
|
|
37
|
+
readonly options: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
38
|
+
}>;
|
|
26
39
|
export declare const State: Schema.Union<readonly [Schema.Struct<{
|
|
27
40
|
readonly status: Schema.Literal<"active">;
|
|
28
41
|
}>, Schema.Struct<{
|
|
@@ -53,6 +66,8 @@ export declare const Info: Schema.Struct<{
|
|
|
53
66
|
readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
54
67
|
readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
55
68
|
readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
69
|
+
/** The package exports `./gui-experimental`, the GUI bundle the desktop app loads. */
|
|
70
|
+
readonly gui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
56
71
|
}>;
|
|
57
72
|
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
58
73
|
readonly status: Schema.Literal<"active">;
|
package/dist/plugin.js
CHANGED
|
@@ -2,7 +2,7 @@ export * as Plugin from "./plugin.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { ephemeral, inventory } from "./event.js";
|
|
4
4
|
import { optional } from "./schema.js";
|
|
5
|
-
export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"));
|
|
5
|
+
export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"), Schema.annotate({ identifier: "Plugin.ID" }));
|
|
6
6
|
export const Source = Schema.Union([
|
|
7
7
|
Schema.Struct({ type: Schema.Literal("builtin") }),
|
|
8
8
|
Schema.Struct({
|
|
@@ -19,7 +19,17 @@ export const Features = Schema.Struct({
|
|
|
19
19
|
server: Schema.Literal(true).pipe(optional),
|
|
20
20
|
tui: Schema.Literal(true).pipe(optional),
|
|
21
21
|
rpc: Schema.Literal(true).pipe(optional),
|
|
22
|
+
/** The package exports `./gui-experimental`, the GUI bundle the desktop app loads. */
|
|
23
|
+
gui: Schema.Literal(true).pipe(optional),
|
|
22
24
|
}).annotate({ identifier: "Plugin.Features" });
|
|
25
|
+
export const GuiBundle = Schema.Struct({
|
|
26
|
+
/** The bundle's CommonJS code. */
|
|
27
|
+
code: Schema.String,
|
|
28
|
+
/** An opaque value that changes whenever the plugin, its options or its bundle change. */
|
|
29
|
+
revision: Schema.String,
|
|
30
|
+
/** The plugin's options from its `opencode.json` entry, as its server entry receives them. */
|
|
31
|
+
options: Schema.Record(Schema.String, Schema.Json),
|
|
32
|
+
}).annotate({ identifier: "Plugin.GuiBundle" });
|
|
23
33
|
export const State = Schema.Union([
|
|
24
34
|
Schema.Struct({ status: Schema.Literal("active") }),
|
|
25
35
|
Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String, ref: Schema.String.pipe(optional) }),
|
package/dist/prompt-input.d.ts
CHANGED
|
@@ -15,18 +15,7 @@ export declare const FileAttachment: Schema.Struct<{
|
|
|
15
15
|
readonly end: Schema.Finite;
|
|
16
16
|
readonly text: Schema.String;
|
|
17
17
|
}>>, never, never>;
|
|
18
|
-
}
|
|
19
|
-
create: (input: FileAttachment) => {
|
|
20
|
-
readonly uri: string;
|
|
21
|
-
readonly name?: string | undefined;
|
|
22
|
-
readonly description?: string | undefined;
|
|
23
|
-
readonly mention?: {
|
|
24
|
-
readonly start: number;
|
|
25
|
-
readonly end: number;
|
|
26
|
-
readonly text: string;
|
|
27
|
-
} | undefined;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
18
|
+
}>;
|
|
30
19
|
export interface Prompt extends Schema.Schema.Type<typeof Prompt> {
|
|
31
20
|
}
|
|
32
21
|
export interface SkillAttachment extends Schema.Schema.Type<typeof SkillAttachment> {
|
|
@@ -58,18 +47,7 @@ export declare const Prompt: Schema.Struct<{
|
|
|
58
47
|
readonly end: Schema.Finite;
|
|
59
48
|
readonly text: Schema.String;
|
|
60
49
|
}>>, never, never>;
|
|
61
|
-
}
|
|
62
|
-
create: (input: FileAttachment) => {
|
|
63
|
-
readonly uri: string;
|
|
64
|
-
readonly name?: string | undefined;
|
|
65
|
-
readonly description?: string | undefined;
|
|
66
|
-
readonly mention?: {
|
|
67
|
-
readonly start: number;
|
|
68
|
-
readonly end: number;
|
|
69
|
-
readonly text: string;
|
|
70
|
-
} | undefined;
|
|
71
|
-
};
|
|
72
|
-
}>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
50
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
73
51
|
readonly uri: Schema.String;
|
|
74
52
|
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
75
53
|
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
@@ -82,18 +60,7 @@ export declare const Prompt: Schema.Struct<{
|
|
|
82
60
|
readonly end: Schema.Finite;
|
|
83
61
|
readonly text: Schema.String;
|
|
84
62
|
}>>, never, never>;
|
|
85
|
-
}
|
|
86
|
-
create: (input: FileAttachment) => {
|
|
87
|
-
readonly uri: string;
|
|
88
|
-
readonly name?: string | undefined;
|
|
89
|
-
readonly description?: string | undefined;
|
|
90
|
-
readonly mention?: {
|
|
91
|
-
readonly start: number;
|
|
92
|
-
readonly end: number;
|
|
93
|
-
readonly text: string;
|
|
94
|
-
} | undefined;
|
|
95
|
-
};
|
|
96
|
-
}>>, never, never>;
|
|
63
|
+
}>>>, never, never>;
|
|
97
64
|
readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
98
65
|
readonly name: Schema.String;
|
|
99
66
|
readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
package/dist/prompt-input.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
export * as PromptInput from "./prompt-input.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { AgentAttachment, PromptMention } from "./prompt.js";
|
|
4
|
-
import { optional
|
|
4
|
+
import { optional } from "./schema.js";
|
|
5
5
|
import { Skill } from "./skill.js";
|
|
6
6
|
export const FileAttachment = Schema.Struct({
|
|
7
7
|
uri: Schema.String,
|
|
8
8
|
name: Schema.String.pipe(optional),
|
|
9
9
|
description: Schema.String.pipe(optional),
|
|
10
10
|
mention: PromptMention.pipe(optional),
|
|
11
|
-
})
|
|
12
|
-
.annotate({ identifier: "PromptInput.FileAttachment" })
|
|
13
|
-
.pipe(statics((schema) => ({
|
|
14
|
-
create: (input) => schema.make(input),
|
|
15
|
-
})));
|
|
11
|
+
}).annotate({ identifier: "PromptInput.FileAttachment" });
|
|
16
12
|
export const SkillAttachment = Schema.Struct({
|
|
17
13
|
id: Skill.ID,
|
|
18
14
|
mention: PromptMention.pipe(optional),
|