@opencode/protocol 2.0.26 → 2.0.28

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.
Files changed (71) hide show
  1. package/dist/api.d.ts +1 -1
  2. package/dist/api.js +1 -1
  3. package/dist/client.d.ts +1 -1
  4. package/dist/client.js +1 -1
  5. package/dist/groups/agent.d.ts +3 -1
  6. package/dist/groups/agent.js +1 -1
  7. package/dist/groups/command.d.ts +1 -1
  8. package/dist/groups/command.js +1 -1
  9. package/dist/groups/config.d.ts +1 -1
  10. package/dist/groups/config.js +1 -1
  11. package/dist/groups/credential.d.ts +1 -1
  12. package/dist/groups/credential.js +1 -1
  13. package/dist/groups/debug.d.ts +1 -1
  14. package/dist/groups/debug.js +1 -1
  15. package/dist/groups/event.d.ts +19 -14
  16. package/dist/groups/event.js +1 -1
  17. package/dist/groups/form.d.ts +1 -1
  18. package/dist/groups/form.js +1 -1
  19. package/dist/groups/fs.d.ts +2 -2
  20. package/dist/groups/fs.js +2 -1
  21. package/dist/groups/generate.d.ts +1 -1
  22. package/dist/groups/generate.js +1 -1
  23. package/dist/groups/integration.d.ts +1 -1
  24. package/dist/groups/integration.js +1 -1
  25. package/dist/groups/location.d.ts +1 -1
  26. package/dist/groups/location.js +1 -1
  27. package/dist/groups/mcp.d.ts +1 -1
  28. package/dist/groups/mcp.js +1 -1
  29. package/dist/groups/message.d.ts +39 -1
  30. package/dist/groups/message.js +1 -1
  31. package/dist/groups/migration.d.ts +1 -1
  32. package/dist/groups/migration.js +1 -1
  33. package/dist/groups/model.d.ts +13 -1
  34. package/dist/groups/model.js +1 -1
  35. package/dist/groups/permission.d.ts +1 -1
  36. package/dist/groups/permission.js +1 -1
  37. package/dist/groups/persistent-pty.d.ts +1 -1
  38. package/dist/groups/persistent-pty.js +1 -1
  39. package/dist/groups/plugin.d.ts +1 -1
  40. package/dist/groups/plugin.js +1 -1
  41. package/dist/groups/project.d.ts +6 -2
  42. package/dist/groups/project.js +8 -3
  43. package/dist/groups/provider.d.ts +39 -1
  44. package/dist/groups/provider.js +1 -1
  45. package/dist/groups/pty.d.ts +1 -1
  46. package/dist/groups/pty.js +1 -1
  47. package/dist/groups/reference.d.ts +1 -1
  48. package/dist/groups/reference.js +1 -1
  49. package/dist/groups/rpc.d.ts +1 -1
  50. package/dist/groups/rpc.js +1 -1
  51. package/dist/groups/server.d.ts +1 -1
  52. package/dist/groups/server.js +1 -1
  53. package/dist/groups/session.d.ts +145 -3
  54. package/dist/groups/session.js +12 -10
  55. package/dist/groups/shell.d.ts +1 -1
  56. package/dist/groups/shell.js +1 -1
  57. package/dist/groups/skill.d.ts +1 -1
  58. package/dist/groups/skill.js +1 -1
  59. package/dist/groups/vcs.d.ts +1 -1
  60. package/dist/groups/vcs.js +1 -1
  61. package/dist/groups/websearch.d.ts +1 -1
  62. package/dist/groups/websearch.js +1 -1
  63. package/dist/groups/worktree.d.ts +1 -1
  64. package/dist/groups/worktree.js +1 -1
  65. package/dist/middleware/authorization.d.ts +1 -1
  66. package/dist/middleware/authorization.js +1 -1
  67. package/dist/middleware/schema-error.d.ts +1 -1
  68. package/dist/middleware/schema-error.js +1 -1
  69. package/dist/simulation.d.ts +1 -1
  70. package/dist/simulation.js +1 -1
  71. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import { Model } from "@opencode/schema/model";
2
2
  import { Location } from "@opencode/schema/location";
3
3
  import { Schema } from "effect";
4
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
5
  import { ServiceUnavailableError } from "../errors.js";
6
6
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
7
7
  export const ModelGroup = HttpApiGroup.make("server.model")
@@ -1,5 +1,5 @@
1
1
  import { Context, Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
3
3
  import { LocationNotFoundError, PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
4
4
  export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
@@ -5,7 +5,7 @@ import { PermissionSaved } from "@opencode/schema/permission-saved";
5
5
  import { Project } from "@opencode/schema/project";
6
6
  import { Session } from "@opencode/schema/session";
7
7
  import { Context, Schema } from "effect";
8
- import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
8
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
9
9
  import { LocationNotFoundError, PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
10
10
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
11
11
  export const makePermissionGroup = (locationMiddleware, sessionLocationMiddleware) => HttpApiGroup.make("server.permission")
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
3
  import { ForbiddenError, InvalidRequestError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
4
4
  import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "./pty.js";
5
5
  export { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE };
@@ -3,7 +3,7 @@ import { Pty } from "@opencode/schema/pty";
3
3
  import { PtyTicket } from "@opencode/schema/pty-ticket";
4
4
  import { Session } from "@opencode/schema/session";
5
5
  import { Schema } from "effect";
6
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
6
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
7
7
  import { ForbiddenError, InvalidRequestError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
8
8
  import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "./pty.js";
9
9
  export { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE };
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
3
  import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
4
4
  export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
@@ -1,7 +1,7 @@
1
1
  import { Location } from "@opencode/schema/location";
2
2
  import { Plugin } from "@opencode/schema/plugin";
3
3
  import { Schema } from "effect";
4
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
4
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
5
5
  import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
6
6
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
7
7
  export const PluginGroup = HttpApiGroup.make("server.plugin")
@@ -1,7 +1,9 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import { ProjectNotFoundError } from "../errors.js";
4
- export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
4
+ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never, Schema.toCodecStringTree<Schema.Struct<{
5
+ readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
6
+ }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
5
7
  readonly id: Schema.brand<Schema.String, "Project.ID"> & {
6
8
  global: string & import("effect/Brand").Brand<"Project.ID">;
7
9
  };
@@ -26,6 +28,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
26
28
  readonly created: Schema.Int;
27
29
  readonly updated: Schema.Int;
28
30
  readonly active: Schema.Int;
31
+ readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
29
32
  }>;
30
33
  readonly sandboxes: Schema.$Array<Schema.String>;
31
34
  }>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"project.update", "PATCH", "/api/project/:projectID", Schema.toCodecStringTree<Schema.Struct<{
@@ -74,6 +77,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
74
77
  readonly created: Schema.Int;
75
78
  readonly updated: Schema.Int;
76
79
  readonly active: Schema.Int;
80
+ readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
77
81
  }>;
78
82
  readonly sandboxes: Schema.$Array<Schema.String>;
79
83
  }>>, Schema.toCodecJson<typeof ProjectNotFoundError>, never, never>, false>;
@@ -1,16 +1,21 @@
1
1
  import { Project } from "@opencode/schema/project";
2
- import { Schema, Struct } from "effect";
3
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
2
+ import { Schema, SchemaGetter, Struct } from "effect";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
4
4
  import { ProjectNotFoundError } from "../errors.js";
5
5
  const root = "/api/project";
6
6
  const UpdatePayload = Schema.Struct(Struct.omit(Project.UpdateInput.fields, ["projectID"]));
7
+ const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeTo(Schema.Boolean, {
8
+ decode: SchemaGetter.transform((value) => value === "true"),
9
+ encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
10
+ }));
7
11
  export const ProjectGroup = HttpApiGroup.make("server.project")
8
12
  .add(HttpApiEndpoint.get("project.list", root, {
13
+ query: Schema.Struct({ archived: BooleanFromString.pipe(Schema.optional) }),
9
14
  success: Schema.Array(Project.Info),
10
15
  }).annotateMerge(OpenApi.annotations({
11
16
  identifier: "project.list",
12
17
  summary: "List projects",
13
- description: "List known projects.",
18
+ description: "List known projects. Archived projects are excluded unless archived=true.",
14
19
  })))
15
20
  .add(HttpApiEndpoint.patch("project.update", `${root}/:projectID`, {
16
21
  params: { projectID: Project.ID },
@@ -1,6 +1,6 @@
1
1
  import { Provider } from "@opencode/schema/provider";
2
2
  import { Schema } from "effect";
3
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
3
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
4
4
  import { ProviderNotFoundError, ServiceUnavailableError } from "../errors.js";
5
5
  export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider", HttpApiEndpoint.HttpApiEndpoint<"provider.list", "GET", "/api/provider", never, Schema.toCodecStringTree<Schema.Struct<{
6
6
  readonly location: Schema.optional<Schema.Struct<{
@@ -25,6 +25,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
25
25
  readonly type: Schema.Literal<"native">;
26
26
  }>]>>, never, never>;
27
27
  readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
28
+ readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
28
29
  }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
29
30
  readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
30
31
  readonly headerTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
@@ -39,6 +40,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
39
40
  readonly type: Schema.Literal<"native">;
40
41
  }>]>>, never, never>;
41
42
  readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
43
+ readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
42
44
  }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
43
45
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
44
46
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
@@ -84,6 +86,23 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
84
86
  readonly name: Schema.String;
85
87
  readonly activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
86
88
  readonly package: Schema.String;
89
+ readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
90
+ readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>, never, never>;
91
+ readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
92
+ readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
93
+ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
94
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
95
+ readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
96
+ readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
97
+ }>>>, Schema.optionalKey<Schema.Struct<{
98
+ readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>, never, never>;
99
+ readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
100
+ readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
101
+ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
102
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
103
+ readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
104
+ readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
105
+ }>>, never, never>;
87
106
  }> & {
88
107
  empty: (id: Provider.ID) => Provider.Info;
89
108
  }>;
@@ -124,6 +143,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
124
143
  readonly type: Schema.Literal<"native">;
125
144
  }>]>>, never, never>;
126
145
  readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
146
+ readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
127
147
  }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
128
148
  readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
129
149
  readonly headerTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
@@ -138,6 +158,7 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
138
158
  readonly type: Schema.Literal<"native">;
139
159
  }>]>>, never, never>;
140
160
  readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
161
+ readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
141
162
  }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
142
163
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
143
164
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
@@ -183,6 +204,23 @@ export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider",
183
204
  readonly name: Schema.String;
184
205
  readonly activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
185
206
  readonly package: Schema.String;
207
+ readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
208
+ readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>, never, never>;
209
+ readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
210
+ readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
211
+ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
212
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
213
+ readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
214
+ readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
215
+ }>>>, Schema.optionalKey<Schema.Struct<{
216
+ readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("@opencode/schema/model-compatibility").ReasoningField, import("@opencode/schema/model-compatibility").ReasoningField, never, never>>, never, never>;
217
+ readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
218
+ readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
219
+ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
220
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
221
+ readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
222
+ readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
223
+ }>>, never, never>;
186
224
  }> & {
187
225
  empty: (id: Provider.ID) => Provider.Info;
188
226
  };
@@ -1,7 +1,7 @@
1
1
  import { Provider } from "@opencode/schema/provider";
2
2
  import { Location } from "@opencode/schema/location";
3
3
  import { Schema } from "effect";
4
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
5
  import { ProviderNotFoundError, ServiceUnavailableError } from "../errors.js";
6
6
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
7
7
  export const ProviderGroup = HttpApiGroup.make("server.provider")
