@elliotsystems/eai 0.1.4 → 0.1.5

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.
@@ -14,7 +14,7 @@
14
14
  * proven from session state or not shown.
15
15
  */
16
16
 
17
- import { knowledgeToolKey } from "../mcp-keys.js"
17
+ import { KNOWLEDGE_TOOL, toCanonicalToolUnderAnyGateway } from "../mcp-keys.js"
18
18
 
19
19
  // ------------------------------------------------------------- host shapes --
20
20
 
@@ -106,9 +106,15 @@ export function elliotServerNames(items: readonly McpItem[]): string[] {
106
106
  * reasoning applies to a panel that would otherwise attribute a third party's
107
107
  * results to Elliot.
108
108
  */
109
- export function isKnowledgeTool(tool: string | undefined, serverNames: readonly string[]): boolean {
109
+ export function isKnowledgeTool(
110
+ tool: string | undefined,
111
+ serverNames: readonly string[],
112
+ ): boolean {
110
113
  if (typeof tool !== "string") return false
111
- return serverNames.some((name) => tool === knowledgeToolKey(name))
114
+ // Alias-agnostic BY NECESSITY, not by preference — see
115
+ // `toCanonicalToolUnderAnyGateway` for why the TUI cannot know the
116
+ // configured alias, and why that is safe for a display surface.
117
+ return toCanonicalToolUnderAnyGateway(tool, serverNames) === KNOWLEDGE_TOOL
112
118
  }
113
119
 
114
120
  /**