feat: Jev planner — TypeSafe System One 接進 session 推薦引擎(v1.7.0) - #14
Merged
Merged
Conversation
….goal) 移植 browser-use/jev-ultrafast 的「動態索引動作空間 + speculative fan-out」: RB 既有 available_actions 即為索引元素表,settle 後一次請求問 Jev 兩個 typed choice(operation / target),結果取代 heuristic 的 recommended_next_actions 並附 calibrated confidence。 - 新增 src/jev.rs:request 建構、答案驗證(同 validate_choice)、fallback - Session::with_jev(cfg, goal);commit_settle() 後 refresh_jev(),失敗非致命, 結果先算後寫,外層 step_budget 逾時不會留下半清空狀態 - LoopView 新增 planner(jev/heuristic)、planner_note;RecommendedAction.confidence? - MCP session_start 新增 goal;無 TYPESAFE_API_KEY 回 invalid_params - Env:TYPESAFE_API_KEY / TYPESAFE_MODEL / TYPESAFE_ENDPOINT - 全部 additive;rebase 到 v1.7.0(real-world)之上,版本 1.7.0 → 1.8.0;API.md、CHANGELOG 同步 - .gitignore 補 /target-*(替代 target 目錄) 驗證(rebase 後重跑):fmt / clippy -D warnings / cargo test 全綠 (97 unit + 16 session,含新 wiremock 測試);release 二進位 stdio 煙測 example.com:無 goal → heuristic、有 goal 無 key → invalid_params、 有 goal 對假 Jev 端點 → planner=jev + confidence。 Co-Authored-By: Claude Fable 5.1 <[email protected]>
JoshuaWangTW
force-pushed
the
feat/jev-planner
branch
from
September 18, 2026 14:32
1d7e940 to
582ab81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
移植 browser-use/jev-ultrafast 的核心技術:「動態索引動作空間 + speculative fan-out」。RB 既有的
available_actions(stableaction_id)就是那張索引元素表;本 PR 把決策引擎從啟發式換成 TypeSafe Jev(System One 模型),只推薦、不執行。session_start新增goal。每步 settle 後一次請求問 Jev 兩個 typed choice:operation(follow/submit_form/done/blocked,只列有候選的)與 target(依 operation 的action_id候選)。loop.recommended_next_actions,附 calibratedconfidence。新增loop.planner(jev/heuristic)與loop.planner_note(Jev 失敗原因)。validate_choice:id 在候選內、分佈總和 ≈ 1、argmax 一致;任一不符 = 不推薦、退回啟發式。dangerous。守 CLAUDE.md 紅線(不做完整 JS browser / 不自動執行)。TYPESAFE_API_KEY(無 key 帶 goal 回invalid_params)、TYPESAFE_MODEL、TYPESAFE_ENDPOINT。jsonfeature,改手動serde_json)。全部 additive,1.6.0 → 1.7.0;API.md、CHANGELOG 同步。資料外送
帶
goal時每步送{url, title, text ≤ 6000 字, elements(action_id/kind/label/dangerous), 最近 10 個 op}到api.typesafe.ai。不帶goal行為與 1.6 完全相同。驗證
cargo fmt --all -- --check/cargo clippy --all-targets -- -D warnings通過cargo test全綠:84 unit(含 jev.rs 4 個離線測試)+ 15 session(新增 wiremock 假 Jev 端點測試:正常路徑取 form_0 confidence 0.85;端點死掉退回 heuristic 並附 note)planner: heuristicgoal requires TYPESAFE_API_KEY in the MCP server environmentplanner: jev,{"action_id":"link_0","confidence":0.88,"why":"jev: follow (p=0.90) → Learn more (p=1.00)"}offered_operations()共用。未做
B 方案(
session_run自動 GET 迴圈)等拿到真 key 評估 Jev 判斷品質後再議。TypeSafe 目前 invite-only,尚無真實 key 實測。🤖 Generated with Claude Code