/**
 * @fileoverview Pure, framework-agnostic helpers for the Knowledge Hub
 * **Scheduling** resource component's AI-agent integration.
 *
 * Free of Angular / component dependencies so they can be unit-tested in
 * isolation. The component supplies plain snapshots of its job + run state and
 * these helpers shape the deep agent context + resolve agent-supplied job
 * references (by id → name → contains).
 *
 * 🔒 SAFETY: these helpers only PROJECT state and RESOLVE references — no
 * mutation, no side effects.
 */
/** The status values a scheduled job can hold (the FilterSchedulesByStatus tool's domain). */
export declare const VALID_SCHEDULE_STATUSES: readonly ["Active", "Paused", "Disabled"];
export type ScheduleStatus = (typeof VALID_SCHEDULE_STATUSES)[number];
/**
 * The salient slice of a scheduled job the agent reasons over. Structurally a
 * subset of `MJScheduledJobEntity` so the component can pass its jobs in.
 */
export interface ScheduledJobCandidate {
    ID: string;
    Name: string;
    Description?: string | null;
    Status: string;
    CronExpression?: string | null;
    NextRunAt?: Date | string | null;
    LastRunAt?: Date | string | null;
    RunCount?: number;
    SuccessCount?: number;
}
/**
 * Resolve a job reference the way the agent expresses it — by id (exact,
 * case-insensitive) → name (exact, case-insensitive) → name *contains*
 * (case-insensitive). Pure + deterministic.
 *
 * @returns the matched job, or null on a miss.
 */
export declare function resolveScheduledJob<T extends {
    ID: string;
    Name: string;
}>(input: string, jobs: readonly T[]): T | null;
/** Build a tolerant "no schedule matches" error listing a bounded sample of names. */
export declare function buildScheduleNotFoundError(input: string, available: readonly string[]): string;
/** Component-supplied snapshot for the Scheduling agent context. */
export interface SchedulingAgentContextInput {
    /** Every scheduled job (unfiltered). */
    AllJobs: ScheduledJobCandidate[];
    /** Jobs after the status + search filters — what the cards render. */
    FilteredJobs: ScheduledJobCandidate[];
    /** The active status filter ('' = All). */
    StatusFilter: string;
    /** The active search query. */
    SearchQuery: string;
    /** Recent run rows (newest first) — drives RecentRunCount + the next-due rollup. */
    RecentRunCount: number;
    /** Whether the surface is mid-load. */
    IsLoading: boolean;
}
/**
 * Find the name of the job that is due next, scanning `NextRunAt` for the
 * smallest future-or-now timestamp. Returns null when no job has a NextRunAt.
 * Pure + deterministic.
 */
export declare function nextDueJobName(jobs: readonly ScheduledJobCandidate[]): string | null;
/**
 * Build the agent-visible context for the Scheduling surface. Publishes deep
 * counts (by lifecycle status), the active status filter + search, the next-due
 * job, and a **bounded** structured list of the filtered jobs (name · status ·
 * cron · success rate) so the agent can pick one to edit/open. A companion
 * truncation flag tells it when the list is capped.
 */
export declare function buildSchedulingAgentContext(input: SchedulingAgentContextInput): Record<string, unknown>;
//# sourceMappingURL=scheduling-agent-context.d.ts.map