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