/** * Dev-only dispatcher hot swap (BRIDGE_HOT_SWAP_ENABLED): pushes a freshly * built extension dispatcher bundle (easyeda-bridge-extension/dist/dispatcher.js) * over the bridge as system.hotSwap.begin/chunk/commit frames. The extension * loader verifies the sha256, evals the bundle, and swaps its active * dispatcher — no .eext re-import, no reconnect. */ export interface DispatcherArtifact { source: string; buildId: string; sha256: string; byteLength: number; } export interface LoaderStatus { loaderVersion?: string; activeDispatcher?: 'baked' | 'pushed'; buildId?: string; bakedBuildId?: string; methodCount?: number; methodListHash?: string; hotSwapCompiled?: boolean; hotSwapEnabled?: boolean; } export interface HotSwapResult { swapped: boolean; buildId?: string; methodCount?: number; methodListHash?: string; } type BridgeCall = (method: string, params?: TParams, opts?: { timeoutMs?: number; }) => Promise; /** * Read the dispatcher bundle plus its build metadata. The buildId comes from * the `dispatcher.meta.json` sidecar written by the extension build script; * the hash/size are recomputed from the actual bundle so a stale sidecar can * never push mismatched bytes. */ export declare function readDispatcherArtifact(bundlePath: string): DispatcherArtifact; export declare function fetchLoaderStatus(call: BridgeCall): Promise; /** * Drive a full begin → chunk* → commit push. Throws on any step failure; the * extension keeps its previous dispatcher in that case. */ export declare function pushDispatcher(call: BridgeCall, artifact: DispatcherArtifact, chunkBytes: number): Promise; export declare function revertDispatcher(call: BridgeCall): Promise<{ reverted: boolean; buildId?: string; }>; export {};