import type { AgentExperienceEvent, AgentExperienceEvidence } from './types.js'; export interface AgentExperienceJournalState { readonly version: 2; readonly events: readonly AgentExperienceEvent[]; readonly reflections: Readonly>; } export interface AgentExperienceJournalStore { read(): Promise; write(state: AgentExperienceJournalState): Promise; withLock?(operation: () => Promise): Promise; } export interface AgentExperienceJournalStorage { read(): Promise; write(value: unknown): Promise; withLock?(operation: () => Promise): Promise; } export interface AgentExperienceCaptureResult { readonly deduplicated: boolean; readonly pending: boolean; readonly event: AgentExperienceEvent; readonly episodeEventCount: number; readonly episodeEvidenceCount: number; } export interface AgentExperienceEpisode { readonly id: string; readonly events: readonly AgentExperienceEvent[]; readonly evidence: readonly AgentExperienceEvidence[]; } export interface AgentExperienceReflectionClaim { readonly claimId: string; readonly episodeId: string; readonly eventIds: readonly string[]; readonly events: readonly AgentExperienceEvent[]; readonly completedOwners: Readonly>; } export declare class MemoryAgentExperienceJournalStore implements AgentExperienceJournalStore { private state; constructor(initial?: AgentExperienceJournalState); read(): Promise; write(state: AgentExperienceJournalState): Promise; } export declare class StorageAgentExperienceJournalStore implements AgentExperienceJournalStore { private readonly storage; constructor(storage: AgentExperienceJournalStorage); read(): Promise; write(state: AgentExperienceJournalState): Promise; withLock(operation: () => Promise): Promise; } export declare class AgentExperienceJournal { private readonly store; private queue; constructor(store: AgentExperienceJournalStore); capture(value: AgentExperienceEvent): Promise; pending(limit?: number): Promise; isPending(eventId: string): Promise; /** Atomically lease one episode so independent CLI/Hook processes cannot reflect it twice. */ claimEpisode(episodeId: string, options?: { readonly now?: string; readonly leaseMs?: number; }): Promise; renewClaim(claim: AgentExperienceReflectionClaim, options?: { readonly now?: string; readonly leaseMs?: number; }): Promise; markLearnerCompleted(claim: AgentExperienceReflectionClaim, owner: string, eventIds: readonly string[], updatedAt?: string): Promise; completeClaim(claim: AgentExperienceReflectionClaim, updatedAt?: string): Promise; failClaim(claim: AgentExperienceReflectionClaim, error: string, updatedAt?: string): Promise; markProcessed(eventId: string, updatedAt?: string): Promise; markProcessedMany(eventIds: readonly string[], updatedAt?: string): Promise; markFailed(eventId: string, error: string, updatedAt?: string): Promise; episode(episodeId: string): Promise; list(options?: { readonly projectId?: string; readonly type?: AgentExperienceEvent['type']; }): Promise; private serialized; private updateReflection; private finishClaim; } //# sourceMappingURL=experience-journal.d.ts.map