@anuma/sdk 6.31.0 → 6.31.1

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.
@@ -2261,14 +2261,14 @@ async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embed
2261
2261
  const alwaysInclude = clientTools.filter(isAlwaysIncluded);
2262
2262
  const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
2263
2263
  if (filterCandidates.length === 0) {
2264
- return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
2264
+ return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set(), matchedSetNames: /* @__PURE__ */ new Set() };
2265
2265
  }
2266
2266
  if (!promptEmbeddings && noEmbeddingsReason === "error") {
2267
- return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
2267
+ return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set(), matchedSetNames: /* @__PURE__ */ new Set() };
2268
2268
  }
2269
2269
  if (!promptEmbeddings) {
2270
2270
  if (activeToolSets.length === 0) {
2271
- return { tools: [], activatedSetNames: /* @__PURE__ */ new Set() };
2271
+ return { tools: [], activatedSetNames: /* @__PURE__ */ new Set(), matchedSetNames: /* @__PURE__ */ new Set() };
2272
2272
  }
2273
2273
  const allSets = extraToolSets.length > 0 ? [...BUILT_IN_TOOL_SETS, ...extraToolSets] : BUILT_IN_TOOL_SETS;
2274
2274
  const activeSets = allSets.filter((s) => activeToolSets.includes(s.name));
@@ -2278,7 +2278,8 @@ async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embed
2278
2278
  ...alwaysInclude,
2279
2279
  ...filterCandidates.filter((t) => stickyMembers.has(getToolName(t)))
2280
2280
  ],
2281
- activatedSetNames: new Set(activeSets.map((s) => s.name))
2281
+ activatedSetNames: new Set(activeSets.map((s) => s.name)),
2282
+ matchedSetNames: /* @__PURE__ */ new Set()
2282
2283
  };
2283
2284
  }
2284
2285
  const toolsNeedingEmbeddings = [];
@@ -2296,7 +2297,7 @@ async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embed
2296
2297
  cache.set(toolsNeedingEmbeddings[i].name, embeddings[i]);
2297
2298
  }
2298
2299
  } catch {
2299
- return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
2300
+ return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set(), matchedSetNames: /* @__PURE__ */ new Set() };
2300
2301
  }
2301
2302
  }
2302
2303
  const pseudoServerTools = [];
@@ -2342,14 +2343,15 @@ async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embed
2342
2343
  activeSetNames
2343
2344
  );
2344
2345
  const activatedSetNames = activatedToolSetNames(scores, toolSets, activeSetNames);
2346
+ const matchedSetNames = activatedToolSetNames(scores, toolSets);
2345
2347
  if (finalNames.size === 0) {
2346
- return { tools: alwaysInclude, activatedSetNames };
2348
+ return { tools: alwaysInclude, activatedSetNames, matchedSetNames };
2347
2349
  }
2348
2350
  const filtered = filterCandidates.filter((t) => {
2349
2351
  const name = getToolName(t);
2350
2352
  return name && finalNames.has(name);
2351
2353
  });
2352
- return { tools: [...alwaysInclude, ...filtered], activatedSetNames };
2354
+ return { tools: [...alwaysInclude, ...filtered], activatedSetNames, matchedSetNames };
2353
2355
  }
2354
2356
 
2355
2357
  // src/lib/tools/toolCatalog.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anuma/sdk",
3
- "version": "6.31.0",
3
+ "version": "6.31.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",