This repository was archived by the owner on Nov 9, 2026. It is now read-only.
Repository navigation
Conversation
✅ Deploy Preview for tarko canceled.
|
✅ Deploy Preview for agent-tars-docs canceled.
|
2 of 4 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1978
create_directorydocuments recursive creation, but it calls the shared path validator beforefs.mkdir(..., { recursive: true }). When more than one path component is missing, validation rejects the immediate parent and the recursive mkdir is never reached.This change adds an opt-in
allowMissingParentspath forcreate_directoryonly. It walks upward to the nearest existing ancestor only forENOENT, verifies that ancestor's real path remains inside an allowed directory, and preserves the existing validation behavior for every other filesystem tool. Existing symlink targets outside the allowed root are still rejected.Verification
pnpm --filter @agent-infra/mcp-server-filesystem test— 5 passed.pnpm exec prettier --checkandpnpm exec eslinton changed files — passed.pnpm exec tsc -p packages/agent-infra/mcp-servers/filesystem/tsconfig.json --noEmit— passed.@agent-infra/logger,mcp-http-server, and@agent-infra/mcp-server-filesystemin dependency order; ESM, CJS, and declaration output succeeded.git diff --check— passed.The full workspace install also attempted an Electron postinstall download, which timed out externally; Electron is not used by this package and the focused dependency/build checks above completed successfully.
Checklist
AI assistance
Codex assisted with issue investigation and test design. The submitted implementation and every changed line were reviewed against the issue, repository conventions, and the validation results above.