Add Progressive Capability Unlock System#25
Add Progressive Capability Unlock System#25lalalune merged 2 commits intoelizaOS:mainfrom xR0am:main
Conversation
Co-authored-by: omarannabi <omarannabi@gmail.com>
…lity-rollout-e03f
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Closes #2
Summary
Implements a comprehensive capability progression system that replaces the previous "all capabilities at once" approach with a guided unlock experience. Agents now start with limited capabilities and progressively unlock new ones by demonstrating competency with existing tools.
Key Changes
🎯 Core Features
5-Level Progression System: Basic Existence → Web Explorer → Visual Perception → Audio Communication → Visual Recording
Condition-Based Unlocks: Each capability requires specific prerequisites (naming + shell usage → browser → form submission + browser → vision → microphone → camera)
Dynamic Plugin Registration: Plugins are registered on-demand as capabilities unlock rather than all at startup
Visual Progression UI: Locked capabilities show 🔒 icons and are disabled until unlocked
System Notifications: Congratulatory messages injected when new capabilities unlock
📁 New Files
packages/agentserver/src/services/capabilityProgressionService.ts - Core progression logic and state management
packages/agentserver/src/services/progressionTracker.ts - Action tracking and capability usage detection
packages/agentserver/src/tests/capability-progression.test.ts - Comprehensive unit tests (17 test cases)
packages/agentserver/src/tests/progression-e2e.test.ts - Integration tests for full system validation
🔧 Modified Files
Backend (Agent Server)
packages/agentserver/src/index.ts - Modified plugin loading to use progressive system, added progression API endpoints
packages/agentserver/src/character.ts - No changes to character definition
Frontend (Game Interface)
packages/game/src/components/GameInterface.tsx - Enhanced capability buttons with lock states, added progression status panel
packages/game/src/App.css - Added styling for progression UI components
🛠 Technical Implementation
Progression Levels:
Level 0 - Basic Existence: shell, naming (always unlocked)
Level 1 - Web Explorer: browser, stagehand (unlocks after agent naming + shell usage)
Level 2 - Visual Perception: vision, screen_capture (unlocks after browser usage + form submission)
Level 3 - Audio Communication: microphone, sam, audio (unlocks after vision usage)
Level 4 - Visual Recording: camera, advanced_vision (unlocks after microphone usage)
API Endpoints:
GET /api/agents/:agentId/progression - Returns current progression status, unlocked capabilities, and available levels
Action Tracking:
Automatic shell command usage detection
Manual tracking for browser interactions, form submissions, and capability usage
Real-time progression checking and level unlocking
Testing
✅ 17 unit tests covering all progression logic scenarios
✅ 8 integration tests validating API endpoints and system behavior
✅ Manual validation confirms end-to-end progression flow
✅ Backward compatibility - all existing tests pass
✅ Build validation - system compiles and integrates cleanly
User Experience Impact
Before: Agent had access to all capabilities immediately, overwhelming users and providing no guidance on tool importance.
After:
Agent starts with basic capabilities only
Clear progression path with specific unlock requirements
Visual feedback showing locked/unlocked states
Educational experience as agent explores each tool
Celebration moments when new capabilities unlock
Progressive complexity introduction
Migration Notes
Existing agents will start at Level 0 and need to progress through the system
All existing API endpoints remain functional
Plugin loading is now progressive but maintains full compatibility
Frontend gracefully handles agents without progression data (fallback to all capabilities unlocked)
Future Enhancements
Persistence of progression state across agent restarts
Additional unlock conditions (time-based, goal completion, etc.)
Customizable progression paths for different agent types
Achievement system for progression milestones