export const skillRipgrepDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.search.ripgrep", kind: "runtime", required: true, description: "Runtime-owned ripgrep-style search over skill roots." },
    { dependencyId: "runtime.governancePlane.workspaceReadScope", kind: "permission", required: true, description: "Runtime carries allowed skill roots and read scope." },
];
export function createHostExecutorSkillRipgrepProvider(executor) {
    const ripgrep = executor?.search?.ripgrep;
    if (ripgrep === undefined)
        return undefined;
    return {
        async ripgrep(request) {
            const result = await ripgrep(request);
            if (!result.ok)
                throw new Error(result.error.message);
            return result.output;
        },
    };
}
