@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
@@ -1,39 +1,39 @@
1
1
  ---
2
- id: afficher-profil-parlementaire-avec-hemicycle-et-votes
3
- name: Afficher le profil d'un parlementaire avec hemicycle, votes et timeline des mandats
2
+ id: display-parliamentary-profile-with-hemicycle-and-votes
3
+ name: Display a parliamentary profile with hemicycle, votes and mandate timeline
4
4
  components_used: [profile, hemicycle, timeline, table, stat-card, kv]
5
- when: les donnees MCP concernent un depute, senateur, groupe parlementaire, scrutin ou amendement provenant d'une base de donnees parlementaire
5
+ when: MCP data concerns a deputy, senator, parliamentary group, vote, or amendment from a parliamentary database
6
6
  servers: [tricoteuses]
7
7
  layout:
8
8
  type: grid
9
9
  columns: 2
10
- arrangement: profile + stats en haut, hemicycle + timeline en bas
10
+ arrangement: profile + stats at top, hemicycle + timeline below
11
11
  ---
12
12
 
13
- ## Quand utiliser
13
+ ## When to use
14
14
 
15
- Les resultats MCP proviennent du serveur Tricoteuses (base de donnees parlementaire francaise) et concernent :
16
- - Un **depute ou senateur** : fiche individuelle, mandats, activite
17
- - Un **groupe politique** : composition, votes, positionnement
18
- - Des **scrutins publics** : resultats de vote, repartition par groupe
19
- - Des **amendements** : texte, auteur, sort, article vise
20
- - Des **dossiers legislatifs** : parcours d'un texte, navette parlementaire
15
+ MCP results come from the Tricoteuses server (French parliamentary database) and concern:
16
+ - A **deputy or senator**: individual profile, mandates, activity
17
+ - A **political group**: composition, votes, positioning
18
+ - **Public votes**: vote results, breakdown by group
19
+ - **Amendments**: text, author, outcome, targeted article
20
+ - **Legislative files**: text journey, parliamentary shuttle
21
21
 
22
- La recette est specifique au serveur Tricoteuses et a ses outils : `query_sql`, `search_recipes`, `list_tables`, `describe_table`.
22
+ This recipe is specific to the Tricoteuses server and its tools: `query_sql`, `search_recipes`, `list_tables`, `describe_table`.
23
23
 
24
- ## Comment
24
+ ## How to use
25
25
 
26
- 1. **Recuperer les informations du parlementaire** via les outils Tricoteuses :
26
+ 1. **Retrieve the parliamentary member's information** via the Tricoteuses tools:
27
27
  ```
28
28
  query_sql({sql: "SELECT * FROM acteurs WHERE nom ILIKE '%dupont%' AND type = 'depute'"})
29
29
  ```
30
- Ou via les recipes Tricoteuses :
30
+ Or via Tricoteuses recipes:
31
31
  ```
32
32
  search_recipes({query: "profil depute"})
33
33
  get_recipe({name: "recipe-name"})
34
34
  ```
35
35
 
36
- 2. **Afficher la fiche profil** :
36
+ 2. **Display the profile card**:
37
37
  ```
38
38
  component("profile", {
39
39
  name: "Jean Dupont",
@@ -43,15 +43,15 @@ La recette est specifique au serveur Tricoteuses et a ses outils : `query_sql`,
43
43
  })
44
44
  ```
45
45
 
46
- 3. **Afficher les statistiques d'activite** en stat-cards :
46
+ 3. **Display activity statistics** in stat-cards:
47
47
  ```
48
- component("stat-card", {label: "Participation aux scrutins", value: "87%", trend: "+3%", trendDir: "up"})
49
- component("stat-card", {label: "Amendements deposes", value: "42", icon: "file-text"})
50
- component("stat-card", {label: "Questions ecrites", value: "18", icon: "help-circle"})
51
- component("stat-card", {label: "Interventions hemicycle", value: "7", icon: "mic"})
48
+ component("stat-card", {label: "Vote participation", value: "87%", trend: "+3%", trendDir: "up"})
49
+ component("stat-card", {label: "Amendments filed", value: "42", icon: "file-text"})
50
+ component("stat-card", {label: "Written questions", value: "18", icon: "help-circle"})
51
+ component("stat-card", {label: "Hemicycle speeches", value: "7", icon: "mic"})
52
52
  ```
53
53
 
54
- 4. **Si des donnees de vote par groupe sont disponibles**, afficher l'hemicycle :
54
+ 4. **If vote data by group is available**, display the hemicycle:
55
55
  ```
56
56
  component("hemicycle", {
57
57
  groups: [
@@ -63,82 +63,82 @@ La recette est specifique au serveur Tricoteuses et a ses outils : `query_sql`,
63
63
  })
64
64
  ```
65
65
 
66
- 5. **Pour l'historique des mandats ou votes cles**, utiliser la timeline :
66
+ 5. **For the mandate history or key votes**, use the timeline:
67
67
  ```
68
68
  component("timeline", {
69
69
  events: [
70
- {date: "2022-06-19", title: "Elu depute", description: "3e circ. du Rhone"},
71
- {date: "2023-03-16", title: "Vote 49.3 retraites", description: "Motion de censure rejetee"},
72
- {date: "2024-07-07", title: "Reelu depute", description: "2e tour"}
70
+ {date: "2022-06-19", title: "Elected deputy", description: "3e circ. du Rhone"},
71
+ {date: "2023-03-16", title: "Vote 49.3 pensions reform", description: "Motion de censure rejetee"},
72
+ {date: "2024-07-07", title: "Re-elected deputy", description: "2nd round"}
73
73
  ]
74
74
  })
75
75
  ```
76
76
 
77
- 6. **Pour les details des votes ou amendements**, utiliser une table :
77
+ 6. **For vote or amendment details**, use a table:
78
78
  ```
79
79
  component("table", {
80
- columns: ["Date", "Scrutin", "Vote", "Resultat"],
80
+ columns: ["Date", "Vote", "Position", "Result"],
81
81
  rows: votes.map(v => [v.date, v.intitule, v.position, v.resultat])
82
82
  })
83
83
  ```
84
84
 
85
- 7. **Completer avec les metadonnees** en kv :
85
+ 7. **Complete with metadata** in kv:
86
86
  ```
87
87
  component("kv", {pairs: [
88
88
  ["Legislature", "XVIe (2022-2027)"],
89
- ["Groupe", "Renaissance"],
90
- ["Commission permanente", "Lois"],
89
+ ["Group", "Renaissance"],
90
+ ["Standing committee", "Lois"],
91
91
  ["Source", "Tricoteuses — mcp.code4code.eu"]
92
92
  ]})
93
93
  ```
94
94
 
95
- ## Exemples
95
+ ## Examples
96
96
 
97
- ### Profil complet d'un depute
97
+ ### Complete deputy profile
98
98
  ```
99
- // 1. Chercher le depute
99
+ // 1. Look up the deputy
100
100
  query_sql({sql: "SELECT * FROM acteurs WHERE nom ILIKE '%dupont%' LIMIT 1"})
101
101
 
102
- // 2. Ses amendements
102
+ // 2. Their amendments
103
103
  query_sql({sql: "SELECT COUNT(*) as total, SUM(CASE WHEN sort='Adopte' THEN 1 ELSE 0 END) as adoptes FROM amendements WHERE auteur_id = $id"})
104
104
 
105
- // 3. Ses votes recents
105
+ // 3. Their recent votes
106
106
  query_sql({sql: "SELECT s.date, s.intitule, v.position FROM scrutins s JOIN votes v ON s.id = v.scrutin_id WHERE v.acteur_id = $id ORDER BY s.date DESC LIMIT 10"})
107
107
 
108
- // 4. Rendu complet
108
+ // 4. Full render
109
109
  component("profile", {name, subtitle, photo})
110
- component("stat-card", {label: "Amendements", value: total, icon: "file-text"})
111
- component("stat-card", {label: "Adoptes", value: adoptes, icon: "check"})
112
- component("stat-card", {label: "Taux d'adoption", value: Math.round(adoptes/total*100) + "%"})
113
- component("table", {columns: ["Date", "Scrutin", "Position"], rows: votes})
110
+ component("stat-card", {label: "Amendments", value: total, icon: "file-text"})
111
+ component("stat-card", {label: "Adopted", value: adoptes, icon: "check"})
112
+ component("stat-card", {label: "Adoption rate", value: Math.round(adoptes/total*100) + "%"})
113
+ component("table", {columns: ["Date", "Vote", "Position"], rows: votes})
114
114
  component("timeline", {events: mandats})
115
115
  ```
116
116
 
117
- ### Resultat d'un scrutin avec hemicycle
117
+ ### Vote result with hemicycle
118
118
  ```
119
- // 1. Recuperer le scrutin
119
+ // 1. Retrieve the vote
120
120
  query_sql({sql: "SELECT * FROM scrutins WHERE intitule ILIKE '%budget%' ORDER BY date DESC LIMIT 1"})
121
121
 
122
- // 2. Repartition par groupe
122
+ // 2. Breakdown by group
123
123
  query_sql({sql: "SELECT g.nom, g.couleur, COUNT(*) FILTER (WHERE v.position='pour') as pour, COUNT(*) FILTER (WHERE v.position='contre') as contre FROM votes v JOIN groupes g ON v.groupe_id = g.id WHERE v.scrutin_id = $id GROUP BY g.nom, g.couleur"})
124
124
 
125
- // 3. Rendu
126
- component("stat-card", {label: "Pour", value: "312", trendDir: "up"})
127
- component("stat-card", {label: "Contre", value: "245", trendDir: "down"})
125
+ // 3. Render
126
+ component("stat-card", {label: "For", value: "312", trendDir: "up"})
127
+ component("stat-card", {label: "Against", value: "245", trendDir: "down"})
128
128
  component("hemicycle", {groups: groupResults, result: {pour: 312, contre: 245, abstention: 18}})
129
- component("table", {columns: ["Groupe", "Pour", "Contre", "Abstention"], rows: groupDetails})
129
+ component("table", {columns: ["Group", "For", "Against", "Abstention"], rows: groupDetails})
130
130
  ```
131
131
 
132
- ## Composants specifiques au domaine parlementaire
132
+ ## Components specific to the parliamentary domain
133
133
 
134
- - **hemicycle** : arc de cercle montrant la repartition des votes par groupe politique, avec couleurs par parti
135
- - **profile** : fiche individuelle avec photo, nom, fonction, details structurees
136
- - **timeline** : chronologie des mandats, votes cles, evenements parlementaires
137
- - **trombinoscope** : grille de photos pour un groupe de parlementaires (utile pour les commissions)
134
+ - **hemicycle**: semicircular arc showing vote distribution by political group, with party colors
135
+ - **profile**: individual card with photo, name, role, structured details
136
+ - **timeline**: chronology of mandates, key votes, parliamentary events
137
+ - **trombinoscope**: photo grid for a group of parliamentary members (useful for committees)
138
138
 
139
- ## Erreurs courantes
139
+ ## Common mistakes
140
140
 
141
- - **Requetes SQL trop larges** : toujours utiliser LIMIT et des filtres precis pour eviter de surcharger le serveur
142
- - **Confondre acteurs et mandats** : un depute peut avoir plusieurs mandats dans la base, filtrer par legislature courante
143
- - **Oublier la source** : toujours crediter "Tricoteuses" comme source dans un kv final
144
- - **Hemicycle sans contexte** : toujours accompagner le composant hemicycle de stat-cards avec les totaux pour/contre/abstention
141
+ - **Overly broad SQL queries**: always use LIMIT and precise filters to avoid overloading the server
142
+ - **Confusing actors and mandates**: a deputy can have multiple mandates in the database filter by current legislature
143
+ - **Forgetting the source**: always credit "Tricoteuses" as the source in a final kv
144
+ - **Hemicycle without context**: always accompany the hemicycle component with stat-cards showing for/against/abstention totals
@@ -1,85 +1,85 @@
1
1
  ---
2
- id: rechercher-textes-juridiques-legifrance
3
- name: Rechercher des textes juridiques, codes et lois via les donnees Legifrance
2
+ id: search-legal-texts-legifrance
3
+ name: Search legal texts, codes and laws via Legifrance data
4
4
  components_used: [table, text, kv, code]
5
- when: l'utilisateur demande des informations sur des lois, codes juridiques, articles de loi, decrets, ordonnances ou textes legislatifs francais disponibles dans la base Tricoteuses
5
+ when: the user asks for information about French laws, legal codes, articles of law, decrees, ordinances or legislative texts available in the Tricoteuses database
6
6
  servers: [tricoteuses]
7
7
  layout:
8
8
  type: grid
9
9
  columns: 1
10
10
  ---
11
11
 
12
- ## Quand utiliser
12
+ ## When to use
13
13
 
14
- L'utilisateur pose une question sur le droit francais, la legislation, ou un texte juridique specifique :
15
- - "Que dit l'article 49-3 de la Constitution ?"
16
- - "Quels decrets ont ete publies sur le droit du travail en 2025 ?"
17
- - "Montre-moi les articles du Code civil sur la filiation"
18
- - "Quelles lois ont ete promulguees ce mois-ci ?"
14
+ The user asks a question about French law, legislation, or a specific legal text:
15
+ - "What does article 49-3 of the Constitution say?"
16
+ - "Which decrees were published on labour law in 2025?"
17
+ - "Show me the articles of the Civil Code on filiation"
18
+ - "Which laws were enacted this month?"
19
19
 
20
- La base Tricoteuses contient des donnees issues de Legifrance (textes consolides, codes, lois, decrets). Utiliser `list_tables` pour decouvrir les tables disponibles dans le schema legifrance, puis `describe_table` et `query_sql` pour extraire les textes.
20
+ The Tricoteuses database contains data from Legifrance (consolidated texts, codes, laws, decrees). Use `list_tables` to discover the available tables in the legifrance schema, then `describe_table` and `query_sql` to extract the texts.
21
21
 
22
- ## Comment
22
+ ## How to use
23
23
 
24
- 1. **Decouvrir les tables disponibles** :
24
+ 1. **Discover available tables**:
25
25
  ```
26
26
  list_tables({schema: "legifrance"})
27
27
  ```
28
- Tables typiques : `textes_versions`, `articles`, `codes`, `sections`
28
+ Typical tables: `textes_versions`, `articles`, `codes`, `sections`
29
29
 
30
- 2. **Decrire la structure** d'une table pour comprendre les colonnes :
30
+ 2. **Describe the structure** of a table to understand the columns:
31
31
  ```
32
32
  describe_table({schema: "legifrance", table: "articles"})
33
33
  ```
34
34
 
35
- 3. **Rechercher les textes** avec des requetes SQL :
35
+ 3. **Search for texts** with SQL queries:
36
36
  ```
37
37
  query_sql({sql: "SELECT titre, date_publi, nature FROM legifrance.textes_versions WHERE titre ILIKE '%travail%' ORDER BY date_publi DESC LIMIT 20"})
38
38
  ```
39
39
 
40
- 4. **Afficher les resultats** :
41
- - **Table** pour les listes de textes :
40
+ 4. **Display results**:
41
+ - **Table** for lists of texts:
42
42
  ```
43
- component("table", {columns: ["Titre", "Nature", "Date", "Etat"], rows: textes})
43
+ component("table", {columns: ["Title", "Nature", "Date", "Status"], rows: textes})
44
44
  ```
45
- - **Text** pour le contenu d'un article :
45
+ - **Text** for the content of an article:
46
46
  ```
47
47
  component("text", {content: "### Article 49-3 de la Constitution\n\n" + article.contenu})
48
48
  ```
49
- - **Code** pour les extraits legislatifs avec mise en forme :
49
+ - **Code** for legislative excerpts with formatting:
50
50
  ```
51
51
  component("code", {language: "text", content: article.texte_integral})
52
52
  ```
53
- - **KV** pour les metadonnees du texte :
53
+ - **KV** for text metadata:
54
54
  ```
55
- component("kv", {pairs: [["Nature", "Loi organique"], ["Date", "2023-04-14"], ["NOR", "JUSX2300001L"], ["Etat", "En vigueur"]]})
55
+ component("kv", {pairs: [["Nature", "Loi organique"], ["Date", "2023-04-14"], ["NOR", "JUSX2300001L"], ["Status", "En vigueur"]]})
56
56
  ```
57
57
 
58
- ## Exemples
58
+ ## Examples
59
59
 
60
- ### Articles d'un code juridique
60
+ ### Articles from a legal code
61
61
  ```
62
- // 1. Trouver les articles du Code civil sur la filiation
62
+ // 1. Find articles of the Civil Code on filiation
63
63
  query_sql({sql: "SELECT num_article, contenu, etat FROM legifrance.articles WHERE code = 'Code civil' AND section ILIKE '%filiation%' ORDER BY num_article"})
64
64
 
65
- // 2. Rendu
66
- component("kv", {pairs: [["Code", "Code civil"], ["Section", "De la filiation"], ["Articles trouves", results.length]]})
67
- component("table", {columns: ["Article", "Contenu (extrait)", "Etat"], rows: results.map(r => [r.num_article, r.contenu.slice(0, 200) + "...", r.etat])})
65
+ // 2. Render
66
+ component("kv", {pairs: [["Code", "Code civil"], ["Section", "De la filiation"], ["Articles found", results.length]]})
67
+ component("table", {columns: ["Article", "Content (excerpt)", "Status"], rows: results.map(r => [r.num_article, r.contenu.slice(0, 200) + "...", r.etat])})
68
68
  ```
69
69
 
