/** * Central registry mapping a VibeControls entity type to the RBAC permission * that gates its Share affordance plus the platform feature flag that toggles * the generic-sharing UI for that entity. * * Why a registry: the generic sharing dialog (`@burdenoff/fe-libs/sharing`) is * entity-agnostic. Each surface that wants a Share button looks its entity up * here so the permission string + feature flag stay in one place rather than * being re-typed at every call site. * * Rollout posture: * - `vibe` / `note` / `aiprompt` / `action` / `aicontext` / `instructionfile` / * `tunnel` ship ON (`defaultEnabled: true`) — the backend share mutations are * deployed in prod and the FE controllers in this folder are complete for them * (`useVibeShareController`, `useNoteShareController`, and the generic * `useEntityShareController` cover the latter five). * - `session` / `vibedeck` now ship ON (`defaultEnabled: true`): their former * bespoke share dialogs (`SessionShareDialog`, `VibeDeckShareDialog`) were * pure share-record management (not entangled with realtime collaboration — * that lives in `SharedTerminalPanel`/`SharedSessionPage`), so we replaced * their share UI with the generic `` via the inline-`gql` op sets * in `entityShareOps.ts`. They gate on `session:share` / `vibedeck:share`. * - The long-tail entries (catalog/component/template/scorecard/target/docs) * now ship ON (`defaultEnabled: true`): their backend share mutations exist * and the generic `useEntityShareController` serves them via the inline-`gql` * document sets in `entityShareOps.ts`. Each is gated on its own ` * :share` RBAC permission (catalog/component/template/scorecard/target → * `:share`; docs → `docs_site:share`). */ /** A single entity's sharing wiring. */ export interface ShareRegistryEntry { /** RBAC permission required to open the Share dialog for this entity. */ permission: string; /** Platform feature flag key that toggles the generic-sharing surface. */ featureFlag: string; /** * Default value for {@link useFeatureFlag} when the flag is absent. * `true` = generic sharing live for this entity; `false` = hidden until the * flag is explicitly enabled (long-tail + legacy-dialog entities). */ defaultEnabled: boolean; } /** Every entity type the registry knows about. */ export type ShareEntityType = 'vibe' | 'note' | 'aiprompt' | 'action' | 'aicontext' | 'instructionfile' | 'tunnel' | 'session' | 'vibedeck' | 'catalog' | 'component' | 'template' | 'scorecard' | 'target' | 'docs'; export declare const SHARE_REGISTRY: Record; /** Lookup helper; returns `undefined` for unknown entity types. */ export declare function getShareRegistryEntry(entity: ShareEntityType): ShareRegistryEntry | undefined;