import type { PortableTool } from "../portable-tool.js";
export declare const CRON_TOOL_NAME: "cron";
export type CronAction = "create" | "list" | "get" | "update" | "delete" | "pause" | "resume" | "trigger";
export interface CronToolParams {
    action: CronAction;
    /** Job ID (required for get/update/delete/pause/resume/trigger) */
    jobId?: string;
    /** Task prompt to execute on schedule */
    prompt?: string;
    /** Cron expression or shorthand ('5m', '1h', '0 9 * * *') */
    schedule?: string;
    /** Human-readable job name */
    name?: string;
    /** Whether the job is enabled */
    enabled?: boolean;
}
export declare const CRON_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly action: {
            readonly type: "string";
            readonly enum: readonly ["create", "list", "get", "update", "delete", "pause", "resume", "trigger"];
            readonly description: "Workflow-backed action: create/list/get/update/delete/pause/resume/trigger.";
        };
        readonly jobId: {
            readonly type: "string";
            readonly description: "Job ID. Required for get/update/delete/pause/resume/trigger.";
        };
        readonly prompt: {
            readonly type: "string";
            readonly description: "Task prompt to execute on schedule. Required for create.";
        };
        readonly schedule: {
            readonly type: "string";
            readonly description: string;
        };
        readonly name: {
            readonly type: "string";
            readonly description: "Human-readable job name.";
        };
        readonly enabled: {
            readonly type: "boolean";
            readonly description: "Whether the job is enabled (for update).";
        };
    };
    readonly required: readonly ["action"];
};
export interface CronJob {
    id: string;
    name: string;
    prompt: string;
    schedule: string;
    scheduleDisplay: string;
    state: "scheduled" | "paused";
    enabled: boolean;
    nextRunAt?: string;
    lastRunAt?: string;
    lastStatus?: "success" | "error" | null;
}
export interface CronResult {
    success: boolean;
    job?: CronJob;
    jobs?: CronJob[];
    error?: string;
}
/**
 * Host-provided cron scheduler backend.
 * Jobs are persisted locally and survive restarts.
 */
export interface CronToolDeps {
    createJob(params: {
        prompt: string;
        schedule: string;
        name?: string;
        repeat?: number | null;
        allowedTools?: string[];
    }): Promise<CronResult>;
    listJobs(): Promise<CronResult>;
    getJob(jobId: string): Promise<CronResult>;
    updateJob(jobId: string, updates: Partial<{
        prompt: string;
        schedule: string;
        name: string;
        enabled: boolean;
        repeat: number | null;
        allowedTools: string[];
    }>): Promise<CronResult>;
    deleteJob(jobId: string): Promise<CronResult>;
    pauseJob(jobId: string): Promise<CronResult>;
    resumeJob(jobId: string): Promise<CronResult>;
    triggerJob(jobId: string): Promise<CronResult>;
    /** Validate cron schedule expression. Returns error or null. */
    validateSchedule?(schedule: string): string | null;
}
export declare const MAX_CRON_JOBS = 50;
export declare function createCronTool(deps: CronToolDeps): PortableTool<CronToolParams>;
