Agent 工具
基于TypeSafe System One,为Antigravity、Cursor、Claude Code等AI编码助手提供快速语义代码搜索和差异审计功能。
Fast semantic code search & diff sanity auditor for AI coding assistants (Antigravity, Cursor, Claude Code) powered by TypeSafe System One.
greenyamao/Antigravity-mcp-semantic-search-with-TypeSafeAi ↗
return f"🌐 TypeSafe Connection Error: Unable to reach https://api.typesafe.ai. Check your network or proxy settings ({err_str})."链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
scope_alignment打分Rate how well this diff aligns with the requested task without unnecessary modifications:
0 — Minimal & focused: only requested modifications were made1 — Cascading changes: extra files/state touched to support the requested feature2 — Severe scope creep: unrelated refactors, deleted logic, or excessive changestouches_state是/否Does this diff modify global application state, stores, contexts, or database schemas?
breaks_contracts是/否Does this diff alter public function/component signatures, exported methods, or prop types?
removes_defenses是/否Does this diff remove error handling, try/catch blocks, null/undefined checks, or input validations?
leftover_debug是/否Does this diff contain leftover debugging code such as print statements, console.log calls, hardcoded test strings, or unhandled TODOs?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
scope_alignment: { type: 'score', instructions: 'Rate how well this diff aligns with the requested task without unnecessary modifications:',
criteria: ['Minimal & focused: only requested modifications were made', 'Cascading changes: extra files/state touched to support the requested feature', 'Severe scope creep: unrelated refactors, deleted logic, or excessive changes'] },
touches_state: { type: 'boolean', instructions: 'Does this diff modify global application state, stores, contexts, or database schemas?' },
breaks_contracts: { type: 'boolean', instructions: 'Does this diff alter public function/component signatures, exported methods, or prop types?' },
removes_defenses: { type: 'boolean', instructions: 'Does this diff remove error handling, try/catch blocks, null/undefined checks, or input validations?' },
leftover_debug: { type: 'boolean', instructions: 'Does this diff contain leftover debugging code such as print statements, console.log calls, hardcoded test strings, or unhandled TODOs?' },
},
});