// Holes lower to `__host.hole(siteId, name, prompt ?? void 0, (__src) => eval(__src), body?)` // (execution-engine.md, "lowering" rows for hole): the evaluator is emitted AT THE SITE so its // direct eval runs in the hole's lexical scope; a filled hole passes its lowered body as the // fifth argument and the same body comes back as text in `holeBodies`. Body sites carry the // hole's own `hole#/` prefix; the outer ids are the ones a script without the body has. interface Survey { slowest: string; } interface Plan { groups: string[][]; } interface Verdict { pass: boolean; } const survey = await agent("勘察员").ask("列出最慢的测试文件"); const plan = await hole("决定分组", `最慢的是 ${survey.slowest}`, async () => { phase("分组"); const draft = await agent("分组员").ask(`按模块分组 ${survey.slowest}`); report({ groups: draft.groups.length }); return draft; }); const order = await hole("决定顺序"); const done = await agent("执行者").ask(`按 ${plan.groups.length} 组执行,先跑 ${order}`); return await hole("评判", `执行结果:${done}`);