import type { V2Registration } from "./v2-types.js"; import type { TeamScope } from "./v2-scope.js"; /** The host's native-browser reading conventions that cost rounds in the user's real task log, * said once per session at the result where each one bites. */ export declare const NATIVE_BROWSER_NOTE: string; export interface BrowserGateReport { /** browser_* execute.before events we looked at (Team sessions only) */ seen: number; /** of those, how many carried a URL or local path we could classify */ classified: number; /** refusals raised at the door */ refused: number; /** of those refusals, how many the host walked past anyway (layer 2 fired) */ leaked: number; /** sessions that got the one-time native browser_* reading note */ annotated: number; /** refusals that produced no following result within the window — the door held */ held: number; /** refusals raised against a Code Mode program (`execute`), which reaches the same * browser through `tools.browser.*` and would otherwise bypass this file entirely */ codeModeRefused: number; /** out-of-scope calls left completely alone, counted rather than invisible */ foreignSkipped: number; /** SERP navigations observed (engine+query rate limit, #14) — the whole point * is that a browser SERP grab is a slower `tm_search`, so this is the count * of times the agent reached for the slower one. */ serpNav: number; /** SERP navigations refused past the per-engine+query limit. */ serpRefused: number; /** per-tool refusal counts, so "which verb is the hole" is answerable */ byTool: Record; } export interface BrowserGate { registrations: V2Registration[]; report: BrowserGateReport; /** The hook bodies are exported through this seam so a test can drive both halves * (a host that honours the throw, and one that does not) without a live desktop. */ fireBefore: (event: unknown) => void; fireAfter: (event: unknown) => void; } export declare function applyV2BrowserGate(ctx: unknown, opts: { allowlist: readonly string[]; scope?: TeamScope; /** The resolved runtime config (v2BrowserGate). */ config?: { v2BrowserGate: string; }; /** Trajectory sink for the SERP rate limit (#14). The gate has no store of * its own, so the caller wires this to `appendTrajectory`; a throwing sink * is swallowed because a log line is never a reason to fail a call. */ onSerp?: (info: { event: "serp_nav" | "serp_refused"; engine: string; query: string; host: string; count: number; limit: number; sessionID: string; }) => void; }): BrowserGate; export declare function browserGateSummary(r: BrowserGateReport): string; //# sourceMappingURL=v2-browser-gate.d.ts.map