@@ -1,5 +1,5 @@
1
1
  import { Context, Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
3
3
  import { ForbiddenError, LocationNotFoundError, PtyNotFoundError } from "../errors.js";
4
4
  export declare const PTY_CONNECT_TICKET_QUERY = "ticket";
5
5
  export declare const PTY_CONNECT_TOKEN_HEADER = "x-opencode-ticket";
@@ -2,7 +2,7 @@ import { Pty } from "@opencode/schema/pty";
2
2
  import { PtyTicket } from "@opencode/schema/pty-ticket";
3
3
  import { Location } from "@opencode/schema/location";
4
4
  import { Context, Schema } from "effect";
5
- import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
5
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
6
6
  import { ForbiddenError, LocationNotFoundError, PtyNotFoundError } from "../errors.js";
7
7
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
8
8
  export const PTY_CONNECT_TICKET_QUERY = "ticket";
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference", HttpApiEndpoint.HttpApiEndpoint<"reference.list", "GET", "/api/reference", never, Schema.toCodecStringTree<Schema.Struct<{
4
4
  readonly location: Schema.optional<Schema.Struct<{
5
5
  readonly directory: Schema.optional<Schema.String>;
@@ -1,7 +1,7 @@
1
1
  import { Location } from "@opencode/schema/location";
2
2
  import { Reference } from "@opencode/schema/reference";
3
3
  import { Schema, Struct } from "effect";
4
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
5
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
6
6
  const PublicLocalSource = Schema.Struct(Struct.omit(Reference.LocalSource.fields, ["description", "hidden"])).annotate({
7
7
  identifier: "Reference.LocalSource",
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import { RpcError, RpcInternalError } from "../errors.js";
4
4
  export declare const RpcInput: Schema.Struct<{
5
5
  readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Unknown>>, Schema.optionalKey<Schema.Unknown>, never, never>;
@@ -1,6 +1,6 @@
1
1
  import { optional } from "@opencode/schema/schema";
2
2
  import { Schema } from "effect";
3
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
4
4
  import { RpcError, RpcInternalError } from "../errors.js";
5
5
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
6
6
  export const RpcInput = Schema.Struct({ input: optional(Schema.Unknown) }).annotate({ identifier: "Rpc.Input" });
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import { UnauthorizedError } from "../errors.js";
4
4
  export declare const ServerInfo: Schema.Struct<{
5
5
  readonly version: Schema.String;
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
3
3
  import { UnauthorizedError } from "../errors.js";
4
4
  export const ServerInfo = Schema.Struct({
5
5
  version: Schema.String,
@@ -2,7 +2,7 @@ import { PromptInput } from "@opencode/schema/prompt-input";
2
2
  import { InstructionEntry } from "@opencode/schema/instruction-entry";
3
3
  import { Event } from "@opencode/schema/event";
4
4
  import { Context, Effect, Schema } from "effect";
5
- import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/unstable/httpapi";
5
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
6
6
  import { ConflictError, LocationNotFoundError, CommandExecutionError, CommandNotFoundError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidCursorError, InvalidRequestError, MessageNotFoundError, ServiceUnavailableError, SessionBusyError, SessionNotFoundError, SkillNotFoundError, UnknownError } from "../errors.js";
7
7
  declare const SessionsCursorInput: Schema.Union<readonly [Schema.Struct<{
8
8
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
@@ -96,7 +96,40 @@ export declare const SessionsQuery: Schema.Struct<{
96
96
  global: string & import("effect/Brand").Brand<"Project.ID">;
97
97
  }>;
98
98
  readonly subpath: Schema.optional<Schema.brand<Schema.String, "RelativePath">>;
99
- readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor">>;
99
+ readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"> & {
100
+ make: (input: typeof SessionsCursorInput.Type) => string & import("effect/Brand").Brand<"SessionsCursor">;
101
+ parse: (input: string) => Effect.Effect<{
102
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
103
+ readonly anchor: {
104
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
105
+ readonly time: number;
106
+ readonly direction: "previous" | "next";
107
+ };
108
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
109
+ readonly search?: string | undefined;
110
+ readonly order?: "asc" | "desc" | undefined;
111
+ } | {
112
+ readonly project: string & import("effect/Brand").Brand<"Project.ID">;
113
+ readonly anchor: {
114
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
115
+ readonly time: number;
116
+ readonly direction: "previous" | "next";
117
+ };
118
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
119
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
120
+ readonly search?: string | undefined;
121
+ readonly order?: "asc" | "desc" | undefined;
122
+ } | {
123
+ readonly anchor: {
124
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
125
+ readonly time: number;
126
+ readonly direction: "previous" | "next";
127
+ };
128
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
129
+ readonly search?: string | undefined;
130
+ readonly order?: "asc" | "desc" | undefined;
131
+ }, "Invalid cursor", never>;
132
+ }>;
100
133
  readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
101
134
  readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
102
135
  readonly search: Schema.optional<Schema.String>;
@@ -111,7 +144,40 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
111
144
  global: string & import("effect/Brand").Brand<"Project.ID">;
112
145
  }>;
113
146
  readonly subpath: Schema.optional<Schema.brand<Schema.String, "RelativePath">>;
114
- readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor">>;
147
+ readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"> & {
148
+ make: (input: typeof SessionsCursorInput.Type) => string & import("effect/Brand").Brand<"SessionsCursor">;
149
+ parse: (input: string) => Effect.Effect<{
150
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
151
+ readonly anchor: {
152
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
153
+ readonly time: number;
154
+ readonly direction: "previous" | "next";
155
+ };
156
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
157
+ readonly search?: string | undefined;
158
+ readonly order?: "asc" | "desc" | undefined;
159
+ } | {
160
+ readonly project: string & import("effect/Brand").Brand<"Project.ID">;
161
+ readonly anchor: {
162
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
163
+ readonly time: number;
164
+ readonly direction: "previous" | "next";
165
+ };
166
+ readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
167
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
168
+ readonly search?: string | undefined;
169
+ readonly order?: "asc" | "desc" | undefined;
170
+ } | {
171
+ readonly anchor: {
172
+ readonly id: string & import("effect/Brand").Brand<"SessionID">;
173
+ readonly time: number;
174
+ readonly direction: "previous" | "next";
175
+ };
176
+ readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
177
+ readonly search?: string | undefined;
178
+ readonly order?: "asc" | "desc" | undefined;
179
+ }, "Invalid cursor", never>;
180
+ }>;
115
181
  readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
116
182
  readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
117
183
  readonly search: Schema.optional<Schema.String>;
@@ -1575,6 +1641,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
1575
1641
  }>]>, Schema.Struct<{
1576
1642
  readonly type: Schema.tag<"idle">;
1577
1643
  readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
1644
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1645
+ readonly type: Schema.String;
1646
+ readonly message: Schema.String;
1647
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1648
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1649
+ readonly body: Schema.String;
1650
+ }>>>, Schema.optionalKey<Schema.Struct<{
1651
+ readonly body: Schema.String;
1652
+ }>>, never, never>;
1653
+ }>>>, Schema.optionalKey<Schema.Struct<{
1654
+ readonly type: Schema.String;
1655
+ readonly message: Schema.String;
1656
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1657
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1658
+ readonly body: Schema.String;
1659
+ }>>>, Schema.optionalKey<Schema.Struct<{
1660
+ readonly body: Schema.String;
1661
+ }>>, never, never>;
1662
+ }>>, never, never>;
1578
1663
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1579
1664
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1580
1665
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -2654,6 +2739,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
2654
2739
  }>]>, Schema.Struct<{
2655
2740
  readonly type: Schema.tag<"idle">;
2656
2741
  readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
2742
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2743
+ readonly type: Schema.String;
2744
+ readonly message: Schema.String;
2745
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2746
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2747
+ readonly body: Schema.String;
2748
+ }>>>, Schema.optionalKey<Schema.Struct<{
2749
+ readonly body: Schema.String;
2750
+ }>>, never, never>;
2751
+ }>>>, Schema.optionalKey<Schema.Struct<{
2752
+ readonly type: Schema.String;
2753
+ readonly message: Schema.String;
2754
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2755
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2756
+ readonly body: Schema.String;
2757
+ }>>>, Schema.optionalKey<Schema.Struct<{
2758
+ readonly body: Schema.String;
2759
+ }>>, never, never>;
2760
+ }>>, never, never>;
2657
2761
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2658
2762
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2659
2763
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -4307,6 +4411,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
4307
4411
  }>]>, Schema.Struct<{
4308
4412
  readonly type: Schema.tag<"idle">;
4309
4413
  readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
4414
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
4415
+ readonly type: Schema.String;
4416
+ readonly message: Schema.String;
4417
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4418
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
4419
+ readonly body: Schema.String;
4420
+ }>>>, Schema.optionalKey<Schema.Struct<{
4421
+ readonly body: Schema.String;
4422
+ }>>, never, never>;
4423
+ }>>>, Schema.optionalKey<Schema.Struct<{
4424
+ readonly type: Schema.String;
4425
+ readonly message: Schema.String;
4426
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
4427
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
4428
+ readonly body: Schema.String;
4429
+ }>>>, Schema.optionalKey<Schema.Struct<{
4430
+ readonly body: Schema.String;
4431
+ }>>, never, never>;
4432
+ }>>, never, never>;
4310
4433
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
4311
4434
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
4312
4435
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -10893,6 +11016,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
10893
11016
  }>]>, Schema.Struct<{
10894
11017
  readonly type: Schema.tag<"idle">;
10895
11018
  readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
11019
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
11020
+ readonly type: Schema.String;
11021
+ readonly message: Schema.String;
11022
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
11023
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
11024
+ readonly body: Schema.String;
11025
+ }>>>, Schema.optionalKey<Schema.Struct<{
11026
+ readonly body: Schema.String;
11027
+ }>>, never, never>;
11028
+ }>>>, Schema.optionalKey<Schema.Struct<{
11029
+ readonly type: Schema.String;
11030
+ readonly message: Schema.String;
11031
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
11032
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
11033
+ readonly body: Schema.String;
11034
+ }>>>, Schema.optionalKey<Schema.Struct<{
11035
+ readonly body: Schema.String;
11036
+ }>>, never, never>;
11037
+ }>>, never, never>;
10896
11038
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
10897
11039
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
10898
11040
  fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -7,8 +7,9 @@ import { InstructionEntry } from "@opencode/schema/instruction-entry";
7
7
  import { Project } from "@opencode/schema/project";
8
8
  import { AbsolutePath, DateTimeUtcFromMillis, NonNegativeInt, PositiveInt, RelativePath, statics, } from "@opencode/schema/schema";
9
9
  import { Event } from "@opencode/schema/event";
10
- import { Context, Effect, Encoding, Result, Schema, SchemaGetter, Struct } from "effect";
11
- import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
10
+ import { Context, Effect, Result, Schema, SchemaGetter, SchemaParser, Struct } from "effect";
11
+ import { Base64Url } from "effect/encoding";
12
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
12
13
  import { ConflictError, LocationNotFoundError, CommandExecutionError, CommandNotFoundError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidCursorError, InvalidRequestError, MessageNotFoundError, ServiceUnavailableError, SessionBusyError, SessionNotFoundError, SkillNotFoundError, UnknownError, } from "../errors.js";
13
14
  import { Agent } from "@opencode/schema/agent";
14
15
  import { Skill } from "@opencode/schema/skill";
@@ -62,12 +63,16 @@ const SessionsCursorJson = Schema.fromJsonString(SessionsCursorInput);
62
63
  const encodeSessionsCursor = Schema.encodeSync(SessionsCursorJson);
63
64
  const decodeSessionsCursor = Schema.decodeUnknownEffect(SessionsCursorJson);
