feat(FN-1513): add skill selection resolver for deterministic session skills

- Add skill selection resolver for deterministic session skill sets
- Wire skill override into createKbAgent via AgentOptions
- Export skill resolver types and functions from engine index
- Add regression tests for skill override wiring and resolver fallback semantics
- Apply skill selection to triage and executor sessions
- Apply skill selection to reviewer, merger, and heartbeat sessions
- Fix SessionSkillContextInput to use AgentStore instead of TaskStore
- Add session-skill-context helper for unified skill selection across all session types
- Update memory with skill resolver diagnostics distinction
This commit is contained in:
gsxdsm
2026-04-14 09:47:06 -07:00
2 changed files with 5 additions and 7 deletions

View File

@@ -6,8 +6,7 @@ import {
SKILL_DIAGNOSTIC_MESSAGES,
type SessionPurpose,
} from "./session-skill-context.js";
import type { Agent } from "@fusion/core";
import type { AgentStore } from "@fusion/core";
import type { Agent, AgentStore } from "@fusion/core";
describe("normalizeAgentSkills", () => {
it("returns empty array for non-array input", () => {
@@ -92,11 +91,11 @@ describe("buildSessionSkillContextSync", () => {
describe("assigned agent skills", () => {
it("uses assigned agent skills when available", () => {
const agent: Agent = {
const agent = {
id: "agent-001",
name: "Test Agent",
role: "executor",
state: "idle",
role: "executor" as const,
state: "idle" as const,
metadata: { skills: ["triage", "executor"] },
} as unknown as Agent;

View File

@@ -29,8 +29,7 @@
* - Results are deduplicated preserving stable insertion order
*/
import type { Agent } from "@fusion/core";
import type { AgentStore } from "@fusion/core";
import type { Agent, AgentStore } from "@fusion/core";
import type { SkillSelectionContext } from "./skill-resolver.js";
// ── Types ───────────────────────────────────────────────────────────────────