Interface LedgerEntry

One ledger row. Rows are never updated; a verdict is a row of its own that names its candidate.

interface LedgerEntry {
    id: string;
    rowType: "candidate" | "verdict";
    candidateId: string;
    learner: LedgerLearner;
    kind: LearningKind;
    actor: string;
    subject: string;
    before: unknown;
    after: unknown;
    evidence: LedgerEvidence;
    verdict: LedgerVerdict;
    reason: string;
    versions: LedgerVersions;
    sessionId?: string;
    turnUserId?: string;
    prevHash: string;
    seq: number;
    stateDigest?: string;
    createdAt: string;
}

Properties

id: string

A ULID.

rowType: "candidate" | "verdict"
candidateId: string
learner: LedgerLearner
kind: LearningKind
actor: string

operator:<id>, operator:persona, tool:<name>, memory:<writer>, rule:<id>@<version>, gate, user:<id>.

subject: string

A trait name or traits, a trace id or a set's id, a setting's name.

before: unknown
after: unknown
evidence: LedgerEvidence
verdict: LedgerVerdict
reason: string
versions: LedgerVersions
sessionId?: string
turnUserId?: string

On a userId: null row, the explicit id of a second user whose turn it records.

prevHash: string

The hash of the chain's previous row; 64 zeros on the first.

seq: number

The row's place in its chain, from 1.

stateDigest?: string

On a row that changes its subject's stored state, the digest of that state after the change.

createdAt: string