@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.
Files changed (56) hide show
  1. package/dist/chunks/pty-handoff-1tbj6z39.js +81 -0
  2. package/dist/chunks/pty-handoff-4tveyqeh.js +34 -0
  3. package/dist/chunks/pty-handoff-65kht65h.js +62 -0
  4. package/dist/chunks/pty-handoff-6mptkzbc.js +0 -0
  5. package/dist/chunks/pty-handoff-9rqn6x4v.js +16 -0
  6. package/dist/chunks/pty-handoff-atpwm825.js +1638 -0
  7. package/dist/chunks/pty-handoff-bssvn03b.js +594 -0
  8. package/dist/chunks/pty-handoff-frbwqjmf.js +145 -0
  9. package/dist/chunks/pty-handoff-m2eywc8w.js +0 -0
  10. package/dist/chunks/pty-handoff-n3c99vt5.js +11 -0
  11. package/dist/chunks/pty-handoff-nqd0dnpk.js +112 -0
  12. package/dist/chunks/pty-handoff-qav6mfdz.js +0 -0
  13. package/dist/chunks/pty-handoff-radw39tv.js +1402 -0
  14. package/dist/chunks/pty-handoff-sxt88q69.js +12 -0
  15. package/dist/chunks/pty-handoff-t1xa31vm.js +39 -0
  16. package/dist/chunks/pty-handoff-txckps9j.js +57 -0
  17. package/dist/chunks/pty-handoff-vgxtr9hm.js +30 -0
  18. package/dist/chunks/pty-handoff-vmytr4q8.js +4 -0
  19. package/dist/chunks/pty-handoff-vyas3vgt.js +0 -0
  20. package/dist/chunks/pty-handoff-xgnj2w4v.js +20 -0
  21. package/dist/chunks/pty-handoff-y2etg5bs.js +9 -0
  22. package/dist/chunks/pty-handoff-ydhz1zrh.js +238 -0
  23. package/dist/chunks/pty-handoff-yepdgb80.js +44 -0
  24. package/dist/chunks/pty-handoff-zadn5mwr.js +52 -0
  25. package/dist/contract.js +12 -1
  26. package/dist/effect/client.d.ts +4 -4
  27. package/dist/effect/client.js +15 -29
  28. package/dist/effect/generated/client-error.js +6 -5
  29. package/dist/effect/generated/client.d.ts +4 -4
  30. package/dist/effect/generated/client.js +8 -582
  31. package/dist/effect/generated/index.js +12 -2
  32. package/dist/effect/index.js +75 -30
  33. package/dist/effect/rpc.js +11 -49
  34. package/dist/effect/service.js +238 -245
  35. package/dist/promise/client.js +14 -13
  36. package/dist/promise/generated/client-error.js +6 -8
  37. package/dist/promise/generated/client.js +7 -1396
  38. package/dist/promise/generated/index.js +75 -3
  39. package/dist/promise/generated/types.d.ts +90 -88
  40. package/dist/promise/generated/types.js +66 -34
  41. package/dist/promise/index.js +79 -2
  42. package/dist/promise/rpc.js +7 -86
  43. package/dist/promise/service.js +230 -227
  44. package/dist/pty-handoff.js +14 -121
  45. package/dist/rpc-runtime.js +14 -32
  46. package/dist/service-contender.js +10 -56
  47. package/dist/service-timing.d.ts +0 -1
  48. package/dist/service-timing.js +9 -18
  49. package/dist/service-version.js +6 -9
  50. package/dist/service.js +1 -0
  51. package/dist/shared-events.js +8 -137
  52. package/dist/solid/connection.js +10 -246
  53. package/dist/solid/data.js +18 -1774
  54. package/dist/solid/index.js +32 -3
  55. package/dist/solid/pty.js +8 -41
  56. package/package.json +4 -4
@@ -1,3 +1,32 @@
1
- export * from "./data";
2
- export * from "./connection";
3
- export * from "./pty";
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
- export function createPtyClient(api, options) {
2
- return {
3
- async connect(input) {
4
- const result = await api.pty.connect.token({
5
- ptyID: input.ptyID,
6
- location: input.location,
7
- "x-opencode-ticket": "1",
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.8",
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.8",
61
- "@opencode/protocol": "2.0.8"
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.8",
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",