import type { ObservationType } from "../types"; /** Structured observation parsed from AI XML response. */ export interface ParsedObservation { type: ObservationType; title: string; subtitle: string; facts: string[]; narrative: string; concepts: string[]; filesRead: string[]; filesModified: string[]; discoveryTokens?: number; importance?: number; } /** Structured session summary parsed from AI XML response. */ export interface ParsedSummary { summary: string; keyDecisions: string[]; filesModified: string[]; concepts: string[]; request?: string; investigated?: string; learned?: string; completed?: string; nextSteps?: string; } /** * Parse an AI response containing `...` XML into * a structured object. Returns `null` if the response cannot be parsed at all. */ export declare function parseObservationResponse(response: string): ParsedObservation | null; /** * Parse an AI response containing `...` * into a structured object. Returns `null` if unparseable. */ export declare function parseSummaryResponse(response: string): ParsedSummary | null; /** Parse an LLM reranking response into an ordered array of candidate indices. */ export declare function parseRerankingResponse(response: string): number[] | null; /** Possible outcomes of a conflict evaluation. */ export type ConflictOutcome = "new_fact" | "update" | "duplicate"; /** Result of evaluating whether a new observation conflicts with existing ones. */ export interface ConflictEvaluation { outcome: ConflictOutcome; supersedesId?: string; reason: string; } /** Parse an LLM conflict evaluation response into a structured result. */ export declare function parseConflictEvaluationResponse(response: string): ConflictEvaluation | null; /** Classification of entity types extracted from observations. */ export type EntityType = "technology" | "library" | "pattern" | "concept" | "file" | "person" | "project" | "other"; /** Types of relationships between extracted entities. */ export type RelationshipType = "uses" | "depends_on" | "implements" | "extends" | "related_to" | "replaces" | "configures"; /** An entity extracted from observation text. */ export interface ParsedEntity { name: string; entityType: EntityType; } /** A relationship between two extracted entities. */ export interface ParsedRelation { sourceName: string; targetName: string; relationship: RelationshipType; } /** Complete result of entity extraction from an observation. */ export interface ParsedEntityExtraction { entities: ParsedEntity[]; relations: ParsedRelation[]; } /** Parse an LLM entity extraction response into entities and relations. */ export declare function parseEntityExtractionResponse(response: string): ParsedEntityExtraction | null; /** Rough token count (4 chars ~ 1 token for English text) */ export declare function estimateTokens(text: string): number; //# sourceMappingURL=parser.d.ts.map