import type { DispatchRecord } from '../../services/dispatch/dispatch-record-writer.js'; /** * Resolve a record's on-disk path through `realpathSync` so the value returned * here matches the value `writeInitialDispatchRecord` produces — which itself * passes through `assertSafeDispatchRecordPath` and ends up canonicalized. On * macOS, `mkdtempSync(join(tmpdir(), prefix))` returns `/var/folders/...` * while `process.cwd()` after `chdir` returns `/private/var/folders/...`; * without this helper the test fixture's `queuedPath` (canonical) and the * envelope's `finalized[].recordPath` (raw) never compare equal. Falls back * to the lexical path when the file is missing (race between scan and write). */ export declare function safeRecordPath(p: string): string; /** * Resolve the dispatch records belonging to a batch. * * Reuses the conventions already in the repo instead of inventing a new one: * - records live at `.peaks/_sub_agents//dispatch--.json` * (`dispatchRecordPath`, src/services/security/safe-settings-path.ts); * - a record's batch is its own `batchId` field, written by * `writeInitialDispatchRecord`. The `--batch` branch of `finalize` and * `findBatchRecords` in heartbeat-watch-command.ts resolve a batch the * same way: scan the session dir, filter `dispatch-*.json`, compare field. * * `unreadable` lists the `dispatch-*.json` candidates whose batch could NOT be * determined. The caller must not fold them into "no such batch": a record it * cannot read is not evidence that the batch is empty. */ export declare function resolveBatchRecords(input: { projectRoot: string; sessionId: string; batchId: string; readOne: (recordPath: string) => DispatchRecord; }): { sessionDir: string; recordPaths: string[]; unreadable: string[]; };