@opencode/protocol 0.0.0-dev-21627 → 0.0.0-dev-21641

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.
@@ -12,25 +12,7 @@ export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId,
12
12
  }>>;
13
13
  }>>, Schema.toCodecJson<Schema.Struct<{
14
14
  readonly config: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
15
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.remove", "DELETE", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
16
- server: Schema.String;
17
- }>>, Schema.toCodecStringTree<Schema.Struct<{
18
- readonly location: Schema.optional<Schema.Struct<{
19
- readonly directory: Schema.optional<Schema.String>;
20
- }>>;
21
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/experimental/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
22
- server: Schema.String;
23
- }>>, Schema.toCodecStringTree<Schema.Struct<{
24
- readonly location: Schema.optional<Schema.Struct<{
25
- readonly directory: Schema.optional<Schema.String>;
26
- }>>;
27
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
28
- server: Schema.String;
29
- }>>, Schema.toCodecStringTree<Schema.Struct<{
30
- readonly location: Schema.optional<Schema.Struct<{
31
- readonly directory: Schema.optional<Schema.String>;
32
- }>>;
33
- }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
15
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
34
16
  readonly location: Schema.optional<Schema.Struct<{
35
17
  readonly directory: Schema.optional<Schema.String>;
36
18
  }>>;
@@ -79,7 +61,25 @@ export declare const makeMcpGroup: <LocationId extends HttpApiMiddleware.AnyId,
79
61
  readonly mimeType: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
80
62
  }>>;
81
63
  }>;
82
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.clientToken", "POST", "/api/experimental/client-mcp/token", never, Schema.toCodecStringTree<Schema.Struct<{
64
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.connect", "POST", "/api/experimental/mcp/:server/connect", Schema.toCodecStringTree<Schema.Struct<{
65
+ server: Schema.String;
66
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
67
+ readonly location: Schema.optional<Schema.Struct<{
68
+ readonly directory: Schema.optional<Schema.String>;
69
+ }>>;
70
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.disconnect", "POST", "/api/experimental/mcp/:server/disconnect", Schema.toCodecStringTree<Schema.Struct<{
71
+ server: Schema.String;
72
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
73
+ readonly location: Schema.optional<Schema.Struct<{
74
+ readonly directory: Schema.optional<Schema.String>;
75
+ }>>;
76
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.remove", "DELETE", "/api/experimental/mcp/:server", Schema.toCodecStringTree<Schema.Struct<{
77
+ server: Schema.String;
78
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
79
+ readonly location: Schema.optional<Schema.Struct<{
80
+ readonly directory: Schema.optional<Schema.String>;
81
+ }>>;
82
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof McpServerNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"mcp.clientToken", "POST", "/api/experimental/client-mcp/token", never, Schema.toCodecStringTree<Schema.Struct<{
83
83
  readonly location: Schema.optional<Schema.Struct<{
84
84
  readonly directory: Schema.optional<Schema.String>;
85
85
  }>>;
@@ -6,26 +6,7 @@ export declare const PTY_CONNECT_TOKEN_HEADER = "x-opencode-ticket";
6
6
  export declare const PTY_CONNECT_TOKEN_HEADER_VALUE = "1";
7
7
  export declare const PTY_CONNECT_PATH = "/api/pty/:ptyID/connect";
8
8
  export declare function hasPtyConnectTicketURL(url: URL): boolean;
9
- export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
10
- ptyID: Schema.brand<Schema.String, "PtyID"> & {
11
- create: () => string & import("effect/Brand").Brand<"PtyID">;
12
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
13
- };
14
- }>>, Schema.toCodecStringTree<Schema.Struct<{
15
- readonly location: Schema.optional<Schema.Struct<{
16
- readonly directory: Schema.optional<Schema.String>;
17
- }>>;
18
- }>>, never, Schema.toCodecStringTree<Schema.Struct<{
19
- readonly "x-opencode-ticket": Schema.optional<Schema.String>;
20
- }>>, Schema.toCodecJson<Schema.Struct<{
21
- readonly location: Schema.Struct<{
22
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
23
- }>;
24
- readonly data: Schema.Struct<{
25
- readonly ticket: Schema.String;
26
- readonly expires_in: Schema.Int;
27
- }>;
28
- }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
9
+ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.pty", HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
29
10
  readonly location: Schema.optional<Schema.Struct<{
30
11
  readonly directory: Schema.optional<Schema.String>;
31
12
  }>>;
@@ -52,12 +33,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
52
33
  readonly pid: Schema.Int;
53
34
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
54
35
  }>;
