loopengine 0.1.31 → 0.1.32

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.
@@ -18,9 +18,23 @@ export async function searchPublicAbilities(query) {
18
18
  if (!res.ok)
19
19
  throw new Error(`npm registry search failed (HTTP ${res.status})`);
20
20
  const data = (await res.json());
21
- return (data.objects ?? []).map((o) => ({
21
+ const results = (data.objects ?? []).map((o) => ({
22
22
  name: o.package.name,
23
23
  description: o.package.description ?? '',
24
24
  version: o.package.version,
25
25
  }));
26
+ // npm's own search is a relevance *ranker*, not a filter — a query
27
+ // like "keywords:loopengine-ability docs" boosts a matching package's
28
+ // score but doesn't drop the non-matching ones from the response at
29
+ // all (confirmed live: every ability in this ecosystem still came
30
+ // back regardless of the extra query text, just reordered). With this
31
+ // few, brand-new, all-zero-download packages, that reordering barely
32
+ // moves, so an operator typing a search term would otherwise see the
33
+ // exact same full list every time. Filtering here on name/description
34
+ // gives the strict, expected "search box" behavior npm's own API
35
+ // doesn't provide on its own.
36
+ if (!query)
37
+ return results;
38
+ const needle = query.toLowerCase();
39
+ return results.filter((r) => r.name.toLowerCase().includes(needle) || r.description.toLowerCase().includes(needle));
26
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",