Skip to content

sdk/typescript: Add appendFile to FileSystem interface#322

Open
taowen-paraflow wants to merge 1 commit intotursodatabase:mainfrom
taowen-paraflow:feat/appendfile-sdk-typescript
Open

sdk/typescript: Add appendFile to FileSystem interface#322
taowen-paraflow wants to merge 1 commit intotursodatabase:mainfrom
taowen-paraflow:feat/appendfile-sdk-typescript

Conversation

@taowen-paraflow
Copy link

Summary

  • Add appendFile method to the FileSystem interface with JSDoc documentation
  • Implement true append (write at current file size offset) for AgentFS — no read-modify-write
  • Implement true append for Cloudflare integration using writeDataAtOffset() helper inside transactionSync()
  • Simplify just-bash integration to delegate directly to agentFs.appendFile()
  • Add 6 tests each in tests/filesystem.test.ts and tests_browser/filesystem.test.ts

Test plan

  • npx vitest run tests/filesystem.test.ts — 88 tests pass
  • npx vitest run --config vitest.browser.config.ts — 190 tests pass (Chromium + Firefox)
  • Tests cover: append to existing file, create if not exists, binary data, base64 encoding, multiple sequential appends, EISDIR error

🤖 Generated with Claude Code

Implement true append (pwrite at current size) instead of
read-modify-write for AgentFS, Cloudflare, and just-bash integrations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant