UNPKG

@dollhousemcp/mcp-server

Version:

DollhouseMCP - A Model Context Protocol (MCP) server that enables dynamic AI persona management from markdown files, allowing Claude and other compatible AI assistants to activate and switch between different behavioral personas.

37 lines 1.58 kB
/** * Shared element type normalization utilities. * * Provides a single canonical mapping from both singular and plural * element type names to ElementType enum values. All code paths that * accept user-provided element type strings should use these utilities * to ensure consistent behaviour. * * Issue #433 - Singular element type names rejected in search/portfolio operations */ import { ElementType } from '../portfolio/types.js'; /** * Canonical mapping from user-facing type strings (singular and plural) * to ElementType enum values. Keys are lowercase. */ export declare const ELEMENT_TYPE_MAP: Record<string, ElementType>; /** All canonical ElementType values (plural forms). */ export declare const ALL_ELEMENT_TYPES: ElementType[]; /** Singular labels for each ElementType. */ export declare const SINGULAR_LABELS: Record<ElementType, string>; /** * Convert an ElementType enum value to its singular label. * e.g. ElementType.PERSONA ("personas") → "persona" */ export declare function toSingularLabel(type: ElementType): string; /** * Normalize a user-provided element type string to an ElementType enum value. * * Accepts both singular (`"memory"`) and plural (`"memories"`) forms, * case-insensitively. Returns `null` for unrecognised input. */ export declare function normalizeElementType(input: string | null | undefined): ElementType | null; /** * Format a human-readable list of valid element types for error messages. */ export declare function formatElementTypesList(): string; //# sourceMappingURL=elementTypeNormalization.d.ts.map