Anchorage API reference
    Preparing search index...

    Options for the cron-owned SLA sweep.

    interface SweepSLAOptions {
        audit?: ApprovalAuditSink;
        notify?: ApprovalNotificationSink;
        now?: () => Date;
        onEscalation?: (record: ApprovalRecord) => void;
        stream?: ApprovalStreamSink;
        systemPrincipal: AutomatedExecutionPrincipal;
    }
    Index

    Properties

    Notification transport seam — fired once per escalated record, alongside (not instead of) onEscalation: onEscalation is the hosts' structured-log hook, notify is the reviewer-facing transport. Same containment as ApprovalServiceOptions.notify: failures audit as approval.notify/'error' and never abort the sweep.

    now?: () => Date

    Injectable clock (tests, deterministic SLA math).

    onEscalation?: (record: ApprovalRecord) => void

    Fired for each record escalated.

    Live-stream fan-out seam — fired once per escalated record, alongside onEscalation and notify. Same containment as ApprovalServiceOptions.stream: a throwing or rejecting sink is audited as approval.stream/'error' and never aborts the sweep. A scheduled handler has no request-scoped waitUntil, so the cron host collects each publish into its pendingSends and awaits it there (see host-kit's runSlaSweepMaintenance) — never fire-and-forget under scheduled().

    Attribution identity for audit events (e.g. the worker's system actor). Attribution only — the sweep runs inside the trusted computing base (cron), so there is no role check: the TYPE of the store argument is the authorization (a SystemApprovalStore is unobtainable from request scope).

    Automated kinds only, and REFUSED at runtime as well: a human here would stamp principalKind: 'human' onto cross-tenant cron escalations, which is the synthetic operator this whole model exists to remove.