| 1064 | // An explore response's shape that matters here: one `**`path`**` section per |
| 1065 | // file whose source it returned, plus whatever else it named. |
| 1066 | const exploreRes = (id, paths, extra = '', isError = false) => JSON.stringify({ |
| 1067 | type: 'user', |
| 1068 | message: { |
| 1069 | content: [{ |
| 1070 | type: 'tool_result', tool_use_id: id, ...(isError ? { is_error: true } : {}), |
| 1071 | content: [{ type: 'text', text: paths.map((p) => `**\`${p}\`** — fn(function)\n\n1\tcode here\n`).join('\n') + extra }], |
| 1072 | }], |
| 1073 | }, |
| 1074 | }); |
| 1075 | const suff = (lines) => classifySufficiency(lines.map((l) => JSON.parse(l))); |
| 1076 | |
| 1077 | // explore → explore is insufficient; the second explore → a Read of a file it |