UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

26 lines (25 loc) • 1.24 kB
import type { ProxyContextPolicy, ProxyContextEvidence, ProxyPreparedContext } from "../types/index.js"; /** Local refusal before spending a provider request; never silently truncates. */ export declare class ProxyContextPreflightError extends Error { readonly code: string; readonly evidence?: ProxyContextEvidence | undefined; readonly status = 400; readonly retryable = false; constructor(code: string, message: string, evidence?: ProxyContextEvidence | undefined); } /** An invalid configured budget must not silently disable protection. */ export declare function parseProxyContextPolicy(raw: string | undefined): ProxyContextPolicy; export declare function getProxyContextPolicy(): ProxyContextPolicy; /** * Preserve history, instructions and tool-call pairs. Tool reduction is explicit * opt-in; discovered/configured context limits never use a guessed model default. */ export declare function prepareProxyRequestContext<T extends object>(args: { provider: string; model: string; body: T; /** Original protocol body before an adapter flattens historical tool calls. */ toolReferenceBody?: unknown; maxOutputTokens?: number; policy?: ProxyContextPolicy; }): ProxyPreparedContext<T>;