| 15 | |
| 16 | const WORDS = ['ALPHA', 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO']; |
| 17 | function script(n) { |
| 18 | const tasks = Array.from({ length: n }, (_, i) => ({ |
| 19 | description: `t${i}`, |
| 20 | agent: 'general', |
| 21 | prompt: `Write exactly 50 words about the number ${i + 1}. End with the single word ${WORDS[i]}.`, |
| 22 | })); |
| 23 | return `async function run(ctx, inputs) { |
| 24 | const res = await ctx.tool("parallel_task", { tasks: ${JSON.stringify(tasks)} }); |
| 25 | return JSON.stringify(res); |
| 26 | }`; |
| 27 | } |
| 28 | // NO explicit limits → exercises the DEFAULT script timeout. With 50-word |
| 29 | // subtasks (each >30s on this model), 4.2.6's 30s default would time out; 4.2.7 |
| 30 | // gives delegation-capable scripts 10min, so it should complete. |