import type { JobRecord } from "./server.js"; export declare function productCommandRecords(records: readonly JobRecord[]): JobRecord[]; /** * The retained product commands a caller ADDRESSED, chosen before any public * projection runs. * * `publicJobRecord` recursively walks and redacts a record's params, so a * caller that wants ONE run (or one parent's direct children) must not pay for * every retained prompt in the partition: selection here is a reference and * metadata scan (`id`/`runId` equality, one shallow `delegatedFromRunId` read, * an O(M log M) sort over the matching children only), and the unselected * records are never traversed or serialized at all. An unqualified query keeps * the historical whole-list answer. * * An addressed miss is an EMPTY selection. The caller owns the distinction * between "this run is not retained" and "the daemon could not answer": a * transport failure throws and must never be read as an empty list. */ export declare function selectProductCommands(records: readonly JobRecord[], query?: unknown): JobRecord[]; /** Cap on the serialized `params` bytes retained across terminal product * commands (journal sprint owner decision D3, release 1). Prompts stay inline * in the command journal, so once their sum passes this bound the OLDEST * terminal product commands are pruned regardless of age; the 500/30-day rule * is unchanged. Model-operation receipts and needs-decision runs are exempt; * delivery commands (`delivery-*`, which carry a copy of the applied run's * params) keep their own age/cap policy and neither count nor get pruned here. */ export declare const MAX_RETAINED_COMMAND_PARAMS_BYTES: number; /** Select only expired terminal records (D8: job state is the lifecycle; * non-terminal = queued/running). Needs-decision (review-blocked / checks- * failed) runs are EXEMPT — they keep operator visibility parity with the old * `blocked` retention and are never pruned by age/cap or by the byte budget. */ export declare function prunableCommandIds(records: readonly JobRecord[], cap: number, retentionMs: number, now: number, maxParamsBytes?: number): string[]; //# sourceMappingURL=command-retention.d.ts.map