"use client"; import { useRuntimeContext } from "@/providers/runtime-context-provider"; export interface ActiveInstanceState { activeInstance: string | null; ready: boolean; dataScopeKey: string; configRevision: string; } export function useActiveInstance(): ActiveInstanceState { const { context, ready } = useRuntimeContext(); return { activeInstance: context.activeInstance, ready, dataScopeKey: context.dataScopeKey, configRevision: context.configRevision, }; }