@opencode/protocol 0.0.0-dev-19613 → 0.0.0-dev-19617

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.
@@ -64,7 +64,7 @@ export const MessageGroup = HttpApiGroup.make("server.message")
64
64
  }).annotate({ identifier: "SessionMessagesResponse" }),
65
65
  error: [InvalidCursorError, SessionNotFoundError, UnknownError],
66
66
  }).annotateMerge(OpenApi.annotations({
67
- identifier: "message.list",
67
+ identifier: "session.message.list",
68
68
  summary: "Get session messages",
69
69
  description: "Retrieve projected messages for a session, optionally filtered by type. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline, passing the same type filter on each page.",
70
70
  })))
@@ -683,7 +683,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
683
683
  }>]>;
684
684
  }>>, never, never>;
685
685
  }>;
686
- }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.import", "POST", "/api/session/import", never, never, Schema.toCodecJson<Schema.Struct<{
686
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.import", "POST", "/api/experimental/session/import", never, never, Schema.toCodecJson<Schema.Struct<{
687
687
  readonly location: Schema.optional<Schema.Struct<{
688
688
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
689
689
  }>>;
@@ -1727,7 +1727,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1727
1727
  }>]>;
1728
1728
  }>>, never, never>;
1729
1729
  }>;
1730
- }>>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.export", "GET", "/api/session/:sessionID/export", Schema.toCodecStringTree<Schema.Struct<{
1730
+ }>>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.export", "GET", "/api/experimental/session/:sessionID/export", Schema.toCodecStringTree<Schema.Struct<{
1731
1731
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
1732
1732
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1733
1733
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -3283,7 +3283,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
3283
3283
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3284
3284
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
3285
3285
  };
3286
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
3286
+ readonly time: Schema.Struct<{
3287
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
3288
+ }>;
3287
3289
  }>;
3288
3290
  }>>, Schema.toCodecJson<typeof InvalidRequestError | typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.command", "POST", "/api/session/:sessionID/command", Schema.toCodecStringTree<Schema.Struct<{
3289
3291
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -3429,7 +3431,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
3429
3431
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3430
3432
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
3431
3433
  };
3432
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
3434
+ readonly time: Schema.Struct<{
3435
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
3436
+ }>;
3433
3437
  }>;
3434
3438
  }>>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.shell", "POST", "/api/session/:sessionID/shell", Schema.toCodecStringTree<Schema.Struct<{
3435
3439
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -3466,7 +3470,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
3466
3470
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3467
3471
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
3468
3472
  };
3469
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
3473
+ readonly time: Schema.Struct<{
3474
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
3475
+ }>;
3470
3476
  }>;
3471
3477
  }>>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.wait", "POST", "/api/experimental/session/:sessionID/wait", Schema.toCodecStringTree<Schema.Struct<{
3472
3478
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -3506,7 +3512,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
3506
3512
  readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
3507
3513
  }>>>, never, never>;
3508
3514
  }>;
3509
- }>>, Schema.toCodecJson<typeof SessionBusyError | typeof UnknownError | typeof SessionNotFoundError | typeof MessageNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.revert.clear", "POST", "/api/session/:sessionID/revert/clear", Schema.toCodecStringTree<Schema.Struct<{
3515
+ }>>, Schema.toCodecJson<typeof SessionBusyError | typeof UnknownError | typeof SessionNotFoundError | typeof MessageNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.revert.clear", "DELETE", "/api/session/:sessionID/revert", Schema.toCodecStringTree<Schema.Struct<{
3510
3516
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
3511
3517
  create: () => string & import("effect/Brand").Brand<"SessionID">;
3512
3518
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -4382,7 +4388,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4382
4388
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4383
4389
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4384
4390
  };
4385
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4391
+ readonly time: Schema.Struct<{
4392
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4393
+ }>;
4386
4394
  }>, Schema.Struct<{
4387
4395
  readonly type: Schema.tag<"synthetic">;
4388
4396
  readonly payload: Schema.Struct<{
@@ -4399,7 +4407,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4399
4407
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4400
4408
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4401
4409
  };
4402
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4410
+ readonly time: Schema.Struct<{
4411
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4412
+ }>;
4403
4413
  }>, Schema.Struct<{
4404
4414
  readonly type: Schema.tag<"compaction">;
4405
4415
  readonly payload: Schema.Struct<{}>;
@@ -4412,7 +4422,9 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4412
4422
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4413
4423
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4414
4424
  };
