import type { StructuredStore, VectorStore, EmbeddingProvider, LLMProvider, Scheduler, JobQueue, Logger, Scopes } from '@kybernesis/arcana-contracts'; import { type SleepConfig } from './config.js'; /** * KB's 10 sleep steps in execution order — ported per ADR 011 (port-first). * * Deferred to v2 sleep (Arcana-invented, not present in KB's pipeline): * collectCandidates, ingestionValidation, extractFacts-in-sleep, * detectContradictions, computeSurprisal * See docs/decisions/011-port-first-improve-later.md. */ export declare const SLEEP_STEPS: readonly ["decayMemories", "refreshTags", "consolidateMemories", "linkMemories", "tierMemories", "summarizeMemories", "observeConversations", "rebuildUserProfile", "runReasoning", "cleanEntityGraph"]; export type SleepStep = (typeof SLEEP_STEPS)[number]; export interface SleepRunInput { scopes?: Scopes; /** Run only these steps (default: all). */ steps?: SleepStep[]; resume?: boolean; } export interface SleepRunResult { startedAt: string; finishedAt: string; stepsRun: SleepStep[]; candidatesProcessed: number; /** * v1.2.0 — steps that completed with non-empty `errors[]`. They are * checkpointed as 'partial' and will be re-attempted on the next * `runSleepPipeline({resume: true})` call. Empty array means a fully * clean run. */ partialSteps: SleepStep[]; } export interface MaintainDeps { structured: StructuredStore; vector: VectorStore; embed: EmbeddingProvider; llm: LLMProvider; scheduler: Scheduler; queue: JobQueue; logger: Logger; } export interface MaintainApi { runSleepPipeline(input?: SleepRunInput): Promise; startSleepSchedule(intervalMs: number): Promise; stopSleepSchedule(): Promise; } export declare function createMaintain(deps: MaintainDeps, configOverride?: Partial): MaintainApi; //# sourceMappingURL=index.d.ts.map