Skip to content

Commit e90c721

Browse files
fix(bindings): remove early return in isImplementedBy loop (#2085)
The isImplementedBy function was returning true after finding the first matching tool, instead of checking all required tools in the binding. This caused false positives when only some required tools were present.
1 parent 45a93f9 commit e90c721

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

.cursor/worktrees.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"setup-worktree": [
3-
"bun install",
4-
"cp $ROOT_WORKTREE_PATH/apps/mesh/auth-config.json apps/mesh/auth-config.json",
5-
"cp $ROOT_WORKTREE_PATH/apps/mesh/config.json apps/mesh/config.json"
6-
]
7-
}
2+
"setup-worktree": [
3+
"bun install",
4+
"cp $ROOT_WORKTREE_PATH/apps/mesh/auth-config.json apps/mesh/auth-config.json",
5+
"cp $ROOT_WORKTREE_PATH/apps/mesh/config.json apps/mesh/config.json"
6+
]
7+
}

apps/docs/server/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const runtime = withRuntime<Env>({
2020
env: "development",
2121
});
2222

23-
return await assetsHandler(req) ?? new Response("Not found", { status: 404 });
23+
return (
24+
(await assetsHandler(req)) ?? new Response("Not found", { status: 404 })
25+
);
2426
},
2527
});
2628

packages/bindings/src/core/binder.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ export function createBindingChecker<TDefinition extends readonly ToolBinder[]>(
171171
if (!matchedTool) {
172172
return false;
173173
}
174-
return true;
175-
176174
// FIXME @mcandeia Zod to JSONSchema converstion is creating inconsistent schemas
177175
}
178176
return true;

0 commit comments

Comments
 (0)