@opencode-ai/protocol 0.0.0-next-15090 → 0.0.0-next-15092
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/errors.d.ts +1 -1
- package/dist/errors.js +2 -1
- package/dist/groups/agent.d.ts +10 -8
- package/dist/groups/command.d.ts +5 -5
- package/dist/groups/event.d.ts +506 -391
- package/dist/groups/generate.d.ts +2 -2
- package/dist/groups/message.d.ts +77 -136
- package/dist/groups/message.js +1 -1
- package/dist/groups/model.d.ts +52 -36
- package/dist/groups/permission.d.ts +1 -1
- package/dist/groups/session.d.ts +433 -495
- package/dist/groups/session.js +6 -6
- package/dist/groups/shell.d.ts +24 -24
- package/dist/groups/skill.d.ts +2 -1
- package/dist/groups/vcs.d.ts +5 -5
- package/package.json +2 -2
package/dist/groups/session.js
CHANGED
|
@@ -11,9 +11,9 @@ import { Context, Effect, Encoding, Result, Schema, SchemaGetter, Struct } from
|
|
|
11
11
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
12
12
|
import { ConflictError, CommandEvaluationError, CommandNotFoundError, InvalidCursorError, InvalidRequestError, MessageNotFoundError, ServiceUnavailableError, SessionBusyError, SessionNotFoundError, SkillNotFoundError, UnknownError, } from "../errors.js";
|
|
13
13
|
import { Agent } from "@opencode-ai/schema/agent";
|
|
14
|
+
import { Skill } from "@opencode-ai/schema/skill";
|
|
14
15
|
import { Model } from "@opencode-ai/schema/model";
|
|
15
16
|
import { Location } from "@opencode-ai/schema/location";
|
|
16
|
-
import { Revert } from "@opencode-ai/schema/revert";
|
|
17
17
|
import { SessionEvent } from "@opencode-ai/schema/session-event";
|
|
18
18
|
import { EventLog } from "@opencode-ai/schema/event-log";
|
|
19
19
|
const ParentIDFilter = Schema.Union([
|
|
@@ -232,7 +232,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
232
232
|
id: SessionMessage.ID.pipe(Schema.optional),
|
|
233
233
|
command: Schema.String,
|
|
234
234
|
arguments: Schema.String.pipe(Schema.optional),
|
|
235
|
-
agent:
|
|
235
|
+
agent: Agent.ID.pipe(Schema.optional),
|
|
236
236
|
model: Model.Ref.pipe(Schema.optional),
|
|
237
237
|
files: PromptInput.Prompt.fields.files,
|
|
238
238
|
agents: PromptInput.Prompt.fields.agents,
|
|
@@ -252,7 +252,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
252
252
|
params: { sessionID: Session.ID },
|
|
253
253
|
payload: Schema.Struct({
|
|
254
254
|
id: SessionMessage.ID.pipe(Schema.optional),
|
|
255
|
-
skill:
|
|
255
|
+
skill: Skill.ID,
|
|
256
256
|
resume: Schema.Boolean.pipe(Schema.optional),
|
|
257
257
|
}),
|
|
258
258
|
success: HttpApiSchema.NoContent,
|
|
@@ -322,7 +322,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
322
322
|
.add(HttpApiEndpoint.post("session.revert.stage", "/api/session/:sessionID/revert/stage", {
|
|
323
323
|
params: { sessionID: Session.ID },
|
|
324
324
|
payload: Schema.Struct({ messageID: SessionMessage.ID, files: Schema.Boolean.pipe(Schema.optional) }),
|
|
325
|
-
success: Schema.Struct({ data: Revert
|
|
325
|
+
success: Schema.Struct({ data: Session.Revert }),
|
|
326
326
|
error: [MessageNotFoundError, SessionNotFoundError, SessionBusyError, UnknownError],
|
|
327
327
|
})
|
|
328
328
|
.middleware(sessionLocationMiddleware)
|
|
@@ -347,7 +347,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
347
347
|
.annotateMerge(OpenApi.annotations({ identifier: "v2.session.revert.commit", summary: "Commit staged revert" })))
|
|
348
348
|
.add(HttpApiEndpoint.get("session.context", "/api/session/:sessionID/context", {
|
|
349
349
|
params: { sessionID: Session.ID },
|
|
350
|
-
success: Schema.Struct({ data: Schema.Array(SessionMessage.
|
|
350
|
+
success: Schema.Struct({ data: Schema.Array(SessionMessage.Info) }),
|
|
351
351
|
error: [SessionNotFoundError, UnknownError],
|
|
352
352
|
})
|
|
353
353
|
.middleware(sessionLocationMiddleware)
|
|
@@ -431,7 +431,7 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
|
|
|
431
431
|
})))
|
|
432
432
|
.add(HttpApiEndpoint.get("session.message", "/api/session/:sessionID/message/:messageID", {
|
|
433
433
|
params: { sessionID: Session.ID, messageID: SessionMessage.ID },
|
|
434
|
-
success: Schema.Struct({ data: SessionMessage.
|
|
434
|
+
success: Schema.Struct({ data: SessionMessage.Info }),
|
|
435
435
|
error: [SessionNotFoundError, MessageNotFoundError],
|
|
436
436
|
})
|
|
437
437
|
.middleware(sessionLocationMiddleware)
|
package/dist/groups/shell.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
10
10
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
11
11
|
readonly location: typeof Location.Info;
|
|
12
12
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
13
|
-
readonly id: Schema.brand<Schema.String, "
|
|
14
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
15
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
13
|
+
readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
14
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
15
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
16
16
|
};
|
|
17
17
|
readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
|
|
18
18
|
readonly command: Schema.String;
|
|
@@ -40,9 +40,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
40
40
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
41
41
|
readonly location: typeof Location.Info;
|
|
42
42
|
readonly data: Schema.Struct<{
|
|
43
|
-
readonly id: Schema.brand<Schema.String, "
|
|
44
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
45
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
43
|
+
readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
44
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
45
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
46
46
|
};
|
|
47
47
|
readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
|
|
48
48
|
readonly command: Schema.String;
|
|
@@ -58,9 +58,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
58
58
|
}>;
|
|
59
59
|
}>;
|
|
60
60
|
}>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.get", "GET", "/api/shell/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
61
|
-
id: Schema.brand<Schema.String, "
|
|
62
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
63
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
61
|
+
id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
62
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
63
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
64
64
|
};
|
|
65
65
|
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
66
66
|
readonly location: Schema.optional<Schema.Struct<{
|
|
@@ -70,9 +70,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
70
70
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
71
71
|
readonly location: typeof Location.Info;
|
|
72
72
|
readonly data: Schema.Struct<{
|
|
73
|
-
readonly id: Schema.brand<Schema.String, "
|
|
74
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
75
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
73
|
+
readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
74
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
75
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
76
76
|
};
|
|
77
77
|
readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
|
|
78
78
|
readonly command: Schema.String;
|
|
@@ -88,9 +88,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
88
88
|
}>;
|
|
89
89
|
}>;
|
|
90
90
|
}>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.timeout", "PATCH", "/api/shell/:id/timeout", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
91
|
-
id: Schema.brand<Schema.String, "
|
|
92
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
93
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
91
|
+
id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
92
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
93
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
94
94
|
};
|
|
95
95
|
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
96
96
|
readonly location: Schema.optional<Schema.Struct<{
|
|
@@ -102,9 +102,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
102
102
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
103
103
|
readonly location: typeof Location.Info;
|
|
104
104
|
readonly data: Schema.Struct<{
|
|
105
|
-
readonly id: Schema.brand<Schema.String, "
|
|
106
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
107
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
105
|
+
readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
106
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
107
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
108
108
|
};
|
|
109
109
|
readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
|
|
110
110
|
readonly command: Schema.String;
|
|
@@ -120,9 +120,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
120
120
|
}>;
|
|
121
121
|
}>;
|
|
122
122
|
}>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
123
|
-
id: Schema.brand<Schema.String, "
|
|
124
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
125
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
123
|
+
id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
124
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
125
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
126
126
|
};
|
|
127
127
|
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
128
128
|
readonly cursor: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -140,9 +140,9 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
140
140
|
readonly truncated: Schema.Boolean;
|
|
141
141
|
}>;
|
|
142
142
|
}>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.remove", "DELETE", "/api/shell/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
143
|
-
id: Schema.brand<Schema.String, "
|
|
144
|
-
create: () => string & import("effect/Brand").Brand<"
|
|
145
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"
|
|
143
|
+
id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
144
|
+
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
145
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
146
146
|
};
|
|
147
147
|
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
148
148
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/skill.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpA
|
|
|
9
9
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
10
10
|
readonly location: typeof Location.Info;
|
|
11
11
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
12
|
-
readonly
|
|
12
|
+
readonly id: Schema.brand<Schema.String, "Skill.ID">;
|
|
13
|
+
readonly name: Schema.brand<Schema.String, "Skill.Name">;
|
|
13
14
|
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14
15
|
readonly slash: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
15
16
|
readonly autoinvoke: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
package/dist/groups/vcs.d.ts
CHANGED
|
@@ -24,10 +24,10 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
|
|
|
24
24
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
25
25
|
readonly location: typeof Location.Info;
|
|
26
26
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
27
|
-
readonly file: Schema.
|
|
28
|
-
readonly patch: Schema.
|
|
29
|
-
readonly additions: Schema.
|
|
30
|
-
readonly deletions: Schema.
|
|
31
|
-
readonly status: Schema.
|
|
27
|
+
readonly file: Schema.String;
|
|
28
|
+
readonly patch: Schema.String;
|
|
29
|
+
readonly additions: Schema.Int;
|
|
30
|
+
readonly deletions: Schema.Int;
|
|
31
|
+
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
32
32
|
}>>;
|
|
33
33
|
}>>, HttpApiEndpoint.Json<never>, never, never>, false>;
|
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-15092",
|
|
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-15092",
|
|
30
30
|
"effect": "4.0.0-beta.83"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|