/**
 * Node params schema — single source for "what params does each node kind take" (spec R6 / D45).
 *
 * Two schema sources, one resolver:
 *   - tool / mcp  → per-capability `paramsSchema` on the CapabilityEntry (the tool's own arg schema,
 *     validates node.params.args).
 *   - everything else (http/agent/channel/memory/if/filter/switch/transform/wait/...) → a per-KIND
 *     schema here (KIND_PARAM_SCHEMAS), validates node.params directly.
 *
 * The schemas are a JSON-Schema subset aligned with the canvas SchemaArgsForm consumer
 * (type/enum/default/minimum/maximum/multipleOf/format/x-widget). `required` mirrors what the REAL
 * executors throw on (host-executors.ts / builtin-executors.ts) — not a wishlist.
 *
 * fail-loud posture: `validateParamsAgainstSchema` flags missing-required / wrong-enum / wrong-type
 * so the AI generation gate (AI-2) can reject and self-correct. Two deliberate exemptions:
 *   - a value that is a `{{ }}` template is skipped for type checks (resolved at runtime).
 *   - an `__ASK__: 问题` sentinel (brace-less ON PURPOSE so it bypasses the {{ }} expression gate in
 *     validateDefExpressions) counts as "present but pending" (the agent honestly marking an unknown,
 *     not a hallucination) — surfaced by collectClarifications for the 待补 badge + activation gate.
 */
import type { CapabilityEntry } from "./capability-catalog.js";
/** Per-kind params schemas for non tool/mcp kinds. `trigger` (workflow-level trigger def) and
 *  `manual` (n8n import placeholder that always fails) are intentionally excluded. */
export declare const KIND_PARAM_SCHEMAS: Record<string, Record<string, unknown>>;
/** An `__ASK__: 问题` sentinel — the agent honestly marking an unknown required value (AI-2).
 *  Brace-less by design so it doesn't enter the {{ }} restricted-expression gate. */
export declare function isAskPlaceholder(v: unknown): boolean;
type NodeLike = {
    id: string;
    kind: string;
    params?: Record<string, unknown>;
};
/**
 * The schema that governs a node's params:
 *   - tool → the tool capability's paramsSchema (governs params.args).
 *   - mcp  → the "server.tool" capability's paramsSchema (governs params.args).
 *   - else → KIND_PARAM_SCHEMAS[kind] (governs params directly).
 * Returns undefined when no schema is known (e.g. a tool ref outside the catalog).
 */
export declare function resolveNodeParamsSchema(node: NodeLike, entries: CapabilityEntry[]): Record<string, unknown> | undefined;
/**
 * Validate every node's params against its resolved schema. Returns human-readable Chinese errors
 * (empty = clean). Skips `trigger` (trigger def is validated elsewhere) and `manual` (placeholder).
 * Unknown kinds with no schema are skipped here (validateCapabilityRefs / validateGraph cover refs).
 */
export declare function validateParamsAgainstSchema(def: {
    nodes: NodeLike[];
}, entries: CapabilityEntry[]): string[];
/**
 * Collect every `{{ __ASK__ }}` placeholder in a def (top-level params + one level into `args`).
 * Drives the canvas "待补" badge and the activation gate (a workflow with pending asks cannot be
 * activated). Empty = nothing pending.
 */
export declare function collectAskPlaceholders(def: {
    nodes: NodeLike[];
}): {
    nodeId: string;
    field: string;
}[];
/**
 * Like collectAskPlaceholders but carries the question text — drives the workflow.chat `clarify`
 * bubble (AI-2). Empty = nothing to ask.
 */
export declare function collectClarifications(def: {
    nodes: NodeLike[];
}): {
    nodeId: string;
    field: string;
    question: string;
}[];
/**
 * Compact per-kind params hint for the AI graph-builder prompt, derived from KIND_PARAM_SCHEMAS
 * (single source — the prompt never hand-duplicates param names). tool/mcp carry per-capability
 * arg schemas (the agent reads them via list_capabilities), so they get a pointer not a field list.
 */
export declare function renderKindParamsForPrompt(): string;
export {};
