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
parent f2b39f1d73
commit 47e40c255f
8 changed files with 18 additions and 89 deletions
+3 -3
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(
+3 -3
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)