import { type GovernanceJob, type Owner, type Operation } from './types.js'; import type { GovernanceStateStore, GovernanceProgress } from './governance-coordinator.js'; export interface SelectiveTransport { readonly owner: Owner; readonly scope: string | null; writerSettled(operation: Readonly): Promise; removeSource(operation: Readonly): Promise; listMemoryDocuments(): Promise; readMemory(uri: string): Promise; replaceMemory(uri: string, content: string): Promise; removeMemory(uri: string): Promise; } export type WriterClassifier = (input: { selectedText: string; candidateText: string; scope: string | null; }) => Promise<'target' | 'unrelated' | 'uncertain'>; /** Exact-text governance for an unambiguously selected document. */ export declare class MemorySelectiveService { #private; private readonly store; private readonly transport; private readonly drainWriter?; private readonly classifyWriter?; constructor(store: GovernanceStateStore, transport: SelectiveTransport, drainWriter?: ((operationId: string, jobId: string) => Promise) | undefined, classifyWriter?: WriterClassifier | undefined); /** Resolve ambiguity before the durable barrier; the coordinator rechecks after draining. */ begin(input: { kind: 'forget' | 'correct'; memoryUri: string; selectedText: string; replacementText?: string; }): Promise; /** An owner-reviewed exact phrase in a merged derivative. The original * selected phrase and this phrase are both removed before acknowledgement. */ resolveMergedWriter(jobId: string, operationId: string, exactText: string): Promise; advance(id: string, signal?: AbortSignal): Promise; }