Anchorage API reference
    Preparing search index...
    interface ThreadAgentHostOptions {
        approvalService: (scope: AgentThreadInstanceScope) => ApprovalService;
        audit?: ApprovalAuditSink;
        authorizeAutomatedEntry?: AutomatedEntryAuthorizer;
        buildModules:
            | ((scope: AgentThreadInstanceScope) => readonly AgentModule[])
            | ((scope: AgentThreadInstanceScope) => Promise<readonly AgentModule[]>);
        cache?: false | MastraServerCache;
        discardScheduleDispatch?: (
            scheduleId: string,
            dispatchId: string,
            runId: string,
        ) => Promise<void>;
        resolvePrincipalPermissions?: PrincipalPermissionResolver;
        resourceAccess: () => RecoverableResourceOwnershipStore;
        scheduleSource?: () => ScheduleSourceStore;
        stateStorage: () => AgentThreadStateStorage;
        storage: (scope: AgentThreadInstanceScope) => MastraCompositeStore;
        systemPrincipalId?: string;
    }
    Index

    Properties

    approvalService: (scope: AgentThreadInstanceScope) => ApprovalService
    authorizeAutomatedEntry?: AutomatedEntryAuthorizer

    Narrows automated entry beyond what each agent's metadata declares.

    buildModules:
        | ((scope: AgentThreadInstanceScope) => readonly AgentModule[])
        | ((scope: AgentThreadInstanceScope) => Promise<readonly AgentModule[]>)
    cache?: false | MastraServerCache
    discardScheduleDispatch?: (
        scheduleId: string,
        dispatchId: string,
        runId: string,
    ) => Promise<void>

    Authoritatively discard an executing or same-run settled dispatch.

    resolvePrincipalPermissions?: PrincipalPermissionResolver

    Server-owned principal-to-permission resolver. Required by any catalog agent that declares requiredPermissions — such an agent fails closed when this seam is absent. When configured, it runs on EVERY authorized entry and its resolution is projected into the run's derived request context as breakwater.principalPermissions, which is what a connector declaring requiredPermissions enforces against.

    resourceAccess: () => RecoverableResourceOwnershipStore

    Deployment registry used to atomically bind thread/resource/run ids.

    scheduleSource?: () => ScheduleSourceStore

    Existing schedules domain used to verify schedule.fire target provenance.

    stateStorage: () => AgentThreadStateStorage
    storage: (scope: AgentThreadInstanceScope) => MastraCompositeStore
    systemPrincipalId?: string