Unified · Split
| @@ -73,6 +73,9 @@ import { · 72 unmodified lines | ||
| 73 | 73 | import { |
| 74 | 74 | loadRuntimeLocalScopePolicies, |
| 75 | 75 | } from "../../../policies/operations"; |
| 76 | +import { | |
| 77 | + RuntimeLocalScopeService, | |
| 78 | +} from "../../scope/runtime-context"; | |
| 76 | 79 | import { |
| 77 | 80 | provideRuntimeLocalScope, |
| 78 | 81 | } from "./local"; |
| @@ -177,9 +180,19 @@ export const createScopeToolInvoker = (input: { · 98 unmodified lines | ||
| 177 | 180 | return catalog; |
| 178 | 181 | }, |
| 179 | 182 | filterDiscoverResults: async (results: readonly DiscoverResultItem[]) => { |
| 183 | + if (!input.runtimeLocalScope) { | |
| 184 | + return results; | |
| 185 | + } | |
| 186 | + | |
| 180 | 187 | const { policies } = await Effect.runPromise( |
| 181 | 188 | loadRuntimeLocalScopePolicies(input.scopeId).pipe( |
| 182 | 189 | Effect.provide(persistedToolRuntimeLayer), |
| 190 | + Effect.provide( | |
| 191 | + Layer.succeed( | |
| 192 | + RuntimeLocalScopeService, | |
| 193 | + input.runtimeLocalScope, | |
| 194 | + ), | |
| 195 | + ), | |
| 183 | 196 | ), |
| 184 | 197 | ); |
| 185 | 198 | |