@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.
- package/package.json +1 -1
- package/src/autoui-server.ts +134 -134
- package/src/diagnostics.ts +3 -3
- package/src/loop.ts +6 -6
- package/src/providers/wasm.ts +5 -5
- package/src/recipes/_generated.ts +446 -446
- package/src/recipes/afficher-oeuvres-art-collection-musee.md +45 -45
- package/src/recipes/analyser-actualites-hacker-news.md +52 -52
- package/src/recipes/cartographier-observations-biodiversite.md +44 -44
- package/src/recipes/cross-server.md +48 -48
- package/src/recipes/dashboard-kpi.md +45 -45
- package/src/recipes/explorer-dossiers-legislatifs-parcours-texte.md +48 -48
- package/src/recipes/gallery-images.md +33 -33
- package/src/recipes/parlementaire-profile.md +58 -58
- package/src/recipes/rechercher-textes-juridiques-legifrance.md +38 -38
- package/src/recipes/weather-viz.md +35 -35
- package/src/recipes/widgets/actions.md +6 -6
- package/src/recipes/widgets/alert.md +6 -6
- package/src/recipes/widgets/cards.md +10 -10
- package/src/recipes/widgets/carousel.md +8 -8
- package/src/recipes/widgets/chart-rich.md +10 -10
- package/src/recipes/widgets/chart.md +9 -9
- package/src/recipes/widgets/code.md +6 -6
- package/src/recipes/widgets/d3.md +10 -10
- package/src/recipes/widgets/data-table.md +10 -10
- package/src/recipes/widgets/gallery.md +10 -10
- package/src/recipes/widgets/grid-data.md +11 -11
- package/src/recipes/widgets/hemicycle.md +9 -9
- package/src/recipes/widgets/js-sandbox.md +10 -10
- package/src/recipes/widgets/json-viewer.md +8 -8
- package/src/recipes/widgets/kv.md +9 -9
- package/src/recipes/widgets/list.md +7 -7
- package/src/recipes/widgets/log.md +6 -6
- package/src/recipes/widgets/map.md +10 -10
- package/src/recipes/widgets/profile.md +9 -9
- package/src/recipes/widgets/recipe-browser.md +33 -33
- package/src/recipes/widgets/sankey.md +10 -10
- package/src/recipes/widgets/stat-card.md +7 -7
- package/src/recipes/widgets/stat.md +10 -10
- package/src/recipes/widgets/tags.md +6 -6
- package/src/recipes/widgets/text.md +6 -6
- package/src/recipes/widgets/timeline.md +6 -6
- package/src/recipes/widgets/trombinoscope.md +8 -8
- package/src/summarize.ts +6 -6
- package/src/tool-layers.ts +26 -26
package/package.json
CHANGED
package/src/autoui-server.ts
CHANGED
|
@@ -12,7 +12,7 @@ const RECIPES: string[] = [
|
|
|
12
12
|
// ── stat ────────────────────────────────────────────────────────────────
|
|
13
13
|
`---
|
|
14
14
|
widget: stat
|
|
15
|
-
description:
|
|
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
|
-
##
|
|
34
|
-
|
|
33
|
+
## When to use
|
|
34
|
+
Display a single key figure (KPI, total, counter).
|
|
35
35
|
|
|
36
|
-
##
|
|
37
|
-
|
|
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:
|
|
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
|
-
##
|
|
62
|
-
|
|
61
|
+
## When to use
|
|
62
|
+
Display properties or metadata as key/value pairs.
|
|
63
63
|
|
|
64
|
-
##
|
|
65
|
-
|
|
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:
|
|
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
|
-
##
|
|
86
|
-
|
|
85
|
+
## When to use
|
|
86
|
+
Display a simple list of text items.
|
|
87
87
|
|
|
88
|
-
##
|
|
89
|
-
|
|
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:
|
|
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
|
-
##
|
|
109
|
+
## When to use
|
|
110
110
|
Pour un graphique a barres simple avec des labels et valeurs numeriques.
|
|
111
111
|
|
|
112
|
-
##
|
|
113
|
-
|
|
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:
|
|
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
|
-
##
|
|
135
|
-
|
|
134
|
+
## When to use
|
|
135
|
+
Display an alert, warning, or notification.
|
|
136
136
|
|
|
137
|
-
##
|
|
138
|
-
|
|
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:
|
|
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
|
-
##
|
|
157
|
-
|
|
156
|
+
## When to use
|
|
157
|
+
Display a source code snippet with syntax highlighting.
|
|
158
158
|
|
|
159
|
-
##
|
|
160
|
-
|
|
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:
|
|
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
|
-
##
|
|
177
|
-
|
|
176
|
+
## When to use
|
|
177
|
+
Display a free-form text block.
|
|
178
178
|
|
|
179
|
-
##
|
|
180
|
-
|
|
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:
|
|
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
|
-
##
|
|
205
|
+
## When to use
|
|
206
206
|
Pour proposer des actions cliquables a l'utilisateur.
|
|
207
207
|
|
|
208
|
-
##
|
|
209
|
-
|
|
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:
|
|
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
|
-
##
|
|
237
|
-
|
|
236
|
+
## When to use
|
|
237
|
+
Display tags, categories, or badges.
|
|
238
238
|
|
|
239
|
-
##
|
|
240
|
-
|
|
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:
|
|
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
|
-
##
|
|
276
|
-
|
|
275
|
+
## When to use
|
|
276
|
+
Display structured data in a table with column sorting.
|
|
277
277
|
|
|
278
|
-
##
|
|
279
|
-
|
|
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:
|
|
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
|
-
##
|
|
312
|
-
|
|
311
|
+
## When to use
|
|
312
|
+
Display a sequence of events over time.
|
|
313
313
|
|
|
314
|
-
##
|
|
315
|
-
|
|
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:
|
|
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
|
-
##
|
|
358
|
-
|
|
357
|
+
## When to use
|
|
358
|
+
Display a person or entity card with structured fields.
|
|
359
359
|
|
|
360
|
-
##
|
|
361
|
-
|
|
360
|
+
## How to use
|
|
361
|
+
Call widget_display({name: "profile", params: {name: "Alice", fields: [{label:"Role", value:"Dev"}]}}).
|
|
362
362
|
|
|
363
|
-
##
|
|
364
|
-
-
|
|
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:
|
|
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
|
-
##
|
|
398
|
-
|
|
397
|
+
## When to use
|
|
398
|
+
Display a grid of people (team, assembly, etc.).
|
|
399
399
|
|
|
400
|
-
##
|
|
401
|
-
|
|
400
|
+
## How to use
|
|
401
|
+
Call widget_display({name: "trombinoscope", params: {people: [{name: "Alice", badge: "Lead"}]}}).
|
|
402
402
|
|
|
403
|
-
##
|
|
404
|
-
-
|
|
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:
|
|
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
|
-
##
|
|
426
|
-
|
|
425
|
+
## When to use
|
|
426
|
+
Display a complex JSON structure interactively.
|
|
427
427
|
|
|
428
|
-
##
|
|
429
|
-
|
|
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:
|
|
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
|
-
##
|
|
465
|
+
## When to use
|
|
466
466
|
Pour visualiser la composition d'une assemblee parlementaire.
|
|
467
467
|
|
|
468
|
-
##
|
|
469
|
-
|
|
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:
|
|
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
|
-
##
|
|
507
|
+
## When to use
|
|
508
508
|
Pour des graphiques multi-series (barres, lignes, aires, camembert, donut).
|
|
509
509
|
|
|
510
|
-
##
|
|
511
|
-
|
|
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:
|
|
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
|
-
##
|
|
545
|
-
|
|
544
|
+
## When to use
|
|
545
|
+
Display results, records, or entities as a card grid.
|
|
546
546
|
|
|
547
|
-
##
|
|
548
|
-
|
|
547
|
+
## How to use
|
|
548
|
+
Call widget_display({name: "cards", params: {cards: [{title: "Projet A", description: "En cours"}]}}).
|
|
549
549
|
|
|
550
|
-
##
|
|
551
|
-
-
|
|
550
|
+
## Common mistakes
|
|
551
|
+
- NEVER invent image URLs for the image field — only 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:
|
|
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
|
-
##
|
|
597
|
+
## When to use
|
|
598
598
|
Pour visualiser des flux entre categories (votes, parcours, transferts).
|
|
599
599
|
|
|
600
|
-
##
|
|
601
|
-
|
|
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:
|
|
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
|
-
##
|
|
634
|
-
|
|
633
|
+
## When to use
|
|
634
|
+
Display a stream of logs or system events.
|
|
635
635
|
|
|
636
|
-
##
|
|
637
|
-
|
|
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:
|
|
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
|
-
##
|
|
669
|
-
|
|
668
|
+
## When to use
|
|
669
|
+
Display an image collection with lightbox navigation.
|
|
670
670
|
|
|
671
|
-
##
|
|
672
|
-
|
|
671
|
+
## How to use
|
|
672
|
+
Call widget_display({name: "gallery", params: {images: [{src: "https://...", alt: "Photo 1"}]}}).
|
|
673
673
|
|
|
674
|
-
##
|
|
675
|
-
-
|
|
676
|
-
-
|
|
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:
|
|
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
|
-
##
|
|
709
|
+
## When to use
|
|
710
710
|
Pour presenter du contenu en diaporama avec navigation.
|
|
711
711
|
|
|
712
|
-
##
|
|
713
|
-
|
|
712
|
+
## How to use
|
|
713
|
+
Call widget_display({name: "carousel", params: {slides: [{src: "https://...", title: "Slide 1"}]}}).
|
|
714
714
|
|
|
715
|
-
##
|
|
716
|
-
-
|
|
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:
|
|
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
|
-
##
|
|
764
|
-
|
|
763
|
+
## When to use
|
|
764
|
+
Display a geographic map with markers.
|
|
765
765
|
|
|
766
|
-
##
|
|
767
|
-
|
|
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
|
|
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
|
-
##
|
|
800
|
+
## When to use
|
|
801
801
|
Pour un KPI enrichi avec delta, unite et variante de couleur.
|
|
802
802
|
|
|
803
|
-
##
|
|
804
|
-
|
|
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:
|
|
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
|
-
##
|
|
854
|
+
## When to use
|
|
855
855
|
Pour des grilles de donnees avec mise en valeur de cellules (heatmap, comparaison).
|
|
856
856
|
|
|
857
|
-
##
|
|
858
|
-
|
|
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:
|
|
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
|
-
##
|
|
882
|
+
## When to use
|
|
883
883
|
Pour des visualisations avancees D3.js (heatmap hexagonale, radial, treemap, graphe de force).
|
|
884
884
|
|
|
885
|
-
##
|
|
886
|
-
|
|
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:
|
|
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
|
-
##
|
|
915
|
+
## When to use
|
|
916
916
|
Pour des visualisations custom, animations, ou prototypes interactifs en JS pur.
|
|
917
917
|
|
|
918
|
-
##
|
|
919
|
-
|
|
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:
|
|
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
|
-
##
|
|
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
|
-
##
|
|
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()
|
package/src/diagnostics.ts
CHANGED
|
@@ -111,9 +111,9 @@ export function runDiagnostics(
|
|
|
111
111
|
if (patches.length > 0) {
|
|
112
112
|
diagnostics.push({
|
|
113
113
|
severity: 'warning',
|
|
114
|
-
title: `Schema
|
|
115
|
-
detail: `${patches.length} correction(s)
|
|
116
|
-
codeFix: `
|
|
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
|
}
|