55
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
56
- ptyID: Schema.brand<Schema.String, "PtyID"> & {
57
- create: () => string & import("effect/Brand").Brand<"PtyID">;
58
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
59
- };
60
- }>>, Schema.toCodecStringTree<Schema.Struct<{
36
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
61
37
  readonly location: Schema.optional<Schema.Struct<{
62
38
  readonly directory: Schema.optional<Schema.String>;
63
39
  }>>;
@@ -65,7 +41,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
65
41
  readonly location: Schema.Struct<{
66
42
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
67
43
  }>;
68
- readonly data: Schema.Struct<{
44
+ readonly data: Schema.$Array<Schema.Struct<{
69
45
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
70
46
  create: () => string & import("effect/Brand").Brand<"PtyID">;
71
47
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -77,8 +53,13 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
77
53
  readonly status: Schema.Literals<readonly ["running", "exited"]>;
78
54
  readonly pid: Schema.Int;
79
55
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
80
- }>;
81
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.list", "GET", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
56
+ }>>;
57
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.get", "GET", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
58
+ ptyID: Schema.brand<Schema.String, "PtyID"> & {
59
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
60
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
61
+ };
62
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
82
63
  readonly location: Schema.optional<Schema.Struct<{
83
64
  readonly directory: Schema.optional<Schema.String>;
84
65
  }>>;
@@ -86,7 +67,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
86
67
  readonly location: Schema.Struct<{
87
68
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
88
69
  }>;
89
- readonly data: Schema.$Array<Schema.Struct<{
70
+ readonly data: Schema.Struct<{
90
71
  readonly id: Schema.brand<Schema.String, "PtyID"> & {
91
72
  create: () => string & import("effect/Brand").Brand<"PtyID">;
92
73
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -98,8 +79,8 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
98
79
  readonly status: Schema.Literals<readonly ["running", "exited"]>;
99
80
  readonly pid: Schema.Int;
100
81
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
101
- }>>;
102
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
82
+ }>;
83
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.remove", "DELETE", "/api/pty/:ptyID", Schema.toCodecStringTree<Schema.Struct<{
103
84
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
104
85
  create: () => string & import("effect/Brand").Brand<"PtyID">;
105
86
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -143,7 +124,26 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
143
124
  readonly pid: Schema.Int;
144
125
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
145
126
  }>;
146
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
127
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
128
+ ptyID: Schema.brand<Schema.String, "PtyID"> & {
129
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
130
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
131
+ };
132
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
133
+ readonly location: Schema.optional<Schema.Struct<{
134
+ readonly directory: Schema.optional<Schema.String>;
135
+ }>>;
136
+ }>>, never, Schema.toCodecStringTree<Schema.Struct<{
137
+ readonly "x-opencode-ticket": Schema.optional<Schema.String>;
138
+ }>>, Schema.toCodecJson<Schema.Struct<{
139
+ readonly location: Schema.Struct<{
140
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
141
+ }>;
142
+ readonly data: Schema.Struct<{
143
+ readonly ticket: Schema.String;
144
+ readonly expires_in: Schema.Int;
145
+ }>;
146
+ }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
147
147
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
148
148
  create: () => string & import("effect/Brand").Brand<"PtyID">;
149
149
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
@@ -9428,6 +9428,127 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
9428
9428
  };
9429
9429
  readonly text?: string | undefined;
9430
9430
  };
