SDK 与客户端
Sac-Y/Jev-cu 将 Computer Use 的下一步操作交给 Jev,从界面文字中选择元素和动作,Codex Computer Use 负责界面读取和执行,本地策略拦截敏感操作,只传文字不传截图。
把 Computer Use 的「下一步点哪里」交给 Jev(TypeSafe System One):Jev 从界面文字候选中选元素、动作、完成度与风险,Codex Computer Use 负责读取界面与执行,本地策略门槛拦截敏感操作。只传文字,不传截图。
export const DEFAULT_ENDPOINT = "https://api.typesafe.ai/v1/systemone";链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
action选项What is the next action type?
click_element — Click the chosen elementclick_at — Click a canvas position (coordinates come from the planner)drag — Drag on the canvas (coordinates come from the planner)set_value — Replace the value of a text inputtype_text — Type the provided textpress_key — Press a keyboard keyscroll — Scroll the current viewwait — Wait for the UI to updateask_user — Stop and ask the userdone是/否Is the goal already visibly achieved in the current UI state?
risk是/否Does the next action require explicit user confirmation (delete data, send/submit, pay/subscribe, change permissions, upload/share, solve CAPTCHA, install software, change system settings, enter credentials)?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
action: { type: 'choice', instructions: 'What is the next action type?',
criteria: { click_element: 'Click the chosen element', click_at: 'Click a canvas position (coordinates come from the planner)', drag: 'Drag on the canvas (coordinates come from the planner)', set_value: 'Replace the value of a text input', type_text: 'Type the provided text', press_key: 'Press a keyboard key', scroll: 'Scroll the current view', wait: 'Wait for the UI to update', ask_user: 'Stop and ask the user' } },
done: { type: 'boolean', instructions: 'Is the goal already visibly achieved in the current UI state?' },
risk: { type: 'boolean', instructions: 'Does the next action require explicit user confirmation (delete data, send/submit, pay/subscribe, change permissions, upload/share, solve CAPTCHA, install software, change system settings, enter credentials)?' },
},
});