feat: harden workspace file APIs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-02 17:22:26 +08:00
co-authored by Claude Fable 5
parent c1b8982e3b
commit 04b309d3fc
18 changed files with 1262 additions and 76 deletions
+10
View File
@@ -22,3 +22,13 @@ type ReadFileResponse struct {
Path string `json:"path"`
Content string `json:"content"`
}
// FileInfoResponse is the API response for file stat.
// Path is always workspace-relative; host absolute paths are never exposed.
type FileInfoResponse struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"isDir"`
Size int64 `json:"size"`
ModTime string `json:"modTime"`
}