UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

2 lines 1.4 kB
import{FALLBACK_SKILL_ROOT,MODEL_SKILL_ROOT}from"#shared/skill-paths.js";function formatAvailableSkillsSection(e,t={}){return e.length===0?null:[`Available skills`,`Listed skills are available in this run. Do not claim a listed skill is inaccessible unless activation or workspace inspection actually fails.`,`If the user names a skill or the request clearly matches one of the descriptions below, call load_skill before proceeding.`,`If multiple skills match, activate the minimal set that covers the task. After activation, follow the returned instructions instead of improvising around them.`,`If activation fails, say so briefly and continue with the best available alternative.`,formatSkillLocationLine(t),"When a loaded SKILL.md mentions sibling files such as `references/foo.md`, resolve them relative to the directory containing that specific SKILL.md.",...e.map(e=>formatAvailableSkillLine({skill:e,skillRoot:t.skillRoot}))].join(` `)}function formatSkillLocationLine(n){return n.skillRoot===void 0?`Skill files live under \`${MODEL_SKILL_ROOT}/<skill>/\`, with \`${FALLBACK_SKILL_ROOT}/<skill>/\` as the fallback when \`$HOME\` is unavailable.`:`Skill files live under \`${n.skillRoot}/<skill>/\`.`}function formatAvailableSkillLine(e){return`${`- ${e.skill.name}: ${e.skill.description}`} (path: ${e.skillRoot??MODEL_SKILL_ROOT}/${e.skill.name}/SKILL.md)`}export{formatAvailableSkillsSection};