weasel API - v0.8.0
    Preparing search index...

    Interface DispatcherContext

    interface DispatcherContext {
        actions: ActionsRegistry;
        activeToolId: string;
        ambientToolIds?: readonly string[];
        depRegistry: DepRegistry;
        getRuleCtx?: () => RuleCtx;
        hotkeyStack: readonly string[];
        isMac: boolean;
        toolsById: ReadonlyMap<string, Tool<unknown>>;
    }
    Index

    Properties

    All registered actions; the dispatcher walks .defaultBinding for ambient bindings.

    activeToolId: string

    Active tool's id (from ActiveToolContext).

    ambientToolIds?: readonly string[]

    Ids of always-on tools. Their bindings are assembled at AMBIENT scope, so they lose to the active tool on a tie — which is what "always listening, never in the way" needs. Chrome that floats over the scene lives here: @weasel-js/hud's tool is the worked example.

    Without this an ambient tool's bindings were assembled nowhere at all: the walk covered hotkey and active tools plus actions' defaultBinding, and an ambient tool is in neither set.

    depRegistry: DepRegistry

    Dep sources keyed by name.

    getRuleCtx?: () => RuleCtx

    Thunk returning a fresh RuleCtx for the current frame. When supplied, the dispatcher filters matched candidates by their declared Action.eligible rule (omitted => always eligible). When omitted, no eligibility filtering is applied — preserves backward compatibility for callers (tests, legacy harnesses) that don't wire up chrome-caps state.

    hotkeyStack: readonly string[]

    Held-hotkey stack, top of stack last.

    isMac: boolean

    Platform flag for mod shorthand resolution.

    toolsById: ReadonlyMap<string, Tool<unknown>>

    Lookup for tool definitions.