@opencode-ai/protocol 0.0.0-next-14693 → 0.0.0-next-14706
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/groups/event.d.ts +164 -0
- package/dist/groups/model.d.ts +153 -0
- package/dist/groups/model.js +11 -0
- package/package.json +2 -2
package/dist/groups/event.d.ts
CHANGED
|
@@ -1378,6 +1378,76 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
1378
1378
|
readonly aggregate: string;
|
|
1379
1379
|
} | undefined;
|
|
1380
1380
|
type: "session.next.prompt.admitted";
|
|
1381
|
+
}) | (Schema.Struct<{
|
|
1382
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
1383
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
1384
|
+
};
|
|
1385
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1386
|
+
readonly type: Schema.Literal<"session.next.execution.settled">;
|
|
1387
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1388
|
+
readonly aggregateID: Schema.String;
|
|
1389
|
+
readonly seq: Schema.Int;
|
|
1390
|
+
readonly version: Schema.Int;
|
|
1391
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1392
|
+
readonly aggregateID: Schema.String;
|
|
1393
|
+
readonly seq: Schema.Int;
|
|
1394
|
+
readonly version: Schema.Int;
|
|
1395
|
+
}>>, never, never>;
|
|
1396
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1397
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1398
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
1399
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1400
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1401
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
1402
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1403
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1404
|
+
}>, never, never>;
|
|
1405
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1406
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1407
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
1408
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1409
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1410
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
1411
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1412
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
1413
|
+
}>, never, never>;
|
|
1414
|
+
}>>, never, never>;
|
|
1415
|
+
readonly data: Schema.Struct<{
|
|
1416
|
+
readonly outcome: Schema.Literals<readonly ["success", "failure", "interrupted"]>;
|
|
1417
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1418
|
+
readonly type: Schema.Literal<"unknown">;
|
|
1419
|
+
readonly message: Schema.String;
|
|
1420
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1421
|
+
readonly type: Schema.Literal<"unknown">;
|
|
1422
|
+
readonly message: Schema.String;
|
|
1423
|
+
}>>, never, never>;
|
|
1424
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
1425
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
1426
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
1427
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
1428
|
+
};
|
|
1429
|
+
}>;
|
|
1430
|
+
}> & {
|
|
1431
|
+
data: Schema.Struct<{
|
|
1432
|
+
readonly outcome: Schema.Literals<readonly ["success", "failure", "interrupted"]>;
|
|
1433
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1434
|
+
readonly type: Schema.Literal<"unknown">;
|
|
1435
|
+
readonly message: Schema.String;
|
|
1436
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1437
|
+
readonly type: Schema.Literal<"unknown">;
|
|
1438
|
+
readonly message: Schema.String;
|
|
1439
|
+
}>>, never, never>;
|
|
1440
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
1441
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
1442
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
1443
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
1444
|
+
};
|
|
1445
|
+
}>;
|
|
1446
|
+
durable?: {
|
|
1447
|
+
readonly version: number;
|
|
1448
|
+
readonly aggregate: string;
|
|
1449
|
+
} | undefined;
|
|
1450
|
+
type: "session.next.execution.settled";
|
|
1381
1451
|
}) | (Schema.Struct<{
|
|
1382
1452
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
1383
1453
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -7241,6 +7311,30 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
7241
7311
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
7242
7312
|
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
7243
7313
|
} | undefined;
|
|
7314
|
+
} | {
|
|
7315
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7316
|
+
readonly type: "session.next.execution.settled";
|
|
7317
|
+
readonly data: {
|
|
7318
|
+
readonly outcome: "success" | "failure" | "interrupted";
|
|
7319
|
+
readonly timestamp: import("effect/DateTime").Utc;
|
|
7320
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
7321
|
+
readonly error?: {
|
|
7322
|
+
readonly type: "unknown";
|
|
7323
|
+
readonly message: string;
|
|
7324
|
+
} | undefined;
|
|
7325
|
+
};
|
|
7326
|
+
readonly metadata?: {
|
|
7327
|
+
readonly [x: string]: unknown;
|
|
7328
|
+
} | undefined;
|
|
7329
|
+
readonly durable?: {
|
|
7330
|
+
readonly aggregateID: string;
|
|
7331
|
+
readonly seq: number;
|
|
7332
|
+
readonly version: number;
|
|
7333
|
+
} | undefined;
|
|
7334
|
+
readonly location?: {
|
|
7335
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
7336
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
7337
|
+
} | undefined;
|
|
7244
7338
|
} | {
|
|
7245
7339
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
7246
7340
|
readonly type: "session.next.context.updated";
|
|
@@ -10522,6 +10616,76 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
10522
10616
|
readonly aggregate: string;
|
|
10523
10617
|
} | undefined;
|
|
10524
10618
|
type: "session.next.prompt.admitted";
|
|
10619
|
+
}) | (Schema.Struct<{
|
|
10620
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10621
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
10622
|
+
};
|
|
10623
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
10624
|
+
readonly type: Schema.Literal<"session.next.execution.settled">;
|
|
10625
|
+
readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10626
|
+
readonly aggregateID: Schema.String;
|
|
10627
|
+
readonly seq: Schema.Int;
|
|
10628
|
+
readonly version: Schema.Int;
|
|
10629
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10630
|
+
readonly aggregateID: Schema.String;
|
|
10631
|
+
readonly seq: Schema.Int;
|
|
10632
|
+
readonly version: Schema.Int;
|
|
10633
|
+
}>>, never, never>;
|
|
10634
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10635
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
10636
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10637
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10638
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10639
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10640
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10641
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10642
|
+
}>, never, never>;
|
|
10643
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10644
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
10645
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10646
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10647
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10648
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
|
|
10649
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10650
|
+
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
|
|
10651
|
+
}>, never, never>;
|
|
10652
|
+
}>>, never, never>;
|
|
10653
|
+
readonly data: Schema.Struct<{
|
|
10654
|
+
readonly outcome: Schema.Literals<readonly ["success", "failure", "interrupted"]>;
|
|
10655
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10656
|
+
readonly type: Schema.Literal<"unknown">;
|
|
10657
|
+
readonly message: Schema.String;
|
|
10658
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10659
|
+
readonly type: Schema.Literal<"unknown">;
|
|
10660
|
+
readonly message: Schema.String;
|
|
10661
|
+
}>>, never, never>;
|
|
10662
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10663
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
10664
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
10665
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10666
|
+
};
|
|
10667
|
+
}>;
|
|
10668
|
+
}> & {
|
|
10669
|
+
data: Schema.Struct<{
|
|
10670
|
+
readonly outcome: Schema.Literals<readonly ["success", "failure", "interrupted"]>;
|
|
10671
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
10672
|
+
readonly type: Schema.Literal<"unknown">;
|
|
10673
|
+
readonly message: Schema.String;
|
|
10674
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
10675
|
+
readonly type: Schema.Literal<"unknown">;
|
|
10676
|
+
readonly message: Schema.String;
|
|
10677
|
+
}>>, never, never>;
|
|
10678
|
+
readonly timestamp: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
10679
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
10680
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
10681
|
+
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10682
|
+
};
|
|
10683
|
+
}>;
|
|
10684
|
+
durable?: {
|
|
10685
|
+
readonly version: number;
|
|
10686
|
+
readonly aggregate: string;
|
|
10687
|
+
} | undefined;
|
|
10688
|
+
type: "session.next.execution.settled";
|
|
10525
10689
|
}) | (Schema.Struct<{
|
|
10526
10690
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
10527
10691
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
package/dist/groups/model.d.ts
CHANGED
|
@@ -156,4 +156,157 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
|
|
|
156
156
|
readonly family?: (string & import("effect/Brand").Brand<"Family">) | undefined;
|
|
157
157
|
};
|
|
158
158
|
}>;
|
|
159
|
+
}>>, HttpApiEndpoint.Json<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"model.default", "GET", "/api/model/default", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
160
|
+
readonly location: Schema.optional<Schema.Struct<{
|
|
161
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
162
|
+
readonly workspace: Schema.optional<Schema.String>;
|
|
163
|
+
}>>;
|
|
164
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
165
|
+
readonly location: typeof Location.Info;
|
|
166
|
+
readonly data: Schema.UndefinedOr<Schema.Struct<{
|
|
167
|
+
readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
|
|
168
|
+
readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
|
|
169
|
+
opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
170
|
+
anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
171
|
+
openai: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
172
|
+
google: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
173
|
+
googleVertex: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
174
|
+
githubCopilot: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
175
|
+
amazonBedrock: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
176
|
+
azure: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
177
|
+
openrouter: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
178
|
+
mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
179
|
+
gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
180
|
+
};
|
|
181
|
+
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Family">>, never, never>;
|
|
182
|
+
readonly name: Schema.String;
|
|
183
|
+
readonly api: Schema.Union<readonly [Schema.Struct<{
|
|
184
|
+
readonly type: Schema.Literal<"aisdk">;
|
|
185
|
+
readonly package: Schema.String;
|
|
186
|
+
readonly url: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
187
|
+
readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
188
|
+
readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
|
|
189
|
+
}>, Schema.Struct<{
|
|
190
|
+
readonly type: Schema.Literal<"native">;
|
|
191
|
+
readonly url: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
192
|
+
readonly settings: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
193
|
+
readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
|
|
194
|
+
}>]>;
|
|
195
|
+
readonly capabilities: Schema.Struct<{
|
|
196
|
+
readonly tools: Schema.Boolean;
|
|
197
|
+
readonly input: Schema.$Array<Schema.String>;
|
|
198
|
+
readonly output: Schema.$Array<Schema.String>;
|
|
199
|
+
}>;
|
|
200
|
+
readonly request: Schema.Struct<{
|
|
201
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
202
|
+
readonly settings: Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
203
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
204
|
+
readonly body: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
205
|
+
}>;
|
|
206
|
+
readonly variants: Schema.$Array<Schema.Struct<{
|
|
207
|
+
readonly settings: Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
208
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
209
|
+
readonly body: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
210
|
+
readonly id: Schema.brand<Schema.String, "VariantID">;
|
|
211
|
+
}>>;
|
|
212
|
+
readonly time: Schema.Struct<{
|
|
213
|
+
readonly released: Schema.Finite;
|
|
214
|
+
}>;
|
|
215
|
+
readonly cost: Schema.$Array<Schema.Struct<{
|
|
216
|
+
readonly tier: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
217
|
+
readonly type: Schema.Literal<"context">;
|
|
218
|
+
readonly size: Schema.Int;
|
|
219
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
220
|
+
readonly type: Schema.Literal<"context">;
|
|
221
|
+
readonly size: Schema.Int;
|
|
222
|
+
}>>, never, never>;
|
|
223
|
+
readonly input: Schema.Finite;
|
|
224
|
+
readonly output: Schema.Finite;
|
|
225
|
+
readonly cache: Schema.Struct<{
|
|
226
|
+
readonly read: Schema.Finite;
|
|
227
|
+
readonly write: Schema.Finite;
|
|
228
|
+
}>;
|
|
229
|
+
}>>;
|
|
230
|
+
readonly status: Schema.Literals<readonly ["alpha", "beta", "deprecated", "active"]>;
|
|
231
|
+
readonly enabled: Schema.Boolean;
|
|
232
|
+
readonly limit: Schema.Struct<{
|
|
233
|
+
readonly context: Schema.Int;
|
|
234
|
+
readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
235
|
+
readonly output: Schema.Int;
|
|
236
|
+
}>;
|
|
237
|
+
}> & {
|
|
238
|
+
empty: (providerID: import("@opencode-ai/schema/provider").ID, modelID: Model.ID) => {
|
|
239
|
+
readonly id: string & import("effect/Brand").Brand<"ModelV2.ID">;
|
|
240
|
+
readonly providerID: string & import("effect/Brand").Brand<"ProviderV2.ID">;
|
|
241
|
+
readonly name: string;
|
|
242
|
+
readonly api: {
|
|
243
|
+
readonly type: "aisdk";
|
|
244
|
+
readonly package: string;
|
|
245
|
+
readonly id: string & import("effect/Brand").Brand<"ModelV2.ID">;
|
|
246
|
+
readonly url?: string | undefined;
|
|
247
|
+
readonly settings?: {
|
|
248
|
+
readonly [x: string]: unknown;
|
|
249
|
+
} | undefined;
|
|
250
|
+
} | {
|
|
251
|
+
readonly type: "native";
|
|
252
|
+
readonly settings: {
|
|
253
|
+
readonly [x: string]: unknown;
|
|
254
|
+
};
|
|
255
|
+
readonly id: string & import("effect/Brand").Brand<"ModelV2.ID">;
|
|
256
|
+
readonly url?: string | undefined;
|
|
257
|
+
};
|
|
258
|
+
readonly capabilities: {
|
|
259
|
+
readonly tools: boolean;
|
|
260
|
+
readonly input: readonly string[];
|
|
261
|
+
readonly output: readonly string[];
|
|
262
|
+
};
|
|
263
|
+
readonly request: {
|
|
264
|
+
readonly settings: {
|
|
265
|
+
readonly [x: string]: unknown;
|
|
266
|
+
};
|
|
267
|
+
readonly headers: {
|
|
268
|
+
readonly [x: string]: string;
|
|
269
|
+
};
|
|
270
|
+
readonly body: {
|
|
271
|
+
readonly [x: string]: Schema.Json;
|
|
272
|
+
};
|
|
273
|
+
readonly variant?: string | undefined;
|
|
274
|
+
};
|
|
275
|
+
readonly variants: readonly {
|
|
276
|
+
readonly settings: {
|
|
277
|
+
readonly [x: string]: unknown;
|
|
278
|
+
};
|
|
279
|
+
readonly headers: {
|
|
280
|
+
readonly [x: string]: string;
|
|
281
|
+
};
|
|
282
|
+
readonly body: {
|
|
283
|
+
readonly [x: string]: Schema.Json;
|
|
284
|
+
};
|
|
285
|
+
readonly id: string & import("effect/Brand").Brand<"VariantID">;
|
|
286
|
+
}[];
|
|
287
|
+
readonly time: {
|
|
288
|
+
readonly released: number;
|
|
289
|
+
};
|
|
290
|
+
readonly cost: readonly {
|
|
291
|
+
readonly input: number;
|
|
292
|
+
readonly output: number;
|
|
293
|
+
readonly cache: {
|
|
294
|
+
readonly read: number;
|
|
295
|
+
readonly write: number;
|
|
296
|
+
};
|
|
297
|
+
readonly tier?: {
|
|
298
|
+
readonly type: "context";
|
|
299
|
+
readonly size: number;
|
|
300
|
+
} | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
readonly status: "alpha" | "beta" | "deprecated" | "active";
|
|
303
|
+
readonly enabled: boolean;
|
|
304
|
+
readonly limit: {
|
|
305
|
+
readonly context: number;
|
|
306
|
+
readonly output: number;
|
|
307
|
+
readonly input?: number | undefined;
|
|
308
|
+
};
|
|
309
|
+
readonly family?: (string & import("effect/Brand").Brand<"Family">) | undefined;
|
|
310
|
+
};
|
|
311
|
+
}>;
|
|
159
312
|
}>>, HttpApiEndpoint.Json<typeof ServiceUnavailableError>, never, never>, false>;
|
package/dist/groups/model.js
CHANGED
|
@@ -15,6 +15,17 @@ export const ModelGroup = HttpApiGroup.make("server.model")
|
|
|
15
15
|
identifier: "v2.model.list",
|
|
16
16
|
summary: "List models",
|
|
17
17
|
description: "Retrieve available models ordered by release date.",
|
|
18
|
+
})))
|
|
19
|
+
.add(HttpApiEndpoint.get("model.default", "/api/model/default", {
|
|
20
|
+
query: LocationQuery,
|
|
21
|
+
success: Location.response(Schema.UndefinedOr(Model.Info)),
|
|
22
|
+
error: ServiceUnavailableError,
|
|
23
|
+
})
|
|
24
|
+
.annotateMerge(locationQueryOpenApi)
|
|
25
|
+
.annotateMerge(OpenApi.annotations({
|
|
26
|
+
identifier: "v2.model.default",
|
|
27
|
+
summary: "Get default model",
|
|
28
|
+
description: "Retrieve the model used when a session has no explicit model selection.",
|
|
18
29
|
})))
|
|
19
30
|
.annotateMerge(OpenApi.annotations({
|
|
20
31
|
title: "models",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/protocol",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-14706",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsgo --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
29
|
+
"@opencode-ai/schema": "0.0.0-next-14706",
|
|
30
30
|
"effect": "4.0.0-beta.83"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|