import { completePrompt } from '../models'; import { ToolDefinition, ToolHandler } from '../models/types'; import { Attachment, Builder, BuilderResult, ContextSection } from './types'; export interface AnthropicBuilderOptions { apiKey?: string; model?: string; /** Optional wrapper applied to any internally-created model (e.g. for debug logging). */ wrapModel?: (model: completePrompt) => completePrompt; /** When true, this is the first edit to a saved page (v0→v1) — forces Opus + no ranged writes. */ isFirstEdit?: boolean; /** When true, retry the last edit — forces Opus + no ranged writes, skips classification. */ tryAgain?: boolean; /** Number of messages in the chat history (used for early-conversation bypass). */ historyLength?: number; /** Pre-computed classification result — skips re-classifying in the builder. */ preClassified?: ClassifyResult; } export type Classification = 'question' | 'easy-change' | 'medium-change' | 'hard-change' | 're-write'; /** Sketches passed to the classifier so it can decide which sections to expand. */ export interface ClassifierSection { /** Section title (e.g. ""). */ title: string; /** Compact one-line summary the classifier reads. */ sketch: string; } export interface ClassifyResult { classification: Classification; /** When classification is "question", this contains the answer text. */ answer?: string; /** Section titles the classifier picked to render in full. Empty = render all sketches. */ expand: string[]; } export declare function classifyRequest(apiKey: string, pageHtml: string, userMessage: string, sections?: ClassifierSection[]): Promise; /** * Returns true when the message is very likely a pure information question * (no intent to modify the page). Used to bypass the full Sonnet classifier. */ export declare function isLikelyQuestion(message: string): boolean; /** * Create an Anthropic-tuned builder. * * @param complete The completePrompt function (already configured with API key / model). * @param userInstructions Optional user-level instructions from settings. * @param productName Product name for branding in prompts (defaults to 'SynthOS'). * @param options Optional API key and model name for classifier routing. */ export declare function createAnthropicBuilder(complete: completePrompt, userInstructions?: string, productName?: string, options?: AnthropicBuilderOptions): Builder; /** * Appended to when tools are bound so the model knows it may * fetch additional context on demand. */ export declare const TOOLS_INSTRUCTION_HINT = "You may call the provided tools to load additional context only if you need it. You may call multiple tools in parallel in a single turn."; export declare function buildWithModel(model: completePrompt, currentPage: ContextSection, additionalSections: ContextSection[], userMessage: string, userInstructions: string | undefined, productName: string, attachments?: Attachment[], outputSchema?: Record, tools?: ToolDefinition[], toolHandlers?: Record, onToolCall?: (names: string[]) => void): Promise; export declare function parseBuilderResponse(raw: string): BuilderResult; //# sourceMappingURL=anthropic.d.ts.map