/** * Client-side helpers for talking to a running trail-viewer instance. * * Wire format mirrors `packages/trail-viewer/src/bun/ipc.ts`: Unix domain * socket at `~/.principal/trail-viewer.sock`, single line-delimited JSON * message per connection, single line-delimited JSON response. * * Duplicated rather than shared because cli and trail-viewer are independent * npm packages — the wire protocol is the contract, this module enforces it * from the producer side. */ export declare const SOCKET_PATH: string; export interface LoadTrailMessage { kind: 'LOAD_TRAIL'; trailFile: string; mode: 'local' | 'remote'; repoRoot?: string; ghToken?: string; repoOwner?: string; repoName?: string; repoPurl?: string; } export interface ActivateTabMessage { kind: 'ACTIVATE_TAB'; /** Permanent tab id to switch to (e.g. `agent-sessions`). */ tabId: string; } export type ViewerIpcMessage = LoadTrailMessage | ActivateTabMessage; /** * Try to hand off a message to a running viewer. Returns true if the running * viewer accepted; caller can exit 0 without spawning. Returns false if no * viewer is reachable. */ export declare function handoffToRunning(message: ViewerIpcMessage): Promise; //# sourceMappingURL=viewer-ipc.d.ts.map