/**
 * Shared single-tool-call execution glue between Agent (chat) and
 * TaskRunner (scheduled). Owns the bits that should NEVER drift between
 * the two — browser dispatch path, structured-result shape, timing.
 *
 * What this is NOT (intentionally — see TODO P3-1 non-goals):
 *   - a plugin runtime
 *   - a remote browser harness
 *   - model/provider-specific dispatch
 *   - a separate browser control server
 *
 * Memory/scheduler/attachment/skill tools intentionally stay in their
 * respective owners. The browser surface is where reliability work
 * lives, so that's what we centralize.
 */
import type { BrowserActions } from "../browser/actions.js";
import { type BrowserActionResult } from "../browser/dispatch.js";
import type { ExecutionLogger } from "../logging/logger.js";
export interface BrowserToolRun extends BrowserActionResult {
    durationMs: number;
}
/**
 * Run one browser tool call and return structured result + duration. The
 * caller decides what to put in tool-message text — usually `r.text`.
 *
 * Logging here is intentionally light: BrowserActions logs each underlying
 * action, so this layer only adds the dispatch-level aggregate (action
 * name, ok bit, duration) which is useful for the skill generator.
 */
export declare function runBrowserTool(actions: BrowserActions, args: Record<string, unknown>, logger?: ExecutionLogger): Promise<BrowserToolRun>;
/**
 * Apply the global cap to a tool result and emit a warning when triggered.
 * Returns the (possibly capped) string. Logging the trigger is important —
 * if you see this fire it means some tool's own cap is loose and that's
 * where the fix actually belongs.
 */
export declare function capToolResultText(toolName: string, text: string, logger?: ExecutionLogger): string;
