import { l as SemanticDocument } from './types-BNownkHv.cjs'; /** * Agent Summary Format * Ultra token-efficient plain text format for LLM consumption * * Target: ~100 tokens vs ~800 tokens for JSON * Use case: Quick site understanding for AI agents * * @packageDocumentation */ /** * Options for agent summary generation */ interface AgentSummaryOptions { /** Include interactables list (default: true) */ includeInteractables?: boolean; /** Include landmarks list (default: true) */ includeLandmarks?: boolean; /** Include certification info (default: true) */ includeCertification?: boolean; /** Maximum interactables to list (default: 20) */ maxInteractables?: number; /** Maximum landmarks to list (default: 10) */ maxLandmarks?: number; /** Include resource URLs if available (default: true) */ includeResourceUrls?: boolean; } /** * Generate an ultra-compact agent summary * * Format designed for ~100 tokens vs ~800 for JSON manifest * * @example Output: * ``` * SITE: example.com * TITLE: My Website * LANG: en * CERT: standard (75/100) * * LANDMARKS: * navigation: Main Nav | #nav * main: Content | #main * * ACTIONS: * button: Submit Form | #submit | submit * link: Home | #home | navigate * audio: Track 1 | #audio-1 | play * ``` * * @param document - SemanticDocument to summarize * @param options - Summary options * @returns Plain text summary */ declare function toAgentSummary(document: SemanticDocument, options?: AgentSummaryOptions): string; /** * Generate a minimal one-line summary * For ultra-compressed contexts (~20 tokens) * * @example * "example.com | standard (75) | 5 landmarks | 12 actions" */ declare function toOneLiner(document: SemanticDocument): string; /** * Generate a navigation-focused summary * Lists all navigable sections with anchors */ declare function toNavSummary(document: SemanticDocument): string; /** * Generate an audio-focused summary * Lists all playable audio elements */ declare function toAudioSummary(document: SemanticDocument): string; /** * Estimate token count for the summary * Based on ~4 chars per token heuristic */ declare function estimateSummaryTokens(summary: string): number; /** * Compare token usage between formats */ declare function compareTokenUsage(document: SemanticDocument): { summary: number; json: number; savings: number; savingsPercent: number; }; export { type AgentSummaryOptions, compareTokenUsage, estimateSummaryTokens, toAgentSummary, toAudioSummary, toNavSummary, toOneLiner };