/** * usePluginAvailability — query + install helpers for vibecontrols-agent plugins. * * Wraps the existing backend-proxied GraphQL ops (AgentPlugins query + * InstallAgentPlugin mutation) and exposes a small state surface that * gating components can render against. * * Live updates: subscribes to `vibecontrolsAgentPluginStream` so the * installed map reflects out-of-band installs (CLI, other tabs, * agent-side changes) without per-tab polling. The initial AgentPlugins * query is still used for first paint so the gate can render before * the WebSocket completes its handshake. */ export interface UsePluginAvailabilityResult { loading: boolean; /** * True while the very first fetch is in flight (or before it has begun). * Consumers should render a loading spinner instead of the install CTA in * this state so users don't see a flash of "plugin required / Install" * followed by a flash of the real content. */ initialLoading: boolean; installed: Record; missing: string[]; anyInstalled: boolean; allInstalled: boolean; installing: string | null; install: (packageName: string) => Promise; error: string | null; /** True when `error` points to the agent itself not being ready. */ errorIsAgentState: boolean; quotaExhausted: boolean; clearQuotaExhausted: () => void; refetch: () => Promise; } export declare function usePluginAvailability(packages: readonly string[], agentId: string | null): UsePluginAvailabilityResult;