@opencode-ai/protocol 0.0.0-next-15090 → 0.0.0-next-15092

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.
@@ -9,7 +9,7 @@ export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate",
9
9
  }>>, HttpApiEndpoint.Json<Schema.Struct<{
10
10
  readonly prompt: Schema.String;
11
11
  readonly model: Schema.optional<Schema.Struct<{
12
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
12
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
13
13
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
14
14
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
15
15
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -23,7 +23,7 @@ export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate",
23
23
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
24
24
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
25
25
  };
26
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
26
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
27
27
  }>>;
28
28
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
29
29
  readonly data: Schema.Struct<{
@@ -17,8 +17,8 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
17
17
  readonly cursor: Schema.optional<Schema.String>;
18
18
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
19
19
  readonly data: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
20
- readonly type: Schema.Literal<"agent-switched">;
21
- readonly agent: Schema.String;
20
+ readonly type: Schema.tag<"agent-switched">;
21
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
22
22
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
23
23
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
24
24
  fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -28,9 +28,9 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
28
28
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
29
29
  }>;
30
30
  }>, Schema.Struct<{
31
- readonly type: Schema.Literal<"model-switched">;
31
+ readonly type: Schema.tag<"model-switched">;
32
32
  readonly model: Schema.Struct<{
33
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
33
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
34
34
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
35
35
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
36
36
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -44,10 +44,10 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
44
44
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
45
45
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
46
46
  };
47
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
47
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
48
48
  }>;
49
49
  readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
50
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
50
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
51
51
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
52
52
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
53
53
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -61,9 +61,9 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
61
61
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
62
62
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
63
63
  };
64
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
64
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
65
65
  }>>>, Schema.optionalKey<Schema.Struct<{
66
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
66
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
67
67
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
68
68
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
69
69
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -77,7 +77,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
77
77
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
78
78
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
79
79
  };
80
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
80
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
81
81
  }>>, never, never>;
82
82
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
83
83
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -189,7 +189,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
189
189
  readonly text: Schema.String;
190
190
  }>>, never, never>;
191
191
  }>>>, never, never>;
192
- readonly type: Schema.Literal<"user">;
192
+ readonly type: Schema.tag<"user">;
193
193
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
194
194
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
195
195
  fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -199,13 +199,9 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
199
199
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
200
200
  }>;
201
201
  }>, Schema.Struct<{
202
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
203
- create: () => string & import("effect/Brand").Brand<"SessionID">;
204
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
205
- };
206
202
  readonly text: Schema.String;
207
203
  readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
208
- readonly type: Schema.Literal<"synthetic">;
204
+ readonly type: Schema.tag<"synthetic">;
209
205
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
210
206
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
211
207
  fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -215,7 +211,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
215
211
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
216
212
  }>;
217
213
  }>, Schema.Struct<{
218
- readonly type: Schema.Literal<"system">;
214
+ readonly type: Schema.tag<"system">;
219
215
  readonly text: Schema.String;
220
216
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
221
217
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -226,8 +222,9 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
226
222
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
227
223
  }>;
228
224
  }>, Schema.Struct<{
229
- readonly type: Schema.Literal<"skill">;
230
- readonly name: Schema.String;
225
+ readonly type: Schema.tag<"skill">;
226
+ readonly skill: Schema.brand<Schema.String, "Skill.ID">;
227
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
231
228
  readonly text: Schema.String;
232
229
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
233
230
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -238,25 +235,14 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
238
235
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
239
236
  }>;
240
237
  }>, Schema.Struct<{
241
- readonly type: Schema.Literal<"shell">;
242
- readonly shell: Schema.Struct<{
243
- readonly id: Schema.brand<Schema.String, "ShellID"> & {
244
- create: () => string & import("effect/Brand").Brand<"ShellID">;
245
- ascending: (id?: string) => string & import("effect/Brand").Brand<"ShellID">;
246
- };
247
- readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
248
- readonly command: Schema.String;
249
- readonly cwd: Schema.String;
250
- readonly shell: Schema.String;
251
- readonly file: Schema.String;
252
- readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
253
- readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
254
- readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>;
255
- readonly time: Schema.Struct<{
256
- readonly started: Schema.Number;
257
- readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
258
- }>;
259
- }>;
238
+ readonly type: Schema.tag<"shell">;
239
+ readonly shellID: Schema.brand<Schema.String, "Shell.ID"> & {
240
+ create: () => string & import("effect/Brand").Brand<"Shell.ID">;
241
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
242
+ };
243
+ readonly command: Schema.String;
244
+ readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
245
+ readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
260
246
  readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
261
247
  readonly output: Schema.String;
262
248
  readonly cursor: Schema.Int;
@@ -278,10 +264,10 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
278
264
  };
279
265
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
280
266
  }>, Schema.Struct<{
281
- readonly type: Schema.Literal<"assistant">;
282
- readonly agent: Schema.String;
267
+ readonly type: Schema.tag<"assistant">;
268
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
283
269
  readonly model: Schema.Struct<{
284
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
270
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
285
271
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
286
272
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
287
273
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -295,13 +281,13 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
295
281
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
296
282
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
297
283
  };
298
- readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "VariantID">>, never, never>;
284
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
299
285
  }>;
300
286
  readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
301
- readonly type: Schema.Literal<"text">;
287
+ readonly type: Schema.tag<"text">;
302
288
  readonly text: Schema.String;
303
289
  }>, Schema.Struct<{
304
- readonly type: Schema.Literal<"reasoning">;
290
+ readonly type: Schema.tag<"reasoning">;
305
291
  readonly text: Schema.String;
306
292
  readonly state: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
307
293
  readonly time: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
@@ -312,17 +298,17 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
312
298
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
313
299
  }>>, never, never>;
314
300
  }>, Schema.Struct<{
315
- readonly type: Schema.Literal<"tool">;
301
+ readonly type: Schema.tag<"tool">;
316
302
  readonly id: Schema.String;
317
303
  readonly name: Schema.String;
318
304
  readonly executed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
319
305
  readonly providerState: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
320
306
  readonly providerResultState: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
321
307
  readonly state: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
322
- readonly status: Schema.Literal<"pending">;
308
+ readonly status: Schema.tag<"streaming">;
323
309
  readonly input: Schema.String;
324
310
  }>, Schema.Struct<{
325
- readonly status: Schema.Literal<"running">;
311
+ readonly status: Schema.tag<"running">;
326
312
  readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
327
313
  readonly structured: Schema.$Record<Schema.String, Schema.Unknown>;
328
314
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -335,85 +321,8 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
335
321
  readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
336
322
  }>]>>;
337
323
  }>, Schema.Struct<{
338
- readonly status: Schema.Literal<"completed">;
324
+ readonly status: Schema.tag<"completed">;
339
325
  readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
340
- readonly attachments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
341
- readonly data: Schema.String;
342
- readonly mime: Schema.String;
343
- readonly source: Schema.Union<readonly [Schema.Struct<{
344
- readonly type: Schema.Literal<"inline">;
345
- }>, Schema.Struct<{
346
- readonly type: Schema.Literal<"uri">;
347
- readonly uri: Schema.String;
348
- }>]>;
349
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
350
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
351
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
352
- readonly start: Schema.Finite;
353
- readonly end: Schema.Finite;
354
- readonly text: Schema.String;
355
- }>>>, Schema.optionalKey<Schema.Struct<{
356
- readonly start: Schema.Finite;
357
- readonly end: Schema.Finite;
358
- readonly text: Schema.String;
359
- }>>, never, never>;
360
- }> & {
361
- create: (input: import("@opencode-ai/schema/prompt").FileAttachment) => {
362
- readonly data: string;
363
- readonly mime: string;
364
- readonly source: {
365
- readonly type: "inline";
366
- } | {
367
- readonly type: "uri";
368
- readonly uri: string;
369
- };
370
- readonly name?: string | undefined;
371
- readonly description?: string | undefined;
372
- readonly mention?: {
373
- readonly start: number;
374
- readonly end: number;
375
- readonly text: string;
376
- } | undefined;
377
- };
378
- }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
379
- readonly data: Schema.String;
380
- readonly mime: Schema.String;
381
- readonly source: Schema.Union<readonly [Schema.Struct<{
382
- readonly type: Schema.Literal<"inline">;
383
- }>, Schema.Struct<{
384
- readonly type: Schema.Literal<"uri">;
385
- readonly uri: Schema.String;
386
- }>]>;
387
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
388
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
389
- readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
390
- readonly start: Schema.Finite;
391
- readonly end: Schema.Finite;
392
- readonly text: Schema.String;
393
- }>>>, Schema.optionalKey<Schema.Struct<{
394
- readonly start: Schema.Finite;
395
- readonly end: Schema.Finite;
396
- readonly text: Schema.String;
397
- }>>, never, never>;
398
- }> & {
399
- create: (input: import("@opencode-ai/schema/prompt").FileAttachment) => {
400
- readonly data: string;
401
- readonly mime: string;
402
- readonly source: {
403
- readonly type: "inline";
404
- } | {
405
- readonly type: "uri";
406
- readonly uri: string;
407
- };
408
- readonly name?: string | undefined;
409
- readonly description?: string | undefined;
410
- readonly mention?: {
411
- readonly start: number;
412
- readonly end: number;
413
- readonly text: string;
414
- } | undefined;
415
- };
416
- }>>, never, never>;
417
326
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
418
327
  readonly type: Schema.Literal<"text">;
