export const mcpListResourcesDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.listResources", kind: "service", required: true, description: "Runtime-owned MCP resources/list support." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit guard approval before querying the runtime MCP client." },
];
export function createHostExecutorMcpListResourcesProvider(executor) {
    const listResources = executor?.mcp?.listResources;
    if (listResources === undefined)
        return undefined;
    return async (request, context) => {
        const result = await listResources({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return { ...result.output, exhausted: result.output.exhausted ?? false };
    };
}
