Class DemoRunCapability

One-run authority under an immutable host policy; never a paid credential or dispatch entitlement.

Constructors

Methods

  • Issues a short-lived, visitor-and-address-bound start nonce; no run or spend is admitted yet.

    Parameters

    • visitor: string
    • address: string

    Returns Promise<string>

  • Consumes exactly once and reserves the remaining connected-time allowance. The host uses operationId as the prepared manager request's idempotency key. Browser retries never recover through a nonce.

    Parameters

    • nonce: string
    • visitor: string
    • address: string

    Returns Promise<{
        operationId: string;
        stopAt: number;
    }>

  • Trusted preparation/recovery only, never a browser route. Binds one manager run and rotates the hash on response-loss recovery. Must run under the same host owner lock as cleanup and dispatch. The host checks the remaining stopAt deadline before scheduling; issuance never extends it.

    Parameters

    • operationId: string
    • runId: string

    Returns Promise<DemoCredential>

  • Mediates one bounded read/delivery, including every streamed event. Call assertCurrent immediately before writing output. Never retain the binding or enqueue a send after the callback returns. Transport adapters must positively cancel blocked output before releasing their transaction.

    Type Parameters

    • T

    Parameters

    • authInput: DemoAuth
    • operation: "read-status" | "read-events" | "read-usage"
    • consume: ((binding, assertCurrent) => Promise<T>)
        • (binding, assertCurrent): Promise<T>
        • Parameters

          Returns Promise<T>

    Returns Promise<T>