airgen-cli 0.17.0 → 0.17.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.
@@ -51,6 +51,7 @@ export declare class UhtClient {
51
51
  private request;
52
52
  classify(entity: string): Promise<UhtClassification>;
53
53
  batchCompare(entity: string, candidates: string[]): Promise<UhtBatchResult>;
54
- /** Look up an entity by name in a Substrate namespace. Returns null if not found. */
54
+ /** Look up an entity by name in a Substrate namespace. Returns null if not found.
55
+ * Only returns exact name matches (case-insensitive) — no fuzzy fallback. */
55
56
  lookupEntity(name: string, namespace: string): Promise<UhtEntityRecord | null>;
56
57
  }
@@ -76,11 +76,11 @@ export class UhtClient {
76
76
  async batchCompare(entity, candidates) {
77
77
  return this.request("POST", "/batch-compare", { entity, candidates });
78
78
  }
79
- /** Look up an entity by name in a Substrate namespace. Returns null if not found. */
79
+ /** Look up an entity by name in a Substrate namespace. Returns null if not found.
80
+ * Only returns exact name matches (case-insensitive) — no fuzzy fallback. */
80
81
  async lookupEntity(name, namespace) {
81
82
  const data = await this.request("GET", `/entities?namespace=${encodeURIComponent(namespace)}&name=${encodeURIComponent(name)}&limit=10`);
82
- // Prefer exact match (case-insensitive), fall back to first result
83
- const exact = data.entities.find(e => e.name.toLowerCase() === name.toLowerCase());
84
- return exact ?? data.entities[0] ?? null;
83
+ // Exact match only — the API does substring filtering, so we must check
84
+ return data.entities.find(e => e.name.toLowerCase() === name.toLowerCase()) ?? null;
85
85
  }
86
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airgen-cli",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "AIRGen CLI — requirements engineering from the command line",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",