@opencode-ai/plugin
Advanced tools
@@ -18,2 +18,3 @@ import type { VcsApi } from "@opencode-ai/client/effect/api"; | ||
| readonly mode: Vcs.Mode; | ||
| readonly base?: string; | ||
| readonly context: number; | ||
@@ -26,2 +27,3 @@ readonly maxOutputBytes: number; | ||
| readonly info: (input: VcsScope) => Effect.Effect<Vcs.Info, unknown>; | ||
| readonly base?: (input: VcsScope) => Effect.Effect<Vcs.Base | null, unknown>; | ||
| readonly branches: (input: VcsBranchesInput) => Effect.Effect<Vcs.BranchList, unknown>; | ||
@@ -28,0 +30,0 @@ readonly status: (input: VcsScope) => Effect.Effect<readonly Vcs.FileStatus[], unknown>; |
@@ -256,2 +256,3 @@ import { Tool } from "@opencode-ai/schema/tool"; | ||
| get: adaptApiMethod(VcsEndpoints["vcs.get"], host.vcs.get), | ||
| base: adaptApiMethod(VcsEndpoints["vcs.base"], host.vcs.base), | ||
| branches: adaptApiMethod(VcsEndpoints["vcs.branches"], host.vcs.branches), | ||
@@ -263,10 +264,14 @@ status: adaptApiMethod(VcsEndpoints["vcs.status"], host.vcs.status), | ||
| callback({ | ||
| add: (definition) => draft.add({ | ||
| id: definition.id, | ||
| name: definition.name, | ||
| info: (input) => attempt((signal) => definition.info(input, { signal })), | ||
| branches: (input) => attempt((signal) => definition.branches(input, { signal })), | ||
| status: (input) => attempt((signal) => definition.status(input, { signal })), | ||
| diff: (input) => attempt((signal) => definition.diff(input, { signal })), | ||
| }), | ||
| add: (definition) => { | ||
| const base = definition.base?.bind(definition); | ||
| draft.add({ | ||
| id: definition.id, | ||
| name: definition.name, | ||
| info: (input) => attempt((signal) => definition.info(input, { signal })), | ||
| base: base ? (input) => attempt((signal) => base(input, { signal })) : undefined, | ||
| branches: (input) => attempt((signal) => definition.branches(input, { signal })), | ||
| status: (input) => attempt((signal) => definition.status(input, { signal })), | ||
| diff: (input) => attempt((signal) => definition.diff(input, { signal })), | ||
| }); | ||
| }, | ||
| default: draft.default, | ||
@@ -273,0 +278,0 @@ }); |
@@ -17,2 +17,3 @@ import type { VcsApi } from "@opencode-ai/client/promise/api"; | ||
| readonly mode: Vcs.Mode; | ||
| readonly base?: string; | ||
| readonly context: number; | ||
@@ -27,2 +28,5 @@ readonly maxOutputBytes: number; | ||
| }) => Promise<Vcs.Info>; | ||
| readonly base?: (input: VcsScope, context: { | ||
| readonly signal: AbortSignal; | ||
| }) => Promise<Vcs.Base | null>; | ||
| readonly branches: (input: VcsBranchesInput, context: { | ||
@@ -29,0 +33,0 @@ readonly signal: AbortSignal; |
+7
-7
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/plugin", | ||
| "version": "0.0.0-dev-18671", | ||
| "version": "0.0.0-dev-18672", | ||
| "type": "module", | ||
@@ -35,6 +35,6 @@ "license": "MIT", | ||
| "@ai-sdk/provider": "3.0.8", | ||
| "@opencode-ai/ai": "0.0.0-dev-18671", | ||
| "@opencode-ai/client": "0.0.0-dev-18671", | ||
| "@opencode-ai/protocol": "0.0.0-dev-18671", | ||
| "@opencode-ai/schema": "0.0.0-dev-18671", | ||
| "@opencode-ai/ai": "0.0.0-dev-18672", | ||
| "@opencode-ai/client": "0.0.0-dev-18672", | ||
| "@opencode-ai/protocol": "0.0.0-dev-18672", | ||
| "@opencode-ai/schema": "0.0.0-dev-18672", | ||
| "@standard-schema/spec": "1.1.0", | ||
@@ -45,3 +45,3 @@ "effect": "4.0.0-rc.112", | ||
| "peerDependencies": { | ||
| "@opencode-ai/theme": "0.0.0-dev-18671", | ||
| "@opencode-ai/theme": "0.0.0-dev-18672", | ||
| "@opentui/core": ">=0.5.9", | ||
@@ -66,3 +66,3 @@ "@opentui/solid": ">=0.5.9", | ||
| "devDependencies": { | ||
| "@opencode-ai/theme": "0.0.0-dev-18671", | ||
| "@opencode-ai/theme": "0.0.0-dev-18672", | ||
| "@opentui/core": "0.5.9", | ||
@@ -69,0 +69,0 @@ "@opentui/solid": "0.5.9", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
87319
0.73%1948
0.57%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed