@opencode-ai/protocol 0.0.0-next-14989 → 0.0.0-next-14993

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.
package/dist/client.d.ts CHANGED
@@ -59,9 +59,9 @@ export declare const endpointNames: {
59
59
  readonly "integration.attempt.status": "attemptStatus";
60
60
  readonly "integration.attempt.complete": "attemptComplete";
61
61
  readonly "integration.attempt.cancel": "attemptCancel";
62
- readonly "session.context.entry.list": "listContextEntries";
63
- readonly "session.context.entry.put": "putContextEntry";
64
- readonly "session.context.entry.remove": "removeContextEntry";
62
+ readonly "session.instructions.entry.list": readonly ["instructions", "entry", "list"];
63
+ readonly "session.instructions.entry.put": readonly ["instructions", "entry", "put"];
64
+ readonly "session.instructions.entry.remove": readonly ["instructions", "entry", "remove"];
65
65
  readonly "session.revert.stage": "revertStage";
66
66
  readonly "session.revert.clear": "revertClear";
67
67
  readonly "session.revert.commit": "revertCommit";
package/dist/client.js CHANGED
@@ -46,9 +46,9 @@ export const endpointNames = {
46
46
  "integration.attempt.status": "attemptStatus",
47
47
  "integration.attempt.complete": "attemptComplete",
48
48
  "integration.attempt.cancel": "attemptCancel",
49
- "session.context.entry.list": "listContextEntries",
50
- "session.context.entry.put": "putContextEntry",
51
- "session.context.entry.remove": "removeContextEntry",
49
+ "session.instructions.entry.list": ["instructions", "entry", "list"],
50
+ "session.instructions.entry.put": ["instructions", "entry", "put"],
51
+ "session.instructions.entry.remove": ["instructions", "entry", "remove"],
52
52
  "session.revert.stage": "revertStage",
53
53
  "session.revert.clear": "revertClear",
54
54
  "session.revert.commit": "revertCommit",
@@ -1239,7 +1239,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
1239
1239
  };
1240
1240
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1241
1241
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1242
- readonly type: Schema.Literal<"session.context.updated">;
1242
+ readonly type: Schema.Literal<"session.instructions.updated">;
1243
1243
  readonly durable: Schema.Struct<{
1244
1244
  readonly aggregateID: Schema.String;
1245
1245
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
@@ -1272,7 +1272,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
1272
1272
  };
1273
1273
  }>;
1274
1274
  }> & {
1275
- type: "session.context.updated";
1275
+ type: "session.instructions.updated";
1276
1276
  durability: "durable";
1277
1277
  durable: {
1278
1278
  readonly version: number;
@@ -7720,7 +7720,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
7720
7720
  } | {
7721
7721
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
7722
7722
  readonly created: import("effect/DateTime").Utc;
7723
- readonly type: "session.context.updated";
7723
+ readonly type: "session.instructions.updated";
7724
7724
  readonly durable: {
7725
7725
  readonly aggregateID: string;
7726
7726
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
@@ -11124,7 +11124,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
11124
11124
  };
11125
11125
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
11126
11126
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
11127
- readonly type: Schema.Literal<"session.context.updated">;
11127
+ readonly type: Schema.Literal<"session.instructions.updated">;
11128
11128
  readonly durable: Schema.Struct<{
11129
11129
  readonly aggregateID: Schema.String;
11130
11130
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
@@ -11157,7 +11157,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
11157
11157
  };
11158
11158
  }>;
11159
11159
  }> & {
11160
- type: "session.context.updated";
11160
+ type: "session.instructions.updated";
11161
11161
  durability: "durable";
11162
11162
  durable: {
11163
11163
  readonly version: number;
@@ -1808,7 +1808,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1808
1808
  readonly summary: Schema.String;
1809
1809
  readonly recent: Schema.String;
1810
1810
  }>]>>;
1811
- }>>, HttpApiEndpoint.Json<typeof UnknownError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.context.entry.list", "GET", "/api/session/:sessionID/context-entry", HttpApiEndpoint.StringTree<Schema.Struct<{
1811
+ }>>, HttpApiEndpoint.Json<typeof UnknownError | typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.list", "GET", "/api/session/:sessionID/instructions/entries", HttpApiEndpoint.StringTree<Schema.Struct<{
1812
1812
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
1813
1813
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1814
1814
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -1818,7 +1818,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1818
1818
  readonly key: Schema.String;
1819
1819
  readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1820
1820
  }>>;
1821
- }>>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.context.entry.put", "PUT", "/api/session/:sessionID/context-entry/:key", HttpApiEndpoint.StringTree<Schema.Struct<{
1821
+ }>>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.put", "PUT", "/api/session/:sessionID/instructions/entries/:key", HttpApiEndpoint.StringTree<Schema.Struct<{
1822
1822
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
1823
1823
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1824
1824
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -1826,7 +1826,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
1826
1826
  key: Schema.String;
1827
1827
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
1828
1828
  readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
1829
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.context.entry.remove", "DELETE", "/api/session/:sessionID/context-entry/:key", HttpApiEndpoint.StringTree<Schema.Struct<{
1829
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, I, HttpApiMiddleware.Requires<I>> | HttpApiEndpoint.HttpApiEndpoint<"session.instructions.entry.remove", "DELETE", "/api/session/:sessionID/instructions/entries/:key", HttpApiEndpoint.StringTree<Schema.Struct<{
1830
1830
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
1831
1831
  create: () => string & import("effect/Brand").Brand<"SessionID">;
1832
1832
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -2544,7 +2544,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2544
2544
  };
