@hydranium/glsp-server 1.0.0-next.14 → 1.0.0-next.140

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 (100) hide show
  1. package/README.md +20 -5
  2. package/lib/browser/start-glsp-server-in-worker.d.ts +30 -39
  3. package/lib/browser/start-glsp-server-in-worker.d.ts.map +1 -1
  4. package/lib/browser/start-glsp-server-in-worker.js +43 -8
  5. package/lib/browser/start-glsp-server-in-worker.js.map +1 -1
  6. package/lib/command/hydranium-glsp-command-stack.d.ts +27 -0
  7. package/lib/command/hydranium-glsp-command-stack.d.ts.map +1 -0
  8. package/lib/command/hydranium-glsp-command-stack.js +53 -0
  9. package/lib/command/hydranium-glsp-command-stack.js.map +1 -0
  10. package/lib/command/hydranium-glsp-recording-command.d.ts +22 -22
  11. package/lib/command/hydranium-glsp-recording-command.d.ts.map +1 -1
  12. package/lib/command/hydranium-glsp-recording-command.js +25 -26
  13. package/lib/command/hydranium-glsp-recording-command.js.map +1 -1
  14. package/lib/command/index.d.ts +1 -0
  15. package/lib/command/index.d.ts.map +1 -1
  16. package/lib/command/index.js +1 -0
  17. package/lib/command/index.js.map +1 -1
  18. package/lib/launcher/abstract-hydranium-glsp-diagram-module.d.ts +12 -3
  19. package/lib/launcher/abstract-hydranium-glsp-diagram-module.d.ts.map +1 -1
  20. package/lib/launcher/abstract-hydranium-glsp-diagram-module.js +18 -2
  21. package/lib/launcher/abstract-hydranium-glsp-diagram-module.js.map +1 -1
  22. package/lib/launcher/hydranium-glsp-server.d.ts +10 -6
  23. package/lib/launcher/hydranium-glsp-server.d.ts.map +1 -1
  24. package/lib/launcher/hydranium-glsp-server.js +16 -6
  25. package/lib/launcher/hydranium-glsp-server.js.map +1 -1
  26. package/lib/messages/index.d.ts +24 -0
  27. package/lib/messages/index.d.ts.map +1 -0
  28. package/lib/messages/index.js +24 -0
  29. package/lib/messages/index.js.map +1 -0
  30. package/lib/node/start-glsp-server.d.ts +1 -1
  31. package/lib/node/start-glsp-server.d.ts.map +1 -1
  32. package/lib/node/start-glsp-server.js +2 -2
  33. package/lib/node/start-glsp-server.js.map +1 -1
  34. package/lib/state/abstract-hydranium-glsp-state.d.ts +110 -43
  35. package/lib/state/abstract-hydranium-glsp-state.d.ts.map +1 -1
  36. package/lib/state/abstract-hydranium-glsp-state.js +139 -60
  37. package/lib/state/abstract-hydranium-glsp-state.js.map +1 -1
  38. package/lib/state/full-text-hydranium-glsp-state.d.ts +6 -6
  39. package/lib/state/full-text-hydranium-glsp-state.d.ts.map +1 -1
  40. package/lib/state/full-text-hydranium-glsp-state.js +6 -10
  41. package/lib/state/full-text-hydranium-glsp-state.js.map +1 -1
  42. package/lib/state/reconcile-source-model-write.d.ts +9 -8
  43. package/lib/state/reconcile-source-model-write.d.ts.map +1 -1
  44. package/lib/state/reconcile-source-model-write.js +8 -8
  45. package/lib/state/reconcile-source-model-write.js.map +1 -1
  46. package/lib/state/reconciling-multi-document-glsp-state.d.ts +59 -59
  47. package/lib/state/reconciling-multi-document-glsp-state.d.ts.map +1 -1
  48. package/lib/state/reconciling-multi-document-glsp-state.js +84 -82
  49. package/lib/state/reconciling-multi-document-glsp-state.js.map +1 -1
  50. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts +19 -18
  51. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts.map +1 -1
  52. package/lib/state/reconciling-transfer-hydranium-glsp-state.js +26 -30
  53. package/lib/state/reconciling-transfer-hydranium-glsp-state.js.map +1 -1
  54. package/lib/storage/hydranium-glsp-request-save-model-action-handler.d.ts +30 -0
  55. package/lib/storage/hydranium-glsp-request-save-model-action-handler.d.ts.map +1 -0
  56. package/lib/storage/hydranium-glsp-request-save-model-action-handler.js +47 -0
  57. package/lib/storage/hydranium-glsp-request-save-model-action-handler.js.map +1 -0
  58. package/lib/storage/hydranium-glsp-storage.d.ts +313 -86
  59. package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -1
  60. package/lib/storage/hydranium-glsp-storage.js +456 -104
  61. package/lib/storage/hydranium-glsp-storage.js.map +1 -1
  62. package/lib/storage/index.d.ts +2 -1
  63. package/lib/storage/index.d.ts.map +1 -1
  64. package/lib/storage/index.js +2 -1
  65. package/lib/storage/index.js.map +1 -1
  66. package/lib/storage/save-delivery-policy.d.ts +46 -0
  67. package/lib/storage/save-delivery-policy.d.ts.map +1 -0
  68. package/lib/storage/{save-conflict-policy.js → save-delivery-policy.js} +7 -8
  69. package/lib/storage/save-delivery-policy.js.map +1 -0
  70. package/lib/validation/diagnostic-markers.d.ts +2 -2
  71. package/lib/validation/diagnostic-markers.d.ts.map +1 -1
  72. package/lib/validation/diagnostic-markers.js +7 -0
  73. package/lib/validation/diagnostic-markers.js.map +1 -1
  74. package/lib/validation/hydranium-glsp-model-validator.d.ts.map +1 -1
  75. package/lib/validation/hydranium-glsp-model-validator.js +1 -1
  76. package/lib/validation/hydranium-glsp-model-validator.js.map +1 -1
  77. package/package.json +17 -8
  78. package/src/browser/start-glsp-server-in-worker.ts +41 -44
  79. package/src/command/hydranium-glsp-command-stack.ts +36 -0
  80. package/src/command/hydranium-glsp-recording-command.ts +26 -26
  81. package/src/command/index.ts +1 -0
  82. package/src/launcher/abstract-hydranium-glsp-diagram-module.ts +27 -3
  83. package/src/launcher/hydranium-glsp-server.ts +16 -6
  84. package/src/messages/index.ts +30 -0
  85. package/src/node/start-glsp-server.ts +2 -3
  86. package/src/state/abstract-hydranium-glsp-state.ts +174 -73
  87. package/src/state/full-text-hydranium-glsp-state.ts +7 -11
  88. package/src/state/reconcile-source-model-write.ts +18 -15
  89. package/src/state/reconciling-multi-document-glsp-state.ts +86 -83
  90. package/src/state/reconciling-transfer-hydranium-glsp-state.ts +27 -31
  91. package/src/storage/hydranium-glsp-request-save-model-action-handler.ts +40 -0
  92. package/src/storage/hydranium-glsp-storage.ts +520 -113
  93. package/src/storage/index.ts +2 -1
  94. package/src/storage/save-delivery-policy.ts +44 -0
  95. package/src/validation/diagnostic-markers.ts +10 -3
  96. package/src/validation/hydranium-glsp-model-validator.ts +3 -3
  97. package/lib/storage/save-conflict-policy.d.ts +0 -56
  98. package/lib/storage/save-conflict-policy.d.ts.map +0 -1
  99. package/lib/storage/save-conflict-policy.js.map +0 -1
  100. package/src/storage/save-conflict-policy.ts +0 -52
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-storage.js","sourceRoot":"","sources":["../../src/storage/hydranium-glsp-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;;;;AAElF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAEJ,gBAAgB,EAGhB,oBAAoB,EACpB,YAAY,EAGZ,QAAQ,EACR,eAAe,EACf,MAAM,IAAI,UAAU,EAEpB,UAAU,EACV,sBAAsB,EACtB,cAAc,EAEd,cAAc,EAEd,iBAAiB,EAEjB,mBAAmB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAExE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAuF,MAAM,iBAAiB,CAAC;AACnI,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE7F,wFAAwF;AACxF,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAE/C;;;;;GAKG;AACH,SAAS,sBAAsB,CAAC,UAAmB;IAChD,IAAI,OAAO,UAAU,KAAK,QAAQ,I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License-Identifier: MIT
8
8
  ********************************************************************************/
9
+ export * from './hydranium-glsp-request-save-model-action-handler.js';
9
10
  export * from './hydranium-glsp-storage.js';
10
- export * from './save-conflict-policy.js';
11
+ export * from './save-delivery-policy.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,uDAAuD,CAAC;AACtE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -6,6 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
+ export * from './hydranium-glsp-request-save-model-action-handler.js';
9
10
  export * from './hydranium-glsp-storage.js';
10
- export * from './save-conflict-policy.js';
11
+ export * from './save-delivery-policy.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,uDAAuD,CAAC;AACtE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,46 @@
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
+ * How `HydraniumGlspStorage.saveSourceModel` delivers its result: whether the
11
+ * GLSP save action awaits the write, and what happens on failure.
12
+ *
13
+ * The two are not independent — fire-and-forget plus rethrow would leave an
14
+ * unhandled rejection — so each arm bundles them into one coherent, nameable
15
+ * policy an adopter selects whole. It is a *selection of configuration*,
16
+ * delivered as a bound option (see the {@link SaveDeliveryPolicy} symbol) rather
17
+ * than a behaviour hook.
18
+ *
19
+ * **Neither arm guards on a based-on version.** A save flushes the store's
20
+ * settled text rather than authoring from the diagram's captured model, and the
21
+ * store already holds every other client's change — so a guard here refuses a
22
+ * write whose content is already correct. The gate that does exist sits on the
23
+ * update path, per operation, where the diagram authors.
24
+ */
25
+ export type SaveDeliveryPolicy =
26
+ /** Await the write and propagate any failure to the GLSP save action. The default. */
27
+ {
28
+ kind: 'await';
29
+ }
30
+ /**
31
+ * Fire-and-forget, logging and swallowing every failure. Correct when a
32
+ * failed diagram save must neither block the action nor surface as an error.
33
+ */
34
+ | {
35
+ kind: 'fire-and-forget';
36
+ };
37
+ /** The policy applied when no {@link SaveDeliveryPolicy} option is bound. */
38
+ export declare const DEFAULT_SAVE_DELIVERY_POLICY: SaveDeliveryPolicy;
39
+ /**
40
+ * DI token for the {@link SaveDeliveryPolicy} option. Bind a constant value in a
41
+ * `DiagramModule` to select a non-default policy; left unbound,
42
+ * `HydraniumGlspStorage` falls back to {@link DEFAULT_SAVE_DELIVERY_POLICY}.
43
+ * Shares its name with the type, the way a `class` is both a value and a type.
44
+ */
45
+ export declare const SaveDeliveryPolicy: unique symbol;
46
+ //# sourceMappingURL=save-delivery-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-delivery-policy.d.ts","sourceRoot":"","sources":["../../src/storage/save-delivery-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,kBAAkB;AAC3B,sFAAsF;AACpF;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;AACnB;;;GAGG;GACD;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAEjC,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,EAAE,kBAAsC,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,eAA+B,CAAC"}
@@ -6,14 +6,13 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- /** The policy applied when no {@link SaveConflictPolicy} option is bound. */
10
- export const DEFAULT_SAVE_CONFLICT_POLICY = { kind: 'overwrite' };
9
+ /** The policy applied when no {@link SaveDeliveryPolicy} option is bound. */
10
+ export const DEFAULT_SAVE_DELIVERY_POLICY = { kind: 'await' };
11
11
  /**
12
- * DI token for the {@link SaveConflictPolicy} option. Bind a constant value in a
12
+ * DI token for the {@link SaveDeliveryPolicy} option. Bind a constant value in a
13
13
  * `DiagramModule` to select a non-default policy; left unbound,
14
- * `HydraniumGlspStorage` falls back to
15
- * {@link DEFAULT_SAVE_CONFLICT_POLICY}. Shares its name with the type, the way a
16
- * `class` is both a value and a type.
14
+ * `HydraniumGlspStorage` falls back to {@link DEFAULT_SAVE_DELIVERY_POLICY}.
15
+ * Shares its name with the type, the way a `class` is both a value and a type.
17
16
  */
