@opencode/client 0.0.0-dev-21894 → 0.0.0-dev-21904

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 (59) hide show
  1. package/dist/chunks/{service-probe-07pp8bwq.js → pty-handoff-10stgdsh.js} +75 -50
  2. package/dist/chunks/{service-probe-9j12j8xw.js → pty-handoff-15p82y03.js} +5 -5
  3. package/dist/chunks/{service-probe-2ny4vxct.js → pty-handoff-2ny4vxct.js} +2 -2
  4. package/dist/chunks/{service-probe-2t8h8q18.js → pty-handoff-2t8h8q18.js} +4 -4
  5. package/dist/chunks/{service-probe-8bbb028w.js → pty-handoff-8bbb028w.js} +1 -1
  6. package/dist/chunks/{service-probe-1z3ffed9.js → pty-handoff-ec7zpgc0.js} +2 -2
  7. package/dist/chunks/{service-probe-k6rgyy5p.js → pty-handoff-er32x71c.js} +9 -9
  8. package/dist/chunks/{service-probe-ryy6kscr.js → pty-handoff-ryy6kscr.js} +1 -1
  9. package/dist/chunks/{service-probe-sfay14gz.js → pty-handoff-sfay14gz.js} +2 -2
  10. package/dist/chunks/{service-probe-skhp7hxc.js → pty-handoff-skhp7hxc.js} +1 -1
  11. package/dist/chunks/{service-probe-ncbmhvtm.js → pty-handoff-z9zdjnb9.js} +6 -6
  12. package/dist/contract.js +1 -1
  13. package/dist/effect/client.js +8 -8
  14. package/dist/effect/generated/client-error.js +1 -1
  15. package/dist/effect/generated/client.js +5 -5
  16. package/dist/effect/generated/index.js +4 -4
  17. package/dist/effect/index.js +8 -8
  18. package/dist/effect/rpc.js +4 -4
  19. package/dist/effect/service.js +6 -6
  20. package/dist/promise/client.js +7 -7
  21. package/dist/promise/generated/client-error.js +1 -1
  22. package/dist/promise/generated/client.js +2 -2
  23. package/dist/promise/generated/index.js +4 -4
  24. package/dist/promise/generated/types.js +1 -1
  25. package/dist/promise/index.js +8 -8
  26. package/dist/promise/rpc.js +2 -2
  27. package/dist/promise/service.js +6 -6
  28. package/dist/pty-handoff.js +4 -4
  29. package/dist/rpc-runtime.js +1 -1
  30. package/dist/service-contender.js +1 -1
  31. package/dist/service-probe.js +3 -3
  32. package/dist/service-timing.js +1 -1
  33. package/dist/service-version.js +1 -1
  34. package/dist/service.js +1 -1
  35. package/dist/shared-events.js +1 -1
  36. package/dist/solid/connection.js +1 -1
  37. package/dist/solid/data.d.ts +5 -0
  38. package/dist/solid/data.js +9 -9
  39. package/dist/solid/index.js +13 -13
  40. package/dist/solid/pty.js +1 -1
  41. package/dist/solid/retention.js +1 -1
  42. package/dist/solid/usage.js +1 -1
  43. package/package.json +4 -4
  44. /package/dist/chunks/{service-probe-6mptkzbc.js → pty-handoff-6mptkzbc.js} +0 -0
  45. /package/dist/chunks/{service-probe-6mq2wh8y.js → pty-handoff-6mq2wh8y.js} +0 -0
  46. /package/dist/chunks/{service-probe-8s2anffy.js → pty-handoff-8s2anffy.js} +0 -0
  47. /package/dist/chunks/{service-probe-9rqn6x4v.js → pty-handoff-9rqn6x4v.js} +0 -0
  48. /package/dist/chunks/{service-probe-c46qzyff.js → pty-handoff-c46qzyff.js} +0 -0
  49. /package/dist/chunks/{service-probe-gne7h7mq.js → pty-handoff-gne7h7mq.js} +0 -0
  50. /package/dist/chunks/{service-probe-m2eywc8w.js → pty-handoff-m2eywc8w.js} +0 -0
  51. /package/dist/chunks/{service-probe-nwcpakzx.js → pty-handoff-nwcpakzx.js} +0 -0
  52. /package/dist/chunks/{service-probe-qav6mfdz.js → pty-handoff-qav6mfdz.js} +0 -0
  53. /package/dist/chunks/{service-probe-sxt88q69.js → pty-handoff-sxt88q69.js} +0 -0
  54. /package/dist/chunks/{service-probe-ve4aws36.js → pty-handoff-ve4aws36.js} +0 -0
  55. /package/dist/chunks/{service-probe-vmytr4q8.js → pty-handoff-vmytr4q8.js} +0 -0
  56. /package/dist/chunks/{service-probe-vyas3vgt.js → pty-handoff-vyas3vgt.js} +0 -0
  57. /package/dist/chunks/{service-probe-xgnj2w4v.js → pty-handoff-xgnj2w4v.js} +0 -0
  58. /package/dist/chunks/{service-probe-y2etg5bs.js → pty-handoff-y2etg5bs.js} +0 -0
  59. /package/dist/chunks/{service-probe-ydhz1zrh.js → pty-handoff-ydhz1zrh.js} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  isFormNotFoundError2,
3
3
  isFormAlreadySettledError2,
4
4
  isPermissionNotFoundError2
5
- } from "./service-probe-c46qzyff.js";
5
+ } from "./pty-handoff-c46qzyff.js";
6
6
 
7
7
  // src/solid/data.ts
8
8
  import { Worktree } from "@opencode/schema/worktree";
@@ -44,6 +44,18 @@ function optimisticFiles(files) {
44
44
  });
45
45
  return items?.length ? items : undefined;
46
46
  }
47
+ function omitFileData(content) {
48
+ const omit = (item) => item.type === "file" && item.uri.startsWith("data:") ? { ...item, uri: `data:${item.mime};base64,` } : item;
49
+ return [omit(content[0]), ...content.slice(1).map(omit)];
50
+ }
51
+ function omitMessageFileData(message) {
52
+ if (message.type !== "assistant")
53
+ return message;
54
+ return {
55
+ ...message,
56
+ content: message.content.map((part) => part.type === "tool" && ("content" in part.state) && part.state.content ? { ...part, state: { ...part.state, content: omitFileData(part.state.content) } } : part)
57
+ };
58
+ }
47
59
  function formRequestOptions(sessionID, ref) {
48
60
  if (sessionID !== "global" || !ref)
49
61
  return;
@@ -160,6 +172,7 @@ function createData2(config) {
160
172
  const [defaultLocation, setDefaultLocation] = createSignal({ directory: config.directory });
161
173
  const sessions = createMemo(() => Object.values(store.session.info).toSorted((a, b) => b.time.updated - a.time.updated));
162
174
  const messageIndex = new Map;
175
+ const stored = (message) => config.omitToolFileData ? omitMessageFileData(message) : message;
163
176
  const sync = createSync();
164
177
  let activeUpdates;
165
178
  const pendingUpdates = new Map;
@@ -815,7 +828,7 @@ function createData2(config) {
815
828
  status: "completed",
816
829
  input: tool.state.input,
817
830
  metadata: event.data.metadata,
818
- content: [...event.data.content]
831
+ content: config.omitToolFileData ? omitFileData(event.data.content) : [...event.data.content]
819
832
  };
820
833
  tool.executed = event.data.executed || tool.executed === true;
821
834
  if (event.data.native)
@@ -832,7 +845,7 @@ function createData2(config) {
832
845
  error: event.data.error,
833
846
  input: typeof tool.state.input === "string" ? {} : tool.state.input,
834
847
  metadata: event.data.metadata,
835
- content: event.data.content
848
+ content: config.omitToolFileData && event.data.content ? omitFileData(event.data.content) : event.data.content
836
849
  };
837
850
  tool.executed = event.data.executed || tool.executed === true;
838
851
  if (event.data.native)
@@ -1026,26 +1039,28 @@ function createData2(config) {
1026
1039
  const location = { directory: ref[0], workspaceID: ref[1] ?? undefined };
1027
1040
  refreshUsageLimits(location);
1028
1041
  if (event.type === "credential.updated") {
1029
- result.location.integration.invalidate(location);
1030
- refresh(() => result.location.integration.sync(location));
1042
+ refreshLocation("integration", result.location.integration, location);
1031
1043
  return;
1032
1044
  }
1033
- setStore("location", key, (data) => ({
1034
- integration: data?.integration?.map((integration) => {
1035
- if (integration.id !== event.data.integrationID)
1036
- return integration;
1037
- const active = integration.connections.find((connection) => connection.type === "credential" && connection.id === event.data.credentialID);
1038
- if (!active)
1039
- return integration;
1040
- return {
1041
- ...integration,
1042
- connections: [active, ...integration.connections.filter((connection) => connection !== active)]
1043
- };
1044
- })
1045
- }));
1045
+ if (store.location[key]?.integration)
1046
+ setStore("location", key, (data) => ({
1047
+ integration: data?.integration?.map((integration) => {
1048
+ if (integration.id !== event.data.integrationID)
1049
+ return integration;
1050
+ const active = integration.connections.find((connection) => connection.type === "credential" && connection.id === event.data.credentialID);
1051
+ if (!active)
1052
+ return integration;
1053
+ return {
1054
+ ...integration,
1055
+ connections: [active, ...integration.connections.filter((connection) => connection !== active)]
1056
+ };
1057
+ })
1058
+ }));
1059
+ const active = hasLocation("integration", location) || hasLocation("model", location) || hasLocation("provider", location);
1046
1060
  result.location.model.invalidate(location);
1047
1061
  result.location.provider.invalidate(location);
1048
- refresh(() => Promise.all([result.location.model.sync(location), result.location.provider.sync(location)]));
1062
+ if (active)
1063
+ refresh(() => Promise.all([result.location.model.sync(location), result.location.provider.sync(location)]));
1049
1064
  });
1050
1065
  return;
1051
1066
  }
@@ -1054,28 +1069,22 @@ function createData2(config) {
1054
1069
  const location = event.location;
1055
1070
  switch (event.type) {
1056
1071
  case "provider.updated":
1057
- result.location.provider.invalidate(location);
1058
- refresh(() => result.location.provider.sync(location));
1072
+ refreshLocation("provider", result.location.provider, location);
1059
1073
  break;
1060
1074
  case "model.updated":
1061
- result.location.model.invalidate(location);
1062
- refresh(() => result.location.model.sync(location));
1075
+ refreshLocation("model", result.location.model, location);
1063
1076
  break;
1064
1077
  case "agent.updated":
1065
- result.location.agent.invalidate(location);
1066
- refresh(() => result.location.agent.sync(location));
1078
+ refreshLocation("agent", result.location.agent, location);
1067
1079
  break;
1068
1080
  case "command.updated":
1069
- result.location.command.invalidate(location);
1070
- refresh(() => result.location.command.sync(location));
1081
+ refreshLocation("command", result.location.command, location);
1071
1082
  break;
1072
1083
  case "skill.updated":
1073
- result.location.skill.invalidate(location);
1074
- refresh(() => result.location.skill.sync(location));
1084
+ refreshLocation("skill", result.location.skill, location);
1075
1085
  break;
1076
1086
  case "vcs.branch.updated":
1077
- result.location.vcs.invalidate(location);
1078
- refresh(() => result.location.vcs.sync(location));
1087
+ refreshLocation("vcs", result.location.vcs, location);
1079
1088
  break;
1080
1089
  case "form.created":
1081
1090
  if (store.session.form[event.data.form.sessionID]?.some((form) => form.id === event.data.form.id))
@@ -1095,44 +1104,60 @@ function createData2(config) {
1095
1104
  break;
1096
1105
  case "shell.exited":
1097
1106
  case "shell.deleted":
1107
+ if (!store.location[locationKey2(location)]?.shell?.[event.data.id])
1108
+ break;
1098
1109
  setStore("location", locationKey2(location), (data) => ({
1099
1110
  shell: Object.fromEntries(Object.entries(data?.shell ?? {}).filter(([id]) => id !== event.data.id))
1100
1111
  }));
1101
1112
  break;
1102
1113
  case "reference.updated":
1103
- result.location.reference.invalidate(location);
1104
- refresh(() => result.location.reference.sync(location));
1114
+ refreshLocation("reference", result.location.reference, location);
1105
1115
  break;
1106
- case "integration.updated":
1116
+ case "integration.updated": {
1107
1117
  refreshUsageLimits(location);
1118
+ const active = hasLocation("integration", location) || hasLocation("model", location) || hasLocation("provider", location);
1108
1119
  result.location.integration.invalidate(location);
1109
1120
  result.location.model.invalidate(location);
1110
1121
  result.location.provider.invalidate(location);
1111
- refresh(() => Promise.all([
1112
- result.location.integration.sync(location),
1113
- result.location.model.sync(location),
1114
- result.location.provider.sync(location)
1115
- ]));
1122
+ if (active)
1123
+ refresh(() => Promise.all([
1124
+ result.location.integration.sync(location),
1125
+ result.location.model.sync(location),
1126
+ result.location.provider.sync(location)
1127
+ ]));
1116
1128
  break;
1129
+ }
1117
1130
  case "config.updated":
1118
- result.location.config.invalidate(location);
1119
- if (result.location.config.list(location) !== undefined || sync.has(`location.config:${locationKey2(location)}`))
1120
- refresh(() => result.location.config.sync(location));
1121
- refresh(() => result.location.websearch.refresh(location));
1131
+ refreshLocation("config", result.location.config, location);
1132
+ if (hasLocation("websearch", location))
1133
+ refresh(() => result.location.websearch.refresh(location));
1122
1134
  break;
1123
1135
  case "websearch.updated":
1124
- refresh(() => result.location.websearch.refresh(location));
1136
+ if (hasLocation("websearch", location))
1137
+ refresh(() => result.location.websearch.refresh(location));
1125
1138
  break;
1126
- case "mcp.status.changed":
1139
+ case "mcp.status.changed": {
1140
+ const active = hasLocation("mcpServer", location);
1127
1141
  result.location.mcp.server.invalidate(location);
1128
- settle(`mcp.status:${locationKey2(location)}`, () => result.location.mcp.server.sync(location));
1142
+ if (active)
1143
+ settle(`mcp.status:${locationKey2(location)}`, () => result.location.mcp.server.sync(location));
1129
1144
  break;
1145
+ }
1130
1146
  case "mcp.resources.changed":
1131
- result.location.mcp.resource.invalidate(location);
1132
- refresh(() => result.location.mcp.resource.sync(location));
1147
+ refreshLocation("mcpResource", result.location.mcp.resource, location);
1133
1148
  break;
1134
1149
  }
1135
1150
  }
1151
+ function hasLocation(field, ref) {
1152
+ const id = locationKey2(ref ?? defaultLocation());
1153
+ return store.location[id]?.[field] !== undefined || sync.has(`location.${field}:${id}`);
1154
+ }
1155
+ function refreshLocation(field, resource, location) {
1156
+ const active = hasLocation(field, location);
1157
+ resource.invalidate(location);
1158
+ if (active)
1159
+ refresh(() => resource.sync(location));
1160
+ }
1136
1161
  function refreshUsageLimits(location) {
1137
1162
  const loaded = store.location[locationKey2(location)]?.usageLimits !== undefined || sync.has(`location.usageLimits:${locationKey2(location)}`);
1138
1163
  usageLimits.invalidate(location);
@@ -1426,7 +1451,7 @@ function createData2(config) {
1426
1451
  limit: config.initialMessageLimit?.() ?? messagePageLimit,
1427
1452
  order: "desc"
1428
1453
  });
1429
- const fetched = response.data.toReversed();
1454
+ const fetched = response.data.toReversed().map(stored);
1430
1455
  const ids = new Set(fetched.map((item) => item.id));
1431
1456
  const admitted = new Set((store.session.pending[sessionID] ?? []).flatMap((item) => item.type === "user" || item.type === "synthetic" ? [item.id] : []));
1432
1457
  const local = (store.session.message[sessionID] ?? []).filter((item) => !ids.has(item.id) && (outbox.has(item.id) || admitted.has(item.id)));
@@ -1479,7 +1504,7 @@ function createData2(config) {
1479
1504
  }, { signal });
1480
1505
  if (signal?.aborted)
1481
1506
  return;
1482
- fetched.push(...response.data);
1507
+ fetched.push(...response.data.map(stored));
1483
1508
  next = response.cursor.next ?? undefined;
1484
1509
  if (!options?.all)
1485
1510
  break;
@@ -3,20 +3,20 @@ import {
3
3
  readError2,
4
4
  event2,
5
5
  eventType2
6
- } from "./service-probe-ryy6kscr.js";
6
+ } from "./pty-handoff-ryy6kscr.js";
7
7
  import {
8
8
  __export
9
- } from "./service-probe-9rqn6x4v.js";
9
+ } from "./pty-handoff-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
  defaultEnsureTiming2
3
- } from "./service-probe-xgnj2w4v.js";
3
+ } from "./pty-handoff-xgnj2w4v.js";
4
4
  import {
5
5
  matchesVersion2
6
- } from "./service-probe-sxt88q69.js";
6
+ } from "./pty-handoff-sxt88q69.js";
7
7
 
8
8
  // src/service-probe.ts
9
9
  import { homedir } from "node:os";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  make7
3
- } from "./service-probe-8bbb028w.js";
3
+ } from "./pty-handoff-8bbb028w.js";
4
4
  import {
5
5
  make6
6
- } from "./service-probe-sfay14gz.js";
6
+ } from "./pty-handoff-sfay14gz.js";
7
7
  import {
8
8
  makeRpc2
9
- } from "./service-probe-skhp7hxc.js";
9
+ } from "./pty-handoff-skhp7hxc.js";
10
10
  import {
11
11
  __export
12
- } from "./service-probe-9rqn6x4v.js";
12
+ } from "./pty-handoff-9rqn6x4v.js";
13
13
 
14
14
  // src/promise/client.ts
15
15
  var exports_client3 = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-probe-9rqn6x4v.js";
3
+ } from "./pty-handoff-9rqn6x4v.js";
4
4
 
5
5
  // src/shared-events.ts
6
6
  var exports_shared_events = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  headers2
3
- } from "./service-probe-2ny4vxct.js";
3
+ } from "./pty-handoff-2ny4vxct.js";
4
4
  import {
5
5
  __export
6
- } from "./service-probe-9rqn6x4v.js";
6
+ } from "./pty-handoff-9rqn6x4v.js";
7
7
 
8
8
  // src/pty-handoff.ts
9
9
  var exports_pty_handoff = {};
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  make7
3
- } from "./service-probe-8bbb028w.js";
3
+ } from "./pty-handoff-8bbb028w.js";
4
4
  import {
5
5
  ClientError2
6
- } from "./service-probe-y2etg5bs.js";
6
+ } from "./pty-handoff-y2etg5bs.js";
7
7
  import {
8
- make3
9
- } from "./service-probe-ncbmhvtm.js";
8
+ make4
9
+ } from "./pty-handoff-z9zdjnb9.js";
10
10
  import {
11
- make4,
11
+ make3,
12
12
  aborted2
13
- } from "./service-probe-9j12j8xw.js";
13
+ } from "./pty-handoff-15p82y03.js";
14
14
  import {
15
15
  __export
16
- } from "./service-probe-9rqn6x4v.js";
16
+ } from "./pty-handoff-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,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-probe-9rqn6x4v.js";
3
+ } from "./pty-handoff-9rqn6x4v.js";
4
4
 
5
5
  // src/rpc-runtime.ts
6
6
  var exports_rpc_runtime = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ClientError3
3
- } from "./service-probe-nwcpakzx.js";
3
+ } from "./pty-handoff-nwcpakzx.js";
4
4
  import {
5
5
  __export
6
- } from "./service-probe-9rqn6x4v.js";
6
+ } from "./pty-handoff-9rqn6x4v.js";
7
7
 
8
8
  // src/promise/generated/client.ts
9
9
  var exports_client4 = {};
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isRpcError2,
3
3
  isRpcInternalError2
4
- } from "./service-probe-c46qzyff.js";
4
+ } from "./pty-handoff-c46qzyff.js";
5
5
 
6
6
  // src/promise/rpc.ts
7
7
  function makeRpc2(raw, events) {
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  ClientApi2
3
- } from "./service-probe-vmytr4q8.js";
3
+ } from "./pty-handoff-vmytr4q8.js";
4
4
  import {
5
5
  ClientError2
6
- } from "./service-probe-y2etg5bs.js";
6
+ } from "./pty-handoff-y2etg5bs.js";
7
7
  import {
8
8
  __export
9
- } from "./service-probe-9rqn6x4v.js";
9
+ } from "./pty-handoff-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/encoding";
@@ -658,6 +658,6 @@ var adaptClient = (raw) => ({
658
658
  usage: adaptGroupUsage(raw["server.usage"]),
659
659
  config: adaptGroupConfig(raw["server.config"])
660
660
  });
661
- var make3 = (options) => HttpApiClient.make(ClientApi2, options).pipe(Effect.map(adaptClient));
661
+ var make4 = (options) => HttpApiClient.make(ClientApi2, options).pipe(Effect.map(adaptClient));
662
662
 
663
- export { make3, exports_client2 };
663
+ export { make4, exports_client2 };
package/dist/contract.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  effectOmitEndpoints2,
4
4
  groupNames2,
5
5
  promiseOmitEndpoints2
6
- } from "./chunks/service-probe-vmytr4q8.js";
6
+ } from "./chunks/pty-handoff-vmytr4q8.js";
7
7
  export {
8
8
  ClientApi2 as ClientApi,
9
9
  effectOmitEndpoints2 as effectOmitEndpoints,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  make2,
3
3
  exports_client
4
- } from "../chunks/service-probe-k6rgyy5p.js";
5
- import"../chunks/service-probe-6mptkzbc.js";
6
- import"../chunks/service-probe-ncbmhvtm.js";
7
- import"../chunks/service-probe-y2etg5bs.js";
8
- import"../chunks/service-probe-9j12j8xw.js";
9
- import"../chunks/service-probe-8bbb028w.js";
10
- import"../chunks/service-probe-vmytr4q8.js";
11
- import"../chunks/service-probe-ryy6kscr.js";
4
+ } from "../chunks/pty-handoff-er32x71c.js";
5
+ import"../chunks/pty-handoff-15p82y03.js";
6
+ import"../chunks/pty-handoff-6mptkzbc.js";
7
+ import"../chunks/pty-handoff-z9zdjnb9.js";
8
+ import"../chunks/pty-handoff-y2etg5bs.js";
9
+ import"../chunks/pty-handoff-vmytr4q8.js";
10
+ import"../chunks/pty-handoff-8bbb028w.js";
11
+ import"../chunks/pty-handoff-ryy6kscr.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-probe-y2etg5bs.js";
3
+ } from "../../chunks/pty-handoff-y2etg5bs.js";
4
4
  export {
5
5
  ClientError2 as ClientError
6
6
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
- make3
3
- } from "../../chunks/service-probe-ncbmhvtm.js";
4
- import"../../chunks/service-probe-y2etg5bs.js";
5
- import"../../chunks/service-probe-vmytr4q8.js";
2
+ make4
3
+ } from "../../chunks/pty-handoff-z9zdjnb9.js";
4
+ import"../../chunks/pty-handoff-y2etg5bs.js";
5
+ import"../../chunks/pty-handoff-vmytr4q8.js";
6
6
  export {
7
- make3 as make
7
+ make4 as make
8
8
  };
@@ -1,11 +1,11 @@
1
- import"../../chunks/service-probe-6mptkzbc.js";
1
+ import"../../chunks/pty-handoff-6mptkzbc.js";
2
2
  import {
3
3
  exports_client2
4
- } from "../../chunks/service-probe-ncbmhvtm.js";
4
+ } from "../../chunks/pty-handoff-z9zdjnb9.js";
5
5
  import {
6
6
  ClientError2
7
- } from "../../chunks/service-probe-y2etg5bs.js";
8
- import"../../chunks/service-probe-vmytr4q8.js";
7
+ } from "../../chunks/pty-handoff-y2etg5bs.js";
8
+ import"../../chunks/pty-handoff-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-probe-y2etg5bs.js";
4
- import"../chunks/service-probe-vmytr4q8.js";
5
- import"../chunks/service-probe-ncbmhvtm.js";
6
- import"../chunks/service-probe-6mptkzbc.js";
7
- import"../chunks/service-probe-8bbb028w.js";
8
- import"../chunks/service-probe-ryy6kscr.js";
9
- import"../chunks/service-probe-9j12j8xw.js";
3
+ } from "../chunks/pty-handoff-y2etg5bs.js";
4
+ import"../chunks/pty-handoff-vmytr4q8.js";
5
+ import"../chunks/pty-handoff-z9zdjnb9.js";
6
+ import"../chunks/pty-handoff-6mptkzbc.js";
7
+ import"../chunks/pty-handoff-8bbb028w.js";
8
+ import"../chunks/pty-handoff-ryy6kscr.js";
9
+ import"../chunks/pty-handoff-15p82y03.js";
10
10
  import {
11
11
  exports_client
12
- } from "../chunks/service-probe-k6rgyy5p.js";
12
+ } from "../chunks/pty-handoff-er32x71c.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-probe-9j12j8xw.js";
6
- import"../chunks/service-probe-ryy6kscr.js";
5
+ } from "../chunks/pty-handoff-15p82y03.js";
6
+ import"../chunks/pty-handoff-ryy6kscr.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
  };
@@ -1,28 +1,28 @@
1
1
  import {
2
2
  spawnServiceContender2,
3
3
  contenderPool2
4
- } from "../chunks/service-probe-ve4aws36.js";
4
+ } from "../chunks/pty-handoff-ve4aws36.js";
5
5
  import {
6
6
  defaultEnsureTiming2,
7
7
  ensureTiming2
8
- } from "../chunks/service-probe-xgnj2w4v.js";
8
+ } from "../chunks/pty-handoff-xgnj2w4v.js";
9
9
  import {
10
10
  matchesVersion2
11
- } from "../chunks/service-probe-sxt88q69.js";
11
+ } from "../chunks/pty-handoff-sxt88q69.js";
12
12
  import {
13
13
  decide2,
14
14
  fallback2,
15
15
  same2,
16
16
  probeResult2,
17
17
  headers2
18
- } from "../chunks/service-probe-2ny4vxct.js";
18
+ } from "../chunks/pty-handoff-2ny4vxct.js";
19
19
  import {
20
20
  prepare2,
21
21
  environment2,
22
22
  complete2,
23
23
  clear2
24
- } from "../chunks/service-probe-1z3ffed9.js";
25
- import"../chunks/service-probe-qav6mfdz.js";
24
+ } from "../chunks/pty-handoff-ec7zpgc0.js";
25
+ import"../chunks/pty-handoff-qav6mfdz.js";
26
26
 
27
27
  // src/effect/service.ts
28
28
  import { Effect, FileSystem, Option, Schedule, Schema } from "effect";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  make5,
3
3
  exports_client3
4
- } from "../chunks/service-probe-2t8h8q18.js";
5
- import"../chunks/service-probe-vyas3vgt.js";
6
- import"../chunks/service-probe-sfay14gz.js";
7
- import"../chunks/service-probe-skhp7hxc.js";
8
- import"../chunks/service-probe-c46qzyff.js";
9
- import"../chunks/service-probe-nwcpakzx.js";
10
- import"../chunks/service-probe-8bbb028w.js";
4
+ } from "../chunks/pty-handoff-2t8h8q18.js";
5
+ import"../chunks/pty-handoff-vyas3vgt.js";
6
+ import"../chunks/pty-handoff-sfay14gz.js";
7
+ import"../chunks/pty-handoff-skhp7hxc.js";
8
+ import"../chunks/pty-handoff-c46qzyff.js";
9
+ import"../chunks/pty-handoff-nwcpakzx.js";
10
+ import"../chunks/pty-handoff-8bbb028w.js";
11
11
  export {
12
12
  exports_client3 as OpenCode,
13
13
  make5 as make
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ClientError3
3
- } from "../../chunks/service-probe-nwcpakzx.js";
3
+ } from "../../chunks/pty-handoff-nwcpakzx.js";
4
4
  export {
5
5
  ClientError3 as ClientError
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  make6
3
- } from "../../chunks/service-probe-sfay14gz.js";
4
- import"../../chunks/service-probe-nwcpakzx.js";
3
+ } from "../../chunks/pty-handoff-sfay14gz.js";
4
+ import"../../chunks/pty-handoff-nwcpakzx.js";
5
5
  export {
6
6
  make6 as make
7
7
  };
@@ -1,7 +1,7 @@
1
- import"../../chunks/service-probe-vyas3vgt.js";
1
+ import"../../chunks/pty-handoff-vyas3vgt.js";
2
2
  import {
3
3
  exports_client4
4
- } from "../../chunks/service-probe-sfay14gz.js";
4
+ } from "../../chunks/pty-handoff-sfay14gz.js";
5
5
  import {
6
6
  isInvalidRequestError2,
7
7
  isUnauthorizedError2,
@@ -37,10 +37,10 @@ import {
37
37
  isShellNotFoundError2,
38
38
  isWorktreeError2,
39
39
  isVcsInitNotSupportedError2
40
- } from "../../chunks/service-probe-c46qzyff.js";
40
+ } from "../../chunks/pty-handoff-c46qzyff.js";
41
41
  import {
42
42
  ClientError3
43
- } from "../../chunks/service-probe-nwcpakzx.js";
43
+ } from "../../chunks/pty-handoff-nwcpakzx.js";
44
44
  export {
45
45
  ClientError3 as ClientError,
46
46
  exports_client4 as OpenCode,
@@ -33,7 +33,7 @@ import {
33
33
  isShellNotFoundError2,
34
34
  isWorktreeError2,
35
35
  isVcsInitNotSupportedError2
36
- } from "../../chunks/service-probe-c46qzyff.js";
36
+ } from "../../chunks/pty-handoff-c46qzyff.js";
37
37
  export {
38
38
  isAgentNotFoundError2 as isAgentNotFoundError,
39
39
  isCommandExecutionError2 as isCommandExecutionError,
@@ -1,10 +1,10 @@
1
- import"../chunks/service-probe-m2eywc8w.js";
1
+ import"../chunks/pty-handoff-m2eywc8w.js";
2
2
  import {
3
3
  exports_client3
4
- } from "../chunks/service-probe-2t8h8q18.js";
5
- import"../chunks/service-probe-vyas3vgt.js";
6
- import"../chunks/service-probe-sfay14gz.js";
7
- import"../chunks/service-probe-skhp7hxc.js";
4
+ } from "../chunks/pty-handoff-2t8h8q18.js";
5
+ import"../chunks/pty-handoff-vyas3vgt.js";
6
+ import"../chunks/pty-handoff-sfay14gz.js";
7
+ import"../chunks/pty-handoff-skhp7hxc.js";
8
8
  import {
9
9
  isInvalidRequestError2,
10
10
  isUnauthorizedError2,
@@ -40,11 +40,11 @@ import {
40
40
  isShellNotFoundError2,
41
41
  isWorktreeError2,
42
42
  isVcsInitNotSupportedError2
43
- } from "../chunks/service-probe-c46qzyff.js";
43
+ } from "../chunks/pty-handoff-c46qzyff.js";
44
44
  import {
45
45
  ClientError3
46
- } from "../chunks/service-probe-nwcpakzx.js";
47
- import"../chunks/service-probe-8bbb028w.js";
46
+ } from "../chunks/pty-handoff-nwcpakzx.js";
47
+ import"../chunks/pty-handoff-8bbb028w.js";
48
48
  export {
49
49
  ClientError3 as ClientError,
50
50
  exports_client3 as OpenCode,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeRpc2
3
- } from "../chunks/service-probe-skhp7hxc.js";
4
- import"../chunks/service-probe-c46qzyff.js";
3
+ } from "../chunks/pty-handoff-skhp7hxc.js";
4
+ import"../chunks/pty-handoff-c46qzyff.js";
5
5
  export {
6
6
  makeRpc2 as makeRpc
7
7
  };
