| 96 | * resource reads that aggregate across apps must pass clientId per event. |
| 97 | */ |
| 98 | export function getClientRedactionConfig(server: ReactotronServer, clientId?: string): McpRedactionConfig | undefined { |
| 99 | const connections = server.connections as any[] |
| 100 | if (clientId) { |
| 101 | const conn = connections.find((c) => c.clientId === clientId) |
| 102 | return conn?.mcpRedaction |
| 103 | } |
| 104 | if (connections.length === 1) { |
| 105 | return connections[0]?.mcpRedaction |
| 106 | } |
| 107 | return undefined |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Scoped redactor that caches resolved rules per clientId. Create one per |