@opencode/plugin 0.0.0-dev-19913 → 0.0.0-dev-19918
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/promise/adapter.js +11 -11
- package/package.json +8 -8
package/dist/promise/adapter.js
CHANGED
|
@@ -171,17 +171,17 @@ export function fromPromise(plugin) {
|
|
|
171
171
|
const VcsEndpoints = ClientApi.groups["server.vcs"].endpoints;
|
|
172
172
|
const WebSearchEndpoints = ClientApi.groups["server.websearch"].endpoints;
|
|
173
173
|
const WorktreeEndpoints = ClientApi.groups["server.worktree"].endpoints;
|
|
174
|
-
const
|
|
174
|
+
const runtime = yield* Effect.context();
|
|
175
175
|
const streams = yield* makeStreams();
|
|
176
176
|
// Run a hook registration on the plugin scope and resolve once it is registered.
|
|
177
|
-
const register = (effect) => Effect.runPromiseWith(
|
|
178
|
-
dispose: () => Effect.runPromiseWith(
|
|
177
|
+
const register = (effect) => Effect.runPromiseWith(runtime)(effect).then((registration) => ({
|
|
178
|
+
dispose: () => Effect.runPromiseWith(runtime)(registration.dispose),
|
|
179
179
|
}));
|
|
180
|
-
const run = (effect) => Effect.runPromiseWith(
|
|
181
|
-
const promiseExecutor = (execute) => (input,
|
|
182
|
-
...
|
|
183
|
-
progress: (update) => Effect.promise(() =>
|
|
184
|
-
}), { signal:
|
|
180
|
+
const run = (effect) => Effect.runPromiseWith(runtime)(effect);
|
|
181
|
+
const promiseExecutor = (execute) => (input, context) => Effect.runPromiseWith(runtime)(execute(input, {
|
|
182
|
+
...context,
|
|
183
|
+
progress: (update) => Effect.promise(() => context.progress(update)),
|
|
184
|
+
}), { signal: context.signal });
|
|
185
185
|
const adaptApiMethod = (endpoint, method) => {
|
|
186
186
|
const compiled = compileEndpoint(endpoint);
|
|
187
187
|
return ((input) => Effect.gen(function* () {
|
|
@@ -192,7 +192,7 @@ export function fromPromise(plugin) {
|
|
|
192
192
|
if (compiled.noContent)
|
|
193
193
|
return undefined;
|
|
194
194
|
return yield* compiled.encode(result);
|
|
195
|
-
}).pipe(Effect.runPromiseWith(
|
|
195
|
+
}).pipe(Effect.runPromiseWith(runtime)));
|
|
196
196
|
};
|
|
197
197
|
const transform = (domain) => (callback) => register(domain.transform((editor) => {
|
|
198
198
|
callback(editor);
|
|
@@ -292,8 +292,8 @@ export function fromPromise(plugin) {
|
|
|
292
292
|
}))),
|
|
293
293
|
reload: () => run(host.integration.reload()),
|
|
294
294
|
connection: {
|
|
295
|
-
active: (id) => Effect.runPromiseWith(
|
|
296
|
-
resolve: (connection) => Effect.runPromiseWith(
|
|
295
|
+
active: (id) => Effect.runPromiseWith(runtime)(host.integration.connection.active(id)),
|
|
296
|
+
resolve: (connection) => Effect.runPromiseWith(runtime)(host.integration.connection.resolve(connection)),
|
|
297
297
|
},
|
|
298
298
|
},
|
|
299
299
|
mcp: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/plugin",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-19918",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ai-sdk/provider": "3.0.8",
|
|
46
|
-
"@opencode/ai": "0.0.0-dev-
|
|
47
|
-
"@opencode/client": "0.0.0-dev-
|
|
48
|
-
"@opencode/protocol": "0.0.0-dev-
|
|
49
|
-
"@opencode/schema": "0.0.0-dev-
|
|
50
|
-
"@opencode/util": "0.0.0-dev-
|
|
46
|
+
"@opencode/ai": "0.0.0-dev-19918",
|
|
47
|
+
"@opencode/client": "0.0.0-dev-19918",
|
|
48
|
+
"@opencode/protocol": "0.0.0-dev-19918",
|
|
49
|
+
"@opencode/schema": "0.0.0-dev-19918",
|
|
50
|
+
"@opencode/util": "0.0.0-dev-19918",
|
|
51
51
|
"@standard-schema/spec": "1.1.0",
|
|
52
52
|
"effect": "4.0.0-rc.112",
|
|
53
53
|
"zod": "4.1.8"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@opencode/theme": "0.0.0-dev-
|
|
56
|
+
"@opencode/theme": "0.0.0-dev-19918",
|
|
57
57
|
"@opentui/core": ">=0.5.10",
|
|
58
58
|
"@opentui/solid": ">=0.5.10",
|
|
59
59
|
"solid-js": ">=1.9.0"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@opencode/theme": "0.0.0-dev-
|
|
76
|
+
"@opencode/theme": "0.0.0-dev-19918",
|
|
77
77
|
"@opentui/core": "0.5.10",
|
|
78
78
|
"@opentui/solid": "0.5.10",
|
|
79
79
|
"@tsconfig/bun": "1.0.9",
|