import { readSkillEntryLayers } from "./config.js"; import type { Orchestrator } from "./orchestrator.js"; import { resolveSkills, type SkillSet } from "./skills-manifest.js"; /** * The skills as this session sees them now: read afresh each time, so a * setting changed in /pp or a skill added on disk applies to the next load or * spawn. A project's skills and settings count only where pi trusts it. */ export function currentSkillSet(orchestrator: Pick): SkillSet { return resolveSkills({ cwd: orchestrator.cwd, toggles: orchestrator.config?.skills, trusted: orchestrator.lastCtx?.isProjectTrusted?.() ?? true, entries: readSkillEntryLayers(orchestrator.cwd), }); }