import type { Express } from 'express'; /** * Profile-independent handoff injection. * * The CDP navigation-watcher only sees tabs inside the Chrome instance * SLICC launched (isolated profile keyed by port); similarly the * extension's webRequest observer only fires inside the profile where it * is installed. External tools (e.g. the slicc-handoff helper) post here * so a handoff reaches the cone regardless of which browser profile the * user is currently driving. * * The payload mirrors the parsed RFC 8288 `Link` form used by the * observers: `verb` ∈ {handoff, upskill}, `target` is the resolved URL, * `instruction` is optional free-form prose (handoff verb). */ export interface HandoffPayload { verb?: unknown; target?: unknown; instruction?: unknown; url?: unknown; title?: unknown; branch?: unknown; path?: unknown; sliccHeader?: unknown; } export interface NavigateEvent { type: 'navigate_event'; verb: 'handoff' | 'upskill'; target: string; instruction?: string; url: string; title?: string; branch?: string; path?: string; timestamp: string; } export interface HandoffRouteDeps { broadcastLickEvent(event: unknown): void; } /** * Validate an inbound handoff payload. Returns an error message when the * payload is malformed, or `null` when it is well-formed and ready to be * turned into a navigate event. Pure — no I/O. */ export declare function validateHandoffPayload(payload: HandoffPayload): string | null; /** Build the navigate event broadcast to the browser. Assumes a valid payload. */ export declare function buildNavigateEvent(payload: HandoffPayload): NavigateEvent; export declare function registerHandoffRoute(app: Express, deps: HandoffRouteDeps): void;