@opencode/sdk 2.0.18 → 2.0.20

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.
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  layer4,
3
3
  context2
4
- } from "./opencode-ya9awdj2.js";
4
+ } from "./contracts-ya9awdj2.js";
5
5
  import {
6
6
  make3
7
- } from "./opencode-wyq33nd6.js";
7
+ } from "./contracts-wyq33nd6.js";
8
8
  import {
9
9
  provide2,
10
10
  node2
11
- } from "./opencode-pqb0kjhx.js";
11
+ } from "./contracts-pqb0kjhx.js";
12
12
  import {
13
13
  __export
14
- } from "./opencode-9rqn6x4v.js";
14
+ } from "./contracts-9rqn6x4v.js";
15
15
 
16
16
  // src/internal/host.ts
17
17
  var exports_host = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./opencode-9rqn6x4v.js";
3
+ } from "./contracts-9rqn6x4v.js";
4
4
 
5
5
  // src/internal/workerd.ts
6
6
  var exports_workerd = {};
@@ -0,0 +1,15 @@
1
+ import {
2
+ create3
3
+ } from "./contracts-7hdbcq50.js";
4
+ import {
5
+ __export
6
+ } from "./contracts-9rqn6x4v.js";
7
+
8
+ // src/opencode.ts
9
+ var exports_opencode = {};
10
+ __export(exports_opencode, {
11
+ create: () => create2
12
+ });
13
+ var create2 = (options = {}) => create3(options);
14
+
15
+ export { create2, exports_opencode };
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  create5
3
- } from "./opencode-b54z5jwe.js";
3
+ } from "./contracts-2djeejkr.js";
4
4
  import {
5
5
  __export
6
- } from "./opencode-9rqn6x4v.js";
6
+ } from "./contracts-9rqn6x4v.js";
7
7
 
8
8
  // src/promise.ts
9
9
  var exports_promise = {};
10
10
  __export(exports_promise, {
11
11
  PromiseSdk: () => exports_promise,
12
- create: () => create4
12
+ create: () => create3
13
13
  });
14
14
  import { OpenCode } from "@opencode/client";
15
15
  import { Session } from "@opencode/schema/session";
16
16
  import { Effect, Schema } from "effect";
17
- async function create4(options = {}, embed = {}) {
17
+ async function create3(options = {}, embed = {}) {
18
18
  const { plugins, instances, ...hostOptions } = options;
19
19
  const host = await Effect.runPromise(create5({
20
20
  ...hostOptions,
@@ -44,4 +44,4 @@ async function create4(options = {}, embed = {}) {
44
44
  };
45
45
  }
46
46
 
47
- export { create4, exports_promise };
47
+ export { create3, exports_promise };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  __export
3
- } from "./opencode-9rqn6x4v.js";
3
+ } from "./contracts-9rqn6x4v.js";
4
4
 
5
- // src/effect/tool.ts
5
+ // src/tool.ts
6
6
  var exports_tool = {};
7
7
  __export(exports_tool, {
8
8
  Error: () => Error2,
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  create5
3
- } from "./opencode-b54z5jwe.js";
3
+ } from "./contracts-2djeejkr.js";
4
4
  import {
5
5
  __export
6
- } from "./opencode-9rqn6x4v.js";
6
+ } from "./contracts-9rqn6x4v.js";
7
7
 
8
8
  // src/effect/opencode.ts
9
- var exports_opencode = {};
10
- __export(exports_opencode, {
11
- OpenCode: () => exports_opencode,
9
+ var exports_opencode2 = {};
10
+ __export(exports_opencode2, {
11
+ OpenCode: () => exports_opencode2,
12
12
  Service: () => Service2,
13
- create: () => create2,
13
+ create: () => create4,
14
14
  layer: () => layer2
15
15
  });
16
16
  import { OpenCode } from "@opencode/client/effect";
17
17
  import { Context, Effect, Layer } from "effect";
18
18
  import { FetchHttpClient, HttpClient } from "effect/unstable/http";
19
- var create2 = Effect.fn("OpenCode.create")(function* (options = {}, embed = {}) {
19
+ var create4 = Effect.fn("OpenCode.create")(function* (options = {}, embed = {}) {
20
20
  const host = yield* Effect.acquireRelease(create5(options, embed), (host) => Effect.promise(host.close));
21
21
  const httpClient = yield* HttpClient.HttpClient.pipe(Effect.provide(FetchHttpClient.layer));
22
22
  const client = yield* OpenCode.make({ baseUrl: "http://opencode.local" }).pipe(Effect.provideService(HttpClient.HttpClient, HttpClient.transformResponse(httpClient, Effect.provideService(FetchHttpClient.Fetch, host.fetch))));
@@ -40,6 +40,6 @@ var create2 = Effect.fn("OpenCode.create")(function* (options = {}, embed = {})
40
40
 
41
41
  class Service2 extends Context.Service()("@opencode/sdk/OpenCode") {
42
42
  }
43
- var layer2 = (options = {}) => Layer.effect(Service2, create2(options));
43
+ var layer2 = (options = {}) => Layer.effect(Service2, create4(options));
44
44
 
45
- export { create2, Service2, layer2, exports_opencode };
45
+ export { create4, Service2, layer2, exports_opencode2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./opencode-9rqn6x4v.js";
3
+ } from "./contracts-9rqn6x4v.js";
4
4
 
5
5
  // src/internal/instances.ts
6
6
  var exports_instances = {};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./opencode-9rqn6x4v.js";
3
+ } from "./contracts-9rqn6x4v.js";
4
4
 
5
5
  // src/internal/fetch.ts
6
6
  var exports_fetch = {};
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  __export
3
- } from "./opencode-9rqn6x4v.js";
3
+ } from "./contracts-9rqn6x4v.js";
4
4
 
5
- // src/tool.ts
5
+ // src/effect/tool.ts
6
6
  var exports_tool2 = {};
7
7
  __export(exports_tool2, {
8
8
  Error: () => Error3,
package/dist/contracts.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  SessionMessage2,
27
27
  Skill2,
28
28
  Workspace2
29
- } from "./chunks/opencode-j1jhtwv7.js";
29
+ } from "./chunks/contracts-j1jhtwv7.js";
30
30
  export {
31
31
  AbsolutePath2 as AbsolutePath,
32
32
  Agent2 as Agent,
@@ -1,13 +1,13 @@
1
- import"../chunks/opencode-ya9awdj2.js";
2
- import"../chunks/opencode-wyq33nd6.js";
3
- import"../chunks/opencode-pqb0kjhx.js";
4
- import"../chunks/opencode-b54z5jwe.js";
1
+ import"../chunks/contracts-ya9awdj2.js";
2
+ import"../chunks/contracts-wyq33nd6.js";
3
+ import"../chunks/contracts-pqb0kjhx.js";
4
+ import"../chunks/contracts-2djeejkr.js";
5
5
  import {
6
- exports_opencode
7
- } from "../chunks/opencode-xcejgzf0.js";
6
+ exports_opencode2
7
+ } from "../chunks/contracts-kz7a056s.js";
8
8
  import {
9
- exports_tool
10
- } from "../chunks/opencode-n1hprnh9.js";
9
+ exports_tool2
10
+ } from "../chunks/contracts-xjkw3602.js";
11
11
  import {
12
12
  Agent2,
13
13
  Command2,
@@ -36,7 +36,7 @@ import {
36
36
  SessionMessage2,
37
37
  Skill2,
38
38
  Workspace2
39
- } from "../chunks/opencode-j1jhtwv7.js";
39
+ } from "../chunks/contracts-j1jhtwv7.js";
40
40
 
41
41
  // src/effect/index.ts
42
42
  import { ClientError } from "@opencode/client/effect";
@@ -52,7 +52,7 @@ export {
52
52
  Integration2 as Integration,
53
53
  Location2 as Location,
54
54
  Model2 as Model,
55
- exports_opencode as OpenCode,
55
+ exports_opencode2 as OpenCode,
56
56
  Permission2 as Permission,
57
57
  PermissionSaved2 as PermissionSaved,
58
58
  Project2 as Project,
@@ -67,7 +67,7 @@ export {
67
67
  SessionInbox2 as SessionInbox,
68
68
  SessionMessage2 as SessionMessage,
69
69
  Skill2 as Skill,
70
- exports_tool as Tool,
70
+ exports_tool2 as Tool,
71
71
  WebSearch2 as WebSearch,
72
72
  Workspace2 as Workspace,
73
73
  Worktree2 as Worktree
@@ -1,16 +1,16 @@
1
1
  import {
2
- create2,
2
+ create4,
3
3
  Service2,
4
4
  layer2,
5
- exports_opencode
6
- } from "../chunks/opencode-xcejgzf0.js";
7
- import"../chunks/opencode-b54z5jwe.js";
8
- import"../chunks/opencode-pqb0kjhx.js";
9
- import"../chunks/opencode-ya9awdj2.js";
10
- import"../chunks/opencode-wyq33nd6.js";
5
+ exports_opencode2
6
+ } from "../chunks/contracts-kz7a056s.js";
7
+ import"../chunks/contracts-2djeejkr.js";
8
+ import"../chunks/contracts-wyq33nd6.js";
9
+ import"../chunks/contracts-pqb0kjhx.js";
10
+ import"../chunks/contracts-ya9awdj2.js";
11
11
  export {
12
- exports_opencode as OpenCode,
12
+ exports_opencode2 as OpenCode,
13
13
  Service2 as Service,
14
- create2 as create,
14
+ create4 as create,
15
15
  layer2 as layer
16
16
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
- RegistrationError2,
3
- Error2
4
- } from "../chunks/opencode-n1hprnh9.js";
2
+ RegistrationError3,
3
+ Error3
4
+ } from "../chunks/contracts-xjkw3602.js";
5
5
  export {
6
- Error2 as Error,
7
- RegistrationError2 as RegistrationError
6
+ Error3 as Error,
7
+ RegistrationError3 as RegistrationError
8
8
  };
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  make2
3
- } from "../chunks/opencode-39225h8g.js";
4
- import"../chunks/opencode-ya9awdj2.js";
5
- import"../chunks/opencode-wyq33nd6.js";
6
- import"../chunks/opencode-pqb0kjhx.js";
7
- import"../chunks/opencode-b54z5jwe.js";
3
+ } from "../chunks/contracts-39225h8g.js";
4
+ import"../chunks/contracts-ya9awdj2.js";
5
+ import"../chunks/contracts-wyq33nd6.js";
6
+ import"../chunks/contracts-pqb0kjhx.js";
7
+ import"../chunks/contracts-2djeejkr.js";
8
8
  import {
9
- create2,
9
+ create4,
10
10
  Service2
11
- } from "../chunks/opencode-xcejgzf0.js";
11
+ } from "../chunks/contracts-kz7a056s.js";
12
12
  import {
13
13
  __export
14
- } from "../chunks/opencode-9rqn6x4v.js";
14
+ } from "../chunks/contracts-9rqn6x4v.js";
15
15
 
16
16
  // src/effect/workerd.ts
17
17
  var exports_workerd = {};
@@ -23,7 +23,7 @@ __export(exports_workerd, {
23
23
  import { Layer } from "effect";
24
24
  var create = ({ log, workspaceProviders, instances, ...options }) => {
25
25
  const profile = make2(options);
26
- return create2({ ...profile.options, log, workspaceProviders, instances }, { overrides: profile.replacements });
26
+ return create4({ ...profile.options, log, workspaceProviders, instances }, { overrides: profile.replacements });
27
27
  };
28
28
  var layer = (options) => Layer.effect(Service2, create(options));
29
29
  export {
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import"./chunks/opencode-ya9awdj2.js";
2
- import"./chunks/opencode-wyq33nd6.js";
3
- import"./chunks/opencode-pqb0kjhx.js";
4
- import"./chunks/opencode-b54z5jwe.js";
5
- import"./chunks/opencode-kp70gr0x.js";
1
+ import"./chunks/contracts-ya9awdj2.js";
2
+ import"./chunks/contracts-wyq33nd6.js";
3
+ import"./chunks/contracts-pqb0kjhx.js";
4
+ import"./chunks/contracts-2djeejkr.js";
5
+ import"./chunks/contracts-7hdbcq50.js";
6
6
  import {
7
- exports_opencode2
8
- } from "./chunks/opencode-j34yx374.js";
7
+ exports_opencode
8
+ } from "./chunks/contracts-5v2prbhp.js";
9
9
  import {
10
- exports_tool2
11
- } from "./chunks/opencode-hdqq71na.js";
10
+ exports_tool
11
+ } from "./chunks/contracts-jw22y9b0.js";
12
12
  import {
13
13
  Agent2,
14
14
  Command2,
@@ -37,7 +37,7 @@ import {
37
37
  SessionMessage2,
38
38
  Skill2,
39
39
  Workspace2
40
- } from "./chunks/opencode-j1jhtwv7.js";
40
+ } from "./chunks/contracts-j1jhtwv7.js";
41
41
 
42
42
  // src/index.ts
43
43
  import { ClientError } from "@opencode/client";
@@ -53,7 +53,7 @@ export {
53
53
  Integration2 as Integration,
54
54
  Location2 as Location,
55
55
  Model2 as Model,
56
- exports_opencode2 as OpenCode,
56
+ exports_opencode as OpenCode,
57
57
  Permission2 as Permission,
58
58
  PermissionSaved2 as PermissionSaved,
59
59
  Project2 as Project,
@@ -68,7 +68,7 @@ export {
68
68
  SessionInbox2 as SessionInbox,
69
69
  SessionMessage2 as SessionMessage,
70
70
  Skill2 as Skill,
71
- exports_tool2 as Tool,
71
+ exports_tool as Tool,
72
72
  WebSearch2 as WebSearch,
73
73
  Workspace2 as Workspace,
74
74
  Worktree2 as Worktree
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  make3,
3
3
  exports_fetch
4
- } from "../chunks/opencode-wyq33nd6.js";
4
+ } from "../chunks/contracts-wyq33nd6.js";
5
5
  export {
6
6
  exports_fetch as OwnedFetch,
7
7
  make3 as make
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  create5,
3
3
  exports_host
4
- } from "../chunks/opencode-b54z5jwe.js";
5
- import"../chunks/opencode-pqb0kjhx.js";
6
- import"../chunks/opencode-ya9awdj2.js";
7
- import"../chunks/opencode-wyq33nd6.js";
4
+ } from "../chunks/contracts-2djeejkr.js";
5
+ import"../chunks/contracts-wyq33nd6.js";
6
+ import"../chunks/contracts-pqb0kjhx.js";
7
+ import"../chunks/contracts-ya9awdj2.js";
8
8
  export {
9
9
  exports_host as EmbeddedHost,
10
10
  create5 as create
@@ -3,7 +3,7 @@ import {
3
3
  node2,
4
4
  layer3,
5
5
  exports_instances
6
- } from "../chunks/opencode-pqb0kjhx.js";
6
+ } from "../chunks/contracts-pqb0kjhx.js";
7
7
  export {
8
8
  exports_instances as SdkInstances,
9
9
  layer3 as layer,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  make2,
3
3
  exports_workerd
4
- } from "../chunks/opencode-39225h8g.js";
4
+ } from "../chunks/contracts-39225h8g.js";
5
5
  export {
6
6
  exports_workerd as WorkerdProfile,
7
7
  make2 as make
package/dist/logging.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  layer4,
3
3
  context2
4
- } from "./chunks/opencode-ya9awdj2.js";
4
+ } from "./chunks/contracts-ya9awdj2.js";
5
5
  export {
6
6
  context2 as context,
7
7
  layer4 as layer
package/dist/opencode.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
- create3
3
- } from "./chunks/opencode-j34yx374.js";
4
- import"./chunks/opencode-kp70gr0x.js";
5
- import"./chunks/opencode-b54z5jwe.js";
6
- import"./chunks/opencode-pqb0kjhx.js";
7
- import"./chunks/opencode-ya9awdj2.js";
8
- import"./chunks/opencode-wyq33nd6.js";
2
+ create2
3
+ } from "./chunks/contracts-5v2prbhp.js";
4
+ import"./chunks/contracts-7hdbcq50.js";
5
+ import"./chunks/contracts-2djeejkr.js";
6
+ import"./chunks/contracts-wyq33nd6.js";
7
+ import"./chunks/contracts-pqb0kjhx.js";
8
+ import"./chunks/contracts-ya9awdj2.js";
9
9
  export {
10
- create3 as create
10
+ create2 as create
11
11
  };
package/dist/promise.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
- create4,
2
+ create3,
3
3
  exports_promise
4
- } from "./chunks/opencode-kp70gr0x.js";
5
- import"./chunks/opencode-b54z5jwe.js";
6
- import"./chunks/opencode-pqb0kjhx.js";
7
- import"./chunks/opencode-ya9awdj2.js";
8
- import"./chunks/opencode-wyq33nd6.js";
4
+ } from "./chunks/contracts-7hdbcq50.js";
5
+ import"./chunks/contracts-2djeejkr.js";
6
+ import"./chunks/contracts-wyq33nd6.js";
7
+ import"./chunks/contracts-pqb0kjhx.js";
8
+ import"./chunks/contracts-ya9awdj2.js";
9
9
  export {
10
10
  exports_promise as PromiseSdk,
11
- create4 as create
11
+ create3 as create
12
12
  };
package/dist/tool.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
- RegistrationError3,
3
- Error3
4
- } from "./chunks/opencode-hdqq71na.js";
2
+ RegistrationError2,
3
+ Error2
4
+ } from "./chunks/contracts-jw22y9b0.js";
5
5
  export {
6
- Error3 as Error,
7
- RegistrationError3 as RegistrationError
6
+ Error2 as Error,
7
+ RegistrationError2 as RegistrationError
8
8
  };
package/dist/workerd.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  make2
3
- } from "./chunks/opencode-39225h8g.js";
4
- import"./chunks/opencode-ya9awdj2.js";
5
- import"./chunks/opencode-wyq33nd6.js";
6
- import"./chunks/opencode-pqb0kjhx.js";
7
- import"./chunks/opencode-b54z5jwe.js";
3
+ } from "./chunks/contracts-39225h8g.js";
4
+ import"./chunks/contracts-ya9awdj2.js";
5
+ import"./chunks/contracts-wyq33nd6.js";
6
+ import"./chunks/contracts-pqb0kjhx.js";
7
+ import"./chunks/contracts-2djeejkr.js";
8
8
  import {
9
- create4
10
- } from "./chunks/opencode-kp70gr0x.js";
9
+ create3
10
+ } from "./chunks/contracts-7hdbcq50.js";
11
11
  import {
12
12
  __export
13
- } from "./chunks/opencode-9rqn6x4v.js";
13
+ } from "./chunks/contracts-9rqn6x4v.js";
14
14
 
15
15
  // src/workerd.ts
16
16
  var exports_workerd = {};
@@ -20,7 +20,7 @@ __export(exports_workerd, {
20
20
  });
21
21
  var create = ({ log, plugins, instances, ...options }) => {
22
22
  const profile = make2(options);
23
- return create4({ ...profile.options, log, plugins, instances }, { overrides: profile.replacements });
23
+ return create3({ ...profile.options, log, plugins, instances }, { overrides: profile.replacements });
24
24
  };
25
25
  export {
26
26
  exports_workerd as OpenCodeWorkerd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "name": "@opencode/sdk",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,18 +40,18 @@
40
40
  "verify:package": "bun run script/verify-package.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@opencode/client": "2.0.18",
44
- "@opencode/core": "2.0.18",
45
- "@opencode/plugin": "2.0.18",
46
- "@opencode/schema": "2.0.18",
47
- "@opencode/server": "2.0.18",
48
- "@opencode/util": "2.0.18",
43
+ "@opencode/client": "2.0.20",
44
+ "@opencode/core": "2.0.20",
45
+ "@opencode/plugin": "2.0.20",
46
+ "@opencode/schema": "2.0.20",
47
+ "@opencode/server": "2.0.20",
48
+ "@opencode/util": "2.0.20",
49
49
  "effect": "4.0.0-rc.112"
50
50
  },
51
51
  "devDependencies": {
52
- "@opencode/ai": "2.0.18",
53
- "@opencode/httpapi-codegen": "2.0.18",
54
- "@opencode/protocol": "2.0.18",
52
+ "@opencode/ai": "2.0.20",
53
+ "@opencode/httpapi-codegen": "2.0.20",
54
+ "@opencode/protocol": "2.0.20",
55
55
  "@tsconfig/bun": "1.0.9",
56
56
  "@types/bun": "1.4.0",
57
57
  "@typescript/native-preview": "7.0.0-dev.20251207.1"
@@ -1,15 +0,0 @@
1
- import {
2
- create4
3
- } from "./opencode-kp70gr0x.js";
4
- import {
5
- __export
6
- } from "./opencode-9rqn6x4v.js";
7
-
8
- // src/opencode.ts
9
- var exports_opencode2 = {};
10
- __export(exports_opencode2, {
11
- create: () => create3
12
- });
13
- var create3 = (options = {}) => create4(options);
14
-
15
- export { create3, exports_opencode2 };