import { PluginCapabilities, PluginContribution, PluginRuntime } from './protocol/index.js'; /** * A "tunnel" the host page can query for contributions and from which * iframe-mounted plugins are served. For VibeControls this is the * vibecontrols-agent's Cloudflare tunnel + the current profile name; * other products map to whatever serves their plugins. */ export interface MountTunnel { /** Base URL — used for both fetch + iframe src. */ tunnelUrl: string; /** Profile or scope segment the agent uses to namespace plugins. */ profile: string; /** Optional human-readable label for picker UIs / errors. */ label?: string; /** * Factory that mints a fresh iframe token scoped to a contribution's * capability `restPaths`. Called once on first mount + on each * scheduled refresh. The host supplies this so the SDK stays * transport-agnostic. */ mintIframeToken: (input: { pathPrefixes: string[]; }) => Promise<{ token: string; expiresAt: string; }>; } /** * What `usePluginContributions` returns per-contribution after * fetching from one or more tunnels. The `tunnel` is the source the * contribution came from; multiple tunnels' results are unioned (last * wins on id collisions). */ export interface DiscoveredContribution { pluginKey: string; pluginPackageName?: string; contribution: PluginContribution; capabilities: PluginCapabilities; /** * Relative URL — the host concatenates with `tunnel.tunnelUrl` to * mount the iframe. Returned by the agent as e.g. `/ui/`. */ url: string; tunnel: MountTunnel; } export type RuntimePreference = PluginRuntime | 'auto'; export interface InProcessPluginEntry { /** * Plugin package key (matches `DiscoveredContribution.pluginKey`). * Required to disambiguate when two different plugins contribute * the same local `id` at the same `mountPoint` — without this, the * later registration silently overwrites the earlier one. */ pluginKey: string; /** Matches `contribution.id`. */ id: string; /** Matches `contribution.mountPoint`. */ mountPoint: string; /** React component to render. Receives the same context object the iframe would. */ Component: React.ComponentType<{ context: Record; }>; } //# sourceMappingURL=types.d.ts.map