import { _ as validateResourcePath, a as writeSkillsToDisk, b as validateSkillName, c as inferSource, d as buildCatalog, f as IMPLICITLY_ALLOWED_SKILL_TOOLS, g as parseAllowedToolPattern, h as matchesAllowedTool, i as writeSkillToDisk, l as parseFrontmatter, m as isToolAllowedByUnion, n as stripShellInterpolations, o as discoverSkills, p as installAllowedToolsGate, r as resolveSkills, s as getDefaultScanPaths, t as interpolateShellCommands, u as parseSkillFile, v as validateResourcePathReal, x as createSkillActivationState, y as validateSkillForWrite } from "./interpolate-Dy7Lunvg.js";
//#region src/skills/index.ts
/**
* Define an inline skill configuration.
*
* Strict-validates at author-time — throws if the config would be rejected by
* `writeSkillToDisk` or the spec. Source defaults to `'inline'`.
*/
function defineSkill(config) {
	const normalized = {
		...config,
		source: config.source ?? "inline"
	};
	const result = validateSkillForWrite(normalized);
	if (!result.valid) {
		const summary = result.errors.map((e) => `  - [${e.code}] ${e.message}`).join("\n");
		throw new Error(`Invalid skill "${normalized.name}":\n${summary}`);
	}
	return normalized;
}
//#endregion
export { IMPLICITLY_ALLOWED_SKILL_TOOLS, buildCatalog, createSkillActivationState, defineSkill, discoverSkills, getDefaultScanPaths, inferSource, installAllowedToolsGate, interpolateShellCommands, isToolAllowedByUnion, matchesAllowedTool, parseAllowedToolPattern, parseFrontmatter, parseSkillFile, resolveSkills, stripShellInterpolations, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, writeSkillToDisk, writeSkillsToDisk };

//# sourceMappingURL=skills.js.map