From 3ec2a10993d582d40a198b8794e7cc38b301e7cf Mon Sep 17 00:00:00 2001 From: root Date: Wed, 30 Sep 2026 19:29:54 +0800 Subject: [PATCH] =?UTF-8?q?docs(agent):=20=E5=B7=A1=E6=A3=80=20Skill=20?= =?UTF-8?q?=E8=A6=81=E6=B1=82=E9=9C=80=E8=A6=81=E6=89=B9=E5=87=86=E7=9A=84?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=AE=9E=E9=99=85=E8=B0=83=E7=94=A8=E4=B8=80?= =?UTF-8?q?=E6=AC=A1,=E8=A1=A5=20e16=20=E6=96=AD=E8=A8=80(FIX-9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/server/test/e2e/e16-agent-prompt-eval.test.ts | 5 +++++ packages/agent/skills/patrol/SKILL.md | 1 + 2 files changed, 6 insertions(+) diff --git a/apps/server/test/e2e/e16-agent-prompt-eval.test.ts b/apps/server/test/e2e/e16-agent-prompt-eval.test.ts index b7d8619e..83f85e02 100644 --- a/apps/server/test/e2e/e16-agent-prompt-eval.test.ts +++ b/apps/server/test/e2e/e16-agent-prompt-eval.test.ts @@ -90,6 +90,11 @@ describe.skipIf(!hasPg)("E16 智能体提示评测(fake 模型)", () => { .filter((x) => x.type === "tool_call_start") .map((x) => (x.payload as { capabilityId?: string }).capabilityId); expect(calls).toEqual(c.calls); + // 巡检那条:需要批准的检测实际调用一次(界面才有审批卡 /「批准并重试」),汇报里写「没做:…,需要你批准」 + if (id === "health") { + expect(calls.filter((x) => x === "site.health_check")).toHaveLength(1); + expect(done.get(id)!.text).toMatch(/没做:.*需要你批准/); + } // 只读调用都成功;需要批准的被拒绝 const r = done.get(id)!; diff --git a/packages/agent/skills/patrol/SKILL.md b/packages/agent/skills/patrol/SKILL.md index 4b80383a..4c741760 100644 --- a/packages/agent/skills/patrol/SKILL.md +++ b/packages/agent/skills/patrol/SKILL.md @@ -38,6 +38,7 @@ sessions: [chat, patrol, investigate, child] ## 需要批准 - site.health_check(实时检测站点)、site.refresh_login(重新登录)。没有授权时会被拒绝:汇报里写一句「没做:实时检测「站点名」,需要你批准」,界面会给批准按钮。 +- 需要批准的检查(如检测站点)不要只在汇报里写「需要你批准」:先实际调用一次,让审批卡 /「批准并重试」按钮出现在界面上,再在汇报里写一句「没做:…,需要你批准」。同一个检查只调用一次,被拒绝后不要重复调用。 - 其余都是只读,不需要批准。 ## 汇报模板