@hydranium/core 1.0.0-next.7 → 1.0.0-next.70

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 (286) hide show
  1. package/lib/documents/ast-document-manager.d.ts +58 -5
  2. package/lib/documents/ast-document-manager.d.ts.map +1 -1
  3. package/lib/documents/ast-document-manager.js +50 -18
  4. package/lib/documents/ast-document-manager.js.map +1 -1
  5. package/lib/documents/client-ids.d.ts +5 -19
  6. package/lib/documents/client-ids.d.ts.map +1 -1
  7. package/lib/documents/client-ids.js +5 -19
  8. package/lib/documents/client-ids.js.map +1 -1
  9. package/lib/documents/hydranium-text-documents.d.ts +51 -17
  10. package/lib/documents/hydranium-text-documents.d.ts.map +1 -1
  11. package/lib/documents/hydranium-text-documents.js +136 -40
  12. package/lib/documents/hydranium-text-documents.js.map +1 -1
  13. package/lib/documents/language-client-text-shadow.d.ts +41 -9
  14. package/lib/documents/language-client-text-shadow.d.ts.map +1 -1
  15. package/lib/documents/language-client-text-shadow.js +56 -11
  16. package/lib/documents/language-client-text-shadow.js.map +1 -1
  17. package/lib/documents/self-save-registry.d.ts +37 -6
  18. package/lib/documents/self-save-registry.d.ts.map +1 -1
  19. package/lib/documents/self-save-registry.js +28 -15
  20. package/lib/documents/self-save-registry.js.map +1 -1
  21. package/lib/index.d.ts +2 -0
  22. package/lib/index.d.ts.map +1 -1
  23. package/lib/index.js +5 -0
  24. package/lib/index.js.map +1 -1
  25. package/lib/langium/ast-extension/ast-node-builder.d.ts +32 -9
  26. package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -1
  27. package/lib/langium/ast-extension/ast-node-builder.js +60 -22
  28. package/lib/langium/ast-extension/ast-node-builder.js.map +1 -1
  29. package/lib/langium/bootstrap.d.ts.map +1 -1
  30. package/lib/langium/bootstrap.js +16 -9
  31. package/lib/langium/bootstrap.js.map +1 -1
  32. package/lib/langium/config/configuration-provider.d.ts +81 -0
  33. package/lib/langium/config/configuration-provider.d.ts.map +1 -0
  34. package/lib/langium/config/configuration-provider.js +112 -0
  35. package/lib/langium/config/configuration-provider.js.map +1 -0
  36. package/lib/langium/config/index.d.ts +1 -0
  37. package/lib/langium/config/index.d.ts.map +1 -1
  38. package/lib/langium/config/index.js +1 -0
  39. package/lib/langium/config/index.js.map +1 -1
  40. package/lib/langium/diagnostics/lsp-logger.d.ts +17 -0
  41. package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -1
  42. package/lib/langium/diagnostics/lsp-logger.js +40 -6
  43. package/lib/langium/diagnostics/lsp-logger.js.map +1 -1
  44. package/lib/langium/document-builder/build-pipeline-integration.d.ts +13 -1
  45. package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -1
  46. package/lib/langium/document-builder/build-pipeline-integration.js +1 -1
  47. package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -1
  48. package/lib/langium/document-builder/build-session.d.ts +93 -0
  49. package/lib/langium/document-builder/build-session.d.ts.map +1 -0
  50. package/lib/langium/document-builder/build-session.js +72 -0
  51. package/lib/langium/document-builder/build-session.js.map +1 -0
  52. package/lib/langium/document-builder/document-builder.d.ts +150 -7
  53. package/lib/langium/document-builder/document-builder.d.ts.map +1 -1
  54. package/lib/langium/document-builder/document-builder.js +298 -11
  55. package/lib/langium/document-builder/document-builder.js.map +1 -1
  56. package/lib/langium/document-builder/index.d.ts +1 -0
  57. package/lib/langium/document-builder/index.d.ts.map +1 -1
  58. package/lib/langium/document-builder/index.js +1 -0
  59. package/lib/langium/document-builder/index.js.map +1 -1
  60. package/lib/langium/integration-services.d.ts +45 -1
  61. package/lib/langium/integration-services.d.ts.map +1 -1
  62. package/lib/langium/integration-services.js +10 -5
  63. package/lib/langium/integration-services.js.map +1 -1
  64. package/lib/langium/integrity/integrity-service.d.ts +5 -0
  65. package/lib/langium/integrity/integrity-service.d.ts.map +1 -1
  66. package/lib/langium/integrity/integrity-service.js +34 -1
  67. package/lib/langium/integrity/integrity-service.js.map +1 -1
  68. package/lib/langium/keys/containment.d.ts +64 -0
  69. package/lib/langium/keys/containment.d.ts.map +1 -0
  70. package/lib/langium/keys/containment.js +53 -0
  71. package/lib/langium/keys/containment.js.map +1 -0
  72. package/lib/langium/keys/index.d.ts +1 -0
  73. package/lib/langium/keys/index.d.ts.map +1 -1
  74. package/lib/langium/keys/index.js +1 -0
  75. package/lib/langium/keys/index.js.map +1 -1
  76. package/lib/langium/keys/name-based-key-provider.d.ts +4 -0
  77. package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -1
  78. package/lib/langium/keys/name-based-key-provider.js +4 -0
  79. package/lib/langium/keys/name-based-key-provider.js.map +1 -1
  80. package/lib/langium/model-service/model-service.d.ts +103 -7
  81. package/lib/langium/model-service/model-service.d.ts.map +1 -1
  82. package/lib/langium/model-service/model-service.js +70 -89
  83. package/lib/langium/model-service/model-service.js.map +1 -1
  84. package/lib/langium/module.d.ts +82 -13
  85. package/lib/langium/module.d.ts.map +1 -1
  86. package/lib/langium/module.js +26 -12
  87. package/lib/langium/module.js.map +1 -1
  88. package/lib/langium/naming/name-provider.d.ts +10 -0
  89. package/lib/langium/naming/name-provider.d.ts.map +1 -1
  90. package/lib/langium/naming/name-provider.js.map +1 -1
  91. package/lib/langium/naming/name-separator-validation.d.ts +23 -0
  92. package/lib/langium/naming/name-separator-validation.d.ts.map +1 -1
  93. package/lib/langium/naming/name-separator-validation.js +30 -1
  94. package/lib/langium/naming/name-separator-validation.js.map +1 -1
  95. package/lib/langium/residency/cst-residency-service.d.ts +31 -9
  96. package/lib/langium/residency/cst-residency-service.d.ts.map +1 -1
  97. package/lib/langium/residency/cst-residency-service.js +13 -56
  98. package/lib/langium/residency/cst-residency-service.js.map +1 -1
  99. package/lib/langium/scope/hydranium-scope-provider.d.ts +32 -13
  100. package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -1
  101. package/lib/langium/scope/hydranium-scope-provider.js +37 -20
  102. package/lib/langium/scope/hydranium-scope-provider.js.map +1 -1
  103. package/lib/langium/shared-services.d.ts +15 -2
  104. package/lib/langium/shared-services.d.ts.map +1 -1
  105. package/lib/langium/shared-services.js.map +1 -1
  106. package/lib/langium/transfer/transfer-encoder.d.ts +33 -2
  107. package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -1
  108. package/lib/langium/transfer/transfer-encoder.js +14 -3
  109. package/lib/langium/transfer/transfer-encoder.js.map +1 -1
  110. package/lib/langium/validation/document-validator.d.ts +145 -6
  111. package/lib/langium/validation/document-validator.d.ts.map +1 -1
  112. package/lib/langium/validation/document-validator.js +211 -4
  113. package/lib/langium/validation/document-validator.js.map +1 -1
  114. package/lib/langium/workspace/document-uri-policy.d.ts +3 -4
  115. package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -1
  116. package/lib/langium/workspace/document-uri-policy.js +3 -4
  117. package/lib/langium/workspace/document-uri-policy.js.map +1 -1
  118. package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +25 -0
  119. package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -1
  120. package/lib/langium/workspace/hydranium-langium-document-factory.js +25 -0
  121. package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -1
  122. package/lib/langium/workspace/hydranium-workspace-manager.d.ts +21 -1
  123. package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -1
  124. package/lib/langium/workspace/hydranium-workspace-manager.js +28 -0
  125. package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -1
  126. package/lib/langium/workspace/in-memory-file-system-provider.d.ts +8 -0
  127. package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -1
  128. package/lib/langium/workspace/in-memory-file-system-provider.js +11 -2
  129. package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -1
  130. package/lib/langium/workspace/initialize-workspace.d.ts +22 -2
  131. package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -1
  132. package/lib/langium/workspace/initialize-workspace.js +13 -5
  133. package/lib/langium/workspace/initialize-workspace.js.map +1 -1
  134. package/lib/langium/workspace/langium-documents.d.ts +79 -17
  135. package/lib/langium/workspace/langium-documents.d.ts.map +1 -1
  136. package/lib/langium/workspace/langium-documents.js +83 -28
  137. package/lib/langium/workspace/langium-documents.js.map +1 -1
  138. package/lib/locale/index.d.ts +10 -0
  139. package/lib/locale/index.d.ts.map +1 -0
  140. package/lib/locale/index.js +10 -0
  141. package/lib/locale/index.js.map +1 -0
  142. package/lib/locale/server-locale.d.ts +73 -0
  143. package/lib/locale/server-locale.d.ts.map +1 -0
  144. package/lib/locale/server-locale.js +61 -0
  145. package/lib/locale/server-locale.js.map +1 -0
  146. package/lib/lsp/hydranium-document-update-handler.js +1 -1
  147. package/lib/lsp/hydranium-document-update-handler.js.map +1 -1
  148. package/lib/lsp/index.d.ts +1 -1
  149. package/lib/lsp/index.d.ts.map +1 -1
  150. package/lib/lsp/index.js +1 -1
  151. package/lib/lsp/index.js.map +1 -1
  152. package/lib/lsp/lsp-latency.d.ts +39 -0
  153. package/lib/lsp/lsp-latency.d.ts.map +1 -0
  154. package/lib/lsp/lsp-latency.js +58 -0
  155. package/lib/lsp/lsp-latency.js.map +1 -0
  156. package/lib/messages/carriers.d.ts +54 -0
  157. package/lib/messages/carriers.d.ts.map +1 -0
  158. package/lib/messages/carriers.js +62 -0
  159. package/lib/messages/carriers.js.map +1 -0
  160. package/lib/messages/index.d.ts +25 -0
  161. package/lib/messages/index.d.ts.map +1 -0
  162. package/lib/messages/index.js +25 -0
  163. package/lib/messages/index.js.map +1 -0
  164. package/lib/messages/renderer.d.ts +136 -0
  165. package/lib/messages/renderer.d.ts.map +1 -0
  166. package/lib/messages/renderer.js +159 -0
  167. package/lib/messages/renderer.js.map +1 -0
  168. package/lib/node/latency-from-env.d.ts +1 -1
  169. package/lib/node/latency-from-env.js +1 -1
  170. package/lib/node/node-file-system-provider.d.ts.map +1 -1
  171. package/lib/node/node-file-system-provider.js +1 -40
  172. package/lib/node/node-file-system-provider.js.map +1 -1
  173. package/lib/node/profiling-run.d.ts +2 -2
  174. package/lib/node/profiling-run.js +1 -1
  175. package/lib/node/profiling-run.js.map +1 -1
  176. package/lib/node/rename-over-open-readers.d.ts +52 -0
  177. package/lib/node/rename-over-open-readers.d.ts.map +1 -0
  178. package/lib/node/rename-over-open-readers.js +66 -0
  179. package/lib/node/rename-over-open-readers.js.map +1 -0
  180. package/lib/testing/fake-document.d.ts +14 -3
  181. package/lib/testing/fake-document.d.ts.map +1 -1
  182. package/lib/testing/fake-document.js +18 -3
  183. package/lib/testing/fake-document.js.map +1 -1
  184. package/lib/testing/make-noop-shared-services.d.ts +14 -0
  185. package/lib/testing/make-noop-shared-services.d.ts.map +1 -1
  186. package/lib/testing/make-noop-shared-services.js +28 -2
  187. package/lib/testing/make-noop-shared-services.js.map +1 -1
  188. package/lib/testing/make-test-services.d.ts +31 -4
  189. package/lib/testing/make-test-services.d.ts.map +1 -1
  190. package/lib/testing/make-test-services.js +19 -3
  191. package/lib/testing/make-test-services.js.map +1 -1
  192. package/lib/testing/node/spawned-server.d.ts +14 -0
  193. package/lib/testing/node/spawned-server.d.ts.map +1 -1
  194. package/lib/testing/node/spawned-server.js +33 -1
  195. package/lib/testing/node/spawned-server.js.map +1 -1
  196. package/lib/testing/playwright/flaky-network-proxy.d.ts +76 -0
  197. package/lib/testing/playwright/flaky-network-proxy.d.ts.map +1 -0
  198. package/lib/testing/playwright/flaky-network-proxy.js +164 -0
  199. package/lib/testing/playwright/flaky-network-proxy.js.map +1 -0
  200. package/lib/testing/playwright/index.d.ts +1 -0
  201. package/lib/testing/playwright/index.d.ts.map +1 -1
  202. package/lib/testing/playwright/index.js +1 -0
  203. package/lib/testing/playwright/index.js.map +1 -1
  204. package/lib/testing/playwright/server-log-capture.d.ts +14 -4
  205. package/lib/testing/playwright/server-log-capture.d.ts.map +1 -1
  206. package/lib/testing/playwright/server-log-capture.js +21 -4
  207. package/lib/testing/playwright/server-log-capture.js.map +1 -1
  208. package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -1
  209. package/lib/testing/playwright/server-log-rename-reporter.js +10 -1
  210. package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -1
  211. package/lib/testing/stub-ast-document-manager.d.ts +3 -4
  212. package/lib/testing/stub-ast-document-manager.d.ts.map +1 -1
  213. package/lib/testing/stub-ast-document-manager.js +2 -5
  214. package/lib/testing/stub-ast-document-manager.js.map +1 -1
  215. package/lib/testing/stub-document-builder.d.ts +8 -0
  216. package/lib/testing/stub-document-builder.d.ts.map +1 -1
  217. package/lib/testing/stub-document-builder.js +22 -3
  218. package/lib/testing/stub-document-builder.js.map +1 -1
  219. package/lib/testing/stub-model-service.d.ts +1 -1
  220. package/lib/testing/stub-model-service.d.ts.map +1 -1
  221. package/lib/testing/stub-model-service.js +2 -2
  222. package/lib/testing/stub-model-service.js.map +1 -1
  223. package/package.json +17 -8
  224. package/src/documents/ast-document-manager.ts +99 -23
  225. package/src/documents/client-ids.ts +5 -22
  226. package/src/documents/hydranium-text-documents.ts +161 -55
  227. package/src/documents/language-client-text-shadow.ts +59 -11
  228. package/src/documents/self-save-registry.ts +52 -13
  229. package/src/index.ts +5 -0
  230. package/src/langium/ast-extension/ast-node-builder.ts +66 -22
  231. package/src/langium/bootstrap.ts +16 -9
  232. package/src/langium/config/configuration-provider.ts +119 -0
  233. package/src/langium/config/index.ts +1 -0
  234. package/src/langium/diagnostics/lsp-logger.ts +41 -6
  235. package/src/langium/document-builder/build-pipeline-integration.ts +14 -1
  236. package/src/langium/document-builder/build-session.ts +87 -0
  237. package/src/langium/document-builder/document-builder.ts +339 -11
  238. package/src/langium/document-builder/index.ts +1 -0
  239. package/src/langium/integration-services.ts +67 -6
  240. package/src/langium/integrity/integrity-service.ts +35 -1
  241. package/src/langium/keys/containment.ts +87 -0
  242. package/src/langium/keys/index.ts +1 -0
  243. package/src/langium/keys/name-based-key-provider.ts +4 -0
  244. package/src/langium/model-service/model-service.ts +145 -22
  245. package/src/langium/module.ts +104 -19
  246. package/src/langium/naming/name-provider.ts +10 -0
  247. package/src/langium/naming/name-separator-validation.ts +34 -5
  248. package/src/langium/residency/cst-residency-service.ts +36 -12
  249. package/src/langium/scope/hydranium-scope-provider.ts +40 -22
  250. package/src/langium/shared-services.ts +19 -2
  251. package/src/langium/transfer/transfer-encoder.ts +45 -3
  252. package/src/langium/validation/document-validator.ts +255 -8
  253. package/src/langium/workspace/document-uri-policy.ts +3 -4
  254. package/src/langium/workspace/hydranium-langium-document-factory.ts +34 -0
  255. package/src/langium/workspace/hydranium-workspace-manager.ts +30 -1
  256. package/src/langium/workspace/in-memory-file-system-provider.ts +13 -3
  257. package/src/langium/workspace/initialize-workspace.ts +34 -5
  258. package/src/langium/workspace/langium-documents.ts +106 -33
  259. package/src/locale/index.ts +10 -0
  260. package/src/locale/server-locale.ts +86 -0
  261. package/src/lsp/hydranium-document-update-handler.ts +1 -1
  262. package/src/lsp/index.ts +1 -1
  263. package/src/lsp/lsp-latency.ts +62 -0
  264. package/src/messages/carriers.ts +78 -0
  265. package/src/messages/index.ts +27 -0
  266. package/src/messages/renderer.ts +204 -0
  267. package/src/node/latency-from-env.ts +1 -1
  268. package/src/node/node-file-system-provider.ts +1 -41
  269. package/src/node/profiling-run.ts +3 -3
  270. package/src/node/rename-over-open-readers.ts +78 -0
  271. package/src/testing/fake-document.ts +22 -4
  272. package/src/testing/make-noop-shared-services.ts +50 -2
  273. package/src/testing/make-test-services.ts +49 -7
  274. package/src/testing/node/spawned-server.ts +35 -1
  275. package/src/testing/playwright/flaky-network-proxy.ts +240 -0
  276. package/src/testing/playwright/index.ts +1 -0
  277. package/src/testing/playwright/server-log-capture.ts +24 -5
  278. package/src/testing/playwright/server-log-rename-reporter.ts +12 -1
  279. package/src/testing/stub-ast-document-manager.ts +5 -10
  280. package/src/testing/stub-document-builder.ts +32 -3
  281. package/src/testing/stub-model-service.ts +2 -2
  282. package/lib/lsp/instrument-connection.d.ts +0 -36
  283. package/lib/lsp/instrument-connection.d.ts.map +0 -1
  284. package/lib/lsp/instrument-connection.js +0 -62
  285. package/lib/lsp/instrument-connection.js.map +0 -1
  286. package/src/lsp/instrument-connection.ts +0 -66
@@ -1 +1 @@
1
- {"version":3,"file":"langium-documents.js","sourceRoot":"","sources":["../../../src/langium/workspace/langium-documents.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EAAgB,uBAAuB,EAAkC,MAAM,oBAAoB,CAAC;AAI3G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAgB,iCAAkC,SAAQ,uBAAuB;IAK5C;IAJxC,sFAAsF;IACnE,SAAS,CAAoB;IAC7B,MAAM,CAAS;IAElC,YAAwC,QAAqC;QAC1E,KAAK,CAAC,QAAQ,CAAC,CAAC;QADqB,aAAQ,GAAR,QAAQ,CAA6B;QAE1E,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,iBAAiB,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACzD,CAAC;IAQQ,KAAK,CAAC,mBAAmB,CAAC,GAAQ;QACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,QAAQ,EAAE,CAAC;YACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAC5C,IAAI,QAAQ,EAAE,CAAC;gBACZ,iEAAiE;gBACjE,kEAAkE;gBAClE,sEAAsE;gBACtE,kEAAkE;gBAClE,uDAAuD;gBACvD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,mBAAmB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;gBAChE,OAAO,QAAQ,CAAC;YACnB,CAAC;YACD,IAAI,CAAC;gBACF,4DAA4D;gBAC5D,OAAO,MAAM,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACpD,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACvB,oEAAoE;gBACpE,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;gBAC7C,IAAI,SAAS,EAAE,CAAC;oBACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;oBACjE,OAAO,SAAS,CAAC;gBACpB,CAAC;gBACD,qEAAqE;gBACrE,oEAAoE;gBACpE,mEAAmE;gBACnE,qEAAqE;gBACrE,mEAAmE;gBACnE,iEAAiE;gBACjE,kEAAkE;gBAClE,4DAA4D;gBAC5D,4CAA4C;gBAC5C,IAAI,CAAC,MAAM;qBACP,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;qBACzB,KAAK,CAAC,mDAAmD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC1H,CAAC;QACJ,CAAC;QACD,2EAA2E;QAC3E,4EAA4E;QAC5E,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;IACpD,CAAC;CACH"}
1
+ {"version":3,"file":"langium-documents.js","sourceRoot":"","sources":["../../../src/langium/workspace/langium-documents.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAgB,uBAAuB,EAAyD,MAAM,oBAAoB,CAAC;AAClI,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,oCAAoC,EAAE,+BAA+B,CAAC,CAAC;AAExH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAClD,yCAAyC,EACzC,4FAA4F,CAC9F,CAAC;AAaF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAA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,CAAC,SAAS,CAAC,mBAAmB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;gBAChE,OAAO,QAAQ,CAAC;YACnB,CAAC;YACD,IAAI,CAAC;gBACF,4DAA4D;gBAC5D,OAAO,MAAM,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACpD,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACvB,oEAAoE;gBACpE,6DAA6D;gBAC7D,oEAAoE;gBACpE,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;gBAC7C,IAAI,SAAS,EAAE,CAAC;oBACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;oBACjE,OAAO,SAAS,CAAC;gBACpB,CAAC;gBACD,MAAM,KAAK,CAAC;YACf,CAAC;QACJ,CAAC;QACD,wEAAwE;QACxE,iCAAiC;QACjC,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACH"}
@@ -0,0 +1,10 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ export * from './server-locale.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ export * from './server-locale.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,73 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import type { Tracer } from '@hydranium/protocol';
10
+ import { type LogNameOptions } from '../langium/diagnostics/logger.js';
11
+ import type { ServerSharedServicesMinimal } from '../langium/shared-services.js';
12
+ /** Construction options for {@link ServerLocale}. */
13
+ export type ServerLocaleOptions = LogNameOptions;
14
+ /**
15
+ * The locale contract the `ServerLocale` slot holds, implemented by
16
+ * {@link DefaultServerLocale}.
17
+ *
18
+ * An interface rather than the class, so the slot is compared STRUCTURALLY —
19
+ * a class-typed slot carries its `protected` members into every assignability
20
+ * check, compared nominally, which makes it unsatisfiable across two physical
21
+ * copies of this package and unreplaceable by an adopter's own declaration.
22
+ */
23
+ export interface ServerLocale {
24
+ /** The locale, or `undefined` when no init supplied one — the framework's English. */
25
+ readonly value: string | undefined;
26
+ accept(locale: string): void;
27
+ }
28
+ /**
29
+ * The locale the server was handed at init, for whoever needs to render in the
30
+ * reading user's language. Held apart from the message renderer that reads it,
31
+ * so replacing the renderer cannot drop locale handling.
32
+ *
33
+ * A plain string in and out. A consumer that must react to a change rather than
34
+ * read the current value wraps this itself — nothing does today, and both real
35
+ * hosts respawn the server on a display-language switch.
36
+ */
37
+ export declare class DefaultServerLocale implements ServerLocale {
38
+ protected readonly tracer: Tracer;
39
+ protected current: string | undefined;
40
+ constructor(services: ServerSharedServicesMinimal, options?: ServerLocaleOptions);
41
+ /** The locale, or `undefined` when no init supplied one — which means the framework's English. */
42
+ get value(): string | undefined;
43
+ /**
44
+ * Take the locale an init declared.
45
+ *
46
+ * **One locale per process, and the reason the OTHER heads need none of
47
+ * their own.** The data and GLSP heads publish a port over the LSP
48
+ * connection and are reached by forwarding a socket to it, so they are the
49
+ * same process as the LSP head that was handed this locale — there is no
50
+ * topology in which one of them serves a second frontend. The Theia backend
51
+ * is the case that would break it, and it holds no locale precisely because
52
+ * it serves every frontend at once; nothing there writes here.
53
+ *
54
+ * The framework accepts a locale and never sources one, and neither
55
+ * validates nor normalises the tag: rejecting an unfamiliar one would be
56
+ * selecting a locale.
57
+ *
58
+ * Override to ignore the argument, which is how a host pins a locale it
59
+ * already knows but has no LSP client to declare.
60
+ *
61
+ * **The line is at `info`, which is a deliberate exception to the
62
+ * per-service default.** A locale is written once per process and it is the
63
+ * one setting that silently changes every user-facing sentence the server
64
+ * produces, so a reader trying to explain an unexpected language has nothing
65
+ * else to look at: the framework ships no catalogue, so "no entry for this
66
+ * code" and "no locale declared" both render the English and are
67
+ * indistinguishable in the output. At `debug` the line is below the default
68
+ * threshold and therefore absent from exactly the log someone would be
69
+ * reading.
70
+ */
71
+ accept(locale: string): void;
72
+ }
73
+ //# sourceMappingURL=server-locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-locale.d.ts","sourceRoot":"","sources":["../../src/locale/server-locale.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,qDAAqD;AACrD,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC1B,sFAAsF;IACtF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACrD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE1B,QAAQ,EAAE,2BAA2B,EAAE,OAAO,GAAE,mBAAwB;IAIpF,kGAAkG;IAClG,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAI9B"}
@@ -0,0 +1,61 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * The locale the server was handed at init, for whoever needs to render in the
11
+ * reading user's language. Held apart from the message renderer that reads it,
12
+ * so replacing the renderer cannot drop locale handling.
13
+ *
14
+ * A plain string in and out. A consumer that must react to a change rather than
15
+ * read the current value wraps this itself — nothing does today, and both real
16
+ * hosts respawn the server on a display-language switch.
17
+ */
18
+ export class DefaultServerLocale {
19
+ tracer;
20
+ current;
21
+ constructor(services, options = {}) {
22
+ this.tracer = services.Tracer.for(options.logName ?? 'ServerLocale').trace('instantiated');
23
+ }
24
+ /** The locale, or `undefined` when no init supplied one — which means the framework's English. */
25
+ get value() {
26
+ return this.current;
27
+ }
28
+ /**
29
+ * Take the locale an init declared.
30
+ *
31
+ * **One locale per process, and the reason the OTHER heads need none of
32
+ * their own.** The data and GLSP heads publish a port over the LSP
33
+ * connection and are reached by forwarding a socket to it, so they are the
34
+ * same process as the LSP head that was handed this locale — there is no
35
+ * topology in which one of them serves a second frontend. The Theia backend
36
+ * is the case that would break it, and it holds no locale precisely because
37
+ * it serves every frontend at once; nothing there writes here.
38
+ *
39
+ * The framework accepts a locale and never sources one, and neither
40
+ * validates nor normalises the tag: rejecting an unfamiliar one would be
41
+ * selecting a locale.
42
+ *
43
+ * Override to ignore the argument, which is how a host pins a locale it
44
+ * already knows but has no LSP client to declare.
45
+ *
46
+ * **The line is at `info`, which is a deliberate exception to the
47
+ * per-service default.** A locale is written once per process and it is the
48
+ * one setting that silently changes every user-facing sentence the server
49
+ * produces, so a reader trying to explain an unexpected language has nothing
50
+ * else to look at: the framework ships no catalogue, so "no entry for this
51
+ * code" and "no locale declared" both render the English and are
52
+ * indistinguishable in the output. At `debug` the line is below the default
53
+ * threshold and therefore absent from exactly the log someone would be
54
+ * reading.
55
+ */
56
+ accept(locale) {
57
+ this.current = locale;
58
+ this.tracer.info(`rendering messages in locale '${locale}'`);
59
+ }
60
+ }
61
+ //# sourceMappingURL=server-locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-locale.js","sourceRoot":"","sources":["../../src/locale/server-locale.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAwBlF;;;;;;;;GAQG;AACH,MAAM,OAAO,mBAAmB;IACV,MAAM,CAAS;IACxB,OAAO,CAAqB;IAEtC,YAAY,QAAqC,EAAE,UAA+B,EAAE;QACjF,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,cAAc,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9F,CAAC;IAED,kGAAkG;IAClG,IAAI,KAAK;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,MAAc;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;IAChE,CAAC;CACH"}
@@ -205,7 +205,7 @@ export class HydraniumDocumentUpdateHandler extends DefaultDocumentUpdateHandler
205
205
  }
206
206
  const uri = UriUtils.toUri(change.uri);
207
207
  const mtimeMs = await this.fileSystemProvider.mtimeMs?.(uri);
208
- if (mtimeMs !== undefined && this.selfSaveRegistry.matches(uri.fsPath, mtimeMs)) {
208
+ if (mtimeMs !== undefined && this.selfSaveRegistry.isRegistered(uri.fsPath, mtimeMs)) {
209
209
  return undefined;
210
210
  }
211
211
  return change;
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-document-update-handler.js","sourceRoot":"","sources":["../../src/lsp/hydranium-document-update-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,SAAS,EAAe,eAAe,EAA6B,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAGtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,EAAoD,cAAc,EAAgC,MAAM,uBAAuB,CAAC;AAGvI;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,qBAAqB,EAAE,uBAAuB;IAC9C,QAAQ,EAAE,UAAU;CACb,CAAC,CAAC;AA4BZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,8BAA+B,SAAQ,4BAA4B;IAQ1D,MAAM,CAAS;IACf,gBAAgB,CAAmB;IACnC,kBAAkB,CAA6B;IAC/C,aAAa,CAAuC;IAEvE,0FAA0F;IACvE,QAAQ,CAA0B;IAClC,8BAA8B,CAAU;IAE3D,qHAAqH;IA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AQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;;;;;OAUG;IACO,QAAQ,CAAC,OAAc,EAAE,OAAc;QAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAC/B,IAAI,CAAC,gBAAgB,CAAC,KAAK;aACvB,IAAI,CAAC,GAAG,EAAE,CACR,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YAC9B,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC5C,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/D,CAAC,CAAC,CACJ;aACA,KAAK,CAAC,GAAG,CAAC,EAAE;YACV,MAAM,MAAM,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC/E,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uEAAuE,MAAM,EAAE,CAAC,CAAC;QACtG,CAAC,CAAC,CAAC;IACT,CAAC;CACH"}
@@ -7,7 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  export * from './completion/hydranium-completion-provider.js';
10
- export * from './instrument-connection.js';
10
+ export * from './lsp-latency.js';
11
11
  export * from './semantic-token-provider.js';
12
12
  export * from './language-module.js';
13
13
  export * from './shared-module.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lsp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,CAAC;AAEvD;;;;;;GAMG;AACH,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lsp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,CAAC;AAEvD;;;;;;GAMG;AACH,cAAc,4BAA4B,CAAC"}
package/lib/lsp/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  export * from './completion/hydranium-completion-provider.js';
10
- export * from './instrument-connection.js';
10
+ export * from './lsp-latency.js';
11
11
  export * from './semantic-token-provider.js';
12
12
  export * from './language-module.js';
13
13
  export * from './shared-module.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lsp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,CAAC;AAEvD;;;;;;GAMG;AACH,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lsp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,CAAC;AAEvD;;;;;;GAMG;AACH,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,39 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import type { LatencyCollector } from '@hydranium/protocol';
10
+ import type { ConnectionOptions } from 'vscode-jsonrpc';
11
+ /**
12
+ * Connection options that time every inbound LSP message into `latency` under
13
+ * its method name — the LSP analog of the data-server RPC chokepoint.
14
+ *
15
+ * Pass the result to `createConnection` where the head builds its connection:
16
+ * `createConnection(ProposedFeatures.all, lspLatencyOptions(latency))`. The
17
+ * transport is untouched, so a head keeps whatever `--stdio` / `--socket`
18
+ * selection its arguments make.
19
+ *
20
+ * **`messageStrategy` is the seam because it is the only one the handlers
21
+ * actually pass through.** `vscode-languageserver` builds its `Connection` as an
22
+ * object whose `onHover`, `onCompletion` and every other named helper register
23
+ * against the inner protocol connection captured in their closure — not against
24
+ * the returned object's own `onRequest`. Langium registers exclusively through
25
+ * those helpers, so decorating the `Connection` reaches none of them and reports
26
+ * an empty LSP half no matter how much traffic ran. `handleMessage` sits on the
27
+ * dispatch path itself, which every request and notification crosses, so it also
28
+ * catches `initialize` — special-cased into `onInitialize` and invisible to any
29
+ * `onRequest` decoration.
30
+ *
31
+ * What it measures is **dispatch plus handler**, not handler alone: the wait a
32
+ * client actually experiences, including time queued behind other work.
33
+ *
34
+ * When `latency` is `undefined` the seam is off and this returns `undefined`, so
35
+ * a head can pass the result of an env-gated factory (`latencyFromEnv()`)
36
+ * straight through and pay nothing when timing is not enabled.
37
+ */
38
+ export declare function lspLatencyOptions(latency: LatencyCollector | undefined): ConnectionOptions | undefined;
39
+ //# sourceMappingURL=lsp-latency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp-latency.d.ts","sourceRoot":"","sources":["../../src/lsp/lsp-latency.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAW,MAAM,gBAAgB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,GAAG,iBAAiB,GAAG,SAAS,CAiBtG"}
@@ -0,0 +1,58 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Connection options that time every inbound LSP message into `latency` under
11
+ * its method name — the LSP analog of the data-server RPC chokepoint.
12
+ *
13
+ * Pass the result to `createConnection` where the head builds its connection:
14
+ * `createConnection(ProposedFeatures.all, lspLatencyOptions(latency))`. The
15
+ * transport is untouched, so a head keeps whatever `--stdio` / `--socket`
16
+ * selection its arguments make.
17
+ *
18
+ * **`messageStrategy` is the seam because it is the only one the handlers
19
+ * actually pass through.** `vscode-languageserver` builds its `Connection` as an
20
+ * object whose `onHover`, `onCompletion` and every other named helper register
21
+ * against the inner protocol connection captured in their closure — not against
22
+ * the returned object's own `onRequest`. Langium registers exclusively through
23
+ * those helpers, so decorating the `Connection` reaches none of them and reports
24
+ * an empty LSP half no matter how much traffic ran. `handleMessage` sits on the
25
+ * dispatch path itself, which every request and notification crosses, so it also
26
+ * catches `initialize` — special-cased into `onInitialize` and invisible to any
27
+ * `onRequest` decoration.
28
+ *
29
+ * What it measures is **dispatch plus handler**, not handler alone: the wait a
30
+ * client actually experiences, including time queued behind other work.
31
+ *
32
+ * When `latency` is `undefined` the seam is off and this returns `undefined`, so
33
+ * a head can pass the result of an env-gated factory (`latencyFromEnv()`)
34
+ * straight through and pay nothing when timing is not enabled.
35
+ */
36
+ export function lspLatencyOptions(latency) {
37
+ if (!latency) {
38
+ return undefined;
39
+ }
40
+ return {
41
+ messageStrategy: {
42
+ handleMessage: (message, next) => {
43
+ // Responses to requests the SERVER sent carry no method and are not
44
+ // work this head performed; timing them would report the client's
45
+ // latency under a name this collector cannot supply.
46
+ if (!hasMethod(message)) {
47
+ return next(message);
48
+ }
49
+ return latency.time(message.method, () => next(message));
50
+ }
51
+ }
52
+ };
53
+ }
54
+ /** Narrow to the messages that name an operation — requests and notifications. */
55
+ function hasMethod(message) {
56
+ return typeof message.method === 'string';
57
+ }
58
+ //# sourceMappingURL=lsp-latency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp-latency.js","sourceRoot":"","sources":["../../src/lsp/lsp-latency.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAKlF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAqC;IACpE,IAAI,CAAC,OAAO,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IACpB,CAAC;IACD,OAAO;QACJ,eAAe,EAAE;YACd,aAAa,EAAE,CAAC,OAAgB,EAAE,IAAgD,EAAE,EAAE;gBACnF,oEAAoE;gBACpE,kEAAkE;gBAClE,qDAAqD;gBACrD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;oBACvB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;gBACxB,CAAC;gBACD,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5D,CAAC;SACH;KACH,CAAC;AACL,CAAC;AAED,kFAAkF;AAClF,SAAS,SAAS,CAAC,OAAgB;IAChC,OAAO,OAAQ,OAAgC,CAAC,MAAM,KAAK,QAAQ,CAAC;AACvE,CAAC"}
@@ -0,0 +1,54 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { type MessageDefinition, type ParamsArg, type ResolvedMessage } from '@hydranium/protocol';
10
+ import type { AstNode, DiagnosticData, DiagnosticInfo, Properties, ValidationAcceptor } from '@hydranium/langium';
11
+ import { Diagnostic } from 'vscode-languageserver-protocol';
12
+ /**
13
+ * Raise a validation diagnostic from a declaration, so the call site never
14
+ * restates the code or the sentence.
15
+ *
16
+ * `code` is omitted from `info` because this owns it — the framework claims LSP
17
+ * `Diagnostic.code` for framework codes, which collides with no adopter today
18
+ * and is a stated rule rather than an accident. `data` is deliberately NOT
19
+ * omitted: Langium owns `data.code` for code-action dispatch, so a caller has to
20
+ * be able to request a quick fix. The identity is merged OVER whatever they
21
+ * pass, which makes the two conventions co-exist rather than compete.
22
+ *
23
+ * `data` admits adopter-owned keys beside Langium's, which is why the index
24
+ * signature is there rather than a bare `Partial<DiagnosticData>`. Langium's
25
+ * shape is closed, and a diagnostic that carries a COMPANION payload for its own
26
+ * surface to read — the field a form must highlight, say — has nowhere else to
27
+ * put it: an encoder projecting that payload reads `diagnostic.data`, so the
28
+ * narrower type made the identity and the companion mutually exclusive.
29
+ *
30
+ * The identity lands in both `code` and `data.hydranium` on purpose. `code` is
31
+ * what survives to the editor surface; Theia's converter drops `data` before the
32
+ * squiggle, so a parameterised diagnostic falls back to the server's English
33
+ * there while any adopter-owned surface can still render the parameterised form
34
+ * from the marker store.
35
+ *
36
+ * `DiagnosticInfo` must be Langium's own type: a `Parameters<ValidationAcceptor>[2]`
37
+ * shortcut compiles but loses the `property?: Properties<N>` relation. The `data`
38
+ * re-type has to be an intersection rather than an `Omit` alone, because Langium
39
+ * declares `data?: unknown` and an `unknown` cannot be spread.
40
+ */
41
+ export declare function acceptMessage<S extends string, N extends AstNode, P extends Properties<N> = Properties<N>>(accept: ValidationAcceptor, severity: 'error' | 'warning' | 'info' | 'hint', message: MessageDefinition<S>, info: Omit<DiagnosticInfo<N, P>, 'code' | 'data'> & {
42
+ data?: Partial<DiagnosticData> & Record<string, unknown>;
43
+ }, ...params: ParamsArg<S>): void;
44
+ /**
45
+ * Recover the identity from a published diagnostic, for a surface that
46
+ * identifies or renders diagnostics itself.
47
+ *
48
+ * `Diagnostic.message` is `string | MarkupContent` in LSP 3.17+, so the text
49
+ * comes from upstream's own `Diagnostic.getMessageString` rather than a
50
+ * hand-rolled narrowing — consuming the library in its style, and one fewer
51
+ * place restating the union.
52
+ */
53
+ export declare function resolvedFromDiagnostic(diagnostic: Diagnostic): ResolvedMessage | undefined;
54
+ //# sourceMappingURL=carriers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carriers.d.ts","sourceRoot":"","sources":["../../src/messages/carriers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,eAAe,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EACvG,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,EAC/C,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC7B,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EAChH,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACvB,IAAI,CAMN;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,eAAe,GAAG,SAAS,CAK1F"}
@@ -0,0 +1,62 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { hasMessageIdentity, messageData } from '@hydranium/protocol';
10
+ import { Diagnostic } from 'vscode-languageserver-protocol';
11
+ /**
12
+ * Raise a validation diagnostic from a declaration, so the call site never
13
+ * restates the code or the sentence.
14
+ *
15
+ * `code` is omitted from `info` because this owns it — the framework claims LSP
16
+ * `Diagnostic.code` for framework codes, which collides with no adopter today
17
+ * and is a stated rule rather than an accident. `data` is deliberately NOT
18
+ * omitted: Langium owns `data.code` for code-action dispatch, so a caller has to
19
+ * be able to request a quick fix. The identity is merged OVER whatever they
20
+ * pass, which makes the two conventions co-exist rather than compete.
21
+ *
22
+ * `data` admits adopter-owned keys beside Langium's, which is why the index
23
+ * signature is there rather than a bare `Partial<DiagnosticData>`. Langium's
24
+ * shape is closed, and a diagnostic that carries a COMPANION payload for its own
25
+ * surface to read — the field a form must highlight, say — has nowhere else to
26
+ * put it: an encoder projecting that payload reads `diagnostic.data`, so the
27
+ * narrower type made the identity and the companion mutually exclusive.
28
+ *
29
+ * The identity lands in both `code` and `data.hydranium` on purpose. `code` is
30
+ * what survives to the editor surface; Theia's converter drops `data` before the
31
+ * squiggle, so a parameterised diagnostic falls back to the server's English
32
+ * there while any adopter-owned surface can still render the parameterised form
33
+ * from the marker store.
34
+ *
35
+ * `DiagnosticInfo` must be Langium's own type: a `Parameters<ValidationAcceptor>[2]`
36
+ * shortcut compiles but loses the `property?: Properties<N>` relation. The `data`
37
+ * re-type has to be an intersection rather than an `Omit` alone, because Langium
38
+ * declares `data?: unknown` and an `unknown` cannot be spread.
39
+ */
40
+ export function acceptMessage(accept, severity, message, info, ...params) {
41
+ const data = {
42
+ ...info.data,
43
+ ...messageData(message, ...params)
44
+ };
45
+ accept(severity, message.format(...params), { ...info, code: message.code, data });
46
+ }
47
+ /**
48
+ * Recover the identity from a published diagnostic, for a surface that
49
+ * identifies or renders diagnostics itself.
50
+ *
51
+ * `Diagnostic.message` is `string | MarkupContent` in LSP 3.17+, so the text
52
+ * comes from upstream's own `Diagnostic.getMessageString` rather than a
53
+ * hand-rolled narrowing — consuming the library in its style, and one fewer
54
+ * place restating the union.
55
+ */
56
+ export function resolvedFromDiagnostic(diagnostic) {
57
+ if (!hasMessageIdentity(diagnostic.data)) {
58
+ return undefined;
59
+ }
60
+ return { ...diagnostic.data.hydranium, text: Diagnostic.getMessageString(diagnostic) };
61
+ }
62
+ //# sourceMappingURL=carriers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carriers.js","sourceRoot":"","sources":["../../src/messages/carriers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,kBAAkB,EAClB,WAAW,EAKb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,aAAa,CAC1B,MAA0B,EAC1B,QAA+C,EAC/C,OAA6B,EAC7B,IAAgH,EAChH,GAAG,MAAoB;IAEvB,MAAM,IAAI,GAA6E;QACpF,GAAG,IAAI,CAAC,IAAI;QACZ,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC;KACpC,CAAC;IACF,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACtF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAsB;IAC1D,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,OAAO,SAAS,CAAC;IACpB,CAAC;IACD,OAAO,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;AAC1F,CAAC"}
@@ -0,0 +1,25 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Every user-facing message `@hydranium/core` raises, plus the carrier helpers
11
+ * that attach an identity to one.
12
+ *
13
+ * Declarations stay beside their call sites and are re-exported here, so this is
14
+ * enumeration rather than centralization: a code's package segment has to name
15
+ * the package that raises it. The English is a fallback, not a contract; the
16
+ * code is the contract, and renaming one is a breaking change.
17
+ */
18
+ export * from './carriers.js';
19
+ export * from './renderer.js';
20
+ export { MODEL_UPDATE_EDIT } from '../langium/model-service/model-service.js';
21
+ export { SEPARATOR_IN_NAME } from '../langium/naming/name-separator-validation.js';
22
+ export { LEXING_ERROR, UNRESOLVED_REFERENCE } from '../langium/validation/document-validator.js';
23
+ export { NO_LOADABLE_CONTENT } from '../langium/workspace/langium-documents.js';
24
+ export { NO_SUCH_FILE, NO_SUCH_PATH } from '../langium/workspace/in-memory-file-system-provider.js';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}
@@ -0,0 +1,25 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Every user-facing message `@hydranium/core` raises, plus the carrier helpers
11
+ * that attach an identity to one.
12
+ *
13
+ * Declarations stay beside their call sites and are re-exported here, so this is
14
+ * enumeration rather than centralization: a code's package segment has to name
15
+ * the package that raises it. The English is a fallback, not a contract; the
16
+ * code is the contract, and renaming one is a breaking change.
17
+ */
18
+ export * from './carriers.js';
19
+ export * from './renderer.js';
20
+ export { MODEL_UPDATE_EDIT } from '../langium/model-service/model-service.js';
21
+ export { SEPARATOR_IN_NAME } from '../langium/naming/name-separator-validation.js';
22
+ export { LEXING_ERROR, UNRESOLVED_REFERENCE } from '../langium/validation/document-validator.js';
23
+ export { NO_LOADABLE_CONTENT } from '../langium/workspace/langium-documents.js';
24
+ export { NO_SUCH_FILE, NO_SUCH_PATH } from '../langium/workspace/in-memory-file-system-provider.js';
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}