(tools)
| 568 | * pass the all-mapped bar. |
| 569 | */ |
| 570 | export function canMapAllTools(tools) { |
| 571 | if (!Array.isArray(tools) || tools.length === 0) return false; |
| 572 | for (const t of tools) { |
| 573 | if (t?.type !== 'function') return false; |
| 574 | const name = t.function?.name; |
| 575 | if (!name || !TOOL_MAP[name] || !isNativeBridgeToolAllowed(name)) return false; |
| 576 | } |
| 577 | return true; |
| 578 | } |
| 579 | |
| 580 | /** |
| 581 | * partitionTools(tools) — split the caller's tools[] into: |
no test coverage detected