🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/client

Package Overview
Dependencies
Maintainers
2
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/client - npm Package Compare versions

Comparing version
0.0.0-next-15330
to
0.0.0-next-15334
+1
-1
dist/promise/generated/client-error.d.ts

@@ -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)

{
"$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",