-
-
Notifications
You must be signed in to change notification settings - Fork 745
Closed
Labels
status: needs-triageAwaiting initial triageAwaiting initial triage
Description
Problem
The skill-dispatcher.js module (363 lines) in .aios-core/core/orchestration/ has zero test coverage. This module maps agent IDs to AIOS Skill invocations and handles dispatch payloads, output parsing, and agent validation.
Solution
Add comprehensive unit tests covering:
- Constructor — default options, skill mapping, agent personas, aliases
- getSkillName — mapped agents, alias resolution, fallback for unknown agents
- getAgentPersona — known agents, unknown fallback, aliases
- buildDispatchPayload — complete payload construction, args string with task/output/phase/yolo, array creates handling, tech stack flags (database, frontend, TypeScript), missing context defaults
- parseSkillOutput — null/undefined, structured objects, JSON in markdown code blocks, plain JSON strings, plain text truncation, invalid JSON fallback, unknown types
- createSkipResult — all fields populated
- formatDispatchLog — persona details, N/A fallback
- getAvailableAgents — primary agents only, aliases excluded
- isValidAgent — known agents, AIOS: prefix, unknown
Test Details
- 39 tests across 8 describe blocks
- No mocks needed (pure logic module)
- All tests passing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs-triageAwaiting initial triageAwaiting initial triage