import type { AgentExperienceEvent, AgentExperienceEvidence } from './types.js'; export interface AgentLearningWait { readonly kind: 'host-review'; readonly id: string; readonly workspaceId: string; } 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 AgentLearningStatus { readonly pending: number; readonly retryScheduled: number; readonly waiting: number; readonly failed: number; } 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); status(): Promise; capture(value: AgentExperienceEvent): Promise; pending(limit?: number): Promise; legacyReviewCandidates(): Promise; releaseLegacyReview(eventIds: readonly string[]): Promise; releaseWaiting(review: AgentLearningWait): Promise; waitClaim(claim: AgentExperienceReflectionClaim, waitFor: readonly AgentLearningWait[], updatedAt?: string): Promise; retryFailed(updatedAt?: string): Promise; retryPendingNow(): 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