Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Add contract test for Muse avatar state→clip mapping
Adam Eivyd7ad259f732f
diff --git a/client/src/components/cos/constants.test.js b/client/src/components/cos/constants.test.jsindex 89fba1e215..bf8931676e 100644--- a/client/src/components/cos/constants.test.js+++ b/client/src/components/cos/constants.test.js@@ -4,7 +4,11 @@ import {normalizeBudgetLimit,getDomainBudget,getDomainMode,- DEFAULT_DOMAIN_MODE+ DEFAULT_DOMAIN_MODE,+ AGENT_STATES,+ MUSE_STATE_ANIMATIONS,+ MUSE_ANIMATION_FALLBACK,+ MUSE_SPEAKING_GESTURE} from './constants';// These mirror the server's domainBudgets/domainAutonomy helpers so the UI's@@ -42,6 +46,30 @@ describe('getDomainBudget (client mirror)', () => {});});+// The Cyber Muse avatar drives RobotExpressive's clips off CoS state. Two+// invariants must hold or the fixed-frame avatar breaks: every agent state+// needs a base clip, and no mapped clip may carry root translation (those+// walk the model out of view). RobotExpressive's root-motion clips:+const MUSE_ROOT_MOTION_CLIPS = ['Walking', 'Running', 'WalkJump'];++describe('muse avatar animation triggers', () => {+ it('maps every agent state to a base clip', () => {+ for (const state of Object.keys(AGENT_STATES)) {+ expect(MUSE_STATE_ANIMATIONS[state], `state "${state}" must map to a clip`).toBeTruthy();+ expect(typeof MUSE_STATE_ANIMATIONS[state].clip).toBe('string');+ expect(MUSE_STATE_ANIMATIONS[state].clip.length).toBeGreaterThan(0);+ }+ });++ it('never maps a state (or the fallback / speaking gesture) to a root-motion clip', () => {+ for (const [state, cfg] of Object.entries(MUSE_STATE_ANIMATIONS)) {+ expect(MUSE_ROOT_MOTION_CLIPS, `state "${state}" uses a root-motion clip`).not.toContain(cfg.clip);+ }+ expect(MUSE_ROOT_MOTION_CLIPS).not.toContain(MUSE_ANIMATION_FALLBACK);+ expect(MUSE_ROOT_MOTION_CLIPS).not.toContain(MUSE_SPEAKING_GESTURE);+ });+});+describe('getDomainMode (existing helper, sanity)', () => {it('defaults to execute for absent/invalid config', () => {expect(getDomainMode(undefined, 'cos')).toBe(DEFAULT_DOMAIN_MODE);