419
328
  readonly text: Schema.String;
@@ -423,11 +332,10 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
423
332
  readonly mime: Schema.String;
424
333
  readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
425
334
  }>]>>;
426
- readonly outputPaths: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
427
335
  readonly structured: Schema.$Record<Schema.String, Schema.Unknown>;
428
336
  readonly result: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Unknown>>, Schema.optionalKey<Schema.Unknown>, never, never>;
429
337
  }>, Schema.Struct<{
430
- readonly status: Schema.Literal<"error">;
338
+ readonly status: Schema.tag<"error">;
431
339
  readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
432
340
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
433
341
  readonly type: Schema.Literal<"text">;
@@ -449,20 +357,23 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
449
357
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
450
358
  readonly ran: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
451
359
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
452
- readonly pruned: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
453
360
  }>;
454
361
  }>]>>;
455
362
  readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
456
- readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
457
- readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
363
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
364
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
458
365
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>, never, never>;
459
366
  }>>>, Schema.optionalKey<Schema.Struct<{
460
- readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
461
- readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
367
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
368
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
462
369
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>, never, never>;
463
370
  }>>, never, never>;
464
371
  readonly finish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>>, Schema.optionalKey<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>, never, never>;
465
- readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
372
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
373
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
374
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
375
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
376
+ }>, never, never>;
466
377
  readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
467
378
  readonly input: Schema.Finite;
468
379
  readonly output: Schema.Finite;
@@ -511,7 +422,11 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
511
422
  fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
512
423
  };
513
424
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
514
- }>, Schema.Struct<{
425
+ }>, Schema.Union<readonly [Schema.Struct<{
426
+ readonly status: Schema.tag<"running">;
427
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
428
+ readonly summary: Schema.String;
429
+ readonly recent: Schema.String;
515
430
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
516
431
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
517
432
  fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -520,12 +435,38 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
520
435
  readonly time: Schema.Struct<{
521
436
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
522
437
  }>;
523
- readonly type: Schema.Literal<"compaction">;
524
- readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed"]>;
438
+ readonly type: Schema.tag<"compaction">;
439
+ }>, Schema.Struct<{
440
+ readonly status: Schema.tag<"completed">;
525
441
  readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
526
442
  readonly summary: Schema.String;
527
443
  readonly recent: Schema.String;
528
- }>]>>;
444
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
445
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
446
+ fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
447
+ };
448
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
449
+ readonly time: Schema.Struct<{
450
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
451
+ }>;
452
+ readonly type: Schema.tag<"compaction">;
453
+ }>, Schema.Struct<{
454
+ readonly status: Schema.tag<"failed">;
455
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
456
+ readonly error: Schema.Struct<{
457
+ readonly type: Schema.String;
458
+ readonly message: Schema.String;
459
+ }>;
460
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
461
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
462
+ fromEvent: (eventID: import("@opencode-ai/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
463
+ };
464
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
465
+ readonly time: Schema.Struct<{
466
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
467
+ }>;
468
+ readonly type: Schema.tag<"compaction">;
469
+ }>]>]>>;
529
470
  readonly cursor: Schema.Struct<{
530
471
  readonly previous: Schema.optional<Schema.String>;
531
472
  readonly next: Schema.optional<Schema.String>;
@@ -19,7 +19,7 @@ export const MessageGroup = HttpApiGroup.make("server.message")
19
19
  params: { sessionID: Session.ID },
20
20
  query: SessionMessagesQuery,
21
21
  success: Schema.Struct({
22
- data: Schema.Array(SessionMessage.Message),
22
+ data: Schema.Array(SessionMessage.Info),
23
23
  cursor: Schema.Struct({
24
24
  previous: Schema.String.pipe(Schema.optional),
25
25
  next: Schema.String.pipe(Schema.optional),
@@ -20,24 +20,32 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
20
20
  readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
21
21
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
22
22
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
23
- readonly id: Schema.brand<Schema.String, "VariantID">;
23
+ readonly id: Schema.brand<Schema.String, "Model.VariantID">;
24
24
  }>>;
25
25
  readonly time: Schema.Struct<{
26
26
  readonly released: Schema.Finite;
27
27
  }>;
28
28
  readonly cost: Schema.$Array<Schema.Struct<{
29
29
  readonly tier: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
30
- readonly type: Schema.Literal<"context">;
30
+ readonly type: Schema.tag<"context">;
31
31
  readonly size: Schema.Int;
32
32
  }>>>, Schema.optionalKey<Schema.Struct<{
33
- readonly type: Schema.Literal<"context">;
33
+ readonly type: Schema.tag<"context">;
34
34
  readonly size: Schema.Int;
35
35
  }>>, never, never>;
36
- readonly input: Schema.Finite;
37
- readonly output: Schema.Finite;
36
+ readonly input: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
37
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
38
+ };
39
+ readonly output: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
40
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
41
+ };
38
42
  readonly cache: Schema.Struct<{
39
- readonly read: Schema.Finite;
40
- readonly write: Schema.Finite;
43
+ readonly read: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
44
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
45
+ };
46
+ readonly write: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
47
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
48
+ };
41
49
  }>;
