Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Export one file helper over workspace.fs

オープン
#261 コメント 1 件 リアクション 1 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@aron-cf がすでに取り組んでいます。

2026年10月20日 から。

評価

この issue はまだ評価されていません。

説明

enhancement

Three packages carry their own copy of the same small helper over workspace.fs:

  • WorkspaceFileStore in packages/computer/src/tools/common/fs/store.ts (internal to the tools)
  • WorkspaceFiles in @cloudflare/think (packages/think/src/workspace-files.ts in cloudflare/agents)
  • createSkillWorkspaceFiles / createSkillWorkspaceAccess in agents/skills (packages/agents/src/skills/workspace.ts in cloudflare/agents)

Each one does the same things:

  • reads a file into bytes or text, returning null instead of throwing ENOENT
  • writes a file, creating its parent directories first
  • drains a readFile stream into one Uint8Array
  • 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時間
マージ済み PR(30日)
79

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudflare/computer のほかの issue

cloudflare/computer の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。