@webmcp-auto-ui/agent 2.5.39 → 2.5.40
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.
- package/package.json +1 -1
- package/src/autoui-server.ts +7 -7
- package/src/discovery-cache.ts +4 -0
- package/src/recipe-browser.ts +17 -7
- package/src/recipes/index.ts +1 -0
- package/src/recipes/types.ts +2 -0
package/package.json
CHANGED
package/src/autoui-server.ts
CHANGED
|
@@ -106,7 +106,7 @@ schema:
|
|
|
106
106
|
label:
|
|
107
107
|
type: string
|
|
108
108
|
value:
|
|
109
|
-
type: string
|
|
109
|
+
type: [string, number]
|
|
110
110
|
trend:
|
|
111
111
|
type: string
|
|
112
112
|
trendDir:
|
|
@@ -441,7 +441,7 @@ schema:
|
|
|
441
441
|
label:
|
|
442
442
|
type: string
|
|
443
443
|
value:
|
|
444
|
-
type: string
|
|
444
|
+
type: [string, number]
|
|
445
445
|
stats:
|
|
446
446
|
type: array
|
|
447
447
|
items:
|
|
@@ -453,7 +453,7 @@ schema:
|
|
|
453
453
|
label:
|
|
454
454
|
type: string
|
|
455
455
|
value:
|
|
456
|
-
type: string
|
|
456
|
+
type: [string, number]
|
|
457
457
|
---
|
|
458
458
|
|
|
459
459
|
## When to use
|
|
@@ -849,7 +849,7 @@ schema:
|
|
|
849
849
|
label:
|
|
850
850
|
type: string
|
|
851
851
|
value:
|
|
852
|
-
type: string
|
|
852
|
+
type: [string, number]
|
|
853
853
|
unit:
|
|
854
854
|
type: string
|
|
855
855
|
description: Unite affichee apres la valeur (ex "%", "km")
|
|
@@ -865,7 +865,7 @@ schema:
|
|
|
865
865
|
type: string
|
|
866
866
|
enum: [up, down, flat]
|
|
867
867
|
previousValue:
|
|
868
|
-
type: string
|
|
868
|
+
type: [string, number]
|
|
869
869
|
variant:
|
|
870
870
|
type: string
|
|
871
871
|
enum: [default, success, warning, error, info]
|
|
@@ -883,7 +883,7 @@ schema:
|
|
|
883
883
|
label:
|
|
884
884
|
type: string
|
|
885
885
|
value:
|
|
886
|
-
type: string
|
|
886
|
+
type: [string, number]
|
|
887
887
|
unit:
|
|
888
888
|
type: string
|
|
889
889
|
icon:
|
|
@@ -894,7 +894,7 @@ schema:
|
|
|
894
894
|
type: string
|
|
895
895
|
enum: [up, down, flat]
|
|
896
896
|
previousValue:
|
|
897
|
-
type: string
|
|
897
|
+
type: [string, number]
|
|
898
898
|
variant:
|
|
899
899
|
type: string
|
|
900
900
|
enum: [default, success, warning, error, info]
|
package/src/discovery-cache.ts
CHANGED
|
@@ -145,6 +145,10 @@ export class DiscoveryCache {
|
|
|
145
145
|
((r as Record<string, unknown>).id as string | undefined)?.toLowerCase() === key
|
|
146
146
|
);
|
|
147
147
|
if (!recipe) return JSON.stringify({ error: `Recipe "${key}" not found` });
|
|
148
|
+
// Body is fetched lazily — fall through to live MCP dispatch when
|
|
149
|
+
// we only have name+description. Returning the metadata-only entry
|
|
150
|
+
// would feed the agent a body-less recipe and trigger fabrication.
|
|
151
|
+
if (!recipe.body) return null;
|
|
148
152
|
return JSON.stringify(recipe);
|
|
149
153
|
}
|
|
150
154
|
|
package/src/recipe-browser.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
// recipe-browser — pure utility functions for browsing/filtering/exporting recipes
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Case-insensitive filter on name and
|
|
4
|
+
* Case-insensitive filter on name, description, server, and id fields.
|
|
5
5
|
* Empty query returns all recipes.
|
|
6
|
+
*
|
|
7
|
+
* Match semantics: word-start. The query must start at a word boundary
|
|
8
|
+
* (start of string, after non-word char, or after a `\b`). This drops
|
|
9
|
+
* spurious substring matches like "hn" inside "technical" but keeps
|
|
10
|
+
* meaningful ones like "hn" inside "HN" (standalone abbreviation) or
|
|
11
|
+
* "hn-front-page" (id prefix). It also matches "hacker" inside
|
|
12
|
+
* "HackerNews" since "Hacker" begins at the start of the word.
|
|
6
13
|
*/
|
|
7
14
|
export function filterRecipes<T extends { name: string; description?: string }>(
|
|
8
15
|
recipes: T[],
|
|
@@ -10,14 +17,17 @@ export function filterRecipes<T extends { name: string; description?: string }>(
|
|
|
10
17
|
): T[] {
|
|
11
18
|
const q = query.trim().toLowerCase();
|
|
12
19
|
if (!q) return recipes;
|
|
20
|
+
const escaped = q.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
21
|
+
const re = new RegExp(`\\b${escaped}`, 'i');
|
|
13
22
|
return recipes.filter((r) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
const obj = r as Record<string, unknown>;
|
|
24
|
+
const srv = (obj.server as string | undefined) ?? (obj.serverName as string | undefined) ?? '';
|
|
25
|
+
const id = (obj.id as string | undefined) ?? '';
|
|
17
26
|
return (
|
|
18
|
-
r.name
|
|
19
|
-
(r.description
|
|
20
|
-
|
|
27
|
+
re.test(r.name) ||
|
|
28
|
+
(r.description ? re.test(r.description) : false) ||
|
|
29
|
+
re.test(srv) ||
|
|
30
|
+
re.test(id)
|
|
21
31
|
);
|
|
22
32
|
});
|
|
23
33
|
}
|
package/src/recipes/index.ts
CHANGED
package/src/recipes/types.ts
CHANGED