import type { Action, AgentContext, Provider } from "../types/components";
import type { Memory } from "../types/memory";
import type { State } from "../types/state";
export declare const AVAILABLE_CONTEXTS_STATE_KEY = "availableContexts";
export declare const CONTEXT_ROUTING_METADATA_KEY = "__responseContext";
export declare const CONTEXT_ROUTING_STATE_KEY = "__contextRouting";
export interface ContextRoutingDecision {
    primaryContext?: AgentContext;
    secondaryContexts?: AgentContext[];
    evidenceTurnIds?: string[];
}
export declare function parseContextList(value: unknown): AgentContext[];
export declare function parseContextRoutingMetadata(raw: unknown): ContextRoutingDecision;
export declare function getContextRoutingFromState(state: State | null | undefined): ContextRoutingDecision;
export declare function getContextRoutingFromMessage(message: Memory): ContextRoutingDecision;
export declare function mergeContextRouting(state: State | null | undefined, message: Memory): ContextRoutingDecision;
export declare function getActiveRoutingContexts(routing: ContextRoutingDecision): AgentContext[];
export declare function shouldIncludeByContext(declaredContexts: AgentContext[] | undefined, activeContexts: AgentContext[] | undefined): boolean;
export declare function setContextRoutingMetadata(message: Memory, routing: ContextRoutingDecision): void;
export declare function deriveAvailableContexts(actions: Action[], providers: Provider[]): AgentContext[];
export declare function attachAvailableContexts(state: State, runtime: {
    actions: Action[];
    providers: Provider[];
}): State;
//# sourceMappingURL=context-routing.d.ts.map