/** * CandidateIntakeService — consumes pending candidates and writes ledger entries. * * Workflow: * 1. Validate input * 2. Check idempotency (existsForCandidate) — O(1) lookup * 3. Load candidate from DB (RuntimeStateManager) * 4. Load artifact from DB and parse recommendation * 5. Build 11-field LedgerPrincipleEntry * 6. Write via adapter.writeProbationEntry() * * On error: candidate stays `pending`, throws CandidateIntakeError. * Idempotent: if adapter already has entry for candidate, returns it (no-op). * * Non-goals (M7): * - No DB status update to 'consumed' (m7-04 CLI handler does that) * - No promotion to active principle (M8+) * - No pain signal bridge */ import type { LedgerAdapter, LedgerPrincipleEntry } from './candidate-intake.js'; import type { RuntimeStateManager } from './store/runtime-state-manager.js'; export interface CandidateIntakeServiceOptions { stateManager: RuntimeStateManager; ledgerAdapter: LedgerAdapter; } export declare class CandidateIntakeService { #private; constructor(opts: CandidateIntakeServiceOptions); /** * Consume a pending candidate: load it and its artifact, build a * LedgerPrincipleEntry, and write it to the ledger via the adapter. * * @param candidateId - The candidate ID to intake. * @returns The written (or existing) LedgerPrincipleEntry. * @throws CandidateIntakeError with code: * - INPUT_INVALID when candidateId is empty/invalid * - CANDIDATE_NOT_FOUND when candidate does not exist * - ARTIFACT_NOT_FOUND when artifact is missing or unreadable * - LEDGER_WRITE_FAILED when ledger write fails */ intake(candidateId: string): Promise; } //# sourceMappingURL=candidate-intake-service.d.ts.map