import type { WorkItemEvent } from './store.js'; /** * Reading the Todo audit trail. * * Appending an event is a write on the work-item table and stays in store.ts * beside the mutations that emit it; querying the trail afterwards is a separate * job with no writers, so it lives here. store.ts re-exports this surface, which * is why no caller had to move with it. * * Nothing here imports a VALUE from store.ts, and the derived-actor names live * here rather than there for that reason: store.ts re-exports this module, so a * value import back the other way would read a constant before it exists. */ /** Everything the trail can say. The vocabulary lives with the reader because * every consumer of an event reads it from here; store.ts re-exports it beside * the append that writes one. */ export type WorkItemEventKind = 'created' | 'child_created' | 'comment_added' | 'comment_edited' | 'comment_deleted' | 'relation_added' | 'relation_removed' | 'label_changed' | 'attachment_added' | 'attachment_removed' | 'metadata_edited' | 'status_change' | 'note' | 'session_linked' | 'approval_requested' | 'approval_decided' | 'verify_result' | 'escalated' | 'claim_rejected' | 'claim_expired' | 'respawn_guard_held' | 'availability_resumed' | 'kept_changed' | 'recovery_classified' | 'recovery_attempted' | 'recovery_exhausted' | 'anomaly_observed'; /** Actor recorded on the reconciler's own derived writes. */ export declare const RECONCILER_ACTOR = "reconciler"; /** The actor a human's own writes carry. An employee is not a human here: the * point of both readers below is that somebody outside the loop decided this. */ export declare const HUMAN_ACTOR = "operator"; /** Actor recorded when a Workflow run reflects its own lifecycle onto its bound * Todo. Derived, not declared: a status a phase set on purpose outranks it. */ export declare const WORKFLOW_RUN_ACTOR = "workflow:run"; /** * Whether the current block was declared by a caller rather than derived from * attempt transport. Historical events without an explicit marker fall back to * actor provenance so existing rows retain their intended meaning. */ export declare function isBlockDeclared(workItemId: string): boolean; /** * Whether the current execution state was explicitly reopened from review. * Inspect the newest transition into `executing` first so an older bounce * cannot outlive a later start or unblock. */ export declare function isReviewBounceDeclared(workItemId: string): boolean; /** * When the operator last moved this Todo himself, or undefined if he never has. * Any event carrying a `to_status` counts — a status change and an escalation * are both him deciding where the item belongs. * * The reconciler reads this as an evidence floor: attempt receipts older than * the decision cannot describe what happened after it. */ export declare function latestHumanStatusMoveAt(workItemId: string): string | undefined; /** List audit trails for several items with one query, oldest-first within * each item. Unknown ids receive an empty entry. */ export declare function listWorkItemEventsForItems(workItemIds: readonly string[]): Map; /** List an item's audit trail, oldest-first (the story reads top-down). */ export declare function listWorkItemEvents(workItemId: string): WorkItemEvent[]; //# sourceMappingURL=event-log.d.ts.map