/** * EvidenceSet — an ordered group of evidence items pointed at a target. * * Implements `wiki/SharedContracts.md` §1 (vocabulary) and * `wiki/ArchitectureOverview.md` §4.6. * * The set itself is target-shaped: it carries the `(targetType, targetId)` * pair so the binder can answer "give me the EvidenceSet for this form * field" in one call. `activeEvidenceItemId` is the membership of the * set that the UI is currently focused on; cycling Tab/Shift-Tab through * the field's chips updates it. */ import type { EvidenceItemId, EvidenceSetId } from "./ids"; import type { EvidenceTargetType } from "./evidence-link"; export interface EvidenceSet { readonly id: EvidenceSetId; readonly label?: string; /** * Optional target binding. Form-field sets always carry these; ad-hoc * topical sets may leave them undefined. */ readonly targetType?: EvidenceTargetType; readonly targetId?: string; /** * Membership in display order. The binder is free to reorder, but * persistence preserves this order so cycling is deterministic. */ readonly evidenceItemIds: readonly EvidenceItemId[]; /** * The currently active member, or undefined if the set is empty or * no member is yet focused. */ readonly activeEvidenceItemId?: EvidenceItemId; }