import type { WorkflowInstance } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/api_pb";
import type { WorkflowInstanceInput } from "@stigmer/sdk";
/** Return value of {@link useUpdateWorkflowInstance}. */
export interface UseUpdateWorkflowInstanceReturn {
    /** Update an existing workflow instance with a full input. Returns the updated resource. */
    readonly update: (input: WorkflowInstanceInput) => Promise<WorkflowInstance>;
    /** `true` while the update RPC is in flight. */
    readonly isUpdating: boolean;
    /** Error from the last failed update, or `null` when healthy. */
    readonly error: Error | null;
    /** Clear the error state. */
    readonly clearError: () => void;
}
/**
 * Mutation hook that updates an existing WorkflowInstance resource.
 *
 * Wraps `stigmer.workflowInstance.update()` with loading/error state.
 * The caller is responsible for refreshing the instance after a successful
 * update (e.g., via `refetch` from `useWorkflowInstances` or `useWorkflowInstance`).
 *
 * @example
 * ```tsx
 * const { update, isUpdating } = useUpdateWorkflowInstance();
 *
 * const handleSave = async () => {
 *   await update({
 *     ...instanceToInput(instance),
 *     environmentRefs: newRefs,
 *   });
 *   refetch();
 * };
 * ```
 */
export declare function useUpdateWorkflowInstance(): UseUpdateWorkflowInstanceReturn;
//# sourceMappingURL=useUpdateWorkflowInstance.d.ts.map