Skip to content

[pull] main from modelcontextprotocol:main - #334

Merged
pull[bot] merged 4 commits into
threatcode:mainfrom
modelcontextprotocol:main
Aug 28, 2026
Merged

[pull] main from modelcontextprotocol:main#334
pull[bot] merged 4 commits into
threatcode:mainfrom
modelcontextprotocol:main

Conversation

@pull

@pull pull Bot commented Aug 28, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nulone and others added 4 commits August 27, 2026 19:17
Return '0 B' for negative byte values instead of 'NaN B'.
File sizes cannot be negative, so this is a safe default.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…cription cleanup (#4104)

resources/templates.ts:
- `parseResourceId` had a guard that compared the URI against both
  `textUriBase` and `blobUriBase` with `&&`. Those prefixes are mutually
  exclusive, so the condition is always false and the branch is dead.
  Drop it; the SDK's template-based routing already guarantees the URI
  prefix is one of the two before the handler runs. The remaining
  positive-integer check on `resourceId` is preserved.

resources/subscriptions.ts:
- `sendSimulatedResourceUpdates` had an `else` branch that called
  `subscribers.delete(sessionId)` whenever the session wasn't in a URI's
  subscriber set, with a comment claiming the session had disconnected.
  That conclusion doesn't follow — a session not subscribed to URI A
  can still be subscribed to URI B — and the delete is a no-op when
  the element is absent anyway. Remove the branch.

No behavioral change. Existing 95 / 95 tests in `__tests__` still pass.

Co-authored-by: Jia Xuan <1060996408+jiaxuan@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…3245)

* test(filesystem): add directory_tree MCP SDK regression coverage

* docs(filesystem): drop troubleshooting note from README
…ations (#4115)

* fix(filesystem): preserve file permissions during write and edit operations

The atomic write pattern (write temp file + rename) replaces the original
inode, causing the new file to have default 0644 permissions regardless of
what the original file had. This breaks executable scripts and other files
with non-default permissions.

Fix: capture stat.mode before writing and restore it with chmod after rename.

Fixes both writeFileContent() and applyFileEdits().

* fix(filesystem): mask chmod mode and keep chmod failure from failing the write

Pass origStats.mode & 0o777 to chmod instead of the full st_mode. Move
the chmod out of the try whose catch unlinks the temp file and rethrows,
since rename has already succeeded by then. Add a test that an EPERM
from chmod does not reject the write.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Wo28CHPXyM3DHoLWvKnCK

---------

Co-authored-by: Dustin Rudiger <drudiger@apple.com>
Co-authored-by: olaservo <olahungerford@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Aug 28, 2026
@pull pull Bot added the ⤵️ pull label Aug 28, 2026
@pull
pull Bot merged commit 562feeb into threatcode:main Aug 28, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants