import { type EvidenceBundleInput, type EvidenceBundlePrecondition, type EvidenceBundleRun } from '@opensip-cli/session-store'; import type { DeferredReportEffect } from './report-open-policy.js'; import type { StoredSession, StoredSessionHostMetrics } from '@opensip-cli/contracts'; /** Host buffer limits intentionally match the atomic session-store boundary. */ export declare const MAX_HOST_EVIDENCE_SESSIONS = 256; export declare const MAX_HOST_EVIDENCE_BYTES: number; declare const evidenceOwnerBrand: unique symbol; /** Opaque capability identifying one ordinary action or one nested suite. */ export interface HostEvidenceOwnerToken { readonly [evidenceOwnerBrand]: true; } export type HostEvidenceOwnerKind = 'ordinary' | 'nested'; export type HostEvidencePoisonReason = 'session-limit' | 'byte-limit' | 'invalid-evidence'; export interface HostEvidenceAccumulatorLimits { readonly maxSessions?: number; readonly maxBytes?: number; } export type HostEvidenceDrainResult = { readonly status: 'drained'; readonly input: EvidenceBundleInput; readonly reportEffect?: DeferredReportEffect; } | { readonly status: 'poisoned'; readonly reason: HostEvidencePoisonReason; } | { readonly status: 'discarded'; }; export interface HostEvidenceAccumulator { readonly createOwner: (kind: HostEvidenceOwnerKind) => HostEvidenceOwnerToken; readonly ownerKind: (owner: HostEvidenceOwnerToken) => HostEvidenceOwnerKind | undefined; readonly stageSession: (owner: HostEvidenceOwnerToken, session: StoredSession, hostMetrics?: StoredSessionHostMetrics) => boolean; readonly mergeHostMetrics: (owner: HostEvidenceOwnerToken, sessionId: string, metrics: StoredSessionHostMetrics) => boolean; readonly isSessionLinkable: (owner: HostEvidenceOwnerToken, sessionId: string) => boolean; readonly stagedSession: (owner: HostEvidenceOwnerToken, sessionId: string) => StoredSession | undefined; readonly discardSession: (owner: HostEvidenceOwnerToken, sessionId: string) => boolean; readonly queueReportEffect: (owner: HostEvidenceOwnerToken, effect: DeferredReportEffect) => boolean; readonly replaceReportEffect: (owner: HostEvidenceOwnerToken, effect?: DeferredReportEffect) => boolean; readonly drain: (owner: HostEvidenceOwnerToken, input?: { readonly run?: EvidenceBundleRun; readonly precondition?: EvidenceBundlePrecondition; }) => HostEvidenceDrainResult; readonly discard: (owner: HostEvidenceOwnerToken) => void; } /** * Bounded, memory-only host evidence buffer. * * Any rejected contribution poisons its complete owner and clears all buffered * rows. The buffer therefore has no prefix-commit mode and never spills * customer evidence to a temporary file. * * @throws {RangeError} When a configured session or byte bound is outside the * accumulator's closed safety limits. */ export declare function createHostEvidenceAccumulator(limits?: HostEvidenceAccumulatorLimits): HostEvidenceAccumulator; export {}; //# sourceMappingURL=host-evidence-accumulator.d.ts.map