2545
2545
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2546
2546
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2547
- readonly type: Schema.Literal<"session.context.updated">;
2547
+ readonly type: Schema.Literal<"session.instructions.updated">;
2548
2548
  readonly durable: Schema.Struct<{
2549
2549
  readonly aggregateID: Schema.String;
2550
2550
  readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
@@ -2577,7 +2577,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
2577
2577
  };
2578
2578
  }>;
2579
2579
  }> & {
2580
- type: "session.context.updated";
2580
+ type: "session.instructions.updated";
2581
2581
  durability: "durable";
2582
2582
  durable: {
2583
2583
  readonly version: number;
@@ -4381,7 +4381,7 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S>(se
4381
4381
  } | {
4382
4382
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
4383
4383
  readonly created: import("effect/DateTime").Utc;
4384
- readonly type: "session.context.updated";
4384
+ readonly type: "session.instructions.updated";
4385
4385
  readonly durable: {
4386
4386
  readonly aggregateID: string;
4387
4387
  readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
@@ -2,7 +2,7 @@ import { SessionMessage } from "@opencode-ai/schema/session-message";
2
2
  import { SessionInput } from "@opencode-ai/schema/session-input";
3
3
  import { PromptInput } from "@opencode-ai/schema/prompt-input";
4
4
  import { Session } from "@opencode-ai/schema/session";
5
- import { SessionContextEntry } from "@opencode-ai/schema/session-context-entry";
5
+ import { InstructionEntry } from "@opencode-ai/schema/instruction-entry";
6
6
  import { Project } from "@opencode-ai/schema/project";
7
7
  import { AbsolutePath, PositiveInt, RelativePath, statics } from "@opencode-ai/schema/schema";
8
8
  import { Event } from "@opencode-ai/schema/event";
@@ -328,39 +328,39 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
328
328
  summary: "Get session context",
329
329
  description: "Retrieve the active context messages for a session (all messages after the last compaction).",
330
330
  })))
331
- .add(HttpApiEndpoint.get("session.context.entry.list", "/api/session/:sessionID/context-entry", {
331
+ .add(HttpApiEndpoint.get("session.instructions.entry.list", "/api/session/:sessionID/instructions/entries", {
332
332
  params: { sessionID: Session.ID },
333
- success: Schema.Struct({ data: Schema.Array(SessionContextEntry.Info) }),
333
+ success: Schema.Struct({ data: Schema.Array(InstructionEntry.Info) }),
334
334
  error: SessionNotFoundError,
335
335
  })
336
336
  .middleware(sessionLocationMiddleware)
337
337
  .annotateMerge(OpenApi.annotations({
338
- identifier: "v2.session.context.entry.list",
339
- summary: "List context entries",
340
- description: "List API-managed context entries attached to the session's system context.",
338
+ identifier: "v2.session.instructions.entry.list",
339
+ summary: "List instruction entries",
340
+ description: "List API-managed instruction entries attached to the session.",
341
341
  })))
342
- .add(HttpApiEndpoint.put("session.context.entry.put", "/api/session/:sessionID/context-entry/:key", {
343
- params: { sessionID: Session.ID, key: SessionContextEntry.Key },
342
+ .add(HttpApiEndpoint.put("session.instructions.entry.put", "/api/session/:sessionID/instructions/entries/:key", {
343
+ params: { sessionID: Session.ID, key: InstructionEntry.Key },
344
344
  payload: Schema.Struct({ value: Schema.Json }),
345
345
  success: HttpApiSchema.NoContent,
346
346
  error: SessionNotFoundError,
347
347
  })
348
348
  .middleware(sessionLocationMiddleware)
349
349
  .annotateMerge(OpenApi.annotations({
350
- identifier: "v2.session.context.entry.put",
351
- summary: "Put context entry",
352
- description: "Attach or replace one durable context entry. The value is rendered into the session's system context; changes announce as updates at the next turn boundary.",
350
+ identifier: "v2.session.instructions.entry.put",
351
+ summary: "Put instruction entry",
352
+ description: "Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.",
353
353
  })))
354
- .add(HttpApiEndpoint.delete("session.context.entry.remove", "/api/session/:sessionID/context-entry/:key", {
355
- params: { sessionID: Session.ID, key: SessionContextEntry.Key },
354
+ .add(HttpApiEndpoint.delete("session.instructions.entry.remove", "/api/session/:sessionID/instructions/entries/:key", {
355
+ params: { sessionID: Session.ID, key: InstructionEntry.Key },
356
356
  success: HttpApiSchema.NoContent,
357
357
  error: SessionNotFoundError,
358
358
  })
359
359
  .middleware(sessionLocationMiddleware)
360
360
  .annotateMerge(OpenApi.annotations({
361
- identifier: "v2.session.context.entry.remove",
362
- summary: "Remove context entry",
363
- description: "Remove one context entry; the removal is announced to the model at the next turn boundary.",
361
+ identifier: "v2.session.instructions.entry.remove",
362
+ summary: "Remove instruction entry",
363
+ description: "Remove one instruction entry; the removal is announced to the model at the next step boundary.",
364
364
  })))
365
365
  .add(HttpApiEndpoint.get("session.log", "/api/experimental/session/:sessionID/log", {
366
366
  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-14989",
4
+ "version": "0.0.0-next-14993",
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-14989",
29
+ "@opencode-ai/schema": "0.0.0-next-14993",
30
30
  "effect": "4.0.0-beta.83"
31
31
  },
32
32
  "devDependencies": {