import type { FlowVersionNode } from "@skaile/workspaces/resolver"; import type { FlowDefinition, FlowNode } from "./types.js"; /** Returns whether a node is executable by the currently active agent-turn runtime. */ export declare function isAgentNode(node: FlowNode): boolean; /** Returns whether a node executes deterministically through NodeExecutor. */ export declare function isFunctionNode(node: FlowNode): node is FlowNode & { run: Extract, { kind: "function"; }>; }; /** Returns whether a node is a deterministic pass/fail verdict evaluated by the runtime. */ export declare function isCheckNode(node: FlowNode): node is FlowNode & { run: Extract, { kind: "check"; }>; }; /** Returns whether a node is a runtime-owned, isolated model call evaluated outside the session conversation. */ export declare function isSubpromptNode(node: FlowNode): node is FlowNode & { run: Extract, { kind: "subprompt"; }>; }; /** Capitalized label for error/summary text — shared by every deterministic-node message site. */ export declare function deterministicNodeKindLabel(kind: "function" | "check"): string; /** Returns whether a node is a runtime-owned human decision point. */ export declare function isGateNode(node: FlowNode): node is FlowNode & { run: Extract, { kind: "gate"; }>; }; /** Returns whether a node deterministically selects one declared branch in the engine. */ export declare function isRouterNode(node: FlowNode): node is FlowNode & { run: Extract, { kind: "router"; }>; }; /** Returns whether a node delegates once to an inline child flow. */ export declare function isSubFlowNode(node: FlowNode): node is FlowNode & { run: Extract, { kind: "sub-flow"; }>; }; /** Returns whether the current runtime owns the node's execution state. */ export declare function isActiveRuntimeNode(node: FlowNode): boolean; /** @deprecated Use {@link isActiveRuntimeNode}; gates are active but nobody executes them. */ export declare const isExecutableNode: typeof isActiveRuntimeNode; /** Returns the node's optional policy across strict v2 and legacy definitions. */ export declare function nodeIsOptional(node: FlowNode): boolean; /** Returns the node's mandatory approval policy across strict v2 and legacy definitions. */ export declare function nodeRequiresApproval(node: FlowNode): boolean; /** Returns the first declared skill requirement without making it the node identity. */ export declare function nodeSkillId(node: FlowNode): string; /** Returns the user-facing node label across strict v2 and legacy definitions. */ export declare function nodeLabel(node: FlowNode): string; /** Returns strict v2 run assets or the equivalent legacy declarations. */ export declare function nodeAssets(node: FlowNode): string[]; /** * Returns what executes the node, for display and grouping. * * Strict v2 `run.kind` wins, and every node reaching this through `loadFlow` has * one — normalization erases `type`. The legacy fallback only fires for a node * handed over un-normalized, so the result is not restricted to the strict v2 * kind union. Never empty, so it is safe to render directly. * * A normalized legacy node reports the placeholder kind it became, not the kind * it was authored as; pair with {@link nodeIsInert} before showing it to a human. */ export declare function nodeRunKind(node: FlowNode): string; /** * Returns whether the node is a permanently-blocked placeholder rather than a * step that can ever run. * * `normalizeV1` rewrites every non-executable legacy node — canvas `group` * containers, authored `gate`s, unknown kinds — into a router carrying * `contract.requires: [{ expr: "false" }]` and `control.optional: true`. Both are * normalization artifacts: the row is neither a routing step the author wrote nor * a step they marked skippable, so rendering either verbatim states something the * flow does not say. The false precondition is the surviving signal, and * permanent blocking is already its engine semantics. */ export declare function nodeIsInert(node: FlowNode): boolean; /** * Returns the node's first `skill:` asset reference, `#`-range included, or * `undefined` when the node requires no skill. * * Reads through {@link nodeAssets}, so a legacy `type: "skill"` node yields a * bare `skill:` — the legacy pin lives in `data.version`, never in the ref. * Use {@link nodeSkillVersionPins} to read the pin itself. */ export declare function nodeSkillAsset(node: FlowNode): string | undefined; /** * Returns every skill-version pin the node declares, ready for `validateFlowVersions`. * * Strict v2 pins ride in `run.assets` as `skill:#`; the legacy * `type: "skill"` + `data.version` shape is only consulted when no asset pin is * present. A skill requirement without a range is *not* a version claim and * yields nothing — returning it would make every unpinned node fail the check. * * Gotcha: refs are parsed by hand, not through `parseAssetRef`, which throws on * an unscoped ref like `skill:analyze#^9.0.0`. `skillId` is the segment after the * last `/`, so a scoped `skill:@pub/name#range` pins `name`. * * The legacy branch is unreachable for anything loaded through `loadFlow`, which * normalizes `type`/`data` away. `normalizeV1` can only rebuild a `skill:` ref * when the node names a skill, so a legacy node pinning `data.version` with no * `data.skill` declares no pin at all once normalized — the same thing `skaile * run` has always concluded for it. */ export declare function nodeSkillVersionPins(node: FlowNode): FlowVersionNode[]; /** Every skill-version pin declared across a flow, in node-definition order. */ export declare function flowSkillVersionPins(flow: FlowDefinition): FlowVersionNode[]; /** Returns the binding values already supplied at the node boundary. */ export declare function nodeBindings(node: FlowNode): Record; /** Returns the first-class instruction for a strict v2 agent or subprompt node. */ export declare function nodeInstruction(node: FlowNode): string | undefined; /** Returns run-scoped defaults across strict v2 and legacy definitions. */ export declare function flowDefaults(flow: FlowDefinition): Record; //# sourceMappingURL=node-shape.d.ts.map