4415
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4425
+ readonly time: Schema.Struct<{
4426
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4427
+ }>;
4416
4428
  }>, Schema.Struct<{
4417
4429
  readonly payload: Schema.Struct<{
4418
4430
  readonly location: Schema.Struct<{
@@ -4432,8 +4444,10 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4432
4444
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4433
4445
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
4434
4446
  };
4447
+ readonly time: Schema.Struct<{
4448
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4449
+ }>;
4435
4450
  readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
4436
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
4437
4451
  }>]>>;
4438
4452
  }>>, Schema.toCodecJson<typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.inbox.cancel", "DELETE", "/api/session/:sessionID/inbox/:inboxID", Schema.toCodecStringTree<Schema.Struct<{
4439
4453
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
@@ -4462,7 +4476,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4462
4476
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
4463
4477
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
4464
4478
  };
4465
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.list", "GET", "/api/session/:sessionID/instructions/entries", Schema.toCodecStringTree<Schema.Struct<{
4479
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ConflictError | typeof SessionNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.list", "GET", "/api/experimental/session/:sessionID/instructions/entries", Schema.toCodecStringTree<Schema.Struct<{
4466
4480
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
4467
4481
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4468
4482
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -4472,7 +4486,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4472
4486
  readonly key: Schema.String;
4473
4487
  readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
4474
4488
  }>>;
4475
- }>>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.put", "PUT", "/api/session/:sessionID/instructions/entries/:key", Schema.toCodecStringTree<Schema.Struct<{
4489
+ }>>, Schema.toCodecJson<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.put", "PUT", "/api/experimental/session/:sessionID/instructions/entries/:key", Schema.toCodecStringTree<Schema.Struct<{
4476
4490
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
4477
4491
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4478
4492
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -4480,7 +4494,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4480
4494
  key: Schema.String;
4481
4495
  }>>, never, Schema.toCodecJson<Schema.Struct<{
4482
4496
  readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
4483
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof InstructionEntry.ValueTooLargeError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.remove", "DELETE", "/api/session/:sessionID/instructions/entries/:key", Schema.toCodecStringTree<Schema.Struct<{
4497
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof SessionNotFoundError | typeof InstructionEntry.ValueTooLargeError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.remove", "DELETE", "/api/experimental/session/:sessionID/instructions/entries/:key", Schema.toCodecStringTree<Schema.Struct<{
4484
4498
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
4485
4499
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4486
4500
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -159,7 +159,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
159
159
  summary: "Create session",
160
160
  description: "Create a session at the requested location.",
161
161
  })))
