v0.4.0 -> v0.5.0
Summary
Add three new built-in tools (fetch_page, search_web, calculate) and a headless Chrome browser subsystem, bringing the total to 14 tools. Simultaneously refactor the tool executor routing layer by extracting per-package Routes functions, improving modularity and Context propagation across the execution pipeline.
翻譯
新增三個內建工具(`fetch_page`、`search_web`、`calculate`)與 Chrome 無頭瀏覽器子系統,工具總數達 14 個。同步重構工具執行器路由層,將各套件邏輯抽離為獨立 `Routes` 函式,改善模組化程度與整個執行管線的 Context 傳遞。Changes
FEAT
- Add
fetch_pagetool: launch headless Chrome with stealth JS injection, wait for full JS render, return page content as Markdown - Add
search_webtool: concurrent Brave Search + DuckDuckGo query with deduplication, time-range filtering, and configurable result limit (max 50) - Add
calculatetool: evaluate math expressions supporting+,-,*,/,%,^(power), parentheses, and functions (sqrt,abs,pow,ceil,floor,round,log,log2,log10,sin,cos,tan) - Add
search_contentas a first-class file package tool, moved from executor dispatch intofilepackage
翻譯
- 新增
fetch_page工具:以 stealth JS 注入啟動 Chrome 無頭瀏覽器,等待完整 JS 渲染後以 Markdown 格式返回頁面內容 - 新增
search_web工具:並行查詢 Brave Search 與 DuckDuckGo,支援去重、時間範圍過濾及可設定的結果數量上限(最大 50) - 新增
calculate工具:計算數學表達式,支援四則運算、%、^(冪次)、括號及數學函式 - 將
search_content正式遷移至file套件,成為獨立工具路由
REFACTOR
- Extract
file.Routesfunction to consolidate all file tool dispatch (read,list,glob,write,patch,search) into thefilepackage, removing inline logic from executor - Extract
apis.Routesfunction to consolidate API tool dispatch (yahoo_finance,google_rss,weather,http_request,fetch_page,search_web) into theapispackage - Rename file tool source files to shorter names (
readFile.go→read.go,listFiles.go→list.go, etc.) for consistency - Refactor tool confirmation flow to synchronous reply-channel pattern; fix Context cancellation propagation through Execute loop
- Pass
context.Contextthroughtools.Executecall chain to enable per-tool timeout and cancellation
翻譯
- 抽���
file.Routes函式,將所有檔案工具 dispatch 邏輯(讀取、列表、glob、寫入、patch、搜尋)統一至file套件 - 抽離
apis.Routes函式,將 API 工具 dispatch 統一至apis套件 - 將檔案工具原始碼重新命名為較簡短的形式(
readFile.go→read.go等)以保持一致性 - 重構工具確認流程為同步回覆通道模式;修正 Execute 迴圈中的 Context 取消傳遞
- 將
context.Context傳入tools.Execute呼叫鏈,支援每個工具的逾時與取消
UPDATE
- Change Copilot default model from
gpt-5-minitogpt-4.1 - Increase
run_commandexecution timeout from 120s to 300s - Update system prompt and base system prompt to document new tools and revised execution guidelines
- Add raw-body shortcut in
utils.GETandutils.POSTgeneric functions: ifTisstring, response body is read as plain text without JSON/XML decode
翻譯
- 將 Copilot 預設模型從
gpt-5-mini改為gpt-4.1 - 將
run_command執行逾時從 120 秒增加至 300 秒 - 更新系統提示詞與基礎系統提示詞,補充新工具說明與修訂執行指引
- 在
utils.GET和utils.POST泛型函式中加入純文字快取路徑:若T為string,直接以��始文字讀取 Response Body,略過 JSON/XML 解碼
Files Changed
| File | Status | Tag |
|---|---|---|
internal/tools/browser/load.go |
Added | FEAT |
internal/tools/browser/extract.go |
Added | FEAT |
internal/tools/browser/embed/stealth.js |
Added | FEAT |
internal/tools/browser/embed/listener.js |
Added | FEAT |
internal/tools/apis/searchWeb/SearchWeb.go |
Added | FEAT |
internal/tools/apis/searchWeb/fetchDDG.go |
Added | FEAT |
internal/tools/calculator/calculate.go |
Added | FEAT |
internal/tools/file/search.go |
Added | FEAT |
internal/tools/embed/tools.json |
Modified | FEAT |
internal/tools/apis/routes.go |
Added | REFACTOR |
internal/tools/file/routes.go |
Added | REFACTOR |
internal/tools/executor.go |
Modified | REFACTOR |
internal/tools/tools.go |
Modified | REFACTOR |
internal/agents/exec.go |
Modified | REFACTOR |
internal/tools/file/glob.go |
Renamed | REFACTOR |
internal/tools/file/list.go |
Renamed | REFACTOR |
internal/tools/file/patch.go |
Renamed | REFACTOR |
internal/tools/file/read.go |
Renamed | REFACTOR |
internal/tools/file/write.go |
Renamed | REFACTOR |
internal/agents/provider/copilot/send.go |
Modified | UPDATE |
internal/tools/tools.go |
Modified | UPDATE |
internal/agents/prompt/sysPrompt.md |
Modified | UPDATE |
internal/agents/prompt/sysPromptBase.md |
Modified | UPDATE |
internal/agents/types/event.go |
Modified | UPDATE |
internal/utils/utils.go |
Modified | UPDATE |
internal/tools/apis/weatherReport/fetch.go |
Modified | UPDATE |
cmd/cli/main.go |
Modified | UPDATE |
doc.md |
Modified | DOC |
doc.zh.md |
Modified | DOC |
README.md |
Modified | DOC |
README.zh.md |
Modified | DOC |
go.mod |
Modified | CHORE |
go.sum |
Modified | CHORE |
Generated by SKILL