@opencode/protocol 0.0.0-dev-192 → 0.0.0-dev-197
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/client.d.ts +3 -0
- package/dist/client.js +4 -0
- package/dist/groups/persistent-pty.js +11 -10
- package/dist/groups/session.js +1 -1
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -59,6 +59,9 @@ export declare const groupNames: {
|
|
|
59
59
|
readonly "server.vcs": "vcs";
|
|
60
60
|
readonly "server.config": "config";
|
|
61
61
|
};
|
|
62
|
+
export declare const clientNamespace: (endpoint: {
|
|
63
|
+
readonly path: string;
|
|
64
|
+
}) => "experimental" | undefined;
|
|
62
65
|
export declare const promiseOmitEndpoints: Set<string>;
|
|
63
66
|
export declare const effectOmitEndpoints: Set<string>;
|
|
64
67
|
export {};
|
package/dist/client.js
CHANGED
|
@@ -46,6 +46,10 @@ export const groupNames = {
|
|
|
46
46
|
"server.vcs": "vcs",
|
|
47
47
|
"server.config": "config",
|
|
48
48
|
};
|
|
49
|
+
// Experimental routes carry no compatibility promise, so the generated clients nest them under
|
|
50
|
+
// `client.experimental` instead of beside stable methods. The URL decides rather than the OpenAPI
|
|
51
|
+
// id, because the URL is what callers depend on and an id can miss its `experimental.` prefix.
|
|
52
|
+
export const clientNamespace = (endpoint) => endpoint.path === "/api/experimental" || endpoint.path.startsWith("/api/experimental/") ? "experimental" : undefined;
|
|
49
53
|
export const promiseOmitEndpoints = new Set([
|
|
50
54
|
"pty.connect",
|
|
51
55
|
"persistentPty.connect",
|
|
@@ -23,6 +23,7 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
|
|
|
23
23
|
success: Schema.Struct({ data: Schema.NullOr(PersistentPty.ReadResult) }),
|
|
24
24
|
error: [ServiceUnavailableError],
|
|
25
25
|
}).annotateMerge(OpenApi.annotations({
|
|
26
|
+
identifier: "experimental.persistentPty.read",
|
|
26
27
|
summary: "Read the session's most recently controlled terminal",
|
|
27
28
|
description: "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.",
|
|
28
29
|
})))
|
|
@@ -30,54 +31,54 @@ export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
|
|
|
30
31
|
params: { sessionID: Session.ID },
|
|
31
32
|
success: Schema.Struct({ data: Schema.Array(PersistentPty.Info) }),
|
|
32
33
|
error: errors,
|
|
33
|
-
}))
|
|
34
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.list" })))
|
|
34
35
|
.add(HttpApiEndpoint.post("persistentPty.create", "/api/experimental/session/:sessionID/terminal", {
|
|
35
36
|
params: { sessionID: Session.ID },
|
|
36
37
|
payload: PersistentPty.CreateInput,
|
|
37
38
|
success: Schema.Struct({ data: PersistentPty.Info }),
|
|
38
39
|
error: errors,
|
|
39
|
-
}))
|
|
40
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.create" })))
|
|
40
41
|
.add(HttpApiEndpoint.post("persistentPty.shutdown", "/api/experimental/persistent-pty/shutdown", {
|
|
41
42
|
success: HttpApiSchema.NoContent,
|
|
42
43
|
error: [ServiceUnavailableError],
|
|
43
|
-
}))
|
|
44
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.shutdown" })))
|
|
44
45
|
.add(HttpApiEndpoint.post("persistentPty.handoff", "/api/experimental/persistent-pty/handoff", {
|
|
45
46
|
success: Schema.Struct({ handoff: Schema.NullOr(PersistentPty.Handoff) }),
|
|
46
47
|
error: [ServiceUnavailableError],
|
|
47
|
-
}))
|
|
48
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.handoff" })))
|
|
48
49
|
.add(HttpApiEndpoint.get("persistentPty.get", "/api/experimental/persistent-pty/:ptyID", {
|
|
49
50
|
params: { ptyID: Pty.ID },
|
|
50
51
|
success: Schema.Struct({ data: PersistentPty.Info }),
|
|
51
52
|
error: terminalErrors,
|
|
52
|
-
}))
|
|
53
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.get" })))
|
|
53
54
|
.add(HttpApiEndpoint.put("persistentPty.update", "/api/experimental/persistent-pty/:ptyID", {
|
|
54
55
|
params: { ptyID: Pty.ID },
|
|
55
56
|
payload: PersistentPty.UpdateInput,
|
|
56
57
|
success: Schema.Struct({ data: PersistentPty.Info }),
|
|
57
58
|
error: terminalErrors,
|
|
58
|
-
}))
|
|
59
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.update" })))
|
|
59
60
|
.add(HttpApiEndpoint.get("persistentPty.snapshot", "/api/experimental/persistent-pty/:ptyID/snapshot", {
|
|
60
61
|
params: { ptyID: Pty.ID },
|
|
61
62
|
success: Schema.Struct({ data: PersistentPty.Snapshot }),
|
|
62
63
|
error: terminalErrors,
|
|
63
|
-
}))
|
|
64
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.snapshot" })))
|
|
64
65
|
.add(HttpApiEndpoint.delete("persistentPty.remove", "/api/experimental/persistent-pty/:ptyID", {
|
|
65
66
|
params: { ptyID: Pty.ID },
|
|
66
67
|
success: HttpApiSchema.NoContent,
|
|
67
68
|
error: terminalErrors,
|
|
68
|
-
}))
|
|
69
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.remove" })))
|
|
69
70
|
.add(HttpApiEndpoint.post("persistentPty.connectToken", "/api/experimental/persistent-pty/:ptyID/connect-token", {
|
|
70
71
|
params: { ptyID: Pty.ID },
|
|
71
72
|
headers: Schema.Struct({ [PTY_CONNECT_TOKEN_HEADER]: Schema.optional(Schema.String) }),
|
|
72
73
|
success: Schema.Struct({ data: PtyTicket.ConnectToken }),
|
|
73
74
|
error: [ForbiddenError, PtyNotFoundError, ServiceUnavailableError],
|
|
74
|
-
}))
|
|
75
|
+
}).annotateMerge(OpenApi.annotations({ identifier: "experimental.persistentPty.connectToken" })))
|
|
75
76
|
.add(HttpApiEndpoint.get("persistentPty.connect", PERSISTENT_PTY_CONNECT_PATH, {
|
|
76
77
|
params: { ptyID: Pty.ID },
|
|
77
78
|
success: Schema.Boolean,
|
|
78
79
|
error: [ForbiddenError, PtyNotFoundError, ServiceUnavailableError],
|
|
79
80
|
}).annotateMerge(OpenApi.annotations({
|
|
80
|
-
identifier: "persistentPty.connect",
|
|
81
|
+
identifier: "experimental.persistentPty.connect",
|
|
81
82
|
summary: "Connect to a persistent PTY",
|
|
82
83
|
description: "Stream persistent PTY output through the OpenCode server.",
|
|
83
84
|
transform: (operation) => ({
|
package/dist/groups/session.js
CHANGED
|
@@ -475,7 +475,7 @@ export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddlewa
|
|
|
475
475
|
}),
|
|
476
476
|
error: SessionNotFoundError,
|
|
477
477
|
}).annotateMerge(OpenApi.annotations({
|
|
478
|
-
identifier: "session.log",
|
|
478
|
+
identifier: "experimental.session.log",
|
|
479
479
|
summary: "Read the session log",
|
|
480
480
|
description: "Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.",
|
|
481
481
|
})))
|
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-197",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"typecheck:tsc": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@opencode/schema": "0.0.0-dev-
|
|
38
|
+
"@opencode/schema": "0.0.0-dev-197",
|
|
39
39
|
"effect": "4.0.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|