64
65
  const invalidCursor = "Invalid cursor";
65
- export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), statics((schema) => {
66
- const make = schema.make.bind(schema);
66
+ export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), Schema.annotate({
67
+ identifier: "SessionsCursor",
68
+ description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
69
+ }), statics((schema) => {
70
+ // Read the default constructor without caching it on the schema, so `make` can be replaced.
71
+ const make = SchemaParser.make(schema);
67
72
  return {
68
- make: (input) => make(Encoding.encodeBase64Url(encodeSessionsCursor(input))),
73
+ make: (input) => make(Base64Url.encode(encodeSessionsCursor(input))),
69
74
  parse: (input) => Effect.suspend(() => {
70
- const result = Encoding.decodeBase64UrlString(input);
75
+ const result = Base64Url.decodeString(input);
71
76
  return Result.isFailure(result)
72
77
  ? Effect.fail(invalidCursor)
73
78
  : decodeSessionsCursor(result.success).pipe(Effect.mapError(() => invalidCursor));
@@ -109,15 +114,12 @@ const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeT
109
114
  decode: SchemaGetter.transform((value) => value === "true"),
110
115
  encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
111
116
  }));
112
- const SessionsQueryCursor = SessionsCursor.annotate({
113
- description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
114
- });
115
117
  export const SessionsQuery = Schema.Struct({
116
118
  ...SessionsQueryFields,
117
119
  directory: AbsolutePath.pipe(Schema.optional),
118
120
  project: Project.ID.pipe(Schema.optional),
119
121
  subpath: RelativePath.pipe(Schema.optional),
120
- cursor: SessionsQueryCursor.pipe(Schema.optional),
122
+ cursor: SessionsCursor.pipe(Schema.optional),
121
123
  }).annotate({ identifier: "SessionsQuery" });
122
124
  export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddleware) => HttpApiGroup.make("server.session")
123
125
  .add(HttpApiEndpoint.get("session.list", "/api/session", {
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
3
  import { ShellNotFoundError } from "../errors.js";
4
4
  export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpApiEndpoint.HttpApiEndpoint<"shell.list", "GET", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
@@ -1,7 +1,7 @@
1
1
  import { Shell } from "@opencode/schema/shell";
2
2
  import { Location } from "@opencode/schema/location";
3
3
  import { Schema } from "effect";
4
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
4
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
5
5
  import { ShellNotFoundError } from "../errors.js";
6
6
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
7
7
  export const ShellGroup = HttpApiGroup.make("server.shell")
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpApiEndpoint.HttpApiEndpoint<"skill.list", "GET", "/api/skill", never, Schema.toCodecStringTree<Schema.Struct<{
4
4
  readonly location: Schema.optional<Schema.Struct<{
5
5
  readonly directory: Schema.optional<Schema.String>;
@@ -1,7 +1,7 @@
1
1
  import { Skill } from "@opencode/schema/skill";
2
2
  import { Location } from "@opencode/schema/location";
3
3
  import { Schema } from "effect";
4
- import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
5
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
6
6
  export const SkillGroup = HttpApiGroup.make("server.skill")
7
7
  .add(HttpApiEndpoint.get("skill.list", "/api/skill", {
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
3
3
  import { ConflictError, InvalidRequestError, ServiceUnavailableError } from "../errors.js";
4
4
  declare const VcsInitNotSupportedError_base: Schema.Class<VcsInitNotSupportedError, Schema.TaggedStruct<"VcsInitNotSupportedError", {
5
5
  readonly providerID: Schema.String;
@@ -3,7 +3,7 @@ import { Location } from "@opencode/schema/location";
3
3
  import { NonNegativeInt, PositiveInt, optional } from "@opencode/schema/schema";
4
4
  import { Vcs } from "@opencode/schema/vcs";
5
5
  import { Schema } from "effect";
6
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
6
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
7
7
  import { LocationQuery, locationQueryOpenApi } from "./location.js";
8
8
  import { ConflictError, InvalidRequestError, ServiceUnavailableError } from "../errors.js";
9
9
  const InitQuery = Schema.Struct({