/** * memory-dream-run — Task 327 (+ Task 391 prune-revisions phase). * * Operator-initiated dream-cycle orchestrator. Runs the configured phases * in fixed order with failure isolation: any phase that throws is logged * `[dream-cycle:phase-:error]` and added to the run report, but * subsequent phases still execute. * * The `phases` parameter selects a subset (e.g. `[4]` for a citation-only * sweep after a bulk ingest). It does NOT reorder — the order is fixed. * * Phase 4 reads the resume cursor from the most-recent `:Report` (keyword * "dream-cycle") via a direct property read (`lastEventCursor`), and writes * its own next-cursor onto this run's :Report via a post-write Cypher SET. * The cursor lives as a direct property on :Report rather than via a * writer-side `extra` field because the canonical `memory-report-write` * (Task 332) does not accept arbitrary payload. Subsequent invocations * resume after the stored id so a populated graph drains gradually rather * than running unbounded LLM calls on every invocation. * * Phase 5 (Task 391) prunes `:CompiledTruthRevision` rows down to the * newest 20 per entity. Phase 6 (Task 596) materialises persistent * `:BACKLINKS` edges from `:MENTIONS`/`:REFERENCES`. Phase 7 (Task 596) * normalises `tags[]` arrays on `:KnowledgeDocument` nodes and merges * `:DefinedTerm {category:'obsidian-tag'}` variants. The `phases` schema * accepts 1..7; values outside that range are rejected by zod at the MCP * boundary. */ import type { PhaseResult, PhaseError } from "../lib/dream-cycle/index.js"; export interface MemoryDreamRunParams { accountId: string; /** Operator identifier — appears in the `[dream-cycle] started` log line. */ operatorId?: string; /** Which phases to run. Defaults to [1, 2, 3, 4]. */ phases?: number[]; /** Phase 4 cap. Defaults to 200. */ maxEventsPerRun?: number; } export interface MemoryDreamRunResult { reportId: string; phasesRun: number[]; phaseResults: PhaseResult[]; phaseErrors: PhaseError[]; durationSec: number; partial: boolean; } export declare function memoryDreamRun(params: MemoryDreamRunParams): Promise; //# sourceMappingURL=memory-dream-run.d.ts.map