@opencode/plugin 0.0.0-beta-19296 → 0.0.0-beta-19365
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 +4 -1
- package/dist/worktree.d.ts +2 -0
- package/package.json +8 -8
package/dist/promise/adapter.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Effect, Schema, SchemaAST, Stream } from "effect";
|
|
|
3
3
|
import { HttpApiEndpoint, HttpApiSchema } from "effect/unstable/httpapi";
|
|
4
4
|
import { define } from "../effect/plugin.js";
|
|
5
5
|
const compiledEndpoints = new WeakMap();
|
|
6
|
+
const JsonInput = Schema.fromJsonString(Schema.Unknown);
|
|
6
7
|
class ReturnedRpcError extends Error {
|
|
7
8
|
type;
|
|
8
9
|
data;
|
|
@@ -183,7 +184,9 @@ export function fromPromise(plugin) {
|
|
|
183
184
|
const adaptApiMethod = (endpoint, method) => {
|
|
184
185
|
const compiled = compileEndpoint(endpoint);
|
|
185
186
|
return ((input) => Effect.gen(function* () {
|
|
186
|
-
|
|
187
|
+
// Match the generated Promise client, whose request body crosses JSON before endpoint decoding.
|
|
188
|
+
const normalized = yield* Schema.encodeUnknownEffect(JsonInput)(input ?? {}).pipe(Effect.flatMap(Schema.decodeUnknownEffect(JsonInput)));
|
|
189
|
+
const decoded = yield* Effect.forEach(compiled.decode, (decode) => decode(normalized));
|
|
187
190
|
const result = yield* method(Object.assign({}, ...decoded));
|
|
188
191
|
if (compiled.noContent)
|
|
189
192
|
return undefined;
|
package/dist/worktree.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface WorktreeCreateInput {
|
|
2
2
|
readonly sourceDirectory: string;
|
|
3
|
+
/** Suggested destination after naming and collision handling. Strategies may return a different directory. */
|
|
3
4
|
readonly directory: string;
|
|
4
5
|
/** Starting ref, not the name of a new branch. Reject unsupported refs rather than ignoring them. */
|
|
5
6
|
readonly branch?: string;
|
|
@@ -9,6 +10,7 @@ export interface WorktreeRemoveInput {
|
|
|
9
10
|
readonly force: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface WorktreeResult {
|
|
13
|
+
/** Actual directory created by the strategy, used for inventory and startup commands. */
|
|
12
14
|
readonly directory: string;
|
|
13
15
|
}
|
|
14
16
|
export interface WorktreeEntry extends WorktreeResult {
|
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-beta-
|
|
4
|
+
"version": "0.0.0-beta-19365",
|
|
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-beta-
|
|
47
|
-
"@opencode/client": "0.0.0-beta-
|
|
48
|
-
"@opencode/protocol": "0.0.0-beta-
|
|
49
|
-
"@opencode/schema": "0.0.0-beta-
|
|
50
|
-
"@opencode/util": "0.0.0-beta-
|
|
46
|
+
"@opencode/ai": "0.0.0-beta-19365",
|
|
47
|
+
"@opencode/client": "0.0.0-beta-19365",
|
|
48
|
+
"@opencode/protocol": "0.0.0-beta-19365",
|
|
49
|
+
"@opencode/schema": "0.0.0-beta-19365",
|
|
50
|
+
"@opencode/util": "0.0.0-beta-19365",
|
|
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-beta-
|
|
56
|
+
"@opencode/theme": "0.0.0-beta-19365",
|
|
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-beta-
|
|
76
|
+
"@opencode/theme": "0.0.0-beta-19365",
|
|
77
77
|
"@opentui/core": "0.5.10",
|
|
78
78
|
"@opentui/solid": "0.5.10",
|
|
79
79
|
"@tsconfig/bun": "1.0.9",
|