@hydranium/glsp-server 1.0.0-next.12 → 1.0.0-next.123

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 (71) hide show
  1. package/README.md +13 -2
  2. package/lib/command/hydranium-glsp-recording-command.d.ts +22 -22
  3. package/lib/command/hydranium-glsp-recording-command.d.ts.map +1 -1
  4. package/lib/command/hydranium-glsp-recording-command.js +25 -26
  5. package/lib/command/hydranium-glsp-recording-command.js.map +1 -1
  6. package/lib/launcher/hydranium-glsp-server.d.ts +4 -3
  7. package/lib/launcher/hydranium-glsp-server.d.ts.map +1 -1
  8. package/lib/launcher/hydranium-glsp-server.js +4 -3
  9. package/lib/launcher/hydranium-glsp-server.js.map +1 -1
  10. package/lib/messages/index.d.ts +24 -0
  11. package/lib/messages/index.d.ts.map +1 -0
  12. package/lib/messages/index.js +24 -0
  13. package/lib/messages/index.js.map +1 -0
  14. package/lib/node/start-glsp-server.js +1 -1
  15. package/lib/node/start-glsp-server.js.map +1 -1
  16. package/lib/state/abstract-hydranium-glsp-state.d.ts +110 -43
  17. package/lib/state/abstract-hydranium-glsp-state.d.ts.map +1 -1
  18. package/lib/state/abstract-hydranium-glsp-state.js +130 -41
  19. package/lib/state/abstract-hydranium-glsp-state.js.map +1 -1
  20. package/lib/state/full-text-hydranium-glsp-state.d.ts +6 -6
  21. package/lib/state/full-text-hydranium-glsp-state.d.ts.map +1 -1
  22. package/lib/state/full-text-hydranium-glsp-state.js +6 -10
  23. package/lib/state/full-text-hydranium-glsp-state.js.map +1 -1
  24. package/lib/state/reconcile-source-model-write.d.ts +9 -8
  25. package/lib/state/reconcile-source-model-write.d.ts.map +1 -1
  26. package/lib/state/reconcile-source-model-write.js +8 -8
  27. package/lib/state/reconcile-source-model-write.js.map +1 -1
  28. package/lib/state/reconciling-multi-document-glsp-state.d.ts +59 -59
  29. package/lib/state/reconciling-multi-document-glsp-state.d.ts.map +1 -1
  30. package/lib/state/reconciling-multi-document-glsp-state.js +84 -82
  31. package/lib/state/reconciling-multi-document-glsp-state.js.map +1 -1
  32. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts +19 -18
  33. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts.map +1 -1
  34. package/lib/state/reconciling-transfer-hydranium-glsp-state.js +26 -30
  35. package/lib/state/reconciling-transfer-hydranium-glsp-state.js.map +1 -1
  36. package/lib/storage/hydranium-glsp-storage.d.ts +271 -76
  37. package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -1
  38. package/lib/storage/hydranium-glsp-storage.js +383 -87
  39. package/lib/storage/hydranium-glsp-storage.js.map +1 -1
  40. package/lib/storage/index.d.ts +1 -1
  41. package/lib/storage/index.js +1 -1
  42. package/lib/storage/save-delivery-policy.d.ts +46 -0
  43. package/lib/storage/save-delivery-policy.d.ts.map +1 -0
  44. package/lib/storage/{save-conflict-policy.js → save-delivery-policy.js} +7 -8
  45. package/lib/storage/save-delivery-policy.js.map +1 -0
  46. package/lib/validation/diagnostic-markers.d.ts +2 -2
  47. package/lib/validation/diagnostic-markers.d.ts.map +1 -1
  48. package/lib/validation/diagnostic-markers.js +7 -0
  49. package/lib/validation/diagnostic-markers.js.map +1 -1
  50. package/lib/validation/hydranium-glsp-model-validator.d.ts.map +1 -1
  51. package/lib/validation/hydranium-glsp-model-validator.js +1 -1
  52. package/lib/validation/hydranium-glsp-model-validator.js.map +1 -1
  53. package/package.json +17 -8
  54. package/src/command/hydranium-glsp-recording-command.ts +26 -26
  55. package/src/launcher/hydranium-glsp-server.ts +4 -3
  56. package/src/messages/index.ts +30 -0
  57. package/src/node/start-glsp-server.ts +1 -1
  58. package/src/state/abstract-hydranium-glsp-state.ts +162 -51
  59. package/src/state/full-text-hydranium-glsp-state.ts +7 -11
  60. package/src/state/reconcile-source-model-write.ts +18 -15
  61. package/src/state/reconciling-multi-document-glsp-state.ts +86 -83
  62. package/src/state/reconciling-transfer-hydranium-glsp-state.ts +27 -31
  63. package/src/storage/hydranium-glsp-storage.ts +445 -97
  64. package/src/storage/index.ts +1 -1
  65. package/src/storage/save-delivery-policy.ts +44 -0
  66. package/src/validation/diagnostic-markers.ts +10 -3
  67. package/src/validation/hydranium-glsp-model-validator.ts +3 -3
  68. package/lib/storage/save-conflict-policy.d.ts +0 -56
  69. package/lib/storage/save-conflict-policy.d.ts.map +0 -1
  70. package/lib/storage/save-conflict-policy.js.map +0 -1
  71. package/src/storage/save-conflict-policy.ts +0 -52
package/README.md CHANGED
@@ -20,8 +20,8 @@ the diagram model is adopter-side, bound per diagram module.
20
20
  over the GModel.
21
21
  - **Load / save against the live AST.** `HydraniumGlspStorage` loads a document
22
22
  on diagram open and writes user operations back through the shared model
23
- coordination layer, with `SaveConflictPolicy` deciding what a concurrent
24
- external write means. `HydraniumGlspRecordingCommand` is the operation-handler
23
+ coordination layer, with `SaveDeliveryPolicy` deciding whether the save action
24
+ awaits the write. `HydraniumGlspRecordingCommand` is the operation-handler
25
25
  seam — the framework provides no base handler class.
26
26
  - **A submission and dispatch lifecycle that waits for the model.**
27
27
  `HydraniumGlspSubmissionHandler` gates submit on the readiness event,
@@ -49,6 +49,15 @@ dependency is `uuid`. You must already have a composed hydranium shared services
49
49
  tree, a grammar, and a GModel factory of your own — there is no framework GModel
50
50
  factory.
51
51
 
52
+ **This head needs one line in your own root manifest, and the install works
53
+ without it right up until the server starts.** `@eclipse-glsp/*` depends on
54
+ `vscode-jsonrpc@8.2.0` exactly, while the Langium chain under hydranium pins the
55
+ transport at `9.0.1` — the version this package declares as its peer. Two
56
+ physical copies in one process throw `Unknown parameter structure auto` during
57
+ GLSP server init, and no peer declaration can prevent a nested copy. Add an
58
+ `overrides` block collapsing the chain and reinstall from scratch;
59
+ [Requirements](../../docs/adopting/requirements.md) gives the exact block.
60
+
52
61
  ## Exports
53
62
 
54
63
  | subpath | holds | platform |
@@ -85,6 +94,8 @@ framework/adopter seams are in
85
94
  [`docs/concepts/framework-vs-adopter.md`](../../docs/concepts/framework-vs-adopter.md).
86
95
  The Theia-side client wiring lives in `@hydranium/glsp-client-theia`.
87
96
 
97
+ For the adopter path from a read-only projection to a writable diagram, see [Make a diagram editable](../../docs/guides/editable-diagram.md). It follows the per-diagram module, operation-handler, and shared-services boundaries.
98
+
88
99
  ## Status
89
100
 
90
101
  Alpha — pre-v0, not yet published. The API is not stable and may change without a
@@ -9,6 +9,7 @@
9
9
  import { type AnyObject, type JsonModelState, JsonRecordingCommand, type MaybePromise } from '@eclipse-glsp/server';
10
10
  import { type AstNode } from '@hydranium/langium';
11
11
  import { type AbstractHydraniumGlspState } from '../state/abstract-hydranium-glsp-state.js';
12
+ import { type BasedOn } from '@hydranium/protocol';
12
13
  /**
13
14
  * Source-model state shape consumed by {@link HydraniumGlspRecordingCommand}.
14
15
  * The intersection ties together GLSP's read-side
@@ -42,13 +43,13 @@ export type HydraniumGlspRecordingState<TSourceModel extends AnyObject> = Abstra
42
43
  *
43
44
  * **postChange semantics.** GLSP's `JsonRecordingCommand.postChange` calls
44
45
  * `modelState.updateSourceModel(newModel)` with the model only. The
45
- * framework lift overrides `postChange` so it also threads the based-on
46
- * version captured at command start — letting the downstream
47
- * `ModelService.update` opt into the `ConflictError` gate. Undo / redo
48
- * postChange calls run with version `undefined` (no gating): the user
49
- * authored against the recorded patch, not against a specific server
50
- * version, so re-applying it should succeed regardless of intervening
51
- * edits. The recorded patch itself encodes the semantic intent.
46
+ * framework lift overrides `postChange` so it also threads the snapshot
47
+ * version taken at command start — letting the downstream
48
+ * session `update` opt into the `ConflictError` gate. Undo / redo
49
+ * postChange calls pass `'anything'`: the user authored against the recorded
50
+ * patch, not against a specific server version, so re-applying it should
51
+ * succeed regardless of intervening edits. The recorded patch itself encodes
52
+ * the semantic intent.
52
53
  */
