@opencode-ai/protocol 0.0.0-next-15718 → 0.0.0-next-15747

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.
@@ -400,6 +400,20 @@ export const makeSessionGroup = (sessionLocationMiddleware) => HttpApiGroup.make
400
400
  identifier: "v2.session.instructions.entry.remove",
401
401
  summary: "Remove instruction entry",
402
402
  description: "Remove one instruction entry; the removal is announced to the model at the next step boundary.",
403
+ })))
404
+ .add(HttpApiEndpoint.post("session.generate", "/api/session/:sessionID/generate", {
405
+ params: { sessionID: Session.ID },
406
+ payload: Schema.Struct({ prompt: Schema.String }),
407
+ success: Schema.Struct({
408
+ data: Schema.Struct({ text: Schema.String }),
409
+ }).annotate({ identifier: "SessionGenerateResponse" }),
410
+ error: [SessionNotFoundError, ServiceUnavailableError],
411
+ })
412
+ .middleware(sessionLocationMiddleware)
413
+ .annotateMerge(OpenApi.annotations({
414
+ identifier: "v2.session.generate",
415
+ summary: "Generate text from session context",
416
+ description: "Generate transient text from the current session context without mutating session history.",
403
417
  })))
404
418
  .add(HttpApiEndpoint.get("session.log", "/api/experimental/session/:sessionID/log", {
405
419
  params: { sessionID: Session.ID },
@@ -2,12 +2,12 @@ import { Location } from "@opencode-ai/schema/location";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
4
4
  import { ShellNotFoundError } from "../errors.js";
5
- export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpApiEndpoint.HttpApiEndpoint<"shell.list", "GET", "/api/shell", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
5
+ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpApiEndpoint.HttpApiEndpoint<"shell.list", "GET", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
6
6
  readonly location: Schema.optional<Schema.Struct<{
7
7
  readonly directory: Schema.optional<Schema.String>;
8
8
  readonly workspace: Schema.optional<Schema.String>;
9
9
  }>>;
10
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
10
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
11
11
  readonly location: typeof Location.Info;
12
12
  readonly data: Schema.$Array<Schema.Struct<{
13
13
  readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
@@ -27,17 +27,17 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
27
27
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
28
28
  }>;
29
29
  }>>;
30
- }>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.create", "POST", "/api/shell", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
30
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.create", "POST", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
31
31
  readonly location: Schema.optional<Schema.Struct<{
32
32
  readonly directory: Schema.optional<Schema.String>;
33
33
  readonly workspace: Schema.optional<Schema.String>;
34
34
  }>>;
35
- }>>, HttpApiEndpoint.Json<Schema.Struct<{
35
+ }>>, Schema.toCodecJson<Schema.Struct<{
36
36
  readonly command: Schema.String;
37
37
  readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
38
38
  readonly timeout: Schema.Int;
39
39
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
40
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
40
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
41
41
  readonly location: typeof Location.Info;
42
42
  readonly data: Schema.Struct<{
43
43
  readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
@@ -57,17 +57,17 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
57
57
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
58
58
  }>;
59
59
  }>;
60
- }>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.get", "GET", "/api/shell/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
60
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.get", "GET", "/api/shell/:id", Schema.toCodecStringTree<Schema.Struct<{
61
61
  id: Schema.brand<Schema.String, "Shell.ID"> & {
62
62
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
63
63
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
64
64
  };
65
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
65
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
66
66
  readonly location: Schema.optional<Schema.Struct<{
67
67
  readonly directory: Schema.optional<Schema.String>;
68
68
  readonly workspace: Schema.optional<Schema.String>;
69
69
  }>>;
70
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
70
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
71
71
  readonly location: typeof Location.Info;
72
72
  readonly data: Schema.Struct<{
73
73
  readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
@@ -87,19 +87,19 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
87
87
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
88
88
  }>;
89
89
  }>;
90
- }>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.timeout", "PATCH", "/api/shell/:id/timeout", HttpApiEndpoint.StringTree<Schema.Struct<{
90
+ }>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.timeout", "PATCH", "/api/shell/:id/timeout", Schema.toCodecStringTree<Schema.Struct<{
91
91
  id: Schema.brand<Schema.String, "Shell.ID"> & {
92
92
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
93
93
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
94
94
  };
95
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
95
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
96
96
  readonly location: Schema.optional<Schema.Struct<{
97
97
  readonly directory: Schema.optional<Schema.String>;
98
98
  readonly workspace: Schema.optional<Schema.String>;
99
99
  }>>;
100
- }>>, HttpApiEndpoint.Json<Schema.Struct<{
100
+ }>>, Schema.toCodecJson<Schema.Struct<{
101
101
  readonly timeout: Schema.Int;
102
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
102
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
103
103
  readonly location: typeof Location.Info;
104
104
  readonly data: Schema.Struct<{
105
105
  readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
@@ -119,19 +119,19 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
119
119
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
120
120
  }>;
121
121
  }>;
