@opencode/sdk 0.0.0-dev-20798 → 0.0.0-dev-20800
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/{opencode-41vg0ahc.js → promise-25xf8cff.js} +11 -8
- package/dist/chunks/{opencode-39225h8g.js → promise-39225h8g.js} +1 -1
- package/dist/chunks/promise-3jms084x.js +15 -0
- package/dist/chunks/{opencode-0t2e198s.js → promise-57ccxeye.js} +12 -7
- package/dist/chunks/{opencode-fhn95dsh.js → promise-7a3xdnq4.js} +9 -9
- package/dist/chunks/{opencode-n1hprnh9.js → promise-jw22y9b0.js} +2 -2
- package/dist/chunks/{opencode-m53bc19j.js → promise-pqb0kjhx.js} +5 -5
- package/dist/chunks/{opencode-hdqq71na.js → promise-xjkw3602.js} +2 -2
- package/dist/chunks/{opencode-vvs370xz.js → promise-ya9awdj2.js} +2 -2
- package/dist/chunks/{opencode-yqn72msb.js → promise-yqn72msb.js} +1 -1
- package/dist/contracts.js +1 -1
- package/dist/effect/index.js +11 -11
- package/dist/effect/opencode.js +9 -9
- package/dist/effect/tool.js +5 -5
- package/dist/effect/workerd.d.ts +2 -1
- package/dist/effect/workerd.js +10 -10
- package/dist/index.js +12 -12
- package/dist/internal/fetch.js +1 -1
- package/dist/internal/host.d.ts +2 -0
- package/dist/internal/host.js +4 -4
- package/dist/internal/instances.js +3 -3
- package/dist/internal/workerd.js +1 -1
- package/dist/logging.js +3 -3
- package/dist/opencode.js +8 -8
- package/dist/promise.d.ts +1 -1
- package/dist/promise.js +7 -7
- package/dist/tool.js +5 -5
- package/dist/workerd.js +9 -9
- package/package.json +10 -10
- package/dist/chunks/opencode-fnmk2k0v.js +0 -15
- /package/dist/chunks/{opencode-9rqn6x4v.js → promise-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{opencode-j1jhtwv7.js → promise-j1jhtwv7.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
layer4,
|
|
3
3
|
context2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./promise-ya9awdj2.js";
|
|
5
5
|
import {
|
|
6
6
|
make3
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./promise-yqn72msb.js";
|
|
8
8
|
import {
|
|
9
9
|
provide2,
|
|
10
10
|
node2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./promise-pqb0kjhx.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./promise-9rqn6x4v.js";
|
|
15
15
|
|
|
16
16
|
// src/internal/host.ts
|
|
17
17
|
var exports_host = {};
|
|
@@ -28,22 +28,25 @@ import { createEmbeddedRoutes } from "@opencode/server/routes";
|
|
|
28
28
|
import { Context, Effect, Layer, ManagedRuntime } from "effect";
|
|
29
29
|
import { HttpEffect, HttpRouter, HttpServer } from "effect/http";
|
|
30
30
|
var create5 = Effect.fn("EmbeddedHost.create")(function* (options = {}, embed = {}) {
|
|
31
|
-
const { log, workspaceProviders, instances, ...server } = options;
|
|
31
|
+
const { log, plugins, workspaceProviders, instances, ...server } = options;
|
|
32
32
|
const selector = instances ? provide2(instances, yield* Effect.context()) : undefined;
|
|
33
33
|
const runtime = ManagedRuntime.make(createEmbeddedRoutes({
|
|
34
34
|
...server,
|
|
35
35
|
app: { ...server.app, name: server.app?.name ?? "sdk" },
|
|
36
36
|
database: { path: ":memory:", ...server.database }
|
|
37
|
-
}, workspaceProviders ? [...embed.overrides ?? [], WorkspaceDriver.node.replace(WorkspaceDriver.registryNode(workspaceProviders))] : embed.overrides, selector ? (replacements) => node2(selector, replacements) : undefined).pipe(Layer.provide(HttpServer.layerServices), Layer.provideMerge(
|
|
37
|
+
}, workspaceProviders ? [...embed.overrides ?? [], WorkspaceDriver.node.replace(WorkspaceDriver.registryNode(workspaceProviders))] : embed.overrides, selector ? (replacements) => node2(selector, replacements) : undefined).pipe(Layer.provide(HttpServer.layerServices), Layer.provideMerge(layer4(log))));
|
|
38
38
|
return yield* Effect.gen(function* () {
|
|
39
39
|
const services = yield* runtime.contextEffect;
|
|
40
|
+
const sdkPlugins = Context.get(services, SdkPlugins.Service);
|
|
41
|
+
for (const plugin of plugins ?? [])
|
|
42
|
+
yield* sdkPlugins.register(plugin);
|
|
40
43
|
runtime.runFork(Context.get(services, SessionRestart.Service).resumeSuspendedSessions);
|
|
41
44
|
const handler = HttpEffect.toWebHandlerWith(context2(services))(Context.get(services, HttpRouter.HttpRouter).asHttpEffect());
|
|
42
45
|
const transport = make3(handler, runtime.dispose);
|
|
43
46
|
return {
|
|
44
47
|
runtime,
|
|
45
48
|
fetch: transport.fetch,
|
|
46
|
-
plugins:
|
|
49
|
+
plugins: sdkPlugins,
|
|
47
50
|
sessions: Context.get(services, Session.Service),
|
|
48
51
|
workspace: Context.get(services, Workspace.Service),
|
|
49
52
|
close: transport.close
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
create3
|
|
3
|
+
} from "./promise-57ccxeye.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./promise-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,23 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create5
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./promise-25xf8cff.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./promise-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: () =>
|
|
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
|
|
17
|
+
async function create3(options = {}, embed = {}) {
|
|
18
18
|
const { plugins, instances, ...hostOptions } = options;
|
|
19
19
|
const host = await Effect.runPromise(create5({
|
|
20
20
|
...hostOptions,
|
|
21
|
+
plugins: await adaptPlugins(plugins),
|
|
21
22
|
instances: instances ? {
|
|
22
23
|
key: (session) => instances.key(Schema.encodeSync(Session.Info)(session)),
|
|
23
24
|
configure: (key) => Effect.gen(function* () {
|
|
@@ -32,8 +33,6 @@ async function create4(options = {}, embed = {}) {
|
|
|
32
33
|
const { PluginPromise } = await import("@opencode/core/plugin/promise");
|
|
33
34
|
return host.runtime.runPromise(host.plugins.register(PluginPromise.fromPromise(plugin)));
|
|
34
35
|
};
|
|
35
|
-
for (const plugin of plugins ?? [])
|
|
36
|
-
await register(plugin);
|
|
37
36
|
return {
|
|
38
37
|
...client,
|
|
39
38
|
sessions: client.session,
|
|
@@ -43,5 +42,11 @@ async function create4(options = {}, embed = {}) {
|
|
|
43
42
|
[Symbol.asyncDispose]: host.close
|
|
44
43
|
};
|
|
45
44
|
}
|
|
45
|
+
async function adaptPlugins(plugins) {
|
|
46
|
+
if (!plugins?.length)
|
|
47
|
+
return;
|
|
48
|
+
const { PluginPromise } = await import("@opencode/core/plugin/promise");
|
|
49
|
+
return plugins.map(PluginPromise.fromPromise);
|
|
50
|
+
}
|
|
46
51
|
|
|
47
|
-
export {
|
|
52
|
+
export { create3, exports_promise };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create5
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./promise-25xf8cff.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./promise-9rqn6x4v.js";
|
|
7
7
|
|
|
8
8
|
// src/effect/opencode.ts
|
|
9
|
-
var
|
|
10
|
-
__export(
|
|
11
|
-
OpenCode: () =>
|
|
9
|
+
var exports_opencode2 = {};
|
|
10
|
+
__export(exports_opencode2, {
|
|
11
|
+
OpenCode: () => exports_opencode2,
|
|
12
12
|
Service: () => Service2,
|
|
13
|
-
create: () =>
|
|
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/http";
|
|
19
|
-
var
|
|
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,
|
|
43
|
+
var layer2 = (options = {}) => Layer.effect(Service2, create4(options));
|
|
44
44
|
|
|
45
|
-
export {
|
|
45
|
+
export { create4, Service2, layer2, exports_opencode2 };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./promise-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/internal/instances.ts
|
|
6
6
|
var exports_instances = {};
|
|
7
7
|
__export(exports_instances, {
|
|
8
8
|
SdkInstances: () => exports_instances,
|
|
9
|
-
layer: () =>
|
|
9
|
+
layer: () => layer3,
|
|
10
10
|
node: () => node2,
|
|
11
11
|
provide: () => provide2
|
|
12
12
|
});
|
|
@@ -25,11 +25,11 @@ function provide2(options, context) {
|
|
|
25
25
|
function node2(options, replacements) {
|
|
26
26
|
return makeGlobalNode({
|
|
27
27
|
service: Instance.Service,
|
|
28
|
-
layer:
|
|
28
|
+
layer: layer3(options, replacements),
|
|
29
29
|
deps: [LocationServiceMap.node]
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function layer3(options, replacements) {
|
|
33
33
|
return Layer.effect(Instance.Service, Effect.gen(function* () {
|
|
34
34
|
const scope = yield* Effect.scope;
|
|
35
35
|
const locations = yield* LocationServiceMap.Service;
|
|
@@ -59,4 +59,4 @@ function layer4(options, replacements) {
|
|
|
59
59
|
}));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export { provide2, node2,
|
|
62
|
+
export { provide2, node2, layer3, exports_instances };
|
|
@@ -19,7 +19,7 @@ var levelNames = new Map([
|
|
|
19
19
|
function normalizeLevel(level) {
|
|
20
20
|
return levelNames.get(level);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function layer4(log) {
|
|
23
23
|
const logger = Logger.make((options) => {
|
|
24
24
|
if (!log)
|
|
25
25
|
return;
|
|
@@ -52,4 +52,4 @@ function context2(source) {
|
|
|
52
52
|
return Context.make(Logger.CurrentLoggers, Context.get(source, Logger.CurrentLoggers)).pipe(Context.add(References.MinimumLogLevel, Context.get(source, References.MinimumLogLevel)));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export {
|
|
55
|
+
export { layer4, context2 };
|
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/promise-ya9awdj2.js";
|
|
2
|
+
import"../chunks/promise-yqn72msb.js";
|
|
3
|
+
import"../chunks/promise-pqb0kjhx.js";
|
|
4
|
+
import"../chunks/promise-25xf8cff.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../chunks/
|
|
6
|
+
exports_opencode2
|
|
7
|
+
} from "../chunks/promise-7a3xdnq4.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "../chunks/
|
|
9
|
+
exports_tool2
|
|
10
|
+
} from "../chunks/promise-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/
|
|
39
|
+
} from "../chunks/promise-j1jhtwv7.js";
|
|
40
40
|
|
|
41
41
|
// src/effect/index.ts
|
|
42
42
|
import { EnvironmentDriver } from "@opencode/core/environment/driver";
|
|
@@ -57,7 +57,7 @@ export {
|
|
|
57
57
|
Integration2 as Integration,
|
|
58
58
|
Location2 as Location,
|
|
59
59
|
Model2 as Model,
|
|
60
|
-
|
|
60
|
+
exports_opencode2 as OpenCode,
|
|
61
61
|
Permission2 as Permission,
|
|
62
62
|
PermissionSaved2 as PermissionSaved,
|
|
63
63
|
Project2 as Project,
|
|
@@ -72,7 +72,7 @@ export {
|
|
|
72
72
|
SessionInbox2 as SessionInbox,
|
|
73
73
|
SessionMessage2 as SessionMessage,
|
|
74
74
|
Skill2 as Skill,
|
|
75
|
-
|
|
75
|
+
exports_tool2 as Tool,
|
|
76
76
|
WebSearch2 as WebSearch,
|
|
77
77
|
Workspace2 as Workspace,
|
|
78
78
|
WorkspaceDriver,
|
package/dist/effect/opencode.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
create4,
|
|
3
3
|
Service2,
|
|
4
4
|
layer2,
|
|
5
|
-
|
|
6
|
-
} from "../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
10
|
-
import"../chunks/
|
|
5
|
+
exports_opencode2
|
|
6
|
+
} from "../chunks/promise-7a3xdnq4.js";
|
|
7
|
+
import"../chunks/promise-25xf8cff.js";
|
|
8
|
+
import"../chunks/promise-pqb0kjhx.js";
|
|
9
|
+
import"../chunks/promise-yqn72msb.js";
|
|
10
|
+
import"../chunks/promise-ya9awdj2.js";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
exports_opencode2 as OpenCode,
|
|
13
13
|
Service2 as Service,
|
|
14
|
-
|
|
14
|
+
create4 as create,
|
|
15
15
|
layer2 as layer
|
|
16
16
|
};
|
package/dist/effect/tool.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../chunks/
|
|
2
|
+
RegistrationError3,
|
|
3
|
+
Error3
|
|
4
|
+
} from "../chunks/promise-xjkw3602.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Error3 as Error,
|
|
7
|
+
RegistrationError3 as RegistrationError
|
|
8
8
|
};
|
package/dist/effect/workerd.d.ts
CHANGED
|
@@ -6,10 +6,11 @@ import { OpenCode } from "./opencode";
|
|
|
6
6
|
export type Configuration = WorkerdProfile.Configuration;
|
|
7
7
|
export interface CreateOptions<R = never> extends WorkerdProfile.Options {
|
|
8
8
|
readonly log?: OpenCode.CreateOptions["log"];
|
|
9
|
+
readonly plugins?: OpenCode.CreateOptions["plugins"];
|
|
9
10
|
readonly workspaceProviders?: OpenCode.CreateOptions["workspaceProviders"];
|
|
10
11
|
readonly instances?: OpenCode.CreateOptions<R>["instances"];
|
|
11
12
|
}
|
|
12
|
-
export declare const create: <R = never>({ log, workspaceProviders, instances, ...options }: CreateOptions<R>) => import("effect/Effect").Effect<OpenCode.Interface, Error | Config.ConfigError, Scope.Scope | R>;
|
|
13
|
+
export declare const create: <R = never>({ log, plugins, workspaceProviders, instances, ...options }: CreateOptions<R>) => import("effect/Effect").Effect<OpenCode.Interface, Error | Config.ConfigError, Scope.Scope | R>;
|
|
13
14
|
export declare const layer: <R = never>(options: CreateOptions<R>) => Layer.Layer<OpenCode.Service, Config.ConfigError | Error, Exclude<R, Scope.Scope>>;
|
|
14
15
|
export type Interface = OpenCode.Interface;
|
|
15
16
|
export type Requirements = Scope.Scope;
|
package/dist/effect/workerd.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/promise-39225h8g.js";
|
|
4
|
+
import"../chunks/promise-ya9awdj2.js";
|
|
5
|
+
import"../chunks/promise-yqn72msb.js";
|
|
6
|
+
import"../chunks/promise-pqb0kjhx.js";
|
|
7
|
+
import"../chunks/promise-25xf8cff.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
create4,
|
|
10
10
|
Service2
|
|
11
|
-
} from "../chunks/
|
|
11
|
+
} from "../chunks/promise-7a3xdnq4.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
|
-
} from "../chunks/
|
|
14
|
+
} from "../chunks/promise-9rqn6x4v.js";
|
|
15
15
|
|
|
16
16
|
// src/effect/workerd.ts
|
|
17
17
|
var exports_workerd = {};
|
|
@@ -21,9 +21,9 @@ __export(exports_workerd, {
|
|
|
21
21
|
layer: () => layer
|
|
22
22
|
});
|
|
23
23
|
import { Layer } from "effect";
|
|
24
|
-
var create = ({ log, workspaceProviders, instances, ...options }) => {
|
|
24
|
+
var create = ({ log, plugins, workspaceProviders, instances, ...options }) => {
|
|
25
25
|
const profile = make2(options);
|
|
26
|
-
return
|
|
26
|
+
return create4({ ...profile.options, log, plugins, 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/
|
|
2
|
-
import"./chunks/
|
|
3
|
-
import"./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
1
|
+
import"./chunks/promise-ya9awdj2.js";
|
|
2
|
+
import"./chunks/promise-yqn72msb.js";
|
|
3
|
+
import"./chunks/promise-pqb0kjhx.js";
|
|
4
|
+
import"./chunks/promise-25xf8cff.js";
|
|
5
|
+
import"./chunks/promise-57ccxeye.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunks/
|
|
7
|
+
exports_opencode
|
|
8
|
+
} from "./chunks/promise-3jms084x.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunks/
|
|
10
|
+
exports_tool
|
|
11
|
+
} from "./chunks/promise-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/
|
|
40
|
+
} from "./chunks/promise-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
|
-
|
|
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
|
-
|
|
71
|
+
exports_tool as Tool,
|
|
72
72
|
WebSearch2 as WebSearch,
|
|
73
73
|
Workspace2 as Workspace,
|
|
74
74
|
Worktree2 as Worktree
|
package/dist/internal/fetch.js
CHANGED
package/dist/internal/host.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * as EmbeddedHost from "./host";
|
|
2
2
|
import { SdkPlugins } from "@opencode/core/plugin/sdk";
|
|
3
|
+
import type { Plugin } from "@opencode/plugin/effect/plugin";
|
|
3
4
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
4
5
|
import { Session } from "@opencode/core/session";
|
|
5
6
|
import { Workspace } from "@opencode/core/workspace";
|
|
@@ -12,6 +13,7 @@ import { type LogOptions } from "../logging";
|
|
|
12
13
|
import { SdkInstances } from "./instances";
|
|
13
14
|
export interface CreateOptions<R = never> extends Omit<ServerOptions, "hostname" | "port" | "password"> {
|
|
14
15
|
readonly log?: LogOptions;
|
|
16
|
+
readonly plugins?: ReadonlyArray<Plugin>;
|
|
15
17
|
readonly workspaceProviders?: Readonly<Record<string, WorkspaceDriver.Interface>>;
|
|
16
18
|
readonly instances?: SdkInstances.Options<R>;
|
|
17
19
|
}
|
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/promise-25xf8cff.js";
|
|
5
|
+
import"../chunks/promise-pqb0kjhx.js";
|
|
6
|
+
import"../chunks/promise-yqn72msb.js";
|
|
7
|
+
import"../chunks/promise-ya9awdj2.js";
|
|
8
8
|
export {
|
|
9
9
|
exports_host as EmbeddedHost,
|
|
10
10
|
create5 as create
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
provide2,
|
|
3
3
|
node2,
|
|
4
|
-
|
|
4
|
+
layer3,
|
|
5
5
|
exports_instances
|
|
6
|
-
} from "../chunks/
|
|
6
|
+
} from "../chunks/promise-pqb0kjhx.js";
|
|
7
7
|
export {
|
|
8
8
|
exports_instances as SdkInstances,
|
|
9
|
-
|
|
9
|
+
layer3 as layer,
|
|
10
10
|
node2 as node,
|
|
11
11
|
provide2 as provide
|
|
12
12
|
};
|
package/dist/internal/workerd.js
CHANGED
package/dist/logging.js
CHANGED
package/dist/opencode.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
2
|
+
create2
|
|
3
|
+
} from "./chunks/promise-3jms084x.js";
|
|
4
|
+
import"./chunks/promise-57ccxeye.js";
|
|
5
|
+
import"./chunks/promise-25xf8cff.js";
|
|
6
|
+
import"./chunks/promise-pqb0kjhx.js";
|
|
7
|
+
import"./chunks/promise-yqn72msb.js";
|
|
8
|
+
import"./chunks/promise-ya9awdj2.js";
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
create2 as create
|
|
11
11
|
};
|
package/dist/promise.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface InstanceOptions {
|
|
|
12
12
|
/** Reconstruct configuration on a cache miss, including after a host restart. */
|
|
13
13
|
readonly configure: (key: string) => InstanceConfiguration | Promise<InstanceConfiguration>;
|
|
14
14
|
}
|
|
15
|
-
export interface CreateOptions extends Omit<EmbeddedHost.CreateOptions, "workspaceProviders" | "instances"> {
|
|
15
|
+
export interface CreateOptions extends Omit<EmbeddedHost.CreateOptions, "plugins" | "workspaceProviders" | "instances"> {
|
|
16
16
|
readonly plugins?: ReadonlyArray<Plugin.Plugin>;
|
|
17
17
|
readonly instances?: InstanceOptions;
|
|
18
18
|
}
|
package/dist/promise.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
create3,
|
|
3
3
|
exports_promise
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/promise-57ccxeye.js";
|
|
5
|
+
import"./chunks/promise-25xf8cff.js";
|
|
6
|
+
import"./chunks/promise-pqb0kjhx.js";
|
|
7
|
+
import"./chunks/promise-yqn72msb.js";
|
|
8
|
+
import"./chunks/promise-ya9awdj2.js";
|
|
9
9
|
export {
|
|
10
10
|
exports_promise as PromiseSdk,
|
|
11
|
-
|
|
11
|
+
create3 as create
|
|
12
12
|
};
|
package/dist/tool.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunks/
|
|
2
|
+
RegistrationError2,
|
|
3
|
+
Error2
|
|
4
|
+
} from "./chunks/promise-jw22y9b0.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
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/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
3
|
+
} from "./chunks/promise-39225h8g.js";
|
|
4
|
+
import"./chunks/promise-ya9awdj2.js";
|
|
5
|
+
import"./chunks/promise-yqn72msb.js";
|
|
6
|
+
import"./chunks/promise-pqb0kjhx.js";
|
|
7
|
+
import"./chunks/promise-25xf8cff.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunks/
|
|
9
|
+
create3
|
|
10
|
+
} from "./chunks/promise-57ccxeye.js";
|
|
11
11
|
import {
|
|
12
12
|
__export
|
|
13
|
-
} from "./chunks/
|
|
13
|
+
} from "./chunks/promise-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
|
|
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": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20800",
|
|
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": "0.0.0-dev-
|
|
44
|
-
"@opencode/core": "0.0.0-dev-
|
|
45
|
-
"@opencode/plugin": "0.0.0-dev-
|
|
46
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
-
"@opencode/server": "0.0.0-dev-
|
|
48
|
-
"@opencode/util": "0.0.0-dev-
|
|
43
|
+
"@opencode/client": "0.0.0-dev-20800",
|
|
44
|
+
"@opencode/core": "0.0.0-dev-20800",
|
|
45
|
+
"@opencode/plugin": "0.0.0-dev-20800",
|
|
46
|
+
"@opencode/schema": "0.0.0-dev-20800",
|
|
47
|
+
"@opencode/server": "0.0.0-dev-20800",
|
|
48
|
+
"@opencode/util": "0.0.0-dev-20800",
|
|
49
49
|
"effect": "4.0.0-rc.118"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@opencode/ai": "0.0.0-dev-
|
|
53
|
-
"@opencode/httpapi-codegen": "0.0.0-dev-
|
|
54
|
-
"@opencode/protocol": "0.0.0-dev-
|
|
52
|
+
"@opencode/ai": "0.0.0-dev-20800",
|
|
53
|
+
"@opencode/httpapi-codegen": "0.0.0-dev-20800",
|
|
54
|
+
"@opencode/protocol": "0.0.0-dev-20800",
|
|
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-0t2e198s.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 };
|
|
File without changes
|
|
File without changes
|