@opencode/protocol 0.0.0-dev-19512 → 0.0.0-dev-19515
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/groups/config.d.ts +14 -1
- package/dist/groups/config.js +23 -0
- package/package.json +2 -2
package/dist/groups/config.d.ts
CHANGED
|
@@ -6,4 +6,17 @@ export declare const ConfigGroup: HttpApiGroup.HttpApiGroup<"server.config", Htt
|
|
|
6
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
7
7
|
readonly workspace: Schema.optional<Schema.String>;
|
|
8
8
|
}>>;
|
|
9
|
-
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Union<readonly [typeof Config.Document, typeof Config.Directory, typeof Config.AgentsDirectory, typeof Config.ClaudeDirectory]>>>, never, never, never
|
|
9
|
+
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Union<readonly [typeof Config.Document, typeof Config.Directory, typeof Config.AgentsDirectory, typeof Config.ClaudeDirectory]>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"config.preferences", "GET", "/api/config/preferences", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
10
|
+
readonly shell: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
11
|
+
readonly websearch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Literal<false>, typeof import("@opencode/schema/config/websearch").Info]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Literal<false>, typeof import("@opencode/schema/config/websearch").Info]>>, never, never>;
|
|
12
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"config.updatePreferences", "PATCH", "/api/config/preferences", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
13
|
+
readonly shell: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.String>>>, Schema.optionalKey<Schema.NullOr<Schema.String>>, never, never>;
|
|
14
|
+
readonly websearch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NullOr<Schema.Union<readonly [Schema.Literal<false>, typeof import("@opencode/schema/config/websearch").Info]>>>>, Schema.optionalKey<Schema.NullOr<Schema.Union<readonly [Schema.Literal<false>, typeof import("@opencode/schema/config/websearch").Info]>>>, never, never>;
|
|
15
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
16
|
+
readonly shell: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
17
|
+
readonly websearch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Literal<false>, typeof import("@opencode/schema/config/websearch").Info]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Literal<false>, typeof import("@opencode/schema/config/websearch").Info]>>, never, never>;
|
|
18
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"config.shells", "GET", "/api/config/shell", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
19
|
+
readonly path: Schema.String;
|
|
20
|
+
readonly name: Schema.String;
|
|
21
|
+
readonly acceptable: Schema.Boolean;
|
|
22
|
+
}>>>, never, never, never>, false>;
|
package/dist/groups/config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Config } from "@opencode/schema/config";
|
|
2
|
+
import { ConfigShell } from "@opencode/schema/config/shell";
|
|
2
3
|
import { Schema } from "effect";
|
|
3
4
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
4
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
@@ -12,5 +13,27 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
|
|
|
12
13
|
identifier: "v2.config.get",
|
|
13
14
|
summary: "Get configuration",
|
|
14
15
|
description: "Return configuration documents and discovery sources for the requested location, from lowest to highest priority.",
|
|
16
|
+
})))
|
|
17
|
+
.add(HttpApiEndpoint.get("config.preferences", "/api/config/preferences", {
|
|
18
|
+
success: Config.Preferences,
|
|
19
|
+
}).annotateMerge(OpenApi.annotations({
|
|
20
|
+
identifier: "v2.config.preferences",
|
|
21
|
+
summary: "Get global preferences",
|
|
22
|
+
description: "Return preferences from the highest-precedence global configuration document.",
|
|
23
|
+
})))
|
|
24
|
+
.add(HttpApiEndpoint.patch("config.updatePreferences", "/api/config/preferences", {
|
|
25
|
+
payload: Config.PreferencesPatch,
|
|
26
|
+
success: Config.Preferences,
|
|
27
|
+
}).annotateMerge(OpenApi.annotations({
|
|
28
|
+
identifier: "v2.config.updatePreferences",
|
|
29
|
+
summary: "Update global preferences",
|
|
30
|
+
description: "Patch preferences in the highest-precedence global configuration document.",
|
|
31
|
+
})))
|
|
32
|
+
.add(HttpApiEndpoint.get("config.shells", "/api/config/shell", {
|
|
33
|
+
success: Schema.Array(ConfigShell.Option),
|
|
34
|
+
}).annotateMerge(OpenApi.annotations({
|
|
35
|
+
identifier: "v2.config.shells",
|
|
36
|
+
summary: "List available shells",
|
|
37
|
+
description: "Return shells available to terminal and agent execution.",
|
|
15
38
|
})))
|
|
16
39
|
.annotateMerge(OpenApi.annotations({ title: "config", description: "Location-scoped configuration routes." }));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/protocol",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-19515",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typecheck": "tsgo --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@opencode/schema": "0.0.0-dev-
|
|
35
|
+
"@opencode/schema": "0.0.0-dev-19515",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|