122
- }>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", HttpApiEndpoint.StringTree<Schema.Struct<{
122
+ }>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", Schema.toCodecStringTree<Schema.Struct<{
123
123
  id: Schema.brand<Schema.String, "Shell.ID"> & {
124
124
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
125
125
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
126
126
  };
127
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
127
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
128
128
  readonly cursor: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
129
129
  readonly limit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
130
130
  readonly location: Schema.optional<Schema.Struct<{
131
131
  readonly directory: Schema.optional<Schema.String>;
132
132
  readonly workspace: Schema.optional<Schema.String>;
133
133
  }>>;
134
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
134
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
135
135
  readonly location: typeof Location.Info;
136
136
  readonly data: Schema.Struct<{
137
137
  readonly output: Schema.String;
@@ -139,14 +139,14 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
139
139
  readonly size: Schema.Int;
140
140
  readonly truncated: Schema.Boolean;
141
141
  }>;
142
- }>>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.remove", "DELETE", "/api/shell/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
142
+ }>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.remove", "DELETE", "/api/shell/:id", Schema.toCodecStringTree<Schema.Struct<{
143
143
  id: Schema.brand<Schema.String, "Shell.ID"> & {
144
144
  create: () => string & import("effect/Brand").Brand<"Shell.ID">;
145
145
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
146
146
  };
147
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
147
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
148
148
  readonly location: Schema.optional<Schema.Struct<{
149
149
  readonly directory: Schema.optional<Schema.String>;
150
150
  readonly workspace: Schema.optional<Schema.String>;
151
151
  }>>;
152
- }>>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<typeof ShellNotFoundError>, never, never>, false>;
152
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never>, false>;
@@ -1,12 +1,12 @@
1
1
  import { Location } from "@opencode-ai/schema/location";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
- export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpApiEndpoint.HttpApiEndpoint<"skill.list", "GET", "/api/skill", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
4
+ export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpApiEndpoint.HttpApiEndpoint<"skill.list", "GET", "/api/skill", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
6
6
  readonly directory: Schema.optional<Schema.String>;
7
7
  readonly workspace: Schema.optional<Schema.String>;
8
8
  }>>;
9
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
9
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
10
10
  readonly location: typeof Location.Info;
11
11
  readonly data: Schema.$Array<Schema.Struct<{
12
12
  readonly id: Schema.brand<Schema.String, "Skill.ID">;
@@ -17,4 +17,4 @@ export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpA
17
17
  readonly location: Schema.brand<Schema.String, "AbsolutePath">;
18
18
  readonly content: Schema.String;
19
19
  }>>;
20
- }>>, HttpApiEndpoint.Json<never>, never, never>, false>;
20
+ }>>, never, never, never>, false>;
@@ -1,12 +1,12 @@
1
1
  import { Location } from "@opencode-ai/schema/location";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
- export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEndpoint.HttpApiEndpoint<"vcs.status", "GET", "/api/vcs/status", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
4
+ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEndpoint.HttpApiEndpoint<"vcs.status", "GET", "/api/vcs/status", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
6
6
  readonly directory: Schema.optional<Schema.String>;
7
7
  readonly workspace: Schema.optional<Schema.String>;
8
8
  }>>;
9
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
9
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
10
10
  readonly location: typeof Location.Info;
11
11
  readonly data: Schema.$Array<Schema.Struct<{
12
12
  readonly file: Schema.String;
@@ -14,14 +14,14 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
14
14
  readonly deletions: Schema.Int;
15
15
  readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
16
16
  }>>;
17
- }>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.diff", "GET", "/api/vcs/diff", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
17
+ }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.diff", "GET", "/api/vcs/diff", never, Schema.toCodecStringTree<Schema.Struct<{
18
18
  readonly mode: Schema.Literals<readonly ["working", "branch"]>;
19
19
  readonly context: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
20
20
  readonly location: Schema.optional<Schema.Struct<{
21
21
  readonly directory: Schema.optional<Schema.String>;
22
22
  readonly workspace: Schema.optional<Schema.String>;
23
23
  }>>;
24
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
24
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
25
25
  readonly location: typeof Location.Info;
26
26
  readonly data: Schema.$Array<Schema.Struct<{
27
27
  readonly file: Schema.String;
@@ -30,4 +30,4 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
30
30
  readonly deletions: Schema.Int;
31
31
  readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
32
32
  }>>;
33
- }>>, HttpApiEndpoint.Json<never>, never, never>, false>;
33
+ }>>, 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-15718",
4
+ "version": "0.0.0-next-15747",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -26,8 +26,8 @@
26
26
  "typecheck": "tsgo --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@opencode-ai/schema": "0.0.0-next-15718",
30
- "effect": "4.0.0-beta.83"
29
+ "@opencode-ai/schema": "0.0.0-next-15747",
30
+ "effect": "4.0.0-beta.98"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@tsconfig/bun": "1.0.9",