refactor(core): simplify search root protocol (#31060)
This commit is contained in:
parent
4ac4df448a
commit
09d9cf01f9
8 changed files with 18 additions and 89 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue