@opencode/client 2.0.26 → 2.0.27

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-timing-1y4a697q.js → contract-1y4a697q.js} +1 -1
  2. package/dist/chunks/{service-timing-8ye1ye6f.js → contract-2ny4vxct.js} +2 -2
  3. package/dist/chunks/{service-timing-546yv4kj.js → contract-9swsjjg0.js} +7 -7
  4. package/dist/chunks/{service-timing-trz7kcxd.js → contract-9vdz0zwn.js} +3 -2
  5. package/dist/chunks/{service-timing-e4sc9kq6.js → contract-csw6v8a4.js} +4 -4
  6. package/dist/chunks/{service-timing-frbwqjmf.js → contract-frbwqjmf.js} +1 -1
  7. package/dist/chunks/{service-timing-0rcx1gca.js → contract-j4tgja9b.js} +1 -1
  8. package/dist/chunks/{service-timing-tbh3h57v.js → contract-qfk0hgz0.js} +10 -3
  9. package/dist/chunks/{service-timing-t1xa31vm.js → contract-t1xa31vm.js} +1 -1
  10. package/dist/chunks/{service-timing-w1w809zr.js → contract-w1w809zr.js} +2 -2
  11. package/dist/chunks/{service-timing-p7x80kzg.js → contract-ww92gbf0.js} +6 -6
  12. package/dist/contract.js +1 -1
  13. package/dist/effect/api/api.d.ts +71 -64
  14. package/dist/effect/client.d.ts +154 -153
  15. package/dist/effect/client.js +8 -8
  16. package/dist/effect/generated/client-error.js +1 -1
  17. package/dist/effect/generated/client.d.ts +20 -19
  18. package/dist/effect/generated/client.js +3 -3
  19. package/dist/effect/generated/index.js +4 -4
  20. package/dist/effect/index.js +8 -8
  21. package/dist/effect/rpc.js +2 -2
  22. package/dist/effect/service.js +6 -6
  23. package/dist/promise/client.d.ts +3 -3
  24. package/dist/promise/client.js +7 -7
  25. package/dist/promise/generated/client-error.js +1 -1
  26. package/dist/promise/generated/client.d.ts +4 -4
  27. package/dist/promise/generated/client.js +2 -2
  28. package/dist/promise/generated/index.js +4 -4
  29. package/dist/promise/generated/types.d.ts +1685 -1628
  30. package/dist/promise/generated/types.js +1 -1
  31. package/dist/promise/index.js +8 -8
  32. package/dist/promise/rpc.js +2 -2
  33. package/dist/promise/service.js +6 -6
  34. package/dist/pty-handoff.js +1 -1
  35. package/dist/rpc-runtime.js +1 -1
  36. package/dist/service-contender.js +1 -1
  37. package/dist/service-probe.js +3 -3
  38. package/dist/service-timing.js +1 -1
  39. package/dist/service-version.js +1 -1
  40. package/dist/service.js +1 -1
  41. package/dist/shared-events.js +1 -1
  42. package/dist/solid/connection.js +1 -1
  43. package/dist/solid/data.js +9 -9
  44. package/dist/solid/index.js +11 -11
  45. package/dist/solid/pty.js +1 -1
  46. package/package.json +7 -7
  47. /package/dist/chunks/{service-timing-6mptkzbc.js → contract-6mptkzbc.js} +0 -0
  48. /package/dist/chunks/{service-timing-7f0py9js.js → contract-7f0py9js.js} +0 -0
  49. /package/dist/chunks/{service-timing-9rqn6x4v.js → contract-9rqn6x4v.js} +0 -0
  50. /package/dist/chunks/{service-timing-gne7h7mq.js → contract-gne7h7mq.js} +0 -0
  51. /package/dist/chunks/{service-timing-js54wxgp.js → contract-js54wxgp.js} +0 -0
  52. /package/dist/chunks/{service-timing-m2eywc8w.js → contract-m2eywc8w.js} +0 -0
  53. /package/dist/chunks/{service-timing-qav6mfdz.js → contract-qav6mfdz.js} +0 -0
  54. /package/dist/chunks/{service-timing-sxt88q69.js → contract-sxt88q69.js} +0 -0
  55. /package/dist/chunks/{service-timing-ve4aws36.js → contract-ve4aws36.js} +0 -0
  56. /package/dist/chunks/{service-timing-vmytr4q8.js → contract-vmytr4q8.js} +0 -0
  57. /package/dist/chunks/{service-timing-vt9jbch8.js → contract-vt9jbch8.js} +0 -0
  58. /package/dist/chunks/{service-timing-vyas3vgt.js → contract-vyas3vgt.js} +0 -0
  59. /package/dist/chunks/{service-timing-xgnj2w4v.js → contract-xgnj2w4v.js} +0 -0
  60. /package/dist/chunks/{service-timing-ydhz1zrh.js → contract-ydhz1zrh.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isRpcError2,
3
3
  isRpcInternalError2
4
- } from "./service-timing-vt9jbch8.js";
4
+ } from "./contract-vt9jbch8.js";
5
5
 
