refactor(core): consolidate references (#31539)

This commit is contained in:
Dax
2026-06-09 16:08:58 +00:00
committed by GitHub
parent 0bb677cef9
commit 6566ede935
65 changed files with 687 additions and 2730 deletions
+1 -15
View File
@@ -35,7 +35,7 @@ const filesystem = Layer.succeed(
? Effect.succeed(
new FileSystem.ReadPath({
type: resolvedType,
resource: input.reference === undefined ? input.path : `${input.reference}:${input.path}`,
resource: input.path,
}),
)
: Effect.die(resolveFailure),
@@ -457,20 +457,6 @@ describe("ReadTool", () => {
}),
)
it.effect("authorizes project references with their canonical identity", () =>
Effect.gen(function* () {
const registry = yield* ToolRegistry.Service
yield* executeTool(registry, {
sessionID,
...toolIdentity,
call: { type: "tool-call", id: "call-read", name: "read", input: { path: "README.md", reference: "docs" } },
})
expect(assertions).toMatchObject([{ resources: ["docs:README.md"] }])
}),
)
it.effect("preserves unexpected resolution defects", () =>
Effect.gen(function* () {
const registry = yield* ToolRegistry.Service