import { type AppendGovernanceObservationResult, type GovernanceCommandExecution, type GovernanceCommandReceipt, type GovernanceEventStore, type GovernanceObservation, type ReadGovernanceObservationsPageOptions, type StoredGovernanceObservation } from './event-store-contract.js'; import { type GovernanceCommand, type GovernanceDecisionContext, type GovernanceEvent, type TaskAggregate } from './task-aggregate.js'; import type { ConsumeVerificationExecutionLeaseResult, IssueVerificationExecutionLeaseResult, VerificationExecutionBinding, VerificationExecutionLeaseCredential, VerificationExecutionLeaseStatus, VerificationLeaseIssuancePrecondition } from './verification-execution-lease.js'; import type { VerificationRunContract } from './verification-run-contract.js'; import type { RecordWorkspaceSnapshotResult, WorkspaceSnapshotFenceDescriptor } from './workspace-snapshot-fence.js'; export type { AppendGovernanceObservationResult, GovernanceCommandExecution, GovernanceCommandReceipt, GovernanceEventStore, GovernanceObservation, GovernanceObservationCategory, StoredGovernanceObservation, } from './event-store-contract.js'; export { GOVERNANCE_OBSERVATION_CATEGORIES, GOVERNANCE_OBSERVATION_DEFAULT_PAGE_SIZE, GOVERNANCE_OBSERVATION_MAX_PAGE_SIZE, } from './event-store-contract.js'; interface SqliteGovernanceEventStoreOptions { readonly now?: (() => string) | undefined; readonly verificationLeaseSecret?: (() => string) | undefined; } export declare class SqliteGovernanceEventStore implements GovernanceEventStore { readonly databasePath: string; private readonly db; private readonly now; private readonly verificationLedger; private closed; private constructor(); static open(databasePath: string, options?: SqliteGovernanceEventStoreOptions): SqliteGovernanceEventStore; execute(command: GovernanceCommand, context?: GovernanceDecisionContext): GovernanceCommandExecution; readTask(taskId: string): TaskAggregate | null; readEvents(taskId: string): readonly GovernanceEvent[]; readReceipt(commandId: string): GovernanceCommandReceipt | null; appendObservation(observation: GovernanceObservation): AppendGovernanceObservationResult; /** * Paginated, category-filtered observation read. * * The observations table is append-only — its UPDATE and DELETE triggers say * so — and therefore grows without bound for the lifetime of a project. The * previous unpaginated read loaded every row a project had ever recorded and * left the caller to filter in JavaScript, which cost 148 MB and 400 ms at * 100 000 rows and produced a 8.9 MB response: already past the 8 MB IPC * frame cap, so the endpoint could not succeed at all past that point. Both * the category filter and the page window belong in SQL, matching what * `readEvidenceCandidateObservations` already does. */ readObservationsPage(options: ReadGovernanceObservationsPageOptions): readonly StoredGovernanceObservation[]; readEvidenceCandidateObservations(projectId: string, taskId: string, options: { readonly afterSequence: number; readonly limit: number; }): readonly StoredGovernanceObservation[]; issueVerificationExecutionLease(run: VerificationRunContract): IssueVerificationExecutionLeaseResult; recordWorkspaceSnapshot(projectId: string, manifestHash: string): RecordWorkspaceSnapshotResult; readLatestWorkspaceSnapshot(projectId: string): WorkspaceSnapshotFenceDescriptor | null; issueVerificationExecutionLeaseIfCurrent(run: VerificationRunContract, precondition: VerificationLeaseIssuancePrecondition): IssueVerificationExecutionLeaseResult; consumeVerificationExecutionLease(credential: VerificationExecutionLeaseCredential, binding: VerificationExecutionBinding): ConsumeVerificationExecutionLeaseResult; readVerificationExecutionLeaseStatus(leaseId: string): VerificationExecutionLeaseStatus; close(): void; private initializeSchema; private readEventsUnlocked; private readTaskUnlocked; private readReceiptRow; private readObservationRow; private receiptFromRow; private observationFromRow; private executionFromReceipt; private assertOpen; } //# sourceMappingURL=event-store.d.ts.map