Skip to content

Let Notes tools read content from files - #470

Merged
panarch merged 1 commit into
mainfrom
feat/note-content-path
Oct 27, 2026
Merged

panarch merged 1 commit into
mainfrom
feat/note-content-path

Conversation

@panarch

@panarch panarch commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Saving an existing file as a Note currently makes agents resend its entire content. Add contentPath to create_note and update_note_content as an alternative to inline content; each call must supply exactly one.

Relative paths resolve from the calling Task's effective working directory, including managed worktrees. Absolute paths need no Task cwd lookup. Resolved targets must remain inside the server's RootedFs root, allowing sibling directories and other worktrees within that boundary.

Read regular UTF-8 files up to 1 MiB without changing their content. Descriptor-relative opens refuse replacement symlinks, and bounded reads enforce the limit even if a file grows. Reads finish before the store transaction; updates retain the transactional expectedContentVersion check. Failed reads or version conflicts leave Notes unchanged.

Validation completed locally on macOS:

  • cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, and cargo test --locked.
  • Focused Notes tests and production coverage review, including path escapes, replacement races, byte limits, exact content preservation, version conflicts, and persisted state after reopening.
  • Codex/Grok HTTP MCP and Claude bridge tests; live installed Codex CLI and Claude Haiku file-input tests.
  • Documentation contract tests and macOS app contract tests.
  • Final description formatting preserves all 11 changed strings exactly; all 7 catalog tests pass.

Native Linux execution and a live Grok CLI session were not run.

Closes #469.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-note-content-path-caffold.taehoon-moon.workers.dev (commit 5a5f5dd)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9ee051e4-caffold.taehoon-moon.workers.dev 5a5f5dd 2026-10-27T11:34:03.514Z Visit the dashboard ↗

@panarch panarch self-assigned this Oct 27, 2026
@panarch
panarch merged commit 612572f into main Oct 27, 2026
10 checks passed
@panarch
panarch deleted the feat/note-content-path branch October 27, 2026 11:51
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.

Let the Notes tools take a Note's content from a file

1 participant