@opencode/plugin 0.0.0-dev-20852 → 0.0.0-dev-20855
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 -4
- package/package.json +8 -8
package/dist/promise/adapter.js
CHANGED
|
@@ -447,8 +447,15 @@ export function fromPromise(plugin) {
|
|
|
447
447
|
function attempt(evaluate) {
|
|
448
448
|
return Effect.tryPromise({ try: evaluate, catch: (cause) => cause });
|
|
449
449
|
}
|
|
450
|
-
const executePromiseTool = (tool, input, context) => Effect.
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
const executePromiseTool = (tool, input, context) => Effect.tryPromise({
|
|
451
|
+
try: (signal) => tool.execute(input, {
|
|
452
|
+
...context,
|
|
453
|
+
signal,
|
|
454
|
+
progress: (update) => Effect.runPromise(context.progress(update), { signal }),
|
|
455
|
+
}),
|
|
456
|
+
catch: (error) => error,
|
|
457
|
+
}).pipe(Effect.catch((error) => {
|
|
458
|
+
if (error instanceof Tool.Error)
|
|
459
|
+
return Effect.fail(error);
|
|
460
|
+
return Effect.fail(new Tool.Error({ message: error instanceof Error ? error.message : String(error), error }));
|
|
454
461
|
}));
|
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-20855",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@ai-sdk/provider": "3.0.8",
|
|
50
|
-
"@opencode/ai": "0.0.0-dev-
|
|
51
|
-
"@opencode/client": "0.0.0-dev-
|
|
52
|
-
"@opencode/protocol": "0.0.0-dev-
|
|
53
|
-
"@opencode/schema": "0.0.0-dev-
|
|
54
|
-
"@opencode/util": "0.0.0-dev-
|
|
50
|
+
"@opencode/ai": "0.0.0-dev-20855",
|
|
51
|
+
"@opencode/client": "0.0.0-dev-20855",
|
|
52
|
+
"@opencode/protocol": "0.0.0-dev-20855",
|
|
53
|
+
"@opencode/schema": "0.0.0-dev-20855",
|
|
54
|
+
"@opencode/util": "0.0.0-dev-20855",
|
|
55
55
|
"effect": "4.0.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@opencode/theme": "0.0.0-dev-
|
|
58
|
+
"@opencode/theme": "0.0.0-dev-20855",
|
|
59
59
|
"@opentui/core": ">=0.5.17",
|
|
60
60
|
"@opentui/solid": ">=0.5.17",
|
|
61
61
|
"solid-js": ">=1.9.0"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@opencode/theme": "0.0.0-dev-
|
|
78
|
+
"@opencode/theme": "0.0.0-dev-20855",
|
|
79
79
|
"@opentui/core": "0.5.17",
|
|
80
80
|
"@opentui/solid": "0.5.17",
|
|
81
81
|
"@tsconfig/bun": "1.0.9",
|