6
6
  // src/promise/rpc.ts
7
7
  function makeRpc2(raw, events) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  defaultEnsureTiming2
3
- } from "./service-timing-xgnj2w4v.js";
3
+ } from "./contract-xgnj2w4v.js";
4
4
  import {
5
5
  matchesVersion2
6
- } from "./service-timing-sxt88q69.js";
6
+ } from "./contract-sxt88q69.js";
7
7
 
8
8
  // src/service-probe.ts
9
9
  import { homedir } from "node:os";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ClientApi2
3
- } from "./service-timing-vmytr4q8.js";
3
+ } from "./contract-vmytr4q8.js";
4
4
  import {
5
5
  ClientError3
6
- } from "./service-timing-7f0py9js.js";
6
+ } from "./contract-7f0py9js.js";
7
7
  import {
8
8
  __export
9
- } from "./service-timing-9rqn6x4v.js";
9
+ } from "./contract-9rqn6x4v.js";
10
10
 
11
11
  // src/effect/generated/client.ts
12
12
  var exports_client4 = {};
@@ -14,9 +14,9 @@ __export(exports_client4, {
14
14
  make: () => make5
15
15
  });
16
16
  import { Effect, Stream, Schema } from "effect";
17
- import { Sse } from "effect/unstable/encoding";
18
- import { HttpClientError } from "effect/unstable/http";
19
- import { HttpApiClient } from "effect/unstable/httpapi";
17
+ import { Sse } from "effect/encoding";
18
+ import { HttpClientError } from "effect/http";
19
+ import { HttpApiClient } from "effect/http-api";
20
20
  var mapClientError = (error) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError3({ cause: error }) : error;
21
21
  var preserveEffect = () => (effect) => effect;
22
22
  var preserveStream = () => (stream) => stream;
@@ -376,7 +376,7 @@ var adaptGroupCredential = (raw) => ({
376
376
  activate: EndpointCredentialActivate(raw),
377
377
  remove: EndpointCredentialRemove(raw)
378
378
  });
379
- var EndpointProjectList = (raw) => () => preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError)));
379
+ var EndpointProjectList = (raw) => (input) => preserveEffect()(raw["project.list"]({ query: { archived: input?.["archived"] } }).pipe(Effect.mapError(mapClientError)));
380
380
  var EndpointProjectUpdate = (raw) => (input) => preserveEffect()(raw["project.update"]({
381
381
  params: { projectID: input["projectID"] },
382
382
  payload: { canonical: input["canonical"], name: input["name"], icon: input["icon"], commands: input["commands"] }
@@ -2,7 +2,7 @@ import {
2
2
  isFormNotFoundError2,
3
3
  isFormAlreadySettledError2,
4
4
  isPermissionNotFoundError2
5
- } from "./service-timing-vt9jbch8.js";
5
+ } from "./contract-vt9jbch8.js";
6
6
 
7
7
  // src/solid/data.ts
8
8
  import { Worktree } from "@opencode/schema/worktree";
@@ -847,6 +847,7 @@ function createData2(config) {
847
847
  id: messageIDFromEvent(event.id),
848
848
  type: "idle",
849
849
  outcome: event.type === "session.execution.succeeded" ? "succeeded" : event.type === "session.execution.failed" ? "failed" : "interrupted",
850
+ ...event.type === "session.execution.failed" ? { error: event.data.error } : {},
850
851
  time: { created: event.created }
851
852
  });
852
853
  if (store.session.message[event.data.sessionID]?.some((item) => item.type === "assistant" && item.content.some((part) => part.type === "tool" && (part.state.status === "streaming" || part.state.status === "running")))) {
@@ -1518,7 +1519,7 @@ function createData2(config) {
1518
1519
  },
1519
1520
  project: {
1520
1521
  list() {
1521
- return Object.values(store.project.info).toSorted((a, b) => b.time.active - a.time.active);
1522
+ return Object.values(store.project.info).filter((project) => project.time.archived === undefined).toSorted((a, b) => b.time.active - a.time.active);
1522
1523
  },
1523
1524
  get(projectID) {
1524
1525
  return store.project.info[projectID];
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  make7
3
- } from "./service-timing-frbwqjmf.js";
3
+ } from "./contract-frbwqjmf.js";
4
4
  import {
5
5
  make3
6
- } from "./service-timing-tbh3h57v.js";
6
+ } from "./contract-qfk0hgz0.js";
7
7
  import {
8
8
  makeRpc2
9
- } from "./service-timing-1y4a697q.js";
9
+ } from "./contract-1y4a697q.js";
10
10
  import {
11
11
  __export
12
- } from "./service-timing-9rqn6x4v.js";
12
+ } from "./contract-9rqn6x4v.js";
13
13
 
14
14
  // src/promise/client.ts
15
15
  var exports_client = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-timing-9rqn6x4v.js";
3
+ } from "./contract-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-timing-9rqn6x4v.js";
3
+ } from "./contract-9rqn6x4v.js";
4
4
 
5
5
  // src/pty-handoff.ts
6
6
  var exports_pty_handoff = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ClientError2
3
- } from "./service-timing-js54wxgp.js";
3
+ } from "./contract-js54wxgp.js";
4
4
  import {
5
5
  __export
6
- } from "./service-timing-9rqn6x4v.js";
6
+ } from "./contract-9rqn6x4v.js";
7
7
 
8
8
  // src/promise/generated/client.ts
9
9
  var exports_client2 = {};
@@ -868,7 +868,14 @@ function make3(options) {
868
868
  }, requestOptions)
869
869
  },
870
870
  project: {
871
- list: (requestOptions) => request({ method: "GET", path: `/api/project`, successStatus: 200, declaredStatuses: [400, 401, 404], empty: false }, requestOptions),
871
+ list: (input, requestOptions) => request({
872
+ method: "GET",
873
+ path: `/api/project`,
874
+ query: { archived: input?.["archived"] },
875
+ successStatus: 200,
876
+ declaredStatuses: [400, 401, 404],
877
+ empty: false
878
+ }, requestOptions),
872
879
  update: (input, requestOptions) => request({
873
880
  method: "PATCH",
874
881
  path: `/api/project/${encodeURIComponent(input.projectID)}`,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./service-timing-9rqn6x4v.js";
3
+ } from "./contract-9rqn6x4v.js";
4
4
 
5
5
  // src/rpc-runtime.ts
6
6
  var exports_rpc_runtime = {};
@@ -3,10 +3,10 @@ import {
3
3
  readError2,
4
4
  event2,
5
5
  eventType2
6
- } from "./service-timing-t1xa31vm.js";
6
+ } from "./contract-t1xa31vm.js";
7
7
  import {
8
8
  __export
9
- } from "./service-timing-9rqn6x4v.js";
9
+ } from "./contract-9rqn6x4v.js";
10
10
 
11
11
  // src/effect/rpc.ts
12
12
  var exports_rpc = {};
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  make7
3
- } from "./service-timing-frbwqjmf.js";
3
+ } from "./contract-frbwqjmf.js";
4
4
  import {
5
5
  ClientError3
6
- } from "./service-timing-7f0py9js.js";
6
+ } from "./contract-7f0py9js.js";
7
7
  import {
8
8
  make5
9
- } from "./service-timing-546yv4kj.js";
9
+ } from "./contract-9swsjjg0.js";
10
10
  import {
11
11
  make6,
12
12
  aborted2
13
- } from "./service-timing-w1w809zr.js";
13
+ } from "./contract-w1w809zr.js";
14
14
  import {
15
15
  __export
16
- } from "./service-timing-9rqn6x4v.js";
16
+ } from "./contract-9rqn6x4v.js";
17
17
 
18
18
  // src/effect/client.ts
19
19
  var exports_client3 = {};
@@ -22,7 +22,7 @@ __export(exports_client3, {
22
22
  make: () => make4
23
23
  });
24
24
  import { Cause, Context, Effect, Stream } from "effect";
25
- import { HttpClient, HttpClientRequest } from "effect/unstable/http";
25
+ import { HttpClient, HttpClientRequest } from "effect/http";
26
26
  var CurrentHeaders = Context.Reference("@opencode/client/effect/rpc/headers", {
27
27
  defaultValue: () => {
28
28
  return;
package/dist/contract.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  effectOmitEndpoints2,
4
4
  groupNames2,
5
5
  promiseOmitEndpoints2
6
- } from "./chunks/service-timing-vmytr4q8.js";
6
+ } from "./chunks/contract-vmytr4q8.js";
7
7
  export {
8
8
  ClientApi2 as ClientApi,
9
9
  effectOmitEndpoints2 as effectOmitEndpoints,