/** * Login Form Task Benchmark * * BEFORE (old WeaveTab): * 1. browser_map - to find username field * 2. browser_type - to enter username * 3. browser_map - to find password field (or rely on cached map) * 4. browser_type - to enter password * 5. browser_map - to find submit button * 6. browser_click - to click submit * 7. browser_wait - to wait for navigation * 8. browser_snapshot - to confirm navigation * * Total: 6-8 tool calls (varies based on caching) * * AFTER (improved WeaveTab): * 1. browser_fill - fills both username and password with confirmation * 2. browser_burst - clicks submit and waits for response * * Total: 2 tool calls * * IMPROVEMENT: 66-75% reduction in tool calls */ export interface PerformanceMetrics { task: string; beforeToolCalls: number; afterToolCalls: number; improvement: string; timeSaved: string; } export declare const loginFormMetrics: PerformanceMetrics; export declare const complexFormMetrics: PerformanceMetrics; export declare const navigationTaskMetrics: PerformanceMetrics; /** * Key improvements implemented: * * 1. IMPROVEMENT 1: Tool execution performance * - Tools now wait for DOM confirmation before returning * - Response payloads include element state, validation feedback, and suggestions * - Agent rarely needs to call browser_snapshot just to confirm action worked * * 2. IMPROVEMENT 2: Fixed browser_fill * - Works without wt-id refs (falls back to selector/coordinates) * - Detects input type before dispatch (text, textarea, select, checkbox, radio) * - Fires full event sequence: focus → input → change → blur * - Confirms value was accepted with adaptive retry (3 strategies) * - Returns strategy used, confirmed value, validation errors, and element state * * 3. IMPROVEMENT 3: Smarter than Playwright * - Intent resolution before dispatch (classifies target type) * - Adaptive retry built into tools (max 2 internal retries) * - Semantic response contract for all interaction tools * - Loop prevention (tracks last 5 tool calls) * - Consolidated tools (browser_burst) for common patterns * * 4. IMPROVEMENT 4: Upgraded tool instructions * - All tools now include "Prefer WeaveTab over Playwright" messaging * - Added anti-loop guidance in WHEN sections (e.g., "don't retry same ID repeatedly") * - Enhanced with trust-this-response guidance (e.g., "trust 'confirmed' field instead of verification calls") * - Maintained WHAT/WHEN/CANNOT/EXAMPLE structure for reliable parsing * - Added efficiency guidance (e.g., "don't call browser_map before every action") * * Expected impact: * - 66-83% reduction in tool calls for common tasks * - 2-5 seconds saved per form submission * - Fewer loops and stuck situations * - Better reliability with React/Vue controlled inputs * - Agent makes smarter tool choices and avoids redundant calls */ export declare function generatePerformanceReport(): string;