Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Export one file helper over workspace.fs

Offen
#261 1 Kommentar 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@aron-cf arbeitet bereits daran.

Seit 20.10.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
9.7k
Forks
577
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
79

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cloudflare/computer

Alle Issues in cloudflare/computer

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.