import type { InboxItem, RelayMessaging } from '../messaging/index.js';
import type { InjectionContext, InjectionResult, MessageDeliveryTarget } from './types.js';
import type { MessageContext } from '../session/index.js';
export type DeliveryRunnerContext = Partial<Omit<InjectionContext, 'reason' | 'mode'> & Omit<MessageContext, 'reason' | 'mode'>> & {
    reason?: InjectionContext['reason'] | MessageContext['reason'];
    mode?: InjectionContext['mode'] | MessageContext['mode'];
};
export interface DeliveryRunnerOptions {
    messaging: RelayMessaging;
    delivery: MessageDeliveryTarget;
    agentName?: string;
    context?: DeliveryRunnerContext;
    onResult?: (item: InboxItem, result: InjectionResult) => void | Promise<void>;
    onError?: (item: InboxItem, error: unknown) => void | Promise<void>;
}
export declare class DeliveryRunner {
    private readonly options;
    private stopped;
    private running?;
    constructor(options: DeliveryRunnerOptions);
    start(): Promise<void>;
    stop(): void;
    private run;
    private deliver;
}
//# sourceMappingURL=runner.d.ts.map