🎩 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
192
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-15336
+1
-1
dist/effect/service.d.ts

@@ -17,3 +17,3 @@ import { Effect, FileSystem, Schema } from "effect";

export type StartOptions = Options & {
readonly onStart?: (reason: StartReason) => void;
readonly onStart?: (reason: StartReason, existing?: Info) => void;
};

@@ -20,0 +20,0 @@ export declare const discover: (options?: Options | undefined) => Effect.Effect<{

@@ -25,3 +25,3 @@ import { Effect, FileSystem, Option, Schedule, Schema } from "effect";

const mismatched = yield* find(options);
yield* Effect.sync(() => options.onStart?.(mismatched === undefined ? "missing" : "version-mismatch"));
yield* Effect.sync(() => options.onStart?.(mismatched === undefined ? "missing" : "version-mismatch", mismatched?.info));
if (mismatched !== undefined)

@@ -28,0 +28,0 @@ yield* kill(mismatched.info, options).pipe(Effect.ignore);

@@ -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-15336",
"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-15336",
"@opencode-ai/protocol": "0.0.0-next-15336"
},

@@ -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-15336",
"@tsconfig/bun": "1.0.9",

@@ -65,0 +65,0 @@ "@types/bun": "1.3.13",