import * as react_jsx_runtime from 'react/jsx-runtime';

type ExecutionTimelineStatus = 'completed' | 'running' | 'failed' | 'pending' | 'skipped';
type ExecutionTimelineMetrics = {
    tokensIn?: number;
    tokensOut?: number;
    costUsd?: number;
    provider?: string;
    model?: string;
};
type ExecutionTimelineEntry = {
    nodeId: string;
    nodeType: string;
    status: ExecutionTimelineStatus;
    startedAt: string | null;
    completedAt: string | null;
    durationMs: number | null;
    inputs?: Record<string, unknown>;
    outputs?: Record<string, unknown>;
    error?: string | null;
    metrics?: ExecutionTimelineMetrics;
};
type ExecutionTimelineLabels = {
    status: string;
    duration: string;
    inputs: string;
    outputs: string;
    error: string;
    started: string;
    completed: string;
    pending: string;
    running: string;
    failed: string;
    skipped: string;
    selectNode: string;
    model: string;
    tokens: string;
    cost: string;
    /** Used as the empty-state heading when `entries` is empty. */
    empty?: string;
};
type ExecutionTimelinePanelProps = {
    entries: ExecutionTimelineEntry[];
    labels: ExecutionTimelineLabels;
    /** When set, drives selection from the parent. Useful when the page
     *  syncs the selection with a URL query param. */
    selectedNodeId?: string;
    onSelect?: (nodeId: string) => void;
};
declare function ExecutionTimelinePanel({ entries, labels, selectedNodeId, onSelect, }: ExecutionTimelinePanelProps): react_jsx_runtime.JSX.Element;

/**
 * Rule editing types.
 *
 * Mirrors the shape the Rust `RuleExecutor`
 * (`lambda-rs/crates/astrlabe-handlers/src/engine/executors/rule.rs`) reads
 * from `astrlabe.agent_rules.condition` + `action`. The UI builder below
 * writes exactly this shape, so round-tripping through the backend is a
 * no-op.
 */
type SimpleComparisonOperator = 'truthy' | 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains';
type RuleConditionOperator = SimpleComparisonOperator | 'regex_match' | 'threshold' | 'time_window' | 'boolean_expression';
type TimeWindow = {
    startHour: number;
    endHour: number;
    startMinute?: number;
    endMinute?: number;
    /** 0 = Sunday, 6 = Saturday. Omit to match every day. */
    daysOfWeek?: number[];
};
/**
 * Canonical rule-condition shape. The executor branches on `operator`,
 * so every form tree ultimately serializes to this.
 */
type RuleCondition = {
    operator: RuleConditionOperator;
    /** Simple operators + regex_match + threshold + time_window */
    field?: string;
    /** Simple operators + threshold */
    value?: string | number | boolean | null;
    /** regex_match */
    pattern?: string;
    /** threshold — which direction `value` is compared in. */
    comparison?: 'gt' | 'gte' | 'lt' | 'lte';
    /** time_window */
    timezone?: string;
    windows?: TimeWindow[];
    /** boolean_expression */
    combinator?: 'and' | 'or';
    operands?: RuleCondition[];
};
type RuleAction = {
    type: string;
    params?: Record<string, unknown>;
};
/** `agent_rules.status` free-form string — keep the UI picker aligned
 *  with the values the engine / audit trail recognizes today. */
declare const RULE_STATUS_OPTIONS: readonly ["draft", "active", "archived"];
type RuleStatus = (typeof RULE_STATUS_OPTIONS)[number];
declare const TIMEZONE_OPTIONS: readonly ["UTC", "America/Sao_Paulo", "America/New_York", "America/Los_Angeles", "Europe/London", "Europe/Lisbon"];

type RuleFormValue = {
    ruleId?: string;
    name: string;
    description?: string;
    enabled: boolean;
    priority: number;
    status?: RuleStatus;
    validFrom?: string | null;
    validUntil?: string | null;
    tags?: string[];
    condition: RuleCondition;
    action: RuleAction;
};
type Props = {
    value: RuleFormValue;
    onChange: (next: RuleFormValue) => void;
};
/**
 * Full-field rule editor used inside the create/edit modal. Composes the
 * visual condition + action builders and exposes the schedule / tagging /
 * lifecycle fields that the `agent_rules` entity has but the old JSON-
 * textarea form never surfaced.
 */
declare function RuleForm({ value, onChange }: Props): react_jsx_runtime.JSX.Element;
declare function defaultRuleForm(): RuleFormValue;

export { type ExecutionTimelineLabels as E, type RuleFormValue as R, TIMEZONE_OPTIONS as T, type RuleCondition as a, type RuleAction as b, type ExecutionTimelineEntry as c, type ExecutionTimelineMetrics as d, ExecutionTimelinePanel as e, type ExecutionTimelinePanelProps as f, type ExecutionTimelineStatus as g, RULE_STATUS_OPTIONS as h, type RuleConditionOperator as i, RuleForm as j, type RuleStatus as k, type TimeWindow as l, defaultRuleForm as m };
