@opencode/protocol 0.0.0-dev-19530 → 2.0.0
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 +0 -6
- package/dist/errors.js +0 -5
- package/dist/groups/config.d.ts +1 -14
- package/dist/groups/config.js +0 -23
- package/dist/groups/fs.d.ts +1 -2
- package/dist/groups/fs.js +0 -2
- package/package.json +2 -2
package/dist/errors.d.ts
CHANGED
|
@@ -61,12 +61,6 @@ declare const ProjectNotFoundError_base: Schema.Class<ProjectNotFoundError, Sche
|
|
|
61
61
|
}>, import("effect/Cause").YieldableError>;
|
|
62
62
|
export declare class ProjectNotFoundError extends ProjectNotFoundError_base {
|
|
63
63
|
}
|
|
64
|
-
declare const FileNotFoundError_base: Schema.Class<FileNotFoundError, Schema.TaggedStruct<"FileNotFoundError", {
|
|
65
|
-
readonly path: Schema.String;
|
|
66
|
-
readonly message: Schema.String;
|
|
67
|
-
}>, import("effect/Cause").YieldableError>;
|
|
68
|
-
export declare class FileNotFoundError extends FileNotFoundError_base {
|
|
69
|
-
}
|
|
70
64
|
declare const AgentNotFoundError_base: Schema.Class<AgentNotFoundError, Schema.TaggedStruct<"AgentNotFoundError", {
|
|
71
65
|
readonly agentID: Schema.String;
|
|
72
66
|
readonly message: Schema.String;
|
package/dist/errors.js
CHANGED
|
@@ -50,11 +50,6 @@ export class ProjectNotFoundError extends Schema.TaggedError()("ProjectNotFoundE
|
|
|
50
50
|
message: Schema.String,
|
|
51
51
|
}, { httpApiStatus: 404 }) {
|
|
52
52
|
}
|
|
53
|
-
export class FileNotFoundError extends Schema.TaggedError()("FileNotFoundError", {
|
|
54
|
-
path: Schema.String,
|
|
55
|
-
message: Schema.String,
|
|
56
|
-
}, { httpApiStatus: 404 }) {
|
|
57
|
-
}
|
|
58
53
|
export class AgentNotFoundError extends Schema.TaggedError()("AgentNotFoundError", {
|
|
59
54
|
agentID: Schema.String,
|
|
60
55
|
message: Schema.String,
|
package/dist/groups/config.d.ts
CHANGED
|
@@ -6,17 +6,4 @@ 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
|
|
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>;
|
|
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>, false>;
|
package/dist/groups/config.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Config } from "@opencode/schema/config";
|
|
2
|
-
import { ConfigShell } from "@opencode/schema/config/shell";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
5
4
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
@@ -13,27 +12,5 @@ export const ConfigGroup = HttpApiGroup.make("server.config")
|
|
|
13
12
|
identifier: "v2.config.get",
|
|
14
13
|
summary: "Get configuration",
|
|
15
14
|
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.",
|
|
38
15
|
})))
|
|
39
16
|
.annotateMerge(OpenApi.annotations({ title: "config", description: "Location-scoped configuration routes." }));
|
package/dist/groups/fs.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
|
-
import { FileNotFoundError } from "../errors.js";
|
|
5
4
|
export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", HttpApiEndpoint.HttpApiEndpoint<"fs.read", "GET", "/api/fs/read/*", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
7
6
|
readonly directory: Schema.optional<Schema.String>;
|
|
8
7
|
readonly workspace: Schema.optional<Schema.String>;
|
|
9
8
|
}>>;
|
|
10
|
-
}>>, never, never, Schema.toCodecJson<Schema.Uint8Array>,
|
|
9
|
+
}>>, never, never, Schema.toCodecJson<Schema.Uint8Array>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"fs.list", "GET", "/api/fs/list", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
11
10
|
readonly path: Schema.optional<Schema.String>;
|
|
12
11
|
readonly location: Schema.optional<Schema.Struct<{
|
|
13
12
|
readonly directory: Schema.optional<Schema.String>;
|
package/dist/groups/fs.js
CHANGED
|
@@ -3,7 +3,6 @@ import { Location } from "@opencode/schema/location";
|
|
|
3
3
|
import { PositiveInt } from "@opencode/schema/schema";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
5
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
6
|
-
import { FileNotFoundError } from "../errors.js";
|
|
7
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
7
|
const ListQuery = Schema.Struct({
|
|
9
8
|
...LocationQuery.fields,
|
|
@@ -21,7 +20,6 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
|
|
21
20
|
.add(HttpApiEndpoint.get("fs.read", "/api/fs/read/*", {
|
|
22
21
|
query: LocationQuery,
|
|
23
22
|
success: Schema.Uint8Array.pipe(HttpApiSchema.asUint8Array()),
|
|
24
|
-
error: FileNotFoundError,
|
|
25
23
|
})
|
|
26
24
|
.annotateMerge(locationQueryOpenApi)
|
|
27
25
|
.annotateMerge(OpenApi.annotations({
|
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": "
|
|
4
|
+
"version": "2.0.0",
|
|
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": "
|
|
35
|
+
"@opencode/schema": "2.0.0",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|