@compilr-dev/sdk 0.1.27 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -297,7 +297,9 @@ export function createMetaTools(registry, options) {
|
|
|
297
297
|
// -------------------------------------------------------------------------
|
|
298
298
|
// Fallback handler factory
|
|
299
299
|
// -------------------------------------------------------------------------
|
|
300
|
-
function createFallback(
|
|
300
|
+
function createFallback(fallbackOptions) {
|
|
301
|
+
// Inherit options from createMetaTools() if not overridden
|
|
302
|
+
const effectiveOptions = fallbackOptions ?? options;
|
|
301
303
|
return async (name, input) => {
|
|
302
304
|
// Check if tool exists in registry
|
|
303
305
|
const tool = registry.getTool(name);
|
|
@@ -307,7 +309,7 @@ export function createMetaTools(registry, options) {
|
|
|
307
309
|
// Check tool filter
|
|
308
310
|
if (!registry.isToolAllowed(name)) {
|
|
309
311
|
// Give consumer a chance to load the capability and update the filter
|
|
310
|
-
if (
|
|
312
|
+
if (effectiveOptions?.onFilteredTool?.(name) && registry.isToolAllowed(name)) {
|
|
311
313
|
// Filter updated — fall through to execute
|
|
312
314
|
}
|
|
313
315
|
else {
|