v0.1.0 -> v0.2.0
Summary
Add complete filesystem toolchain (list_files, glob_files, write_file, search_content, run_command) with command whitelisting, safe delete mechanism, interactive confirmation prompts, and refactor Scanner architecture with Copilot authentication flow improvements.
翻譯
新增完整檔案系統工具鏈(list_files、glob_files、write_file、search_content、run_command),包含指令白名單、安全刪除機制、互動式確認提示,並重構 Scanner 架構與 Copilot 認證��程。Changes
FEAT
- Add
list_filestool with recursive directory listing and exclusion support - Add
glob_filestool with**wildcard pattern matching - Add
write_filetool for file creation and overwriting - Add
search_contenttool with regex pattern matching and file filtering - Add
run_commandtool with command whitelist, shell operator support, and 120s timeout - Add safe delete mechanism that moves files to
.Trashinstead of permanent deletion - Add interactive confirmation prompt (promptui) before each tool call execution
- Add
--allowCLI flag to skip tool call confirmation in auto mode - Add command whitelist covering git, go, node, python, file operations, and text processing
- Add directory exclusion mechanism for
.git,node_modules,vendor,dist, etc.
翻譯
- 新增
list_files工具,支援遞迴目錄列表與排除機制 - 新增
glob_files工具,支援**萬用字元模式比對 - 新增
write_file工具,用於檔案建立與覆寫 - 新增
search_content工具,支援正規表示式模式比對與檔案篩選 - 新增
run_command工具,含指令白名單、shell 操作符支援與 120 秒逾時 - 新增安全刪除機制,將檔案移至
.Trash而非永久刪除 - 新增工具呼叫前的互動式確認提示(promptui)
- 新增
--allowCLI 旗標以在自動模式下跳過工具呼叫確認 - 新增指令白名單,涵蓋 git、go、node、python、檔案操作與文字處理
- 新增目錄排除機制,排除
.git、node_modules、vendor、dist等
REFACTOR
- Restructure Scanner to auto-scan on creation and expose
Skillsas exported field - Merge
skill.gotypes intoscanner.goand remove redundant file - Convert
CopilotLoginfrom package function to(*CopilotAgent).Loginmethod receiver - Move token persistence logic from
LogintogetAccessTokenfor atomic save - Rename
checkAndRefresnTokentocheckExpiresand extractrefreshmethod - Replace inline system prompt string with embedded
sysPrompt.mdtemplate using{{.WorkPath}}/{{.SkillPath}}/{{.Content}}placeholders - Split tool implementations into
file.go(filesystem ops) andtools.go(command execution) - Rename
getPathtogetFullPathand addisExcludepath filtering
翻譯
- 重構 Scanner 為建立時自動掃描並將
Skills匯出為公開欄位 - 將
skill.go的型別合併至scanner.go並移除冗餘檔案 - 將
CopilotLogin從套件函式轉為(*CopilotAgent).Loginmethod receiver - 將 token 持久化邏輯從
Login移至getAccessToken實現原子性儲存 - 將
checkAndRefresnToken重新命名為checkExpires並抽離refresh方法 - 以 embedded
sysPrompt.md模板取代內嵌 system prompt 字串,使用{{.WorkPath}}/{{.SkillPath}}/{{.Content}}佔位符 - 將工具實作拆分為
file.go(檔案系統操作)與tools.go(指令執行) - 將
getPath重新命名為getFullPath並新增isExclude路徑過濾
UPDATE
- Increase
MaxToolIterationsfrom 20 to 128 for complex skill workflows - Add
allowAll boolparameter toExecutemethod signature - Add context timeout (30s) for token refresh on startup
- Improve error wrapping with descriptive
fmt.Errorf("%w")across all client methods
翻譯
- 將
MaxToolIterations從 20 提高至 128 以支援複雜 skill 工作流程 - 在
Execute方法簽章中新增allowAll bool參數 - 新增啟動時 token 刷新的 context timeout(30 秒)
- 改善所有 client 方法的錯誤包裝,使用描述性
fmt.Errorf("%w")
Files Changed
| File | Status | Tag |
|---|---|---|
cmd/cli/main.go |
Modified | FEAT |
go.mod |
Modified | CHORE |
go.sum |
Added | CHORE |
internal/client/copilot.go |
Modified | REFACTOR |
internal/client/exec.go |
Modified | FEAT |
internal/client/login.go |
Modified | REFACTOR |
internal/client/refresh.go |
Modified | REFACTOR |
internal/client/sysPrompt.md |
Added | REFACTOR |
internal/skill/parser.go |
Modified | REFACTOR |
internal/skill/scanner.go |
Modified | REFACTOR |
internal/skill/skill.go |
Deleted | REFACTOR |
internal/tools/executor.go |
Modified | FEAT |
internal/tools/file.go |
Added | FEAT |
internal/tools/tools.go |
Added | FEAT |
internal/tools/tools.json |
Modified | UPDATE |
README.md |
Modified | DOC |
README.zh.md |
Modified | DOC |
Generated by SKILL