import { EastType } from '@elaraai/east'; /** Lifecycle of the most recent call on a bound function's channel. */ export type FuncStatus = 'idle' | 'running' | 'succeeded' | 'failed' | 'cancelled'; /** A failed call's detail (the runner's outcome + captured output tails). */ export interface FuncCallError { kind: string; message: string; stdout: string; stderr: string; } /** What {@link useFuncCall} returns for one bound function. */ export interface FuncCall { /** Launch the call, fire-and-forget (latest-wins). No-op when not ready. */ call: (...args: unknown[]) => void; /** Last successful result, or `null` until the first success. */ result: R | null; /** Lifecycle of the most recent call. */ status: FuncStatus; /** True while a call is in flight. */ pending: boolean; /** Failure detail when the most recent call failed, else `null`. */ error: FuncCallError | null; } /** * Build + observe a reactive call handle for a named workspace function. * * @typeParam R - The function's return type (decoded JS shape). * @param name - The bound function name, or `null` when the binding is absent * (the hook degrades to an inert idle handle — safe for the rules of hooks). * @param inputs - The positional parameter East types (e.g. `[Array(Row), Spec]`). * `null` until the row type is known. * @param output - The return East type. * @returns A {@link FuncCall} — stable `call` plus the reactive `result` / * `status` / `pending` of this function's shared channel. */ export declare function useFuncCall(name: string | null, inputs: EastType[] | null, output: EastType): FuncCall; //# sourceMappingURL=run-runtime.d.ts.map