@hydranium/glsp-server 1.0.0-next.31 → 1.0.0-next.315

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 (217) hide show
  1. package/README.md +80 -88
  2. package/lib/browser/start-glsp-server-in-worker.d.ts +43 -42
  3. package/lib/browser/start-glsp-server-in-worker.d.ts.map +1 -1
  4. package/lib/browser/start-glsp-server-in-worker.js +62 -13
  5. package/lib/browser/start-glsp-server-in-worker.js.map +1 -1
  6. package/lib/command/diagram-edit-dropped-error.d.ts +31 -0
  7. package/lib/command/diagram-edit-dropped-error.d.ts.map +1 -0
  8. package/lib/command/diagram-edit-dropped-error.js +48 -0
  9. package/lib/command/diagram-edit-dropped-error.js.map +1 -0
  10. package/lib/command/hydranium-glsp-command-stack.d.ts +33 -0
  11. package/lib/command/hydranium-glsp-command-stack.d.ts.map +1 -0
  12. package/lib/command/hydranium-glsp-command-stack.js +63 -0
  13. package/lib/command/hydranium-glsp-command-stack.js.map +1 -0
  14. package/lib/command/hydranium-glsp-operation-action-handler.d.ts +64 -0
  15. package/lib/command/hydranium-glsp-operation-action-handler.d.ts.map +1 -0
  16. package/lib/command/hydranium-glsp-operation-action-handler.js +142 -0
  17. package/lib/command/hydranium-glsp-operation-action-handler.js.map +1 -0
  18. package/lib/command/hydranium-glsp-operation-command.d.ts +250 -0
  19. package/lib/command/hydranium-glsp-operation-command.d.ts.map +1 -0
  20. package/lib/command/hydranium-glsp-operation-command.js +491 -0
  21. package/lib/command/hydranium-glsp-operation-command.js.map +1 -0
  22. package/lib/command/hydranium-glsp-recording-command.d.ts +26 -87
  23. package/lib/command/hydranium-glsp-recording-command.d.ts.map +1 -1
  24. package/lib/command/hydranium-glsp-recording-command.js +40 -117
  25. package/lib/command/hydranium-glsp-recording-command.js.map +1 -1
  26. package/lib/command/hydranium-glsp-undo-redo-action-handler.d.ts +23 -0
  27. package/lib/command/hydranium-glsp-undo-redo-action-handler.d.ts.map +1 -0
  28. package/lib/command/hydranium-glsp-undo-redo-action-handler.js +41 -0
  29. package/lib/command/hydranium-glsp-undo-redo-action-handler.js.map +1 -0
  30. package/lib/command/index.d.ts +5 -0
  31. package/lib/command/index.d.ts.map +1 -1
  32. package/lib/command/index.js +5 -0
  33. package/lib/command/index.js.map +1 -1
  34. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.d.ts +1 -1
  35. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.d.ts.map +1 -1
  36. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.js +2 -2
  37. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.js.map +1 -1
  38. package/lib/dispatcher/server-action-dispatcher.d.ts +25 -24
  39. package/lib/dispatcher/server-action-dispatcher.d.ts.map +1 -1
  40. package/lib/dispatcher/server-action-dispatcher.js +38 -26
  41. package/lib/dispatcher/server-action-dispatcher.js.map +1 -1
  42. package/lib/index.d.ts +1 -0
  43. package/lib/index.d.ts.map +1 -1
  44. package/lib/index.js +1 -0
  45. package/lib/index.js.map +1 -1
  46. package/lib/launcher/abstract-hydranium-glsp-diagram-module.d.ts +35 -59
  47. package/lib/launcher/abstract-hydranium-glsp-diagram-module.d.ts.map +1 -1
  48. package/lib/launcher/abstract-hydranium-glsp-diagram-module.js +60 -71
  49. package/lib/launcher/abstract-hydranium-glsp-diagram-module.js.map +1 -1
  50. package/lib/launcher/drop-notifications-to-gone-client.d.ts +23 -0
  51. package/lib/launcher/drop-notifications-to-gone-client.d.ts.map +1 -0
  52. package/lib/launcher/drop-notifications-to-gone-client.js +43 -0
  53. package/lib/launcher/drop-notifications-to-gone-client.js.map +1 -0
  54. package/lib/launcher/glsp-app-module.d.ts +1 -2
  55. package/lib/launcher/glsp-app-module.d.ts.map +1 -1
  56. package/lib/launcher/glsp-app-module.js.map +1 -1
  57. package/lib/launcher/glsp-connection-logger.d.ts +19 -0
  58. package/lib/launcher/glsp-connection-logger.d.ts.map +1 -0
  59. package/lib/launcher/glsp-connection-logger.js +24 -0
  60. package/lib/launcher/glsp-connection-logger.js.map +1 -0
  61. package/lib/launcher/glsp-server-overrides.d.ts +10 -8
  62. package/lib/launcher/glsp-server-overrides.d.ts.map +1 -1
  63. package/lib/launcher/glsp-server-overrides.js +25 -11
  64. package/lib/launcher/glsp-server-overrides.js.map +1 -1
  65. package/lib/launcher/hydranium-glsp-server.d.ts +60 -15
  66. package/lib/launcher/hydranium-glsp-server.d.ts.map +1 -1
  67. package/lib/launcher/hydranium-glsp-server.js +145 -22
  68. package/lib/launcher/hydranium-glsp-server.js.map +1 -1
  69. package/lib/launcher/index.d.ts +2 -0
  70. package/lib/launcher/index.d.ts.map +1 -1
  71. package/lib/launcher/index.js +5 -4
  72. package/lib/launcher/index.js.map +1 -1
  73. package/lib/logging/glsp-client-logger.d.ts +10 -6
  74. package/lib/logging/glsp-client-logger.d.ts.map +1 -1
  75. package/lib/logging/glsp-client-logger.js +14 -7
  76. package/lib/logging/glsp-client-logger.js.map +1 -1
  77. package/lib/messages/index.d.ts +11 -6
  78. package/lib/messages/index.d.ts.map +1 -1
  79. package/lib/messages/index.js +11 -6
  80. package/lib/messages/index.js.map +1 -1
  81. package/lib/node/start-glsp-server.d.ts +50 -15
  82. package/lib/node/start-glsp-server.d.ts.map +1 -1
  83. package/lib/node/start-glsp-server.js +97 -30
  84. package/lib/node/start-glsp-server.js.map +1 -1
  85. package/lib/state/abstract-hydranium-glsp-state.d.ts +326 -102
  86. package/lib/state/abstract-hydranium-glsp-state.d.ts.map +1 -1
  87. package/lib/state/abstract-hydranium-glsp-state.js +529 -139
  88. package/lib/state/abstract-hydranium-glsp-state.js.map +1 -1
  89. package/lib/state/diagram-status.d.ts +38 -0
  90. package/lib/state/diagram-status.d.ts.map +1 -0
  91. package/lib/state/diagram-status.js +27 -0
  92. package/lib/state/diagram-status.js.map +1 -0
  93. package/lib/state/full-text-hydranium-glsp-state.d.ts +22 -9
  94. package/lib/state/full-text-hydranium-glsp-state.d.ts.map +1 -1
  95. package/lib/state/full-text-hydranium-glsp-state.js +45 -18
  96. package/lib/state/full-text-hydranium-glsp-state.js.map +1 -1
  97. package/lib/state/hydranium-glsp-index.d.ts +40 -29
  98. package/lib/state/hydranium-glsp-index.d.ts.map +1 -1
  99. package/lib/state/hydranium-glsp-index.js +82 -45
  100. package/lib/state/hydranium-glsp-index.js.map +1 -1
  101. package/lib/state/hydranium-shared-core-services.d.ts +16 -29
  102. package/lib/state/hydranium-shared-core-services.d.ts.map +1 -1
  103. package/lib/state/hydranium-shared-core-services.js +15 -28
  104. package/lib/state/hydranium-shared-core-services.js.map +1 -1
  105. package/lib/state/index.d.ts +1 -0
  106. package/lib/state/index.d.ts.map +1 -1
  107. package/lib/state/index.js +1 -0
  108. package/lib/state/index.js.map +1 -1
  109. package/lib/state/model-ready-timeout-error.d.ts.map +1 -1
  110. package/lib/state/model-ready-timeout-error.js.map +1 -1
  111. package/lib/state/reconcile-source-model-write.d.ts +13 -27
  112. package/lib/state/reconcile-source-model-write.d.ts.map +1 -1
  113. package/lib/state/reconcile-source-model-write.js +44 -32
  114. package/lib/state/reconcile-source-model-write.js.map +1 -1
  115. package/lib/state/reconciling-multi-document-glsp-state.d.ts +125 -69
  116. package/lib/state/reconciling-multi-document-glsp-state.d.ts.map +1 -1
  117. package/lib/state/reconciling-multi-document-glsp-state.js +242 -100
  118. package/lib/state/reconciling-multi-document-glsp-state.js.map +1 -1
  119. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts +36 -28
  120. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts.map +1 -1
  121. package/lib/state/reconciling-transfer-hydranium-glsp-state.js +59 -42
  122. package/lib/state/reconciling-transfer-hydranium-glsp-state.js.map +1 -1
  123. package/lib/status/diagram-status-reporter.d.ts +44 -0
  124. package/lib/status/diagram-status-reporter.d.ts.map +1 -0
  125. package/lib/status/diagram-status-reporter.js +88 -0
  126. package/lib/status/diagram-status-reporter.js.map +1 -0
  127. package/lib/status/hydranium-glsp-request-model-action-handler.d.ts +27 -0
  128. package/lib/status/hydranium-glsp-request-model-action-handler.d.ts.map +1 -0
  129. package/lib/status/hydranium-glsp-request-model-action-handler.js +52 -0
  130. package/lib/status/hydranium-glsp-request-model-action-handler.js.map +1 -0
  131. package/lib/status/hydranium-glsp-set-edit-mode-action-handler.d.ts +27 -0
  132. package/lib/status/hydranium-glsp-set-edit-mode-action-handler.d.ts.map +1 -0
  133. package/lib/status/hydranium-glsp-set-edit-mode-action-handler.js +53 -0
  134. package/lib/status/hydranium-glsp-set-edit-mode-action-handler.js.map +1 -0
  135. package/lib/status/index.d.ts +12 -0
  136. package/lib/status/index.d.ts.map +1 -0
  137. package/lib/status/index.js +12 -0
  138. package/lib/status/index.js.map +1 -0
  139. package/lib/storage/hydranium-glsp-request-save-model-action-handler.d.ts +30 -0
  140. package/lib/storage/hydranium-glsp-request-save-model-action-handler.d.ts.map +1 -0
  141. package/lib/storage/hydranium-glsp-request-save-model-action-handler.js +47 -0
  142. package/lib/storage/hydranium-glsp-request-save-model-action-handler.js.map +1 -0
  143. package/lib/storage/hydranium-glsp-storage.d.ts +324 -143
  144. package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -1
  145. package/lib/storage/hydranium-glsp-storage.js +569 -213
  146. package/lib/storage/hydranium-glsp-storage.js.map +1 -1
  147. package/lib/storage/index.d.ts +2 -1
  148. package/lib/storage/index.d.ts.map +1 -1
  149. package/lib/storage/index.js +2 -1
  150. package/lib/storage/index.js.map +1 -1
  151. package/lib/storage/save-delivery-policy.d.ts +51 -0
  152. package/lib/storage/save-delivery-policy.d.ts.map +1 -0
  153. package/lib/storage/{save-conflict-policy.js → save-delivery-policy.js} +7 -8
  154. package/lib/storage/save-delivery-policy.js.map +1 -0
  155. package/lib/submission/hydranium-glsp-submission-handler.d.ts +44 -4
  156. package/lib/submission/hydranium-glsp-submission-handler.d.ts.map +1 -1
  157. package/lib/submission/hydranium-glsp-submission-handler.js +82 -6
  158. package/lib/submission/hydranium-glsp-submission-handler.js.map +1 -1
  159. package/lib/testing/glsp-harness.d.ts +34 -7
  160. package/lib/testing/glsp-harness.d.ts.map +1 -1
  161. package/lib/testing/glsp-harness.js +47 -19
  162. package/lib/testing/glsp-harness.js.map +1 -1
  163. package/lib/validation/diagnostic-markers.d.ts +3 -3
  164. package/lib/validation/diagnostic-markers.d.ts.map +1 -1
  165. package/lib/validation/diagnostic-markers.js +1 -1
  166. package/lib/validation/diagnostic-markers.js.map +1 -1
  167. package/lib/validation/hydranium-glsp-model-validator.d.ts +1 -2
  168. package/lib/validation/hydranium-glsp-model-validator.d.ts.map +1 -1
  169. package/lib/validation/hydranium-glsp-model-validator.js +1 -1
  170. package/lib/validation/hydranium-glsp-model-validator.js.map +1 -1
  171. package/package.json +31 -52
  172. package/src/browser/start-glsp-server-in-worker.ts +79 -51
  173. package/src/command/diagram-edit-dropped-error.ts +51 -0
  174. package/src/command/hydranium-glsp-command-stack.ts +47 -0
  175. package/src/command/hydranium-glsp-operation-action-handler.ts +141 -0
  176. package/src/command/hydranium-glsp-operation-command.ts +602 -0
  177. package/src/command/hydranium-glsp-recording-command.ts +40 -121
  178. package/src/command/hydranium-glsp-undo-redo-action-handler.ts +29 -0
  179. package/src/command/index.ts +10 -0
  180. package/src/computed-bounds/hydranium-glsp-computed-bounds-action-handler.ts +2 -2
  181. package/src/dispatcher/server-action-dispatcher.ts +39 -31
  182. package/src/index.ts +1 -0
  183. package/src/launcher/abstract-hydranium-glsp-diagram-module.ts +79 -91
  184. package/src/launcher/drop-notifications-to-gone-client.ts +47 -0
  185. package/src/launcher/glsp-app-module.ts +1 -2
  186. package/src/launcher/glsp-connection-logger.ts +27 -0
  187. package/src/launcher/glsp-server-overrides.ts +27 -11
  188. package/src/launcher/hydranium-glsp-server.ts +153 -23
  189. package/src/launcher/index.ts +5 -4
  190. package/src/logging/glsp-client-logger.ts +16 -9
  191. package/src/messages/index.ts +16 -6
  192. package/src/node/start-glsp-server.ts +133 -40
  193. package/src/state/abstract-hydranium-glsp-state.ts +609 -154
  194. package/src/state/diagram-status.ts +41 -0
  195. package/src/state/full-text-hydranium-glsp-state.ts +46 -18
  196. package/src/state/hydranium-glsp-index.ts +85 -41
  197. package/src/state/hydranium-shared-core-services.ts +16 -29
  198. package/src/state/index.ts +1 -0
  199. package/src/state/reconcile-source-model-write.ts +51 -53
  200. package/src/state/reconciling-multi-document-glsp-state.ts +276 -102
  201. package/src/state/reconciling-transfer-hydranium-glsp-state.ts +67 -45
  202. package/src/status/diagram-status-reporter.ts +106 -0
  203. package/src/status/hydranium-glsp-request-model-action-handler.ts +43 -0
  204. package/src/status/hydranium-glsp-set-edit-mode-action-handler.ts +38 -0
  205. package/src/status/index.ts +12 -0
  206. package/src/storage/hydranium-glsp-request-save-model-action-handler.ts +40 -0
  207. package/src/storage/hydranium-glsp-storage.ts +647 -223
  208. package/src/storage/index.ts +2 -1
  209. package/src/storage/save-delivery-policy.ts +49 -0
  210. package/src/submission/hydranium-glsp-submission-handler.ts +91 -5
  211. package/src/testing/glsp-harness.ts +67 -25
  212. package/src/validation/diagnostic-markers.ts +3 -3
  213. package/src/validation/hydranium-glsp-model-validator.ts +4 -5
  214. package/lib/storage/save-conflict-policy.d.ts +0 -56
  215. package/lib/storage/save-conflict-policy.d.ts.map +0 -1
  216. package/lib/storage/save-conflict-policy.js.map +0 -1
  217. package/src/storage/save-conflict-policy.ts +0 -52
@@ -6,33 +6,60 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { type ClientSession, DefaultGLSPServer, type RequestAction, type ResponseAction } from '@eclipse-glsp/server';
9
+ import { type ActionMessage, type ClientSession, DefaultGLSPServer, type InitializeClientSessionParameters, RequestAction, type ResponseAction } from '@eclipse-glsp/server';
10
10
  /**
11
11
  * The GLSP server the framework binds in place of upstream's
12
12
  * {@link DefaultGLSPServer}, so a failed REQUEST reaches its reader with the
13
- * text the thrower wrote.
13
+ * text the thrower wrote, and a diagram whose connection ends keeps its unsaved
14
+ * text for the release grace (see {@link shutdown}).
14
15
  *
15
16
  * **What breaks without it.** Upstream projects a failing request's detail as
16
17
  * `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
17
18
  * and that one value feeds both the server log and the client's
18
19
  * {@link RejectAction}. A {@link GLSPServerError} carrying no `cause` therefore
19
- * reaches no reader at all — not the toast, not the details pane, not the log —
20
- * while a plain `Error` survives, because the other branch reads the error
21
- * itself. The typed error is the trap, and it is the one upstream's own
20
+ * reaches its readers as `undefined` — the log line and the client's
21
+ * action-dispatcher warning both print it — while a plain `Error` survives,
22
+ * because the other branch reads the error itself. The typed error is the trap,
23
+ * and it is the one upstream's own
22
24
  * `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
23
25
  * an adopter using the sanctioned helper has no fix available on their side.
24
26
  * Restating the cause at each throw site is the alternative, and it costs
25
27
  * every adopter a rule they must know and cannot apply to `getOrThrow`.
26
28
  *
27
- * Only the REQUEST path needs this. Non-request actions fail through
28
- * upstream's `handleProcessError`, which reads `message` directly.
29
+ * Only the REQUEST path needs this. A non-request action fails through
30
+ * {@link handleProcessError}, which reads `message` directly; it and
31
+ * {@link process} are lifted for their logging only.
29
32
  *
30
- * Adopters who bind their own GLSP server should extend this class rather than
31
- * {@link DefaultGLSPServer}; the framework's server-container override replaces
32
- * whatever the adopter's `ServerModule` bound, so a subclass of upstream's
33
- * server would be discarded.
33
+ * An adopter who binds their own GLSP server extends this class rather than
34
+ * {@link DefaultGLSPServer}: the framework's server-container override keeps a
35
+ * server that extends this one and replaces any other, so a subclass of
36
+ * upstream's server is discarded, and with it both behaviours.
34
37
  */
35
38
  export declare class HydraniumGlspServer extends DefaultGLSPServer {
39
+ /**
40
+ * End each diagram's client session as lost rather than closed, before
41
+ * upstream disposes the sessions, so its unsaved text waits out the release
42
+ * grace for the client to reconnect. A shutdown is how the client's
43
+ * connection ending reaches the server; a client that stops on purpose
44
+ * shuts the server down the same way, and its diagrams are held as well.
45
+ */
46
+ shutdown(): void;
47
+ /**
48
+ * End a session the id still has before initializing it again. A model
49
+ * source initializes once, so a second initialize under one id is a new
50
+ * widget, a reopened tab whose closed predecessor's dispose never arrived;
51
+ * upstream would hand it that stale session.
52
+ */
53
+ initializeClientSession(params: InitializeClientSessionParameters): Promise<void>;
54
+ /**
55
+ * Lifted from `@eclipse-glsp/server` 2.7.0's {@link DefaultGLSPServer.process}:
56
+ * each action is logged at `debug` rather than `info`, and an action that
57
+ * fails once its session has ended, which disposing the session's dispatcher
58
+ * does to every action it holds, is logged at `debug` and told to no client,
59
+ * since the one that sent it has gone. The accompanying test pins upstream's
60
+ * source.
61
+ */
62
+ process(message: ActionMessage): void;
36
63
  /**
37
64
  * The detail projected into the client's {@link RejectAction} and the server
38
65
  * log when a request fails.
@@ -44,11 +71,29 @@ export declare class HydraniumGlspServer extends DefaultGLSPServer {
44
71
  */
45
72
  protected requestFailureDetail(error: unknown): string | undefined;
46
73
  /**
47
- * Lifted verbatim from `@eclipse-glsp/server` 2.7.0's
74
+ * Lifted from `@eclipse-glsp/server` 2.7.0's
75
+ * {@link DefaultGLSPServer.handleProcessError}, logging the failure once
76
+ * with {@link logActionFailure} where upstream logs the action and the
77
+ * reason as two lines.
78
+ *
79
+ * The notification is upstream's, text and all, and this body does not
80
+ * track upstream: the accompanying test pins upstream's source as it does
81
+ * for {@link handleClientRequest}.
82
+ */
83
+ protected handleProcessError(message: ActionMessage, reason: unknown): void;
84
+ /**
85
+ * Lifted from `@eclipse-glsp/server` 2.7.0's
48
86
  * {@link DefaultGLSPServer.handleClientRequest}, with the detail computation
49
- * delegated to {@link requestFailureDetail}. Nothing else here — the
50
- * timeout branch, the response dispatch, the nested send-failure handling —
51
- * relates to that fallback.
87
+ * delegated to {@link requestFailureDetail}, the failure logged once with
88
+ * its stack, a request that fails once its session has ended logged at
89
+ * `debug` and answered to no client, as {@link process} treats an action,
90
+ * and one addition: a failed {@link RequestSaveModelAction} also
91
+ * raises the error notification a failed `SaveModelAction` raises, through
92
+ * {@link handleProcessError}, which then logs it instead. A rejection
93
+ * reaches only the client's log, and a Theia host only logs a rejected save,
94
+ * so without it a save that failed would tell the user nothing. Nothing else
95
+ * here — the timeout branch, the response dispatch, the nested send-failure
96
+ * handling — relates to either.
52
97
  *
53
98
  * **This body does not track upstream.** A release that changes request
54
99
  * handling would silently not apply, on the path every request takes. There
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-server.d.ts","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,aAAa,EAClB,iBAAiB,EAGjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACrB,MAAM,sBAAsB,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,mBAAoB,SAAQ,iBAAiB;IACvD;;;;;;;;OAQG;IACH,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAOlE;;;;;;;;;;;;;OAaG;cACsB,mBAAmB,CACzC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,EACrC,QAAQ,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;CAuBlB"}
1
+ {"version":3,"file":"hydranium-glsp-server.d.ts","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,aAAa,EAElB,KAAK,aAAa,EAClB,iBAAiB,EAEjB,KAAK,iCAAiC,EAGtC,aAAa,EACb,KAAK,cAAc,EAErB,MAAM,sBAAsB,CAAC;AAM9B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,mBAAoB,SAAQ,iBAAiB;IACvD;;;;;;OAMG;IACM,QAAQ,IAAI,IAAI,CAUxB;IAED;;;;;OAKG;IACY,uBAAuB,CAAC,MAAM,EAAE,iCAAiC,GAAG,OAAO,CAAC,IAAI,CAAC,CAW/F;IAED;;;;;;;OAOG;IACM,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAqB7C;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKjE;IAED;;;;;;;;;OASG;IACH,UAAmB,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAUnF;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,UAAyB,mBAAmB,CACzC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,EACrC,QAAQ,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAsCf;CACH"}
@@ -12,34 +12,108 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
12
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
14
  };
15
- import { DefaultGLSPServer, GLSPServerError, RejectAction } from '@eclipse-glsp/server';
15
+ import { ClientAction, DefaultGLSPServer, GLSPServerError, MessageAction, RejectAction, RequestAction, SourceModelStorage } from '@eclipse-glsp/server';
16
+ import { describeErrorWithStack, RequestSaveModelAction } from '@hydranium/protocol';
16
17
  import { injectable } from 'inversify';
18
+ import { logActionFailure } from '../command/diagram-edit-dropped-error.js';
19
+ import { HydraniumGlspStorage } from '../storage/hydranium-glsp-storage.js';
17
20
  /**
18
21
  * The GLSP server the framework binds in place of upstream's
19
22
  * {@link DefaultGLSPServer}, so a failed REQUEST reaches its reader with the
20
- * text the thrower wrote.
23
+ * text the thrower wrote, and a diagram whose connection ends keeps its unsaved
24
+ * text for the release grace (see {@link shutdown}).
21
25
  *
22
26
  * **What breaks without it.** Upstream projects a failing request's detail as
23
27
  * `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
24
28
  * and that one value feeds both the server log and the client's
25
29
  * {@link RejectAction}. A {@link GLSPServerError} carrying no `cause` therefore
26
- * reaches no reader at all — not the toast, not the details pane, not the log —
27
- * while a plain `Error` survives, because the other branch reads the error
28
- * itself. The typed error is the trap, and it is the one upstream's own
30
+ * reaches its readers as `undefined` — the log line and the client's
31
+ * action-dispatcher warning both print it — while a plain `Error` survives,
32
+ * because the other branch reads the error itself. The typed error is the trap,
33
+ * and it is the one upstream's own
29
34
  * `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
30
35
  * an adopter using the sanctioned helper has no fix available on their side.
31
36
  * Restating the cause at each throw site is the alternative, and it costs
32
37
  * every adopter a rule they must know and cannot apply to `getOrThrow`.
33
38
  *
34
- * Only the REQUEST path needs this. Non-request actions fail through
35
- * upstream's `handleProcessError`, which reads `message` directly.
39
+ * Only the REQUEST path needs this. A non-request action fails through
40
+ * {@link handleProcessError}, which reads `message` directly; it and
41
+ * {@link process} are lifted for their logging only.
36
42
  *
37
- * Adopters who bind their own GLSP server should extend this class rather than
38
- * {@link DefaultGLSPServer}; the framework's server-container override replaces
39
- * whatever the adopter's `ServerModule` bound, so a subclass of upstream's
40
- * server would be discarded.
43
+ * An adopter who binds their own GLSP server extends this class rather than
44
+ * {@link DefaultGLSPServer}: the framework's server-container override keeps a
45
+ * server that extends this one and replaces any other, so a subclass of
46
+ * upstream's server is discarded, and with it both behaviours.
41
47
  */
42
48
  let HydraniumGlspServer = class HydraniumGlspServer extends DefaultGLSPServer {
49
+ /**
50
+ * End each diagram's client session as lost rather than closed, before
51
+ * upstream disposes the sessions, so its unsaved text waits out the release
52
+ * grace for the client to reconnect. A shutdown is how the client's
53
+ * connection ending reaches the server; a client that stops on purpose
54
+ * shuts the server down the same way, and its diagrams are held as well.
55
+ */
56
+ shutdown() {
57
+ for (const session of this.clientSessions.values()) {
58
+ const storage = session.container.isBound(SourceModelStorage) ? session.container.get(SourceModelStorage) : undefined;
59
+ if (storage instanceof HydraniumGlspStorage) {
60
+ storage.dispose('lost');
61
+ }
62
+ else if (storage) {
63
+ this.logger.debug(`Shutdown leaves ending ${session.id} to its storage, which is not a HydraniumGlspStorage`);
64
+ }
65
+ }
66
+ super.shutdown();
67
+ }
68
+ /**
69
+ * End a session the id still has before initializing it again. A model
70
+ * source initializes once, so a second initialize under one id is a new
71
+ * widget, a reopened tab whose closed predecessor's dispose never arrived;
72
+ * upstream would hand it that stale session.
73
+ */
74
+ async initializeClientSession(params) {
75
+ if (!this.clientSessions.has(params.clientSessionId)) {
76
+ return super.initializeClientSession(params);
77
+ }
78
+ this.logger.debug(`Client session ${params.clientSessionId} initialized again before its dispose arrived; ending the old one`);
79
+ // Not awaited before the initialize: both drop and set the session before
80
+ // their first await, and the model request that follows is read without
81
+ // waiting for this one to settle.
82
+ const disposed = this.disposeClientSession({ clientSessionId: params.clientSessionId });
83
+ const initialized = super.initializeClientSession(params);
84
+ await Promise.all([disposed, initialized]);
85
+ }
86
+ /**
87
+ * Lifted from `@eclipse-glsp/server` 2.7.0's {@link DefaultGLSPServer.process}:
88
+ * each action is logged at `debug` rather than `info`, and an action that
89
+ * fails once its session has ended, which disposing the session's dispatcher
90
+ * does to every action it holds, is logged at `debug` and told to no client,
91
+ * since the one that sent it has gone. The accompanying test pins upstream's
92
+ * source.
93
+ */
94
+ process(message) {
95
+ this.validateServerInitialized();
96
+ this.logger.debug(`process [action=${message.action.kind}, clientId=${message.clientId}]`);
97
+ const clientSessionId = message.clientId;
98
+ const clientSession = this.clientSessions.get(clientSessionId);
99
+ if (!clientSession) {
100
+ throw new Error(`No client session has been initialized for client id: ${clientSessionId}`);
101
+ }
102
+ const action = message.action;
103
+ ClientAction.mark(action);
104
+ if (RequestAction.is(action)) {
105
+ void this.handleClientRequest(clientSession, action, message.clientId);
106
+ return;
107
+ }
108
+ clientSession.actionDispatcher.dispatch(action).catch((error) => {
109
+ if (this.clientSessions.get(clientSessionId) === clientSession) {
110
+ void this.handleProcessError(message, error);
111
+ }
112
+ else {
113
+ this.logger.debug(`Action '${action.kind}' ended with its session: ${describeErrorWithStack(error)}`);
114
+ }
115
+ });
116
+ }
43
117
  /**
44
118
  * The detail projected into the client's {@link RejectAction} and the server
45
119
  * log when a request fails.
@@ -56,11 +130,39 @@ let HydraniumGlspServer = class HydraniumGlspServer extends DefaultGLSPServer {
56
130
  return error === undefined || error === null ? undefined : String(error);
57
131
  }
58
132
  /**
59
- * Lifted verbatim from `@eclipse-glsp/server` 2.7.0's
133
+ * Lifted from `@eclipse-glsp/server` 2.7.0's
134
+ * {@link DefaultGLSPServer.handleProcessError}, logging the failure once
135
+ * with {@link logActionFailure} where upstream logs the action and the
136
+ * reason as two lines.
137
+ *
138
+ * The notification is upstream's, text and all, and this body does not
139
+ * track upstream: the accompanying test pins upstream's source as it does
140
+ * for {@link handleClientRequest}.
141
+ */
142
+ handleProcessError(message, reason) {
143
+ const kind = message.action.kind;
144
+ logActionFailure(this.logger, message.action, reason);
145
+ let errorMsg = `Could not process action: '${kind}`;
146
+ let details = stringifyAsUpstream(reason);
147
+ if (reason instanceof GLSPServerError) {
148
+ details = stringifyAsUpstream(reason.cause);
149
+ errorMsg = reason.message;
150
+ }
151
+ this.sendToClient({ clientId: message.clientId, action: MessageAction.create(errorMsg, { severity: 'ERROR', details }) });
152
+ }
153
+ /**
154
+ * Lifted from `@eclipse-glsp/server` 2.7.0's
60
155
  * {@link DefaultGLSPServer.handleClientRequest}, with the detail computation
61
- * delegated to {@link requestFailureDetail}. Nothing else here — the
62
- * timeout branch, the response dispatch, the nested send-failure handling —
63
- * relates to that fallback.
156
+ * delegated to {@link requestFailureDetail}, the failure logged once with
157
+ * its stack, a request that fails once its session has ended logged at
158
+ * `debug` and answered to no client, as {@link process} treats an action,
159
+ * and one addition: a failed {@link RequestSaveModelAction} also
160
+ * raises the error notification a failed `SaveModelAction` raises, through
161
+ * {@link handleProcessError}, which then logs it instead. A rejection
162
+ * reaches only the client's log, and a Theia host only logs a rejected save,
163
+ * so without it a save that failed would tell the user nothing. Nothing else
164
+ * here — the timeout branch, the response dispatch, the nested send-failure
165
+ * handling — relates to either.
64
166
  *
65
167
  * **This body does not track upstream.** A release that changes request
66
168
  * handling would silently not apply, on the path every request takes. There
@@ -79,17 +181,34 @@ let HydraniumGlspServer = class HydraniumGlspServer extends DefaultGLSPServer {
79
181
  }
80
182
  }
81
183
  catch (error) {
184
+ if (this.clientSessions.get(clientSession.id) !== clientSession) {
185
+ this.logger.debug(`Request '${action.kind}' (${action.requestId}) ended with its session: ${describeErrorWithStack(error)}`);
186
+ return;
187
+ }
82
188
  const detail = this.requestFailureDetail(error);
83
- this.logger.error(`Failed to handle request '${action.kind}' (${action.requestId}):`, detail);
189
+ const isSave = action.kind === RequestSaveModelAction.KIND;
190
+ if (!isSave) {
191
+ this.logger.error(`Failed to handle request '${action.kind}' (${action.requestId}): ${describeErrorWithStack(error)}`);
192
+ }
193
+ // Inside the guard: `process` does not await this method, so a throw
194
+ // here would be an unhandled rejection.
84
195
  try {
85
- const reject = RejectAction.create(`Failed to handle request '${action.kind}' (${action.requestId})`, {
86
- responseId: action.requestId,
87
- detail
88
- });
89
- this.sendResponseToClient(clientId, reject);
196
+ try {
197
+ const reject = RejectAction.create(`Failed to handle request '${action.kind}' (${action.requestId})`, {
198
+ responseId: action.requestId,
199
+ detail
200
+ });
201
+ this.sendResponseToClient(clientId, reject);
202
+ }
203
+ finally {
204
+ // Also when the reject could not be sent, since this logs the save's failure.
205
+ if (isSave) {
206
+ this.handleProcessError({ clientId, action }, error);
207
+ }
208
+ }
90
209
  }
91
210
  catch (sendError) {
92
- this.logger.error(`Failed to send rejection for request '${action.requestId}':`, sendError);
211
+ this.logger.error(`Failed to send rejection for request '${action.requestId}': ${describeErrorWithStack(sendError)}`);
93
212
  }
94
213
  }
95
214
  }
@@ -98,4 +217,8 @@ HydraniumGlspServer = __decorate([
98
217
  injectable()
99
218
  ], HydraniumGlspServer);
100
219
  export { HydraniumGlspServer };
220
+ /** `value?.toString?.()`, as upstream projects a reason into a notification's details. */
221
+ function stringifyAsUpstream(value) {
222
+ return value?.toString?.();
223
+ }
101
224
  //# sourceMappingURL=hydranium-glsp-server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-server.js","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;AAElF,OAAO,EAEJ,iBAAiB,EACjB,eAAe,EACf,YAAY,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,iBAAiB;IACvD;;;;;;;;OAQG;IACO,oBAAoB,CAAC,KAAc;QAC1C,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;YACpC,OAAO,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClG,CAAC;QACD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACgB,KAAK,CAAC,mBAAmB,CACzC,aAA4B,EAC5B,MAAqC,EACrC,QAAgB;QAEhB,IAAI,CAAC;YACF,MAAM,QAAQ,GACX,MAAM,CAAC,OAAO,KAAK,SAAS;gBACzB,CAAC,CAAC,MAAM,aAAa,CAAC,gBAAgB,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC;gBACjF,CAAC,CAAC,MAAM,aAAa,CAA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AAC,MAAM,CAAC,6BAA6B,MAAM,CAAC,IAAI,MAAM,MAAM,CAAC,SAAS,GAAG,EAAE;wBACnG,UAAU,EAAE,MAAM,CAAC,SAAS;wBAC5B,MAAM;qBACR,CAAC,CAAC;oBACH,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAC/C,CAAC;wBAAS,CAAC;oBACR,8EAA8E;oBAC9E,IAAI,MAAM,EAAE,CAAC;wBACV,IAAI,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,CAAC;oBACxD,CAAC;gBACJ,CAAC;YACJ,CAAC;YAAC,OAAO,SAAkB,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,MAAM,CAAC,SAAS,MAAM,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YACzH,CAAC;QACJ,CAAC;IACJ,CAAC;CACH,CAAA;AA5KY,mBAAmB;IAD/B,UAAU,EAAE;GACA,mBAAmB,CA4K/B;;AAED,0FAA0F;AAC1F,SAAS,mBAAmB,CAAC,KAAc;IACxC,OAAQ,KAAwD,EAAE,QAAQ,EAAE,EAAE,CAAC;AAClF,CAAC"}
@@ -9,4 +9,6 @@
9
9
  export * from './glsp-app-module.js';
10
10
  export * from './abstract-hydranium-glsp-diagram-module.js';
11
11
  export * from './hydranium-glsp-server.js';
12
+ export * from './drop-notifications-to-gone-client.js';
13
+ export * from './glsp-connection-logger.js';
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/launcher/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,sBAAsB,CAAC;AACrC,cAAc,6CAA6C,CAAC;AAI5D,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/launcher/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,sBAAsB,CAAC;AACrC,cAAc,6CAA6C,CAAC;AAI5D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC"}
@@ -12,11 +12,12 @@ export * from './abstract-hydranium-glsp-diagram-module.js';
12
12
  // rather than upstream's — the server-container override discards a subclass of
13
13
  // `DefaultGLSPServer`.
14
14
  export * from './hydranium-glsp-server.js';
15
+ export * from './drop-notifications-to-gone-client.js';
16
+ export * from './glsp-connection-logger.js';
15
17
  // The socket bringup lives in `@hydranium/glsp-server/node` and the worker
16
18
  // bringup in `@hydranium/glsp-server/browser`, not here: each pulls the
17
19
  // upstream build for its platform, which the portable `.` entry must stay free
18
- // of. `glsp-framework-overrides.js` and `glsp-server-overrides.js` are
19
- // deliberately NOT re-exported — they are the bindings those two bringups share,
20
- // reached by relative import, and an adopter composing a container by hand wants
21
- // the launcher rather than its internals.
20
+ // of. The container overrides those two bringups share stay unexported, reached
21
+ // by relative import: an adopter composing a container by hand wants the
22
+ // launcher rather than its internals.
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/launcher/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,sBAAsB,CAAC;AACrC,cAAc,6CAA6C,CAAC;AAC5D,+EAA+E;AAC/E,gFAAgF;AAChF,uBAAuB;AACvB,cAAc,4BAA4B,CAAC;AAC3C,2EAA2E;AAC3E,wEAAwE;AACxE,+EAA+E;AAC/E,uEAAuE;AACvE,iFAAiF;AACjF,iFAAiF;AACjF,0CAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/launcher/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,sBAAsB,CAAC;AACrC,cAAc,6CAA6C,CAAC;AAC5D,+EAA+E;AAC/E,gFAAgF;AAChF,uBAAuB;AACvB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,2EAA2E;AAC3E,wEAAwE;AACxE,+EAA+E;AAC/E,gFAAgF;AAChF,yEAAyE;AACzE,sCAAsC"}
@@ -17,11 +17,11 @@ import { type LogThreshold } from '@hydranium/protocol';
17
17
  export interface GlspClientLoggerOptions extends LspLoggerOptions {
18
18
  /**
19
19
  * Per-instance NARROWING of the framework threshold. Omit it — the default
20
- * tracks `Logger.getLevel()` live, which is what makes one
20
+ * tracks the framework thresholds live, which is what makes one
21
21
  * `HYDRANIUM_LOG_LEVEL` / one LSP setting govern GLSP output too.
22
22
  *
23
23
  * It can only narrow, never widen, and that is not a policy choice:
24
- * `AbstractLogger.send` gates every emission on the process-wide threshold
24
+ * `AbstractLogger.send` gates every emission on `Logger.isLevelEnabled`
25
25
  * before it reaches the output channel, so a value more verbose than the
26
26
  * global is silently ineffective. Set it only to make ONE component quieter
27
27
  * than the rest.
@@ -48,8 +48,8 @@ export declare function glspLogLevelOf(threshold: LogThreshold): LogLevel;
48
48
  * GLSP-specific concerns layered on top of {@link LspLogger}:
49
49
  *
50
50
  * - A {@link logLevel} field, because GLSP's `Logger` contract declares one.
51
- * **It tracks the framework's process-wide threshold by default**, resolving
52
- * `Logger.getLevel()` through {@link glspLogLevelOf} on every read — so
51
+ * **It tracks the framework's thresholds by default**, resolving them
52
+ * through {@link glspLogLevelOf} on every read — so
53
53
  * `HYDRANIUM_LOG_LEVEL`, the LSP log-level setting and the Theia preference
54
54
  * all reach GLSP output without a second knob. Assigning the field (or
55
55
  * passing `logLevel`) pins an explicit per-instance NARROWING; see
@@ -81,7 +81,11 @@ export declare class GlspClientLogger extends LspLogger implements GlspLogger {
81
81
  */
82
82
  protected logLevelOverride?: LogLevel;
83
83
  constructor(services: ServerSharedServices, options?: GlspClientLoggerOptions);
84
- /** GLSP's `Logger.logLevel` contract; the framework threshold unless pinned. */
84
+ /**
85
+ * GLSP's `Logger.logLevel` contract; unless pinned, the more verbose of
86
+ * `Logger.getLevel()` and `Logger.getFileLevel()`. The process threshold
87
+ * alone drops GLSP lines a log file with its own threshold asks for.
88
+ */
85
89
  get logLevel(): LogLevel;
86
90
  set logLevel(level: LogLevel);
87
91
  /** GLSP's `Logger.caller` contract; reads {@link LspLogger.component}. */
@@ -94,7 +98,7 @@ export declare class GlspClientLogger extends LspLogger implements GlspLogger {
94
98
  protected enabled(level: LogLevel): boolean;
95
99
  /** Concatenate a message with its varargs, formatting each via {@link formatParam}. */
96
100
  protected combine(message: string, params: readonly unknown[]): string;
97
- /** Format a single param: errors → `message\nstack`; everything else → JSON.stringify(p, undefined, 4). */
101
+ /** Format a single param: errors → their stack and causes; everything else → JSON.stringify(p, undefined, 4). */
98
102
  protected formatParam(param: unknown): string;
99
103
  /**
100
104
  * Override of {@link LspLogger.derive} that carries the per-instance
@@ -1 +1 @@
1
- {"version":3,"file":"glsp-client-logger.d.ts","sourceRoot":"","sources":["../../src/logging/glsp-client-logger.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,IAAI,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC9D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,YAAY,GAAG,QAAQ,CAchE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,gBAAiB,SAAQ,SAAU,YAAW,UAAU;IA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M,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAErE;IAED,iHAAiH;IACjH,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAS5C;IAED;;;;;;;;OAQG;IACH,UAAmB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAGjD;CACH"}
@@ -8,7 +8,7 @@
8
8
  ********************************************************************************/
9
9
  import { LogLevel } from '@eclipse-glsp/server';
10
10
  import { LspLogger } from '@hydranium/core';
11
- import { Logger } from '@hydranium/protocol';
11
+ import { describeErrorWithStack, LEVEL_ORDER, Logger } from '@hydranium/protocol';
12
12
  /**
13
13
  * Map the framework's {@link LogThreshold} onto GLSP's numeric enum.
14
14
  *
@@ -43,8 +43,8 @@ export function glspLogLevelOf(threshold) {
43
43
  * GLSP-specific concerns layered on top of {@link LspLogger}:
44
44
  *
45
45
  * - A {@link logLevel} field, because GLSP's `Logger` contract declares one.
46
- * **It tracks the framework's process-wide threshold by default**, resolving
47
- * `Logger.getLevel()` through {@link glspLogLevelOf} on every read — so
46
+ * **It tracks the framework's thresholds by default**, resolving them
47
+ * through {@link glspLogLevelOf} on every read — so
48
48
  * `HYDRANIUM_LOG_LEVEL`, the LSP log-level setting and the Theia preference
49
49
  * all reach GLSP output without a second knob. Assigning the field (or
50
50
  * passing `logLevel`) pins an explicit per-instance NARROWING; see
@@ -79,9 +79,16 @@ export class GlspClientLogger extends LspLogger {
79
79
  super(services, options);
80
80
  this.logLevelOverride = options.logLevel;
81
81
  }
82
- /** GLSP's `Logger.logLevel` contract; the framework threshold unless pinned. */
82
+ /**
83
+ * GLSP's `Logger.logLevel` contract; unless pinned, the more verbose of
84
+ * `Logger.getLevel()` and `Logger.getFileLevel()`. The process threshold
85
+ * alone drops GLSP lines a log file with its own threshold asks for.
86
+ */
83
87
  get logLevel() {
84
- return this.logLevelOverride ?? glspLogLevelOf(Logger.getLevel());
88
+ const level = Logger.getLevel();
89
+ const fileLevel = Logger.getFileLevel();
90
+ const widest = fileLevel && LEVEL_ORDER[fileLevel] > LEVEL_ORDER[level] ? fileLevel : level;
91
+ return this.logLevelOverride ?? glspLogLevelOf(widest);
85
92
  }
86
93
  set logLevel(level) {
87
94
  this.logLevelOverride = level;
@@ -122,10 +129,10 @@ export class GlspClientLogger extends LspLogger {
122
129
  combine(message, params) {
123
130
  return params.length === 0 ? message : `${message} ${params.map(p => this.formatParam(p)).join(',\n')}`;
124
131
  }
125
- /** Format a single param: errors → `message\nstack`; everything else → JSON.stringify(p, undefined, 4). */
132
+ /** Format a single param: errors → their stack and causes; everything else → JSON.stringify(p, undefined, 4). */
126
133
  formatParam(param) {
127
134
  if (param instanceof Error) {
128
- return `${param.message}\n${param.stack ?? ''}`;
135
+ return describeErrorWithStack(param);
129
136
  }
130
137
  try {
131
138
  return JSON.stringify(param, undefined, 4);
@@ -1 +1 @@
1
- {"version":3,"file":"glsp-client-logger.js","sourceRoot":"","sources":["../../src/logging/glsp-client-logger.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAA6B,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAoD,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAqB,MAAM,qBAAqB,CAAC;AAsBhE;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,SAAuB;IACnD,QAAQ,SAAS,EAAE,CAAC;QACjB,KAAK,KAAK;YACP,OAAO,QAAQ,CAAC,IAAI,CAAC;QACxB,KAAK,OAAO;YACT,OAAO,QAAQ,CAAC,KAAK,CAAC;QACzB,KAAK,MAAM;YACR,OAAO,QAAQ,CAAC,IAAI,CAAC;QACxB,KAAK,MAAM;YACR,OAAO,QAAQ,CAAC,IAAI,CAAC;QACxB,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACT,OAAO,QAAQ,CAAC,KAAK,CAAC;IAC5B,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;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ACtF,CAAC;CACH"}
@@ -9,11 +9,16 @@
9
9
  /**
10
10
  * Every user-facing message `@hydranium/glsp-server` raises.
11
11
  *
12
- * Enumeration only: GLSP's action protocol carries no slot for a message
13
- * identity on any of its notification actions, so a diagram error reaches the
14
- * client as English by upstream constraint. The declarations still earn their
15
- * place — an adopter rendering their own diagram chrome can key on the code, and
16
- * the barrel is how they discover the codes exist.
12
+ * **Each one is rendered AT ITS RAISE SITE**, through the shared
13
+ * `MessageRenderer`, because GLSP's action protocol carries no slot for an
14
+ * identity on any of its actions — so the identity is gone the moment a raise
15
+ * site formats its text, and there is nothing at the error boundary to render
16
+ * from. That makes this head the one place where a new message can ship
17
+ * unrendered without any single chokepoint noticing, which is why the package's
18
+ * own test suite scans for a declaration reached by `.format()` instead.
19
+ *
20
+ * The barrel is also how an adopter rendering their own diagram chrome
21
+ * discovers the codes exist.
17
22
  */
18
- export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
23
+ export { DIAGRAM_READONLY_PARSE_ERROR, DIAGRAM_SESSION_REFUSED, SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
19
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACpB,MAAM,sCAAsC,CAAC"}
@@ -9,11 +9,16 @@
9
9
  /**
10
10
  * Every user-facing message `@hydranium/glsp-server` raises.
11
11
  *
12
- * Enumeration only: GLSP's action protocol carries no slot for a message
13
- * identity on any of its notification actions, so a diagram error reaches the
14
- * client as English by upstream constraint. The declarations still earn their
15
- * place — an adopter rendering their own diagram chrome can key on the code, and
16
- * the barrel is how they discover the codes exist.
12
+ * **Each one is rendered AT ITS RAISE SITE**, through the shared
13
+ * `MessageRenderer`, because GLSP's action protocol carries no slot for an
14
+ * identity on any of its actions — so the identity is gone the moment a raise
15
+ * site formats its text, and there is nothing at the error boundary to render
16
+ * from. That makes this head the one place where a new message can ship
17
+ * unrendered without any single chokepoint noticing, which is why the package's
18
+ * own test suite scans for a declaration reached by `.format()` instead.
19
+ *
20
+ * The barrel is also how an adopter rendering their own diagram chrome
21
+ * discovers the codes exist.
17
22
  */
18
- export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
23
+ export { DIAGRAM_READONLY_PARSE_ERROR, DIAGRAM_SESSION_REFUSED, SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
19
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACpB,MAAM,sCAAsC,CAAC"}