/** * Skill-manifest types, split from `skills.ts` so non-Node consumers (the * remote-mcp worker types its `/dev` toolset against the wire shape) can * import them without dragging the Node fs loader into their program. */ interface SkillManifestEntry { name: string; description: string; /** Path to the SKILL.md, relative to the package root. */ path: string; /** Framework slug for flavor skills; `null` for framework-agnostic core skills. */ framework: string | null; category: 'core' | 'flavor'; } interface SkillManifest { version: string; skills: SkillManifestEntry[]; } /** * Skill-corpus loader. Node-only (reads the shipped `skills/` directory from * the installed package) — kept out of the isomorphic core and exposed via the * `@cavuno/board/skills` subpath export. Both `npx @cavuno/board setup` and the * in-admin sidekick read the corpus through here, so the two doors * stay fed from one source. */ interface LoadedSkill extends SkillManifestEntry { content: string; references: LoadedSkillReference[]; } interface LoadedSkillReference { /** Filename relative to the skill's directory. */ path: string; content: string; } interface SkillCorpus { version: string; skills: LoadedSkill[]; } /** Resolve a package-root-relative path (e.g. a manifest `path`) to an absolute path. */ declare function resolveFromPackageRoot(relativePath: string, baseDir?: string): string; declare function loadSkillManifest(baseDir?: string): SkillManifest; /** * Load the full skill corpus — manifest metadata, each SKILL.md, and its * disclosed Markdown references. Filesystem consumers keep the references * separate; transports without sibling-file access use `bundleSkillMarkdown`. */ declare function loadSkillCorpus(baseDir?: string): SkillCorpus; /** * Flatten one skill for transports that cannot resolve sibling files. Local * setup keeps the files separate so agents retain progressive disclosure. */ declare function bundleSkillMarkdown(skill: LoadedSkill): string; export { type LoadedSkill, type LoadedSkillReference, type SkillCorpus, type SkillManifest, type SkillManifestEntry, bundleSkillMarkdown, loadSkillCorpus, loadSkillManifest, resolveFromPackageRoot };