18
- export const SaveConflictPolicy = Symbol('SaveConflictPolicy');
19
- //# sourceMappingURL=save-conflict-policy.js.map
17
+ export const SaveDeliveryPolicy = Symbol('SaveDeliveryPolicy');
18
+ //# sourceMappingURL=save-delivery-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-delivery-policy.js","sourceRoot":"","sources":["../../src/storage/save-delivery-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AA2BlF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,4BAA4B,GAAuB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAElF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC"}
@@ -8,7 +8,7 @@
8
8
  ********************************************************************************/
9
9
  import { type Marker } from '@eclipse-glsp/protocol';
10
10
  import { type AstNode } from '@hydranium/langium';
11
- import { type TransferLspDiagnostic } from '@hydranium/core';
11
+ import { type AstDiagnostic } from '@hydranium/core';
12
12
  /**
13
13
  * The model-shaped lookups the diagnostic→marker translation needs, injected so
14
14
  * the pure mapping can be unit-tested without GLSP/Langium DI. The validator
@@ -44,5 +44,5 @@ export interface DiagnosticMarkerLookups {
44
44
  * `MarkersReason` so a fresh `SetMarkersAction` replaces the previous markers
45
45
  * (an empty result clears them when all errors are fixed).
46
46
  */
47
- export declare function diagnosticsToMarkers(diagnostics: readonly TransferLspDiagnostic[], lookups: DiagnosticMarkerLookups): Marker[];
47
+ export declare function diagnosticsToMarkers(diagnostics: readonly AstDiagnostic[], lookups: DiagnosticMarkerLookups): Marker[];
48
48
  //# sourceMappingURL=diagnostic-markers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostic-markers.d.ts","sourceRoot":"","sources":["../../src/validation/diagnostic-markers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACrC;;;;OAIG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACzD;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,qBAAqB,EAAE,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,EAAE,CAW9H"}
