/**
 * The historical persistent-component names. Pre-Task-066 the admin
 * agent could emit a component tool_use carrying one of these names,
 * and the live stream-parser materialised the inline content as a
 * sibling `:KnowledgeDocument` artefact so the row appeared in the
 * artefacts panel and survived session compaction.
 *
 * The emitting tool is gone on native Claude Code; the
 * constant is preserved so the rehydration path can still recognise
 * `:Component` rows written by older conversations. New conversations
 * never produce these rows. The single-source-of-truth contract still
 * holds: `app/admin-types.ts` and any consumer that needs to classify
 * a stored component name imports from here.
 */
export const PERSISTENT_COMPONENTS = new Set<string>([
  'action-list',
  'document-editor',
  'rich-content-editor',
  'grid-editor',
]);

/**
 * Cheap, allocation-free guard for hot-path checks.
 */
export function isPersistentComponent(name: string | undefined | null): boolean {
  return typeof name === 'string' && PERSISTENT_COMPONENTS.has(name);
}
