/** * Real-time message steering (Python parity: `Agent(message_steering=...)`, * `agent/message_steering.py` `MessageSteering` / `SteeringMixin`, * `agent/protocols.py` `SteeringPriority` / `MessageSteeringProtocol`). * * Someone watching an agent work can send it guidance without cancelling the * run: `agent.steer("check the staging config first")`. The note is queued by * priority and folded into the next turn's prompt, with wording that tells the * model how urgently to act on it. * * Priority matters and is preserved end to end. An INTERRUPT that arrives as * ordinary "consider this feedback" guidance is worse than no steering at * all: the operator believes they stopped the agent, and it carried on. */ /** Python `SteeringPriority`. */ export declare enum SteeringPriority { LOW = 1, NORMAL = 5, HIGH = 10, URGENT = 20, INTERRUPT = 30 } /** Python `SteeringMessage`. */ export interface SteeringMessage { content: string; priority: SteeringPriority; metadata?: Record; } /** The interface an Agent needs from a steering implementation. */ export interface MessageSteeringProtocol { readonly enabled: boolean; queueMessage(message: string, priority?: number): string; /** Every pending message, highest priority first, removing them from the queue. */ drain(): SteeringMessage[]; hasPendingMessages(): boolean; clearMessages(): number; enable(): void; disable(): void; } /** Python's priority-aware wording, shared by every injection path. */ export declare function formatSteeringNote(content: string, priority: SteeringPriority): string; /** * The built-in implementation: a bounded priority queue (Python * `AgentMessageQueue`, default 50 messages). */ export declare class MessageSteering implements MessageSteeringProtocol { readonly maxMessages: number; private queue; private _enabled; private counter; constructor(maxMessages?: number); get enabled(): boolean; queueMessage(message: string, priority?: number): string; /** * Take every pending message, highest priority first. Python drains one per * check pre-turn and all of them mid-run; taking them all at the one * injection point this SDK has means a queued note is never left behind * while the agent answers without it. */ drain(): SteeringMessage[]; hasPendingMessages(): boolean; clearMessages(): number; enable(): void; disable(): void; } /** * Resolve the constructor option: `true` for the built-in implementation, a * custom object implementing the protocol, or `undefined` when off * (Python `SteeringMixin._init_message_steering`). */ export declare function resolveMessageSteering(input: boolean | Record | undefined | null): MessageSteeringProtocol | undefined; /** The block appended to a prompt for the drained messages, or '' when there are none. */ export declare function steeringNotesFor(messages: readonly SteeringMessage[]): string;