refactor(core): simplify search root protocol (#31060)

This commit is contained in:
Kit Langton 2026-06-05 23:20:06 -04:00 committed by GitHub
commit 09d9cf01f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 18 additions and 89 deletions

View file

@ -45,8 +45,8 @@ const definition = Tool.make({
})
/**
* Location-scoped glob leaf. FileSystem selects a canonical root for
* permission metadata; LocationSearch owns containment and traversal.
* Location-scoped glob leaf. FileSystem supplies canonical permission metadata;
* LocationSearch resolves the current root and owns containment and traversal.
*
* TODO: Revisit root-specific search permission resources if named-reference policy needs independent allow/deny rules.
*/
@ -73,7 +73,7 @@ export const layer = Layer.effectDiscard(
limit: parameters.limit,
},
})
return yield* search.files(parameters, root)
return yield* search.files(parameters)
}).pipe(
Effect.catchCause((cause) =>
Effect.fail(

View file

@ -60,8 +60,8 @@ const definition = Tool.make({
})
/**
* Location-scoped grep leaf. FileSystem selects a canonical root for
* permission metadata; LocationSearch owns containment and ripgrep execution.
* Location-scoped grep leaf. FileSystem supplies canonical permission metadata;
* LocationSearch resolves the current root and owns containment and ripgrep execution.
*
* TODO: Revisit root-specific search permission resources if named-reference policy needs independent allow/deny rules.
*/
@ -89,7 +89,7 @@ export const layer = Layer.effectDiscard(
limit: parameters.limit,
},
})
return yield* search.grep(parameters, root)
return yield* search.grep(parameters)
}).pipe(
Effect.catchCause((cause) => {
const error = Cause.squash(cause)