import type { LearningConfig } from "../config/Config.js"; import type { DocdexClient } from "../docdex/DocdexClient.js"; import type { RunLogger } from "../runtime/RunLogger.js"; import { type LearningEvidenceReference, type LearningRuleProposal, type LearningRuleScope } from "./LearningGovernance.js"; export interface PreferenceWriteback { category: string; content: string; agentId?: string; source?: string; scope?: LearningRuleScope; confidence_score?: number; confidence_band?: "low" | "medium" | "high"; confidence_reasons?: string[]; evidence?: LearningEvidenceReference[]; explicit_confirmation?: boolean; } export interface RulePromotionRequest { dedupe_key: string; agentId?: string; } export interface MemoryWritebackInput { failures: number; maxRetries: number; lesson: string; preferences?: PreferenceWriteback[]; rules?: LearningRuleProposal[]; promotions?: RulePromotionRequest[]; } export interface MemoryWritebackOptions { agentId?: string; workspaceRoot?: string; learning?: Partial; logger?: RunLogger; } export interface LearningWriteOutcome { status: "accepted" | "deferred" | "suppressed" | "rejected" | "promoted"; code: string; message: string; rule_id?: string; dedupe_key?: string; scope?: LearningRuleScope; lifecycle_state?: "candidate" | "enforced"; confidence_score?: number; confidence_band?: "low" | "medium" | "high"; target?: "repo_memory" | "profile_memory"; } export interface MemoryWritebackResult { outcomes: LearningWriteOutcome[]; ledgerPath: string; } export declare class MemoryWriteback { private client; private agentId; private workspaceRoot; private ledgerPath; private logger?; private policy; constructor(client: DocdexClient, options?: MemoryWritebackOptions); private logOutcome; private toLegacyProposals; private persistRuleToDocdex; persist(input: MemoryWritebackInput): Promise; } //# sourceMappingURL=MemoryWriteback.d.ts.map