Files
deepagentsjs/examples
Hunter Lovell dd142fe4fc feat(deepagents): allow write_file to overwrite files (#674)
## Summary

`write_file` now creates missing files and replaces existing files
entirely, removing the previous create-only error path while preserving
write permissions and symlink protections.

## Changes

### deepagents filesystem backends

- Updated `FilesystemBackend`, `StateBackend`, `StoreBackend`,
`BaseSandbox`, and `node-vfs` write behavior to allow full-file
replacement on existing paths.
- Preserved path safety and symlink protections in filesystem-backed
writes.
- Removed the sandbox existence precheck so writes rely on the
upload/write transport.

### Tool prompts and examples

- Aligned the `write_file` tool description and schema text with the
Python SDK wording.
- Updated sandbox example prompts so `write_file` is described as
creating or fully replacing files.

### Tests and evals

- Updated backend, middleware, and shared sandbox standard tests that
previously expected an existing-file error.
- Added overwrite coverage for filesystem, sandbox, state, store,
middleware, node-vfs, and file-operation evals.

### Release

- Added a changeset for `deepagents` documenting the new overwrite
behavior.
2026-07-22 16:10:05 -07:00
..
2025-08-13 17:59:04 -04:00