import { type ModifierKey } from "../keys.js"; import type { Observation } from "./session.js"; import type { ImageBlock, TextBlock, ToolResultBlock, ToolUseBlock } from "./types.js"; /** An action the model asked for could not run; the message goes back to the model. */ export declare class MemberError extends Error { } export declare function okResult(id: string, toolset: string | undefined, content: ToolResultBlock["content"]): ToolResultBlock; export declare function errorResult(id: string, toolset: string | undefined, message: string): ToolResultBlock; export declare function textBlock(value: string): TextBlock; export declare function imageBlock(obs: Observation): ImageBlock; /** Runs a turn's calls in order; after the first failure the rest get `haltText` and do not run. */ export declare function runBatch(calls: ToolUseBlock[], toolset: string | undefined, haltText: string, runOne: (call: ToolUseBlock) => Promise): Promise<{ results: ToolResultBlock[]; failed: boolean; }>; /** Modifier keys named in a chord such as "ctrl+shift" or "super". */ export declare function modifiersOf(chord: string): ModifierKey[]; /** Every key in a chord, modifiers first, for holding them down. */ export declare function chordKeys(chord: string): string[]; export declare function clampInt(value: unknown, min: number, max: number, fallback: number): number; export declare function clampSeconds(value: unknown, max: number): number; export declare function requireString(value: unknown, field: string): string; export declare function messageOf(err: unknown): string; export declare function delay(ms: number): Promise; export declare const SCROLL_PX_PER_NOTCH = 100; export declare const MAX_HOLD_S = 30; //# sourceMappingURL=anthropic-shared.d.ts.map