162
- .add(HttpApiEndpoint.post("session.import", "/api/session/import", {
162
+ .add(HttpApiEndpoint.post("session.import", "/api/experimental/session/import", {
163
163
  payload: Schema.Struct({
164
164
  ...PublicSessionTransfer.fields,
165
165
  location: Location.PublicRef.pipe(Schema.optional),
@@ -167,17 +167,17 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
167
167
  success: Schema.Struct({ data: PublicSessionInfo }),
168
168
  error: [ConflictError, SessionNotFoundError],
169
169
  }).annotateMerge(OpenApi.annotations({
170
- identifier: "session.import",
170
+ identifier: "experimental.session.import",
171
171
  summary: "Import session",
172
172
  description: "Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.",
173
173
  })))
174
- .add(HttpApiEndpoint.get("session.export", "/api/session/:sessionID/export", {
174
+ .add(HttpApiEndpoint.get("session.export", "/api/experimental/session/:sessionID/export", {
175
175
  params: { sessionID: Session.ID },
176
176
  query: Schema.Struct({ sanitize: BooleanFromString.pipe(Schema.optional) }),
177
177
  success: Schema.Struct({ data: PublicSessionTransfer }),
178
178
  error: [SessionNotFoundError, UnknownError],
179
179
  }).annotateMerge(OpenApi.annotations({
180
- identifier: "session.export",
180
+ identifier: "experimental.session.export",
181
181
  summary: "Export session",
182
182
  description: "Export a complete projected session transcript.",
183
183
  })))
@@ -385,7 +385,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
385
385
  summary: "Stage session revert",
386
386
  description: "Stage or move a reversible session boundary and optionally apply its file changes.",
387
387
  })))
388
- .add(HttpApiEndpoint.post("session.revert.clear", "/api/session/:sessionID/revert/clear", {
388
+ .add(HttpApiEndpoint.delete("session.revert.clear", "/api/session/:sessionID/revert", {
389
389
  params: { sessionID: Session.ID },
390
390
  success: HttpApiSchema.NoContent,
391
391
  error: [SessionNotFoundError, SessionBusyError, UnknownError],
@@ -464,18 +464,18 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
464
464
  summary: "Queue steered item",
465
465
  description: "Change a steered inbox item to queued delivery.",
466
466
  })))
467
- .add(HttpApiEndpoint.get("session.instructions.entry.list", "/api/session/:sessionID/instructions/entries", {
467
+ .add(HttpApiEndpoint.get("session.instructions.entry.list", "/api/experimental/session/:sessionID/instructions/entries", {
468
468
  params: { sessionID: Session.ID },
469
469
  success: Schema.Struct({ data: Schema.Array(InstructionEntry.Info) }),
470
470
  error: SessionNotFoundError,
471
471
  })
472
472
  .middleware(sessionLocationMiddleware)
473
473
  .annotateMerge(OpenApi.annotations({
474
- identifier: "session.instructions.entry.list",
474
+ identifier: "experimental.session.instructions.entry.list",
475
475
  summary: "List instruction entries",
476
476
  description: "List API-managed instruction entries attached to the session.",
477
477
  })))
478
- .add(HttpApiEndpoint.put("session.instructions.entry.put", "/api/session/:sessionID/instructions/entries/:key", {
478
+ .add(HttpApiEndpoint.put("session.instructions.entry.put", "/api/experimental/session/:sessionID/instructions/entries/:key", {
479
479
  params: { sessionID: Session.ID, key: InstructionEntry.Key },
480
480
  payload: Schema.Struct({ value: Schema.Json }),
481
481
  success: HttpApiSchema.NoContent,
@@ -483,18 +483,18 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
483
483
  })
484
484
  .middleware(sessionLocationMiddleware)
485
485
  .annotateMerge(OpenApi.annotations({
486
- identifier: "session.instructions.entry.put",
486
+ identifier: "experimental.session.instructions.entry.put",
487
487
  summary: "Put instruction entry",
488
488
  description: "Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.",
489
489
  })))
490
- .add(HttpApiEndpoint.delete("session.instructions.entry.remove", "/api/session/:sessionID/instructions/entries/:key", {
490
+ .add(HttpApiEndpoint.delete("session.instructions.entry.remove", "/api/experimental/session/:sessionID/instructions/entries/:key", {
491
491
  params: { sessionID: Session.ID, key: InstructionEntry.Key },
492
492
  success: HttpApiSchema.NoContent,
493
493
  error: SessionNotFoundError,
494
494
  })
495
495
  .middleware(sessionLocationMiddleware)
496
496
  .annotateMerge(OpenApi.annotations({
497
- identifier: "session.instructions.entry.remove",
497
+ identifier: "experimental.session.instructions.entry.remove",
498
498
  summary: "Remove instruction entry",
499
499
  description: "Remove one instruction entry; the removal is announced to the model at the next step boundary.",
500
500
  })))
@@ -559,7 +559,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
559
559
  success: Schema.Struct({ data: PublicSessionMessage }),
560
560
  error: [SessionNotFoundError, MessageNotFoundError],
561
561
  }).annotateMerge(OpenApi.annotations({
562
- identifier: "session.message",
562
+ identifier: "session.message.get",
563
563
  summary: "Get session message",
564
564
  description: "Retrieve one projected message owned by the Session.",
565
565
  })))
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-19613",
4
+ "version": "0.0.0-dev-19617",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "typecheck": "tsgo --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@opencode/schema": "0.0.0-dev-19613",
35
+ "@opencode/schema": "0.0.0-dev-19617",
36
36
  "effect": "4.0.0-rc.112"
37
37
  },
38
38
  "devDependencies": {