@opencode-ai/protocol 0.0.0-next-15174 → 0.0.0-next-15180

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.
@@ -213,11 +213,12 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
213
213
  params: { sessionID: Session.ID },
214
214
  payload: Schema.Struct({
215
215
  id: SessionMessage.ID.pipe(Schema.optional),
216
- prompt: PromptInput.Prompt,
216
+ ...PromptInput.Prompt.fields,
217
+ metadata: SessionInput.UserData.fields.metadata,
217
218
  delivery: SessionInput.Delivery.pipe(Schema.optional),
218
219
  resume: Schema.Boolean.pipe(Schema.optional),
219
220
  }),
220
- success: Schema.Struct({ data: SessionInput.Admitted }),
221
+ success: Schema.Struct({ data: SessionInput.User }),
221
222
  error: [ConflictError, InvalidRequestError, SessionNotFoundError],
222
223
  })
223
224
  .middleware(sessionLocationMiddleware)
@@ -239,7 +240,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
239
240
  delivery: SessionInput.Delivery.pipe(Schema.optional),
240
241
  resume: Schema.Boolean.pipe(Schema.optional),
241
242
  }),
242
- success: Schema.Struct({ data: SessionInput.Admitted }),
243
+ success: Schema.Struct({ data: SessionInput.User }),
243
244
  error: [ConflictError, InvalidRequestError, SessionNotFoundError, CommandNotFoundError, CommandEvaluationError],
244
245
  })
245
246
  .middleware(sessionLocationMiddleware)
@@ -267,19 +268,21 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
267
268
  .add(HttpApiEndpoint.post("session.synthetic", "/api/session/:sessionID/synthetic", {
268
269
  params: { sessionID: Session.ID },
269
270
  payload: Schema.Struct({
271
+ id: SessionMessage.ID.pipe(Schema.optional),
270
272
  text: Schema.String,
271
273
  description: Schema.String.pipe(Schema.optional),
272
274
  metadata: SessionMessage.Synthetic.fields.metadata,
275
+ delivery: SessionInput.Delivery.pipe(Schema.optional),
273
276
  resume: Schema.Boolean.pipe(Schema.optional),
274
277
  }),
275
- success: HttpApiSchema.NoContent,
276
- error: SessionNotFoundError,
278
+ success: Schema.Struct({ data: SessionInput.Synthetic }),
279
+ error: [ConflictError, SessionNotFoundError],
277
280
  })
278
281
  .middleware(sessionLocationMiddleware)
279
282
  .annotateMerge(OpenApi.annotations({
280
283
  identifier: "v2.session.synthetic",
281
284
  summary: "Add synthetic message",
282
- description: "Append a synthetic message to a session and resume execution.",
285
+ description: "Durably admit synthetic session input and schedule execution unless resume is false.",
283
286
  })))
284
287
  .add(HttpApiEndpoint.post("session.shell", "/api/session/:sessionID/shell", {
285
288
  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-15174",
4
+ "version": "0.0.0-next-15180",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsgo --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@opencode-ai/schema": "0.0.0-next-15174",
29
+ "@opencode-ai/schema": "0.0.0-next-15180",
30
30
  "effect": "4.0.0-beta.83"
31
31
  },
32
32
  "devDependencies": {