1
+ {"version":3,"file":"diagnostic-markers.d.ts","sourceRoot":"","sources":["../../src/validation/diagnostic-markers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACrC;;;;OAIG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACzD;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAC;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,EAAE,CAWtH"}
@@ -40,8 +40,15 @@ export function diagnosticsToMarkers(diagnostics, lookups) {
40
40
  * The ids of the elements drawn on this diagram for the diagnostic's target,
41
41
  * starting at the node it points at and walking up its containers; empty when
42
42
  * the path does not resolve or nothing on the chain is rendered.
43
+ *
44
+ * @param elementPath absent for a lexer or parser error, which Langium pushes
45
+ * onto the document without one — such a diagnostic points at text no node
46
+ * was built from, so it marks nothing.
43
47
  */
44
48
  function renderedElementIds(elementPath, lookups) {
49
+ if (elementPath === undefined) {
50
+ return [];
51
+ }
45
52
  let node = lookups.resolveElement(elementPath);
46
53
  while (node !== undefined) {
47
54
  const ids = lookups.renderedIdsFor(node);
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostic-markers.js","sourceRoot":"","sources":["../../src/validation/diagnostic-markers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE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,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClB,OAAO,GAAG,CAAC;QACd,CAAC;QACD,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,CAAC;AACb,CAAC;AAED,iHAAiH;AACjH,SAAS,UAAU,CAAC,QAAwC;IACzD,QAAQ,QAAQ,EAAE,CAAC;QAChB,KAAK,kBAAkB,CAAC,OAAO;YAC5B,OAAO,UAAU,CAAC,OAAO,CAAC;QAC7B,KAAK,kBAAkB,CAAC,WAAW,CAAC;QACpC,KAAK,kBAAkB,CAAC,IAAI;YACzB,OAAO,UAAU,CAAC,IAAI,CAAC;QAC1B,KAAK,kBAAkB,CAAC,KAAK,CAAC;QAC9B;YACG,OAAO,UAAU,CAAC,KAAK,CAAC;IAC9B,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-model-validator.d.ts","sourceRoot":"","sources":["../../src/validation/hydranium-glsp-model-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,aAAa,EAAc,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3F,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,KAAK,oBAAoB,EAA8B,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAI5F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,2BAA2B,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,CAAE,YAAW,cAAc;IACrD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAG,oBAAoB,CAAC;IAChF,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAEtF,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;IAIhE;;;;;OAKG;IACH,OAAO,IAAI,MAAM,EAAE;CA6CrB"}
1
+ {"version":3,"file":"hydranium-glsp-model-validator.d.ts","sourceRoot":"","sources":["../../src/validation/hydranium-glsp-model-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,aAAa,EAAc,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3F,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,KAAK,oBAAoB,EAAsB,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAI5F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,2BAA2B,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,CAAE,YAAW,cAAc;IACrD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAG,oBAAoB,CAAC;IAChF,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAEtF,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;IAIhE;;;;;OAKG;IACH,OAAO,IAAI,MAAM,EAAE;CA6CrB"}
@@ -75,7 +75,7 @@ let HydraniumGlspModelValidator = class HydraniumGlspModelValidator {
75
75
  continue;
76
76
  }
77
77
  // Diagnostics are produced by the framework's `HydraniumDocumentValidator`,
78
- // which emits `TransferLspDiagnostic` (LSP `Diagnostic` + `element` path).
78
+ // which emits `AstDiagnostic` (LSP `Diagnostic` + `element` path).
79
79
  // Parser/lexer diagnostics carry no `element`; the lookup drops them.
80
80
  const diagnostics = document.diagnostics;
81
81
  if (!diagnostics || diagnostics.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-model-validator.js","sourceRoot":"","sources":["../../src/validation/hydranium-glsp-model-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;;;;AAGlF,OAAO,EAAsB,UAAU,EAAuB,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGzC,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAgC,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACyB,cAAc,CAAwB;IAC7D,UAAU,CAAqC;IAEtF,QAAQ,CAAC,SAA0B,EAAE,OAAgB;QAClD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,OAAO;QACJ,mEAAmE;QACnE,0EAA0E;QAC1E,wEAAwE;QACxE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACb,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,uEAAuE;QACvE,qEAAqE;QACrE,cAAc;QACd,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,oBAAoB,EAAE,EAAE,CAAC;YAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC,GA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AAG,oBAAoB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,OAAO,CAAC;IAClB,CAAC;CACH,CAAA;AA1DgE;IAA7D,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC;;mEAA0D;AAC7D;IAAtC,MAAM,CAAC,UAAU,CAAC;;+DAAmE;AAF5E,2BAA2B;IADvC,UAAU,EAAE;GACA,2BAA2B,CA2DvC"}
1
+ {"version":3,"file":"hydranium-glsp-model-validator.js","sourceRoot":"","sources":["../../src/validation/hydranium-glsp-model-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;;;;AAGlF,OAAO,EAAsB,UAAU,EAAuB,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGzC,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAgC,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACyB,cAAc,CAAwB;IAC7D,UAAU,CAAqC;IAEtF,QAAQ,CAAC,SAA0B,EAAE,OAAgB;QAClD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,OAAO;QACJ,mEAAmE;QACnE,0EAA0E;QAC1E,wEAAwE;QACxE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACb,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACpC,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,uEAAuE;QACvE,qEAAqE;QACrE,cAAc;QACd,KAAK,MAAM,GAAG,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E,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC,CAAC;gBACrE,CAAC;aACH,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,GAAG,oBAAoB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,OAAO,CAAC;IAClB,CAAC;CACH,CAAA;AA1DgE;IAA7D,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC;;mEAA0D;AAC7D;IAAtC,MAAM,CAAC,UAAU,CAAC;;+DAAmE;AAF5E,2BAA2B;IADvC,UAAU,EAAE;GACA,2BAA2B,CA2DvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydranium/glsp-server",
3
- "version": "1.0.0-next.14",
3
+ "version": "1.0.0-next.140",
4
4
  "description": "GLSP protocol head for the hydranium framework. Peer of @hydranium/core/lsp and @hydranium/data-server; built on @hydranium/core.",
5
5
  "keywords": [
6
6
  "hydranium",
@@ -48,6 +48,14 @@
48
48
  "types": "./lib/node/index.d.ts",
49
49
  "default": "./lib/node/index.js"
50
50
  },
51
+ "./messages": {
52
+ "types": "./lib/messages/index.d.ts",
53
+ "default": "./lib/messages/index.js"
54
+ },
55
+ "./lib/messages": {
56
+ "types": "./lib/messages/index.d.ts",
57
+ "default": "./lib/messages/index.js"
58
+ },
51
59
  "./testing": {
52
60
  "types": "./lib/testing/index.d.ts",
53
61
  "default": "./lib/testing/index.js"
@@ -79,9 +87,9 @@
79
87
  "devDependencies": {
80
88
  "@eclipse-glsp/protocol": "2.7.0",
81
89
  "@eclipse-glsp/server": "2.7.0",
82
- "@hydranium/core": "1.0.0-next.14",
83
- "@hydranium/langium": "1.0.0-next.14",
84
- "@hydranium/protocol": "1.0.0-next.14",
90
+ "@hydranium/core": "1.0.0-next.140",
91
+ "@hydranium/langium": "1.0.0-next.140",
92
+ "@hydranium/protocol": "1.0.0-next.140",
85
93
  "inversify": "6.2.2",
86
94
  "reflect-metadata": "0.2.2",
87
95
  "rimraf": "^5.0.0",
@@ -92,12 +100,12 @@
92
100
  "peerDependencies": {
93
101
  "@eclipse-glsp/protocol": "^2.6.0",
94
102
  "@eclipse-glsp/server": "^2.6.0",
95
- "@hydranium/core": "1.0.0-next.14",
96
- "@hydranium/langium": "1.0.0-next.14",
97
- "@hydranium/protocol": "1.0.0-next.14",
103
+ "@hydranium/core": "1.0.0-next.140",
104
+ "@hydranium/langium": "1.0.0-next.140",
105
+ "@hydranium/protocol": "1.0.0-next.140",
98
106
  "inversify": "^6.0.0",
99
107
  "reflect-metadata": "^0.2.2",
100
- "vscode-jsonrpc": "^8.0.0 || ^9.0.0",
108
+ "vscode-jsonrpc": "9.0.1",
101
109
  "vscode-languageserver-types": "^3.17.5"
102
110
  },
103
111
  "engines": {
@@ -106,6 +114,7 @@
106
114
  "publishConfig": {
107
115
  "access": "public"
108
116
  },
117
+ "//peerDependencies": "`vscode-jsonrpc` is EXACT rather than a range, because it is one link of an atomic chain with no independently movable link: `vscode-languageserver-protocol` depends on it at exactly 9.0.1, so any other value an adopter supplies is a SECOND physical copy rather than an upgrade. This wire stack breaks on copy identity rather than on structure — `ParameterStructures.auto` is a singleton compared by `===` in connection.js, so a request type built by one copy and sent over a connection owned by the other throws `Unknown parameter structure auto`. A caret or union range was rejected because npm then resolves a `vscode-jsonrpc@8.2.0` tree SILENTLY, with no diagnostic at all, and the failure surfaces only later at server init. Exact does not fail the install either — npm downgrades an unsatisfiable peer to a warning — but it is a NAMED ERESOLVE warning printing the required version beside the found one, and a hard error for anyone installing with `--strict-peer-deps`. **This is the head where it is not enough**: `@eclipse-glsp/*` carries its own exact `vscode-jsonrpc@8.2.0` dependency and root `overrides` do not ship, so a first install of this package ALWAYS lands two copies and the adopter must pin the chain in their own manifest. docs/adopting/requirements.md carries the block to paste.",
109
118
  "//prepack": "The publish guard, and it deliberately is NOT a `prepare`: npm runs a workspace `prepare` BEFORE the root `postinstall` that applies patches/vscode-jsonrpc+9.0.1.patch, so building there fails on a cold clone and npm rolls the entire install back. `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. It FAILS rather than rebuilds, because the rebuild is exactly the part that ordering defeats. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error.",
110
119
  "//sideEffects": "The harness bare-imports `reflect-metadata`, which installs a global `Reflect` polyfill the inversify decorators in this package need before any container is built. That effect is invisible from the module's exports, so a bundler that treats the file as pure may reorder or drop the import and every `@injectable` resolution then fails at runtime. The rest of the package constructs no module-level state beyond frozen constants and DI symbols."
111
120
  }
@@ -14,43 +14,38 @@ import {
14
14
  WorkerServerLauncher,
15
15
  createAppModule
16
16
  } from '@eclipse-glsp/server/browser.js';
17
- import { Container, type ContainerModule } from 'inversify';
18
- import type { Logger } from '@hydranium/protocol';
17
+ import { Container, injectable, type ContainerModule } from 'inversify';
18
+ import { createMessagePortTransport, type Logger, type TransferredMessagePort } from '@hydranium/protocol';
19
+ import { createMessageConnection, type MessageConnection } from 'vscode-jsonrpc/browser';
19
20
  import type { IntegratedServer } from '@hydranium/core';
20
21
  import { createGlspFrameworkOverrides } from '../launcher/glsp-framework-overrides.js';
21
22
  import { createGlspServerOverrides } from '../launcher/glsp-server-overrides.js';
22
23
 
24
+ // Re-exported so the type of this head's `context` still resolves from here.
25
+ export type { TransferredMessagePort } from '@hydranium/protocol';
26
+
23
27
  /**
24
- * A `MessagePort` the host transferred into the worker, described structurally.
25
- *
26
- * This package inherits `tsconfig.base.json`'s `lib: ["ES2022"]` and so compiles
27
- * without the DOM lib, which is what keeps `document` / `window` compile errors
28
- * here — so `MessagePort` has no name either and the contract has to be spelled
29
- * out.
30
- *
31
- * **The member set is chosen to admit a `MessagePort` and REJECT a `Worker` or
32
- * the worker global**, both of which the launcher's own reader would otherwise
33
- * accept. Only a port needs starting, so `start` is what tells the three apart,
34
- * and naming it here turns "never bind a head to the global" from a rule in a
35
- * document into a compile error at the call site.
28
+ * The worker launcher every {@link startGlspServerInWorker} head runs on: GLSP's
29
+ * own, with its connection built over `createMessagePortTransport` rather than
30
+ * over `BrowserMessageReader`/`BrowserMessageWriter`, which never report a
31
+ * close. So the client disposing its connection closes this one, and upstream
32
+ * disposes the server instance, and with it every client session, as it does
33
+ * when a socket closes.
36
34
  *
37
- * **That compile error happens at the ADOPTER, not here.** This project resolves
38
- * neither `MessagePort` nor `Worker` as a type, so nothing in this package can
39
- * demonstrate the rejection; a host compiling its worker against `lib.webworker`
40
- * (or a page against `lib.dom`) is where the names resolve and the guard bites.
41
- * Measured there: passing the worker global fails with `Property 'start' is
42
- * missing in type 'DedicatedWorkerGlobalScope'`.
35
+ * Requires `context`: unlike upstream it never falls back to the worker global.
43
36
  *
44
- * `addEventListener` is not a discriminator — `postMessage` plus `start` already
45
- * excludes the other two — and nothing in this module calls any of the three
46
- * (the reader assigns `onmessage`, which starts a port implicitly). It is listed
47
- * because it is part of what the reader uses, so the interface reads as the
48
- * contract rather than as a minimal trick.
37
+ * **The install needs a single `vscode-jsonrpc`.** The connection comes from
38
+ * this package's copy, and GLSP's request and notification types from the copy
39
+ * `@eclipse-glsp/protocol` resolves. With two copies, a typed notification or
40
+ * request GLSP sends throws `Unknown parameter structure auto`, because the
41
+ * connection compares the type's parameter-structure marker by identity.
49
42
  */
50
- export interface TransferredMessagePort {
51
- postMessage(message: unknown): void;
52
- addEventListener(type: 'message', listener: (event: unknown) => void, options?: unknown): void;
53
- start(): void;
43
+ @injectable()
44
+ export class HydraniumGlspWorkerServerLauncher extends WorkerServerLauncher {
45
+ protected override createConnection(options: WorkerLaunchOptions): MessageConnection {
46
+ const transport = createMessagePortTransport(options.context as unknown as TransferredMessagePort);
47
+ return createMessageConnection(transport.reader, transport.writer);
48
+ }
54
49
  }
55
50
 
56
51
  /**
@@ -66,14 +61,15 @@ export interface BrowserGlspServerOptions {
66
61
  /**
67
62
  * The port the host transferred into the worker for this head.
68
63
  *
69
- * **Required, and that is the whole point.** GLSP's
70
- * `WorkerServerLauncher.createConnection` falls back to the worker global
71
- * when it is omitted, and a head on the global receives every other head's
72
- * traffic — `BrowserMessageReader` filters nothing, so this is not a race
73
- * under load but every message delivered to the wrong reader. The global is
74
- * unusable even for a single head, because the launcher posts its startup
75
- * string through the global `postMessage` regardless of the connection it
76
- * was given, and no JSON-RPC reader can parse that.
64
+ * **Required: the worker global is no substitute.** A head on the global
65
+ * receives every other head's traffic — a reader filters nothing, so this is
66
+ * not a race under load but every message delivered to the wrong reader — and
67
+ * GLSP's launcher posts its startup string through the global `postMessage`
68
+ * regardless of the connection it was given, which no JSON-RPC reader parses.
69
+ * Unlike upstream's, this head's launcher never falls back to the global.
70
+ *
71
+ * The page's end must connect through `createMessagePortTransport` as well:
72
+ * the head reads its close signal from the port, and posts one on it.
77
73
  */
78
74
  readonly context: TransferredMessagePort;
79
75
  /**
@@ -126,8 +122,9 @@ export interface BrowserGlspServerOptions {
126
122
  * below. There is no transport handshake to wait on: the port arrived live,
127
123
  * and the launcher's own readiness signal is a string it posts on the worker
128
124
  * global, which nothing here reads.
129
- * - `stopped` resolves when the connection closes, and rejects on a connection
130
- * error.
125
+ * - `stopped` resolves when the connection closes, which the client disposing
126
+ * its connection causes, and rejects on a connection error. Nothing reports a
127
+ * page that dies, because the port cannot.
131
128
  */
132
129
  export function startGlspServerInWorker(options: BrowserGlspServerOptions): IntegratedServer {
133
130
  const lifecycle = options.logger;
@@ -145,7 +142,7 @@ export function startGlspServerInWorker(options: BrowserGlspServerOptions): Inte
145
142
  const appContainer = new Container();
146
143
  appContainer.load(glspAppModule, createGlspFrameworkOverrides(options.createLogger), ...(options.appModules ?? []));
147
144
 
148
- const launcher = appContainer.resolve<WorkerServerLauncher>(WorkerServerLauncher);
145
+ const launcher = appContainer.resolve<WorkerServerLauncher>(HydraniumGlspWorkerServerLauncher);
149
146
  // Additional module rather than an app-container binding, as on Node: the
150
147
  // launcher loads these into the per-connection SERVER container, the only
151
148
  // tier where the adopter's `ServerModule` binding of `GLSPServer` is
@@ -153,10 +150,10 @@ export function startGlspServerInWorker(options: BrowserGlspServerOptions): Inte
153
150
  launcher.configure(options.serverModule, createGlspServerOverrides());
154
151
 
155
152
  try {
156
- // Upstream declares `WorkerLaunchOptions.context` as `Worker`, narrower
157
- // than the `MessagePort | Worker | DedicatedWorkerGlobalScope` its own
158
- // `BrowserMessageReader` accepts — so the value that is CORRECT here is
159
- // the one the declaration names as wrong.
153
+ // Upstream declares `WorkerLaunchOptions.context` as `Worker`, and
154
+ // `HydraniumGlspWorkerServerLauncher.createConnection` reads it as a
155
+ // port — so the value that is CORRECT here is the one the declaration
156
+ // names as wrong.
160
157
  //
161
158
  // **The cast is currently redundant, and is kept deliberately.** `Worker`
162
159
  // does not resolve under this package's `lib`, so `skipLibCheck` leaves
@@ -0,0 +1,36 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 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
+ import { DefaultCommandStack, ModelState } from '@eclipse-glsp/server';
11
+ import { type ServerSharedServices } from '@hydranium/core';
12
+ import { inject, injectable } from 'inversify';
13
+ import { HydraniumTypes } from '../state/hydranium-shared-core-services.js';
14
+
15
+ /**
16
+ * GLSP's command stack with the diagram's dirty state read from the text store:
17
+ * dirty while any document the diagram's client session has open differs from
18
+ * its file, as the store last knew the file. Undo and redo are GLSP's.
19
+ *
20
+ * GLSP's own answer counts the diagram's commands since its last save, so it
21
+ * misses every change the diagram did not make: another client's unsaved edit
22
+ * leaves it clean, and a save it did not make of a document other than the
23
+ * diagram's own leaves it dirty. Every `SetDirtyStateAction` GLSP sends reads
24
+ * this answer.
25
+ */
26
+ @injectable()
27
+ export class HydraniumGlspCommandStack extends DefaultCommandStack {
28
+ @inject(ModelState) protected readonly modelState!: ModelState;
29
+ @inject(HydraniumTypes.SharedCoreServices) protected readonly sharedServices!: ServerSharedServices;
30
+
31
+ override get isDirty(): boolean {
32
+ const textDocuments = this.sharedServices.workspace.TextDocuments;
33
+ const clientId = this.modelState.clientId;
34
+ return textDocuments.openDocuments().some(open => open.clients.includes(clientId) && textDocuments.isDirty(open.uri));
35
+ }
36
+ }
@@ -10,6 +10,7 @@
10
10
  import { type AnyObject, type JsonModelState, JsonRecordingCommand, type MaybePromise } from '@eclipse-glsp/server';
11
11
  import { type AstNode } from '@hydranium/langium';
12
12
  import { type AbstractHydraniumGlspState } from '../state/abstract-hydranium-glsp-state.js';
13
+ import { type BasedOn } from '@hydranium/protocol';
13
14
 
14
15
  /**
15
16
  * Source-model state shape consumed by {@link HydraniumGlspRecordingCommand}.
@@ -46,25 +47,25 @@ export type HydraniumGlspRecordingState<TSourceModel extends AnyObject> = Abstra
46
47
  *
47
48
  * **postChange semantics.** GLSP's `JsonRecordingCommand.postChange` calls
48
49
  * `modelState.updateSourceModel(newModel)` with the model only. The
49
- * framework lift overrides `postChange` so it also threads the based-on
50
- * version captured at command start — letting the downstream
51
- * `ModelService.update` opt into the `ConflictError` gate. Undo / redo
52
- * postChange calls run with version `undefined` (no gating): the user
53
- * authored against the recorded patch, not against a specific server
54
- * version, so re-applying it should succeed regardless of intervening
55
- * edits. The recorded patch itself encodes the semantic intent.
50
+ * framework lift overrides `postChange` so it also threads the snapshot
51
+ * version taken at command start — letting the downstream
52
+ * session `update` opt into the `ConflictError` gate. Undo / redo
53
+ * postChange calls pass `'anything'`: the user authored against the recorded
54
+ * patch, not against a specific server version, so re-applying it should
55
+ * succeed regardless of intervening edits. The recorded patch itself encodes
56
+ * the semantic intent.
56
57
  */
57
58
  export class HydraniumGlspRecordingCommand<TSourceModel extends AnyObject> extends JsonRecordingCommand<TSourceModel> {
58
59
  declare protected modelState: HydraniumGlspRecordingState<TSourceModel>;
59
60
 
60
61
  /**
61
- * Based-on version captured at {@link execute} start; threaded into
62
- * {@link postChange} so {@link AbstractHydraniumGlspState.updateSourceModel}
63
- * sees the version the user authored against. Cleared after `execute`
64
- * returns so undo / redo paths fall through to `updateSourceModel`
65
- * without a version (no gating).
62
+ * What the command was authored against, taken at {@link execute} start and
63
+ * threaded into {@link postChange} so
64
+ * {@link AbstractHydraniumGlspState.updateSourceModel} gates on it. Reset to
65
+ * `'anything'` after `execute` returns so undo / redo paths fall through
66
+ * ungated.
66
67
  */
67
- protected activeVersion?: number;
68
+ protected activeBasedOn: BasedOn = 'anything';
68
69
 
69
70
  /**
70
71
  * Source-model snapshots captured at {@link execute} — the state the
@@ -98,20 +99,19 @@ export class HydraniumGlspRecordingCommand<TSourceModel extends AnyObject> exten
98
99
  * via {@link AbstractHydraniumGlspState.updateSourceModel}). The label combines
99
100
  * the operation name with the source-uri-stamped logger.
100
101
  *
101
- * Captures {@link AbstractHydraniumGlspState.version} at start so {@link postChange}
102
- * can thread the based-on version into `updateSourceModel`. The capture
103
- * is `try`/`finally`-scoped so undo / redo paths invoked later do not
104
- * see a stale captured version.
102
+ * Takes {@link AbstractHydraniumGlspState.basedOn} at start so {@link postChange}
103
+ * can thread it into `updateSourceModel`. Scoped with `try`/`finally` so undo
104
+ * / redo paths invoked later do not see a stale value.
105
105
  */
106
106
  override async execute(): Promise<void> {
107
107
  const logger = this.modelState.logger.for('HydraniumGlspRecordingCommand');
108
- this.activeVersion = this.modelState.version;
109
- logger.debug(`Executing '${this.label}' (based-on doc.version=v${this.activeVersion})`);
108
+ this.activeBasedOn = this.modelState.basedOn;
109
+ logger.debug(`Executing '${this.label}' (based-on doc.version=v${this.modelState.version})`);
110
110
  this.beforeSnapshot = this.deepClone(await this.getJsonObject());
111
111
  try {
112
112
  await this.modelState.tracer.for('HydraniumGlspRecordingCommand').time(`Execute command '${this.label}'`, () => super.execute());
113
113
  } finally {
114
- this.activeVersion = undefined;
114
+ this.activeBasedOn = 'anything';
115
115
  }
116
116
  this.afterSnapshot = this.deepClone(await this.getJsonObject());
117
117
  }
@@ -119,15 +119,15 @@ export class HydraniumGlspRecordingCommand<TSourceModel extends AnyObject> exten
119
119
  /**
120
120
  * Override of GLSP's {@link JsonRecordingCommand.postChange} so the
121
121
  * call to {@link AbstractHydraniumGlspState.updateSourceModel} threads the
122
- * captured based-on version alongside the new model.
122
+ * based-on version alongside the new model.
123
123
  *
124
- * During {@link execute} the version is the snapshot captured at
125
- * command start; during {@link undo} / {@link redo} it is `undefined`
126
- * — replaying a recorded patch does not author against a specific
127
- * server version, so no gate applies.
124
+ * During {@link execute} it is the snapshot version taken at command start;
125
+ * during {@link undo} / {@link redo} it is `'anything'` — replaying a
126
+ * recorded patch does not author against a specific server version, so no
127
+ * gate applies.
128
128
  */
129
129
  protected override postChange(newModel: TSourceModel): MaybePromise<void> {
130
- return this.modelState.updateSourceModel(newModel, this.activeVersion);
130
+ return this.modelState.updateSourceModel(newModel, this.activeBasedOn);
131
131
  }
132
132
 
133
133
  /**
@@ -8,3 +8,4 @@
8
8
  ********************************************************************************/
9
9
 
10
10
  export * from './hydranium-glsp-recording-command.js';
11
+ export * from './hydranium-glsp-command-stack.js';