@hydranium/glsp-server 1.0.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/lib/browser/index.d.ts +10 -0
  4. package/lib/browser/index.d.ts.map +1 -0
  5. package/lib/browser/index.js +15 -0
  6. package/lib/browser/index.js.map +1 -0
  7. package/lib/browser/start-glsp-server-in-worker.d.ts +121 -0
  8. package/lib/browser/start-glsp-server-in-worker.d.ts.map +1 -0
  9. package/lib/browser/start-glsp-server-in-worker.js +102 -0
  10. package/lib/browser/start-glsp-server-in-worker.js.map +1 -0
  11. package/lib/command/hydranium-glsp-recording-command.d.ts +132 -0
  12. package/lib/command/hydranium-glsp-recording-command.d.ts.map +1 -0
  13. package/lib/command/hydranium-glsp-recording-command.js +159 -0
  14. package/lib/command/hydranium-glsp-recording-command.js.map +1 -0
  15. package/lib/command/index.d.ts +10 -0
  16. package/lib/command/index.d.ts.map +1 -0
  17. package/lib/command/index.js +10 -0
  18. package/lib/command/index.js.map +1 -0
  19. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.d.ts +61 -0
  20. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.d.ts.map +1 -0
  21. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.js +93 -0
  22. package/lib/computed-bounds/hydranium-glsp-computed-bounds-action-handler.js.map +1 -0
  23. package/lib/computed-bounds/index.d.ts +10 -0
  24. package/lib/computed-bounds/index.d.ts.map +1 -0
  25. package/lib/computed-bounds/index.js +10 -0
  26. package/lib/computed-bounds/index.js.map +1 -0
  27. package/lib/dispatcher/index.d.ts +10 -0
  28. package/lib/dispatcher/index.d.ts.map +1 -0
  29. package/lib/dispatcher/index.js +10 -0
  30. package/lib/dispatcher/index.js.map +1 -0
  31. package/lib/dispatcher/server-action-dispatcher.d.ts +52 -0
  32. package/lib/dispatcher/server-action-dispatcher.d.ts.map +1 -0
  33. package/lib/dispatcher/server-action-dispatcher.js +79 -0
  34. package/lib/dispatcher/server-action-dispatcher.js.map +1 -0
  35. package/lib/index.d.ts +19 -0
  36. package/lib/index.d.ts.map +1 -0
  37. package/lib/index.js +20 -0
  38. package/lib/index.js.map +1 -0
  39. package/lib/launcher/abstract-hydranium-glsp-diagram-module.d.ts +75 -0
  40. package/lib/launcher/abstract-hydranium-glsp-diagram-module.d.ts.map +1 -0
  41. package/lib/launcher/abstract-hydranium-glsp-diagram-module.js +100 -0
  42. package/lib/launcher/abstract-hydranium-glsp-diagram-module.js.map +1 -0
  43. package/lib/launcher/glsp-app-module.d.ts +87 -0
  44. package/lib/launcher/glsp-app-module.d.ts.map +1 -0
  45. package/lib/launcher/glsp-app-module.js +71 -0
  46. package/lib/launcher/glsp-app-module.js.map +1 -0
  47. package/lib/launcher/glsp-framework-overrides.d.ts +32 -0
  48. package/lib/launcher/glsp-framework-overrides.d.ts.map +1 -0
  49. package/lib/launcher/glsp-framework-overrides.js +49 -0
  50. package/lib/launcher/glsp-framework-overrides.js.map +1 -0
  51. package/lib/launcher/glsp-server-overrides.d.ts +39 -0
  52. package/lib/launcher/glsp-server-overrides.d.ts.map +1 -0
  53. package/lib/launcher/glsp-server-overrides.js +45 -0
  54. package/lib/launcher/glsp-server-overrides.js.map +1 -0
  55. package/lib/launcher/hydranium-glsp-server.d.ts +62 -0
  56. package/lib/launcher/hydranium-glsp-server.d.ts.map +1 -0
  57. package/lib/launcher/hydranium-glsp-server.js +101 -0
  58. package/lib/launcher/hydranium-glsp-server.js.map +1 -0
  59. package/lib/launcher/index.d.ts +12 -0
  60. package/lib/launcher/index.d.ts.map +1 -0
  61. package/lib/launcher/index.js +22 -0
  62. package/lib/launcher/index.js.map +1 -0
  63. package/lib/logging/glsp-client-logger.d.ts +110 -0
  64. package/lib/logging/glsp-client-logger.d.ts.map +1 -0
  65. package/lib/logging/glsp-client-logger.js +151 -0
  66. package/lib/logging/glsp-client-logger.js.map +1 -0
  67. package/lib/logging/index.d.ts +10 -0
  68. package/lib/logging/index.d.ts.map +1 -0
  69. package/lib/logging/index.js +10 -0
  70. package/lib/logging/index.js.map +1 -0
  71. package/lib/node/index.d.ts +10 -0
  72. package/lib/node/index.d.ts.map +1 -0
  73. package/lib/node/index.js +13 -0
  74. package/lib/node/index.js.map +1 -0
  75. package/lib/node/start-glsp-server.d.ts +122 -0
  76. package/lib/node/start-glsp-server.d.ts.map +1 -0
  77. package/lib/node/start-glsp-server.js +103 -0
  78. package/lib/node/start-glsp-server.js.map +1 -0
  79. package/lib/state/abstract-hydranium-glsp-state.d.ts +333 -0
  80. package/lib/state/abstract-hydranium-glsp-state.d.ts.map +1 -0
  81. package/lib/state/abstract-hydranium-glsp-state.js +451 -0
  82. package/lib/state/abstract-hydranium-glsp-state.js.map +1 -0
  83. package/lib/state/full-text-hydranium-glsp-state.d.ts +43 -0
  84. package/lib/state/full-text-hydranium-glsp-state.d.ts.map +1 -0
  85. package/lib/state/full-text-hydranium-glsp-state.js +60 -0
  86. package/lib/state/full-text-hydranium-glsp-state.js.map +1 -0
  87. package/lib/state/hydranium-glsp-index.d.ts +220 -0
  88. package/lib/state/hydranium-glsp-index.d.ts.map +1 -0
  89. package/lib/state/hydranium-glsp-index.js +320 -0
  90. package/lib/state/hydranium-glsp-index.js.map +1 -0
  91. package/lib/state/hydranium-shared-core-services.d.ts +90 -0
  92. package/lib/state/hydranium-shared-core-services.d.ts.map +1 -0
  93. package/lib/state/hydranium-shared-core-services.js +89 -0
  94. package/lib/state/hydranium-shared-core-services.js.map +1 -0
  95. package/lib/state/index.d.ts +17 -0
  96. package/lib/state/index.d.ts.map +1 -0
  97. package/lib/state/index.js +17 -0
  98. package/lib/state/index.js.map +1 -0
  99. package/lib/state/model-ready-timeout-error.d.ts +28 -0
  100. package/lib/state/model-ready-timeout-error.d.ts.map +1 -0
  101. package/lib/state/model-ready-timeout-error.js +36 -0
  102. package/lib/state/model-ready-timeout-error.js.map +1 -0
  103. package/lib/state/reconcile-source-model-write.d.ts +43 -0
  104. package/lib/state/reconcile-source-model-write.d.ts.map +1 -0
  105. package/lib/state/reconcile-source-model-write.js +47 -0
  106. package/lib/state/reconcile-source-model-write.js.map +1 -0
  107. package/lib/state/reconciling-multi-document-glsp-state.d.ts +164 -0
  108. package/lib/state/reconciling-multi-document-glsp-state.d.ts.map +1 -0
  109. package/lib/state/reconciling-multi-document-glsp-state.js +222 -0
  110. package/lib/state/reconciling-multi-document-glsp-state.js.map +1 -0
  111. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts +91 -0
  112. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts.map +1 -0
  113. package/lib/state/reconciling-transfer-hydranium-glsp-state.js +129 -0
  114. package/lib/state/reconciling-transfer-hydranium-glsp-state.js.map +1 -0
  115. package/lib/storage/hydranium-glsp-storage.d.ts +348 -0
  116. package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -0
  117. package/lib/storage/hydranium-glsp-storage.js +634 -0
  118. package/lib/storage/hydranium-glsp-storage.js.map +1 -0
  119. package/lib/storage/index.d.ts +11 -0
  120. package/lib/storage/index.d.ts.map +1 -0
  121. package/lib/storage/index.js +11 -0
  122. package/lib/storage/index.js.map +1 -0
  123. package/lib/storage/save-conflict-policy.d.ts +56 -0
  124. package/lib/storage/save-conflict-policy.d.ts.map +1 -0
  125. package/lib/storage/save-conflict-policy.js +19 -0
  126. package/lib/storage/save-conflict-policy.js.map +1 -0
  127. package/lib/submission/hydranium-glsp-submission-handler.d.ts +109 -0
  128. package/lib/submission/hydranium-glsp-submission-handler.d.ts.map +1 -0
  129. package/lib/submission/hydranium-glsp-submission-handler.js +157 -0
  130. package/lib/submission/hydranium-glsp-submission-handler.js.map +1 -0
  131. package/lib/submission/index.d.ts +10 -0
  132. package/lib/submission/index.d.ts.map +1 -0
  133. package/lib/submission/index.js +10 -0
  134. package/lib/submission/index.js.map +1 -0
  135. package/lib/testing/glsp-harness.d.ts +170 -0
  136. package/lib/testing/glsp-harness.d.ts.map +1 -0
  137. package/lib/testing/glsp-harness.js +231 -0
  138. package/lib/testing/glsp-harness.js.map +1 -0
  139. package/lib/testing/index.d.ts +11 -0
  140. package/lib/testing/index.d.ts.map +1 -0
  141. package/lib/testing/index.js +13 -0
  142. package/lib/testing/index.js.map +1 -0
  143. package/lib/testing/make-noop-glsp-logger.d.ts +42 -0
  144. package/lib/testing/make-noop-glsp-logger.d.ts.map +1 -0
  145. package/lib/testing/make-noop-glsp-logger.js +47 -0
  146. package/lib/testing/make-noop-glsp-logger.js.map +1 -0
  147. package/lib/util/index.d.ts +10 -0
  148. package/lib/util/index.d.ts.map +1 -0
  149. package/lib/util/index.js +10 -0
  150. package/lib/util/index.js.map +1 -0
  151. package/lib/util/service-identifier.d.ts +46 -0
  152. package/lib/util/service-identifier.d.ts.map +1 -0
  153. package/lib/util/service-identifier.js +47 -0
  154. package/lib/util/service-identifier.js.map +1 -0
  155. package/lib/validation/diagnostic-markers.d.ts +48 -0
  156. package/lib/validation/diagnostic-markers.d.ts.map +1 -0
  157. package/lib/validation/diagnostic-markers.js +68 -0
  158. package/lib/validation/diagnostic-markers.js.map +1 -0
  159. package/lib/validation/hydranium-glsp-model-validator.d.ts +51 -0
  160. package/lib/validation/hydranium-glsp-model-validator.d.ts.map +1 -0
  161. package/lib/validation/hydranium-glsp-model-validator.js +118 -0
  162. package/lib/validation/hydranium-glsp-model-validator.js.map +1 -0
  163. package/lib/validation/index.d.ts +11 -0
  164. package/lib/validation/index.d.ts.map +1 -0
  165. package/lib/validation/index.js +11 -0
  166. package/lib/validation/index.js.map +1 -0
  167. package/package.json +111 -0
  168. package/src/browser/index.ts +15 -0
  169. package/src/browser/start-glsp-server-in-worker.ts +202 -0
  170. package/src/command/hydranium-glsp-recording-command.ts +183 -0
  171. package/src/command/index.ts +10 -0
  172. package/src/computed-bounds/hydranium-glsp-computed-bounds-action-handler.ts +103 -0
  173. package/src/computed-bounds/index.ts +10 -0
  174. package/src/dispatcher/index.ts +10 -0
  175. package/src/dispatcher/server-action-dispatcher.ts +72 -0
  176. package/src/index.ts +20 -0
  177. package/src/launcher/abstract-hydranium-glsp-diagram-module.ts +117 -0
  178. package/src/launcher/glsp-app-module.ts +106 -0
  179. package/src/launcher/glsp-framework-overrides.ts +51 -0
  180. package/src/launcher/glsp-server-overrides.ts +46 -0
  181. package/src/launcher/hydranium-glsp-server.ts +104 -0
  182. package/src/launcher/index.ts +22 -0
  183. package/src/logging/glsp-client-logger.ts +184 -0
  184. package/src/logging/index.ts +10 -0
  185. package/src/node/index.ts +13 -0
  186. package/src/node/start-glsp-server.ts +214 -0
  187. package/src/state/abstract-hydranium-glsp-state.ts +503 -0
  188. package/src/state/full-text-hydranium-glsp-state.ts +63 -0
  189. package/src/state/hydranium-glsp-index.ts +337 -0
  190. package/src/state/hydranium-shared-core-services.ts +92 -0
  191. package/src/state/index.ts +17 -0
  192. package/src/state/model-ready-timeout-error.ts +33 -0
  193. package/src/state/reconcile-source-model-write.ts +77 -0
  194. package/src/state/reconciling-multi-document-glsp-state.ts +248 -0
  195. package/src/state/reconciling-transfer-hydranium-glsp-state.ts +132 -0
  196. package/src/storage/hydranium-glsp-storage.ts +660 -0
  197. package/src/storage/index.ts +11 -0
  198. package/src/storage/save-conflict-policy.ts +52 -0
  199. package/src/submission/hydranium-glsp-submission-handler.ts +170 -0
  200. package/src/submission/index.ts +10 -0
  201. package/src/testing/glsp-harness.ts +422 -0
  202. package/src/testing/index.ts +14 -0
  203. package/src/testing/make-noop-glsp-logger.ts +66 -0
  204. package/src/util/index.ts +10 -0
  205. package/src/util/service-identifier.ts +49 -0
  206. package/src/validation/diagnostic-markers.ts +93 -0
  207. package/src/validation/hydranium-glsp-model-validator.ts +105 -0
  208. package/src/validation/index.ts +11 -0
@@ -0,0 +1,103 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023-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 { SocketServerLauncher, createAppModule, defaultSocketLaunchOptions } from '@eclipse-glsp/server/node.js';
10
+ import { Container } from 'inversify';
11
+ import { Deferred } from '@hydranium/langium';
12
+ import { createGlspFrameworkOverrides } from '../launcher/glsp-framework-overrides.js';
13
+ import { createGlspServerOverrides } from '../launcher/glsp-server-overrides.js';
14
+ /**
15
+ * Start a GLSP socket head. Builds the GLSP app container with framework-
16
+ * default `Logger` / `LoggerFactory` bindings, layers adopter modules,
17
+ * resolves {@link SocketServerLauncher}, configures the adopter
18
+ * {@link ServerModule}, and starts listening.
19
+ *
20
+ * **GLSP launcher coupling.** GLSP's {@link SocketServerLauncher} owns the
21
+ * `net.Server` and per-connection `MessageConnection` construction;
22
+ * the framework wrapper composes ABOVE that launcher rather than replacing
23
+ * it. The framework's own `startSocketServer`
24
+ * helper is NOT used here — it's designed for stdio/raw-JSON-RPC heads
25
+ * (data-server's pattern), not GLSP's Inversify-driven per-connection
26
+ * server-instance model. Bridging the two would lose GLSP's action-handler
27
+ * registry plumbing.
28
+ */
29
+ export function startGlspServer(options) {
30
+ const launchOptions = {
31
+ ...defaultSocketLaunchOptions,
32
+ host: options.host ?? '127.0.0.1',
33
+ port: options.port ?? 0
34
+ };
35
+ const lifecycle = options.logger;
36
+ // Start from GLSP's own app module rather than re-deriving its bindings by
37
+ // hand. createAppModule binds InjectionContainer + Logger/LoggerFactory and
38
+ // — crucially — whatever else the resolved GLSP version's app container needs,
39
+ // so the framework tracks GLSP across versions instead of drifting. consoleLog /
40
+ // fileLog are forced off so GLSP binds a throwaway NullLogger with no winston
41
+ // instance; the override module below replaces Logger/LoggerFactory with the
42
+ // adopter's logger, so GLSP server logs flow through options.createLogger.
43
+ const glspAppModule = createAppModule({ ...launchOptions, consoleLog: false, fileLog: false });
44
+ const appContainer = new Container();
45
+ appContainer.load(glspAppModule, createGlspFrameworkOverrides(options.createLogger), ...(options.appModules ?? []));
46
+ const launcher = appContainer.resolve(SocketServerLauncher);
47
+ // Passed as an additional module rather than folded into the app container:
48
+ // the launcher loads these into the per-connection SERVER container, which is
49
+ // the only tier where the adopter's `ServerModule` binding of `GLSPServer`
50
+ // can be rebound.
51
+ launcher.configure(options.serverModule, createGlspServerOverrides());
52
+ const started = new Deferred();
53
+ const portHandle = { port: undefined };
54
+ try {
55
+ const stoppedPromise = Promise.resolve(launcher.start(launchOptions));
56
+ // GLSP's `SocketServerLauncher.netServer` field is `protected`; we
57
+ // access it via property indexing. The alternative is to fork the
58
+ // launcher or add a 'listening' callback to GLSP upstream.
59
+ const netServer = launcher.netServer;
60
+ netServer.on('listening', () => {
61
+ const address = netServer.address();
62
+ if (address && typeof address !== 'string') {
63
+ portHandle.port = address.port;
64
+ if (options.lspConnection && options.portCommand) {
65
+ options.lspConnection.onRequest(options.portCommand, () => portHandle.port);
66
+ }
67
+ lifecycle?.info(`[GlspServer] Ready to accept new client requests on port: ${address.port}`);
68
+ started.resolve();
69
+ }
70
+ else {
71
+ const message = address === null ? 'address is null' : `bound to non-TCP "${String(address)}"`;
72
+ lifecycle?.error(`[GlspServer] Could not resolve address info — ${message}. Shutting down.`);
73
+ started.reject(new Error(`startGlspServer could not resolve address info — ${message}`));
74
+ netServer.close();
75
+ }
76
+ });
77
+ netServer.on('error', (err) => {
78
+ lifecycle?.error(`[GlspServer] Error: ${err.message}`);
79
+ started.reject(err);
80
+ });
81
+ if (options.onClientConnection) {
82
+ netServer.on('connection', options.onClientConnection);
83
+ }
84
+ return {
85
+ get port() {
86
+ return portHandle.port;
87
+ },
88
+ started: started.promise,
89
+ stopped: stoppedPromise
90
+ };
91
+ }
92
+ catch (error) {
93
+ lifecycle?.error('Error in GLSP server launcher:', error);
94
+ return {
95
+ get port() {
96
+ return portHandle.port;
97
+ },
98
+ started: Promise.reject(error),
99
+ stopped: Promise.resolve()
100
+ };
101
+ }
102
+ }
103
+ //# sourceMappingURL=start-glsp-server.js.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,OAAO,EAAE,CAAC,CAAC,CAAC;gBACzF,SAAS,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;YAClC,SAAS,EAAE,KAAK,CAAC,uBAAuB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YACvD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAC9B,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO;YACJ,IAAI,IAAI;gBACL,OAAO,UAAU,CAAC,IAAI,CAAC;YAC1B,CAAC;YACD,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,cAAc;SACzB,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACd,SAAS,EAAE,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO;YACJ,IAAI,IAAI;gBACL,OAAO,UAAU,CAAC,IAAI,CAAC;YAC1B,CAAC;YACD,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;YAC9B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;SAC5B,CAAC;IACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,333 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023-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 { DefaultModelState, type MaybePromise } from '@eclipse-glsp/server';
10
+ import { Emitter, type Event } from 'vscode-jsonrpc';
11
+ import { type AstNode, DocumentState } from '@hydranium/langium';
12
+ import { type HydraniumScopeProvider, type LanguageTarget, type NameProvider, type ReferenceCandidateProvider, type ServerLanguageServices, type ServerSharedServices } from '@hydranium/core';
13
+ import type { ConflictResolver, Logger, Tracer } from '@hydranium/protocol';
14
+ import { type HydraniumGlspIndex } from './hydranium-glsp-index.js';
15
+ import { ModelReadyTimeoutError } from './model-ready-timeout-error.js';
16
+ /**
17
+ * GLSP model state base shared by all hydranium adopters. Tracks the source
18
+ * AST root + URI alongside GLSP's GModel, exposes a build-state wait with
19
+ * timeout-and-race semantics, and wires a logger labelled with the adopter's
20
+ * component name + current document URI.
21
+ *
22
+ * **Source-root vs GLSP's `sourceUri`.** GLSP's {@link DefaultModelState}
23
+ * stores `sourceUri` via the loosely-typed properties map
24
+ * (`state.set(SOURCE_URI_ARG, uri)`). This base class makes the URI a
25
+ * first-class typed field set through {@link setSourceRoot}, then mirrors
26
+ * the value into the inherited properties map so legacy code paths that
27
+ * still call `state.get(SOURCE_URI_ARG)` continue to work. The inherited
28
+ * `sourceUri` getter is overridden to a narrowed `string` return (no
29
+ * `undefined` once {@link setSourceRoot} has run).
30
+ *
31
+ * **Hooks.**
32
+ * - {@link onReadyRefreshed} — runs after {@link ready} returns. Default
33
+ * calls {@link refreshSourceRoot} so callers see a fresh AST after a
34
+ * wait that may have rebuilt the document. Adopters whose AST is
35
+ * immutable between build phases can override to a no-op.
36
+ * - {@link buildReadyTimeoutError} — constructs the timeout error with the
37
+ * workspace-relative path + the document builder's build-status snapshot;
38
+ * override only to change the error shape (richer per-adopter output comes
39
+ * from overriding `wsRelativePath` / `formatBuildStatus`).
40
+ * - logging — see {@link baseTracer}. Adopters wanting a different label
41
+ * override `setSourceRoot` and derive via
42
+ * `this.baseTracer.for('Name').withUri(uri)`.
43
+ *
44
+ * **Lifecycle ordering.** Reading {@link sourceUri} or {@link sourceRoot}
45
+ * before the first {@link setSourceRoot} call throws via the
46
+ * definite-assignment assertions — callers must invoke `setSourceRoot`
47
+ * (typically from the storage `loadSourceModel` flow) before reading them.
48
+ * The {@link logger}/{@link tracer} are the exception: the injected
49
+ * {@link baseTracer} is always available, so the getters fall back to it
50
+ * before {@link setSourceRoot} derives the URI-tagged {@link _tracer} —
51
+ * logging is never `undefined`.
52
+ */
53
+ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode, TSourceModel = string> extends DefaultModelState {
54
+ protected readonly sharedServices: ServerSharedServices;
55
+ /**
56
+ * Conflict-resolution policy consulted when a write races a foreign edit
57
+ * (forward-write, undo, redo, save). Bound by
58
+ * `HydraniumGlspAppModule` to the adopter's choice — default
59
+ * `ReconcilingConflictResolver` (field-level merge) unless the adopter
60
+ * passes a `ForceConflictResolver` (last-writer-wins). Read by
61
+ * `HydraniumGlspRecordingCommand`'s undo / redo and by adopter
62
+ * `updateSourceModel` implementations.
63
+ */
64
+ readonly conflictResolver: ConflictResolver;
65
+ /**
66
+ * Per-class tracer, caller-tagged with this state's runtime subclass name by
67
+ * the `HydraniumTypes.Tracer` binding. {@link setSourceRoot} derives the
68
+ * URI-tagged {@link _tracer} from it; the {@link tracer}/{@link logger}
69
+ * getters fall back to it before then, so logging is never `undefined`.
70
+ */
71
+ protected readonly baseTracer: Tracer;
72
+ /** Narrows {@link DefaultModelState.index} to the framework-extended index type. */
73
+ readonly index: HydraniumGlspIndex;
74
+ protected _sourceUri: string;
75
+ protected _sourceRoot: TRoot;
76
+ protected _tracer?: Tracer;
77
+ protected _version: number;
78
+ /** Based-on versions of the secondary write set, keyed by URI. See {@link trackSecondaryDocument}. */
79
+ protected readonly _secondaryVersions: Map<string, number>;
80
+ /** Backing emitter for {@link onSecondaryUrisChanged}; fired only on a membership change. */
81
+ protected readonly secondaryUrisChangedEmitter: Emitter<void>;
82
+ /** Default of one minute. */
83
+ static readonly DEFAULT_READY_TIMEOUT_MS = 60000;
84
+ /** Maximum wait inside {@link readyWithTimeout} before raising {@link ModelReadyTimeoutError}. */
85
+ protected readyTimeoutMs: number;
86
+ /**
87
+ * Capture a freshly built source root alongside its URI, refresh the
88
+ * logger to label log lines with the URI, and re-index the AST so
89
+ * downstream GModel projection can resolve elements back to nodes.
90
+ *
91
+ * Also mirrors `uri` into the inherited properties map under
92
+ * {@link SOURCE_URI_ARG} so legacy GLSP code paths (`state.get(...)`)
93
+ * stay consistent with the typed field.
94
+ */
95
+ setSourceRoot(uri: string, root: TRoot): void;
96
+ /**
97
+ * Typed override of {@link DefaultModelState.sourceUri}. Narrows the
98
+ * inherited `string | undefined` to `string` (defined after
99
+ * {@link setSourceRoot}; throws on definite-assignment otherwise).
100
+ */
101
+ get sourceUri(): string;
102
+ get sourceRoot(): TRoot;
103
+ /**
104
+ * The language services of the grammar this DIAGRAM TYPE edits, as declared
105
+ * by `AbstractHydraniumGlspDiagramModule.declareLanguage`.
106
+ *
107
+ * **Named for what it is, not for "the language".** Reach for it only when
108
+ * the thing you are asking about lives in the diagram document itself.
109
+ * Anything reached *through* a reference is decided by its own document: use
110
+ * {@link languageServicesFor}. Making that choice explicit at the call site
111
+ * is the point; a neutral-looking `languageServices` invites the diagram's
112
+ * grammar to be applied to a foreign node, which is the defect this whole
113
+ * seam exists to prevent.
114
+ *
115
+ * Injected rather than derived from {@link sourceUri} so it is available
116
+ * before the first {@link setSourceRoot} — GLSP constructs operation
117
+ * handlers at `InitializeClientSession`, well before `RequestModelAction`.
118
+ * `@optional()` so a harness that binds no diagram module still resolves;
119
+ * `undefined` then means no diagram module declared a grammar.
120
+ */
121
+ readonly diagramLanguage?: ServerLanguageServices;
122
+ /**
123
+ * The language services owning `target` — an AST node (routed by its
124
+ * document), a URI, or a URI string — falling back to
125
+ * {@link diagramLanguage} when `target` routes nowhere.
126
+ *
127
+ * Use this wherever the thing being named, keyed or completed may live in
128
+ * another document than the diagram. Two registered languages are free to
129
+ * differ in `nameProperties` / `nameSeparator` and in their element-key
130
+ * strategy, so applying the diagram's provider to a foreign node yields a
131
+ * plausible-looking string that matches nothing — silently, with no
132
+ * diagnostic. The fallback covers the genuinely unroutable case, a synthetic
133
+ * node not yet attached to a document, where the diagram's own language is
134
+ * the only defensible answer.
135
+ */
136
+ languageServicesFor(target: LanguageTarget | undefined): ServerLanguageServices | undefined;
137
+ /**
138
+ * The `NameProvider` of the language owning `target` — the shorthand for
139
+ * `languageServicesFor(target)?.references.NameProvider`.
140
+ *
141
+ * The shorthands exist because the long form names `target` twice and
142
+ * threads an optional through a four-link chain, which is enough friction
143
+ * that the tempting alternative is a captured provider — the defect this
144
+ * seam exists to prevent. Keeping the correct call the SHORT one is the
145
+ * point. They stay provider-level rather than operation-level so they
146
+ * compose with every provider method and the state does not grow a naming
147
+ * API of its own.
148
+ */
149
+ nameProviderFor(target: LanguageTarget | undefined): NameProvider | undefined;
150
+ /** The `ScopeProvider` of the language owning `target`. See {@link nameProviderFor}. */
151
+ scopeProviderFor(target: LanguageTarget | undefined): HydraniumScopeProvider | undefined;
152
+ /** The `ReferenceCandidateProvider` of the language owning `target`. See {@link nameProviderFor}. */
153
+ candidateProviderFor(target: LanguageTarget | undefined): ReferenceCandidateProvider | undefined;
154
+ /**
155
+ * Warn when the loaded document does not route to the grammar this diagram
156
+ * module declared.
157
+ *
158
+ * The declared language is the one fact the module states that the grammar
159
+ * itself does not, so it is the one that can drift — a diagram type pointed
160
+ * at the wrong `LanguageMetaData`, or a file extension reassigned. Both
161
+ * would otherwise surface much later as references resolving against the
162
+ * wrong scope. Only a warning, not a throw: the document is loaded and
163
+ * usable either way, and a hard failure here would take out a diagram over
164
+ * a mismatch that may be intentional in an adopter serving one diagram type
165
+ * over several grammars.
166
+ */
167
+ protected checkDeclaredLanguage(uri: string): void;
168
+ /** The observability handle as a plain {@link Logger} (a {@link Tracer} is-a Logger). */
169
+ get logger(): Logger;
170
+ /** URI-tagged once {@link setSourceRoot} has run; the class-tagged injected {@link baseTracer} before that. */
171
+ get tracer(): Tracer;
172
+ /**
173
+ * Text-document version captured at the last {@link setSourceRoot}
174
+ * call. Mirrors the server-side `TextDocuments.version(uri)` counter
175
+ * at that point in time — frozen until the next `setSourceRoot`, then
176
+ * re-read from `LangiumDocuments`.
177
+ *
178
+ * Threaded by `HydraniumGlspRecordingCommand` into
179
+ * {@link updateSourceModel}'s optional `version` parameter so the
180
+ * downstream `ModelService.update` / `.save` call can opt into the
181
+ * conflict gate against the captured based-on version. See
182
+ * `@hydranium/protocol#ConflictError` for the detection contract.
183
+ *
184
+ * Falls back to `0` when the document is absent from `LangiumDocuments`
185
+ * at capture time — the same observable state callers see for a doc
186
+ * that was never opened. Callers that need to distinguish
187
+ * "never-versioned" from "v0" must consult the document registry
188
+ * directly.
189
+ */
190
+ get version(): number;
191
+ /**
192
+ * Register `uri` as a document this state also writes, capturing its current
193
+ * text-document version.
194
+ *
195
+ * A diagram whose layout lives in its own file, or whose canvas creates
196
+ * elements in a referenced semantic document, writes more than the document
197
+ * it was opened on. The primary (`sourceUri`) stays the one that drives
198
+ * GModel projection and the conflict gate; secondaries are the rest of the
199
+ * write set.
200
+ *
201
+ * Registering is the adopter's call because the set is usually discovered
202
+ * rather than known: the semantic document a node belongs to is only
203
+ * identified once the operation names the node. What the framework supplies
204
+ * is the part an adopter cannot reconstruct after the fact — the version each
205
+ * document was at BEFORE the command mutated anything (see
206
+ * {@link capturedVersionOf}). Idempotent; registering the primary is ignored,
207
+ * since {@link version} already tracks it. Registering a URI not already in
208
+ * the set fires {@link onSecondaryUrisChanged}.
209
+ */
210
+ trackSecondaryDocument(uri: string): void;
211
+ /**
212
+ * Drop every registered secondary. Call when the write set is rebuilt from
213
+ * scratch. Fires {@link onSecondaryUrisChanged} when the set was non-empty.
214
+ */
215
+ untrackSecondaryDocuments(): void;
216
+ /**
217
+ * Fires whenever the secondary write set gains or loses a URI — never when a
218
+ * tracked document's captured version is merely refreshed, which happens on
219
+ * every {@link setSourceRoot} and changes nothing a subscriber cares about.
220
+ *
221
+ * **This exists so no caller has to know when the set can change.** The set is
222
+ * usually discovered rather than known, and the discovery point is an
223
+ * operation handler naming a node — not a capture. A subscriber that instead
224
+ * re-derived the set after each capture would miss exactly that case, and miss
225
+ * it silently: the document would simply never be watched, with nothing logged.
226
+ * Announcing the change here moves the obligation to the one place that can
227
+ * always discharge it.
228
+ *
229
+ * The set is the one {@link trackSecondaryDocument} /
230
+ * {@link untrackSecondaryDocuments} maintain. A subclass that writes
231
+ * {@link _secondaryVersions} directly bypasses the notification and owns the
232
+ * consequences.
233
+ */
234
+ get onSecondaryUrisChanged(): Event<void>;
235
+ /** Registered secondary document URIs, in registration order. */
236
+ get secondaryUris(): readonly string[];
237
+ /**
238
+ * Based-on version captured for `uri` — {@link version} for the primary, the
239
+ * value captured at {@link trackSecondaryDocument} (refreshed by
240
+ * {@link setSourceRoot}) for a secondary, `undefined` for anything untracked.
241
+ *
242
+ * `undefined` rather than `0` for an untracked URI deliberately: `0` is a real
243
+ * version meaning "present but never edited", so collapsing the two would let
244
+ * a caller gate a write against a document it never captured.
245
+ */
246
+ capturedVersionOf(uri: string): number | undefined;
247
+ /**
248
+ * Read a document's current text-document version through the model service's
249
+ * canonicalizing gateway, so a URI spelled through a symlink still resolves to
250
+ * the document keyed by its real path rather than stranding at `0` (which
251
+ * would silently weaken the conflict gate). Optional-chained on `textDocument`
252
+ * so a fixture that omits it does not throw; real Langium documents always
253
+ * populate it.
254
+ */
255
+ protected readDocumentVersion(uri: string): number;
256
+ /** Re-read every registered secondary's version from the document store. */
257
+ protected refreshSecondaryVersions(): void;
258
+ /**
259
+ * Re-capture the source root from the current Langium document,
260
+ * replacing any orphaned root. A rebuild between an earlier
261
+ * {@link setSourceRoot} and the current read can swap the AST out
262
+ * from under us; downstream consumers (GModel factories, action
263
+ * handlers) must see the root the freshly built document carries.
264
+ */
265
+ protected refreshSourceRoot(): void;
266
+ /**
267
+ * Wait until the captured document reaches `state`, then run
268
+ * {@link onReadyRefreshed} so consumers see a fresh AST. Wraps the
269
+ * wait in {@link Tracer.time} for observability.
270
+ */
271
+ ready(state: DocumentState): Promise<void>;
272
+ /**
273
+ * Race `ModelService.waitForDocumentState` against
274
+ * {@link readyTimeoutMs}. If the timeout fires but the document has
275
+ * already reached `state` silently (Langium build-phase event race),
276
+ * log a warning and resolve; otherwise raise
277
+ * {@link ModelReadyTimeoutError} via {@link buildReadyTimeoutError}.
278
+ */
279
+ protected readyWithTimeout(state: DocumentState): Promise<void>;
280
+ /**
281
+ * Hook for post-{@link ready} work. Default refreshes the captured
282
+ * source root via {@link refreshSourceRoot} so submission handlers and
283
+ * GModel factories see the AST the now-ready document carries.
284
+ * Adopters whose AST is immutable between build phases override to a
285
+ * no-op.
286
+ */
287
+ protected onReadyRefreshed(): Promise<void>;
288
+ /**
289
+ * Build the {@link ModelReadyTimeoutError} thrown by
290
+ * {@link readyWithTimeout}. Reports the workspace-relative path plus the
291
+ * document builder's current build-status snapshot, both via framework
292
+ * methods — so adopters that override `WorkspaceManager.wsRelativePath` /
293
+ * `DocumentBuilder.formatBuildStatus` for richer output get it here without
294
+ * touching this method. Override only to change the error shape itself.
295
+ */
296
+ protected buildReadyTimeoutError(state: DocumentState, elapsed: number): ModelReadyTimeoutError;
297
+ /**
298
+ * Persist a new source-model representation back to the document store
299
+ * after an interactive edit. Adopters wire this against their
300
+ * language-services facade. The `HydraniumGlspRecordingCommand` calls
301
+ * it from its `postChange` hook to commit the edited AST back to the
302
+ * document store.
303
+ *
304
+ * Adopters whose source model is a structured transfer projection
305
+ * round-tripped through `ModelService` should extend
306
+ * `ReconcilingTransferHydraniumGlspState` instead of implementing this
307
+ * directly — it ships a concrete forward-write reconcile template
308
+ * (persist + conflict resolve) over overridable `persist` / `refetch`
309
+ * hooks. This base stays abstract for whole-document-text and read-only
310
+ * adopters.
311
+ *
312
+ * Abstract rather than no-op so adopters that mean to be editable cannot
313
+ * silently lose edits — read-only adopters can throw with a clear message,
314
+ * but the decision is explicit.
315
+ *
316
+ * The read side of the source-model contract (a `sourceModel` getter) is
317
+ * NOT lifted onto the framework state — adopters that consume the
318
+ * recording-command pattern declare `implements JsonModelState<TSourceModel>`
319
+ * themselves so the framework state stays slim. Both halves of the GLSP
320
+ * `JsonModelState` shape meet the framework state via structural
321
+ * intersection at the recording-command call site.
322
+ *
323
+ * `version` is the based-on text-document version captured at command
324
+ * start by `HydraniumGlspRecordingCommand.execute`. Adopters that
325
+ * route through `ModelService.update` / `.save` pass it as the args'
326
+ * `version` field to opt into the conflict gate; adopters that don't
327
+ * care (or whose write path doesn't go through `ModelService`) ignore
328
+ * the parameter. Undefined when the writer is not the recording-command
329
+ * (e.g. external storage refresh paths).
330
+ */
331
+ abstract updateSourceModel(model: TSourceModel, version?: number): MaybePromise<void>;
332
+ }
333
+ //# sourceMappingURL=abstract-hydranium-glsp-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract-hydranium-glsp-state.d.ts","sourceRoot":"","sources":["../../src/state/abstract-hydranium-glsp-state.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAkB,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,KAAK,OAAO,EAAE,aAAa,EAAO,MAAM,oBAAoB,CAAC;AACtE,OAAO,EACJ,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,8BACsB,0BAA0B,CAAC,KAAK,SAAS,OAAO,EAAE,YAAY,GAAG,MAAM,CAAE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