/** * In-page overlay — single floating "H" mark in the bottom-right corner. * * Click → expands into an info card that surfaces: * - project / buildId / connection status * - sessionId / tabId (click-to-copy) * - current URL * - "Copy snapshot" — key fields as markdown for sharing with a teammate * or pasting into an agent prompt * - "Report a problem" — enters element-picker mode (the legacy annotation * flow, now reachable from inside the card so users don't see two FABs) * * Single Shadow DOM root attached to
; host page styles never leak in * or out. State machine: idle → info → (picker → question) → flash → idle. */ import { type TaskAttachment } from '@harnessa-fe/protocol'; export interface OverlayClient { readonly projectId: string; readonly buildId?: string; readonly displayName?: string; readonly tabId: string; readonly sessionId: string; readonly visitorId?: string; readonly userId?: string; readonly parentProjectId?: string; getConnectionState(): 'connecting' | 'open' | 'closed'; sendEvent(name: string, payload: unknown): void; /** * RPC channel to the daemon. Used to fetch and mutate the visitor's own * tasks. Resolves with `result`, rejects with the remote error message. */ query?