@@ -1,28 +1,28 @@
1
1
  import {
2
2
  spawnServiceContender2,
3
3
  contenderPool2
4
- } from "../chunks/service-probe-ve4aws36.js";
4
+ } from "../chunks/pty-handoff-ve4aws36.js";
5
5
  import {
6
6
  defaultEnsureTiming2,
7
7
  ensureTiming2
8
- } from "../chunks/service-probe-xgnj2w4v.js";
8
+ } from "../chunks/pty-handoff-xgnj2w4v.js";
9
9
  import {
10
10
  matchesVersion2
11
- } from "../chunks/service-probe-sxt88q69.js";
11
+ } from "../chunks/pty-handoff-sxt88q69.js";
12
12
  import {
13
13
  decide2,
14
14
  fallback2,
15
15
  same2,
16
16
  probeResult2,
17
17
  headers2
18
- } from "../chunks/service-probe-2ny4vxct.js";
18
+ } from "../chunks/pty-handoff-2ny4vxct.js";
19
19
  import {
20
20
  prepare2,
21
21
  environment2,
22
22
  complete2,
23
23
  clear2
24
- } from "../chunks/service-probe-1z3ffed9.js";
25
- import"../chunks/service-probe-qav6mfdz.js";
24
+ } from "../chunks/pty-handoff-ec7zpgc0.js";
25
+ import"../chunks/pty-handoff-qav6mfdz.js";
26
26
 
27
27
  // src/promise/service.ts
28
28
  import { readFile, rm } from "node:fs/promises";
@@ -4,10 +4,10 @@ import {
4
4
  complete2,
5
5
  clear2,
6
6
  exports_pty_handoff
7
- } from "./chunks/service-probe-1z3ffed9.js";
8
- import"./chunks/service-probe-2ny4vxct.js";
9
- import"./chunks/service-probe-sxt88q69.js";
10
- import"./chunks/service-probe-xgnj2w4v.js";
7
+ } from "./chunks/pty-handoff-ec7zpgc0.js";
8
+ import"./chunks/pty-handoff-2ny4vxct.js";
9
+ import"./chunks/pty-handoff-sxt88q69.js";
10
+ import"./chunks/pty-handoff-xgnj2w4v.js";
11
11
  export {
12
12
  exports_pty_handoff as PtyHandoff,
13
13
  clear2 as clear,
@@ -4,7 +4,7 @@ import {
4
4
  event2,
5
5
  eventType2,
6
6
  exports_rpc_runtime
7
- } from "./chunks/service-probe-ryy6kscr.js";
7
+ } from "./chunks/pty-handoff-ryy6kscr.js";
8
8
  export {
9
9
  exports_rpc_runtime as RpcRuntime,
10
10
  event2 as event,
@@ -2,7 +2,7 @@ import {
2
2
  spawnServiceContender2,
3
3
  contenderPool2,
4
4
  contenderFinished2
5
- } from "./chunks/service-probe-ve4aws36.js";
5
+ } from "./chunks/pty-handoff-ve4aws36.js";
6
6
  export {
7
7
  contenderFinished2 as contenderFinished,
8
8
  contenderPool2 as contenderPool,
@@ -4,9 +4,9 @@ import {
4
4
  same2,
5
5
  probeResult2,
6
6
  headers2
7
- } from "./chunks/service-probe-2ny4vxct.js";
8
- import"./chunks/service-probe-sxt88q69.js";
9
- import"./chunks/service-probe-xgnj2w4v.js";
7
+ } from "./chunks/pty-handoff-2ny4vxct.js";
8
+ import"./chunks/pty-handoff-sxt88q69.js";
9
+ import"./chunks/pty-handoff-xgnj2w4v.js";
10
10
  export {
11
11
  decide2 as decide,
12
12
  fallback2 as fallback,
@@ -2,7 +2,7 @@ import {
2
2
  defaultEnsureTiming2,
3
3
  ensureTiming2,
4
4
  withEnsureTiming2
5
- } from "./chunks/service-probe-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-probe-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-probe-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-probe-8bbb028w.js";
4
+ } from "./chunks/pty-handoff-8bbb028w.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-probe-ydhz1zrh.js";
5
+ } from "../chunks/pty-handoff-ydhz1zrh.js";
6
6
  export {
7
7
  createClientConnection2 as createClientConnection,
8
8
  defaultIdleTimeout2 as defaultIdleTimeout,
@@ -29,6 +29,11 @@ export type CreateDataInput = {
29
29
  };
30
30
  /** Receives failed event-driven reads. Explicit reads still reject to their caller. */
31
31
  readonly onError?: (error: unknown) => void;
32
+ /**
33
+ * Drops the payload of inline `data:` files in tool results before they enter the store. For clients that never
34
+ * render tool-result files: a session full of screenshots otherwise keeps hundreds of MB of base64 alive.
35
+ */
36
+ readonly omitToolFileData?: boolean;
32
37
  };
33
38
  export declare const settleMs = 150;
