@opencode/client 2.0.23 → 2.0.25

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 (65) hide show
  1. package/dist/chunks/{service-version-02j88w0z.js → service-probe-1thtawyv.js} +1 -1
  2. package/dist/chunks/{service-version-1y4a697q.js → service-probe-1y4a697q.js} +1 -1
  3. package/dist/chunks/service-probe-2ny4vxct.js +92 -0
  4. package/dist/chunks/{service-version-z6qdwcsf.js → service-probe-65kht65h.js} +5 -5
  5. package/dist/chunks/{service-version-nyqggzs9.js → service-probe-9h52wrcy.js} +11 -2
  6. package/dist/chunks/{service-version-frbwqjmf.js → service-probe-frbwqjmf.js} +1 -1
  7. package/dist/chunks/{service-version-t1xa31vm.js → service-probe-t1xa31vm.js} +1 -1
  8. package/dist/chunks/{service-version-e5ea35j7.js → service-probe-trz7kcxd.js} +23 -1
  9. package/dist/chunks/{service-version-6f43cgzz.js → service-probe-ve4aws36.js} +47 -2
  10. package/dist/chunks/{service-version-7yt87z36.js → service-probe-vnspkrex.js} +12 -7
  11. package/dist/chunks/{service-version-21favj1f.js → service-probe-y99g37y2.js} +9 -9
  12. package/dist/chunks/{service-version-gah0fg5v.js → service-probe-z1hcmzxa.js} +4 -4
  13. package/dist/contract.js +1 -1
  14. package/dist/effect/api/api.d.ts +12 -0
  15. package/dist/effect/client.d.ts +1 -0
  16. package/dist/effect/client.js +8 -8
  17. package/dist/effect/generated/client-error.js +1 -1
  18. package/dist/effect/generated/client.d.ts +2 -1
  19. package/dist/effect/generated/client.js +5 -5
  20. package/dist/effect/generated/index.js +4 -4
  21. package/dist/effect/index.js +8 -8
  22. package/dist/effect/rpc.js +4 -4
  23. package/dist/effect/service.d.ts +19 -7
  24. package/dist/effect/service.js +49 -137
  25. package/dist/promise/client.d.ts +1 -0
  26. package/dist/promise/client.js +7 -7
  27. package/dist/promise/generated/client-error.js +1 -1
  28. package/dist/promise/generated/client.d.ts +2 -1
  29. package/dist/promise/generated/client.js +2 -2
  30. package/dist/promise/generated/index.js +8 -8
  31. package/dist/promise/generated/types.d.ts +81 -4
  32. package/dist/promise/generated/types.js +1 -1
  33. package/dist/promise/index.js +10 -10
  34. package/dist/promise/rpc.js +2 -2
  35. package/dist/promise/service.d.ts +2 -4
  36. package/dist/promise/service.js +43 -134
  37. package/dist/pty-handoff.js +1 -1
  38. package/dist/rpc-runtime.js +1 -1
  39. package/dist/service-contender.d.ts +27 -1
  40. package/dist/service-contender.js +3 -3
  41. package/dist/service-probe.d.ts +70 -0
  42. package/dist/service-probe.js +16 -0
  43. package/dist/service-timing.js +1 -1
  44. package/dist/service-version.js +1 -1
  45. package/dist/service.js +1 -1
  46. package/dist/shared-events.js +1 -1
  47. package/dist/solid/connection.js +1 -1
  48. package/dist/solid/data.d.ts +10 -0
  49. package/dist/solid/data.js +9 -9
  50. package/dist/solid/index.js +11 -11
  51. package/dist/solid/pty.js +1 -1
  52. package/package.json +5 -6
  53. /package/dist/chunks/{service-version-6mptkzbc.js → service-probe-6mptkzbc.js} +0 -0
  54. /package/dist/chunks/{service-version-9rqn6x4v.js → service-probe-9rqn6x4v.js} +0 -0
  55. /package/dist/chunks/{service-version-gne7h7mq.js → service-probe-gne7h7mq.js} +0 -0
  56. /package/dist/chunks/{service-version-m2eywc8w.js → service-probe-m2eywc8w.js} +0 -0
  57. /package/dist/chunks/{service-version-nwcpakzx.js → service-probe-nwcpakzx.js} +0 -0
  58. /package/dist/chunks/{service-version-qav6mfdz.js → service-probe-qav6mfdz.js} +0 -0
  59. /package/dist/chunks/{service-version-sxt88q69.js → service-probe-sxt88q69.js} +0 -0
  60. /package/dist/chunks/{service-version-vmytr4q8.js → service-probe-vmytr4q8.js} +0 -0
  61. /package/dist/chunks/{service-version-vt9jbch8.js → service-probe-vt9jbch8.js} +0 -0
  62. /package/dist/chunks/{service-version-vyas3vgt.js → service-probe-vyas3vgt.js} +0 -0
  63. /package/dist/chunks/{service-version-xgnj2w4v.js → service-probe-xgnj2w4v.js} +0 -0
  64. /package/dist/chunks/{service-version-y2etg5bs.js → service-probe-y2etg5bs.js} +0 -0
  65. /package/dist/chunks/{service-version-ydhz1zrh.js → service-probe-ydhz1zrh.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-version-9rqn6x4v.js";
3
+ } from "./service-probe-9rqn6x4v.js";
4
4
 
5
5
  // src/pty-handoff.ts
6
6
  var exports_pty_handoff = {};
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isRpcError2,
3
3
  isRpcInternalError2
4
- } from "./service-version-vt9jbch8.js";
4
+ } from "./service-probe-vt9jbch8.js";
5
5
 
6
6
  // src/promise/rpc.ts
7
7
  function makeRpc2(raw, events) {
@@ -0,0 +1,92 @@
1
+ import {
2
+ defaultEnsureTiming2
3
+ } from "./service-probe-xgnj2w4v.js";
4
+ import {
5
+ matchesVersion2
6
+ } from "./service-probe-sxt88q69.js";
7
+
8
+ // src/service-probe.ts
9
+ import { homedir } from "node:os";
10
+ import { join } from "node:path";
11
+ function decide2(service, options) {
12
+ if (!matchesVersion2(service.version, options))
13
+ return { _tag: "replace", pty: service.state === "ready" ? "handoff" : "clear" };
14
+ if (!service.compatible)
15
+ return fail("Background service uses an incompatible health protocol. Update this client or explicitly restart the service.");
16
+ if (service.state === "ready")
17
+ return { _tag: "reuse" };
18
+ if (service.state === "failed")
19
+ return fail("Background service failed to start");
20
+ return { _tag: "wait" };
21
+ }
22
+ function fail(message) {
23
+ return { _tag: "fail", error: new Error(message) };
24
+ }
25
+ function fallback2() {
26
+ return join(process.env["XDG_STATE_HOME"] ?? join(homedir(), ".local", "state"), "opencode", "service.json");
27
+ }
28
+ function same2(left, right) {
29
+ return left.id === right.id && left.version === right.version && left.url === right.url && left.pid === right.pid;
30
+ }
31
+ async function probeResult2(info, timeout = defaultEnsureTiming2.requestTimeout) {
32
+ const endpoint = {
33
+ url: info.url,
34
+ auth: info.password === undefined ? undefined : { type: "basic", username: "opencode", password: info.password }
35
+ };
36
+ const signal = AbortSignal.timeout(timeout);
37
+ const result = await fetch(new URL("/api/info", info.url), { headers: headers2(endpoint), signal }).then(async (response) => ({
38
+ response,
39
+ body: response.status === 404 ? undefined : await response.json()
40
+ })).catch(() => {
41
+ return;
42
+ });
43
+ if (result === undefined)
44
+ return { service: undefined, timedOut: signal.aborted };
45
+ const response = result.response;
46
+ if (response.status === 404)
47
+ return {
48
+ service: {
49
+ info,
50
+ endpoint,
51
+ version: info.version,
52
+ state: "ready",
53
+ compatible: false
54
+ },
55
+ timedOut: false
56
+ };
57
+ const serverInfo = decodeInfo(result.body);
58
+ if (serverInfo === undefined)
59
+ return { service: undefined, timedOut: false };
60
+ if (serverInfo.pid !== info.pid)
61
+ return { service: undefined, timedOut: false };
62
+ if (info.version !== undefined && serverInfo.version !== info.version)
63
+ return { service: undefined, timedOut: false };
64
+ return {
65
+ service: {
66
+ info,
67
+ endpoint,
68
+ version: serverInfo.version,
69
+ state: response.ok ? "ready" : response.status === 500 ? "failed" : "waiting",
70
+ compatible: true
71
+ },
72
+ timedOut: false
73
+ };
74
+ }
75
+ function headers2(endpoint) {
76
+ if (endpoint.auth === undefined)
77
+ return;
78
+ return {
79
+ authorization: "Basic " + Buffer.from(endpoint.auth.username + ":" + endpoint.auth.password).toString("base64")
80
+ };
81
+ }
82
+ function decodeInfo(input) {
83
+ if (typeof input !== "object" || input === null)
84
+ return;
85
+ if (!("version" in input) || typeof input.version !== "string")
86
+ return;
87
+ if (!("pid" in input) || typeof input.pid !== "number" || !Number.isInteger(input.pid) || input.pid < 0)
88
+ return;
89
+ return { version: input.version, pid: input.pid };
90
+ }
91
+
92
+ export { decide2, fallback2, same2, probeResult2, headers2 };
@@ -3,20 +3,20 @@ import {
3
3
  readError2,
4
4
  event2,
5
5
  eventType2
6
- } from "./service-version-t1xa31vm.js";
6
+ } from "./service-probe-t1xa31vm.js";
7
7
  import {
8
8
  __export
9
- } from "./service-version-9rqn6x4v.js";
9
+ } from "./service-probe-9rqn6x4v.js";
10
10
 
11
11
  // src/effect/rpc.ts
12
12
  var exports_rpc = {};
13
13
  __export(exports_rpc, {
14
14
  RpcClientRuntime: () => exports_rpc,
15
15
  aborted: () => aborted2,
16
- make: () => make4
16
+ make: () => make3
17
17
  });
18
18
  import { Effect, Stream } from "effect";
19
- function make4(call, subscribe) {
19
+ function make3(call, subscribe) {
20
20
  return (definition) => {
21
21
  const methods = Object.fromEntries(Object.entries(definition.methods).map(([name, method]) => [
22
22
  name,
@@ -59,4 +59,4 @@ function aborted2(signal) {
59
59
  });
60
60
  }
61
61
 
62
- export { make4, aborted2, exports_rpc };
62
+ export { make3, aborted2, exports_rpc };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ClientError3
3
- } from "./service-version-nwcpakzx.js";
3
+ } from "./service-probe-nwcpakzx.js";
4
4
  import {
5
5
  __export
6
- } from "./service-version-9rqn6x4v.js";
6
+ } from "./service-probe-9rqn6x4v.js";
7
7
 
8
8
  // src/promise/generated/client.ts
9
9
  var exports_client4 = {};
@@ -700,6 +700,15 @@ function make6(options) {
700
700
  successStatus: 204,
701
701
  declaredStatuses: [400, 401, 404],
702
702
  empty: true
703
+ }, requestOptions),
704
+ external: (input, requestOptions) => request({
705
+ method: "POST",
706
+ path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/external`,
707
+ query: { location: input["location"] },
708
+ body: { methodID: input["methodID"], answer: input["answer"], label: input["label"] },
709
+ successStatus: 204,
710
+ declaredStatuses: [400, 401, 404],
711
+ empty: true
703
712
  }, requestOptions)
704
713
  },
705
714
  oauth: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-version-9rqn6x4v.js";
3
+ } from "./service-probe-9rqn6x4v.js";
4
4
 
5
5
  // src/shared-events.ts
6
6
  var exports_shared_events = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-version-9rqn6x4v.js";
3
+ } from "./service-probe-9rqn6x4v.js";
4
4
 
5
5
  // src/rpc-runtime.ts
6
6
  var exports_rpc_runtime = {};
@@ -2,7 +2,7 @@ import {
2
2
  isFormNotFoundError2,
3
3
  isFormAlreadySettledError2,
4
4
  isPermissionNotFoundError2
5
- } from "./service-version-vt9jbch8.js";
5
+ } from "./service-probe-vt9jbch8.js";
6
6
 
7
7
  // src/solid/data.ts
8
8
  import { Worktree } from "@opencode/schema/worktree";
@@ -1162,6 +1162,9 @@ function createData2(config) {
1162
1162
  status(sessionID) {
1163
1163
  return store.session.active[sessionID] ?? "idle";
1164
1164
  },
1165
+ active() {
1166
+ return Object.entries(store.session.active).flatMap(([sessionID, status]) => status === "running" ? [sessionID] : []);
1167
+ },
1165
1168
  input: {
1166
1169
  list(sessionID) {
1167
1170
  return (store.session.pending[sessionID] ?? []).flatMap((item) => item.type === "compaction" ? [] : [item.id]);
@@ -1174,6 +1177,19 @@ function createData2(config) {
1174
1177
  list(sessionID) {
1175
1178
  return store.session.pending[sessionID] ?? [];
1176
1179
  },
1180
+ status(sessionID, inboxID) {
1181
+ const pending = store.session.pending[sessionID] ?? [];
1182
+ const item = pending.find((entry) => entry.id === inboxID && entry.type === "user");
1183
+ if (!item)
1184
+ return;
1185
+ if (item.delivery === "queue")
1186
+ return "queued";
1187
+ const messages = store.session.message[sessionID] ?? [];
1188
+ const boundary = messages.findLastIndex((entry) => entry.type === "idle");
1189
+ if ((store.session.active[sessionID] ?? "idle") === "idle")
1190
+ return boundary >= 0 && item.time.created <= messages[boundary].time.created ? "stranded" : "starting";
1191
+ return messages.slice(boundary + 1).some((entry) => entry.type === "user" && !pending.some((other) => other.id === entry.id)) ? "steering" : "starting";
1192
+ },
1177
1193
  sync(sessionID) {
1178
1194
  return sync.run(`session.pending:${sessionID}`, async () => {
1179
1195
  const updates = new Map;
@@ -1437,6 +1453,9 @@ function createData2(config) {
1437
1453
  list(sessionID) {
1438
1454
  return store.session.permission[sessionID];
1439
1455
  },
1456
+ sessions() {
1457
+ return Object.entries(store.session.permission).flatMap(([sessionID, requests]) => requests.length > 0 ? [sessionID] : []);
1458
+ },
1440
1459
  sync(sessionID) {
1441
1460
  return sync.run(`session.permission:${sessionID}`, async () => {
1442
1461
  setStore("session", "permission", sessionID, await api().permission.list({ sessionID }));
@@ -1463,6 +1482,9 @@ function createData2(config) {
1463
1482
  const key = locationKey2(ref);
1464
1483
  return forms?.filter((form) => form.location && locationKey2(form.location) === key);
1465
1484
  },
1485
+ sessions() {
1486
+ return Object.entries(store.session.form).flatMap(([sessionID, forms]) => sessionID !== "global" && forms.length > 0 ? [sessionID] : []);
1487
+ },
1466
1488
  sync(sessionID, ref) {
1467
1489
  const key = `session.form:${sessionID}:${sessionID === "global" ? locationKey2(ref ?? defaultLocation()) : ""}`;
1468
1490
  return sync.run(key, async () => {
@@ -37,7 +37,52 @@ function spawnServiceContender2(command, args, env) {
37
37
  }
38
38
  };
39
39
  }
40
- function contenderFailure2(contender) {
40
+ function contenderPool2(timing) {
41
+ const contenders = new Set;
42
+ let failure;
43
+ let spawnDelay = timing.spawnDelay;
44
+ let lastSpawn = 0;
45
+ return {
46
+ failure: () => failure,
47
+ serviceAnswered() {
48
+ spawnDelay = timing.spawnDelay;
49
+ },
50
+ evict(pid) {
51
+ for (const item of contenders) {
52
+ if (item.child.pid === pid || contenderFinished2(item)) {
53
+ item.release();
54
+ contenders.delete(item);
55
+ }
56
+ }
57
+ failure = undefined;
58
+ lastSpawn = 0;
59
+ },
60
+ recruitNow() {
61
+ lastSpawn = Date.now() - spawnDelay;
62
+ },
63
+ reap() {
64
+ const finished = [...contenders].filter(contenderFinished2);
65
+ failure ??= finished.map(contenderFailure).find((error) => error !== undefined);
66
+ if (finished.some((item) => item.child.exitCode === 0))
67
+ spawnDelay = Math.min(spawnDelay * 2, timing.maxSpawnDelay);
68
+ finished.forEach((item) => contenders.delete(item));
69
+ return contenders.size === 0 ? failure : undefined;
70
+ },
71
+ shouldRecruit(registered) {
72
+ if (lastSpawn === 0 && registered)
73
+ lastSpawn = Date.now();
74
+ return failure === undefined && contenders.size < 2 && Date.now() - lastSpawn >= spawnDelay;
75
+ },
76
+ add(contender) {
77
+ contenders.add(contender);
78
+ lastSpawn = Date.now();
79
+ },
80
+ releaseAll() {
81
+ contenders.forEach((contender) => contender.release());
82
+ }
83
+ };
84
+ }
85
+ function contenderFailure(contender) {
41
86
  const error = contender.error();
42
87
  if (error !== undefined)
43
88
  return error;
@@ -55,4 +100,4 @@ function startupError(message, stderr) {
55
100
  ${stderr}` : message);
56
101
  }
57
102
 
58
- export { spawnServiceContender2, contenderFailure2, contenderFinished2 };
103
+ export { spawnServiceContender2, contenderPool2, contenderFinished2 };
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  ClientApi2
3
- } from "./service-version-vmytr4q8.js";
3
+ } from "./service-probe-vmytr4q8.js";
4
4
  import {
5
5
  ClientError2
6
- } from "./service-version-y2etg5bs.js";
6
+ } from "./service-probe-y2etg5bs.js";
7
7
  import {
8
8
  __export
9
- } from "./service-version-9rqn6x4v.js";
9
+ } from "./service-probe-9rqn6x4v.js";
10
10
 
11
11
  // src/effect/generated/client.ts
12
12
  var exports_client2 = {};
13
13
  __export(exports_client2, {
14
- make: () => make3
14
+ make: () => make4
15
15
  });
16
16
  import { Effect, Stream, Schema } from "effect";
17
17
  import { Sse } from "effect/unstable/encoding";
@@ -282,6 +282,11 @@ var EndpointIntegrationConnectKey = (raw) => (input) => preserveEffect()(raw["in
282
282
  query: { location: input["location"] },
283
283
  payload: { key: input["key"], answer: input["answer"], label: input["label"] }
284
284
  }).pipe(Effect.mapError(mapClientError)));
285
+ var EndpointIntegrationConnectExternal = (raw) => (input) => preserveEffect()(raw["integration.connect.external"]({
286
+ params: { integrationID: input["integrationID"] },
287
+ query: { location: input["location"] },
288
+ payload: { methodID: input["methodID"], answer: input["answer"], label: input["label"] }
289
+ }).pipe(Effect.mapError(mapClientError)));
285
290
  var EndpointIntegrationOauthConnect = (raw) => (input) => preserveEffect()(raw["integration.oauth.connect"]({
286
291
  params: { integrationID: input["integrationID"] },
287
292
  query: { location: input["location"] },
@@ -317,7 +322,7 @@ var adaptGroupIntegration = (raw) => ({
317
322
  list: EndpointIntegrationList(raw),
318
323
  get: EndpointIntegrationGet(raw),
319
324
  wellknown: { add: EndpointIntegrationWellknownAdd(raw) },
320
- connect: { key: EndpointIntegrationConnectKey(raw) },
325
+ connect: { key: EndpointIntegrationConnectKey(raw), external: EndpointIntegrationConnectExternal(raw) },
321
326
  oauth: {
322
327
  connect: EndpointIntegrationOauthConnect(raw),
323
328
  status: EndpointIntegrationOauthStatus(raw),
@@ -613,6 +618,6 @@ var adaptClient = (raw) => ({
613
618
  websearch: adaptGroupWebsearch(raw["server.websearch"]),
614
619
  config: adaptGroupConfig(raw["server.config"])
615
620
  });
616
- var make3 = (options) => HttpApiClient.make(ClientApi2, options).pipe(Effect.map(adaptClient));
621
+ var make4 = (options) => HttpApiClient.make(ClientApi2, options).pipe(Effect.map(adaptClient));
617
622
 
618
- export { make3, exports_client2 };
623
+ export { make4, exports_client2 };
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  make7
3
- } from "./service-version-frbwqjmf.js";
3
+ } from "./service-probe-frbwqjmf.js";
4
4
  import {
5
5
  ClientError2
6
- } from "./service-version-y2etg5bs.js";
6
+ } from "./service-probe-y2etg5bs.js";
7
7
  import {
8
- make3
9
- } from "./service-version-7yt87z36.js";
8
+ make4
9
+ } from "./service-probe-vnspkrex.js";
10
10
  import {
11
- make4,
11
+ make3,
12
12
  aborted2
13
- } from "./service-version-z6qdwcsf.js";
13
+ } from "./service-probe-65kht65h.js";
14
14
  import {
15
15
  __export
16
- } from "./service-version-9rqn6x4v.js";
16
+ } from "./service-probe-9rqn6x4v.js";
17
17
 
18
18
  // src/effect/client.ts
19
19
  var exports_client = {};
@@ -30,7 +30,7 @@ var CurrentHeaders = Context.Reference("@opencode/client/effect/rpc/headers", {
30
30
  });
31
31
  var make2 = Effect.fn("OpenCode.make")(function* (options) {
32
32
  const httpClient = yield* HttpClient.HttpClient;
33
- const raw = yield* make3(options).pipe(Effect.provideService(HttpClient.HttpClient, HttpClient.mapRequestEffect(httpClient, (request) => Effect.map(CurrentHeaders, (headers) => headers ? HttpClientRequest.setHeaders(request, new Headers(headers)) : request))));
33
+ const raw = yield* make4(options).pipe(Effect.provideService(HttpClient.HttpClient, HttpClient.mapRequestEffect(httpClient, (request) => Effect.map(CurrentHeaders, (headers) => headers ? HttpClientRequest.setHeaders(request, new Headers(headers)) : request))));
34
34
  const context = yield* Effect.context();
35
35
  const native = raw.event.subscribe();
36
36
 
@@ -45,7 +45,7 @@ var make2 = Effect.fn("OpenCode.make")(function* (options) {
45
45
  return {
46
46
  ...raw,
47
47
  event: { ...raw.event, subscribe },
48
- rpc: Object.assign(make4((input, options) => raw.rpc.call(input).pipe(Effect.provideService(CurrentHeaders, options?.headers)), subscribe), raw.rpc)
48
+ rpc: Object.assign(make3((input, options) => raw.rpc.call(input).pipe(Effect.provideService(CurrentHeaders, options?.headers)), subscribe), raw.rpc)
49
49
  };
50
50
  });
51
51
 
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  make7
3
- } from "./service-version-frbwqjmf.js";
3
+ } from "./service-probe-frbwqjmf.js";
4
4
  import {
5
5
  make6
6
- } from "./service-version-nyqggzs9.js";
6
+ } from "./service-probe-9h52wrcy.js";
7
7
  import {
8
8
  makeRpc2
9
- } from "./service-version-1y4a697q.js";
9
+ } from "./service-probe-1y4a697q.js";
10
10
  import {
11
11
  __export
12
- } from "./service-version-9rqn6x4v.js";
12
+ } from "./service-probe-9rqn6x4v.js";
13
13
 
14
14
  // src/promise/client.ts
15
15
  var exports_client3 = {};
package/dist/contract.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  effectOmitEndpoints2,
4
4
  groupNames2,
5
5
  promiseOmitEndpoints2
