Skip to content

Commit 2b470c4

Browse files
cameroncookeclaude
andcommitted
fix(doctor): Redact xcode bridge diagnostics in default output
Include xcodeToolsBridge in the doctorInfo payload before rendering so bridgePath, lastError, and unavailable reasons pass through the same sanitizeValue redaction path as the rest of the doctor report. This closes a gap where bridge diagnostics were interpolated directly into output and could bypass default redaction. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d07723f commit 2b470c4

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

src/mcp/tools/doctor/doctor.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ export async function runDoctor(
241241
},
242242
},
243243
manifestTools: manifestToolInfo,
244+
xcodeToolsBridge,
244245
} as const;
245246

246247
const currentCwdName = process.cwd().split('/').filter(Boolean).at(-1) ?? '';
@@ -423,18 +424,18 @@ export async function runDoctor(
423424
: []),
424425

425426
`\n### Xcode IDE Bridge (mcpbridge)`,
426-
...(xcodeToolsBridge.available
427+
...(doctorInfo.xcodeToolsBridge.available
427428
? [
428-
`- Workflow enabled: ${xcodeToolsBridge.workflowEnabled ? '✅ Yes' : '❌ No'}`,
429-
`- mcpbridge path: ${xcodeToolsBridge.bridgePath ?? '(not found)'}`,
430-
`- Xcode running: ${xcodeToolsBridge.xcodeRunning ?? '(unknown)'}`,
431-
`- Connected: ${xcodeToolsBridge.connected ? '✅ Yes' : '❌ No'}`,
432-
`- Bridge PID: ${xcodeToolsBridge.bridgePid ?? '(none)'}`,
433-
`- Proxied tools: ${xcodeToolsBridge.proxiedToolCount}`,
434-
`- Last error: ${xcodeToolsBridge.lastError ?? '(none)'}`,
429+
`- Workflow enabled: ${doctorInfo.xcodeToolsBridge.workflowEnabled ? '✅ Yes' : '❌ No'}`,
430+
`- mcpbridge path: ${doctorInfo.xcodeToolsBridge.bridgePath ?? '(not found)'}`,
431+
`- Xcode running: ${doctorInfo.xcodeToolsBridge.xcodeRunning ?? '(unknown)'}`,
432+
`- Connected: ${doctorInfo.xcodeToolsBridge.connected ? '✅ Yes' : '❌ No'}`,
433+
`- Bridge PID: ${doctorInfo.xcodeToolsBridge.bridgePid ?? '(none)'}`,
434+
`- Proxied tools: ${doctorInfo.xcodeToolsBridge.proxiedToolCount}`,
435+
`- Last error: ${doctorInfo.xcodeToolsBridge.lastError ?? '(none)'}`,
435436
`- Note: Bridge debug tools (status/sync/disconnect) are only registered when debug: true`,
436437
]
437-
: [`- Unavailable: ${xcodeToolsBridge.reason}`]),
438+
: [`- Unavailable: ${doctorInfo.xcodeToolsBridge.reason}`]),
438439

439440
`\n## Tool Availability Summary`,
440441
`- Build Tools: ${!('error' in doctorInfo.xcode) ? '\u2705 Available' : '\u274c Not available'}`,

0 commit comments

Comments
 (0)