Skip to content

dofs: Add bounded filesystem primitives - #79

Open
aron-cf wants to merge 6 commits into
mainfrom
stack/improve-tools-01-dofs-primitives
Open

dofs: Add bounded filesystem primitives#79
aron-cf wants to merge 6 commits into
mainfrom
stack/improve-tools-01-dofs-primitives

Conversation

@aron-cf

@aron-cf aron-cf commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Stack 1 of 7. Base: main. Head: stack/improve-tools-01-dofs-primitives.

The storage filesystem could not page directories after merging pending writes, expose bounded byte reads through its main facade, match single-character globs, or bound search results. Tool callers therefore had to transfer too much data or implement behavior outside the authoritative storage layer.

This change adds stable name-ordered directory pages with size and modification time, including entries held in write buffers. It exposes byte-range reads on WorkspaceFilesystem, adds ? glob matching, and extends grep with fixed-string and regular-expression modes, explicit case handling, context lines, limits, and offsets. Existing grep callers retain literal, case-sensitive defaults.

Verification

npm test --workspace @cloudflare/dofs
npm run typecheck --workspace @cloudflare/dofs
npm run build --workspace @cloudflare/dofs

The next stack part carries these bounded primitives through the Computer facade and AI tool adapters.

@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

馃 Changeset detected

Latest commit: 80d82a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/dofs Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Thanks for your interest in Cloudflare Computer.

This repository does not accept unsolicited pull requests. Please use one of the accepted contribution paths instead:

If a maintainer asked you to open this pull request, they can add the allow-pr label and reopen it.

@github-actions github-actions Bot closed this Aug 7, 2026
@aron-cf aron-cf added the allow-pr Allow a PR to remain open. label Aug 7, 2026
@aron-cf aron-cf reopened this Aug 7, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@cloudflare/computer@79

commit: 80d82a8

@aron-cf
aron-cf marked this pull request as ready for review August 7, 2026 15:20
aron-cf added 6 commits August 7, 2026 15:23
Return file size and modification time from readdir, and apply limit and
offset after pending write buffers are merged into stable name order.
Add readRange to WorkspaceFilesystem so callers can read a byte window
without materializing or transferring the whole file.
Teach find that a question mark matches one non-separator character so
its glob surface covers the pattern documented by the AI find tool.
Keep literal, case-sensitive defaults while adding regular expressions,
explicit case handling, numbered context, and limit and offset controls
for tool callers.
Keep the new pagination tests compliant with the repository-wide Biome
import ordering check.
Record the directory, range-read, glob, and grep additions with the
storage package that introduces them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-pr Allow a PR to remain open.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant