living-ai-documentation 2.5.0 → 3.0.0

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 (106) hide show
  1. package/README.fr.md +27 -7
  2. package/README.md +27 -7
  3. package/dist/frontend-svelte/assets/index-D0RFxOCa.js +143 -0
  4. package/dist/frontend-svelte/assets/index-D8PXg4T3.css +1 -0
  5. package/dist/frontend-svelte/assets/main-BxtmcwZU.js +124 -0
  6. package/dist/{src/frontend → frontend-svelte}/i18n/en.json +24 -44
  7. package/dist/{src/frontend → frontend-svelte}/i18n/fr.json +24 -44
  8. package/dist/frontend-svelte/index.html +23 -0
  9. package/dist/src/routes/blueprint.d.ts +1 -0
  10. package/dist/src/routes/blueprint.d.ts.map +1 -1
  11. package/dist/src/routes/blueprint.js +41 -0
  12. package/dist/src/routes/blueprint.js.map +1 -1
  13. package/dist/src/routes/export.js +1 -1
  14. package/dist/src/routes/export.js.map +1 -1
  15. package/dist/src/server.d.ts.map +1 -1
  16. package/dist/src/server.js +10 -10
  17. package/dist/src/server.js.map +1 -1
  18. package/package.json +7 -4
  19. package/dist/src/frontend/accuracy-gauge.js +0 -70
  20. package/dist/src/frontend/admin.html +0 -1532
  21. package/dist/src/frontend/agents.js +0 -288
  22. package/dist/src/frontend/annotations.js +0 -585
  23. package/dist/src/frontend/blueprint/app.js +0 -762
  24. package/dist/src/frontend/blueprint/app.js.map +0 -1
  25. package/dist/src/frontend/blueprint/app.ts +0 -841
  26. package/dist/src/frontend/blueprint/index.html +0 -61
  27. package/dist/src/frontend/blueprint/styles.css +0 -392
  28. package/dist/src/frontend/blueprint/tsconfig.json +0 -12
  29. package/dist/src/frontend/boot.js +0 -102
  30. package/dist/src/frontend/config.js +0 -30
  31. package/dist/src/frontend/context.html +0 -1252
  32. package/dist/src/frontend/dark-mode.js +0 -20
  33. package/dist/src/frontend/diagram/alignment.js +0 -161
  34. package/dist/src/frontend/diagram/clipboard.js +0 -187
  35. package/dist/src/frontend/diagram/color-picker.js +0 -72
  36. package/dist/src/frontend/diagram/constants.js +0 -109
  37. package/dist/src/frontend/diagram/custom-shapes.js +0 -104
  38. package/dist/src/frontend/diagram/debug.js +0 -43
  39. package/dist/src/frontend/diagram/defaults-modal.js +0 -302
  40. package/dist/src/frontend/diagram/drawio-export.js +0 -649
  41. package/dist/src/frontend/diagram/edge-panel.js +0 -392
  42. package/dist/src/frontend/diagram/edge-rendering.js +0 -12
  43. package/dist/src/frontend/diagram/evidence.js +0 -146
  44. package/dist/src/frontend/diagram/grid.js +0 -78
  45. package/dist/src/frontend/diagram/groups.js +0 -102
  46. package/dist/src/frontend/diagram/history.js +0 -157
  47. package/dist/src/frontend/diagram/image-name-modal.js +0 -48
  48. package/dist/src/frontend/diagram/image-upload.js +0 -36
  49. package/dist/src/frontend/diagram/label-editor.js +0 -115
  50. package/dist/src/frontend/diagram/link-panel.js +0 -144
  51. package/dist/src/frontend/diagram/main.js +0 -361
  52. package/dist/src/frontend/diagram/network.js +0 -2223
  53. package/dist/src/frontend/diagram/node-panel.js +0 -491
  54. package/dist/src/frontend/diagram/node-rendering.js +0 -964
  55. package/dist/src/frontend/diagram/persistence.js +0 -168
  56. package/dist/src/frontend/diagram/ports.js +0 -421
  57. package/dist/src/frontend/diagram/selection-overlay.js +0 -387
  58. package/dist/src/frontend/diagram/state.js +0 -43
  59. package/dist/src/frontend/diagram/t.js +0 -3
  60. package/dist/src/frontend/diagram/toast.js +0 -21
  61. package/dist/src/frontend/diagram/unlock-hold.js +0 -206
  62. package/dist/src/frontend/diagram/zoom.js +0 -20
  63. package/dist/src/frontend/diagram.html +0 -1517
  64. package/dist/src/frontend/documents.js +0 -543
  65. package/dist/src/frontend/export.js +0 -338
  66. package/dist/src/frontend/file-attach.js +0 -178
  67. package/dist/src/frontend/i18n.js +0 -32
  68. package/dist/src/frontend/image-paste.js +0 -126
  69. package/dist/src/frontend/index.html +0 -3301
  70. package/dist/src/frontend/local-search.js +0 -476
  71. package/dist/src/frontend/metadata.js +0 -318
  72. package/dist/src/frontend/misc.js +0 -92
  73. package/dist/src/frontend/modals/confirm-modal.js +0 -82
  74. package/dist/src/frontend/modals/diagram-link-modal.js +0 -137
  75. package/dist/src/frontend/modals/files-modal.js +0 -243
  76. package/dist/src/frontend/modals/new-doc-modal.js +0 -285
  77. package/dist/src/frontend/modals/new-folder-modal.js +0 -169
  78. package/dist/src/frontend/search.js +0 -194
  79. package/dist/src/frontend/shape-editor.html +0 -685
  80. package/dist/src/frontend/sidebar-helpers.js +0 -129
  81. package/dist/src/frontend/sidebar-resize.js +0 -98
  82. package/dist/src/frontend/sidebar.js +0 -379
  83. package/dist/src/frontend/snippets/inline-snippet-edit.js +0 -522
  84. package/dist/src/frontend/snippets/snippet-builders.js +0 -138
  85. package/dist/src/frontend/snippets/snippet-detect.js +0 -27
  86. package/dist/src/frontend/snippets/snippet-list-markdown.js +0 -92
  87. package/dist/src/frontend/snippets/snippet-parsers.js +0 -156
  88. package/dist/src/frontend/snippets/snippet-table-attributes.js +0 -126
  89. package/dist/src/frontend/snippets/snippet-table.js +0 -91
  90. package/dist/src/frontend/snippets/snippet-tree.js +0 -94
  91. package/dist/src/frontend/snippets/snippets.js +0 -1733
  92. package/dist/src/frontend/state.js +0 -57
  93. package/dist/src/frontend/utils.js +0 -21
  94. package/dist/src/frontend/validate.js +0 -122
  95. package/dist/src/frontend/wordcloud.js +0 -693
  96. package/dist/src/frontend/workspace/README.md +0 -65
  97. package/dist/src/frontend/workspace/app.js +0 -1606
  98. package/dist/src/frontend/workspace/app.js.map +0 -1
  99. package/dist/src/frontend/workspace/app.ts +0 -2120
  100. package/dist/src/frontend/workspace/index.html +0 -398
  101. package/dist/src/frontend/workspace/persistence.js +0 -98
  102. package/dist/src/frontend/workspace/persistence.js.map +0 -1
  103. package/dist/src/frontend/workspace/persistence.ts +0 -160
  104. package/dist/src/frontend/workspace/styles.css +0 -827
  105. package/dist/src/frontend/workspace/tsconfig.json +0 -12
  106. /package/dist/{src/frontend/vendor → frontend-svelte}/wordcloud2.js +0 -0
package/README.fr.md CHANGED
@@ -13,7 +13,7 @@ npx living-ai-documentation@latest # assistant interactif (EN/FR)
13
13
  npx living-ai-documentation@latest ./docs # servir un dossier existant
14
14
  ```
15
15
 
16
- ![Viewer Living Documentation](./images/living_documentation.jpg)
16
+ ![Viewer Living Documentation](/images/living_documentation.jpg)
17
17
 
18
18
  ---
19
19
 
@@ -180,9 +180,9 @@ Un `GET http://localhost:4321/mcp` retourne les schémas live des tools et promp
180
180
  - **Navigation par ancre** — `[label](#heading-slug)` scrolle correctement après le rendu async ; IDs auto-générés.
181
181
  - **Mode sombre** — suit la préférence système, basculable manuellement. Coloration syntaxique toujours sombre.
182
182
 
183
- ![Sidebar groupé par dossier → catégorie](./images/readme-sidebar.png)
183
+ ![Sidebar groupé par dossier → catégorie](/images/readme-sidebar.png)
184
184
 
185
- ![Recherche plein-texte](./images/readme-intelligent-search-demo.jpg)
185
+ ![Recherche plein-texte](/images/readme-intelligent-search-demo.jpg)
186
186
 
187
187
  ---
188
188
 
@@ -216,7 +216,7 @@ docs/
216
216
  - Les dossiers sont triés alphabétiquement — préfixer par `1_`, `2_`… pour forcer un ordre ; le préfixe est caché dans l'UI mais visible au survol.
217
217
  - L'imbrication de sous-dossiers est récursive.
218
218
 
219
- ![Pattern de filename](./images/readme-filename-pattern.png)
219
+ ![Pattern de filename](/images/readme-filename-pattern.png)
220
220
 
221
221
  ---
222
222
 
@@ -245,7 +245,7 @@ Créé automatiquement dans votre dossier de doc au premier lancement. Modifiabl
245
245
 
246
246
  **Tous les chemins sont relatifs POSIX** pour que `.living-doc.json` reste portable. Les chemins absolus legacy sont migrés silencieusement à la première lecture.
247
247
 
248
- ![Extra files](./images/readme-extra-files.png)
248
+ ![Extra files](/images/readme-extra-files.png)
249
249
 
250
250
  ---
251
251
 
@@ -325,14 +325,34 @@ git clone https://github.com/craftskillz/living-documentation.git
325
325
  cd living-documentation
326
326
  npm install
327
327
  npm run setup-hooks # une fois : active .githooks/ comme core.hooksPath
328
- npm run dev -- ./documentation # nodemon + ts-node, watch src + bin
329
- npm run build # tsc dist/ + copie des assets frontend
328
+ npm run dev -- ./documentation # Vite (UI sur :5174, HMR) + backend Express (:4321)
329
+ npm run build # tsc (serveur) + vite build (UI → dist/frontend-svelte)
330
330
  npm run test:e2e # Playwright end-to-end (~3 s, ~30 specs MCP)
331
331
  npm run test:coverage # couverture c8 V8-natif
332
332
  ```
333
333
 
334
+ En **dev**, ouvrez l'UI sur **http://localhost:5174** (Vite sert l'app Svelte avec HMR et proxy `/api`, `/mcp`, `/images`, `/files` vers le backend Express sur `:4321`).
335
+
334
336
  Les tests end-to-end utilisent **Playwright**. Chaque test lance un vrai process CLI enfant sur un fixture frais sur un port aléatoire — pas de fuite d'état, parallélisable. Couverture serveur via **c8** (V8 natif, ~72 % global, 83 % sur `src/routes` et `src/lib`).
335
337
 
338
+ ### Tester le package publié en local
339
+
340
+ Pas besoin de publier une version. Le CLI démarre un **unique serveur Express** qui sert l'UI Svelte pré-buildée **et** l'API/MCP sur un seul port — Vite (`:5174`) n'existe qu'en dev et pas pour l'utilisateur final.
341
+
342
+ ```bash
343
+ # Lance l'artefact de production exact, puis ouvrez http://localhost:4321
344
+ npm run build
345
+ node dist/bin/cli.js ./documentation
346
+
347
+ # Le plus fidèle : construire le tarball que npm publierait (respecte "files"), puis le lancer
348
+ npm pack # → living-ai-documentation-<version>.tgz
349
+ npx ./living-ai-documentation-*.tgz ./documentation
350
+
351
+ npm pack --dry-run # inspecter exactement les fichiers qui seraient publiés
352
+ ```
353
+
354
+ > En production, il n'y a pas de `:5174`. L'endpoint MCP auquel les clients se connectent est **`http://localhost:4321/mcp`** (Express, port par défaut).
355
+
336
356
  ### Contribuer
337
357
 
338
358
  Ce dépôt embarque un hook `pre-commit` (dans `.githooks/`) qui impose le contrat bilingue des README : si vous touchez `README.md`, vous devez aussi toucher `README.fr.md`, et inversement. Lancez `npm run setup-hooks` une fois après le clone pour l'activer. Le même check tourne en CI sur chaque PR (`.github/workflows/readme-sync.yml`), donc la règle est imposée même si un contributeur oublie le setup local.
package/README.md CHANGED
@@ -13,7 +13,7 @@ npx living-ai-documentation@latest # interactive wizard (EN/FR)
13
13
  npx living-ai-documentation@latest ./docs # serve an existing folder
14
14
  ```
15
15
 
16
- ![Living Documentation viewer](./images/living_documentation.jpg)
16
+ ![Living Documentation viewer](/images/living_documentation.jpg)
17
17
 
18
18
  ---
19
19
 
@@ -180,9 +180,9 @@ A `GET http://localhost:4321/mcp` returns the live tool + prompt schemas for ins
180
180
  - **Anchor navigation** — `[label](#heading-slug)` scrolls correctly after async render; IDs auto-generated.
181
181
  - **Dark mode** — follows system preference, manually toggleable. Syntax highlighting always dark.
182
182
 
183
- ![Sidebar grouped by folder → category](./images/readme-sidebar.png)
183
+ ![Sidebar grouped by folder → category](/images/readme-sidebar.png)
184
184
 
185
- ![Full-text search](./images/readme-intelligent-search-demo.jpg)
185
+ ![Full-text search](/images/readme-intelligent-search-demo.jpg)
186
186
 
187
187
  ---
188
188
 
@@ -216,7 +216,7 @@ docs/
216
216
  - Folders are sorted alphabetically — prefix with `1_`, `2_`… to force an order; the prefix is hidden in the UI but visible on hover.
217
217
  - Subdirectory nesting is supported recursively.
218
218
 
219
- ![Filename pattern](./images/readme-filename-pattern.png)
219
+ ![Filename pattern](/images/readme-filename-pattern.png)
220
220
 
221
221
  ---
222
222
 
@@ -245,7 +245,7 @@ Created automatically in your docs folder on first run. Edit in the Admin panel
245
245
 
246
246
  **All paths are relative POSIX** so `.living-doc.json` stays portable. Legacy absolute paths are silently migrated on first read.
247
247
 
248
- ![Extra files](./images/readme-extra-files.png)
248
+ ![Extra files](/images/readme-extra-files.png)
249
249
 
250
250
  ---
251
251
 
@@ -325,14 +325,34 @@ git clone https://github.com/craftskillz/living-documentation.git
325
325
  cd living-documentation
326
326
  npm install
327
327
  npm run setup-hooks # one-time: enable .githooks/ as core.hooksPath
328
- npm run dev -- ./documentation # nodemon + ts-node, watches src + bin
329
- npm run build # tsc → dist/ + copy frontend assets
328
+ npm run dev -- ./documentation # Vite (UI on :5174, HMR) + Express backend (:4321)
329
+ npm run build # tsc (server) + vite build (UI → dist/frontend-svelte)
330
330
  npm run test:e2e # Playwright end-to-end (~3 s, ~30 MCP specs)
331
331
  npm run test:coverage # c8 V8-native coverage
332
332
  ```
333
333
 
334
+ In **dev**, open the UI on **http://localhost:5174** (Vite serves the Svelte app with HMR and proxies `/api`, `/mcp`, `/images`, `/files` to the Express backend on `:4321`).
335
+
334
336
  End-to-end tests use **Playwright**. Each test spawns a real CLI child process against a fresh fixture on a random port — no leaking state, runs in parallel. Server-side coverage via **c8** (V8 native, ~72% baseline overall, 83% on `src/routes` and `src/lib`).
335
337
 
338
+ ### Test the published package locally
339
+
340
+ No need to publish a version. The CLI starts a **single Express server** that serves the pre-built Svelte UI **and** the API/MCP on one port — Vite (`:5174`) is dev-only and does not exist for end users.
341
+
342
+ ```bash
343
+ # Run the exact production artifact, then open http://localhost:4321
344
+ npm run build
345
+ node dist/bin/cli.js ./documentation
346
+
347
+ # Most faithful: build the tarball npm would publish (respects "files"), then run it
348
+ npm pack # → living-ai-documentation-<version>.tgz
349
+ npx ./living-ai-documentation-*.tgz ./documentation
350
+
351
+ npm pack --dry-run # inspect exactly which files would be published
352
+ ```
353
+
354
+ > In production there is no `:5174`. The MCP endpoint clients connect to is **`http://localhost:4321/mcp`** (Express, default port).
355
+
336
356
  ### Contributing
337
357
 
338
358
  This repository ships with a `pre-commit` hook (under `.githooks/`) that enforces the bilingual README contract: if you touch `README.md` you must also touch `README.fr.md`, and vice-versa. Run `npm run setup-hooks` once after cloning to activate it. The same check runs in CI on every PR (see `.github/workflows/readme-sync.yml`), so the rule is enforced even if a contributor forgets the local setup.