34
39
  export type FormWithLocation = FormInfo & {
@@ -2,15 +2,15 @@ import {
2
2
  settleMs2,
3
3
  locationKey2,
4
4
  createData2
5
- } from "../chunks/service-probe-07pp8bwq.js";
6
- import"../chunks/service-probe-m2eywc8w.js";
7
- import"../chunks/service-probe-2t8h8q18.js";
8
- import"../chunks/service-probe-vyas3vgt.js";
9
- import"../chunks/service-probe-sfay14gz.js";
10
- import"../chunks/service-probe-skhp7hxc.js";
11
- import"../chunks/service-probe-c46qzyff.js";
12
- import"../chunks/service-probe-nwcpakzx.js";
13
- import"../chunks/service-probe-8bbb028w.js";
5
+ } from "../chunks/pty-handoff-10stgdsh.js";
6
+ import"../chunks/pty-handoff-m2eywc8w.js";
7
+ import"../chunks/pty-handoff-2t8h8q18.js";
8
+ import"../chunks/pty-handoff-vyas3vgt.js";
9
+ import"../chunks/pty-handoff-sfay14gz.js";
10
+ import"../chunks/pty-handoff-skhp7hxc.js";
11
+ import"../chunks/pty-handoff-c46qzyff.js";
12
+ import"../chunks/pty-handoff-nwcpakzx.js";
13
+ import"../chunks/pty-handoff-8bbb028w.js";
14
14
  export {
15
15
  createData2 as createData,
16
16
  locationKey2 as locationKey,
@@ -1,31 +1,31 @@
1
- import"../chunks/service-probe-nwcpakzx.js";
2
- import"../chunks/service-probe-sfay14gz.js";
3
- import"../chunks/service-probe-c46qzyff.js";
4
- import"../chunks/service-probe-vyas3vgt.js";
5
- import"../chunks/service-probe-8bbb028w.js";
6
- import"../chunks/service-probe-skhp7hxc.js";
7
- import"../chunks/service-probe-2t8h8q18.js";
8
- import"../chunks/service-probe-m2eywc8w.js";
1
+ import"../chunks/pty-handoff-nwcpakzx.js";
2
+ import"../chunks/pty-handoff-sfay14gz.js";
3
+ import"../chunks/pty-handoff-c46qzyff.js";
4
+ import"../chunks/pty-handoff-vyas3vgt.js";
5
+ import"../chunks/pty-handoff-8bbb028w.js";
6
+ import"../chunks/pty-handoff-skhp7hxc.js";
7
+ import"../chunks/pty-handoff-2t8h8q18.js";
8
+ import"../chunks/pty-handoff-m2eywc8w.js";
9
9
  import {
10
10
  settleMs2,
11
11
  locationKey2,
12
12
  createData2
13
- } from "../chunks/service-probe-07pp8bwq.js";
13
+ } from "../chunks/pty-handoff-10stgdsh.js";
14
14
  import {
15
15
  defaultIdleTimeout2,
16
16
  foregroundIdleThreshold2,
17
17
  createClientConnection2
18
- } from "../chunks/service-probe-ydhz1zrh.js";
18
+ } from "../chunks/pty-handoff-ydhz1zrh.js";
19
19
  import {
20
20
  createPtyClient2,
21
21
  createPersistentPtyClient2
22
- } from "../chunks/service-probe-gne7h7mq.js";
22
+ } from "../chunks/pty-handoff-gne7h7mq.js";
23
23
  import {
24
24
  createSessionRetention2
25
- } from "../chunks/service-probe-6mq2wh8y.js";
25
+ } from "../chunks/pty-handoff-6mq2wh8y.js";
26
26
  import {
27
27
  lastAssistantWithUsage2
28
- } from "../chunks/service-probe-8s2anffy.js";
28
+ } from "../chunks/pty-handoff-8s2anffy.js";
29
29
  export {
30
30
  createClientConnection2 as createClientConnection,
31
31
  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-probe-gne7h7mq.js";
4
+ } from "../chunks/pty-handoff-gne7h7mq.js";
5
5
  export {
6
6
  createPersistentPtyClient2 as createPersistentPtyClient,
7
7
  createPtyClient2 as createPtyClient
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSessionRetention2
3
- } from "../chunks/service-probe-6mq2wh8y.js";
3
+ } from "../chunks/pty-handoff-6mq2wh8y.js";
4
4
  export {
5
5
  createSessionRetention2 as createSessionRetention
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  lastAssistantWithUsage2
3
- } from "../chunks/service-probe-8s2anffy.js";
3
+ } from "../chunks/pty-handoff-8s2anffy.js";
4
4
  export {
5
5
  lastAssistantWithUsage2 as lastAssistantWithUsage
6
6
  };
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": "0.0.0-dev-21894",
4
+ "version": "0.0.0-dev-21904",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -62,8 +62,8 @@
62
62
  "typecheck:tsc": "tsc --noEmit"
63
63
  },
64
64
  "dependencies": {
65
- "@opencode/schema": "0.0.0-dev-21894",
66
- "@opencode/protocol": "0.0.0-dev-21894"
65
+ "@opencode/schema": "0.0.0-dev-21904",
66
+ "@opencode/protocol": "0.0.0-dev-21904"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "effect": "4.0.1",
@@ -80,7 +80,7 @@
80
80
  "devDependencies": {
81
81
  "@effect/platform-node": "4.0.1",
82
82
  "@modelcontextprotocol/client": "2.3.1",
83
- "@opencode/httpapi-codegen": "0.0.0-dev-21894",
83
+ "@opencode/httpapi-codegen": "0.0.0-dev-21904",
84
84
  "@tsconfig/bun": "1.0.9",
85
85
  "@types/bun": "1.4.3",
86
86
  "@typescript/native": "npm:typescript@7.1.0-beta",