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 于 21 天前认领。 未关闭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
-
Replace discontinued crypto-js in the theme可能已有人在做 @aelmanaa 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
PaloAltoNetworks/docusaurus-openapi-docs#1689 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
solana-foundation/solana-web3.js#4015 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
documentation
难度 1/5 1-3 小时 新手友好度 90/100
ivopogace/opencode-courier#422 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
chapel-lang/chapel-vscode#158 ·
维护者通常 1 天内回复