import { evaluateDecisionRuleset } from './evaluate.js'; import { type DecisionGraph } from './graph.js'; import type { DecisionEvaluationRequest, RulesetResult } from './types.js'; import type { GraphFlowRequest, GraphFlowResponse } from './graph-flow-adapter.js'; type GraphNode = DecisionGraph['nodes'][number]; type NodeStatus = NonNullable; /** Host-owned mapping from a ruleset result to graph outputs and node status. */ export interface DecisionResultProjection { project: (nodeId: string, result: RulesetResult) => Record; /** Mandatory conservative bound per attempt if provider does not report price. */ unknownCostBoundUsd: number; /** Defaults to decisionResultNodeStatus. Only an 'ok' result is projected. */ status?: (nodeId: string, result: RulesetResult) => NodeStatus; } /** Default node status: an unsupported capability, or every evaluation abstaining, * yields no evidence. Hosts with a ruleset-specific policy supply their own. */ export declare function decisionResultNodeStatus(result: RulesetResult): NodeStatus; /** Validate a Flow skill request and return the graph node and its declared projected input. */ export declare function decisionFlowNode(graph: DecisionGraph, flow: GraphFlowRequest): { node: GraphNode; input: Record; }; export declare function assertDecisionFlowPins(node: GraphNode, binding: { metadata: { id: string; version: string; }; }, definitions: ReadonlyArray<{ metadata: { id: string; version: string; }; }>): void; /** Project a ruleset result through the host projector and account every attempt. */ export declare function decisionFlowResponse(graph: DecisionGraph, node: GraphNode, result: RulesetResult, host: DecisionResultProjection): GraphFlowResponse; export declare function assertUnknownCostBound(host: { unknownCostBoundUsd: number; }): void; /** Embedded-host bridge: calls the same evaluateDecisionRuleset that the shipped * decision-evaluate skill script wraps, in process. Use decisionEvaluateSkillFlowInvoker * to run the skill's own entrypoint and request contract. * Host owns authenticated artifact resolution, adapters, receipt store and price bound. * The graph artifact supplies no credentials, executable adapters or permissions. */ export declare function decisionRulesetFlowInvoker(graph: DecisionGraph, host: DecisionResultProjection & { resolve: (nodeId: string) => DecisionEvaluationRequest; evaluate?: typeof evaluateDecisionRuleset; }): (request: GraphFlowRequest) => Promise; export {}; //# sourceMappingURL=graph-decision-bridge.d.ts.map