6
- } from "./chunks/service-version-vmytr4q8.js";
6
+ } from "./chunks/service-probe-vmytr4q8.js";
7
7
  export {
8
8
  ClientApi2 as ClientApi,
9
9
  effectOmitEndpoints2 as effectOmitEndpoints,
@@ -1830,6 +1830,17 @@ export type IntegrationConnectKeyInput = {
1830
1830
  };
1831
1831
  export type IntegrationConnectKeyOutput = void;
1832
1832
  export type IntegrationConnectKeyOperation<E = never> = (input: IntegrationConnectKeyInput) => Effect.Effect<IntegrationConnectKeyOutput, E>;
1833
+ export type IntegrationConnectExternalInput = {
1834
+ readonly integrationID: Integration.ID;
1835
+ readonly location?: {
1836
+ readonly directory?: string | undefined;
1837
+ } | undefined;
1838
+ readonly methodID: Integration.MethodID;
1839
+ readonly answer?: Form.Answer | undefined;
1840
+ readonly label?: string | undefined;
1841
+ };
1842
+ export type IntegrationConnectExternalOutput = void;
1843
+ export type IntegrationConnectExternalOperation<E = never> = (input: IntegrationConnectExternalInput) => Effect.Effect<IntegrationConnectExternalOutput, E>;
1833
1844
  export type IntegrationOauthConnectInput = {
1834
1845
  readonly integrationID: Integration.ID;
1835
1846
  readonly location?: {
@@ -1917,6 +1928,7 @@ export interface IntegrationApi<E = never> {
1917
1928
  };
1918
1929
  readonly connect: {
1919
1930
  readonly key: IntegrationConnectKeyOperation<E>;
1931
+ readonly external: IntegrationConnectExternalOperation<E>;
1920
1932
  };
1921
1933
  readonly oauth: {
1922
1934
  readonly connect: IntegrationOauthConnectOperation<E>;
@@ -2392,6 +2392,7 @@ export declare const make: (options?: {
2392
2392
  };
2393
2393
  connect: {
2394
2394
  key: (input: import("./api.js").IntegrationConnectKeyInput) => Effect.Effect<void, import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").IntegrationNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2395
+ external: (input: import("./api.js").IntegrationConnectExternalInput) => Effect.Effect<void, import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").IntegrationNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
2395
2396
  };
2396
2397
  oauth: {
2397
2398
  connect: (input: import("./api.js").IntegrationOauthConnectInput) => Effect.Effect<import("./api.js").IntegrationOauthConnectOutput, import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  make2,
3
3
  exports_client
4
- } from "../chunks/service-version-21favj1f.js";
5
- import"../chunks/service-version-6mptkzbc.js";
6
- import"../chunks/service-version-7yt87z36.js";
7
- import"../chunks/service-version-y2etg5bs.js";
8
- import"../chunks/service-version-z6qdwcsf.js";
9
- import"../chunks/service-version-frbwqjmf.js";
10
- import"../chunks/service-version-t1xa31vm.js";
11
- import"../chunks/service-version-vmytr4q8.js";
4
+ } from "../chunks/service-probe-y99g37y2.js";
5
+ import"../chunks/service-probe-65kht65h.js";
6
+ import"../chunks/service-probe-6mptkzbc.js";
7
+ import"../chunks/service-probe-vnspkrex.js";
8
+ import"../chunks/service-probe-y2etg5bs.js";
9
+ import"../chunks/service-probe-t1xa31vm.js";
10
+ import"../chunks/service-probe-vmytr4q8.js";
11
+ import"../chunks/service-probe-frbwqjmf.js";
12
12
  export {
13
13
  exports_client as OpenCode,
14
14
  make2 as make
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ClientError2
3
- } from "../../chunks/service-version-y2etg5bs.js";
3
+ } from "../../chunks/service-probe-y2etg5bs.js";
4
4
  export {
5
5
  ClientError2 as ClientError
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import { Effect, Stream, Schema } from "effect";
2
2
  import { Sse } from "effect/unstable/encoding";
3
3
  import { HttpClientError } from "effect/unstable/http";
4
- import type { ServerInfoOutput, ServerPairOutput, ServerConnectInput, ServerConnectOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionDiffInput, SessionDiffOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormListOutput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialListOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, RpcCallOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyReadOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsInitInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchListInput, VcsBranchListOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ConfigUpdateInput } from "../api/api.js";
4
+ import type { ServerInfoOutput, ServerPairOutput, ServerConnectInput, ServerConnectOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionDiffInput, SessionDiffOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormListOutput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialListOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, RpcCallOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyReadOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsInitInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchListInput, VcsBranchListOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ConfigUpdateInput } from "../api/api.js";
5
5
  import { ClientError } from "./client-error.js";
6
6
  export declare const make: (options?: {
7
7
  readonly baseUrl?: URL | string;
@@ -103,6 +103,7 @@ export declare const make: (options?: {
103
103
  };
104
104
  connect: {
105
105
  key: (input: IntegrationConnectKeyInput) => Effect.Effect<void, import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").IntegrationNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
106
+ external: (input: IntegrationConnectExternalInput) => Effect.Effect<void, import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").IntegrationNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
106
107
  };
107
108
  oauth: {
108
109
  connect: (input: IntegrationOauthConnectInput) => Effect.Effect<IntegrationOauthConnectOutput, import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
@@ -1,8 +1,8 @@
1
1
  import {
2
- make3
3
- } from "../../chunks/service-version-7yt87z36.js";
4
- import"../../chunks/service-version-y2etg5bs.js";
5
- import"../../chunks/service-version-vmytr4q8.js";
2
+ make4
3
+ } from "../../chunks/service-probe-vnspkrex.js";
4
+ import"../../chunks/service-probe-y2etg5bs.js";
5
+ import"../../chunks/service-probe-vmytr4q8.js";
6
6
  export {
7
- make3 as make
7
+ make4 as make
8
8
  };
@@ -1,11 +1,11 @@
1
- import"../../chunks/service-version-6mptkzbc.js";
1
+ import"../../chunks/service-probe-6mptkzbc.js";
2
2
  import {
3
3
  exports_client2
4
- } from "../../chunks/service-version-7yt87z36.js";
4
+ } from "../../chunks/service-probe-vnspkrex.js";
5
5
  import {
6
6
  ClientError2
7
- } from "../../chunks/service-version-y2etg5bs.js";
8
- import"../../chunks/service-version-vmytr4q8.js";
7
+ } from "../../chunks/service-probe-y2etg5bs.js";
8
+ import"../../chunks/service-probe-vmytr4q8.js";
9
9
  export {
10
10
  ClientError2 as ClientError,
11
11
  exports_client2 as OpenCode
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ClientError2
3
- } from "../chunks/service-version-y2etg5bs.js";
4
- import"../chunks/service-version-vmytr4q8.js";
5
- import"../chunks/service-version-7yt87z36.js";
6
- import"../chunks/service-version-6mptkzbc.js";
7
- import"../chunks/service-version-frbwqjmf.js";
8
- import"../chunks/service-version-t1xa31vm.js";
9
- import"../chunks/service-version-z6qdwcsf.js";
3
+ } from "../chunks/service-probe-y2etg5bs.js";
4
+ import"../chunks/service-probe-vmytr4q8.js";
5
+ import"../chunks/service-probe-vnspkrex.js";
6
+ import"../chunks/service-probe-6mptkzbc.js";
7
+ import"../chunks/service-probe-frbwqjmf.js";
8
+ import"../chunks/service-probe-t1xa31vm.js";
9
+ import"../chunks/service-probe-65kht65h.js";
10
10
  import {
11
11
  exports_client
12
- } from "../chunks/service-version-21favj1f.js";
12
+ } from "../chunks/service-probe-y99g37y2.js";
13
13
 
14
14
  // src/effect/index.ts
15
15
  import { Agent } from "@opencode/schema/agent";
@@ -1,11 +1,11 @@
1
1
  import {
2
- make4,
2
+ make3,
3
3
  aborted2,
4
4
  exports_rpc
5
- } from "../chunks/service-version-z6qdwcsf.js";
6
- import"../chunks/service-version-t1xa31vm.js";
5
+ } from "../chunks/service-probe-65kht65h.js";
6
+ import"../chunks/service-probe-t1xa31vm.js";
7
7
  export {
8
8
  exports_rpc as RpcClientRuntime,
9
9
  aborted2 as aborted,
10
- make4 as make
10
+ make3 as make
11
11
  };