/** * Ledger Engine — records pipeline outcomes and supports traceability queries. * * Responsibilities (arc42 §5.2.4): * - record(): collect artifacts from a completed pipeline, generate a LedgerEntry, * append to ledger.jsonl (append-only, §8.5 write-tmp + rename). * - query(): filter ledger entries by pipelineId / scope / conclusion / time range. * * Storage: ledger.jsonl — one JSON object per line, append-only. */ import type { LedgerEntry, LedgerFilter, ObjectiveKeyResult, PdcaCycleRecord } from '../types/index.js'; export declare class LedgerEngine { private readonly basePath; private readonly ledgerPath; constructor(basePath: string); /** * Record a pipeline's outcome as a ledger entry. * Reads the pipeline state, collects all stage records and artifacts, * determines conclusion, and appends to ledger.jsonl. * Includes OKR/PDCA data when available (FR-18, AC-18.14). */ record(pipelineId: string, okrData?: { okrTree?: ObjectiveKeyResult[]; krAchievement?: Array<{ krId: string; status: string; achievementPct: number; }>; pdcaCycles?: PdcaCycleRecord[]; }): LedgerEntry; /** * Query ledger entries with optional filters. * Supports: pipelineId, scope, conclusion, since (>=), until (<=). */ query(filter: LedgerFilter): LedgerEntry[]; /** * Append a single entry to ledger.jsonl using §8.5 write-tmp + rename. * Reads existing content, appends the new line, writes to tmp, renames. */ private appendEntry; } //# sourceMappingURL=ledger-engine.d.ts.map