@opencode/sdk 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.
- package/dist/chunks/{tool-36g3bxk6.js → contracts-2rbsrzsb.js} +2 -2
- package/dist/chunks/{tool-qtsmxzjm.js → contracts-39225h8g.js} +4 -4
- package/dist/chunks/{tool-byf7y74j.js → contracts-6mhpacew.js} +2 -2
- package/dist/chunks/{tool-5ee3nrwn.js → contracts-a9pzg5gn.js} +2 -2
- package/dist/chunks/{tool-hdqq71na.js → contracts-hdqq71na.js} +1 -1
- package/dist/chunks/{tool-n1hprnh9.js → contracts-n1hprnh9.js} +1 -1
- package/dist/chunks/{tool-pqb0kjhx.js → contracts-pqb0kjhx.js} +1 -1
- package/dist/chunks/{tool-vbdxkdzg.js → contracts-x4jabv7x.js} +6 -6
- package/dist/chunks/{tool-ptw7q1yf.js → contracts-yqn72msb.js} +14 -11
- package/dist/contracts.js +1 -1
- package/dist/effect/index.js +7 -7
- package/dist/effect/opencode.js +5 -5
- package/dist/effect/tool.js +1 -1
- package/dist/effect/workerd.js +9 -9
- package/dist/index.js +8 -8
- package/dist/internal/fetch.js +3 -3
- package/dist/internal/host.js +4 -4
- package/dist/internal/instances.js +1 -1
- package/dist/internal/workerd.js +3 -3
- package/dist/logging.js +1 -1
- package/dist/opencode.js +6 -6
- package/dist/promise.js +5 -5
- package/dist/tool.js +1 -1
- package/dist/workerd.js +9 -9
- package/package.json +10 -10
- /package/dist/chunks/{tool-9rqn6x4v.js → contracts-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{tool-j1jhtwv7.js → contracts-j1jhtwv7.js} +0 -0
- /package/dist/chunks/{tool-ya9awdj2.js → contracts-ya9awdj2.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./contracts-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/internal/workerd.ts
|
|
6
6
|
var exports_workerd = {};
|
|
7
7
|
__export(exports_workerd, {
|
|
8
8
|
WorkerdProfile: () => exports_workerd,
|
|
9
|
-
make: () =>
|
|
9
|
+
make: () => make2
|
|
10
10
|
});
|
|
11
11
|
import { ServerWorkerd } from "@opencode/server/workerd";
|
|
12
|
-
function
|
|
12
|
+
function make2({ config, ...options }) {
|
|
13
13
|
const server = {
|
|
14
14
|
...options,
|
|
15
15
|
config: config === undefined ? undefined : { content: JSON.stringify(config) }
|
|
@@ -20,4 +20,4 @@ function make3({ config, ...options }) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { make2, exports_workerd };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layer4,
|
|
3
3
|
context2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./contracts-ya9awdj2.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./
|
|
6
|
+
make3
|
|
7
|
+
} from "./contracts-yqn72msb.js";
|
|
8
8
|
import {
|
|
9
9
|
provide2,
|
|
10
10
|
node2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./contracts-pqb0kjhx.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./contracts-9rqn6x4v.js";
|
|
15
15
|
|
|
16
16
|
// src/internal/host.ts
|
|
17
17
|
var exports_host = {};
|
|
@@ -39,7 +39,7 @@ var create5 = Effect.fn("EmbeddedHost.create")(function* (options = {}, embed =
|
|
|
39
39
|
const services = yield* runtime.contextEffect;
|
|
40
40
|
runtime.runFork(Context.get(services, SessionRestart.Service).resumeSuspendedSessions);
|
|
41
41
|
const handler = HttpEffect.toWebHandlerWith(context2(services))(Context.get(services, HttpRouter.HttpRouter).asHttpEffect());
|
|
42
|
-
const transport =
|
|
42
|
+
const transport = make3(handler, runtime.dispose);
|
|
43
43
|
return {
|
|
44
44
|
runtime,
|
|
45
45
|
fetch: transport.fetch,
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./contracts-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/internal/fetch.ts
|
|
6
6
|
var exports_fetch = {};
|
|
7
7
|
__export(exports_fetch, {
|
|
8
8
|
OwnedFetch: () => exports_fetch,
|
|
9
|
-
make: () =>
|
|
9
|
+
make: () => make3
|
|
10
10
|
});
|
|
11
|
-
function
|
|
12
|
-
const requests = new
|
|
13
|
-
const shutdown = new AbortController;
|
|
11
|
+
function make3(handler, dispose) {
|
|
12
|
+
const requests = new Map;
|
|
14
13
|
const closed = new Error("OpenCode host is closed");
|
|
15
14
|
let closePromise;
|
|
16
15
|
const fetch = Object.assign((input, init) => {
|
|
@@ -19,13 +18,17 @@ function make2(handler, dispose) {
|
|
|
19
18
|
const source = new Request(input, init);
|
|
20
19
|
if (source.signal.aborted)
|
|
21
20
|
return Promise.reject(source.signal.reason);
|
|
22
|
-
const
|
|
21
|
+
const controller = new AbortController;
|
|
22
|
+
const abort = () => controller.abort(source.signal.reason);
|
|
23
|
+
source.signal.addEventListener("abort", abort, { once: true });
|
|
24
|
+
const request = new Request(source, { signal: controller.signal });
|
|
23
25
|
const lifetime = Promise.withResolvers();
|
|
24
26
|
const finish = () => {
|
|
25
|
-
|
|
27
|
+
source.signal.removeEventListener("abort", abort);
|
|
28
|
+
requests.delete(controller);
|
|
26
29
|
lifetime.resolve();
|
|
27
30
|
};
|
|
28
|
-
requests.
|
|
31
|
+
requests.set(controller, lifetime.promise);
|
|
29
32
|
const handled = handler(request);
|
|
30
33
|
return rejectOnAbort(handled, request.signal).then((response) => trackResponse(response, request.signal, finish), (cause) => {
|
|
31
34
|
handled.then(finish, finish);
|
|
@@ -38,8 +41,8 @@ function make2(handler, dispose) {
|
|
|
38
41
|
if (closePromise)
|
|
39
42
|
return closePromise;
|
|
40
43
|
closePromise = Promise.resolve().then(async () => {
|
|
41
|
-
|
|
42
|
-
await Promise.allSettled(requests);
|
|
44
|
+
requests.forEach((_, controller) => controller.abort(closed));
|
|
45
|
+
await Promise.allSettled(requests.values());
|
|
43
46
|
await dispose();
|
|
44
47
|
});
|
|
45
48
|
return closePromise;
|
|
@@ -122,4 +125,4 @@ function trackResponse(response, signal, finish) {
|
|
|
122
125
|
return new Response(body, response);
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
export {
|
|
128
|
+
export { make3, exports_fetch };
|
package/dist/contracts.js
CHANGED
package/dist/effect/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import"../chunks/
|
|
2
|
-
import"../chunks/
|
|
3
|
-
import"../chunks/
|
|
4
|
-
import"../chunks/
|
|
1
|
+
import"../chunks/contracts-ya9awdj2.js";
|
|
2
|
+
import"../chunks/contracts-yqn72msb.js";
|
|
3
|
+
import"../chunks/contracts-pqb0kjhx.js";
|
|
4
|
+
import"../chunks/contracts-x4jabv7x.js";
|
|
5
5
|
import {
|
|
6
6
|
exports_opencode
|
|
7
|
-
} from "../chunks/
|
|
7
|
+
} from "../chunks/contracts-2rbsrzsb.js";
|
|
8
8
|
import {
|
|
9
9
|
exports_tool
|
|
10
|
-
} from "../chunks/
|
|
10
|
+
} from "../chunks/contracts-n1hprnh9.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/
|
|
39
|
+
} from "../chunks/contracts-j1jhtwv7.js";
|
|
40
40
|
|
|
41
41
|
// src/effect/index.ts
|
|
42
42
|
import { ClientError } from "@opencode/client/effect";
|
package/dist/effect/opencode.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
Service2,
|
|
4
4
|
layer2,
|
|
5
5
|
exports_opencode
|
|
6
|
-
} from "../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
10
|
-
import"../chunks/
|
|
6
|
+
} from "../chunks/contracts-2rbsrzsb.js";
|
|
7
|
+
import"../chunks/contracts-x4jabv7x.js";
|
|
8
|
+
import"../chunks/contracts-pqb0kjhx.js";
|
|
9
|
+
import"../chunks/contracts-ya9awdj2.js";
|
|
10
|
+
import"../chunks/contracts-yqn72msb.js";
|
|
11
11
|
export {
|
|
12
12
|
exports_opencode as OpenCode,
|
|
13
13
|
Service2 as Service,
|
package/dist/effect/tool.js
CHANGED
package/dist/effect/workerd.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
2
|
+
make2
|
|
3
|
+
} from "../chunks/contracts-39225h8g.js";
|
|
4
|
+
import"../chunks/contracts-ya9awdj2.js";
|
|
5
|
+
import"../chunks/contracts-yqn72msb.js";
|
|
6
|
+
import"../chunks/contracts-pqb0kjhx.js";
|
|
7
|
+
import"../chunks/contracts-x4jabv7x.js";
|
|
8
8
|
import {
|
|
9
9
|
create2,
|
|
10
10
|
Service2
|
|
11
|
-
} from "../chunks/
|
|
11
|
+
} from "../chunks/contracts-2rbsrzsb.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
|
-
} from "../chunks/
|
|
14
|
+
} from "../chunks/contracts-9rqn6x4v.js";
|
|
15
15
|
|
|
16
16
|
// src/effect/workerd.ts
|
|
17
17
|
var exports_workerd = {};
|
|
@@ -22,7 +22,7 @@ __export(exports_workerd, {
|
|
|
22
22
|
});
|
|
23
23
|
import { Layer } from "effect";
|
|
24
24
|
var create = ({ log, workspaceProviders, instances, ...options }) => {
|
|
25
|
-
const profile =
|
|
25
|
+
const profile = make2(options);
|
|
26
26
|
return create2({ ...profile.options, log, workspaceProviders, instances }, { overrides: profile.replacements });
|
|
27
27
|
};
|
|
28
28
|
var layer = (options) => Layer.effect(Service2, create(options));
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import"./chunks/
|
|
2
|
-
import"./chunks/
|
|
3
|
-
import"./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
1
|
+
import"./chunks/contracts-ya9awdj2.js";
|
|
2
|
+
import"./chunks/contracts-yqn72msb.js";
|
|
3
|
+
import"./chunks/contracts-pqb0kjhx.js";
|
|
4
|
+
import"./chunks/contracts-x4jabv7x.js";
|
|
5
|
+
import"./chunks/contracts-a9pzg5gn.js";
|
|
6
6
|
import {
|
|
7
7
|
exports_opencode2
|
|
8
|
-
} from "./chunks/
|
|
8
|
+
} from "./chunks/contracts-6mhpacew.js";
|
|
9
9
|
import {
|
|
10
10
|
exports_tool2
|
|
11
|
-
} from "./chunks/
|
|
11
|
+
} from "./chunks/contracts-hdqq71na.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/
|
|
40
|
+
} from "./chunks/contracts-j1jhtwv7.js";
|
|
41
41
|
|
|
42
42
|
// src/index.ts
|
|
43
43
|
import { ClientError } from "@opencode/client";
|
package/dist/internal/fetch.js
CHANGED
package/dist/internal/host.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create5,
|
|
3
3
|
exports_host
|
|
4
|
-
} from "../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
4
|
+
} from "../chunks/contracts-x4jabv7x.js";
|
|
5
|
+
import"../chunks/contracts-pqb0kjhx.js";
|
|
6
|
+
import"../chunks/contracts-ya9awdj2.js";
|
|
7
|
+
import"../chunks/contracts-yqn72msb.js";
|
|
8
8
|
export {
|
|
9
9
|
exports_host as EmbeddedHost,
|
|
10
10
|
create5 as create
|
package/dist/internal/workerd.js
CHANGED
package/dist/logging.js
CHANGED
package/dist/opencode.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create3
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
3
|
+
} from "./chunks/contracts-6mhpacew.js";
|
|
4
|
+
import"./chunks/contracts-a9pzg5gn.js";
|
|
5
|
+
import"./chunks/contracts-x4jabv7x.js";
|
|
6
|
+
import"./chunks/contracts-pqb0kjhx.js";
|
|
7
|
+
import"./chunks/contracts-ya9awdj2.js";
|
|
8
|
+
import"./chunks/contracts-yqn72msb.js";
|
|
9
9
|
export {
|
|
10
10
|
create3 as create
|
|
11
11
|
};
|
package/dist/promise.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create4,
|
|
3
3
|
exports_promise
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/contracts-a9pzg5gn.js";
|
|
5
|
+
import"./chunks/contracts-x4jabv7x.js";
|
|
6
|
+
import"./chunks/contracts-pqb0kjhx.js";
|
|
7
|
+
import"./chunks/contracts-ya9awdj2.js";
|
|
8
|
+
import"./chunks/contracts-yqn72msb.js";
|
|
9
9
|
export {
|
|
10
10
|
exports_promise as PromiseSdk,
|
|
11
11
|
create4 as create
|
package/dist/tool.js
CHANGED
package/dist/workerd.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
2
|
+
make2
|
|
3
|
+
} from "./chunks/contracts-39225h8g.js";
|
|
4
|
+
import"./chunks/contracts-ya9awdj2.js";
|
|
5
|
+
import"./chunks/contracts-yqn72msb.js";
|
|
6
|
+
import"./chunks/contracts-pqb0kjhx.js";
|
|
7
|
+
import"./chunks/contracts-x4jabv7x.js";
|
|
8
8
|
import {
|
|
9
9
|
create4
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/contracts-a9pzg5gn.js";
|
|
11
11
|
import {
|
|
12
12
|
__export
|
|
13
|
-
} from "./chunks/
|
|
13
|
+
} from "./chunks/contracts-9rqn6x4v.js";
|
|
14
14
|
|
|
15
15
|
// src/workerd.ts
|
|
16
16
|
var exports_workerd = {};
|
|
@@ -19,7 +19,7 @@ __export(exports_workerd, {
|
|
|
19
19
|
create: () => create
|
|
20
20
|
});
|
|
21
21
|
var create = ({ log, plugins, instances, ...options }) => {
|
|
22
|
-
const profile =
|
|
22
|
+
const profile = make2(options);
|
|
23
23
|
return create4({ ...profile.options, log, plugins, instances }, { overrides: profile.replacements });
|
|
24
24
|
};
|
|
25
25
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.25",
|
|
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.
|
|
44
|
-
"@opencode/core": "2.0.
|
|
45
|
-
"@opencode/plugin": "2.0.
|
|
46
|
-
"@opencode/schema": "2.0.
|
|
47
|
-
"@opencode/server": "2.0.
|
|
48
|
-
"@opencode/util": "2.0.
|
|
43
|
+
"@opencode/client": "2.0.25",
|
|
44
|
+
"@opencode/core": "2.0.25",
|
|
45
|
+
"@opencode/plugin": "2.0.25",
|
|
46
|
+
"@opencode/schema": "2.0.25",
|
|
47
|
+
"@opencode/server": "2.0.25",
|
|
48
|
+
"@opencode/util": "2.0.25",
|
|
49
49
|
"effect": "4.0.0-rc.112"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@opencode/ai": "2.0.
|
|
53
|
-
"@opencode/httpapi-codegen": "2.0.
|
|
54
|
-
"@opencode/protocol": "2.0.
|
|
52
|
+
"@opencode/ai": "2.0.25",
|
|
53
|
+
"@opencode/httpapi-codegen": "2.0.25",
|
|
54
|
+
"@opencode/protocol": "2.0.25",
|
|
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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|