53
54
  export declare class HydraniumGlspRecordingCommand<TSourceModel extends AnyObject> extends JsonRecordingCommand<TSourceModel> {
54
55
  /** Human-readable label for the operation; appears in the timing-pair log line. */
@@ -60,13 +61,13 @@ export declare class HydraniumGlspRecordingCommand<TSourceModel extends AnyObjec
60
61
  protected readonly redoAction?: (() => MaybePromise<void>) | undefined;
61
62
  protected modelState: HydraniumGlspRecordingState<TSourceModel>;
62
63
  /**
63
- * Based-on version captured at {@link execute} start; threaded into
64
- * {@link postChange} so {@link AbstractHydraniumGlspState.updateSourceModel}
65
- * sees the version the user authored against. Cleared after `execute`
66
- * returns so undo / redo paths fall through to `updateSourceModel`
67
- * without a version (no gating).
64
+ * What the command was authored against, taken at {@link execute} start and
65
+ * threaded into {@link postChange} so
66
+ * {@link AbstractHydraniumGlspState.updateSourceModel} gates on it. Reset to
67
+ * `'anything'` after `execute` returns so undo / redo paths fall through
68
+ * ungated.
68
69
  */
69
- protected activeVersion?: number;
70
+ protected activeBasedOn: BasedOn;
70
71
  /**
71
72
  * Source-model snapshots captured at {@link execute} — the state the
72
73
  * command left ({@link afterSnapshot}) and the state it started from
@@ -92,21 +93,20 @@ export declare class HydraniumGlspRecordingCommand<TSourceModel extends AnyObjec
92
93
  * via {@link AbstractHydraniumGlspState.updateSourceModel}). The label combines
93
94
  * the operation name with the source-uri-stamped logger.
94
95
  *
95
- * Captures {@link AbstractHydraniumGlspState.version} at start so {@link postChange}
96
- * can thread the based-on version into `updateSourceModel`. The capture
97
- * is `try`/`finally`-scoped so undo / redo paths invoked later do not
98
- * see a stale captured version.
96
+ * Takes {@link AbstractHydraniumGlspState.basedOn} at start so {@link postChange}
97
+ * can thread it into `updateSourceModel`. Scoped with `try`/`finally` so undo
98
+ * / redo paths invoked later do not see a stale value.
99
99
  */
100
100
  execute(): Promise<void>;
101
101
  /**
102
102
  * Override of GLSP's {@link JsonRecordingCommand.postChange} so the
103
103
  * call to {@link AbstractHydraniumGlspState.updateSourceModel} threads the
104
- * captured based-on version alongside the new model.
104
+ * based-on version alongside the new model.
105
105
  *
106
- * During {@link execute} the version is the snapshot captured at
107
- * command start; during {@link undo} / {@link redo} it is `undefined`
108
- * — replaying a recorded patch does not author against a specific
109
- * server version, so no gate applies.
106
+ * During {@link execute} it is the snapshot version taken at command start;
107
+ * during {@link undo} / {@link redo} it is `'anything'` — replaying a
108
+ * recorded patch does not author against a specific server version, so no
109
+ * gate applies.
110
110
  */
111
111
  protected postChange(newModel: TSourceModel): MaybePromise<void>;
112
112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-recording-command.d.ts","sourceRoot":"","sources":["../../src/command/hydranium-glsp-recording-command.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAE5F;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,CAAC,YAAY,SAAS,SAAS,IAAI,0BAA0B,CAAC,OAAO,EAAE,YAAY,CAAC,GACxH,cAAc,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,6BAA6B,CAAC,YAAY,SAAS,SAAS,CAAE,SAAQ,oBAAoB,CAAC,YAAY,CAAC;IA0B/G,mFAAmF;IACnF,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM;IAEhC;uEACmE;IACnE,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAE,MAAM,YAAY,CAAC,IAAI,CAAC;IACxD,gEAAgE;IAChE,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAE,MAAM,YAAY,CAAC,IAAI,CAAC;IAhC3D,UAAkB,UAAU,EAAE,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAExE;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;;;OAQG;IACH,SAAS,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC;IACxC,SAAS,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;gBAGpC,UAAU,EAAE,2BAA2B,CAAC,YAAY,CAAC;IACrD,mFAAmF;IAChE,KAAK,EAAE,MAAM,EAChC,SAAS,EAAE,MAAM,YAAY,CAAC,IAAI,CAAC;IACnC;uEACmE;IAChD,UAAU,CAAC,GAAE,MAAM,YAAY,CAAC,IAAI,CAAC,aAAA;IACxD,gEAAgE;IAC7C,UAAU,CAAC,GAAE,MAAM,YAAY,CAAC,IAAI,CAAC,aAAA;IAK3D;;;;;;;;;;OAUG;IACY,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAavC;;;;;;;;;OASG;cACgB,UAAU,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC;IAIzE;;;;;;;;;;;OAWG;IACY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBpC;;;;OAIG;IACY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAgBtC"}
1
+ {"version":3,"file":"hydranium-glsp-recording-command.d.ts","sourceRoot":"","sources":["../../src/command/hydranium-glsp-recording-command.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,CAAC,YAAY,SAAS,SAAS,IAAI,0BAA0B,CAAC,OAAO,EAAE,YAAY,CAAC,GACxH,cAAc,CAAC,YAAY,CAAC,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;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GLSP's `JsonRecordingCommand.postChange` calls
31
31
  * `modelState.updateSourceModel(newModel)` with the model only. The
32
- * framework lift overrides `postChange` so it also threads the based-on
33
- * version captured at command start — letting the downstream
34
- * `ModelService.update` opt into the `ConflictError` gate. Undo / redo
35
- * postChange calls run with version `undefined` (no gating): the user
36
- * authored against the recorded patch, not against a specific server
37
- * version, so re-applying it should succeed regardless of intervening
38
- * edits. The recorded patch itself encodes the semantic intent.
32
+ * framework lift overrides `postChange` so it also threads the snapshot
33
+ * version taken at command start — letting the downstream
34
+ * session `update` opt into the `ConflictError` gate. Undo / redo
35
+ * postChange calls pass `'anything'`: the user authored against the recorded
36
+ * patch, not against a specific server version, so re-applying it should
37
+ * succeed regardless of intervening edits. The recorded patch itself encodes
38
+ * the semantic intent.
39
39
  */
40
40
  export class HydraniumGlspRecordingCommand extends JsonRecordingCommand {
41
41
  label;
42
42
  undoAction;
43
43
  redoAction;
44
44
  /**
45
- * Based-on version captured at {@link execute} start; threaded into
46
- * {@link postChange} so {@link AbstractHydraniumGlspState.updateSourceModel}
47
- * sees the version the user authored against. Cleared after `execute`
48
- * returns so undo / redo paths fall through to `updateSourceModel`
49
- * without a version (no gating).
45
+ * What the command was authored against, taken at {@link execute} start and
46
+ * threaded into {@link postChange} so
47
+ * {@link AbstractHydraniumGlspState.updateSourceModel} gates on it. Reset to
48
+ * `'anything'` after `execute` returns so undo / redo paths fall through
49
+ * ungated.
50
50
  */
51
- activeVersion;
51
+ activeBasedOn = 'anything';
52
52
  /**
53
53
  * Source-model snapshots captured at {@link execute} — the state the
54
54
  * command left ({@link afterSnapshot}) and the state it started from
@@ -79,36 +79,35 @@ export class HydraniumGlspRecordingCommand extends JsonRecordingCommand {
79
79
  * via {@link AbstractHydraniumGlspState.updateSourceModel}). The label combines
80
80
  * the operation name with the source-uri-stamped logger.
81
81
  *
82
- * Captures {@link AbstractHydraniumGlspState.version} at start so {@link postChange}
83
- * can thread the based-on version into `updateSourceModel`. The capture
84
- * is `try`/`finally`-scoped so undo / redo paths invoked later do not
85
- * see a stale captured version.
82
+ * Takes {@link AbstractHydraniumGlspState.basedOn} at start so {@link postChange}
83
+ * can thread it into `updateSourceModel`. Scoped with `try`/`finally` so undo
84
+ * / redo paths invoked later do not see a stale value.
86
85
  */
87
86
  async execute() {
88
87
  const logger = this.modelState.logger.for('HydraniumGlspRecordingCommand');
89
- this.activeVersion = this.modelState.version;
90
- logger.debug(`Executing '${this.label}' (based-on doc.version=v${this.activeVersion})`);
88
+ this.activeBasedOn = this.modelState.basedOn;
89
+ logger.debug(`Executing '${this.label}' (based-on doc.version=v${this.modelState.version})`);
91
90
  this.beforeSnapshot = this.deepClone(await this.getJsonObject());
92
91
  try {
93
92
  await this.modelState.tracer.for('HydraniumGlspRecordingCommand').time(`Execute command '${this.label}'`, () => super.execute());
94
93
  }
95
94
  finally {
96
- this.activeVersion = undefined;
95
+ this.activeBasedOn = 'anything';
97
96
  }
98
97
  this.afterSnapshot = this.deepClone(await this.getJsonObject());
99
98
  }
100
99
  /**
101
100
  * Override of GLSP's {@link JsonRecordingCommand.postChange} so the
102
101
  * call to {@link AbstractHydraniumGlspState.updateSourceModel} threads the
103
- * captured based-on version alongside the new model.
102
+ * based-on version alongside the new model.
104
103
  *
105
- * During {@link execute} the version is the snapshot captured at
106
- * command start; during {@link undo} / {@link redo} it is `undefined`
107
- * — replaying a recorded patch does not author against a specific
108
- * server version, so no gate applies.
104
+ * During {@link execute} it is the snapshot version taken at command start;
105
+ * during {@link undo} / {@link redo} it is `'anything'` — replaying a
106
+ * recorded patch does not author against a specific server version, so no
107
+ * gate applies.
109
108
  */
110
109
  postChange(newModel) {
111
- return this.modelState.updateSourceModel(newModel, this.activeVersion);
110
+ return this.modelState.updateSourceModel(newModel, this.activeBasedOn);
112
111
  }
113
112
  /**
114
113
  * Reconcile the recorded `after → before` transition against the
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-recording-command.js","sourceRoot":"","sources":["../../src/command/hydranium-glsp-recording-command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AI,CAAC,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YAC5F,OAAO;QACV,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC3E,MAAM,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,KAAK,qBAAqB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;QACnF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE,CAChH,IAAI,CAAC,aAAa,EAAE,CACtB,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,KAAK,cAAc,OAAO,CAAC,MAAM,yDAAyD,CAAC,CAAC;YACtH,OAAO;QACV,CAAC;QACD,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;CACH"}
1
+ {"version":3,"file":"hydranium-glsp-recording-command.js","sourceRoot":"","sources":["../../src/command/hydranium-glsp-recording-command.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAuC,oBAAoB,EAAqB,MAAM,sBAAsB,CAAC;AAkBpH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,6BAA8D,SAAQ,oBAAkC;IA2B5F;IAIA;IAEA;IA9BtB;;;;;;OAMG;IACO,aAAa,GAAY,UAAU,CAAC;IAE9C;;;;;;;;OAQG;IACO,cAAc,CAAgB;IAC9B,aAAa,CAAgB;IAEvC,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C,OAAO,EAAE,CAAC,CAAC;QACnF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE,CAChH,IAAI,CAAC,aAAa,EAAE,CACtB,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,KAAK,cAAc,OAAO,CAAC,MAAM,yDAAyD,CAAC,CAAC;YACtH,OAAO;QACV,CAAC;QACD,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;CACH"}
@@ -16,9 +16,10 @@ import { type ClientSession, DefaultGLSPServer, type RequestAction, type Respons
16
16
  * `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
17
17
  * and that one value feeds both the server log and the client's
18
18
  * {@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
19
+ * reaches its readers as `undefined` — the log line and the client's
20
+ * action-dispatcher warning both print it — while a plain `Error` survives,
21
+ * because the other branch reads the error itself. The typed error is the trap,
22
+ * and it is the one upstream's own
22
23
  * `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
23
24
  * an adopter using the sanctioned helper has no fix available on their side.
24
25
  * Restating the cause at each throw site is the alternative, and it costs
@@ -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,EAClB,iBAAiB,EAGjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACrB,MAAM,sBAAsB,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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"}
@@ -23,9 +23,10 @@ import { injectable } from 'inversify';
23
23
  * `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
24
24
  * and that one value feeds both the server log and the client's
25
25
  * {@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
26
+ * reaches its readers as `undefined` — the log line and the client's
27
+ * action-dispatcher warning both print it — while a plain `Error` survives,
28
+ * because the other branch reads the error itself. The typed error is the trap,
29
+ * and it is the one upstream's own
29
30
  * `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
30
31
  * an adopter using the sanctioned helper has no fix available on their side.
31
32
  * Restating the cause at each throw site is the alternative, and it costs
@@ -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,C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MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,6BAA6B,MAAM,CAAC,IAAI,MAAM,MAAM,CAAC,SAAS,GAAG,EAAE;oBACnG,UAAU,EAAE,MAAM,CAAC,SAAS;oBAC5B,MAAM;iBACR,CAAC,CAAC;gBACH,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC/C,CAAC;YAAC,OAAO,SAAkB,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,MAAM,CAAC,SAAS,IAAI,EAAE,SAAS,CAAC,CAAC;YAC/F,CAAC;QACJ,CAAC;IACJ,CAAC;CACH,CAAA;AA1DY,mBAAmB;IAD/B,UAAU,EAAE;GACA,mBAAmB,CA0D/B"}
@@ -0,0 +1,24 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Every user-facing message `@hydranium/glsp-server` raises.
11
+ *
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.
22
+ */
23
+ export { DIAGRAM_READONLY_PARSE_ERROR, DIAGRAM_SESSION_REFUSED, SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACpB,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Every user-facing message `@hydranium/glsp-server` raises.
11
+ *
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.
22
+ */
23
+ export { DIAGRAM_READONLY_PARSE_ERROR, DIAGRAM_SESSION_REFUSED, SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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"}
@@ -64,7 +64,7 @@ export function startGlspServer(options) {
64
64
  if (options.lspConnection && options.portCommand) {
65
65
  options.lspConnection.onRequest(options.portCommand, () => portHandle.port);
66
66
  }
67
- lifecycle?.info(`[GlspServer] Ready to accept new client requests on port: ${address.port}`);
67
+ lifecycle?.info(`[GlspServer] Ready to accept new client requests on ${address.address} port: ${address.port}`);
68
68
  started.resolve();
69
69
  }
70
70
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"start-glsp-server.js","sourceRoot":"","sources":["../../src/node/start-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,oBAAoB,EACpB,eAAe,EACf,0BAA0B,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAgGjF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,OAA0B;IACvD,MAAM,aAAa,GAAwB;QACxC,GAAG,0BAA0B;QAC7B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,WAAW;QACjC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC;KACzB,CAAC;IACF,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAEjC,2EAA2E;IAC3E,4EAA4E;IAC5E,+EAA+E;IAC/E,iFAAiF;IACjF,8EAA8E;IAC9E,6EAA6E;IAC7E,2EAA2E;IAC3E,MAAM,aAAa,GAAG,eAAe,CAAC,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAE/F,MAAM,YAAY,GAAG,IAAI,SAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,aAAa,EAAE,4BAA4B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC;IAEpH,MAAM,QA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BAAuB,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"}
@@ -9,8 +9,8 @@
9
9
  import { DefaultModelState, type MaybePromise } from '@eclipse-glsp/server';
10
10
  import { Emitter, type Event } from 'vscode-jsonrpc';
11
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';
12
+ import { type ClientSession, type HydraniumScopeProvider, type LanguageTarget, type NameProvider, type ReferenceCandidateProvider, type ServerLanguageServices, type ServerSharedServices } from '@hydranium/core';
13
+ import { type BasedOn, type SnapshotVersion, type ConflictResolver, type Logger, type Tracer } from '@hydranium/protocol';
14
14
  import { type HydraniumGlspIndex } from './hydranium-glsp-index.js';
15
15
  import { ModelReadyTimeoutError } from './model-ready-timeout-error.js';
16
16
  /**
@@ -71,12 +71,31 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
71
71
  protected readonly baseTracer: Tracer;
72
72
  /** Narrows {@link DefaultModelState.index} to the framework-extended index type. */
73
73
  readonly index: HydraniumGlspIndex;
74
+ /**
75
+ * The client session this diagram works as, registered under `clientId` by
76
+ * the source-model storage and ended with the GLSP client session.
77
+ * `undefined` for GLSP's placeholder client, and when the id was held by
78
+ * another participant, in which case the diagram does not load.
79
+ *
80
+ * Every write of the diagram goes through this session, which writes only a
81
+ * document it has open and opens nothing. A one-shot write to a document
82
+ * outside the write set goes through
83
+ * {@link ClientSession.withOpen}, and a document the diagram brings into
84
+ * existence through {@link ClientSession.create}.
85
+ */
86
+ modelSession?: ClientSession<AstNode>;
87
+ /**
88
+ * {@link modelSession}, or a throw without one: the diagram never loaded or
89
+ * has ended. Looking `clientId` up through `ModelService.getSession` instead
90
+ * would write as whichever participant holds that id.
91
+ */
92
+ protected requireModelSession(): ClientSession<AstNode>;
74
93
  protected _sourceUri: string;
75
94
  protected _sourceRoot: TRoot;
76
95
  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>;
96
+ protected _basedOn: SnapshotVersion;
97
+ /** Snapshot versions of the secondary write set, keyed by URI. See {@link trackSecondaryDocument}. */
98
+ protected readonly _secondaryVersions: Map<string, SnapshotVersion>;
80
99
  /** Backing emitter for {@link onSecondaryUrisChanged}; fired only on a membership change. */
81
100
  protected readonly secondaryUrisChangedEmitter: Emitter<void>;
82
101
  /** Default of one minute. */
@@ -170,27 +189,35 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
170
189
  /** URI-tagged once {@link setSourceRoot} has run; the class-tagged injected {@link baseTracer} before that. */
171
190
  get tracer(): Tracer;
172
191
  /**
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`.
192
+ * Snapshot version taken at the last {@link setSourceRoot} call — frozen
193
+ * until the next one, then re-read from the document store.
177
194
  *
178
195
  * 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
196
+ * {@link updateSourceModel} so the downstream session `update` / `save`
197
+ * gates against what the command was authored on. See
182
198
  * `@hydranium/protocol#ConflictError` for the detection contract.
183
199
  *
200
+ * **This, not a number read at write time, is what a write must be gated
201
+ * on.** A version read when the write is issued is the store's current one,
202
+ * so it matches by construction and the gate can never fire.
203
+ */
204
+ get basedOn(): SnapshotVersion;
205
+ /**
206
+ * Text-document version of {@link basedOn}. Mirrors the server-side
207
+ * `TextDocuments.version(uri)` counter as of the snapshot, or is
208
+ * `NO_MATCHING_VERSION` when the store's text could not be tied to the
209
+ * root (see {@link readSnapshotVersion}).
210
+ *
184
211
  * 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
212
+ * when the snapshot is taken — the same observable state callers see for a
213
+ * doc that was never opened. Callers that need to distinguish
187
214
  * "never-versioned" from "v0" must consult the document registry
188
215
  * directly.
189
216
  */
190
217
  get version(): number;
191
218
  /**
192
- * Register `uri` as a document this state also writes, capturing its current
193
- * text-document version.
219
+ * Register `uri` as a document this state also writes, snapshotting its
220
+ * current text-document version.
194
221
  *
195
222
  * A diagram whose layout lives in its own file, or whose canvas creates
196
223
  * elements in a referenced semantic document, writes more than the document
@@ -203,7 +230,7 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
203
230
  * identified once the operation names the node. What the framework supplies
204
231
  * is the part an adopter cannot reconstruct after the fact — the version each
205
232
  * document was at BEFORE the command mutated anything (see
206
- * {@link capturedVersionOf}). Idempotent; registering the primary is ignored,
233
+ * {@link snapshotVersionOf}). Idempotent; registering the primary is ignored,
207
234
  * since {@link version} already tracks it. Registering a URI not already in
208
235
  * the set fires {@link onSecondaryUrisChanged}.
209
236
  */
@@ -215,14 +242,15 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
215
242
  untrackSecondaryDocuments(): void;
216
243
  /**
217
244
  * 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
245
+ * tracked document's snapshot version is merely refreshed, which happens on
219
246
  * every {@link setSourceRoot} and changes nothing a subscriber cares about.
220
247
  *
221
248
  * **This exists so no caller has to know when the set can change.** The set is
222
249
  * 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.
250
+ * operation handler naming a node — not a read of the source root. A
251
+ * subscriber that instead re-derived the set after each such read would miss
252
+ * exactly that case, and miss it silently: the document would simply never be
253
+ * watched, with nothing logged.
226
254
  * Announcing the change here moves the obligation to the one place that can
227
255
  * always discharge it.
228
256
  *
@@ -235,25 +263,43 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
235
263
  /** Registered secondary document URIs, in registration order. */
236
264
  get secondaryUris(): readonly string[];
237
265
  /**
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.
266
+ * Snapshot version for `uri` — {@link basedOn} for the primary, the version
267
+ * taken at {@link trackSecondaryDocument} (refreshed by {@link setSourceRoot})
268
+ * for a secondary, `undefined` for anything untracked.
241
269
  *
242
- * `undefined` rather than `0` for an untracked URI deliberately: `0` is a real
270
+ * `undefined` rather than v0 for an untracked URI deliberately: `0` is a real
243
271
  * version meaning "present but never edited", so collapsing the two would let
244
- * a caller gate a write against a document it never captured.
272
+ * a caller gate a write against a document this state never read.
245
273
  */
246
- capturedVersionOf(uri: string): number | undefined;
274
+ snapshotVersionOf(uri: string): SnapshotVersion | undefined;
247
275
  /**
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.
276
+ * Read a document's version out of the live store and mark it as a snapshot,
277
+ * through the model service's canonicalizing gateway so a URI spelled through
278
+ * a symlink still resolves to the document keyed by its real path rather than
279
+ * stranding at `0` (which would silently weaken the conflict gate).
280
+ *
281
+ * **Call this only at the point the source root is read.** It is the one
282
+ * place the framework turns a live version into a snapshot one, and the value
283
+ * is true only because that is where it is called. Called at write time it
284
+ * answers with the version the write is about to be compared against, so the
285
+ * gate passes unconditionally.
286
+ *
287
+ * Falls back to v0 for a URI neither store knows, matching what
288
+ * {@link version} reports for a document that was never opened.
289
+ *
290
+ * **The version of the text store, which the gate compares against.**
291
+ * When the store holds the text the root was parsed from, that is its
292
+ * version, even while the built document still carries an older number.
293
+ * When the store holds other text, `NO_MATCHING_VERSION`, so the write
294
+ * conflicts instead of overwriting text the root never saw: the
295
+ * reconciling states reconcile it, `FullTextHydraniumGlspState` throws the
296
+ * `ConflictError`. When the root keeps no syntax tree to read its text
297
+ * from, the built document's text stands in for it, unless the built
298
+ * document IS the store's, whose text says nothing about what was parsed;
299
+ * that also gets `NO_MATCHING_VERSION`.
254
300
  */
255
- protected readDocumentVersion(uri: string): number;
256
- /** Re-read every registered secondary's version from the document store. */
301
+ protected readSnapshotVersion(uri: string): SnapshotVersion;
302
+ /** Re-take every registered secondary's snapshot version from the document store. */
257
303
  protected refreshSecondaryVersions(): void;
258
304
  /**
259
305
  * Re-capture the source root from the current Langium document,
@@ -263,6 +309,18 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
263
309
  * handlers) must see the root the freshly built document carries.
264
310
  */
265
311
  protected refreshSourceRoot(): void;
312
+ /**
313
+ * The root that `uri`'s text parses to (the text store's, or the built
314
+ * document's when the store holds none), read once the document has
315
+ * validated; `undefined` when it cannot be read.
316
+ *
317
+ * **Parsed afresh, never the built root.** Operation handlers edit the
318
+ * built root in place, so until a rebuild replaces it, it already holds
319
+ * the edit being reconciled, and replaying the edit onto it applies it
320
+ * twice. The root is parsed, not linked: an encoder hook reading a
321
+ * reference's `ref` sees `undefined` on it.
322
+ */
323
+ protected readCurrentRoot(uri: string): Promise<AstNode | undefined>;
266
324
  /**
267
325
  * Wait until the captured document reaches `state`, then run
268
326
  * {@link onReadyRefreshed} so consumers see a fresh AST. Wraps the
@@ -320,14 +378,23 @@ export declare abstract class AbstractHydraniumGlspState<TRoot extends AstNode,
320
378
  * `JsonModelState` shape meet the framework state via structural
321
379
  * intersection at the recording-command call site.
322
380
  *
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).
381
+ * `basedOn` is the snapshot version taken at command start by
382
+ * `HydraniumGlspRecordingCommand.execute`. Adopters that write through the
383
+ * diagram's session forward it as the args' `basedOn` field; adopters whose
384
+ * write path doesn't go through the session ignore it.
385
+ * `'anything'` when the writer is not the recording command (an external
386
+ * storage refresh, an undo replaying a recorded patch), which is a write
387
+ * authored against no particular server version.
388
+ *
389
+ * **Optional, and every implementation must default it to {@link basedOn}
390
+ * rather than to `'anything'`.** Optional is forced: GLSP's `JsonModelState`
391
+ * declares a one-parameter `updateSourceModel` and calls it with one
392
+ * argument, so a second required parameter makes the state unassignable to
393
+ * the slot it has to fill. Defaulting to the state's own snapshot version is
394
+ * what keeps that from costing anything — an operation handler calling
395
+ * `updateSourceModel(model)` gets the gate, and skipping it has to be typed
396
+ * out as `'anything'`.
330
397
  */
331
- abstract updateSourceModel(model: TSourceModel, version?: number): MaybePromise<void>;
398
+ abstract updateSourceModel(model: TSourceModel, basedOn?: BasedOn): MaybePromise<void>;
332
399
  }
333
400
  //# sourceMappingURL=abstract-hydranium-glsp-state.d.ts.map