import { type GovernanceProgress, type GovernanceStateStore, type GovernanceTransport } from './governance-coordinator.js'; import { type SelectiveTransport, type WriterClassifier } from './memory-selective.js'; import { type MemoryExportTransport } from './memory-export.js'; import { type Owner, type Operation } from './types.js'; import type { MemoryDelivery } from './delivery.js'; export type MemoryGovernanceClient = GovernanceTransport & SelectiveTransport & MemoryExportTransport & { writerSettledAny(operation: Readonly): Promise; clearOwnerData(): Promise; }; export interface GovernanceReceipt { jobId: string; status: GovernanceProgress['status'] | 'superseded'; errorCode?: string; } /** Shared entry point for authenticated controls and model tools. */ export declare class MemoryGovernanceService { #private; private readonly store; private readonly client; readonly owner: Owner; readonly scope: string | null; constructor(store: GovernanceStateStore, client: MemoryGovernanceClient, delivery: Pick, classifyWriter?: WriterClassifier); correct(memoryUri: string, selectedText: string, replacementText: string): Promise; forget(memoryUri: string, selectedText: string): Promise; clear(): Promise; /** Persist access revocation before any remote operation. The host retains * its cleanup credential and state until this returns complete. */ retire(): Promise; exportPage(limit: number, cursor?: string, maxBytes?: number): Promise<{ items: import("./memory-export.js").ExportedMemory[]; nextCursor?: string; }>; status(id: string): Promise; pending(): Promise; /** Authenticated management clarification; owner and project come from this service. */ reviewWriter(jobId: string, operationId: string, decision: 'target' | 'unrelated'): Promise; reviewCandidates(jobId: string): Promise>; /** Exact remote text is shown only through the authenticated management API. */ reviewMergedCandidates(jobId: string): Promise>; review(jobId: string): Promise<{ stage: "classify"; candidates: { operationId: string; phase: string; candidateText: string; }[]; } | { stage: "merged"; candidates: { operationId: string; candidateText: string; documentText: string; }[]; }>; resolveMergedWriter(jobId: string, operationId: string, exactText: string): Promise; /** Idempotent recovery after restart or an unknown remote reply. */ advancePending(): Promise; } /** Periodically resumes durable jobs without requiring an open browser session. */ export declare class MemoryGovernanceScheduler { #private; private readonly service; private readonly pollIntervalMs; private readonly onError?; constructor(service: Pick, pollIntervalMs: number, onError?: ((code: "MEMORY_GOVERNANCE_SCHEDULER_UNAVAILABLE") => void) | undefined); start(): void; wake(): void; stop(): Promise; }