/**
 * Capability Catalog (spec D24) — THE single source of truth for "what can a workflow node
 * actually reference". One catalog feeds five consumers: the AI graph builder's prompt +
 * list_capabilities tool, the canvas "+" suggestions, the advanced node library, the node
 * config dropdowns, and Hub bundle `requires` verification.
 *
 * Channels are deliberately ABSENT here: the engine is channel-opaque (delivery lives in the
 * gateway), so the gateway merges its own channel registry into `workflow.capabilities` /
 * `x/workflow.chat` responses. Everything else enumerates REAL runtime state — no static lists.
 */
import type { ToolDefinition } from "../../protocol/wire/chat-types.js";
export type CapabilityCategory = "agent" | "tool" | "skill" | "mcp" | "memory" | "channel" | "control";
export interface CapabilityEntry {
    category: CapabilityCategory;
    /** Workflow node kind that uses this capability. */
    kind: string;
    /** Concrete reference: tool name / agent id / "server.tool" / memory op / channel name. */
    id: string;
    /** Human-readable name for pickers and the AI prompt. */
    label: string;
    description?: string;
    /** JSON schema of the underlying callable's input (tools/mcp), when known. */
    paramsSchema?: Record<string, unknown>;
    /** Prefill for add_node params when the user picks this entry. */
    paramsTemplate?: Record<string, unknown>;
}
export interface CapabilityCatalogDeps {
    getToolManifest(): ToolDefinition[];
    /** Available agent ids a workflow `agent` node can target (self first). */
    listAgentIds(): {
        id: string;
        name?: string;
    }[];
    /** Project root for project-scoped skill resolution. */
    projectRoot: string;
}
/** Enumerate every capability a workflow in `projectRoot` can reference right now. */
export declare function buildCapabilityCatalog(deps: CapabilityCatalogDeps): CapabilityEntry[];
/**
 * Compact catalog text for the AI graph builder's system prompt: category headers + `id — desc`
 * lines, hard-capped per category so huge tool sets don't blow the prompt (the agent uses the
 * list_capabilities tool for the long tail).
 */
export declare function renderCatalogForPrompt(entries: CapabilityEntry[], perCategoryCap?: number): string;
/** Refs the validator extracts from a def to check against the catalog (anti-hallucination). */
export declare function collectCapabilityRefs(def: {
    nodes: {
        id: string;
        kind: string;
        params?: Record<string, unknown>;
    }[];
}): {
    category: CapabilityCategory;
    ref: string;
    nodeId: string;
}[];
/** Validate def refs against the catalog. Returns human-readable errors (empty = clean). */
export declare function validateCapabilityRefs(def: {
    nodes: {
        id: string;
        kind: string;
        params?: Record<string, unknown>;
    }[];
}, entries: CapabilityEntry[]): string[];
