/**
 * Cron-Agent Bridge
 *
 * Connects the CronScheduler's task executor to CodeBuddyAgent instances.
 * Creates an agent instance per job execution, delivers results to channels/webhooks.
 */
import { EventEmitter } from 'events';
import type { CronJob } from '../scheduler/cron-scheduler.js';
export interface BridgeConfig {
    /** Default API key for agent instances */
    apiKey: string;
    /** Default base URL */
    baseURL?: string;
    /** Default model */
    model?: string;
    /** Max tool rounds per job */
    maxToolRounds: number;
    /** Job execution timeout (ms) */
    jobTimeoutMs: number;
}
export interface JobExecutionResult {
    jobId: string;
    runId: string;
    success: boolean;
    output: string;
    duration: number;
    delivered?: boolean;
    deliveryChannel?: string;
}
export declare class CronAgentBridge extends EventEmitter {
    private config;
    private activeJobs;
    constructor(config: BridgeConfig);
    /**
     * Create a task executor function for the CronScheduler
     */
    createTaskExecutor(): (job: CronJob) => Promise<unknown>;
    /**
     * Execute a cron job by creating an agent instance
     */
    executeJob(job: CronJob): Promise<JobExecutionResult>;
    /**
     * Execute a message-type task
     */
    private executeMessageTask;
    /**
     * Execute a tool-type task (via agent message)
     */
    private executeToolTask;
    /**
     * Execute an agent-type task
     */
    private executeAgentTask;
    /**
     * Deliver job result to configured channels
     */
    deliverResult(job: CronJob, output: string): Promise<{
        delivered: boolean;
        channel?: string;
    }>;
    /**
     * Cancel a running job
     */
    cancelJob(jobId: string): boolean;
    /**
     * Get active job count
     */
    getActiveJobCount(): number;
}
export declare function getCronAgentBridge(config?: BridgeConfig): CronAgentBridge;
export declare function resetCronAgentBridge(): void;
