The queue module is optional. Use the pure decide() core when you only need a verdict. Use the queue when you want the common persisted-review pattern: pending items, terminal auto decisions, human actions, and an append-only decision log.
pending_reviewauto_appliedauto_rejectedapprovedrejectededitedsuperseded
edited means a human edited the payload and approved that edited result.
Every action is recorded as a DecisionEvent:
itemId, actor, action, fromStatus, toStatus, note?, at
Auto decisions record events with actor threshold by default. Human methods require an actor string from the caller.
The package ships an in-memory store for tests, demos, and small local flows. Real apps should adapt their own persistence layer by implementing the Store interface/protocol.
The review queue is just:
query(status: [pending_review])
No UI is included. Apps build their own screens on top of pending() and query().
The queue can call onAutoApply, onAutoReject, onApprove, and onReject. Threshold does not perform app effects itself; callbacks are caller-supplied integration points.