@webmcp-auto-ui/agent 2.5.8 → 2.5.10

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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/src/autoui-server.ts +134 -134
  3. package/src/diagnostics.ts +3 -3
  4. package/src/loop.ts +6 -6
  5. package/src/providers/wasm.ts +5 -5
  6. package/src/recipes/_generated.ts +446 -446
  7. package/src/recipes/afficher-oeuvres-art-collection-musee.md +45 -45
  8. package/src/recipes/analyser-actualites-hacker-news.md +52 -52
  9. package/src/recipes/cartographier-observations-biodiversite.md +44 -44
  10. package/src/recipes/cross-server.md +48 -48
  11. package/src/recipes/dashboard-kpi.md +45 -45
  12. package/src/recipes/explorer-dossiers-legislatifs-parcours-texte.md +48 -48
  13. package/src/recipes/gallery-images.md +33 -33
  14. package/src/recipes/parlementaire-profile.md +58 -58
  15. package/src/recipes/rechercher-textes-juridiques-legifrance.md +38 -38
  16. package/src/recipes/weather-viz.md +35 -35
  17. package/src/recipes/widgets/actions.md +6 -6
  18. package/src/recipes/widgets/alert.md +6 -6
  19. package/src/recipes/widgets/cards.md +10 -10
  20. package/src/recipes/widgets/carousel.md +8 -8
  21. package/src/recipes/widgets/chart-rich.md +10 -10
  22. package/src/recipes/widgets/chart.md +9 -9
  23. package/src/recipes/widgets/code.md +6 -6
  24. package/src/recipes/widgets/d3.md +10 -10
  25. package/src/recipes/widgets/data-table.md +10 -10
  26. package/src/recipes/widgets/gallery.md +10 -10
  27. package/src/recipes/widgets/grid-data.md +11 -11
  28. package/src/recipes/widgets/hemicycle.md +9 -9
  29. package/src/recipes/widgets/js-sandbox.md +10 -10
  30. package/src/recipes/widgets/json-viewer.md +8 -8
  31. package/src/recipes/widgets/kv.md +9 -9
  32. package/src/recipes/widgets/list.md +7 -7
  33. package/src/recipes/widgets/log.md +6 -6
  34. package/src/recipes/widgets/map.md +10 -10
  35. package/src/recipes/widgets/profile.md +9 -9
  36. package/src/recipes/widgets/recipe-browser.md +33 -33
  37. package/src/recipes/widgets/sankey.md +10 -10
  38. package/src/recipes/widgets/stat-card.md +7 -7
  39. package/src/recipes/widgets/stat.md +10 -10
  40. package/src/recipes/widgets/tags.md +6 -6
  41. package/src/recipes/widgets/text.md +6 -6
  42. package/src/recipes/widgets/timeline.md +6 -6
  43. package/src/recipes/widgets/trombinoscope.md +8 -8
  44. package/src/summarize.ts +6 -6
  45. package/src/tool-layers.ts +26 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmcp-auto-ui/agent",
3
- "version": "2.5.8",
3
+ "version": "2.5.10",
4
4
  "description": "LLM agent loop + Anthropic/Gemma LiteRT providers + MCP wrapper",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "type": "module",
