Repository navigation
fix(deepagents): list nested mounts as child directories in CompositeBackend.ls - #987
Open
Mihir Inamdar (inamdarmihir) wants to merge 1 commit into
Open
Mihir Inamdar (inamdarmihir) wants to merge 1 commit into
Mihir Inamdar (inamdarmihir) wants to merge 1 commit into
Conversation
…Backend.ls
ls("/workspace") with a route at /workspace/memories/ asked only the
default backend, so the mount was missing from its parent, while ls("/")
listed the whole nested mount path as a root entry. An agent walking the
tree one directory at a time could not discover the mounted backend.
Add the immediate child directory of every route below the listed path,
at the root and below it, skipping paths the backend already reported.
This also covers a mount nested inside another mount. The default
backend's errors still propagate.
Fixes langchain-ai#886
Authored by Mihir
🦋 Changeset detectedLatest commit: 213caeb The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Mihir Inamdar (@inamdarmihir) is attempting to deploy a commit to the LangChain Team on Vercel. A member of the Team first needs to authorize it. |
deepagents-acp
deepagents
@langchain/sandbox-standard-tests
@langchain/daytona
@langchain/deno
@langchain/modal
@langchain/node-vfs
@langchain/quickjs
commit: |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #886.
Problem
CompositeBackend.lshad two cases: a path inside a route, and the root. With a route at/workspace/memories/:ls('/workspace')fell through to the default backend only, somemories/was missing from its parent.ls('/')listed the full nested mount path/workspace/memories/as a root entry, instead of/workspace/.An agent walking the tree one directory at a time could not discover the mounted backend.
Change
mountChildDirsandwithMountDirsadd the immediate child directory of every route below the listed path, skipping paths the backend already reported./a/and/a/b/)./memories/still appears at the root exactly once.deepagents.ls('/workspace')is now[/workspace/local.txt, /workspace/memories/], andls('/')is[/workspace/].Tests
Six new tests under
CompositeBackend.ls with nested mounts. Five of them fail on the old implementation and pass now; the sixth, which checks that the default backend's error is returned, pins existing behavior and passes on both.libs/deepagentsunit tests: 1702 passed, 1 skipped.oxfmt --checkis clean.This is separate from #887 (
glob), which I'm sending as its own PR.Authored by Mihir