import { type WorkReview } from '../../memory-learning/work-review.js'; import { type WorkCandidate } from '../../memory-learning/work-candidate.js'; import type { AssertionCandidate } from '../domain.js'; export declare const USER_MODEL_CAPTURE_INTENTS: readonly ["remember", "query", "confirm", "correct", "forget", "user_assertion", "task", "none"]; export type UserModelCaptureIntent = typeof USER_MODEL_CAPTURE_INTENTS[number]; export interface CaptureEvidence { conversationId?: string; observationScope?: AssertionCandidate['scope']; ref: string; role: 'user' | 'assistant' | 'toolResult'; text: string; createdAt: number; } export type AssertionMaintenanceAction = 'create' | 'merge' | 'replace'; export interface ParsedAssertionOperation extends AssertionCandidate { intent?: UserModelCaptureIntent; action: AssertionMaintenanceAction; targetAssertionId?: string; evidenceRefs: string[]; evidenceQuotes?: Array<{ ref: string; quote: string; }>; temporalResolution: 'exact' | 'relative_resolved' | 'unresolved'; originalTimePhrase?: string; } export interface ParsedGoalCandidate { intent?: UserModelCaptureIntent; title: string; desiredOutcome: string; scope: AssertionCandidate['scope']; declaredImportance?: number; targetAt?: number; evidenceRefs: string[]; evidenceQuotes?: Array<{ ref: string; quote: string; }>; } export interface ParsedCollaborationRuleCandidate { intent?: UserModelCaptureIntent; category: 'communication' | 'execution' | 'boundary' | 'routine' | 'initiative'; priority: number; scope: AssertionCandidate['scope']; conditions: Record; statement: string; evidenceRefs: string[]; evidenceQuotes?: Array<{ ref: string; quote: string; }>; } export interface UserModelInterpretation { knowledge?: WorkCandidate[]; knowledgeReviews?: WorkReview[]; knowledgeDeletions?: Array<{ targetKnowledgeIds: string[]; boundary: string; reread?: { subject: string; property: 'date_time' | 'price'; }; evidenceRefs: string[]; evidence: Array<{ ref: string; quote: string; }>; retained?: Array<{ targetKnowledgeId: string; spans: string[]; }>; }>; intent: UserModelCaptureIntent; assertions: ParsedAssertionOperation[]; goals?: ParsedGoalCandidate[]; collaborationRules?: ParsedCollaborationRuleCandidate[]; targetAssertionIds: string[]; abstentionReason?: string; rejectedCandidates?: Array<{ candidateKey: string; reasonCode: string; }>; } export interface InterpretationParseFailure { reason: 'empty_output' | 'invalid_json' | 'schema_validation'; issues: Array<{ path: string; code: string; }>; } export declare function parseUserModelInterpretation(raw: string, evidence: CaptureEvidence[], allowedTargetIds?: string[], onInvalid?: (failure: InterpretationParseFailure) => void, allowedKnowledgeIds?: string[]): UserModelInterpretation | null;