@opencode/client 2.0.8 → 2.0.9
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/chunks/pty-handoff-1tbj6z39.js +81 -0
- package/dist/chunks/pty-handoff-4tveyqeh.js +34 -0
- package/dist/chunks/pty-handoff-65kht65h.js +62 -0
- package/dist/chunks/pty-handoff-6mptkzbc.js +0 -0
- package/dist/chunks/pty-handoff-9rqn6x4v.js +16 -0
- package/dist/chunks/pty-handoff-atpwm825.js +1638 -0
- package/dist/chunks/pty-handoff-bssvn03b.js +594 -0
- package/dist/chunks/pty-handoff-frbwqjmf.js +145 -0
- package/dist/chunks/pty-handoff-m2eywc8w.js +0 -0
- package/dist/chunks/pty-handoff-n3c99vt5.js +11 -0
- package/dist/chunks/pty-handoff-nqd0dnpk.js +112 -0
- package/dist/chunks/pty-handoff-qav6mfdz.js +0 -0
- package/dist/chunks/pty-handoff-radw39tv.js +1402 -0
- package/dist/chunks/pty-handoff-sxt88q69.js +12 -0
- package/dist/chunks/pty-handoff-t1xa31vm.js +39 -0
- package/dist/chunks/pty-handoff-txckps9j.js +57 -0
- package/dist/chunks/pty-handoff-vgxtr9hm.js +30 -0
- package/dist/chunks/pty-handoff-vmytr4q8.js +4 -0
- package/dist/chunks/pty-handoff-vyas3vgt.js +0 -0
- package/dist/chunks/pty-handoff-xgnj2w4v.js +20 -0
- package/dist/chunks/pty-handoff-y2etg5bs.js +9 -0
- package/dist/chunks/pty-handoff-ydhz1zrh.js +238 -0
- package/dist/chunks/pty-handoff-yepdgb80.js +44 -0
- package/dist/chunks/pty-handoff-zadn5mwr.js +52 -0
- package/dist/contract.js +12 -1
- package/dist/effect/client.d.ts +4 -4
- package/dist/effect/client.js +15 -29
- package/dist/effect/generated/client-error.js +6 -5
- package/dist/effect/generated/client.d.ts +4 -4
- package/dist/effect/generated/client.js +8 -582
- package/dist/effect/generated/index.js +12 -2
- package/dist/effect/index.js +75 -30
- package/dist/effect/rpc.js +11 -49
- package/dist/effect/service.js +238 -245
- package/dist/promise/client.js +14 -13
- package/dist/promise/generated/client-error.js +6 -8
- package/dist/promise/generated/client.js +7 -1396
- package/dist/promise/generated/index.js +75 -3
- package/dist/promise/generated/types.d.ts +90 -88
- package/dist/promise/generated/types.js +66 -34
- package/dist/promise/index.js +79 -2
- package/dist/promise/rpc.js +7 -86
- package/dist/promise/service.js +230 -227
- package/dist/pty-handoff.js +14 -121
- package/dist/rpc-runtime.js +14 -32
- package/dist/service-contender.js +10 -56
- package/dist/service-timing.d.ts +0 -1
- package/dist/service-timing.js +9 -18
- package/dist/service-version.js +6 -9
- package/dist/service.js +1 -0
- package/dist/shared-events.js +8 -137
- package/dist/solid/connection.js +10 -246
- package/dist/solid/data.js +18 -1774
- package/dist/solid/index.js +32 -3
- package/dist/solid/pty.js +8 -41
- package/package.json +4 -4
package/dist/solid/index.js
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import"../chunks/pty-handoff-n3c99vt5.js";
|
|
2
|
+
import"../chunks/pty-handoff-radw39tv.js";
|
|
3
|
+
import"../chunks/pty-handoff-4tveyqeh.js";
|
|
4
|
+
import"../chunks/pty-handoff-vyas3vgt.js";
|
|
5
|
+
import"../chunks/pty-handoff-frbwqjmf.js";
|
|
6
|
+
import"../chunks/pty-handoff-1tbj6z39.js";
|
|
7
|
+
import"../chunks/pty-handoff-vgxtr9hm.js";
|
|
8
|
+
import"../chunks/pty-handoff-m2eywc8w.js";
|
|
9
|
+
import {
|
|
10
|
+
settleMs2,
|
|
11
|
+
locationKey2,
|
|
12
|
+
createData2
|
|
13
|
+
} from "../chunks/pty-handoff-atpwm825.js";
|
|
14
|
+
import {
|
|
15
|
+
defaultIdleTimeout2,
|
|
16
|
+
foregroundIdleThreshold2,
|
|
17
|
+
createClientConnection2
|
|
18
|
+
} from "../chunks/pty-handoff-ydhz1zrh.js";
|
|
19
|
+
import {
|
|
20
|
+
createPtyClient2,
|
|
21
|
+
createPersistentPtyClient2
|
|
22
|
+
} from "../chunks/pty-handoff-yepdgb80.js";
|
|
23
|
+
export {
|
|
24
|
+
createClientConnection2 as createClientConnection,
|
|
25
|
+
createData2 as createData,
|
|
26
|
+
createPersistentPtyClient2 as createPersistentPtyClient,
|
|
27
|
+
createPtyClient2 as createPtyClient,
|
|
28
|
+
defaultIdleTimeout2 as defaultIdleTimeout,
|
|
29
|
+
foregroundIdleThreshold2 as foregroundIdleThreshold,
|
|
30
|
+
locationKey2 as locationKey,
|
|
31
|
+
settleMs2 as settleMs
|
|
32
|
+
};
|
package/dist/solid/pty.js
CHANGED
|
@@ -1,41 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const url = new URL(`/api/pty/${encodeURIComponent(input.ptyID)}/connect`, options.url);
|
|
10
|
-
if (input.location?.directory)
|
|
11
|
-
url.searchParams.set("location[directory]", input.location.directory);
|
|
12
|
-
if (input.cursor !== undefined)
|
|
13
|
-
url.searchParams.set("cursor", String(input.cursor));
|
|
14
|
-
url.searchParams.set("ticket", result.data.ticket);
|
|
15
|
-
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
|
|
16
|
-
const socket = options.openSocket?.(url) ?? new WebSocket(url);
|
|
17
|
-
socket.binaryType = "arraybuffer";
|
|
18
|
-
return socket;
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export function createPersistentPtyClient(api, options) {
|
|
23
|
-
return {
|
|
24
|
-
async connect(input) {
|
|
25
|
-
const token = await api.experimental.persistentPty.connectToken({
|
|
26
|
-
ptyID: input.ptyID,
|
|
27
|
-
"x-opencode-ticket": "1",
|
|
28
|
-
});
|
|
29
|
-
const url = new URL(`/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect`, options.url);
|
|
30
|
-
url.searchParams.set("ticket", token.ticket);
|
|
31
|
-
url.searchParams.set("cursor", String(input.cursor));
|
|
32
|
-
url.searchParams.set("attachment_id", input.attachmentID);
|
|
33
|
-
url.searchParams.set("takeover", String(input.takeover ?? false));
|
|
34
|
-
url.searchParams.set("input_protocol", "1");
|
|
35
|
-
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
|
|
36
|
-
const socket = options.openSocket?.(url) ?? new WebSocket(url);
|
|
37
|
-
socket.binaryType = "arraybuffer";
|
|
38
|
-
return socket;
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
createPtyClient2,
|
|
3
|
+
createPersistentPtyClient2
|
|
4
|
+
} from "../chunks/pty-handoff-yepdgb80.js";
|
|
5
|
+
export {
|
|
6
|
+
createPersistentPtyClient2 as createPersistentPtyClient,
|
|
7
|
+
createPtyClient2 as createPtyClient
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/client",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"typecheck": "tsgo --noEmit"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@opencode/schema": "2.0.
|
|
61
|
-
"@opencode/protocol": "2.0.
|
|
60
|
+
"@opencode/schema": "2.0.9",
|
|
61
|
+
"@opencode/protocol": "2.0.9"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"effect": "4.0.0-rc.112",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
77
|
-
"@opencode/httpapi-codegen": "2.0.
|
|
77
|
+
"@opencode/httpapi-codegen": "2.0.9",
|
|
78
78
|
"@tsconfig/bun": "1.0.9",
|
|
79
79
|
"@types/bun": "1.4.0",
|
|
80
80
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|