@opencode-ai/client
Advanced tools
@@ -1,2 +0,2 @@ | ||
| export type ClientErrorReason = "Transport" | "UnexpectedStatus" | "UnsupportedContentType" | "MalformedResponse"; | ||
| export type ClientErrorReason = "Transport" | "UnexpectedStatus" | "UnsupportedContentType" | "MalformedResponse" | "SseEventTooLarge"; | ||
| export declare class ClientError extends Error { | ||
@@ -3,0 +3,0 @@ readonly reason: ClientErrorReason; |
| import { ClientError } from "./client-error"; | ||
| const maxSseEventBytes = 16 * 1024 * 1024; | ||
| export function make(options) { | ||
@@ -87,4 +88,4 @@ const fetch = options.fetch ?? globalThis.fetch; | ||
| buffer += decoder.decode(next.value, { stream: !next.done }); | ||
| if (buffer.length > 1_048_576) | ||
| throw new ClientError("MalformedResponse"); | ||
| if (buffer.length > maxSseEventBytes) | ||
| throw new ClientError("SseEventTooLarge"); | ||
| const trailingCarriageReturn = !next.done && buffer.endsWith("\r"); | ||
@@ -91,0 +92,0 @@ if (trailingCarriageReturn) |
+4
-4
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/client", | ||
| "version": "0.0.0-next-15330", | ||
| "version": "0.0.0-next-15334", | ||
| "type": "module", | ||
@@ -48,4 +48,4 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-15330", | ||
| "@opencode-ai/protocol": "0.0.0-next-15330" | ||
| "@opencode-ai/schema": "0.0.0-next-15334", | ||
| "@opencode-ai/protocol": "0.0.0-next-15334" | ||
| }, | ||
@@ -62,3 +62,3 @@ "peerDependencies": { | ||
| "@effect/platform-node": "4.0.0-beta.83", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-next-15330", | ||
| "@opencode-ai/httpapi-codegen": "0.0.0-next-15334", | ||
| "@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.
713927
0.01%16214
0.01%+ Added
+ Added
- Removed
- Removed