style: format gateway discovery

This commit is contained in:
Peter Steinberger
2026-01-09 13:49:57 +01:00
parent b0672da396
commit b21e62f072
2 changed files with 3 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
import { normalizeReplyPayload } from "./normalize-reply.js";
import type { GetReplyOptions, ReplyPayload } from "../types.js";
import { normalizeReplyPayload } from "./normalize-reply.js";
import type { TypingController } from "./typing.js";
export type ReplyDispatchKind = "tool" | "block" | "final";

View File

@@ -281,15 +281,7 @@ async function discoverWideAreaViaTailnetDns(
const instanceName = ptrName.replace(/\.?_clawdbot-bridge\._tcp\..*$/, "");
const srv = await run(
[
"dig",
"+short",
"+time=1",
"+tries=1",
nameserverArg,
ptrName,
"SRV",
],
["dig", "+short", "+time=1", "+tries=1", nameserverArg, ptrName, "SRV"],
{ timeoutMs: Math.max(1, Math.min(350, budget)) },
).catch(() => null);
const srvParsed = srv ? parseDigSrv(srv.stdout) : null;
@@ -308,15 +300,7 @@ async function discoverWideAreaViaTailnetDns(
}
const txt = await run(
[
"dig",
"+short",
"+time=1",
"+tries=1",
nameserverArg,
ptrName,
"TXT",
],
["dig", "+short", "+time=1", "+tries=1", nameserverArg, ptrName, "TXT"],
{ timeoutMs: Math.max(1, Math.min(350, txtBudget)) },
).catch(() => null);
const txtTokens = txt ? parseDigTxt(txt.stdout) : [];