9431
+ } | {
9432
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
9433
+ readonly created: number;
9434
+ readonly metadata?: {
9435
+ readonly [x: string]: unknown;
9436
+ } | undefined;
9437
+ readonly type: "session.message.content.updated";
9438
+ readonly durable: {
9439
+ readonly aggregateID: string;
9440
+ readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
9441
+ readonly version: number & import("effect/Brand").Brand<"Event.Version">;
9442
+ };
9443
+ readonly location?: {
9444
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
9445
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
9446
+ } | undefined;
9447
+ readonly data: {
9448
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
9449
+ readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
9450
+ readonly content: readonly ({
9451
+ readonly type: "tool";
9452
+ readonly id: string;
9453
+ readonly name: string;
9454
+ readonly executed?: boolean | undefined;
9455
+ readonly native?: {
9456
+ readonly [x: string]: unknown;
9457
+ } | undefined;
9458
+ readonly state: {
9459
+ readonly status: "streaming";
9460
+ readonly input: string;
9461
+ } | {
9462
+ readonly status: "running";
9463
+ readonly input: {
9464
+ readonly [x: string]: unknown;
9465
+ };
9466
+ readonly metadata: {
9467
+ readonly [x: string]: Schema.Json;
9468
+ };
9469
+ } | {
9470
+ readonly status: "completed";
9471
+ readonly input: {
9472
+ readonly [x: string]: unknown;
9473
+ };
9474
+ readonly content: readonly [{
9475
+ readonly type: "text";
9476
+ readonly text: string;
9477
+ } | {
9478
+ readonly type: "file";
9479
+ readonly uri: string;
9480
+ readonly mime: string;
9481
+ readonly name?: string | undefined;
9482
+ }, ...({
9483
+ readonly type: "text";
9484
+ readonly text: string;
9485
+ } | {
9486
+ readonly type: "file";
9487
+ readonly uri: string;
9488
+ readonly mime: string;
9489
+ readonly name?: string | undefined;
9490
+ })[]];
9491
+ readonly metadata?: {
9492
+ readonly [x: string]: Schema.Json;
9493
+ } | undefined;
9494
+ } | {
9495
+ readonly status: "error";
9496
+ readonly input: {
9497
+ readonly [x: string]: unknown;
9498
+ };
9499
+ readonly error: {
9500
+ readonly type: string;
9501
+ readonly message: string;
9502
+ readonly status?: number | undefined;
9503
+ readonly response?: {
9504
+ readonly body: string;
9505
+ } | undefined;
9506
+ readonly retryAfterMs?: number | undefined;
9507
+ };
9508
+ readonly content?: readonly [{
9509
+ readonly type: "text";
9510
+ readonly text: string;
9511
+ } | {
9512
+ readonly type: "file";
9513
+ readonly uri: string;
9514
+ readonly mime: string;
9515
+ readonly name?: string | undefined;
9516
+ }, ...({
9517
+ readonly type: "text";
9518
+ readonly text: string;
9519
+ } | {
9520
+ readonly type: "file";
9521
+ readonly uri: string;
9522
+ readonly mime: string;
9523
+ readonly name?: string | undefined;
9524
+ })[]] | undefined;
9525
+ readonly metadata?: {
9526
+ readonly [x: string]: Schema.Json;
9527
+ } | undefined;
9528
+ };
9529
+ readonly time: {
9530
+ readonly created: number;
9531
+ readonly ran?: number | undefined;
9532
+ readonly completed?: number | undefined;
9533
+ };
9534
+ } | {
9535
+ readonly type: "text";
9536
+ readonly text: string;
9537
+ readonly native?: {
9538
+ readonly [x: string]: unknown;
9539
+ } | undefined;
9540
+ } | {
9541
+ readonly type: "reasoning";
9542
+ readonly text: string;
9543
+ readonly native?: {
9544
+ readonly [x: string]: unknown;
9545
+ } | undefined;
9546
+ readonly time?: {
9547
+ readonly created: number;
9548
+ readonly completed?: number | undefined;
9549
+ } | undefined;
9550
+ })[];
9551
+ };
9431
9552
  } | {
9432
9553
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
9433
9554
  readonly created: number;
@@ -10197,27 +10318,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
10197
10318
  readonly metadata?: {
10198
10319
  readonly [x: string]: unknown;
10199
10320
  } | undefined;
10200
- readonly type: "session.viewed";
10201
- readonly durable: {
10202
- readonly aggregateID: string;
10203
- readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
10204
- readonly version: number & import("effect/Brand").Brand<"Event.Version">;
10205
- };
10206
- readonly location?: {
10207
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
10208
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
10209
- } | undefined;
10210
- readonly data: {
10211
- readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
10212
- readonly idle: number;
10213
- };
10214
- } | {
10215
- readonly id: string & import("effect/Brand").Brand<"Event.ID">;
10216
- readonly created: number;
10217
- readonly metadata?: {
10218
- readonly [x: string]: unknown;
10219
- } | undefined;
10220
- readonly type: "session.message.content.updated";
10321
+ readonly type: "session.usage.recorded";
10221
10322
  readonly durable: {
10222
10323
  readonly aggregateID: string;
10223
10324
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
@@ -10229,108 +10330,17 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
10229
10330
  } | undefined;
10230
10331
  readonly data: {
10231
10332
  readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
10232
- readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
10233
- readonly content: readonly ({
10234
- readonly type: "text";
10235
- readonly text: string;
10236
- readonly native?: {
10237
- readonly [x: string]: unknown;
10238
- } | undefined;
10239
- } | {
10240
- readonly type: "reasoning";
10241
- readonly text: string;
10242
- readonly native?: {
10243
- readonly [x: string]: unknown;
10244
- } | undefined;
10245
- readonly time?: {
10246
- readonly created: number;
10247
- readonly completed?: number | undefined;
10248
- } | undefined;
10249
- } | {
10250
- readonly type: "tool";
10251
- readonly id: string;
10252
- readonly name: string;
10253
- readonly executed?: boolean | undefined;
10254
- readonly native?: {
10255
- readonly [x: string]: unknown;
10256
- } | undefined;
10257
- readonly state: {
10258
- readonly status: "streaming";
10259
- readonly input: string;
10260
- } | {
10261
- readonly status: "running";
10262
- readonly input: {
10263
- readonly [x: string]: unknown;
10264
- };
10265
- readonly metadata: {
10266
- readonly [x: string]: Schema.Json;
10267
- };
10268
- } | {
10269
- readonly status: "completed";
10270
- readonly input: {
10271
- readonly [x: string]: unknown;
10272
- };
10273
- readonly content: readonly [{
10274
- readonly type: "text";
10275
- readonly text: string;
10276
- } | {
10277
- readonly type: "file";
10278
- readonly uri: string;
10279
- readonly mime: string;
10280
- readonly name?: string | undefined;
10281
- }, ...({
10282
- readonly type: "text";
10283
- readonly text: string;
10284
- } | {
10285
- readonly type: "file";
10286
- readonly uri: string;
10287
- readonly mime: string;
10288
- readonly name?: string | undefined;
10289
- })[]];
10290
- readonly metadata?: {
10291
- readonly [x: string]: Schema.Json;
10292
- } | undefined;
10293
- } | {
10294
- readonly status: "error";
10295
- readonly input: {
10296
- readonly [x: string]: unknown;
10297
- };
10298
- readonly error: {
10299
- readonly type: string;
10300
- readonly message: string;
10301
- readonly status?: number | undefined;
10302
- readonly response?: {
10303
- readonly body: string;
10304
- } | undefined;
10305
- readonly retryAfterMs?: number | undefined;
10306
- };
10307
- readonly content?: readonly [{
10308
- readonly type: "text";
10309
- readonly text: string;
10310
- } | {
10311
- readonly type: "file";
10312
- readonly uri: string;
10313
- readonly mime: string;
10314
- readonly name?: string | undefined;
10315
- }, ...({
10316
- readonly type: "text";
10317
- readonly text: string;
10318
- } | {
10319
- readonly type: "file";
10320
- readonly uri: string;
10321
- readonly mime: string;
10322
- readonly name?: string | undefined;
10323
- })[]] | undefined;
10324
- readonly metadata?: {
10325
- readonly [x: string]: Schema.Json;
10326
- } | undefined;
10327
- };
10328
- readonly time: {
10329
- readonly created: number;
10330
- readonly ran?: number | undefined;
10331
- readonly completed?: number | undefined;
10333
+ readonly source: "compaction" | "title";
10334
+ readonly cost: number & import("effect/Brand").Brand<"Money.USD">;
10335
+ readonly tokens: {
10336
+ readonly input: number;
10337
+ readonly output: number;
10338
+ readonly reasoning: number;
10339
+ readonly cache: {
10340
+ readonly read: number;
10341
+ readonly write: number;
10332
10342
  };
10333
- })[];
10343
+ };
10334
10344
  };
10335
10345
  } | {
10336
10346
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
@@ -10338,7 +10348,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
10338
10348
  readonly metadata?: {
10339
10349
  readonly [x: string]: unknown;
10340
10350
  } | undefined;
10341
- readonly type: "session.usage.recorded";
10351
+ readonly type: "session.viewed";
10342
10352
  readonly durable: {
10343
10353
  readonly aggregateID: string;
10344
10354
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
@@ -10350,17 +10360,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
10350
10360
  } | undefined;
10351
10361
  readonly data: {
10352
10362
  readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
10353
- readonly source: "compaction" | "title";
10354
- readonly cost: number & import("effect/Brand").Brand<"Money.USD">;
10355
- readonly tokens: {
10356
- readonly input: number;
10357
- readonly output: number;
10358
- readonly reasoning: number;
10359
- readonly cache: {
10360
- readonly read: number;
10361
- readonly write: number;
10362
- };
10363
- };
10363
+ readonly idle: number;
10364
10364
  };
10365
10365
  } | {
10366
10366
  readonly type: "log.synced";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/protocol",
4
- "version": "0.0.0-dev-21627",
4
+ "version": "0.0.0-dev-21641",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -30,16 +30,17 @@
30
30
  "generate": "bun run script/generate-openapi.ts",
31
31
  "check:generated": "bun run script/generate-openapi.ts --check",
32
32
  "test": "bun test --only-failures",
33
- "typecheck": "tsc --noEmit"
33
+ "typecheck": "bun check --no-script",
34
+ "typecheck:tsc": "tsc --noEmit"
34
35
  },
35
36
  "dependencies": {
36
- "@opencode/schema": "0.0.0-dev-21627",
37
+ "@opencode/schema": "0.0.0-dev-21641",
37
38
  "effect": "4.0.1"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@tsconfig/bun": "1.0.9",
41
42
  "@types/bun": "1.4.3",
42
- "@typescript/native": "npm:typescript@7.0.2",
43
+ "@typescript/native": "npm:typescript@7.1.0-beta",
43
44
  "prettier": "3.6.2",
44
45
  "typescript": "npm:@typescript/typescript6@6.0.2"
45
46
  }