import { MessageJSON } from "smoltalk";
import type { AgencyCallbacks } from "./hooks.js";
import type { RuntimeContext } from "./state/context.js";
import { State, StateStack } from "./state/stateStack.js";
import { ThreadStore } from "./state/threadStore.js";
import { GraphState, RunNodeResult } from "./types.js";
export declare function setupNode(args: {
    state: GraphState;
}): {
    stack: State;
    step: number;
    self: Record<string, any>;
    threads: ThreadStore;
};
export declare function setupFunction(): {
    stateStack: StateStack;
    stack: State;
    step: number;
    self: Record<string, any>;
    threads: ThreadStore;
};
export declare function runNode({ ctx, nodeName, data, messages, callbacks, initializeGlobals, registerTopLevelCallbacks, abortSignal, moduleDir, }: {
    ctx: RuntimeContext<GraphState>;
    nodeName: string;
    data: Record<string, any>;
    messages?: MessageJSON[];
    callbacks?: AgencyCallbacks;
    moduleDir?: string;
    initializeGlobals?: (ctx: RuntimeContext<GraphState>) => void | Promise<void>;
    registerTopLevelCallbacks?: (ctx: RuntimeContext<GraphState>) => void | Promise<void>;
    abortSignal?: AbortSignal;
}): Promise<RunNodeResult<any>>;
