(tools: Tools)
| 362 | type ToolLookup = ReadonlyMap<string, Tool> |
| 363 | |
| 364 | function buildToolLookup(tools: Tools): ToolLookup { |
| 365 | const map = new Map<string, Tool>() |
| 366 | for (const tool of tools) { |
| 367 | map.set(tool.name, tool) |
| 368 | for (const alias of tool.aliases ?? []) { |
| 369 | map.set(alias, tool) |
| 370 | } |
| 371 | } |
| 372 | return map |
| 373 | } |
| 374 | |
| 375 | /** |
| 376 | * Serialize a single transcript block as a JSONL dict line: `{"Bash":"ls"}` |
no test coverage detected