/** Parsed standalone plain-text tool call block with source offsets for repair. */ export type PlainTextToolCallBlock = { /** Parsed JSON arguments object. */ arguments: Record; /** Exclusive end offset of the parsed block. */ end: number; /** Tool name parsed from bracket, Harmony, or XML-ish syntax. */ name: string; /** Original text slice that produced this block. */ raw: string; /** Inclusive start offset of the parsed block. */ start: number; }; /** Parser limits and allow-list options for plain-text tool-call repair. */ export type PlainTextToolCallParseOptions = { /** Optional allow-list of tool names that may be repaired. */ allowedToolNames?: Iterable; /** Maximum serialized payload size accepted for one repaired call. */ maxPayloadBytes?: number; }; /** * The single source of truth for the plain-text tool-call payload cap (256 KB). A serialized call * larger than this is never treated as a tool call. Re-exported from `./promote.js` (and the module * index) as `MAX_TEXT_EMITTED_TOOL_CALL_PAYLOAD_BYTES` — the public name — so there is ONE constant, * not two duplicated literals. (EXT-43 unified the former `DEFAULT_MAX_PLAIN_TEXT_TOOL_PAYLOAD_BYTES` * here with `promote.ts`'s copy.) */ export declare const MAX_TEXT_EMITTED_TOOL_CALL_PAYLOAD_BYTES = 256000; /** * Parse the WHOLE input into standalone plain-text tool-call blocks, or return null if any part of * it is not such a block. This all-or-nothing walk is the standalone-only gate: prose that merely * mentions a tool name, contains brackets, or embeds a call inside a sentence never parses (the * first non-block character aborts the parse). Allow-list + payload-cap gating are applied per * block via {@link PlainTextToolCallParseOptions}. */ export declare function parseStandalonePlainTextToolCallBlocks(text: string, options?: PlainTextToolCallParseOptions): PlainTextToolCallBlock[] | null;