// netcheck's TypeScript tools bundle (novox/hq ADR 0188, ADR 0193): what the builder's launcher // imports and serves over MCP on stdio. Its Go bundle serves the TCP and DNS checks; this one the // HTTP check — one module, two languages, one runtime that knows neither. import { registerModuleTools, type ToolDefinition } from "@novox/mesh-sdk/tools"; import { checkHttp, DEFAULT_TIMEOUT_MS, METHODS, MOST_TIMEOUT_MS } from "../http.js"; export function getNetcheckHttpTools(): ToolDefinition[] { return [ { name: "netcheck_http", description: "Check whether an http(s) URL answers from this machine: one HEAD or GET, no body sent or read, " + "redirects reported and not followed. Answers status, elapsed_ms and a few headers.", input: { url: { type: "string", description: "an http:// or https:// URL" }, method: { type: "string", enum: [...METHODS], description: "HEAD (default) or GET" }, timeout_ms: { type: "integer", description: `give up after this long (default ${DEFAULT_TIMEOUT_MS}, at most ${MOST_TIMEOUT_MS})`, }, }, run: async (args) => checkHttp(args), }, ]; } registerModuleTools("netcheck", () => getNetcheckHttpTools());