import type { ParsedNode, ParsedWorkflow, NodeRole, WorkflowShape } from './types.js'; /** * A workflow whose topology has no Pikku equivalent by design (not a malformed * input or an importer bug) — e.g. a respondToWebhook that responds mid-flow. * Distinct from a generic parse error so callers can account for it as a * deliberate skip rather than a failure. */ export declare class UnsupportedTopologyError extends Error { readonly reason: string; constructor(reason: string, message: string); } export declare function isChainAgentType(typeShort: string): boolean; /** * The base n8n `openAi` node's text/chat/completion path — a prompt + model with * no tools — maps onto a tools-less `pikkuAgent`, exactly like a chain node. * Only the language resources qualify: `image`, `audio`, `assistant`, and `file` * are non-text capabilities (deferred) and stay integration/native stubs. An * absent resource is the legacy text-completion default. */ export declare function isOpenAiAgentNode(typeShort: string, parameters: Record): boolean; /** Nodes that never become graph nodes / agent tools — pure config or decoration. */ export declare function isAbsorbedRole(role: NodeRole): boolean; /** Decide the top-level artifact shape from the classified nodes. */ export declare function decideShape(nodes: ParsedNode[]): WorkflowShape; /** * Parse an n8n workflow export into the normalized IR. Pure — no fs. * * `nameHint` (e.g. the source filename, minus extension) names the workflow when * the export itself is nameless — ~half of real-world exports carry no `name`, * and without a hint they would all collapse onto the same `importedWorkflow` * slug. A present, non-blank `wf.name` always wins over the hint. */ export declare function parseN8n(raw: unknown, nameHint?: string): ParsedWorkflow;