(action, returned, mentioned, earlier)
| 885 | // nested delegation is skipped rather than followed, so a subagent that only |
| 886 | // spawns another subagent leaves the call as "moved on". |
| 887 | const throughDelegation = (action, returned, mentioned, earlier) => { |
| 888 | const first = (threads.get(action.id) || []).find((x) => !TRANSPARENT_TOOLS.has(x.name) && !DELEGATION_TOOLS.has(x.name)); |
| 889 | if (!first) return { bucket: 'sufficient', next: action.name }; |
| 890 | const r = reactionOf(first, returned, mentioned, earlier); |
| 891 | return { ...r, next: `${action.name} → ${r.next}` }; |
| 892 | }; |
| 893 | for (const [thread, actions] of threads) { |
| 894 | const earlier = []; // files previous explores in THIS thread already shipped |
| 895 | for (let i = 0; i < actions.length; i++) { |
no test coverage detected