@opencode/protocol 0.0.0-dev-19659 → 0.0.0-dev-19661
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/shell.d.ts +2 -35
- package/dist/groups/shell.js +1 -19
- package/dist/groups/vcs.d.ts +2 -1
- package/dist/groups/vcs.js +2 -2
- package/package.json +2 -2
package/dist/groups/shell.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
34
34
|
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
35
35
|
readonly command: Schema.String;
|
|
36
36
|
readonly cwd: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
37
|
-
readonly timeout: Schema.Int
|
|
37
|
+
readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
38
38
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
39
39
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
40
40
|
readonly location: Schema.Struct<{
|
|
@@ -89,39 +89,6 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
89
89
|
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
90
90
|
}>;
|
|
91
91
|
}>;
|
|
92
|
-
}>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.timeout", "PATCH", "/api/shell/:id/timeout", Schema.toCodecStringTree<Schema.Struct<{
|
|
93
|
-
id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
94
|
-
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
95
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
96
|
-
};
|
|
97
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
98
|
-
readonly location: Schema.optional<Schema.Struct<{
|
|
99
|
-
readonly directory: Schema.optional<Schema.String>;
|
|
100
|
-
}>>;
|
|
101
|
-
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
102
|
-
readonly timeout: Schema.Int;
|
|
103
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
104
|
-
readonly location: Schema.Struct<{
|
|
105
|
-
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
106
|
-
}>;
|
|
107
|
-
readonly data: Schema.Struct<{
|
|
108
|
-
readonly id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
109
|
-
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
110
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
111
|
-
};
|
|
112
|
-
readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
|
|
113
|
-
readonly command: Schema.String;
|
|
114
|
-
readonly cwd: Schema.String;
|
|
115
|
-
readonly shell: Schema.String;
|
|
116
|
-
readonly file: Schema.String;
|
|
117
|
-
readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
118
|
-
readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
119
|
-
readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
120
|
-
readonly time: Schema.Struct<{
|
|
121
|
-
readonly started: Schema.Finite;
|
|
122
|
-
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
123
|
-
}>;
|
|
124
|
-
}>;
|
|
125
92
|
}>>, Schema.toCodecJson<typeof ShellNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"shell.output", "GET", "/api/shell/:id/output", Schema.toCodecStringTree<Schema.Struct<{
|
|
126
93
|
id: Schema.brand<Schema.String, "Shell.ID"> & {
|
|
127
94
|
create: () => string & import("effect/Brand").Brand<"Shell.ID">;
|
|
@@ -152,4 +119,4 @@ export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpA
|
|
|
152
119
|
readonly location: Schema.optional<Schema.Struct<{
|
|
153
120
|
readonly directory: Schema.optional<Schema.String>;
|
|
154
121
|
}>>;
|
|
155
|
-
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>,
|
|
122
|
+
}>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
|
package/dist/groups/shell.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Shell } from "@opencode/schema/shell";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
|
-
import { NonNegativeInt } from "@opencode/schema/schema";
|
|
4
3
|
import { Schema } from "effect";
|
|
5
4
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
6
5
|
import { ShellNotFoundError } from "../errors.js";
|
|
7
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
|
-
const TimeoutInput = Schema.Struct({
|
|
9
|
-
timeout: NonNegativeInt,
|
|
10
|
-
});
|
|
11
7
|
export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
12
8
|
.add(HttpApiEndpoint.get("shell.list", "/api/shell", {
|
|
13
9
|
query: LocationQuery,
|
|
@@ -41,19 +37,6 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
41
37
|
identifier: "shell.get",
|
|
42
38
|
summary: "Get shell command",
|
|
43
39
|
description: "Get one shell command, including its status and exit code once exited.",
|
|
44
|
-
})))
|
|
45
|
-
.add(HttpApiEndpoint.patch("shell.timeout", "/api/shell/:id/timeout", {
|
|
46
|
-
params: { id: Shell.ID },
|
|
47
|
-
query: LocationQuery,
|
|
48
|
-
payload: TimeoutInput,
|
|
49
|
-
success: Location.response(Shell.Info),
|
|
50
|
-
error: ShellNotFoundError,
|
|
51
|
-
})
|
|
52
|
-
.annotateMerge(locationQueryOpenApi)
|
|
53
|
-
.annotateMerge(OpenApi.annotations({
|
|
54
|
-
identifier: "shell.timeout",
|
|
55
|
-
summary: "Update shell timeout",
|
|
56
|
-
description: "Replace a running shell command's timeout from now, or clear it with zero.",
|
|
57
40
|
})))
|
|
58
41
|
.add(HttpApiEndpoint.get("shell.output", "/api/shell/:id/output", {
|
|
59
42
|
params: { id: Shell.ID },
|
|
@@ -71,7 +54,6 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
71
54
|
params: { id: Shell.ID },
|
|
72
55
|
query: LocationQuery,
|
|
73
56
|
success: HttpApiSchema.NoContent,
|
|
74
|
-
error: ShellNotFoundError,
|
|
75
57
|
})
|
|
76
58
|
.annotateMerge(locationQueryOpenApi)
|
|
77
59
|
.annotateMerge(OpenApi.annotations({
|
|
@@ -79,4 +61,4 @@ export const ShellGroup = HttpApiGroup.make("server.shell")
|
|
|
79
61
|
summary: "Remove shell command",
|
|
80
62
|
description: "Terminate and remove one shell command and its retained output.",
|
|
81
63
|
})))
|
|
82
|
-
.annotateMerge(OpenApi.annotations({ title: "shell", description: "
|
|
64
|
+
.annotateMerge(OpenApi.annotations({ title: "shell", description: "Location-scoped shell command routes." }));
|
package/dist/groups/vcs.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
|
|
|
10
10
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
11
11
|
}>;
|
|
12
12
|
readonly data: Schema.Struct<{
|
|
13
|
+
readonly provider: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
13
14
|
readonly branch: Schema.Struct<{
|
|
14
15
|
readonly current: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
15
16
|
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
@@ -42,7 +43,7 @@ export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEn
|
|
|
42
43
|
readonly deletions: Schema.Int;
|
|
43
44
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
44
45
|
}>>;
|
|
45
|
-
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.
|
|
46
|
+
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.branch.list", "GET", "/api/vcs/branch", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
46
47
|
readonly search: Schema.optional<Schema.String>;
|
|
47
48
|
readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
|
|
48
49
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/vcs.js
CHANGED
|
@@ -49,13 +49,13 @@ export const VcsGroup = HttpApiGroup.make("server.vcs")
|
|
|
49
49
|
summary: "VCS status",
|
|
50
50
|
description: "List uncommitted working-copy changes relative to the requested location.",
|
|
51
51
|
})))
|
|
52
|
-
.add(HttpApiEndpoint.get("vcs.
|
|
52
|
+
.add(HttpApiEndpoint.get("vcs.branch.list", "/api/vcs/branch", {
|
|
53
53
|
query: BranchesQuery,
|
|
54
54
|
success: Location.response(Vcs.BranchList),
|
|
55
55
|
})
|
|
56
56
|
.annotateMerge(locationQueryOpenApi)
|
|
57
57
|
.annotateMerge(OpenApi.annotations({
|
|
58
|
-
identifier: "vcs.
|
|
58
|
+
identifier: "vcs.branch.list",
|
|
59
59
|
summary: "VCS branches",
|
|
60
60
|
description: "List local and remote branches available at the requested location.",
|
|
61
61
|
})))
|
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-19661",
|
|
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-19661",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|