/** * PrincipleTreeLedgerAdapter — bridges LedgerAdapter interface to principle-tree-ledger.ts. * * Lives in principles-core/runtime-v2 so pd-cli can use the same adapter * as openclaw-plugin without depending on openclaw-plugin private code. */ import type { LedgerAdapter, LedgerPrincipleEntry } from '../candidate-intake.js'; /** * PrincipleTreeLedgerAdapter — bridges 11-field LedgerPrincipleEntry to ledger file. * * Maintains an in-memory idempotency map. Create once and reuse * across calls within the same process lifetime. */ export declare class PrincipleTreeLedgerAdapter implements LedgerAdapter { #private; constructor(opts: { stateDir: string; }); writeProbationEntry(entry: LedgerPrincipleEntry): LedgerPrincipleEntry; existsForCandidate(candidateId: string): LedgerPrincipleEntry | null; /** * Owner Decision Experience v1 Phase A (§9.1): plural ledger lookup for * identity binding. Governance publication requires a UNIQUE ledger target — * `existsForCandidate` intentionally returns the first match (legacy intake * idempotency semantics), which cannot distinguish "exactly one" from * "several". Returns every ledger principle referencing the candidate. */ listForCandidate(candidateId: string): { id: string; }[]; /** * Owner Decision Experience v1 Phase A (§9.1): presence check by principle * id. A pre-existing artifact binding is only trusted when its target is a * real ledger principle ("验证目标确实存在"). */ hasPrinciple(principleId: string): boolean; /** * Bug-O L3 fix: upgrade a ledger principle's status to 'active' after the * corresponding approval+activation has been dispatched successfully. * * Called by ApprovalsConsoleModel.approve() after the activation is written * to SQLite. Returns ok:false (not throw) when the principle is missing or * the update fails, so the caller can surface a non-fatal warning without * rolling back the already-committed activation (rc-9-no-silent-fallback). */ activatePrinciple(principleId: string): { ok: true; } | { ok: false; reason: string; }; } //# sourceMappingURL=principle-tree-ledger-adapter.d.ts.map