import { ToolResult } from '../types.js'; /** * Track the last tool name for feedback prompts. * Call this at the start of each tool handler. */ export declare function trackToolUse(toolName: string): void; /** * Create a successful tool response */ export declare function toolSuccess(data: unknown): ToolResult; /** * True when a payload is already a machine-readable error object. * * Deliberately narrow: a STRING `error` field, and not a payload that has * explicitly declared itself a success. A payload carrying `error` as data — * a list of errors, an error count — is not this shape and must not be * mistaken for it. */ export declare function isErrorPayload(payload: unknown): payload is Record; /** * Return a structured failure WITH its payload intact. * * `toolError` builds a fresh `{success, error, hint}` object, which is right * when all you have is a message but wrong when the tool already produced a * machine-readable error — it drops every other field, `message` included. * * The alternative that was in use is worse: `toolSuccess(result)` on a payload * carrying an `error` field. That is the exact shape S1 hunts for — it reads * as failure to a human and as SUCCESS to every programmatic consumer, because * `isError` is what they branch on. designer.tokens, designer.drift and * designer.lateral_session each answered `{error: "NO_TOKENS"}` with the * failure marker unset. */ export declare function toolFailure(payload: Record): ToolResult; /** * Create an error tool response */ export declare function toolError(error: string, hint?: string): ToolResult; //# sourceMappingURL=response.d.ts.map