import { type CompactSettleResult, type CompactTrigger, type PostCompactMeasurement } from './compact-event-settle-types.js'; export { COMPACT_EVENT_PATHWAY } from './compact-event-settle-types.js'; export type { CompactSettleResult, CompactTrigger, PostCompactMeasurement } from './compact-event-settle-types.js'; /** * Read `trigger` out of an already-parsed `PostCompact` payload. * * Anything that is not exactly `'manual'` or `'auto'` yields `undefined` — a * missing field, a `null`, a number, another string, a payload that is not an * object at all. This function never throws and never guesses (see this file's * header, refusal 1). */ export declare function readTriggerFromHookPayload(payload: unknown): CompactTrigger | undefined; /** * Read the harness session id out of an already-parsed `PostCompact` payload. * * Same contract as `readTriggerFromHookPayload`: a missing field, an empty * string, a number, a non-object payload — every one of those is `undefined`, * and "absent" is an expected input rather than an error (see this file's * header, refusal 4, for what the caller does with it and what it does with * `undefined`). */ export declare function readSessionIdFromHookPayload(payload: unknown): string | undefined; /** * The post-compact ruler: the same probe the orchestrator uses, so this row * divides by the same denominator the dispatch did. * * `ratio` is `null` when nothing could be measured — a `conservative-fallback` * probe reports `0`, but that `0` means "unknown", and recording it here would * publish a real, infinitely-deep drop. The rest of the reading (adapter, the * window the ratio divides by) is still carried, because knowing WHICH adapter * could not measure is diagnostic. */ export declare function measurePostCompact(input: { readonly projectRoot: string; readonly sessionId: string; readonly env: NodeJS.ProcessEnv; }): PostCompactMeasurement; /** * Settle whatever compact run is open in `sessionId`, because the harness just * reported one. * * `measure` is the ruler, injected rather than called directly for one concrete * reason: the production ruler prefers `~/.claude/statusline-state.json`, a real * file whose contents differ on every machine that runs the test suite. A test * asserting this row's `afterRatio` against the developer's own statusline would * pass or fail by accident. It is called at most once — the IDE tag and the * window come from the same reading, so they cannot disagree with each other. * * Returns `{ settled: false }` when there is no open run — the honest answer, * not an error — and when the payload names another harness session. The two * say different things in `reason`, because they are different facts. */ export declare function settleCompactFromHarnessEvent(input: { readonly projectRoot: string; readonly sessionId: string; readonly trigger?: CompactTrigger | undefined; /** * The harness session id the payload named, when it named one (see * `readSessionIdFromHookPayload`). Refused when it is present AND this * project's own harness session id resolves AND the two differ. Absent, or * unresolvable on this side, is accepted: a guard that cannot see what it is * checking against must not become a hook that never settles anything. */ readonly hookSessionId?: string | undefined; readonly env?: NodeJS.ProcessEnv | undefined; readonly measure?: (() => PostCompactMeasurement | null) | undefined; /** Failure injection for the lifecycle write — the seam `CompactLifecyclePublisher` already takes. */ readonly failLifecycleWrite?: boolean | undefined; }): CompactSettleResult;