@opencode-ai/protocol 0.0.0-next-17335 → 0.0.0-next-17346

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.
@@ -1,6 +1,6 @@
1
1
  import { SessionMessage } from "@opencode-ai/schema/session-message";
2
2
  import { SessionTransfer } from "@opencode-ai/schema/session-transfer";
3
- import { SessionPending } from "@opencode-ai/schema/session-pending";
3
+ import { SessionInbox } from "@opencode-ai/schema/session-inbox";
4
4
  import { PromptInput } from "@opencode-ai/schema/prompt-input";
5
5
  import { Session } from "@opencode-ai/schema/session";
6
6
  import { InstructionEntry } from "@opencode-ai/schema/instruction-entry";
@@ -218,7 +218,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
218
218
  })))
219
219
  .add(HttpApiEndpoint.post("session.move", "/api/session/:sessionID/move", {
220
220
  params: { sessionID: Session.ID },
221
- payload: Location.Ref,
221
+ payload: Schema.Struct({ ...Location.Ref.fields, delivery: SessionInbox.Delivery.pipe(Schema.optional) }),
222
222
  success: HttpApiSchema.NoContent,
223
223
  error: [SessionNotFoundError, InvalidRequestError],
224
224
  }).annotateMerge(OpenApi.annotations({
@@ -231,11 +231,11 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
231
231
  payload: Schema.Struct({
232
232
  id: SessionMessage.ID.pipe(Schema.optional),
233
233
  ...PromptInput.Prompt.fields,
234
- metadata: SessionPending.UserData.fields.metadata,
235
- delivery: SessionPending.Delivery.pipe(Schema.optional),
234
+ metadata: SessionInbox.UserPayload.fields.metadata,
235
+ delivery: SessionInbox.Delivery.pipe(Schema.optional),
236
236
  resume: Schema.Boolean.pipe(Schema.optional),
237
237
  }),
238
- success: Schema.Struct({ data: SessionPending.User }),
238
+ success: Schema.Struct({ data: SessionInbox.User }),
239
239
  error: [ConflictError, InvalidRequestError, SessionNotFoundError],
240
240
  })
241
241
  .middleware(sessionLocationMiddleware)
@@ -255,10 +255,10 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
255
255
  files: PromptInput.Prompt.fields.files,
256
256
  agents: PromptInput.Prompt.fields.agents,
257
257
  skills: PromptInput.Prompt.fields.skills,
258
- delivery: SessionPending.Delivery.pipe(Schema.optional),
258
+ delivery: SessionInbox.Delivery.pipe(Schema.optional),
259
259
  resume: Schema.Boolean.pipe(Schema.optional),
260
260
  }),
261
- success: Schema.Struct({ data: SessionPending.User }),
261
+ success: Schema.Struct({ data: SessionInbox.User }),
262
262
  error: [ConflictError, InvalidRequestError, SessionNotFoundError, CommandNotFoundError, CommandEvaluationError],
263
263
  })
264
264
  .middleware(sessionLocationMiddleware)
@@ -290,10 +290,10 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
290
290
  text: Schema.String,
291
291
  description: Schema.String.pipe(Schema.optional),
292
292
  metadata: SessionMessage.Synthetic.fields.metadata,
293
- delivery: SessionPending.Delivery.pipe(Schema.optional),
293
+ delivery: SessionInbox.Delivery.pipe(Schema.optional),
294
294
  resume: Schema.Boolean.pipe(Schema.optional),
295
295
  }),
296
- success: Schema.Struct({ data: SessionPending.Synthetic }),
296
+ success: Schema.Struct({ data: SessionInbox.Synthetic }),
297
297
  error: [ConflictError, SessionNotFoundError],
298
298
  })
299
299
  .middleware(sessionLocationMiddleware)
@@ -319,8 +319,11 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
319
319
  })))
320
320
  .add(HttpApiEndpoint.post("session.compact", "/api/session/:sessionID/compact", {
321
321
  params: { sessionID: Session.ID },
322
- payload: Schema.Struct({ id: SessionMessage.ID.pipe(Schema.optional) }),
323
- success: Schema.Struct({ data: SessionPending.Compaction }),
322
+ payload: Schema.Struct({
323
+ id: SessionMessage.ID.pipe(Schema.optional),
324
+ delivery: SessionInbox.Delivery.pipe(Schema.optional),
325
+ }),
326
+ success: Schema.Struct({ data: SessionInbox.Compaction }),
324
327
  error: [ConflictError, SessionNotFoundError],
325
328
  })
326
329
  .middleware(sessionLocationMiddleware)
@@ -375,41 +378,41 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
375
378
  summary: "Get session context",
376
379
  description: "Retrieve the active context messages for a session (all messages after the last compaction).",
377
380
  })))
378
- .add(HttpApiEndpoint.get("session.pending.list", "/api/session/:sessionID/pending", {
381
+ .add(HttpApiEndpoint.get("session.inbox.list", "/api/session/:sessionID/inbox", {
379
382
  params: { sessionID: Session.ID },
380
- success: Schema.Struct({ data: Schema.Array(SessionPending.Info) }),
383
+ success: Schema.Struct({ data: Schema.Array(SessionInbox.Info) }),
381
384
  error: SessionNotFoundError,
382
385
  }).annotateMerge(OpenApi.annotations({
383
- identifier: "v2.session.pending.list",
384
- summary: "List pending session work",
385
- description: "List durable admitted session work not yet visible in projected history, ordered by admission. Includes unpromoted user and synthetic inputs and unhandled compaction barriers. The runner owns consumption; items disappear once promoted or handled.",
386
+ identifier: "v2.session.inbox.list",
387
+ summary: "List session inbox",
388
+ description: "List durable enqueued session work not yet delivered, ordered by enqueue sequence. Includes user, synthetic, compaction, and move items.",
386
389
  })))
387
- .add(HttpApiEndpoint.delete("session.pending.cancel", "/api/session/:sessionID/pending/:inputID", {
388
- params: { sessionID: Session.ID, inputID: SessionMessage.ID },
390
+ .add(HttpApiEndpoint.delete("session.inbox.cancel", "/api/session/:sessionID/inbox/:inboxID", {
391
+ params: { sessionID: Session.ID, inboxID: SessionMessage.ID },
389
392
  success: HttpApiSchema.NoContent,
390
393
  error: [ConflictError, SessionNotFoundError],
391
394
  }).annotateMerge(OpenApi.annotations({
392
- identifier: "v2.session.pending.cancel",
393
- summary: "Cancel pending input",
394
- description: "Cancel an input that has not yet been promoted into session history.",
395
+ identifier: "v2.session.inbox.cancel",
396
+ summary: "Cancel inbox input",
397
+ description: "Cancel an inbox item that has not yet been delivered.",
395
398
  })))
396
- .add(HttpApiEndpoint.post("session.pending.steer", "/api/session/:sessionID/pending/:inputID/steer", {
397
- params: { sessionID: Session.ID, inputID: SessionMessage.ID },
399
+ .add(HttpApiEndpoint.post("session.inbox.steer", "/api/session/:sessionID/inbox/:inboxID/steer", {
400
+ params: { sessionID: Session.ID, inboxID: SessionMessage.ID },
398
401
  success: HttpApiSchema.NoContent,
399
402
  error: [ConflictError, SessionNotFoundError],
400
403
  }).annotateMerge(OpenApi.annotations({
401
- identifier: "v2.session.pending.steer",
402
- summary: "Steer queued input",
403
- description: "Change a queued input to steer delivery and wake session execution.",
404
+ identifier: "v2.session.inbox.steer",
405
+ summary: "Steer queued item",
406
+ description: "Change a queued inbox item to steer delivery and wake session execution.",
404
407
  })))
405
- .add(HttpApiEndpoint.post("session.pending.queue", "/api/session/:sessionID/pending/:inputID/queue", {
406
- params: { sessionID: Session.ID, inputID: SessionMessage.ID },
408
+ .add(HttpApiEndpoint.post("session.inbox.queue", "/api/session/:sessionID/inbox/:inboxID/queue", {
409
+ params: { sessionID: Session.ID, inboxID: SessionMessage.ID },
407
410
  success: HttpApiSchema.NoContent,
408
411
  error: [ConflictError, SessionNotFoundError],
409
412
  }).annotateMerge(OpenApi.annotations({
410
- identifier: "v2.session.pending.queue",
411
- summary: "Queue pending steer",
412
- description: "Change a pending steer to queued delivery.",
413
+ identifier: "v2.session.inbox.queue",
414
+ summary: "Queue steered item",
415
+ description: "Change a steered inbox item to queued delivery.",
413
416
  })))
414
417
  .add(HttpApiEndpoint.get("session.instructions.entry.list", "/api/session/:sessionID/instructions/entries", {
415
418
  params: { sessionID: Session.ID },
@@ -484,7 +487,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
484
487
  .annotateMerge(OpenApi.annotations({
485
488
  identifier: "v2.session.interrupt",
486
489
  summary: "Interrupt session execution",
487
- description: "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op. When continue=true, execution resumes if durable pending work remains after interruption.",
490
+ description: "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op. When continue=true, execution resumes if durable inbox work remains after interruption.",
488
491
  })))
489
492
  .add(HttpApiEndpoint.post("session.background", "/api/session/:sessionID/background", {
490
493
  params: { sessionID: Session.ID },
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-17335",
4
+ "version": "0.0.0-next-17346",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "typecheck": "tsgo --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@opencode-ai/schema": "0.0.0-next-17335",
31
+ "@opencode-ai/schema": "0.0.0-next-17346",
32
32
  "effect": "4.0.0-beta.101"
33
33
  },
34
34
  "devDependencies": {