/**
 * Live-status probe for the console Automations section.
 *
 * Reads the harness scheduler (Codex `~/.codex/automations/` or Claude
 * `/schedule`) and emits only `lisa-auto-<project>-` matches with their real
 * cadence. READ-ONLY — never fabricates demo automations; absent or unreadable
 * schedulers resolve to unknown with a reason.
 * @module cli/ui-automations
 */
import type { JsonValue } from "../sync/json-path.js";
import type { ProbeResult, StatusProbe } from "./ui-status.js";
/** Stable probe id consumed by `/api/status` and the Automations section. */
export declare const AUTOMATIONS_PROBE_ID = "automations";
/** One observed automation from a harness scheduler adapter. */
export interface HarnessAutomationObservation {
    readonly automationId: string;
    readonly observedCadence?: string;
    readonly status?: string;
    readonly lastRunAt?: string | null;
}
/** One automation entry shipped to the console (never invented). */
export interface HarnessAutomationEntry {
    readonly [key: string]: JsonValue;
    readonly id: string;
    readonly cadence: string | null;
    readonly runtime: "codex" | "claude";
    readonly status: string | null;
    readonly lastRunAt: string | null;
}
/** Structured value emitted when the scheduler is readable. */
export type AutomationsProbeValue = {
    readonly [key: string]: JsonValue;
    readonly prefix: string;
    readonly runtime: "codex" | "claude";
    /** Prefix-matching automations; typed as JsonValue[] for the probe transport. */
    readonly automations: JsonValue[];
};
/** Resolved Lisa automation naming identity for the current project. */
export interface AutomationProjectIdentity {
    readonly owner: string;
    readonly repo: string;
    readonly project: string;
    readonly automationPrefix: string;
}
/** Resolve `lisa-auto-<project>-` for the served project root. */
export type ProjectIdentityResolver = (cwd: string, signal: AbortSignal) => Promise<AutomationProjectIdentity>;
/** List Codex automations matching a prefix (adapter seam). */
export type CodexAutomationLister = (input: {
    readonly automationsDir?: string;
    readonly automationPrefix: string;
    readonly signal?: AbortSignal;
}) => Promise<readonly HarnessAutomationObservation[]>;
/** List Claude `/schedule` automations matching a prefix (adapter seam). */
export type ClaudeAutomationLister = (input: {
    readonly scheduleListing: unknown;
    readonly automationPrefix: string;
}) => readonly HarnessAutomationObservation[];
/** Read the Claude `/schedule` listing when the runtime can expose it. */
export type ClaudeScheduleListingReader = (signal: AbortSignal) => Promise<unknown | null>;
/** Whether the Codex automations directory exists and is readable. */
export type CodexDirReadableCheck = (automationsDir: string, signal: AbortSignal) => Promise<boolean>;
/** Injectable collaborators for focused tests and default runtime wiring. */
export interface AutomationsProbeDependencies {
    readonly cwd: string;
    readonly automationsDir?: string;
    readonly resolveIdentity?: ProjectIdentityResolver;
    readonly listCodexAutomations?: CodexAutomationLister;
    readonly listClaudeAutomations?: ClaudeAutomationLister;
    readonly readClaudeScheduleListing?: ClaudeScheduleListingReader;
    readonly codexAutomationsDirReadable?: CodexDirReadableCheck;
}
/** Inputs for {@link mapHarnessAutomations}. */
export interface MapHarnessAutomationsInput {
    readonly prefix: string;
    readonly runtime: "codex" | "claude";
    readonly observations: readonly HarnessAutomationObservation[];
}
/**
 * Map scheduler observations onto the live-status tri-state contract.
 * @param input - Prefix, runtime label, and raw observations
 * @returns Probe value with only prefix-matching automations
 */
export declare function mapHarnessAutomations(input: MapHarnessAutomationsInput): ProbeResult<AutomationsProbeValue>;
/**
 * Create the Automations live-status probe.
 * @param dependencies - Project root plus injectable scheduler seams
 * @returns Probe registered under {@link AUTOMATIONS_PROBE_ID}
 */
export declare function createAutomationsProbe(dependencies: AutomationsProbeDependencies): StatusProbe<AutomationsProbeValue>;
//# sourceMappingURL=ui-automations.d.ts.map