Function assertInlinePersonaDefinitions

  • Structural rules for an inline persona list, cheap enough to run before any subsystem starts: an array; every entry an object with a string id that is not blank (empty or whitespace only); no duplicate id; activationKeywords, when present, an array of strings; sentimentTracking.presets, when present, an array. Semantic validation (required fields, semver, prompt length) still runs in GMIManager through validatePersonas.

    Parameters

    • definitions: unknown

    Returns asserts definitions is IPersonaDefinition[]

    Throws

    GMIError CONFIGURATION_ERROR (SYS_CONFIGURATION_ERROR): for an entry, naming its index, and its id where that id is a string that is not blank (details.index, details.id); for a value that is not an array, with the type received (details.received).