70
- ### Textes recents par nature
70
+ ### Recent texts by nature
71
71
  ```
72
- // 1. Lois promulguees en 2026
72
+ // 1. Laws enacted in 2026
73
73
  query_sql({sql: "SELECT titre, date_publi, nor FROM legifrance.textes_versions WHERE nature = 'LOI' AND date_publi >= '2026-01-01' ORDER BY date_publi DESC"})
74
74
 
75
- // 2. Rendu
76
- component("stat-card", {label: "Lois promulguees en 2026", value: results.length, icon: "scale"})
77
- component("table", {columns: ["Titre", "Date", "NOR"], rows: results})
75
+ // 2. Render
76
+ component("stat-card", {label: "Laws enacted in 2026", value: results.length, icon: "scale"})
77
+ component("table", {columns: ["Title", "Date", "NOR"], rows: results})
78
78
  ```
79
79
 
80
- ## Erreurs courantes
80
+ ## Common mistakes
81
81
 
82
- - **Confondre les schemas** : les donnees Legifrance sont dans le schema `legifrance`, pas dans `assemblee` — verifier avec `list_tables`
83
- - **Requetes trop larges** : toujours utiliser LIMIT et des filtres WHERE precis
84
- - **Afficher le texte integral brut** : utiliser le composant `text` avec formatage Markdown plutot que de dumper le JSON
85
- - **Oublier de preciser l'etat du texte** : un article peut etre abroge, modifie ou en vigueurtoujours l'indiquer
82
+ - **Confusing schemas**: Legifrance data is in the `legifrance` schema, not in `assemblee` — verify with `list_tables`
83
+ - **Overly broad queries**: always use LIMIT and precise WHERE filters
84
+ - **Displaying raw full text**: use the `text` component with Markdown formatting rather than dumping the JSON
85
+ - **Forgetting to specify the text status**: an article can be repealed, amended or in forcealways indicate it
@@ -1,50 +1,50 @@
1
1
  ---
2
- id: visualiser-previsions-meteo-avec-graphiques-et-kpi
3
- name: Visualiser des previsions meteo avec graphiques temporels et indicateurs cles
2
+ id: visualize-weather-forecasts-with-charts-and-kpis
3
+ name: Visualize weather forecasts with time series charts and key indicators
4
4
  components_used: [stat-card, chart-rich, map, kv]
5
- when: les donnees MCP contiennent des mesures meteorologiques (temperature, humidite, vent, precipitations) ou des previsions horaires/journalieres
5
+ when: MCP data contains weather measurements (temperature, humidity, wind, precipitation) or hourly/daily forecasts
6
6
  servers: [openmeteo]
7
7
  layout:
8
8
  type: grid
9
9
  columns: 2
10
- arrangement: stat-cards en haut, chart en bas sur toute la largeur
10
+ arrangement: stat-cards at the top, chart spanning full width at the bottom
11
11
  ---
12
12
 
13
- ## Quand utiliser
13
+ ## When to use
14
14
 
15
- Les resultats MCP contiennent des donnees meteorologiques structurees. Typiquement :
16
- - **Open-Meteo** : previsions horaires (`hourly.temperature_2m`, `hourly.precipitation`), previsions journalieres (`daily.temperature_2m_max/min`), conditions actuelles (`current.temperature_2m`, `current.wind_speed_10m`)
17
- - Toute source retournant des series temporelles de mesures climatiques
15
+ MCP results contain structured weather data. Typically:
16
+ - **Open-Meteo**: hourly forecasts (`hourly.temperature_2m`, `hourly.precipitation`), daily forecasts (`daily.temperature_2m_max/min`), current conditions (`current.temperature_2m`, `current.wind_speed_10m`)
17
+ - Any source returning time series of climate measurements
18
18
 
19
- La recette s'applique meme pour une seule ville : les stat-cards montrent les conditions actuelles, le graphique montre l'evolution.
19
+ This recipe applies even for a single city: stat-cards show current conditions, the chart shows the trend over time.
20
20
 
21
- ## Comment
21
+ ## How to use
22
22
 
23
- 1. **Appeler l'outil meteo** avec les coordonnees ou le nom de la ville :
24
- - Open-Meteo : `get_forecast({latitude: 48.85, longitude: 2.35, hourly: "temperature_2m,precipitation", daily: "temperature_2m_max,temperature_2m_min"})`
25
- 2. **Extraire les KPIs actuels** et les afficher en stat-cards :
26
- - Temperature actuelle : `component("stat-card", {label: "Temperature", value: "18.5°C", icon: "thermometer"})`
27
- - Vent : `component("stat-card", {label: "Vent", value: "12.3 km/h", icon: "wind"})`
28
- - Humidite : `component("stat-card", {label: "Humidite", value: "72%", icon: "droplets"})`
29
- - Precipitations : `component("stat-card", {label: "Pluie (24h)", value: "2.1 mm", icon: "cloud-rain"})`
30
- 3. **Construire le graphique temporel** a partir des series horaires ou journalieres :
23
+ 1. **Call the weather tool** with coordinates or city name:
24
+ - Open-Meteo: `get_forecast({latitude: 48.85, longitude: 2.35, hourly: "temperature_2m,precipitation", daily: "temperature_2m_max,temperature_2m_min"})`
25
+ 2. **Extract current KPIs** and display them as stat-cards:
26
+ - Current temperature: `component("stat-card", {label: "Temperature", value: "18.5°C", icon: "thermometer"})`
27
+ - Wind: `component("stat-card", {label: "Wind", value: "12.3 km/h", icon: "wind"})`
28
+ - Humidity: `component("stat-card", {label: "Humidity", value: "72%", icon: "droplets"})`
29
+ - Precipitation: `component("stat-card", {label: "Rain (24h)", value: "2.1 mm", icon: "cloud-rain"})`
30
+ 3. **Build the time series chart** from hourly or daily series:
31
31
  - `component("chart-rich", {type: "line", labels: hourly.time, datasets: [{label: "Temperature °C", data: hourly.temperature_2m}]})`
32
- - Pour les precipitations, preferer un type "bar" superpose
33
- 4. **Ajouter la carte** si des coordonnees sont disponibles :
32
+ - For precipitation, prefer an overlaid "bar" type
33
+ 4. **Add the map** if coordinates are available:
34
34
  - `component("map", {center: [lat, lon], zoom: 10, markers: [{lat, lon, label: "Paris"}]})`
35
- 5. **Completer avec les details** en kv :
36
- - `component("kv", {pairs: [["Lever du soleil", "06:42"], ["Coucher", "20:15"], ["Indice UV", "5 (modere)"]]})`
35
+ 5. **Complete with details** in kv:
36
+ - `component("kv", {pairs: [["Sunrise", "06:42"], ["Sunset", "20:15"], ["UV Index", "5 (moderate)"]]})`
37
37
 
38
- ## Exemples
38
+ ## Examples
39
39
 
40
- ### Previsions 7 jours pour Paris
40
+ ### 7-day forecast for Paris
41
41
  ```
42
- // Appel MCP
42
+ // MCP call
43
43
  get_forecast({latitude: 48.8566, longitude: 2.3522, daily: "temperature_2m_max,temperature_2m_min,precipitation_sum"})
44
44
 
45
- // Rendu
46
- component("stat-card", {label: "Aujourd'hui", value: "22°C / 14°C", icon: "thermometer"})
47
- component("stat-card", {label: "Pluie prevue", value: "0 mm", icon: "sun"})
45
+ // Render
46
+ component("stat-card", {label: "Today", value: "22°C / 14°C", icon: "thermometer"})
47
+ component("stat-card", {label: "Expected rain", value: "0 mm", icon: "sun"})
48
48
  component("chart-rich", {
49
49
  type: "line",
50
50
  labels: daily.time, // ["2026-04-09", "2026-04-10", ...]
@@ -55,21 +55,21 @@ component("chart-rich", {
55
55
  })
56
56
  ```
57
57
 
58
- ### Previsions horaires avec precipitations
58
+ ### Hourly forecast with precipitation
59
59
  ```
60
60
  component("chart-rich", {
61
61
  type: "line",
62
62
  labels: hourly.time.slice(0, 24),
63
63
  datasets: [
64
64
  {label: "Temperature °C", data: hourly.temperature_2m.slice(0, 24), yAxisID: "y"},
65
- {label: "Pluie mm", data: hourly.precipitation.slice(0, 24), yAxisID: "y1", type: "bar"}
65
+ {label: "Rain mm", data: hourly.precipitation.slice(0, 24), yAxisID: "y1", type: "bar"}
66
66
  ]
67
67
  })
68
68
  ```
69
69
 
70
- ## Erreurs courantes
70
+ ## Common mistakes
71
71
 
