Export one file helper over workspace.fs
維護者通常 1 天內回覆
@aron-cf 已經在處理了。
開始於 2026年10月20日。
評估
這個 Issue 還沒有評估資料。
描述
Three packages carry their own copy of the same small helper over workspace.fs:
WorkspaceFileStoreinpackages/computer/src/tools/common/fs/store.ts(internal to the tools)WorkspaceFilesin@cloudflare/think(packages/think/src/workspace-files.tsin cloudflare/agents)createSkillWorkspaceFiles/createSkillWorkspaceAccessinagents/skills(packages/agents/src/skills/workspace.tsin cloudflare/agents)
Each one does the same things:
- reads a file into bytes or text, returning
nullinstead of throwingENOENT - writes a file, creating its parent directories first
- drains a
readFilestream into oneUint8Array - lists a directory as plain entries
Think and the skills package also both define WORKSPACE_ROOT = "/workspace" and a helper that resolves relative paths against it. That root is Computer's convention, not theirs.
Proposal: export one helper from @cloudflare/computer, for example WorkspaceFileStore or a workspaceFiles(workspace) function, plus the workspace root constant. It should work on a Workspace, a loaded getWorkspace client and a lazy one, since it only uses fs methods that return promises. Then Think and agents/skills import it and delete their copies.
Follow-up in cloudflare/agents once this ships: replace WorkspaceFiles in Think and the skills helpers with the Computer export.
- 主要語言
- TypeScript
- 星號
- 9.7k
- 分支
- 577
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 79
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cloudflare/computer 的其他 Issue
-
worker-shell: redirected `cat` output and heredocs store non-ASCII bytes double-encoded (é becomes c3 83 c2 a9)可能已有人在做 @aron-cf 於 2 天前認領。 未關閉bug priority: high
cloudflare/computer#286 · 1 則留言 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
dofs: resolving a directory scans its children as the directory grows可能已有人在做 @aron-cf 於 17 天前認領。 未關閉bug
cloudflare/computer#236 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 30/100
cloudflare/computer#224 · 5 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
Always run the "next" computerd workflow on push to the `release` branch可能已有人在做 @aron-cf 於 22 天前認領。 未關閉bug
cloudflare/computer#222 · 2 則留言 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Workspace namespaces: more than one Workspace per Durable Object storage可能已有人在做 @aron-cf 於 22 天前認領。 未關閉enhancement
cloudflare/computer#219 · 1 則留言 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 cloudflare/computer 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
excaliburjs/Excalibur#3895 ·
維護者通常 3 天內回覆
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected可能已有人在做 @Steve-20-ai 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestamp可能已有人在做 @Gurkaran18 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 75/100
joinmarket-webui/jam#1588 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
mihaip/infinite-mac#475 ·