import type { Refusal, StoreErrorCode } from './store-types.js'; export declare const TOOL_ERROR_CODES: readonly ['ACCESS_PUBLISH', 'ACCESS_READ', 'ACCESS_DECIDE', 'UNREAD_PARTS', 'NOT_ACCEPTED_YET', 'PART_OUT_OF_RANGE', 'PART_NEEDS_VERSION', 'CURSOR_INVALID', 'RUNTIME_CLOSED', 'NO_CHECKS', 'REWORK_EXHAUSTED']; export type ToolErrorCode = (typeof TOOL_ERROR_CODES)[number]; export type DocErrorCode = StoreErrorCode | ToolErrorCode; export declare const errorRemedy: (code: string) => string; export interface DocFailure { ok: false; code: string; error: string; remedy: string; [k: string]: unknown; } export declare function failure(code: DocErrorCode, error: string, extra?: Record): DocFailure; /** A store refusal as a tool result: the store's own message, the remedy for its code, its details. */ export declare function fromRefusal(r: Refusal): DocFailure; //# sourceMappingURL=tool-errors.d.ts.map