/**
 * @fileoverview Pure helpers for the Autotagging / Classify Pipeline dashboard's AI-agent
 * integration.
 *
 * Framework-agnostic so they can be unit-tested in isolation. The component
 * ({@link AutotaggingPipelineResourceComponent}) supplies a plain snapshot of its current state
 * and these helpers shape it into the `AgentContext` object flowing to the async chat agent and
 * the realtime co-agent via `NavigationService.SetAgentContext`, plus the id/name resolution
 * backing the surface's client tools.
 *
 * 🔒 SAFETY: shape + resolve only, no mutation. The component's tool layer decides what's exposed
 * (idempotent refresh + tab-switch + filter/search/select/open are safe; RunPipeline /
 * pause/resume/cancel / confirm-dismiss-duplicate are gated — they have real side effects).
 */
/** Upper bound on how many names we publish in a name-list context field. */
export declare const AUTOTAG_AGENT_CONTEXT_NAME_LIST_CAP = 25;
/** The tabs the Classify dashboard supports (used by SwitchClassifyTab). */
export declare const AUTOTAG_TABS: readonly ["pipeline", "sources", "types", "tags", "taxonomy", "inbox", "health", "history"];
export type AutotagTab = (typeof AUTOTAG_TABS)[number];
/**
 * Cap an array of names to {@link AUTOTAG_AGENT_CONTEXT_NAME_LIST_CAP} entries.
 * Pure + deterministic; never mutates the input.
 */
export declare function capAutotagNames(names: readonly string[]): string[];
/** Type-guard for a Classify tab string — keeps SwitchClassifyTab tolerant of arbitrary input. */
export declare function isValidAutotagTab(tab: unknown): tab is AutotagTab;
/**
 * A minimal id/name-bearing record descriptor the component supplies so the pure resolver can
 * match agent input (a content source, content item, etc.).
 */
export interface AutotagRecordCandidate {
    ID: string;
    Name: string;
}
/** Outcome of {@link resolveAutotagRecord}: the matched record, or a tolerant error. */
export type AutotagResolveResult<T> = {
    ok: true;
    value: T;
} | {
    ok: false;
    error: string;
};
/**
 * Resolve an agent-supplied reference to one of the candidate records. Tries, in order
 * (all case-insensitive, trimmed):
 *   1. exact ID
 *   2. exact Name
 *   3. partial (contains) match on Name
 *
 * Pure + deterministic. Returns a tolerant "available names" error on a miss (never throws).
 */
export declare function resolveAutotagRecord<T extends AutotagRecordCandidate>(input: string, candidates: readonly T[]): AutotagResolveResult<T>;
/** Build a tolerant "not found" error listing a bounded sample of available names. */
export declare function buildAutotagNotFoundError(input: string, availableNames: readonly string[]): string;
/**
 * The plain, component-supplied snapshot used to build the autotagging agent context.
 */
export interface AutotagAgentContextInput {
    /** Active Classify tab. */
    ActiveTab: AutotagTab;
    /** Number of content sources loaded. */
    SourceCount: number;
    /** Number of content items loaded (capped by page size in the grid). */
    ContentItemCount: number;
    /** True total content-item count from the DB (TotalRowCount). */
    TotalContentItemCount: number;
    /** Number of content-item tags loaded. */
    TagCount: number;
    /** True total tag count from the DB. */
    TotalContentTagCount: number;
    /** Number of content types loaded. */
    ContentTypeCount: number;
    /** Number of run-history rows loaded. */
    RunHistoryCount: number;
    /** Whether the pipeline is currently running. */
    IsRunning: boolean;
    /** Whether a running pipeline is paused. */
    IsPaused: boolean;
    /** Pipeline progress 0-100 (meaningful only while running). */
    PipelineProgress: number;
    /** Current pipeline stage label (meaningful only while running). */
    PipelineStage: string;
    /** Whether the pipeline-config widget is expanded. */
    ShowPipelineConfig: boolean;
    /** Pending tag-suggestion count (inbox badge). */
    InboxPendingCount: number;
    /** Pending health-signal count (health badge). */
    HealthPendingCount: number;
    /** Names of the content sources available (the Filter/Select/OpenSource targets). */
    SourceNames: string[];
    /** Names of the content types available. */
    ContentTypeNames: string[];
}
/**
 * Build the agent-visible context object for the Autotagging / Classify dashboard.
 *
 * Reports the active tab, the source/item/tag/type/run counts (with true DB totals), the live
 * pipeline status + progress + stage, the inbox/health pending badges, and bounded lists of
 * source + content-type names the safe filter/select/open tools can target. Pure function.
 */
export declare function buildAutotagAgentContext(input: AutotagAgentContextInput): Record<string, unknown>;
//# sourceMappingURL=autotagging-agent-context.d.ts.map