Agent 工具
Claude Code Stop hook 用于阻止未验证的 done,读取记录寻找证据,向 Jev 询问一次,其他情况默认通过。
Claude Code Stop hook that blocks an unverified done: reads the transcript for evidence, asks Jev once, fails open on everything else
const base = env.JEV_BASE_URL || "https://api.typesafe.ai";链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
claims_done是/否Does `final_message` present the requested work as finished or working?
claims_verified是/否Does `final_message` claim that tests, a build, or other checks were run and passed?
verification_applies是/否Would running the project's tests, build, or lint be a meaningful way to check the work that `task` asks for?
outcome选项What does `final_message` report about `task`?
complete — The work is finishedpartial — Progress was made and remaining work is namedblocked — A blocker is reported or the user is asked somethingother — None of theseimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
claims_done: { type: 'boolean', instructions: 'Does `final_message` present the requested work as finished or working?' },
claims_verified: { type: 'boolean', instructions: 'Does `final_message` claim that tests, a build, or other checks were run and passed?' },
verification_applies: { type: 'boolean', instructions: 'Would running the project\'s tests, build, or lint be a meaningful way to check the work that `task` asks for?' },
outcome: { type: 'choice', instructions: 'What does `final_message` report about `task`?',
criteria: { complete: 'The work is finished', partial: 'Progress was made and remaining work is named', blocked: 'A blocker is reported or the user is asked something', other: 'None of these' } },
},
});