export const skillGenerateDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.filesystem.writeText", kind: "filesystem", required: true, description: "Runtime-owned writer for generated SKILL.md and support files." },
    { dependencyId: "runtime.governancePlane.skillWriteApproval", kind: "permission", required: true, description: "dryRun:false requires an affirmative guard before writing skill files." },
];
export function createHostExecutorSkillFilesystemProvider(executor) {
    const writeText = executor?.filesystem?.writeText;
    if (writeText === undefined)
        return undefined;
    return {
        async writeText(request) {
            const result = await writeText({ path: request.path, content: request.content, encoding: request.encoding });
            if (!result.ok)
                throw new Error(result.error.message);
            return result.output;
        },
    };
}
