@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 +3 -3
- package/dist/client.js +3 -3
- package/dist/groups/event.d.ts +5 -5
- package/dist/groups/session.d.ts +6 -6
- package/dist/groups/session.js +16 -16
- package/package.json +2 -2
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.
|
|
63
|
-
readonly "session.
|
|
64
|
-
readonly "session.
|
|
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.
|
|
50
|
-
"session.
|
|
51
|
-
"session.
|
|
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",
|
package/dist/groups/event.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
11160
|
+
type: "session.instructions.updated";
|
|
11161
11161
|
durability: "durable";
|
|
11162
11162
|
durable: {
|
|
11163
11163
|
readonly version: number;
|
package/dist/groups/session.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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">;
|
package/dist/groups/session.js
CHANGED
|
@@ -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 {
|
|
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.
|
|
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(
|
|
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.
|
|
339
|
-
summary: "List
|
|
340
|
-
description: "List API-managed
|
|
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.
|
|
343
|
-
params: { sessionID: Session.ID, 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.
|
|
351
|
-
summary: "Put
|
|
352
|
-
description: "Attach or replace one durable
|
|
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.
|
|
355
|
-
params: { sessionID: Session.ID, 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.
|
|
362
|
-
summary: "Remove
|
|
363
|
-
description: "Remove one
|
|
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-
|
|
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-
|
|
29
|
+
"@opencode-ai/schema": "0.0.0-next-14993",
|
|
30
30
|
"effect": "4.0.0-beta.83"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|