// cloudflare-dns's tool — the diagnostic: what public names the mesh currently publishes here. import { registerModuleTools, type ToolDefinition } from "@novox/mesh-sdk/tools"; import { CloudflareClient } from "../client.js"; export function getCloudflareDnsTools(cloudflare: CloudflareClient): ToolDefinition[] { return [ { name: "cloudflare_dns_records", description: "The public DNS records in the mesh's zone — the names it currently publishes.", input: {}, run: async () => ({ domain: cloudflare.domain, ingress: cloudflare.ingress, records: await cloudflare.records() }), }, ]; } registerModuleTools("cloudflare-dns", (env) => { try { return getCloudflareDnsTools(CloudflareClient.fromEnv(env)); } catch { return []; } });