0xBUFF / retention

API reference

Look up all seven public operations and exported types.

Import from @0xbuff/retention. The root exports seven synchronous operations and their contract types; internal paths are not public.

OperationResult
validatePolicy(policy)Validated policy
validateEvents(scopeId, events)Validated distinct events
rebuildReview(policy, scopeId, events, nowMs)Complete review result
advanceReview(policy, scopeId, identity, prior, appended, nowMs)Rebuilt review after prefix verification
evaluateReadiness(policy, scopeId, conceptId, events, nowMs)Candidate projection or null
scheduleDue(policy, scopeId, review, nowMs, relations?, limit?)Ranked due recommendations
explainReview(review)Structured practice, candidate and lifecycle reasons

Inputs are inert JSON data. Every operation returns Result<T>: either { ok: true, value } or { ok: false, errors }. Treat errors as stable codes and safe field names, not user-facing prose. Operations that need the current time require an explicit clock. A successful result does not authenticate evidence.

Guides

See policies, events, replay and due ranking for the input shapes, failure semantics and bounds.

Public types

AreaTypes
EventsCreditControl, CreditedDecisionCorrection, CreditedDecisionRevocation, CreditedEvidence, CreditedOutcome, DeletionControl, EligibleCreditedRetrieval, PracticeObservation, PracticeOutcome, ReviewControl, ReviewEvent, ReviewEventDeletion, ReviewObservation, ReviewScopeDeletion
PoliciesCalendarProfile, CalendarTransition, EligibilityPolicy, Policy, PriorityWeights, SchedulingPolicy
PriorityConceptRelation, DueRecommendation, PriorityFeatures, PriorityReason
ProjectionsCandidateProjection, CandidateReadiness, ConceptExplanation, ConceptProjection, PracticeProjection, PracticeReadiness, ProjectionIdentity, ReasonCode, RecommendationKind, ReviewExplanation, ReviewReason, ReviewResult, ScheduleState
ResultsDiagnostic, ErrorCode, Result
VersionsAlgorithmVersion, SchemaVersion

The v0.0.2 root entry defines the export list. Installed declarations give the exact signatures. See contracts for diagnostics and resource limits.

On this page