@opencode/client 2.0.23 → 2.0.24

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 (60) hide show
  1. package/dist/chunks/{service-version-1y4a697q.js → pty-handoff-1y4a697q.js} +1 -1
  2. package/dist/chunks/{service-version-7yt87z36.js → pty-handoff-5yf5aaev.js} +10 -10
  3. package/dist/chunks/{service-version-02j88w0z.js → pty-handoff-71wkqa80.js} +1 -1
  4. package/dist/chunks/{service-version-y2etg5bs.js → pty-handoff-7f0py9js.js} +2 -2
  5. package/dist/chunks/pty-handoff-ank0d71z.js +75 -0
  6. package/dist/chunks/pty-handoff-cqfz2qxq.js +30 -0
  7. package/dist/chunks/{service-version-frbwqjmf.js → pty-handoff-frbwqjmf.js} +1 -1
  8. package/dist/chunks/{service-version-nwcpakzx.js → pty-handoff-js54wxgp.js} +2 -2
  9. package/dist/chunks/{service-version-21favj1f.js → pty-handoff-myyn5x39.js} +17 -17
  10. package/dist/chunks/{service-version-nyqggzs9.js → pty-handoff-qzsnm4q8.js} +19 -19
  11. package/dist/chunks/{service-version-e5ea35j7.js → pty-handoff-src6by76.js} +10 -1
  12. package/dist/chunks/{service-version-t1xa31vm.js → pty-handoff-t1xa31vm.js} +1 -1
  13. package/dist/chunks/{service-version-6f43cgzz.js → pty-handoff-ve4aws36.js} +47 -2
  14. package/dist/chunks/{service-version-z6qdwcsf.js → pty-handoff-w1w809zr.js} +5 -5
  15. package/dist/contract.js +1 -1
  16. package/dist/effect/client.js +12 -12
  17. package/dist/effect/generated/client-error.js +3 -3
  18. package/dist/effect/generated/client.js +5 -5
  19. package/dist/effect/generated/index.js +8 -8
  20. package/dist/effect/index.js +12 -12
  21. package/dist/effect/rpc.js +4 -4
  22. package/dist/effect/service.d.ts +5 -7
  23. package/dist/effect/service.js +39 -122
  24. package/dist/promise/client.js +11 -11
  25. package/dist/promise/generated/client-error.js +3 -3
  26. package/dist/promise/generated/client.js +4 -4
  27. package/dist/promise/generated/index.js +8 -8
  28. package/dist/promise/generated/types.js +1 -1
  29. package/dist/promise/index.js +12 -12
  30. package/dist/promise/rpc.js +2 -2
  31. package/dist/promise/service.d.ts +2 -4
  32. package/dist/promise/service.js +36 -122
  33. package/dist/pty-handoff.js +1 -1
  34. package/dist/rpc-runtime.js +1 -1
  35. package/dist/service-contender.d.ts +27 -1
  36. package/dist/service-contender.js +3 -3
  37. package/dist/service-probe.d.ts +53 -0
  38. package/dist/service-probe.js +13 -0
  39. package/dist/service-timing.js +1 -1
  40. package/dist/service-version.js +1 -1
  41. package/dist/service.js +1 -1
  42. package/dist/shared-events.js +1 -1
  43. package/dist/solid/connection.js +1 -1
  44. package/dist/solid/data.d.ts +3 -0
  45. package/dist/solid/data.js +9 -9
  46. package/dist/solid/index.js +11 -11
  47. package/dist/solid/pty.js +1 -1
  48. package/package.json +4 -4
  49. package/dist/chunks/service-version-gah0fg5v.js +0 -30
  50. /package/dist/chunks/{service-version-6mptkzbc.js → pty-handoff-6mptkzbc.js} +0 -0
  51. /package/dist/chunks/{service-version-9rqn6x4v.js → pty-handoff-9rqn6x4v.js} +0 -0
  52. /package/dist/chunks/{service-version-gne7h7mq.js → pty-handoff-gne7h7mq.js} +0 -0
  53. /package/dist/chunks/{service-version-m2eywc8w.js → pty-handoff-m2eywc8w.js} +0 -0
  54. /package/dist/chunks/{service-version-qav6mfdz.js → pty-handoff-qav6mfdz.js} +0 -0
  55. /package/dist/chunks/{service-version-sxt88q69.js → pty-handoff-sxt88q69.js} +0 -0
  56. /package/dist/chunks/{service-version-vmytr4q8.js → pty-handoff-vmytr4q8.js} +0 -0
  57. /package/dist/chunks/{service-version-vt9jbch8.js → pty-handoff-vt9jbch8.js} +0 -0
  58. /package/dist/chunks/{service-version-vyas3vgt.js → pty-handoff-vyas3vgt.js} +0 -0
  59. /package/dist/chunks/{service-version-xgnj2w4v.js → pty-handoff-xgnj2w4v.js} +0 -0
  60. /package/dist/chunks/{service-version-ydhz1zrh.js → pty-handoff-ydhz1zrh.js} +0 -0
@@ -1,27 +1,30 @@
1
1
  import {
2
2
  spawnServiceContender2,
3
- contenderFailure2,
4
- contenderFinished2
5
- } from "../chunks/service-version-6f43cgzz.js";
3
+ contenderPool2
4
+ } from "../chunks/pty-handoff-ve4aws36.js";
6
5
  import {
7
6
  defaultEnsureTiming2,
8
7
  ensureTiming2
9
- } from "../chunks/service-version-xgnj2w4v.js";
8
+ } from "../chunks/pty-handoff-xgnj2w4v.js";
10
9
  import {
11
10
  matchesVersion2
12
- } from "../chunks/service-version-sxt88q69.js";
11
+ } from "../chunks/pty-handoff-sxt88q69.js";
13
12
  import {
14
13
  prepare2,
15
14
  environment2,
16
15
  complete2,
17
16
  clear2
18
- } from "../chunks/service-version-02j88w0z.js";
19
- import"../chunks/service-version-qav6mfdz.js";
17
+ } from "../chunks/pty-handoff-71wkqa80.js";
18
+ import {
19
+ fallback2,
20
+ same2,
21
+ probeResult2,
22
+ headers2
23
+ } from "../chunks/pty-handoff-ank0d71z.js";
24
+ import"../chunks/pty-handoff-qav6mfdz.js";
20
25
 
21
26
  // src/promise/service.ts
22
27
  import { readFile, rm } from "node:fs/promises";