42
50
  }>>;
43
51
  readonly status: Schema.Literals<readonly ["alpha", "beta", "deprecated", "active"]>;
@@ -50,8 +58,8 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
50
58
  readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
51
59
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
52
60
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
53
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
54
- readonly modelID: Schema.brand<Schema.String, "ModelV2.ID">;
61
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
62
+ readonly modelID: Schema.brand<Schema.String, "Model.ID">;
55
63
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
56
64
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
57
65
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -65,7 +73,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
65
73
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
66
74
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
67
75
  };
68
- readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Family">>, never, never>;
76
+ readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
69
77
  readonly name: Schema.String;
70
78
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
71
79
  }> & {
@@ -76,7 +84,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
76
84
  readonly output: readonly string[];
77
85
  };
78
86
  readonly variants: readonly {
79
- readonly id: string & import("effect/Brand").Brand<"VariantID">;
87
+ readonly id: string & import("effect/Brand").Brand<"Model.VariantID">;
80
88
  readonly settings?: {
81
89
  readonly [x: string]: Schema.Json;
82
90
  } | undefined;
@@ -91,11 +99,11 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
91
99
  readonly released: number;
92
100
  };
93
101
  readonly cost: readonly {
94
- readonly input: number;
95
- readonly output: number;
102
+ readonly input: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
103
+ readonly output: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
96
104
  readonly cache: {
97
- readonly read: number;
98
- readonly write: number;
105
+ readonly read: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
106
+ readonly write: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
99
107
  };
100
108
  readonly tier?: {
101
109
  readonly type: "context";
@@ -109,8 +117,8 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
109
117
  readonly output: number;
110
118
  readonly input?: number | undefined;
111
119
  };
112
- readonly id: string & import("effect/Brand").Brand<"ModelV2.ID">;
113
- readonly modelID: string & import("effect/Brand").Brand<"ModelV2.ID">;
120
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
121
+ readonly modelID: string & import("effect/Brand").Brand<"Model.ID">;
114
122
  readonly providerID: string & import("effect/Brand").Brand<"ProviderV2.ID">;
115
123
  readonly name: string;
116
124
  readonly settings?: {
@@ -122,7 +130,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
122
130
  readonly body?: {
123
131
  readonly [x: string]: Schema.Json;
124
132
  } | undefined;
125
- readonly family?: (string & import("effect/Brand").Brand<"Family">) | undefined;
133
+ readonly family?: (string & import("effect/Brand").Brand<"Model.Family">) | undefined;
126
134
  readonly package?: string | undefined;
127
135
  };
128
136
  }>;
@@ -143,24 +151,32 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
143
151
  readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
