/**
 * Delegate type for running a script by ID.
 * Signature matches APIVisualScripting.runScriptById.
 */
type RunScriptByIdFn = (scriptId: string, launcherId: string, inputJson: string) => string;
/**
 * Delegate type for stopping a script.
 * Signature matches APIVisualScripting.stopScript.
 */
type StopScriptFn = (instanceId: string) => boolean;
/**
 * Delegate type for registering a completion callback for a script instance.
 */
type RegisterCompletionFn = (instanceId: string, onComplete: (exitPort: string, outputs: Record<string, unknown>) => void) => void;
/**
 * A lightweight reference to a Visual Scripting script in the CMS.
 * Holds the script's CMS ID and provides methods to launch and stop it.
 *
 * NOTE: This file must NOT import from balancy-api.class.ts to avoid a circular dependency:
 * json-object.class → script-ref.entity → balancy-api.class → index → balancy-model.class → json-object.class
 * Instead, the API functions are injected via ScriptRef.setAPI() during initialization.
 */
export declare class ScriptRef {
    private _scriptId;
    /** Injected API function for running scripts */
    private static _runScriptById;
    /** Injected API function for stopping scripts */
    private static _stopScript;
    /** Injected function for registering per-instance completion callbacks */
    private static _registerCompletion;
    /**
     * Called during API initialization to inject the Visual Scripting functions.
     * This avoids a circular dependency between entities and core modules.
     */
    static setAPI(runScriptById: RunScriptByIdFn, stopScript: StopScriptFn, registerCompletion?: RegisterCompletionFn): void;
    constructor(_scriptId: string);
    /** The script's CMS ID. */
    get scriptId(): string;
    /** Whether this reference points to a valid script (i.e., has a non-empty ID). */
    get hasValue(): boolean;
    /**
     * Launch this script.
     * @param launcherId Optional identifier for who launched the script. Accessible inside the script via GetLauncherId().
     * @param input Optional object with input parameters keyed by port name. Will be JSON-serialized.
     * @param onComplete Optional callback invoked when the script finishes, receiving the exit port name and output values.
     * @returns The instance ID of the running script, or empty string on failure.
     */
    launch(launcherId?: string, input?: Record<string, unknown>, onComplete?: (exitPort: string, outputs: Record<string, unknown>) => void): string;
    /**
     * Stop a running instance of a script.
     * @param instanceId The instance ID returned from launch().
     * @returns True if the script was found and stopped.
     */
    static stop(instanceId: string): boolean;
    toString(): string;
}
export {};
//# sourceMappingURL=script-ref.entity.d.ts.map