@opencode-ai/client
Advanced tools
@@ -24,6 +24,8 @@ import { Effect, FileSystem, Option, Schedule, Schema } from "effect"; | ||
| return compatible; | ||
| const mismatched = yield* find(options); | ||
| yield* Effect.sync(() => options.onStart?.(mismatched === undefined ? "missing" : "version-mismatch", mismatched?.info)); | ||
| if (mismatched !== undefined) | ||
| yield* kill(mismatched.info, options).pipe(Effect.ignore); | ||
| const existing = yield* find(options); | ||
| if (existing?.version !== undefined && (options.version === undefined || existing.version === options.version)) | ||
| return existing.endpoint; | ||
| yield* Effect.sync(() => options.onStart?.(existing === undefined ? "missing" : "version-mismatch", existing?.info)); | ||
| if (existing !== undefined) | ||
| yield* kill(existing.info, options).pipe(Effect.ignore); | ||
| const [command, ...args] = options.command ?? ["opencode", "serve", "--service"]; | ||
@@ -103,3 +105,3 @@ if (command === undefined) | ||
| return undefined; | ||
| return { info, endpoint }; | ||
| return { info, endpoint, version: health.value.version }; | ||
| } | ||
@@ -106,0 +108,0 @@ if (!allowLegacy || |
+4
-4
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/client", | ||
| "version": "0.0.0-next-15386", | ||
| "version": "0.0.0-next-15390", | ||
| "type": "module", | ||
@@ -48,4 +48,4 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-15386", | ||
| "@opencode-ai/protocol": "0.0.0-next-15386" | ||
| "@opencode-ai/schema": "0.0.0-next-15390", | ||
| "@opencode-ai/protocol": "0.0.0-next-15390" | ||
| }, | ||
@@ -62,3 +62,3 @@ "peerDependencies": { | ||
| "@effect/platform-node": "4.0.0-beta.83", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-next-15386", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-next-15390", | ||
| "@tsconfig/bun": "1.0.9", | ||
@@ -65,0 +65,0 @@ "@types/bun": "1.3.13", |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
718483
0.02%16324
0.01%+ Added
+ Added
- Removed
- Removed