144
152
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
145
153
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
146
- readonly id: Schema.brand<Schema.String, "VariantID">;
154
+ readonly id: Schema.brand<Schema.String, "Model.VariantID">;
147
155
  }>>;
148
156
  readonly time: Schema.Struct<{
149
157
  readonly released: Schema.Finite;
150
158
  }>;
151
159
  readonly cost: Schema.$Array<Schema.Struct<{
152
160
  readonly tier: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
153
- readonly type: Schema.Literal<"context">;
161
+ readonly type: Schema.tag<"context">;
154
162
  readonly size: Schema.Int;
155
163
  }>>>, Schema.optionalKey<Schema.Struct<{
156
- readonly type: Schema.Literal<"context">;
164
+ readonly type: Schema.tag<"context">;
157
165
  readonly size: Schema.Int;
158
166
  }>>, never, never>;
159
- readonly input: Schema.Finite;
160
- readonly output: Schema.Finite;
167
+ readonly input: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
168
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
169
+ };
170
+ readonly output: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
171
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
172
+ };
161
173
  readonly cache: Schema.Struct<{
162
- readonly read: Schema.Finite;
163
- readonly write: Schema.Finite;
174
+ readonly read: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
175
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
176
+ };
177
+ readonly write: Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
178
+ zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
179
+ };
164
180
  }>;
165
181
  }>>;
166
182
  readonly status: Schema.Literals<readonly ["alpha", "beta", "deprecated", "active"]>;
@@ -173,8 +189,8 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
173
189
  readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
174
190
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
175
191
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
176
- readonly id: Schema.brand<Schema.String, "ModelV2.ID">;
177
- readonly modelID: Schema.brand<Schema.String, "ModelV2.ID">;
192
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
193
+ readonly modelID: Schema.brand<Schema.String, "Model.ID">;
178
194
  readonly providerID: Schema.brand<Schema.String, "ProviderV2.ID"> & {
179
195
  opencode: string & import("effect/Brand").Brand<"ProviderV2.ID">;
180
196
  anthropic: string & import("effect/Brand").Brand<"ProviderV2.ID">;
@@ -188,7 +204,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
188
204
  mistral: string & import("effect/Brand").Brand<"ProviderV2.ID">;
189
205
  gitlab: string & import("effect/Brand").Brand<"ProviderV2.ID">;
190
206
  };
191
- readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Family">>, never, never>;
207
+ readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
192
208
  readonly name: Schema.String;
193
209
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
194
210
  }> & {
@@ -199,7 +215,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
199
215
  readonly output: readonly string[];
200
216
  };
201
217
  readonly variants: readonly {
202
- readonly id: string & import("effect/Brand").Brand<"VariantID">;
218
+ readonly id: string & import("effect/Brand").Brand<"Model.VariantID">;
203
219
  readonly settings?: {
204
220
  readonly [x: string]: Schema.Json;
205
221
  } | undefined;
@@ -214,11 +230,11 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
214
230
  readonly released: number;
215
231
  };
216
232
  readonly cost: readonly {
217
- readonly input: number;
218
- readonly output: number;
233
+ readonly input: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
234
+ readonly output: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
219
235
  readonly cache: {
220
- readonly read: number;
221
- readonly write: number;
236
+ readonly read: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
237
+ readonly write: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
222
238
  };
223
239
  readonly tier?: {
224
240
  readonly type: "context";
@@ -232,8 +248,8 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
232
248
  readonly output: number;
233
249
  readonly input?: number | undefined;
234
250
  };
235
- readonly id: string & import("effect/Brand").Brand<"ModelV2.ID">;
236
- readonly modelID: string & import("effect/Brand").Brand<"ModelV2.ID">;
251
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
252
+ readonly modelID: string & import("effect/Brand").Brand<"Model.ID">;
237
253
  readonly providerID: string & import("effect/Brand").Brand<"ProviderV2.ID">;
238
254
  readonly name: string;
239
255
  readonly settings?: {
@@ -245,7 +261,7 @@ export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpA
245
261
  readonly body?: {
246
262
  readonly [x: string]: Schema.Json;
247
263
  } | undefined;
248
- readonly family?: (string & import("effect/Brand").Brand<"Family">) | undefined;
264
+ readonly family?: (string & import("effect/Brand").Brand<"Model.Family">) | undefined;
249
265
  readonly package?: string | undefined;
250
266
  };
251
267
  }>;