23
- import { homedir } from "node:os";
24
- import { join } from "node:path";
25
28
  async function discover(options = {}) {
26
29
  const found = (await registered(options.file)).service;
27
30
  if (found?.state !== "ready")
@@ -35,12 +38,9 @@ async function discover(options = {}) {
35
38
  async function ensure(options = {}) {
36
39
  const timing = ensureTiming2(options);
37
40
  const deadline = Date.now() + timing.promiseTimeout;
38
- const contenders = new Set;
41
+ const pool = contenderPool2(timing);
39
42
  let timeouts;
40
43
  let announced = false;
41
- let lastSpawn = 0;
42
- let spawnDelay = timing.spawnDelay;
43
- let failure;
44
44
  const announce = (reason, previousVersion) => {
45
45
  if (announced)
46
46
  return;
@@ -52,7 +52,7 @@ async function ensure(options = {}) {
52
52
  if (command === undefined)
53
53
  throw new Error("Missing service command");
54
54
  try {
55
- return spawnServiceContender2(command, args, await environment2(options.file ?? fallback(), options.env));
55
+ return spawnServiceContender2(command, args, await environment2(options.file ?? fallback2(), options.env));
56
56
  } catch (cause) {
57
57
  throw new Error("Failed to start server", { cause });
58
58
  }
@@ -60,39 +60,33 @@ async function ensure(options = {}) {
60
60
  try {
61
61
  while (true) {
62
62
  if (Date.now() >= deadline)
63
- throw failure ?? new Error("Timed out waiting for the background service to start");
63
+ throw pool.failure() ?? new Error("Timed out waiting for the background service to start");
64
64
  const registration = await registered(options.file, timing.requestTimeout);
65
65
  if (registration.timedOut && registration.info !== undefined) {
66
66
  timeouts = {
67
67
  info: registration.info,
68
- count: timeouts !== undefined && same(timeouts.info, registration.info) ? timeouts.count + 1 : 1
68
+ count: timeouts !== undefined && same2(timeouts.info, registration.info) ? timeouts.count + 1 : 1
69
69
  };
70
70
  if (timeouts.count >= 3) {
71
71
  announce("missing");
72
72
  console.warn("Background service is unresponsive; recovery cannot preserve persistent terminals");
73
- await clear2(options.file ?? fallback());
73
+ await clear2(options.file ?? fallback2());
74
74
  await terminate(registration.info, options, timing);
75
- for (const item of contenders) {
76
- if (item.child.pid === registration.info.pid || contenderFinished2(item)) {
77
- item.release();
78
- contenders.delete(item);
79
- }
80
- }
81
- failure = undefined;
75
+ pool.evict(registration.info.pid);
76
+ pool.recruitNow();
82
77
  timeouts = undefined;
83
- lastSpawn = Date.now() - spawnDelay;
84
78
  }
85
79
  } else
86
80
  timeouts = undefined;
87
81
  if (registration.service !== undefined) {
88
- spawnDelay = timing.spawnDelay;
82
+ pool.serviceAnswered();
89
83
  const service2 = registration.service;
90
84
  const versionMatches = matchesVersion2(service2.version, options);
91
85
  const compatible = service2.compatible && versionMatches;
92
86
  if (!service2.compatible && versionMatches)
93
87
  throw new Error("Background service uses an incompatible health protocol. Update this client or explicitly restart the service.");
94
88
  if (compatible && service2.state === "ready") {
95
- await complete2(options.file ?? fallback(), service2.info);
89
+ await complete2(options.file ?? fallback2(), service2.info);
96
90
  return service2.endpoint;
97
91
  }
98
92
  if (compatible && service2.state === "failed")
@@ -107,56 +101,31 @@ async function ensure(options = {}) {
107
101
  }).catch(() => {
108
102
  return;
109
103
  });
110
- for (const item of contenders) {
111
- if (item.child.pid === service2.info.pid || contenderFinished2(item)) {
112
- item.release();
113
- contenders.delete(item);
114
- }
115
- }
116
- failure = undefined;
117
- lastSpawn = 0;
104
+ pool.evict(service2.info.pid);
118
105
  }
119
106
  } else {
120
- if (lastSpawn === 0 && registration.info !== undefined)
121
- lastSpawn = Date.now();
122
- const finished = [...contenders].filter(contenderFinished2);
123
- failure ??= finished.map(contenderFailure2).find((error) => error !== undefined);
124
- if (finished.some((item) => item.child.exitCode === 0)) {
125
- spawnDelay = Math.min(spawnDelay * 2, timing.maxSpawnDelay);
126
- }
127
- finished.forEach((item) => contenders.delete(item));
128
- if (failure !== undefined && contenders.size === 0)
129
- throw failure;
130
- if (failure === undefined && contenders.size < 2 && Date.now() - lastSpawn >= spawnDelay) {
107
+ const failed = pool.reap();
108
+ if (failed !== undefined)
109
+ throw failed;
110
+ if (pool.shouldRecruit(registration.info !== undefined)) {
131
111
  announce("missing");
132
- contenders.add(await spawnContender());
133
- lastSpawn = Date.now();
112
+ pool.add(await spawnContender());
134
113
  }
135
114
  }
136
115
  await delay(timing.pollInterval);
137
116
  }
138
117
  } finally {
139
- contenders.forEach((contender) => contender.release());
118
+ pool.releaseAll();
140
119
  }
141
120
  }
142
121
  async function stop(options = {}) {
143
122
  const info = await read(options.file);
144
- await (options.pty === "handoff" && info !== undefined ? prepare2(options.file ?? fallback(), info, defaultEnsureTiming2.requestTimeout) : clear2(options.file ?? fallback())).catch((cause) => console.warn("Failed to prepare persistent terminals for replacement", cause));
123
+ await (options.pty === "handoff" && info !== undefined ? prepare2(options.file ?? fallback2(), info, defaultEnsureTiming2.requestTimeout) : clear2(options.file ?? fallback2())).catch((cause) => console.warn("Failed to prepare persistent terminals for replacement", cause));
145
124
  if (info !== undefined)
146
125
  await terminate(info, options, ensureTiming2(options));
147
126
  }
148
- function fallback() {
149
- return join(process.env["XDG_STATE_HOME"] ?? join(homedir(), ".local", "state"), "opencode", "service.json");
150
- }
151
- function headers(endpoint) {
152
- if (endpoint.auth === undefined)
153
- return;
154
- return {
155
- authorization: "Basic " + Buffer.from(endpoint.auth.username + ":" + endpoint.auth.password).toString("base64")
156
- };
157
- }
158
127
  async function read(file) {
159
- const text = await readFile(file ?? fallback(), "utf8").catch(() => {
128
+ const text = await readFile(file ?? fallback2(), "utf8").catch(() => {
160
129
  return;
161
130
  });
162
131
  if (text === undefined)
@@ -167,63 +136,11 @@ async function read(file) {
167
136
  return;
168
137
  }
169
138
  }
170
- async function probeResult(info, timeout = defaultEnsureTiming2.requestTimeout) {
171
- const endpoint = {
172
- url: info.url,
173
- auth: info.password === undefined ? undefined : { type: "basic", username: "opencode", password: info.password }
174
- };
175
- const signal = AbortSignal.timeout(timeout);
176
- const result = await fetch(new URL("/api/info", info.url), { headers: headers(endpoint), signal }).then(async (response) => ({
177
- response,
178
- body: response.status === 404 ? undefined : await response.json()
179
- })).then((value) => ({ value }), (cause) => ({ cause }));
180
- if ("cause" in result)
181
- return { service: undefined, timedOut: signal.aborted };
182
- const response = result.value.response;
183
- if (response.status === 404)
184
- return {
185
- service: {
186
- info,
187
- endpoint,
188
- version: info.version,
189
- state: "ready",
190
- compatible: false
191
- },
192
- timedOut: false
193
- };
194
- const serverInfo = decodeInfo(result.value.body);
195
- if (serverInfo !== undefined) {
196
- if (serverInfo.pid !== info.pid)
197
- return { service: undefined, timedOut: false };
198
- if (info.version !== undefined && serverInfo.version !== info.version)
199
- return { service: undefined, timedOut: false };
200
- return {
201
- service: {
202
- info,
203
- endpoint,
204
- version: serverInfo.version,
205
- state: response.ok ? "ready" : response.status === 500 ? "failed" : "waiting",
206
- compatible: true
207
- },
208
- timedOut: false
209
- };
210
- }
211
- return { service: undefined, timedOut: false };
212
- }
213
- function decodeInfo(input) {
214
- if (typeof input !== "object" || input === null)
215
- return;
216
- if (!("version" in input) || typeof input.version !== "string")
217
- return;
218
- if (!("pid" in input) || typeof input.pid !== "number" || !Number.isInteger(input.pid) || input.pid < 0)
219
- return;
220
- return { version: input.version, pid: input.pid };
221
- }
222
139
  async function registered(file, timeout) {
223
140
  const info = await read(file);
224
141
  if (info === undefined)
225
142
  return { info: undefined, service: undefined, timedOut: false };
226
- return { info, ...await probeResult(info, timeout) };
143
+ return { info, ...await probeResult2(info, timeout) };
227
144
  }
228
145
  function signal(pid, name) {
229
146
  try {
@@ -247,12 +164,9 @@ async function waitUntilStopped(pid, timing) {
247
164
  }
248
165
  return false;
249
166
  }
250
- function same(left, right) {
251
- return left.id === right.id && left.version === right.version && left.url === right.url && left.pid === right.pid;
252
- }
253
167
  async function terminate(info, options, timing) {
254
168
  const current = await read(options.file);
255
- if (current === undefined || !same(current, info))
169
+ if (current === undefined || !same2(current, info))
256
170
  return;
257
171
  signal(info.pid, "SIGTERM");
258
172
  if (!await waitUntilStopped(info.pid, timing)) {
@@ -261,18 +175,18 @@ async function terminate(info, options, timing) {
261
175
  throw new Error(`Server process ${info.pid} is still running`);
262
176
  }
263
177
  const latest = await read(options.file);
264
- if (latest === undefined || !same(latest, info))
178
+ if (latest === undefined || !same2(latest, info))
265
179
  return;
266
- await rm(options.file ?? fallback(), { force: true });
180
+ await rm(options.file ?? fallback2(), { force: true });
267
181
  }
268
182
  function delay(milliseconds) {
269
183
  return new Promise((resolve) => setTimeout(resolve, milliseconds));
270
184
  }
271
- var Service = { discover, ensure, stop, headers };
185
+ var Service = { discover, ensure, stop, headers: headers2 };
272
186
  export {
273
187
  Service,
274
188
  discover,
275
189
  ensure,
276
- headers,
190
+ headers2 as headers,
277
191
  stop
278
192
  };
@@ -4,7 +4,7 @@ import {
4
4
  complete2,
5
5
  clear2,
6
6
  exports_pty_handoff
7
- } from "./chunks/service-version-02j88w0z.js";
7
+ } from "./chunks/pty-handoff-71wkqa80.js";
8
8
  export {
9
9
  exports_pty_handoff as PtyHandoff,
10
10
  clear2 as clear,
@@ -4,7 +4,7 @@ import {
4
4
  event2,
5
5
  eventType2,
6
6
  exports_rpc_runtime
7
- } from "./chunks/service-version-t1xa31vm.js";
7
+ } from "./chunks/pty-handoff-t1xa31vm.js";
8
8
  export {
9
9
  exports_rpc_runtime as RpcRuntime,
10
10
  event2 as event,
@@ -1,4 +1,5 @@
1
1
  import { type ChildProcess } from "node:child_process";
2
+ import type { EnsureTiming } from "./service-timing.js";
2
3
  export type ServiceContender = {
3
4
  readonly child: ChildProcess;
4
5
  readonly error: () => Error | undefined;
@@ -7,5 +8,30 @@ export type ServiceContender = {
7
8
  readonly release: () => void;
8
9
  };
9
10
  export declare function spawnServiceContender(command: string, args: ReadonlyArray<string>, env?: Readonly<Record<string, string | undefined>>): ServiceContender;
10
- export declare function contenderFailure(contender: ServiceContender): Error | undefined;
11
+ /**
12
+ * The startup attempts of one `ensure()` call. It keeps at most two attempts alive, remembers
13
+ * the first startup failure, and backs off when attempts exit cleanly because another one won.
14
+ */
15
+ export declare function contenderPool(timing: EnsureTiming): {
16
+ /** The first startup failure seen since the last eviction. */
17
+ failure: () => Error | undefined;
18
+ /** A registered service answered, so the next attempt waits the base delay again. */
19
+ serviceAnswered(): void;
20
+ /**
21
+ * The owner `pid` was replaced. Drop its attempt and any finished ones, forget their
22
+ * failure, and restart the spawn clock.
23
+ */
24
+ evict(pid: number): void;
25
+ /** Let the next attempt start without waiting a spawn delay. */
26
+ recruitNow(): void;
27
+ /** Collect finished attempts. Returns the startup failure once no attempt is left alive. */
28
+ reap(): Error | undefined;
29
+ /**
30
+ * Whether to start another attempt now. A registration that has not answered yet gets one
31
+ * spawn delay before an attempt competes with it.
32
+ */
33
+ shouldRecruit(registered: boolean): boolean;
34
+ add(contender: ServiceContender): void;
35
+ releaseAll(): void;
36
+ };
11
37
  export declare function contenderFinished(contender: ServiceContender): boolean;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  spawnServiceContender2,
3
- contenderFailure2,
3
+ contenderPool2,
4
4
  contenderFinished2
5
- } from "./chunks/service-version-6f43cgzz.js";
5
+ } from "./chunks/pty-handoff-ve4aws36.js";
6
6
  export {
7
- contenderFailure2 as contenderFailure,
8
7
  contenderFinished2 as contenderFinished,
8
+ contenderPool2 as contenderPool,
9
9
  spawnServiceContender2 as spawnServiceContender
10
10
  };
@@ -0,0 +1,53 @@
1
+ import type { Endpoint, Info } from "./service.js";
2
+ export type LocalService = {
3
+ readonly info: Info;
4
+ readonly endpoint: Endpoint;
5
+ readonly version?: string;
6
+ readonly state: "ready" | "waiting" | "failed";
7
+ readonly compatible: boolean;
8
+ };
9
+ /** The default registration file. */
10
+ export declare function fallback(): string;
11
+ /** Whether two registrations describe the same service instance. */
12
+ export declare function same(left: Info, right: Info): boolean;
13
+ /** Ask a registered owner for its health and classify the answer. */
14
+ export declare function probeResult(info: Info, timeout?: number): Promise<{
15
+ service: undefined;
16
+ timedOut: boolean;
17
+ } | {
18
+ service: {
19
+ info: Info;
20
+ endpoint: {
21
+ url: string;
22
+ auth: {
23
+ type: "basic";
24
+ username: string;
25
+ password: string;
26
+ } | undefined;
27
+ };
28
+ version: string | undefined;
29
+ state: "ready";
30
+ compatible: false;
31
+ };
32
+ timedOut: boolean;
33
+ } | {
34
+ service: {
35
+ info: Info;
36
+ endpoint: {
37
+ url: string;
38
+ auth: {
39
+ type: "basic";
40
+ username: string;
41
+ password: string;
42
+ } | undefined;
43
+ };
44
+ version: string;
45
+ state: "failed" | "ready" | "waiting";
46
+ compatible: true;
47
+ };
48
+ timedOut: boolean;
49
+ }>;
50
+ /** Create HTTP authentication headers for a service endpoint. */
51
+ export declare function headers(endpoint: Endpoint): {
52
+ authorization: string;
53
+ } | undefined;
@@ -0,0 +1,13 @@
1
+ import {
2
+ fallback2,
3
+ same2,
4
+ probeResult2,
5
+ headers2
6
+ } from "./chunks/pty-handoff-ank0d71z.js";
7
+ import"./chunks/pty-handoff-xgnj2w4v.js";
8
+ export {
9
+ fallback2 as fallback,
10
+ headers2 as headers,
11
+ probeResult2 as probeResult,
12
+ same2 as same
13
+ };
@@ -2,7 +2,7 @@ import {
2
2
  defaultEnsureTiming2,
3
3
  ensureTiming2,
4
4
  withEnsureTiming2
5
- } from "./chunks/service-version-xgnj2w4v.js";
5
+ } from "./chunks/pty-handoff-xgnj2w4v.js";
6
6
  export {
7
7
  defaultEnsureTiming2 as defaultEnsureTiming,
8
8
  ensureTiming2 as ensureTiming,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  matchesVersion2
3
- } from "./chunks/service-version-sxt88q69.js";
3
+ } from "./chunks/pty-handoff-sxt88q69.js";
4
4
  export {
5
5
  matchesVersion2 as matchesVersion
6
6
  };
package/dist/service.js CHANGED
@@ -1 +1 @@
1
- import"./chunks/service-version-qav6mfdz.js";
1
+ import"./chunks/pty-handoff-qav6mfdz.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  make7,
3
3
  exports_shared_events
4
- } from "./chunks/service-version-frbwqjmf.js";
4
+ } from "./chunks/pty-handoff-frbwqjmf.js";
5
5
  export {
6
6
  exports_shared_events as SharedEvents,
7
7
  make7 as make
@@ -2,7 +2,7 @@ import {
2
2
  defaultIdleTimeout2,
3
3
  foregroundIdleThreshold2,
4
4
  createClientConnection2
5
- } from "../chunks/service-version-ydhz1zrh.js";
5
+ } from "../chunks/pty-handoff-ydhz1zrh.js";
6
6
  export {
7
7
  createClientConnection2 as createClientConnection,
8
8
  defaultIdleTimeout2 as defaultIdleTimeout,
@@ -50,6 +50,7 @@ export declare function createData(config: CreateDataInput): {
50
50
  evict(sessionID: string): void;
51
51
  cost(sessionID: string): number;
52
52
  status(sessionID: string): DataSessionStatus;
53
+ active(): string[];
53
54
  input: {
54
55
  list(sessionID: string): string[];
55
56
  has(sessionID: string, inboxID: string): boolean;
@@ -98,12 +99,14 @@ export declare function createData(config: CreateDataInput): {
98
99
  };
99
100
  permission: {
100
101
  list(sessionID: string): PermissionRequest[];
102
+ sessions(): string[];
101
103
  sync(sessionID: string): Promise<void>;
102
104
  invalidate(sessionID: string): void;
103
105
  reply(input: PermissionReplyInput): Promise<void>;
104
106
  };
105
107
  form: {
106
108
  list(sessionID: string, ref?: LocationRef): FormWithLocation[] | undefined;
109
+ sessions(): string[];
107
110
  sync(sessionID: string, ref?: LocationRef): Promise<void>;
108
111
  invalidate(sessionID: string, ref?: LocationRef): void;
109
112
  reply(input: SessionFormReplyInput, ref?: LocationRef): Promise<void>;
@@ -2,15 +2,15 @@ import {
2
2
  settleMs2,
3
3
  locationKey2,
4
4
  createData2
5
- } from "../chunks/service-version-e5ea35j7.js";
6
- import"../chunks/service-version-m2eywc8w.js";
7
- import"../chunks/service-version-gah0fg5v.js";
8
- import"../chunks/service-version-vyas3vgt.js";
9
- import"../chunks/service-version-nyqggzs9.js";
10
- import"../chunks/service-version-nwcpakzx.js";
11
- import"../chunks/service-version-1y4a697q.js";
12
- import"../chunks/service-version-vt9jbch8.js";
13
- import"../chunks/service-version-frbwqjmf.js";
5
+ } from "../chunks/pty-handoff-src6by76.js";
6
+ import"../chunks/pty-handoff-m2eywc8w.js";
7
+ import"../chunks/pty-handoff-cqfz2qxq.js";
8
+ import"../chunks/pty-handoff-vyas3vgt.js";
9
+ import"../chunks/pty-handoff-qzsnm4q8.js";
10
+ import"../chunks/pty-handoff-js54wxgp.js";
11
+ import"../chunks/pty-handoff-1y4a697q.js";
12
+ import"../chunks/pty-handoff-vt9jbch8.js";
13
+ import"../chunks/pty-handoff-frbwqjmf.js";
14
14
  export {
15
15
  createData2 as createData,
16
16
  locationKey2 as locationKey,
@@ -1,25 +1,25 @@
1
- import"../chunks/service-version-nwcpakzx.js";
2
- import"../chunks/service-version-nyqggzs9.js";
3
- import"../chunks/service-version-vt9jbch8.js";
4
- import"../chunks/service-version-vyas3vgt.js";
5
- import"../chunks/service-version-frbwqjmf.js";
6
- import"../chunks/service-version-1y4a697q.js";
7
- import"../chunks/service-version-gah0fg5v.js";
8
- import"../chunks/service-version-m2eywc8w.js";
1
+ import"../chunks/pty-handoff-js54wxgp.js";
2
+ import"../chunks/pty-handoff-qzsnm4q8.js";
3
+ import"../chunks/pty-handoff-vt9jbch8.js";
4
+ import"../chunks/pty-handoff-vyas3vgt.js";
5
+ import"../chunks/pty-handoff-frbwqjmf.js";
6
+ import"../chunks/pty-handoff-1y4a697q.js";
7
+ import"../chunks/pty-handoff-cqfz2qxq.js";
8
+ import"../chunks/pty-handoff-m2eywc8w.js";
9
9
  import {
10
10
  settleMs2,
11
11
  locationKey2,
12
12
  createData2
13
- } from "../chunks/service-version-e5ea35j7.js";
13
+ } from "../chunks/pty-handoff-src6by76.js";
14
14
  import {
15
15
  defaultIdleTimeout2,
16
16
  foregroundIdleThreshold2,
17
17
  createClientConnection2
18
- } from "../chunks/service-version-ydhz1zrh.js";
18
+ } from "../chunks/pty-handoff-ydhz1zrh.js";
19
19
  import {
20
20
  createPtyClient2,
21
21
  createPersistentPtyClient2
22
- } from "../chunks/service-version-gne7h7mq.js";
22
+ } from "../chunks/pty-handoff-gne7h7mq.js";
23
23
  export {
24
24
  createClientConnection2 as createClientConnection,
25
25
  createData2 as createData,
package/dist/solid/pty.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPtyClient2,
3
3
  createPersistentPtyClient2
4
- } from "../chunks/service-version-gne7h7mq.js";
4
+ } from "../chunks/pty-handoff-gne7h7mq.js";
5
5
  export {
6
6
  createPersistentPtyClient2 as createPersistentPtyClient,
7
7
  createPtyClient2 as createPtyClient
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.23",
4
+ "version": "2.0.24",
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.23",
61
- "@opencode/protocol": "2.0.23"
60
+ "@opencode/schema": "2.0.24",
61
+ "@opencode/protocol": "2.0.24"
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.23",
77
+ "@opencode/httpapi-codegen": "2.0.24",
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",
@@ -1,30 +0,0 @@
1
- import {
2
- make7
3
- } from "./service-version-frbwqjmf.js";
4
- import {
5
- make6
6
- } from "./service-version-nyqggzs9.js";
7
- import {
8
- makeRpc2
9
- } from "./service-version-1y4a697q.js";
10
- import {
11
- __export
12
- } from "./service-version-9rqn6x4v.js";
13
-
14
- // src/promise/client.ts
15
- var exports_client3 = {};
16
- __export(exports_client3, {
17
- OpenCode: () => exports_client3,
18
- make: () => make5
19
- });
20
- function make5(options) {
21
- const raw = make6(options);
22
- const events = make7((signal, onActivity) => raw.event.subscribe({ signal, onActivity }));
23
- return {
24
- ...raw,
25
- rpc: Object.assign(makeRpc2(raw, events), raw.rpc),
26
- event: events
27
- };
28
- }
29
-
30
- export { make5, exports_client3 };