Interface MeetingBlockEntitlement

Existing block entitlement bound by the host to one immutable block policy version.

interface MeetingBlockEntitlement {
    reserveOnce(input): Promise<ReserveResult>;
    findByRun(runId): Promise<undefined | ReserveResult>;
    forget?(runId): Promise<void>;
    reserve(input): Promise<ReserveResult>;
    revalidate(reservationId): Promise<boolean>;
    revalidateAllowance?(reservationId): Promise<DispatchAllowance>;
    meter(reservationId, seconds): Promise<void>;
    settle(reservationId, billedSeconds): Promise<void>;
    release(reservationId): Promise<void>;
    recordSupplierUsage?(reservationId, usage): Promise<void>;
    checkRun?(runId, phase): Promise<DispatchAllowance>;
    recover?(runId): Promise<void>;
    finalize?(reference, decision): Promise<void>;
}

Hierarchy (view full)

Methods

  • Optional whole-run eviction for in-memory hosts after terminal cleanup and the retention grace. Durable stores omit it to retain their records. Call only after producers have stopped; forgetting removes fences too.

    Parameters

    • runId: string

    Returns Promise<void>

  • Optional. The grant at dispatch, asked before a worker is sent for a run that holds a reservation: a run sent now, a scheduled one, and one whose dispatch is tried again after its bot was found not running. The manager cuts the run's limits.totalMs to the answer's maxSeconds and writes it on the run before the provider sees the run; a refusal, or a grant under the manager's minReservationSeconds, ends the run allowance before any dispatch. When present, revalidate is not asked.

    Parameters

    • reservationId: string

    Returns Promise<DispatchAllowance>

  • Optional. Records what the run's supplier measured (SupplierUsage), apart from the seconds the owner is billed: the cost the run incurred, settled whatever the owner's bill, an unbilled end included. The manager calls it for every report that carries totals, before its terminal and fence checks, and for the totals a provider's usage answers at reconciliation, so it may be called again with the same or older totals: keep the largest of each. A rejection holds back no run (the report that carried the totals is applied, and a run whose worker is gone still ends): the manager keeps the totals in its stores' supplierUsageInbox, when it has one, and calls again with them at the next reconcile. Absent, nothing is recorded, and meter, settle and release behave as they do without it.

    Parameters

    Returns Promise<void>