Anchorage API reference
    Preparing search index...

    Interface CreateTenantResolverOptions

    interface CreateTenantResolverOptions {
        allowSelfDecision?: SelfDecisionPolicy;
        authenticate: (
            request: Request,
        ) => ApprovalActor | Promise<ApprovalActor | undefined> | undefined;
        buildService: (
            store: TenantBoundApprovalStore,
            actor: ApprovalActor,
        ) => ApprovalService;
        newRunId?: () => string;
        storeFactory: { forTenant(tenantId: string): TenantBoundApprovalStore };
    }
    Index

    Properties

    allowSelfDecision?: SelfDecisionPolicy

    The SoD exemption policy the resolver builds canSelfDecide from — pass the SAME value the host feeds ApprovalService so the display hint can never contradict the server's decide() verdict. Absent => SoD on (canSelfDecide false for every role).

    authenticate: (
        request: Request,
    ) => ApprovalActor | Promise<ApprovalActor | undefined> | undefined

    The host's authenticate seam (bearerActorAuthenticator over a verifier).

    buildService: (
        store: TenantBoundApprovalStore,
        actor: ApprovalActor,
    ) => ApprovalService

    Host-specific service assembly (resumeRun topology, audit sink, SLA defaults) over the request's bound store. Called lazily, at most once per request.

    newRunId?: () => string

    The uuid half of minted runIds. Default: crypto.randomUUID.

    storeFactory: { forTenant(tenantId: string): TenantBoundApprovalStore }

    Store factory (D1 or in-memory) — binds per request, DDL memoized once.