import { Core } from '../../../wasm/dist';
/**
 * Callback invoked when a visual scripting instance finishes.
 * @param exitPort  The name of the exit port that was triggered.
 * @param outputs   Named output values from the script's output ports.
 */
export type ScriptCompletionCallback = (exitPort: string, outputs: Record<string, unknown>) => void;
/**
 * Manages per-instance completion callbacks for visual scripting scripts.
 * When a script finishes (synchronously or after async nodes), the registered
 * callback is invoked with the final exit port and output values.
 */
export declare class ScriptCompletionManager {
    private static wasm;
    private static pendingCallbacks;
    static init(wasm: Core): void;
    static cleanup(): void;
    /**
     * Register a callback for when a specific script instance completes.
     * Must be called before the script finishes (i.e. immediately after launch).
     */
    static register(instanceId: string, onComplete: ScriptCompletionCallback): void;
    private static onScriptCompleted;
}
//# sourceMappingURL=script-completion-manager.class.d.ts.map