11// Doctor runtime checks inspect tool names, browser residue, and runtime state.
2+ import { redactSensitiveUrlLikeString } from "@openclaw/net-policy/redact-sensitive-url" ;
23import { TOOL_NAME_SEPARATOR } from "../agents/agent-bundle-mcp-names.js" ;
34import {
45 type McpToolCatalogDiagnostic ,
@@ -52,6 +53,10 @@ type BundleMcpToolRuntime = Awaited<ReturnType<typeof createBundleMcpToolRuntime
5253const PROVIDER_CATALOG_ORDERS = [ "simple" , "profile" , "paired" , "late" ] as const ;
5354const PROVIDER_CATALOG_ORDER_SET = new Set < ProviderCatalogOrder > ( PROVIDER_CATALOG_ORDERS ) ;
5455
56+ function formatGatewayHealthTarget ( url : string ) : string {
57+ return redactSensitiveUrlLikeString ( url ) ;
58+ }
59+
5560export function detectUnavailableSkills ( cfg : OpenClawConfig ) : SkillStatusEntry [ ] {
5661 const agentId = resolveDefaultAgentId ( cfg ) ;
5762 const workspaceDir = resolveAgentWorkspaceDir ( cfg , agentId ) ;
@@ -77,7 +82,7 @@ export async function collectGatewayHealthFindings(
7782 checkId : "core/doctor/gateway-health" ,
7883 severity : "warning" ,
7984 message : `Gateway health probe could not be prepared: ${ formatErrorMessage ( error ) } ` ,
80- path : ctx . cfg . gateway ?. mode === "remote" ? "gateway.url" : "gateway" ,
85+ path : ctx . cfg . gateway ?. mode === "remote" ? "gateway.remote. url" : "gateway" ,
8186 fixHint :
8287 "Fix Gateway connection configuration, then rerun `openclaw doctor --lint --only core/doctor/gateway-health`." ,
8388 } ,
@@ -101,8 +106,8 @@ export async function collectGatewayHealthFindings(
101106 checkId : "core/doctor/gateway-health" ,
102107 severity : "warning" ,
103108 message : `Gateway is not reachable: ${ probe . error ?? "status probe failed" } ` ,
104- path : mode === "remote" ? "gateway.url" : "gateway.mode" ,
105- target : probeDetails . url ,
109+ path : mode === "remote" ? "gateway.remote. url" : "gateway.mode" ,
110+ target : formatGatewayHealthTarget ( probeDetails . url ) ,
106111 fixHint :
107112 mode === "remote"
108113 ? "Verify the remote Gateway URL, network path, TLS settings, and credentials."
0 commit comments