Character Schema Reference
The schema is defined in packages/stable/package-schema/src/character-definition.ts; the package/resource contract is in manifest.ts. Runtime validates untrusted package data before Content projection. The latest source version is CharacterDefinition V11. V1–V10 remain supported versioned schemas/projectors where the current validator permits them.
Current V11 shape
V11 extends the V10 semantic fields and adds:
capabilities.autonomousActions: authored bounded action repertoire.characterActionPreferences: weights for V11 repertoire actionsinspect,emoteandrest.- Presentation V6 bindings for those autonomous actions.
behavior.actionPreferencesaccepts onlyactivate-host-surfaceandvisit-host-surface; additional keys are rejected. UsecharacterActionPreferencesfor the three actions above.
V10 adds authored Presentation Behavior stances normal, calm, and alert. Earlier versions carry their own Presentation, Personality, Behavior, and action preference projections. The Content projection and source schema have separate version numbers.
Version lineage
| CharacterDefinition version | Current source addition |
|---|---|
| V1 | Identity, localized display, primary render asset, normalized anchor, optional default scale. |
| V2 | Behavior scheduling definition. |
| V3 | Action preferences for the then-supported autonomous action kinds. |
| V4 | Personality profile and V3 Behavior lineage. |
| V5 | Presentation clips and initial bindings. |
| V6 | Interaction-context invalidation reaction binding. |
| V7 | Character-touch reaction binding. |
| V8 | Presentation clip motion definitions. |
| V9 | Rive clip definitions. |
| V10 | Authored Presentation Behavior stance constraints. |
| V11 | Autonomous repertoire/capability, custom action preference keys, and autonomous-action Presentation bindings. |
Use the validator and loader for the intended version. Changing the schema number alone does not migrate a package.
Package manifest
CharacterPackageManifestV1 contains:
manifestVersion: 1- package
id, packageversion, andpackageType: "character" contributes.characters[]entries with Character ID and definition pathassetskeyed by Asset ID, each withkind,mediaType, and package-relativepath
Supported asset kinds in the manifest include image, rive, sprite-sheet, audio, and data; not every kind is a valid Presentation clip type. The CharacterDefinition clip union controls how a visual is played.
Content projections
loadCharacterContentV1 through loadCharacterContentV11 return different typed projections. Choose V11 for the current repertoire contract. V10 omits V11 capability and autonomous-action fields by design. Older projections are compatibility facades and do not imply that the source definition has been rewritten to that version.
Validator responsibilities
Package validation checks manifest/definition shape, supported versions, IDs, asset declarations, safe package-relative paths, and resource existence. Refer to structured PackageValidationIssueV1 values. Canvas dimensions, alpha transparency, a fixed frame count, visual identity, and small-screen readability are not all schema properties; see Assets for recommendations versus contract checks.
Field-level authoring checklist
| Field | Expected shape / boundary |
|---|---|
| manifest.id / version | Package ID and semantic version string; not the Character ID. |
| contributes.characters | Character resource ID and safe package-relative definition path. |
| manifest.assets | Asset ID → kind, mediaType, package-relative path. |
| schemaVersion | Supported integer version; never change just to force projection. |
| id / display.name | Character resource ID; localized non-empty name map. |
| render.primaryAsset / fallbackAsset | Declared visual resource IDs (fallback optional). |
| render.anchor / defaultScale | x/y in 0–1; optional finite positive scale. |
| behavior | When present, enabled boolean and bounded optional timing fields; version-specific preferences. |
| personality | Six named optional normalized traits; Content resolves defaults. |
| presentation.clips | Version-specific named clip map: image or frame-sequence, later Rive/motion where supported. |
| frame-sequence | Ordered non-empty asset references, finite positive frameDurationMs, boolean loop. |
| presentation.bindings | Semantic states reference declared clips; do not use filenames as behavior. |
| presentationBehavior | V10+ optional authored stance definition and action suppression values. |
| capabilities.autonomousActions | V11 repertoire, separate from Host capabilities. |
| characterActionPreferences | V11 custom action weights; use current validator for exact version shape. |
See Behavior and Personality Reference for numeric policy bounds, effects, and examples. Studio's editable draft is V10; current candidate inspection includes V11. Check which Content projection your runtime facade consumes.