import type { BusEvent } from './types.js'; type Listener = (e: BusEvent) => void; /** * Ground-truth event log for one org run. Append-only JSONL + in-process fanout. * Every message, tool decision, asset, and usage record flows through here. */ export declare class OrgBus { readonly org: string; readonly run: string; readonly dir: string; private listeners; private seq; private pending; private dirReady; readonly file: string; constructor(org: string, run: string, dir: string); subscribe(fn: Listener): () => void; emit(partial: Omit): BusEvent; /** Await all queued disk writes (tests, shutdown). Listeners registered via subscribe() run * synchronously inside emit() — flush() has no visibility into any async work they schedule * off of that (e.g. the forwarder's HTTP POSTs). A caller that needs an async subscriber's * work to have settled too must await that subscriber's own completion signal separately * (see daemon.ts stopOrg(), which awaits forwarder.settle() alongside bus.flush()). */ flush(): Promise; static readHistory(dir: string): BusEvent[]; } export {}; //# sourceMappingURL=bus.d.ts.map