Anchorage API reference
    Preparing search index...
    interface ThreadSignalRoutesOptions {
        consultRunCap?: RunCapConsult;
        resolveAgent: (
            scope: ThreadScope,
            agentId: string | undefined,
            entryPath:
                | "approval.resume"
                | "http.start"
                | "signal.message"
                | "signal.queue"
                | "signal.reactive"
                | "signal.state"
                | "signal.notification"
                | "signal.wake"
                | "notification.dispatch"
                | "schedule.fire",
        ) => | Agent<
            string,
            ToolsInput,
            undefined,
            unknown,
            AgentEditorConfig
            | undefined,
        >
        | Promise<
            Agent<
                string,
                ToolsInput,
                undefined,
                unknown,
                AgentEditorConfig
                | undefined,
            >,
        >;
        resolveNotificationsStorage?: (
            scope: ThreadScope,
        ) => NotificationsStorage | Promise<NotificationsStorage>;
        resolveResourceId?: (scope: ThreadScope) => string | undefined;
        startIdleRun?: StartIdleRun;
    }
    Index

    Properties

    consultRunCap?: RunCapConsult

    Run-cap seam for idle-thread wakes. Absent means wakes are unmetered.

    resolveAgent: (
        scope: ThreadScope,
        agentId: string | undefined,
        entryPath:
            | "approval.resume"
            | "http.start"
            | "signal.message"
            | "signal.queue"
            | "signal.reactive"
            | "signal.state"
            | "signal.notification"
            | "signal.wake"
            | "notification.dispatch"
            | "schedule.fire",
    ) => | Agent<
        string,
        ToolsInput,
        undefined,
        unknown,
        AgentEditorConfig
        | undefined,
    >
    | Promise<
        Agent<
            string,
            ToolsInput,
            undefined,
            unknown,
            AgentEditorConfig
            | undefined,
        >,
    >

    The per-thread agent whose public signal methods these routes drive. Built once per DO instance by the host (its model/memory/tools are the host's concern); these routes only need its identity and pubsub. The scope carries the asserted tenant so a host can refuse to build an agent for a thread it does not recognize.

    MUST be a runtime-driven durable agent for an idle wake. The host-provided startIdleRun seam starts it through RunnerRuntime with a topology-minted, tenant-salted run id. Without either requirement, wake degrades to durable persistence and never escapes onto core's default execution engine. Trusted notification dispatch supplies the persisted agent id; other routes pass undefined.

    resolveNotificationsStorage?: (
        scope: ThreadScope,
    ) => NotificationsStorage | Promise<NotificationsStorage>

    Durable inbox used by the trusted due-notification dispatch route.

    resolveResourceId?: (scope: ThreadScope) => string | undefined

    The thread's tenant-owned memory resourceId — part of core's (resourceId, threadId) signal key, so it MUST match whatever the loop registered under or a send never finds the active run. Server-derived (a memory id is TCB-only — never a client field); the host mints it from the authenticated tenant. Absent ⇒ threadId-only keying (resourceId ''), which is consistent within this DO but only interoperates with a loop that also omits it — the binding expected by the registered durable run.

    startIdleRun?: StartIdleRun

    Runtime-driven start seam. Absent wakes degrade to durable persistence.