/** * Boot-time helpers that wire the skills library into the running process. * * Skills come from four sources, in order of precedence (project > user > * learned > bundled). The same `SKILL.md` format is used for all four; * the Registry resolves any name conflict and reports shadows for the * `/skills` panel. * * bundled — `dist/skills-bundled//SKILL.md` (shipped with Franklin) * learned — `~/.blockrun/skills/learned//SKILL.md` (auto-generated by * the learnings/extractor when a session yields a reusable * procedure). Same disk format as the others — `hidden: true` * keeps them out of `/help` but they still participate in * trigger matching. * user — `~/.blockrun/skills//SKILL.md` (hand-authored per user) * project — `/.franklin/skills//SKILL.md` * and `/.skills//SKILL.md` * * `getSkillVars` returns the runtime variables that * `substituteVariables` injects into a skill body before `$ARGUMENTS` * expansion. Only sync values live here; async (wallet balance, on-chain * reads) are deferred and the substituter leaves unknown vars literal. */ import { Registry } from './registry.js'; import type { LoadError } from './types.js'; export interface BundledLoad { registry: Registry; errors: LoadError[]; } export interface AllSkillsLoad extends BundledLoad { /** Per-source counts for the `/mcp` and `/skills` status surfaces. */ counts: Record; } /** Backwards-compatible alias: load only the bundled set. Callers should * prefer `loadAllSkills(workDir)` to pick up user/project overrides. */ export declare function loadBundledSkills(): BundledLoad; /** * Discover every skill the user can run in this directory. Sources are * unioned; the Registry resolves name collisions by source precedence * (project > user > learned > bundled). */ export declare function loadAllSkills(workDir: string): AllSkillsLoad; /** Ensure the user-global skills root exists so `~/.blockrun/skills//` * edits don't fail with ENOENT. Idempotent. */ export declare function ensureUserSkillsDir(): string; export declare function ensureLearnedSkillsDir(): string; export interface SkillVarSource { chain?: 'base' | 'solana'; } export declare function getSkillVars(src: SkillVarSource): Record;