@@ -12,7 +12,7 @@ const RECIPES: string[] = [
12
12
  // ── stat ────────────────────────────────────────────────────────────────
13
13
  `---
14
14
  widget: stat
15
- description: Statistique cle (KPI, compteur, total). Label + valeur + tendance optionnelle.
15
+ description: Key statistic (KPI, counter, total). Label + value + optional trend.
16
16
  schema:
17
17
  type: object
18
18
  required:
@@ -30,17 +30,17 @@ schema:
30
30
  enum: [up, down, neutral]
31
31
  ---
32
32
 
33
- ## Quand utiliser
34
- Pour afficher un chiffre cle unique (KPI, total, compteur).
33
+ ## When to use
34
+ Display a single key figure (KPI, total, counter).
35
35
 
36
- ## Comment
37
- Appeler widget_display({name: "stat", params: {label: "Total", value: "42"}}).
36
+ ## How to use
37
+ Call widget_display({name: "stat", params: {label: "Total", value: "42"}}).
38
38
  `,
39
39
 
40
40
  // ── kv ──────────────────────────────────────────────────────────────────
41
41
  `---
42
42
  widget: kv
43
- description: Paires cle-valeur (proprietes, metadonnees, details).
43
+ description: Key-value pairs (properties, metadata, details).
44
44
  schema:
45
45
  type: object
46
46
  required:
@@ -58,17 +58,17 @@ schema:
58
58
  maxItems: 2
59
59
  ---
60
60
 
61
- ## Quand utiliser
62
- Pour afficher des proprietes ou metadonnees sous forme de paires cle/valeur.
61
+ ## When to use
62
+ Display properties or metadata as key/value pairs.
63
63
 
64
- ## Comment
65
- Appeler widget_display({name: "kv", params: {rows: [["Nom", "Dupont"], ["Age", "42"]]}}).
64
+ ## How to use
65
+ Call widget_display({name: "kv", params: {rows: [["Nom", "Dupont"], ["Age", "42"]]}}).
66
66
  `,
67
67
 
68
68
  // ── list ─────────────────────────────────────────────────────────────────
69
69
  `---
70
70
  widget: list
71
- description: Liste ordonnee d'items.
71
+ description: Ordered list of items.
72
72
  schema:
73
73
  type: object
74
74
  required:
@@ -82,17 +82,17 @@ schema:
82
82
  type: string
83
83
  ---
84
84
 
85
- ## Quand utiliser
86
- Pour afficher une liste simple d'elements textuels.
85
+ ## When to use
86
+ Display a simple list of text items.
87
87
 
88
- ## Comment
89
- Appeler widget_display({name: "list", params: {items: ["A", "B", "C"]}}).
88
+ ## How to use
89
+ Call widget_display({name: "list", params: {items: ["A", "B", "C"]}}).
90
90
  `,
91
91
 
92
92
  // ── chart ────────────────────────────────────────────────────────────────
93
93
  `---
94
94
  widget: chart
95
- description: Graphique a barres simples. Labels + valeurs numeriques.
95
+ description: Simple bar chart. Labels + numeric values.
96
96
  schema:
97
97
  type: object
98
98
  required:
@@ -106,17 +106,17 @@ schema:
106
106
  type: array
107
107
  ---
108
108
 
109
- ## Quand utiliser
109
+ ## When to use
110
110
  Pour un graphique a barres simple avec des labels et valeurs numeriques.
111
111
 
112
- ## Comment
113
- Appeler widget_display({name: "chart", params: {bars: [["Jan", 10], ["Fev", 20]]}}).
112
+ ## How to use
113
+ Call widget_display({name: "chart", params: {bars: [["Jan", 10], ["Fev", 20]]}}).
114
114
  `,
115
115
 
116
116
  // ── alert ────────────────────────────────────────────────────────────────
117
117
  `---
118
118
  widget: alert
119
- description: Alerte ou notification systeme.
119
+ description: System alert or notification.
120
120
  schema:
121
121
  type: object
122
122
  required:
@@ -131,17 +131,17 @@ schema:
131
131
  enum: [info, warn, error]
132
132
  ---
133
133
 
134
- ## Quand utiliser
135
- Pour afficher une alerte, un avertissement ou une notification.
134
+ ## When to use
135
+ Display an alert, warning, or notification.
136
136
 
137
- ## Comment
138
- Appeler widget_display({name: "alert", params: {title: "Attention", message: "Disque plein", level: "warn"}}).
137
+ ## How to use
138
+ Call widget_display({name: "alert", params: {title: "Attention", message: "Disque plein", level: "warn"}}).
139
139
  `,
140
140
 
141
141
  // ── code ─────────────────────────────────────────────────────────────────
142
142
  `---
143
143
  widget: code
144
- description: Bloc de code avec coloration syntaxique.
144
+ description: Code block with syntax highlighting.
145
145
  schema:
146
146
  type: object
147
147
  required:
@@ -153,17 +153,17 @@ schema:
153
153
  type: string
154
154
  ---
155
155
 
156
- ## Quand utiliser
157
- Pour afficher un extrait de code source avec coloration syntaxique.
156
+ ## When to use
157
+ Display a source code snippet with syntax highlighting.
158
158
 
159
- ## Comment
160
- Appeler widget_display({name: "code", params: {lang: "python", content: "print('hello')"}}).
159
+ ## How to use
160
+ Call widget_display({name: "code", params: {lang: "python", content: "print('hello')"}}).
161
161
  `,
162
162
 
163
163
  // ── text ─────────────────────────────────────────────────────────────────
164
164
  `---
165
165
  widget: text
166
- description: Paragraphe de texte libre.
166
+ description: Free-form text paragraph.
167
167
  schema:
168
168
  type: object
169
169
  required:
@@ -173,17 +173,17 @@ schema:
173
173
  type: string
174
174
  ---
175
175
 
176
- ## Quand utiliser
177
- Pour afficher un bloc de texte libre.
176
+ ## When to use
177
+ Display a free-form text block.
178
178
 
179
- ## Comment
180
- Appeler widget_display({name: "text", params: {content: "Texte explicatif..."}}).
179
+ ## How to use
180
+ Call widget_display({name: "text", params: {content: "Texte explicatif..."}}).
181
181
  `,
182
182
 
183
183
  // ── actions ──────────────────────────────────────────────────────────────
184
184
  `---
185
185
  widget: actions
186
- description: Rangee de boutons d'action.
186
+ description: Row of action buttons.
187
187
  schema:
188
188
  type: object
189
189
  required:
@@ -202,17 +202,17 @@ schema:
202
202
  type: boolean
203
203
  ---
204
204
 
205
- ## Quand utiliser
205
+ ## When to use
206
206
  Pour proposer des actions cliquables a l'utilisateur.
207
207
 
208
- ## Comment
209
- Appeler widget_display({name: "actions", params: {buttons: [{label: "OK", primary: true}, {label: "Annuler"}]}}).
208
+ ## How to use
209
+ Call widget_display({name: "actions", params: {buttons: [{label: "OK", primary: true}, {label: "Annuler"}]}}).
210
210
  `,
211
211
 
212
212
  // ── tags ─────────────────────────────────────────────────────────────────
213
213
  `---
214
214
  widget: tags
215
- description: Groupe de tags/badges.
215
+ description: Group of tags/badges.
216
216
  schema:
217
217
  type: object
218
218
  required:
@@ -233,17 +233,17 @@ schema:
233
233
  type: boolean
234
234
  ---
235
235
 
236
- ## Quand utiliser
237
- Pour afficher des tags, categories ou badges.
236
+ ## When to use
237
+ Display tags, categories, or badges.
238
238
 
239
- ## Comment
240
- Appeler widget_display({name: "tags", params: {tags: [{text: "JS", active: true}, {text: "TS"}]}}).
239
+ ## How to use
240
+ Call widget_display({name: "tags", params: {tags: [{text: "JS", active: true}, {text: "TS"}]}}).
241
241
  `,
242
242
 
243
243
  // ── data-table ───────────────────────────────────────────────────────────
244
244
  `---
245
245
  widget: data-table
246
- description: Tableau de donnees triable avec colonnes configurables.
246
+ description: Sortable data table with configurable columns.
247
247
  schema:
248
248
  type: object
249
249
  required:
@@ -272,17 +272,17 @@ schema:
272
272
  type: object
273
273
  ---
274
274
 
275
- ## Quand utiliser
276
- Pour afficher des donnees structurees en tableau avec tri par colonne.
275
+ ## When to use
276
+ Display structured data in a table with column sorting.
277
277
 
278
- ## Comment
279
- Appeler widget_display({name: "data-table", params: {columns: [{key:"name",label:"Nom"}], rows: [{name:"Alice"}]}}).
278
+ ## How to use
279
+ Call widget_display({name: "data-table", params: {columns: [{key:"name",label:"Nom"}], rows: [{name:"Alice"}]}}).
280
280
  `,
281
281
 
282
282
  // ── timeline ─────────────────────────────────────────────────────────────
283
283
  `---
284
284
  widget: timeline
285
- description: Chronologie d'evenements avec statuts.
285
+ description: Event timeline with statuses.
286
286
  schema:
287
287
  type: object
288
288
  required:
@@ -308,17 +308,17 @@ schema:
308
308
  enum: [done, active, pending]
309
309
  ---
310
310
 
311
- ## Quand utiliser
312
- Pour afficher une sequence d'evenements dans le temps.
311
+ ## When to use
312
+ Display a sequence of events over time.
313
313
 
314
- ## Comment
315
- Appeler widget_display({name: "timeline", params: {events: [{title: "Debut", date: "2024-01", status: "done"}]}}).
314
+ ## How to use
315
+ Call widget_display({name: "timeline", params: {events: [{title: "Debut", date: "2024-01", status: "done"}]}}).
316
316
  `,
317
317
 
318
318
  // ── profile ──────────────────────────────────────────────────────────────
319
319
  `---
320
320
  widget: profile
321
- description: Fiche profil avec avatar, champs et statistiques.
321
+ description: Profile card with avatar, fields, and statistics.
322
322
  schema:
323
323
  type: object
324
324
  required:
@@ -354,20 +354,20 @@ schema:
354
354
  type: string
355
355
  ---
356
356
 
357
- ## Quand utiliser
358
- Pour afficher une fiche personne ou entite avec champs structures.
357
+ ## When to use
358
+ Display a person or entity card with structured fields.
359
359
 
360
- ## Comment
361
- Appeler widget_display({name: "profile", params: {name: "Alice", fields: [{label:"Role", value:"Dev"}]}}).
360
+ ## How to use
361
+ Call widget_display({name: "profile", params: {name: "Alice", fields: [{label:"Role", value:"Dev"}]}}).
362
362
 
363
- ## Erreurs courantes
364
- - Ne JAMAIS inventer d'URLs pour l'avatar utiliser uniquement celles retournées par les outils MCP. Sans URL, le widget affiche les initiales automatiquement.
363
+ ## Common mistakes
364
+ - NEVER invent avatar URLs — only use those returned by MCP tools. Without a URL, the widget displays initials automatically.
365
365
  `,
366
366
 
367
367
  // ── trombinoscope ────────────────────────────────────────────────────────
368
368
  `---
369
369
  widget: trombinoscope
370
- description: Grille de portraits (trombinoscope). Personnes avec nom, sous-titre, badge.
370
+ description: Portrait grid (trombinoscope). People with name, subtitle, badge.
371
371
  schema:
372
372
  type: object
373
373
  required:
@@ -394,20 +394,20 @@ schema:
394
394
  type: number
395
395
  ---
396
396
 
397
- ## Quand utiliser
398
- Pour afficher une grille de personnes (equipe, assemblee, etc.).
397
+ ## When to use
398
+ Display a grid of people (team, assembly, etc.).
399
399
 
400
- ## Comment
401
- Appeler widget_display({name: "trombinoscope", params: {people: [{name: "Alice", badge: "Lead"}]}}).
400
+ ## How to use
401
+ Call widget_display({name: "trombinoscope", params: {people: [{name: "Alice", badge: "Lead"}]}}).
402
402
 
403
- ## Erreurs courantes
404
- - Ne JAMAIS inventer d'URLs pour le champ avatar — utiliser uniquement celles retournées par les outils MCP. Sans URL, le widget affiche les initiales automatiquement.
403
+ ## Common mistakes
404
+ - NEVER invent URLs for the avatar field only use those returned by MCP tools. Without a URL, the widget displays initials automatically.
405
405
  `,
406
406
 
407
407
  // ── json-viewer ──────────────────────────────────────────────────────────
408
408
  `---
409
409
  widget: json-viewer
410
- description: Arbre JSON interactif explorable.
410
+ description: Interactive explorable JSON tree.
411
411
  schema:
412
412
  type: object
413
413
  required:
@@ -422,17 +422,17 @@ schema:
422
422
  type: boolean
423
423
  ---
424
424
 
425
- ## Quand utiliser
426
- Pour afficher une structure JSON complexe de maniere interactive.
425
+ ## When to use
426
+ Display a complex JSON structure interactively.
427
427
 
428
- ## Comment
429
- Appeler widget_display({name: "json-viewer", params: {data: {a: 1, b: {c: 2}}}}).
428
+ ## How to use
429
+ Call widget_display({name: "json-viewer", params: {data: {a: 1, b: {c: 2}}}}).
430
430
  `,
431
431
 
432
432
  // ── hemicycle ────────────────────────────────────────────────────────────
433
433
  `---
434
434
  widget: hemicycle
435
- description: Hemicycle SVG (composition parlementaire par groupe).
435
+ description: SVG hemicycle (parliamentary composition by group).
436
436
  schema:
437
437
  type: object
438
438
  required:
@@ -462,17 +462,17 @@ schema:
462
462
  type: number
463
463
  ---
464
464
 
465
- ## Quand utiliser
465
+ ## When to use
466
466
  Pour visualiser la composition d'une assemblee parlementaire.
467
467
 
468
- ## Comment
469
- Appeler widget_display({name: "hemicycle", params: {groups: [{id:"g1", label:"Parti A", seats:120, color:"#e63946"}]}}).
468
+ ## How to use
469
+ Call widget_display({name: "hemicycle", params: {groups: [{id:"g1", label:"Parti A", seats:120, color:"#e63946"}]}}).
470
470
  `,
471
471
 
472
472
  // ── chart-rich ───────────────────────────────────────────────────────────
473
473
  `---
474
474
  widget: chart-rich
475
- description: Graphique riche (bar, line, area, pie, donut) avec plusieurs series.
475
+ description: Rich chart (bar, line, area, pie, donut) with multiple series.
476
476
  schema:
477
477
  type: object
478
478
  required:
@@ -504,17 +504,17 @@ schema:
504
504
  type: string
505
505
  ---
506
506
 
507
- ## Quand utiliser
507
+ ## When to use
508
508
  Pour des graphiques multi-series (barres, lignes, aires, camembert, donut).
509
509
 
510
- ## Comment
511
- Appeler widget_display({name: "chart-rich", params: {type: "bar", labels: ["Q1","Q2"], data: [{label:"Ventes", values:[10,20]}]}}).
510
+ ## How to use
511
+ Call widget_display({name: "chart-rich", params: {type: "bar", labels: ["Q1","Q2"], data: [{label:"Ventes", values:[10,20]}]}}).
512
512
  `,
513
513
 
514
514
  // ── cards ────────────────────────────────────────────────────────────────
515
515
  `---
516
516
  widget: cards
517
- description: Grille de cartes (resultats, dossiers, entites).
517
+ description: Card grid (results, records, entities).
518
518
  schema:
519
519
  type: object
520
520
  required:
@@ -541,20 +541,20 @@ schema:
541
541
  type: string
542
542
  ---
543
543
 
544
- ## Quand utiliser
545
- Pour afficher des resultats, dossiers ou entites en grille de cartes.
544
+ ## When to use
545
+ Display results, records, or entities as a card grid.
546
546
 
547
- ## Comment
548
- Appeler widget_display({name: "cards", params: {cards: [{title: "Projet A", description: "En cours"}]}}).
547
+ ## How to use
548
+ Call widget_display({name: "cards", params: {cards: [{title: "Projet A", description: "En cours"}]}}).
549
549
 
550
- ## Erreurs courantes
551
- - Ne JAMAIS inventer d'URLs d'images pour le champ image utiliser uniquement celles retournées par les outils MCP. Si aucune URL n'est disponible, ne pas inclure de champ image.
550
+ ## Common mistakes
551
+ - NEVER invent image URLs for the image fieldonly use those returned by MCP tools. If no URL is available, do not include an image field.
552
552
  `,
553
553
 
554
554
  // ── sankey ───────────────────────────────────────────────────────────────
555
555
  `---
556
556
  widget: sankey
557
- description: Diagramme de flux Sankey (votes, co-signatures, parcours).
557
+ description: Sankey flow diagram (votes, co-signatures, paths).
558
558
  schema:
559
559
  type: object
560
560
  required:
@@ -594,17 +594,17 @@ schema:
594
594
  type: number
595
595
  ---
596
596
 
597
- ## Quand utiliser
597
+ ## When to use
598
598
  Pour visualiser des flux entre categories (votes, parcours, transferts).
599
599
 
600
- ## Comment
601
- Appeler widget_display({name: "sankey", params: {nodes: [{id:"a", label:"A"}], links: [{source:"a", target:"b", value:10}]}}).
600
+ ## How to use
601
+ Call widget_display({name: "sankey", params: {nodes: [{id:"a", label:"A"}], links: [{source:"a", target:"b", value:10}]}}).
602
602
  `,
603
603
 
604
604
  // ── log ──────────────────────────────────────────────────────────────────
605
605
  `---
606
606
  widget: log
607
- description: Flux de logs avec niveau, timestamp et source.
607
+ description: Log stream with level, timestamp, and source.
608
608
  schema:
609
609
  type: object
610
610
  required:
@@ -630,17 +630,17 @@ schema:
630
630
  type: string
631
631
  ---
632
632
 
633
- ## Quand utiliser
634
- Pour afficher un flux de logs ou d'evenements systeme.
633
+ ## When to use
634
+ Display a stream of logs or system events.
635
635
 
636
- ## Comment
637
- Appeler widget_display({name: "log", params: {entries: [{message: "Started", level: "info", timestamp: "12:00"}]}}).
636
+ ## How to use
637
+ Call widget_display({name: "log", params: {entries: [{message: "Started", level: "info", timestamp: "12:00"}]}}).
638
638
  `,
639
639
 
640
640
  // ── gallery ──────────────────────────────────────────────────────────────
641
641
  `---
642
642
  widget: gallery
643
- description: Galerie d'images avec lightbox.
643
+ description: Image gallery with lightbox.
644
644
  schema:
645
645
  type: object
646
646
  required:
@@ -665,21 +665,21 @@ schema:
665
665
  type: number
666
666
  ---
667
667
 
668
- ## Quand utiliser
669
- Pour afficher une collection d'images avec navigation lightbox.
668
+ ## When to use
669
+ Display an image collection with lightbox navigation.
670
670
 
671
- ## Comment
672
- Appeler widget_display({name: "gallery", params: {images: [{src: "https://...", alt: "Photo 1"}]}}).
671
+ ## How to use
672
+ Call widget_display({name: "gallery", params: {images: [{src: "https://...", alt: "Photo 1"}]}}).
673
673
 
674
- ## Erreurs courantes
675
- - Ne JAMAIS fabriquer d'URLs d'images utiliser uniquement celles retournées par les outils MCP
676
- - Toujours fournir un alt pour l'accessibilité
674
+ ## Common mistakes
675
+ - NEVER fabricate image URLs — only use those returned by MCP tools
676
+ - Always provide an alt for accessibility
677
677
  `,
678
678
 
679
679
  // ── carousel ─────────────────────────────────────────────────────────────
680
680
  `---
681
681
  widget: carousel
682
- description: Carousel de slides (images, contenu) avec navigation et auto-play.
682
+ description: Slide carousel (images, content) with navigation and auto-play.
683
683
  schema:
684
684
  type: object
685
685
  required:
@@ -706,20 +706,20 @@ schema:
706
706
  type: number
707
707
  ---
708
708
 
709
- ## Quand utiliser
709
+ ## When to use
710
710
  Pour presenter du contenu en diaporama avec navigation.
711
711
 
712
- ## Comment
713
- Appeler widget_display({name: "carousel", params: {slides: [{src: "https://...", title: "Slide 1"}]}}).
712
+ ## How to use
713
+ Call widget_display({name: "carousel", params: {slides: [{src: "https://...", title: "Slide 1"}]}}).
714
714
 
715
- ## Erreurs courantes
716
- - Ne JAMAIS fabriquer d'URLs d'images pour src — utiliser uniquement celles retournées par les outils MCP
715
+ ## Common mistakes
716
+ - NEVER fabricate image URLs for src — only use those returned by MCP tools
717
717
  `,
718
718
 
719
719
  // ── map ──────────────────────────────────────────────────────────────────
720
720
  `---
721
721
  widget: map
722
- description: Carte Leaflet interactive avec marqueurs. Fond sombre CARTO.
722
+ description: Interactive Leaflet map with markers. Dark CARTO basemap.
723
723
  schema:
724
724
  type: object
725
725
  properties:
@@ -760,17 +760,17 @@ schema:
760
760
  type: string
761
761
  ---
762
762
 
763
- ## Quand utiliser
764
- Pour afficher une carte geographique avec des marqueurs.
763
+ ## When to use
764
+ Display a geographic map with markers.
765
765
 
766
- ## Comment
767
- Appeler widget_display({name: "map", params: {center: {lat: 48.8, lng: 2.3}, zoom: 12, markers: [{lat: 48.8, lng: 2.3, label: "Paris"}]}}).
766
+ ## How to use
767
+ Call widget_display({name: "map", params: {center: {lat: 48.8, lng: 2.3}, zoom: 12, markers: [{lat: 48.8, lng: 2.3, label: "Paris"}]}}).
768
768
  `,
769
769
 
770
770
  // ── stat-card ────────────────────────────────────────────────────────────
771
771
  `---
772
772
  widget: stat-card
773
- description: KPI enrichi avec unite, delta et variante coloree (success/warning/error/info).
773
+ description: Enriched KPI with unit, delta, and colored variant (success/warning/error/info).
774
774
  schema:
775
775
  type: object
776
776
  required:
@@ -797,17 +797,17 @@ schema:
797
797
  enum: [default, success, warning, error, info]
798
798
  ---
799
799
 
800
- ## Quand utiliser
800
+ ## When to use
801
801
  Pour un KPI enrichi avec delta, unite et variante de couleur.
802
802
 
803
- ## Comment
804
- Appeler widget_display({name: "stat-card", params: {label: "Uptime", value: "99.9", unit: "%", trend: "up", variant: "success"}}).
803
+ ## How to use
804
+ Call widget_display({name: "stat-card", params: {label: "Uptime", value: "99.9", unit: "%", trend: "up", variant: "success"}}).
805
805
  `,
806
806
 
807
807
  // ── grid-data ────────────────────────────────────────────────────────────
808
808
  `---
809
809
  widget: grid-data
810
- description: Grille de donnees tabulaires avec highlights de cellules (heatmap, comparaison).
810
+ description: Tabular data grid with cell highlights (heatmap, comparison).
811
811
  schema:
812
812
  type: object
813
813
  required:
@@ -851,17 +851,17 @@ schema:
851
851
  type: string
852
852
  ---
853
853
 
854
- ## Quand utiliser
854
+ ## When to use
855
855
  Pour des grilles de donnees avec mise en valeur de cellules (heatmap, comparaison).
856
856
 
857
- ## Comment
858
- Appeler widget_display({name: "grid-data", params: {columns: [{key:"a",label:"A"}], rows: [[1,2],[3,4]], highlights: [{row:0,col:1,color:"#ff0"}]}}).
857
+ ## How to use
858
+ Call widget_display({name: "grid-data", params: {columns: [{key:"a",label:"A"}], rows: [[1,2],[3,4]], highlights: [{row:0,col:1,color:"#ff0"}]}}).
859
859
  `,
860
860
 
861
861
  // ── d3 ───────────────────────────────────────────────────────────────────
862
862
  `---
863
863
  widget: d3
864
- description: Visualisation D3.js (hex-heatmap, radial, treemap, force graph).
864
+ description: D3.js visualization (hex-heatmap, radial, treemap, force graph).
865
865
  schema:
866
866
  type: object
867
867
  required:
@@ -879,17 +879,17 @@ schema:
879
879
  type: object
880
880
  ---
881
881
 
882
- ## Quand utiliser
882
+ ## When to use
883
883
  Pour des visualisations avancees D3.js (heatmap hexagonale, radial, treemap, graphe de force).
884
884
 
885
- ## Comment
886
- Appeler widget_display({name: "d3", params: {preset: "treemap", data: {name: "root", children: [...]}}}).
885
+ ## How to use
886
+ Call widget_display({name: "d3", params: {preset: "treemap", data: {name: "root", children: [...]}}}).
887
887
  `,
888
888
 
889
889
  // ── js-sandbox ───────────────────────────────────────────────────────────
890
890
  `---
891
891
  widget: js-sandbox
892
- description: Sandbox JavaScript dans un iframe securise. Code arbitraire avec acces a DOM et fetch.
892
+ description: JavaScript sandbox in a secure iframe. Arbitrary code with DOM and fetch access.
893
893
  schema:
894
894
  type: object
895
895
  required:
@@ -912,17 +912,17 @@ schema:
912
912
  description: Hauteur CSS de l'iframe (ex "400px", "50vh")
913
913
  ---
914
914
 
915
- ## Quand utiliser
915
+ ## When to use
916
916
  Pour des visualisations custom, animations, ou prototypes interactifs en JS pur.
917
917
 
918
- ## Comment
919
- Appeler widget_display({name: "js-sandbox", params: {code: "document.getElementById('root').innerHTML = '<h1>Hello</h1>'"}}).
918
+ ## How to use
919
+ Call widget_display({name: "js-sandbox", params: {code: "document.getElementById('root').innerHTML = '<h1>Hello</h1>'"}}).
920
920
  `,
921
921
 
922
922
  // ── recipe-browser ──────────────────────────────────────────────────────
923
923
  `---
924
924
  widget: recipe-browser
925
- description: Affiche les recettes disponibles sous forme de cartes interactives et permet de consulter le detail de chaque recette.
925
+ description: Displays available recipes as interactive cards and allows browsing each recipe's details.
926
926
  group: rich
927
927
  schema:
928
928
  type: object
@@ -957,7 +957,7 @@ schema:
957
957
  type: boolean
958
958
  ---
959
959
 
960
- ## Quand utiliser
960
+ ## When to use
961
961
  Quand l'utilisateur veut voir les recettes disponibles, explorer les possibilites du serveur, ou comprendre comment utiliser un widget specifique.
962
962
 
963
963
  ## Comment
@@ -977,7 +977,7 @@ Quand l'utilisateur clique sur une carte, tu recevras un message d'interaction c
977
977
  2. Afficher le contenu dans un widget code avec lang: 'markdown'
978
978
  3. Lier les deux widgets : reutiliser le widget detail existant via canvas('update', ...) au lieu d'en creer un nouveau a chaque clic.
979
979
 
980
- ## Erreurs courantes
980
+ ## Common mistakes
981
981
  - Ne pas oublier interactive: true dans les cartes — sans ca, les clics ne remontent pas
982
982
  - Ne pas creer un nouveau widget detail a chaque clic — reutiliser l'existant via canvas('update', ...)
983
983
  - Les recettes MCP et WebMCP ont des noms de serveur differents — utiliser le bon prefixe pour get_recipe()
@@ -111,9 +111,9 @@ export function runDiagnostics(
111
111
  if (patches.length > 0) {
112
112
  diagnostics.push({
113
113
  severity: 'warning',
114
- title: `Schema patché: ${tool.name}`,
115
- detail: `${patches.length} correction(s) pour strict mode: ${patches.map(p => p.path).join(', ')}. additionalProperties: false ajouté automatiquement.`,
116
- codeFix: `Ajouter "additionalProperties": false dans le schema du serveur MCP pour ${tool.name}.`,
114
+ title: `Schema patched: ${tool.name}`,
115
+ detail: `${patches.length} correction(s) for strict mode: ${patches.map(p => p.path).join(', ')}. additionalProperties: false added automatically.`,
116
+ codeFix: `Add "additionalProperties": false to the MCP server schema for ${tool.name}.`,
117
117
  });
118
118
  }
119
119
  }