72
- - **Afficher les donnees brutes JSON** au lieu de les visualiser avec des composants
73
- - **Ne pas convertir les unites** : Open-Meteo retourne en unites SI par defaut (m/s pour le vent convertir en km/h si l'utilisateur est francophone)
74
- - **Oublier les stat-cards** pour les KPIs principaux : un graphique seul ne donne pas les chiffres cles immediatement
75
- - **Trop de points sur le graphique** : pour des previsions horaires sur 7 jours (168 points), preferer un resample journalier ou limiter a 48h en mode horaire
72
+ - **Displaying raw JSON data** instead of visualizing it with components
73
+ - **Not converting units**: Open-Meteo returns SI units by default (m/s for windconvert to km/h if appropriate for the user)
74
+ - **Forgetting stat-cards** for the main KPIs: a chart alone does not surface key figures immediately
75
+ - **Too many points on the chart**: for hourly forecasts over 7 days (168 points), prefer daily resampling or limit to 48h in hourly mode
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  widget: actions
3
- description: Rangée de boutons d'action
3
+ description: Row of action buttons
4
4
  group: simple
5
5
  schema:
6
6
  type: object
@@ -20,9 +20,9 @@ schema:
20
20
  type: boolean
21
21
  ---
22
22
 
23
- ## Quand utiliser
24
- Pour proposer des choix d'action à l'utilisateur — confirmation, navigation, ou sélection parmi plusieurs options.
23
+ ## When to use
24
+ Offer action choices to the user — confirmation, navigation, or selection among multiple options.
25
25
 
26
- ## Comment
27
- 1. Identifier les actions pertinentes selon le contexte
28
- 2. Appeler `autoui_webmcp_widget_display('actions', { buttons: [{ label: 'Confirmer', primary: true }, { label: 'Annuler' }] })`
26
+ ## How to use
27
+ 1. Identify the relevant actions based on context
28
+ 2. Call `autoui_webmcp_widget_display('actions', { buttons: [{ label: 'Confirm', primary: true }, { label: 'Cancel' }] })`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  widget: alert
3
- description: Alerte ou notification système
3
+ description: System alert or notification
4
4
  group: simple
5
5
  schema:
6
6
  type: object
@@ -19,9 +19,9 @@ schema:
19
19
  - error
20
20
  ---
21
21
 
22
- ## Quand utiliser
23
- Pour signaler une information importante, un avertissement ou une erreur à l'utilisateur. Utile après une action qui nécessite attention (ex: seuil dépassé, opération échouée).
22
+ ## When to use
23
+ Signal important information, a warning, or an error to the user. Useful after an action that requires attention (e.g. threshold exceeded, operation failed).
24
24
 
25
- ## Comment
26
- 1. Déterminer le niveau d'alerte selon le contexte ('info', 'warn', 'error')
27
- 2. Appeler `autoui_webmcp_widget_display('alert', { title: 'Quota dépassé', message: 'Le stockage utilisé dépasse 90%', level: 'warn' })`
25
+ ## How to use
26
+ 1. Determine the alert level based on context ('info', 'warn', 'error')
27
+ 2. Call `autoui_webmcp_widget_display('alert', { title: 'Quota exceeded', message: 'Storage usage is above 90%', level: 'warn' })`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  widget: cards
3
- description: Grille de cartes avec titre, description et tags
3
+ description: Card grid with title, description, and tags
4
4
  group: rich
5
5
  schema:
6
6
  type: object
@@ -28,14 +28,14 @@ schema:
28
28
  type: string
29
29
  ---
30
30
 
31
- ## Quand utiliser
32
- Pour afficher une collection d'éléments richesproduits, articles, projets, événements. Chaque carte combine titre, description et tags. Préférer `list` pour des éléments simples sans structure.
31
+ ## When to use
32
+ Display a collection of rich items products, articles, projects, events. Each card combines a title, description, and tags. Prefer `list` for simple items without structure.
33
33
 
34
- ## Comment
35
- 1. Récupérer la collection via MCP
36
- 2. Appeler `autoui_webmcp_widget_display('cards', { title: 'Projets actifs', cards: [{ title: 'Refonte UI', description: 'Migration vers Svelte 5', subtitle: 'Q2 2024', tags: ['frontend', 'priorité haute'] }] })`
34
+ ## How to use
35
+ 1. Retrieve the collection via MCP
36
+ 2. Call `autoui_webmcp_widget_display('cards', { title: 'Active projects', cards: [{ title: 'UI Redesign', description: 'Migration to Svelte 5', subtitle: 'Q2 2024', tags: ['frontend', 'high priority'] }] })`
37
37
 
38
- ## Erreurs courantes
39
- - Ne JAMAIS inventer d'URLs d'images pour le champ `image`. Utiliser UNIQUEMENT les URLs retournées par les outils MCP. Si aucune URL n'est disponible, ne pas inclure de champ image — le widget s'affiche correctement sans.
40
- - STRICTEMENT INTERDIT : URLs placeholder (`via.placeholder.com`, `placehold.co`, `dummyimage.com`, `?text=...`). Omettre le champ `image` plutôt que de mettre un placeholder.
41
- - Toujours fournir un `title` pour chaque carte
38
+ ## Common mistakes
39
+ - NEVER fabricate image URLs for the `image` field. Use ONLY the URLs returned by MCP tools. If no URL is available, do not include an image field the widget renders correctly without it.
40
+ - STRICTLY FORBIDDEN: placeholder URLs (`via.placeholder.com`, `placehold.co`, `dummyimage.com`, `?text=...`). Omit the `image` field rather than using a placeholder.
41
+ - Always provide a `title` for each card
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  widget: carousel
3
- description: Carrousel de slides (images ou contenu)
3
+ description: Slide carousel (images or content)
4
4
  group: media
5
5
  schema:
6
6
  type: object
@@ -28,12 +28,12 @@ schema:
28
28
  type: number
29
29
  ---
30
30
 
31
- ## Quand utiliser
32
- Pour un défilement séquentiel de contenus présentation, tutoriel étape par étape, galerie narrative. Préférer `gallery` pour une vue d'ensemble en grille.
31
+ ## When to use
32
+ For sequential content browsingpresentations, step-by-step tutorials, narrative galleries. Prefer `gallery` for an overview in grid layout.
33
33
 
34
- ## Comment
35
- 1. Récupérer ou composer les slides
36
- 2. Appeler `autoui_webmcp_widget_display('carousel', { title: 'Présentation', slides: [{ title: 'Étape 1', content: 'Introduction au projet...' }, { title: 'Étape 2', src: 'https://...', subtitle: 'Architecture' }], autoPlay: false })`
34
+ ## How to use
35
+ 1. Retrieve or compose the slides
36
+ 2. Call `autoui_webmcp_widget_display('carousel', { title: 'Presentation', slides: [{ title: 'Step 1', content: 'Project introduction...' }, { title: 'Step 2', src: 'https://...', subtitle: 'Architecture' }], autoPlay: false })`
37
37
 
38
- ## Erreurs courantes
39
- - Ne jamais fabriquer d'URLs d'images pour `src` — utiliser uniquement celles retournées par les outils MCP
38
+ ## Common mistakes
39
+ - Never fabricate image URLs for `src` — only use URLs returned by MCP tools
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  widget: chart-rich
3
- description: Graphique avancé multi-types (barres, lignes, aires, camembert)
3
+ description: Advanced multi-type chart (bar, line, area, pie)
4
4
  group: rich
5
5
  schema:
6
6
  type: object
@@ -38,14 +38,14 @@ schema:
38
38
  type: string
39
39
  ---
40
40
 
41
- ## Quand utiliser
42
- Pour des graphiques multi-séries ou des types autres que barres simples (lignes, aires, camemberts, donuts). Préférer `chart` pour un graphique à barres basique mono-série.
41
+ ## When to use
42
+ For multi-series charts or types other than simple bars (lines, areas, pies, donuts). Prefer `chart` for a basic single-series bar chart.
43
43
 
44
- ## Comment
45
- 1. Récupérer les données via MCP
46
- 2. Structurer en séries avec `labels` (axe X) et `data` (séries de valeurs)
47
- 3. Appeler `autoui_webmcp_widget_display('chart-rich', { title: 'Évolution mensuelle', type: 'line', labels: ['Jan', 'Fév', 'Mar'], data: [{ label: '2024', values: [10, 20, 15], color: '#4CAF50' }] })`
44
+ ## How to use
45
+ 1. Fetch data via MCP
46
+ 2. Structure into series with `labels` (X axis) and `data` (value series)
47
+ 3. Call `autoui_webmcp_widget_display('chart-rich', { title: 'Monthly Trend', type: 'line', labels: ['Jan', 'Feb', 'Mar'], data: [{ label: '2024', values: [10, 20, 15], color: '#4CAF50' }] })`
48
48
 
49
- ## Erreurs courantes
50
- - Le nombre de `values` dans chaque série doit correspondre au nombre de `labels`
51
- - Ne pas confondre avec `chart` (widget simple) — `chart-rich` utilise un format de données différent
49
+ ## Common mistakes
50
+ - The number of `values` in each series must match the number of `labels`
51
+ - Do not confuse with `chart` (simple widget) — `chart-rich` uses a different data format