@hydranium/glsp-server 1.0.0-next.16 → 1.0.0-next.160

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 (108) 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 +45 -11
  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/glsp-server-overrides.d.ts +10 -8
  23. package/lib/launcher/glsp-server-overrides.d.ts.map +1 -1
  24. package/lib/launcher/glsp-server-overrides.js +25 -11
  25. package/lib/launcher/glsp-server-overrides.js.map +1 -1
  26. package/lib/launcher/hydranium-glsp-server.d.ts +14 -10
  27. package/lib/launcher/hydranium-glsp-server.d.ts.map +1 -1
  28. package/lib/launcher/hydranium-glsp-server.js +20 -10
  29. package/lib/launcher/hydranium-glsp-server.js.map +1 -1
  30. package/lib/messages/index.d.ts +24 -0
  31. package/lib/messages/index.d.ts.map +1 -0
  32. package/lib/messages/index.js +24 -0
  33. package/lib/messages/index.js.map +1 -0
  34. package/lib/node/start-glsp-server.d.ts +1 -1
  35. package/lib/node/start-glsp-server.d.ts.map +1 -1
  36. package/lib/node/start-glsp-server.js +3 -4
  37. package/lib/node/start-glsp-server.js.map +1 -1
  38. package/lib/state/abstract-hydranium-glsp-state.d.ts +110 -43
  39. package/lib/state/abstract-hydranium-glsp-state.d.ts.map +1 -1
  40. package/lib/state/abstract-hydranium-glsp-state.js +139 -60
  41. package/lib/state/abstract-hydranium-glsp-state.js.map +1 -1
  42. package/lib/state/full-text-hydranium-glsp-state.d.ts +6 -6
  43. package/lib/state/full-text-hydranium-glsp-state.d.ts.map +1 -1
  44. package/lib/state/full-text-hydranium-glsp-state.js +6 -10
  45. package/lib/state/full-text-hydranium-glsp-state.js.map +1 -1
  46. package/lib/state/reconcile-source-model-write.d.ts +9 -8
  47. package/lib/state/reconcile-source-model-write.d.ts.map +1 -1
  48. package/lib/state/reconcile-source-model-write.js +8 -8
  49. package/lib/state/reconcile-source-model-write.js.map +1 -1
  50. package/lib/state/reconciling-multi-document-glsp-state.d.ts +59 -59
  51. package/lib/state/reconciling-multi-document-glsp-state.d.ts.map +1 -1
  52. package/lib/state/reconciling-multi-document-glsp-state.js +84 -82
  53. package/lib/state/reconciling-multi-document-glsp-state.js.map +1 -1
  54. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts +19 -18
  55. package/lib/state/reconciling-transfer-hydranium-glsp-state.d.ts.map +1 -1
  56. package/lib/state/reconciling-transfer-hydranium-glsp-state.js +26 -30
  57. package/lib/state/reconciling-transfer-hydranium-glsp-state.js.map +1 -1
  58. package/lib/storage/hydranium-glsp-request-save-model-action-handler.d.ts +30 -0
  59. package/lib/storage/hydranium-glsp-request-save-model-action-handler.d.ts.map +1 -0
  60. package/lib/storage/hydranium-glsp-request-save-model-action-handler.js +47 -0
  61. package/lib/storage/hydranium-glsp-request-save-model-action-handler.js.map +1 -0
  62. package/lib/storage/hydranium-glsp-storage.d.ts +313 -86
  63. package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -1
  64. package/lib/storage/hydranium-glsp-storage.js +456 -104
  65. package/lib/storage/hydranium-glsp-storage.js.map +1 -1
  66. package/lib/storage/index.d.ts +2 -1
  67. package/lib/storage/index.d.ts.map +1 -1
  68. package/lib/storage/index.js +2 -1
  69. package/lib/storage/index.js.map +1 -1
  70. package/lib/storage/save-delivery-policy.d.ts +46 -0
  71. package/lib/storage/save-delivery-policy.d.ts.map +1 -0
  72. package/lib/storage/{save-conflict-policy.js → save-delivery-policy.js} +7 -8
  73. package/lib/storage/save-delivery-policy.js.map +1 -0
  74. package/lib/testing/glsp-harness.js +4 -4
  75. package/lib/testing/glsp-harness.js.map +1 -1
  76. package/lib/validation/diagnostic-markers.d.ts +2 -2
  77. package/lib/validation/diagnostic-markers.d.ts.map +1 -1
  78. package/lib/validation/diagnostic-markers.js +7 -0
  79. package/lib/validation/diagnostic-markers.js.map +1 -1
  80. package/lib/validation/hydranium-glsp-model-validator.d.ts.map +1 -1
  81. package/lib/validation/hydranium-glsp-model-validator.js +1 -1
  82. package/lib/validation/hydranium-glsp-model-validator.js.map +1 -1
  83. package/package.json +17 -8
  84. package/src/browser/start-glsp-server-in-worker.ts +43 -47
  85. package/src/command/hydranium-glsp-command-stack.ts +36 -0
  86. package/src/command/hydranium-glsp-recording-command.ts +26 -26
  87. package/src/command/index.ts +1 -0
  88. package/src/launcher/abstract-hydranium-glsp-diagram-module.ts +27 -3
  89. package/src/launcher/glsp-server-overrides.ts +27 -11
  90. package/src/launcher/hydranium-glsp-server.ts +20 -10
  91. package/src/messages/index.ts +30 -0
  92. package/src/node/start-glsp-server.ts +3 -5
  93. package/src/state/abstract-hydranium-glsp-state.ts +174 -73
  94. package/src/state/full-text-hydranium-glsp-state.ts +7 -11
  95. package/src/state/reconcile-source-model-write.ts +18 -15
  96. package/src/state/reconciling-multi-document-glsp-state.ts +86 -83
  97. package/src/state/reconciling-transfer-hydranium-glsp-state.ts +27 -31
  98. package/src/storage/hydranium-glsp-request-save-model-action-handler.ts +40 -0
  99. package/src/storage/hydranium-glsp-storage.ts +520 -113
  100. package/src/storage/index.ts +2 -1
  101. package/src/storage/save-delivery-policy.ts +44 -0
  102. package/src/testing/glsp-harness.ts +4 -4
  103. package/src/validation/diagnostic-markers.ts +10 -3
  104. package/src/validation/hydranium-glsp-model-validator.ts +3 -3
  105. package/lib/storage/save-conflict-policy.d.ts +0 -56
  106. package/lib/storage/save-conflict-policy.d.ts.map +0 -1
  107. package/lib/storage/save-conflict-policy.js.map +0 -1
  108. package/src/storage/save-conflict-policy.ts +0 -52
@@ -9,10 +9,60 @@
9
9
  import { type Action, ActionDispatcher, type ClientSession, type ClientSessionListener, ClientSessionManager, type DefaultCommandStack, type Disposable, Logger as GlspLogger, type MaybePromise, ModelValidator, type RequestModelAction, type SaveModelAction, type SourceModelStorage } from '@eclipse-glsp/server';
10
10
  import { Debouncer, DisposableCollection } from '@hydranium/protocol';
11
11
  import { type AstNode } from '@hydranium/langium';
12
- import { AstDocument, type AstDocumentSavedEvent, type AstDocumentUpdatedEvent, type ServerSharedServices } from '@hydranium/core';
12
+ import { AstDocument, type AstDocumentSavedEvent, type AstDocumentUpdatedEvent, type ClientSession as ModelClientSession, type DocumentDirtyChangedEvent, type ServerSharedServices } from '@hydranium/core';
13
13
  import { type AbstractHydraniumGlspState } from '../state/abstract-hydranium-glsp-state.js';
14
14
  import { type HydraniumGlspSubmissionHandler } from '../submission/hydranium-glsp-submission-handler.js';
15
- import { SaveConflictPolicy } from './save-conflict-policy.js';
15
+ import { SaveDeliveryPolicy } from './save-delivery-policy.js';
16
+ /**
17
+ * A save action arrived with nowhere to write to. A save action carries no
18
+ * request id, so it falls through to the error handler and `message` becomes
19
+ * the toast text.
20
+ *
21
+ * Rendered at the raise site rather than by a carrier method, because GLSP's
22
+ * action protocol has no slot for an identity anywhere — every member of its
23
+ * message, status and reject actions is prose or an enum, and
24
+ * `MessageAction.details` is not a substitute since it is prose populated from
25
+ * `cause?.toString?.()`, and a Theia host shows it to a user on demand. So the
26
+ * throw is the last place that still knows which message this is.
27
+ */
28
+ export declare const SAVE_TARGET_UNKNOWN: import("@hydranium/protocol").MessageDefinition<"Could not determine where to save this model">;
29
+ /**
30
+ * A model request arrived without the source URI it is required to carry.
31
+ * Rendered at the raise site, like its save-path sibling and for the same
32
+ * reason.
33
+ */
34
+ export declare const SOURCE_URI_MISSING: import("@hydranium/protocol").MessageDefinition<"Could not open this model: the request did not say which document to load">;
35
+ /**
36
+ * Why the canvas has stopped accepting edits.
37
+ *
38
+ * **A READONLY canvas is otherwise indistinguishable from a broken one.** The
39
+ * client's answer to {@link SetEditModeAction} is to withdraw the tool palette,
40
+ * so the surface a reader was working in silently loses the only control it had,
41
+ * with the cause — a syntax error in a document that may not even be open —
42
+ * nowhere on screen. The mode flip is the mechanism; this is the only part of it
43
+ * a user can see.
44
+ *
45
+ * Rendered at the raise site, like its two siblings above and for the same
46
+ * reason: every member of GLSP's status action is prose or an enum.
47
+ *
48
+ * It names the recovery rather than the fault, because the fault already has a
49
+ * surface — the squiggle and the problems list, both of which say WHICH
50
+ * character — and repeating it here would put a second, less precise account of
51
+ * the same error on screen. What no other surface says is that the diagram is
52
+ * waiting on it.
53
+ */
54
+ export declare const DIAGRAM_READONLY_PARSE_ERROR: import("@hydranium/protocol").MessageDefinition<"Read-only: this document has a syntax error. Fix it to edit the diagram again.">;
55
+ /**
56
+ * The diagram's GLSP client id is still live as another participant's client
57
+ * id once the load has waited for it to free, so the diagram does not load.
58
+ *
59
+ * Rendered at the raise site, as {@link SAVE_TARGET_UNKNOWN} is and for the
60
+ * same reason, and dispatched to the client as a message of its own: a model
61
+ * request fails as a rejection whose detail is the English cause, which no user
62
+ * sees. It names the recovery: a host that numbers its diagram clients gives a
63
+ * reopened diagram a fresh id.
64
+ */
65
+ export declare const DIAGRAM_SESSION_REFUSED: import("@hydranium/protocol").MessageDefinition<"Could not open this diagram: its identifier is still in use by another editor. Close the diagram and open it again.">;
16
66
  /**
17
67
  * GLSP source-model storage base shared by all hydranium adopters.
18
68
  * Provides the DI signature, the {@link ClientSessionListener} +
@@ -33,17 +83,24 @@ import { SaveConflictPolicy } from './save-conflict-policy.js';
33
83
  *
34
84
  * Adopters with richer needs override the seams ({@link isStructurallyBroken},
35
85
  * {@link onParseErrorChanged}, {@link onSourceModelSettled}) rather than the
36
- * whole flow, and select a {@link SaveConflictPolicy} via the bound option to
37
- * tune how {@link saveSourceModel} reacts to a concurrent edit.
86
+ * whole flow, and select a {@link SaveDeliveryPolicy} via the bound option to
87
+ * tune how {@link saveSourceModel} delivers its result.
88
+ *
89
+ * **One client session per GLSP client session.** `init` registers the GLSP
90
+ * client id as a client session ({@link registerModelSession}) and hands it to
91
+ * the state as `modelSession`. The primary is opened through it on load, and
92
+ * every document that joins the write set as it joins
93
+ * ({@link openSecondary}); a document that leaves the write set stays open
94
+ * until the next save, so leaving never reverts the diagram's unsaved edits to
95
+ * it. Disposing the storage ends the session, which closes everything it has
96
+ * open.
38
97
  *
39
- * **Default `saveSourceModel` flow.** Delegates to `ModelService.save`, which
40
- * serialises through the language-specific `Serializer` bound at
41
- * `services.serializer.Serializer` (resolved per-URI via `ServiceRegistry`),
42
- * updates the multi-client text-document store, drives a rebuild, and writes the
43
- * result via the `WritableFileSystemProvider`. The bound
44
- * {@link SaveConflictPolicy} (default {@link DEFAULT_SAVE_CONFLICT_POLICY},
45
- * `overwrite`) decides the based-on-version guard, await-vs-fire-and-forget, and
46
- * failure handling.
98
+ * **Default `saveSourceModel` flow.** Flushes the stored text of every
99
+ * document the diagram's session has open via `AstDocumentManager.save`, with
100
+ * no serializer in the path — the update path already put the settled text in
101
+ * the store. The bound {@link SaveDeliveryPolicy} (default
102
+ * {@link DEFAULT_SAVE_DELIVERY_POLICY}, `await`) decides
103
+ * await-vs-fire-and-forget and failure handling.
47
104
  *
48
105
  * **tempId filter.** GLSP's `DefaultGlobalActionProvider` spins up a
49
106
  * throwaway per-diagram-type container with upstream's {@link TEMPORARY_CLIENT_ID}
@@ -54,9 +111,9 @@ import { SaveConflictPolicy } from './save-conflict-policy.js';
54
111
  * **Lifecycle ordering.** `init` runs after DI resolution and parks the
55
112
  * secondary-write-set watch, which outlives any single load.
56
113
  * {@link sessionDisposed} calls {@link dispose}, which drains
57
- * {@link toDispose} idempotently. Every transient subscription created in
58
- * {@link doLoadSourceModel} is parked on {@link toDispose} so the drain catches
59
- * them on client-detach.
114
+ * {@link toDispose} idempotently and then ends the client session. Every
115
+ * transient subscription created in {@link doLoadSourceModel} is parked on
116
+ * {@link toDispose} so the drain catches them on client-detach.
60
117
  */
61
118
  export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string> implements SourceModelStorage, ClientSessionListener, Disposable {
62
119
  protected readonly logger: GlspLogger;
@@ -75,14 +132,13 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
75
132
  */
76
133
  protected readonly modelValidator?: ModelValidator;
77
134
  /**
78
- * Selected {@link SaveConflictPolicy} for {@link saveSourceModel}. Bind the
79
- * {@link SaveConflictPolicy} token in a `DiagramModule` to choose a policy;
80
- * left unbound it resolves to {@link DEFAULT_SAVE_CONFLICT_POLICY}
81
- * (`overwrite`, last-write-wins). Read via {@link saveConflictPolicy} so the
82
- * fallback is applied even when inversify injects `undefined` for an unbound
83
- * `@optional()` member.
135
+ * Selected {@link SaveDeliveryPolicy} for {@link saveSourceModel}. Bind the
136
+ * {@link SaveDeliveryPolicy} token in a `DiagramModule` to choose a policy;
137
+ * left unbound it resolves to {@link DEFAULT_SAVE_DELIVERY_POLICY}. Read via
138
+ * {@link saveDeliveryPolicy} so the fallback is applied even when inversify
139
+ * injects `undefined` for an unbound `@optional()` member.
84
140
  */
85
- protected readonly boundSaveConflictPolicy?: SaveConflictPolicy;
141
+ protected readonly boundSaveDeliveryPolicy?: SaveDeliveryPolicy;
86
142
  /** Disposables created during {@link doLoadSourceModel}; drained on session disposal. */
87
143
  protected toDispose: DisposableCollection;
88
144
  /**
@@ -94,6 +150,24 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
94
150
  * with it rather than linger until the client detaches.
95
151
  */
96
152
  protected readonly secondarySubscriptions: Map<string, Disposable>;
153
+ /**
154
+ * Documents that left the write set since the last save. They stay open in
155
+ * the diagram's session until that save has persisted them, and are closed
156
+ * after it: closing a document as it leaves would revert the diagram's
157
+ * unsaved edits to it where the diagram was its last client.
158
+ */
159
+ protected readonly departedSecondaries: Set<string>;
160
+ /**
161
+ * How long a load waits for a client id another participant holds to free
162
+ * before refusing. A reloaded client can reconnect under its old id before
163
+ * the server has noticed the old connection close, which ends that
164
+ * connection's sessions a moment later.
165
+ */
166
+ protected readonly sessionWaitMs: number;
167
+ /** Set by {@link dispose}; a disposed storage registers no session again. */
168
+ protected disposed: boolean;
169
+ /** Saves of the diagram's own that GLSP's save handler awaits; see {@link handleDirtyChanged}. */
170
+ protected ownSavesPending: number;
97
171
  /**
98
172
  * Whether an external resubmit has ever been dispatched. Gates the
99
173
  * keep-the-last-valid-GModel branch, which needs to know a canvas is already
@@ -111,8 +185,36 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
111
185
  */
112
186
  protected resubmitDebouncer: Debouncer;
113
187
  /** Latest event document awaiting the debounced resubmit; read by {@link flushResubmit} (last write wins). */
114
- protected pendingResubmitDocument?: AstDocument<AstNode, unknown>;
188
+ protected pendingResubmitDocument?: AstDocument<AstNode>;
115
189
  protected init(): void;
190
+ /**
191
+ * Register the diagram's client session under the GLSP client id, or
192
+ * `undefined` when another participant holds that id, which is logged.
193
+ *
194
+ * The diagram then refuses to load ({@link requireModelSession}). Taking
195
+ * the id over would end the other participant's session under it, and
196
+ * working without a session would share that participant's opens and
197
+ * echoes, so its close would take the diagram's documents with it.
198
+ *
199
+ * A client id the framework reserves throws `ReservedClientIdError`:
200
+ * whoever chose the GLSP client id has a bug, and no later registration can
201
+ * succeed.
202
+ */
203
+ protected registerModelSession(): ModelClientSession<AstNode> | undefined;
204
+ /**
205
+ * The diagram's client session, registering it again when the id was held
206
+ * earlier. Throws `SessionClosedError` once the storage is disposed, and the
207
+ * refusal when the id is still held.
208
+ */
209
+ protected requireModelSession(): ModelClientSession<AstNode>;
210
+ /**
211
+ * {@link requireModelSession} for the load: while the id is held, wait up to
212
+ * {@link sessionWaitMs} for its holder to end before refusing, and tell the
213
+ * user when it does not.
214
+ */
215
+ protected awaitModelSession(): Promise<ModelClientSession<AstNode>>;
216
+ /** Resolve once the client session under `clientId` ends, or after `timeoutMs`. */
217
+ protected waitForSessionEnd(clientId: string, timeoutMs: number): Promise<void>;
116
218
  /**
117
219
  * Default load flow — {@link doLoadSourceModel}. Adopters whose load flow
118
220
  * needs more than the seams allow override this method.
@@ -120,12 +222,29 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
120
222
  loadSourceModel(action: RequestModelAction): MaybePromise<void>;
121
223
  protected doLoadSourceModel(action: RequestModelAction): Promise<void>;
122
224
  /**
123
- * Capture the initial settled root and apply the initial edit mode. `settled()`
124
- * strips diagnostics by phase contract, so the first edit mode is `EDITABLE`;
125
- * the first {@link handleModelUpdated} (at `Validated`, with diagnostics) flips
126
- * it READONLY if the document has structural parse errors. Edit-mode +
127
- * settle-hook actions are dispatched on a macrotask so the initial
225
+ * Capture the initial settled root and apply the initial edit mode. Edit-mode
226
+ * + settle-hook actions are dispatched on a macrotask so the initial
128
227
  * `requestModel → setModel` handshake isn't perturbed.
228
+ *
229
+ * **Whether the settled document carries diagnostics depends on how far it
230
+ * had already got, so the initial edit mode has two correct outcomes rather
231
+ * than one.** `settled()` strips nothing: it resolves AT OR ABOVE the
232
+ * integrity landmark and hands back the live document's own array. Its
233
+ * `AstDocument<TAst, never>` return type asserts emptiness for a document the
234
+ * wait had to DRIVE to that landmark, which is pre-validation — and for that
235
+ * one the mode here is `EDITABLE` and the flip to READONLY arrives with the
236
+ * first {@link handleModelUpdated}. A document already past `Validated` when
237
+ * the session opened resolves immediately with its diagnostics intact, and is
238
+ * decided correctly here with no later update owed. Any host that validates
239
+ * its workspace before a diagram is opened produces the second case, so
240
+ * neither is exceptional.
241
+ *
242
+ * **A correct decision is not a delivered one.** This dispatch happens inside
243
+ * the initial `requestModel`, before the client has the model — so the UI
244
+ * extensions that answer {@link onParseErrorChanged}'s actions are not yet
245
+ * constructed, and a canvas that opens READONLY over a broken document shows
246
+ * none of that feedback. The same timer carries {@link onSourceModelSettled},
247
+ * so an adopter's own initial actions have it too.
129
248
  */
130
249
  protected captureSettledRoot(rootUri: string, document: AstDocument<AstNode, never>): Promise<void>;
131
250
  /**
@@ -146,14 +265,22 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
146
265
  * piece is a subscription, not an invalidation.
147
266
  */
148
267
  protected reconcileSecondarySubscriptions(): void;
268
+ /**
269
+ * Open a document that joined the write set through the diagram's session,
270
+ * where it stays open until the diagram's next save after it leaves the set,
271
+ * or the diagram's end. A document that does not exist yet is left to the
272
+ * write that creates it, and a failed open is logged: the write that needs
273
+ * the document opens it again and fails there.
274
+ */
275
+ protected openSecondary(uri: string): void;
149
276
  /**
150
277
  * React to a rebuild of a SECONDARY document by resubmitting the diagram, so
151
278
  * an external edit to (say) a layout file reaches the canvas.
152
279
  *
153
- * Reuses {@link handleModelUpdated}'s authorship guard, and that is the load-
154
- * bearing half rather than the resubmit: a diagram interaction that writes a
280
+ * Applies {@link handleModelUpdated}'s guard, and that is the load-bearing
281
+ * half rather than the resubmit: a diagram interaction that writes a
155
282
  * secondary — a drag persisting bounds to a layout file — comes back through
156
- * this listener as the client's own `changed` edit, and resubmitting on it
283
+ * this listener caused by the client's own write, and resubmitting on it
157
284
  * fights the optimistic client-side move the user is still holding.
158
285
  *
159
286
  * Schedules the PRIMARY's current document, never the secondary's.
@@ -171,27 +298,35 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
171
298
  * drag this client authors — the guard above gates the resubmit, not the
172
299
  * markers.
173
300
  */
174
- protected handleSecondaryUpdated(uri: string, event: AstDocumentUpdatedEvent<AstNode, unknown>): void;
301
+ protected handleSecondaryUpdated(uri: string, event: AstDocumentUpdatedEvent<AstNode>): void;
175
302
  /**
176
303
  * The primary document's current state, or `undefined` when it is not
177
304
  * registered.
178
305
  *
179
306
  * Synchronous by construction — the phase-agnostic lookup door plus the shared
180
307
  * projection — so reacting to a secondary neither waits nor can force a build.
181
- * `settled()` is not an alternative: it strips diagnostics by phase contract,
182
- * and diagnostics are the reason {@link doUpdateAndSubmit} takes a separate
183
- * event document at all.
308
+ * `settled()` is not an alternative: besides being asynchronous, it cannot be
309
+ * relied on to carry diagnostics — a document it has to drive to the landmark
310
+ * arrives pre-validation with an empty array — and diagnostics are the reason
311
+ * {@link doUpdateAndSubmit} takes a separate event document at all.
184
312
  */
185
- protected currentPrimaryDocument(): AstDocument<AstNode, unknown> | undefined;
313
+ protected currentPrimaryDocument(): AstDocument<AstNode> | undefined;
186
314
  /**
187
315
  * React to an external rebuild reaching `Validated`. Self-cleans if the
188
316
  * session has vanished but this listener leaked (neither `sessionDisposed`
189
- * nor `onClientClosed` fired on tab close). Resubmits for any change not
190
- * authored by this client's own optimistic `changed` edit, then refreshes
191
- * diagnostic markers for every update — including own edits, which skip
192
- * the resubmit but can still change diagnostics.
317
+ * nor `onClientClosed` fired on tab close). Resubmits for any update this
318
+ * client's own write did not cause alone, then refreshes diagnostic markers
319
+ * for every update — including own writes, which skip the resubmit but can
320
+ * still change diagnostics. An event without `causedBy` is resubmitted.
321
+ *
322
+ * Own writes include a primary that the build of a write to a secondary
323
+ * swept in, which arrives `rebuilt`. Skipping it loses nothing the canvas
324
+ * shows: the operation behind the write submits once the write has
325
+ * answered, and a build steps its whole batch through each phase, so that
326
+ * submit already renders the relinked primary. What the later `Validated`
327
+ * adds are diagnostics, which the marker refresh carries.
193
328
  */
194
- protected handleModelUpdated(rootUri: string, event: AstDocumentUpdatedEvent<AstNode, unknown>): Promise<void>;
329
+ protected handleModelUpdated(rootUri: string, event: AstDocumentUpdatedEvent<AstNode>): Promise<void>;
195
330
  /**
196
331
  * Whether this storage has outlived its session — disposing it as a side
197
332
  * effect when so. Checked from every subscription entry point because GLSP's
@@ -206,7 +341,7 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
206
341
  * {@link resubmitDebouncer}, so a burst of rebuilds runs
207
342
  * {@link doUpdateAndSubmit} once with the most recent document.
208
343
  */
209
- protected scheduleUpdateAndSubmit(document: AstDocument<AstNode, unknown>): void;
344
+ protected scheduleUpdateAndSubmit(document: AstDocument<AstNode>): void;
210
345
  /**
211
346
  * Debouncer callback: run the resubmit for the latest pending document
212
347
  * against this storage's (invariant) source URI and dispatch the result.
@@ -214,24 +349,45 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
214
349
  */
215
350
  protected flushResubmit(): void;
216
351
  /**
217
- * Coordinate the command stack when another client persists the document:
218
- * mark our stack clean so the editor doesn't prompt to re-save identical
219
- * content. Our own saves already settle the stack through the save flow.
352
+ * For a diagram module on GLSP's own command stack, which counts commands:
353
+ * mark it clean when another client persists the document.
354
+ * `HydraniumGlspCommandStack` reads the text store instead, and this does
355
+ * not move it.
356
+ */
357
+ protected handleModelSaved(event: AstDocumentSavedEvent<AstNode>): void;
358
+ /**
359
+ * Send the diagram's dirty state when a document it has open turns dirty or
360
+ * clean, the answer being the command stack's. GLSP sends it only with a
361
+ * model submission or a save of the diagram's own, so a save by another
362
+ * client, an editor included, or an edit that changes nothing the diagram
363
+ * shows would otherwise leave the client's marker wrong until the next
364
+ * gesture. A flip the diagram's own operation causes is sent twice, once
365
+ * here and once with the submission, and the client keeps the one state.
366
+ *
367
+ * Nothing is sent while a save of the diagram's own is awaited: GLSP's save
368
+ * handler sends the state once the save settles, reason `save`, and GLSP's
369
+ * client keeps a state only when it changes, so the save's own flip sent
370
+ * here first would leave that answer changing nothing. GLSP's saveable
371
+ * waits for exactly that answer, and times out without it.
220
372
  */
221
- protected handleModelSaved(event: AstDocumentSavedEvent<AstNode, unknown>): void;
373
+ protected handleDirtyChanged(event: DocumentDirtyChangedEvent): void;
374
+ /** Send the command stack's dirty state, reason `external`. */
375
+ protected sendDirtyState(): void;
222
376
  /**
223
377
  * Re-settle to a guaranteed fully-linked + reprojected root, capture it, and
224
378
  * (unless suppressed) resubmit a deduped external GModel. Diagnostics for the
225
- * edit-mode decision come from the event document (`settled()` strips them by
226
- * phase contract).
379
+ * edit-mode decision come from the event document, because the re-settled one
380
+ * cannot be relied on to have any: a document driven to the landmark arrives
381
+ * pre-validation, and this path re-settles precisely to escape a transient
382
+ * mid-rebuild snapshot.
227
383
  */
228
- protected doUpdateAndSubmit(rootUri: string, eventDocument: AstDocument<AstNode, unknown>): Promise<Action[]>;
384
+ protected doUpdateAndSubmit(rootUri: string, eventDocument: AstDocument<AstNode>): Promise<Action[]>;
229
385
  /**
230
386
  * Recompute the desired edit mode from the document's structural-error state,
231
387
  * flip {@link AbstractHydraniumGlspState.editMode}, and — only on a transition —
232
388
  * return the {@link onParseErrorChanged} actions. No transition → no actions.
233
389
  */
234
- protected refreshEditMode(document: AstDocument<AstNode, unknown>): Action[];
390
+ protected refreshEditMode(document: AstDocument<AstNode>): Action[];
235
391
  /**
236
392
  * Seam: is the AST structurally broken (lexing/parsing errors)? Drives both
237
393
  * READONLY mode and the GModel resubmit skip — keeping the last valid canvas
@@ -239,46 +395,96 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
239
395
  * carrying a Langium `lexing-error` / `parsing-error` code. Adopters override
240
396
  * to compose additional break reasons.
241
397
  */
242
- protected isStructurallyBroken(document: AstDocument<AstNode, unknown>): boolean;
398
+ protected isStructurallyBroken(document: AstDocument<AstNode>): boolean;
243
399
  /**
244
- * Seam: actions to emit when the structural-broken state transitions. Default:
245
- * a single {@link SetEditModeAction} toggling READONLY ↔ EDITABLE — editing is
246
- * disabled while the syntax is broken but re-enabled once it parses, a sound
247
- * generic for any Langium-backed diagram. Adopters override to add or replace
248
- * the transition feedback. The {@link AbstractHydraniumGlspState.editMode}
249
- * flip itself is owned by {@link refreshEditMode}.
400
+ * Seam: actions to emit when the structural-broken state transitions.
401
+ * Default: a {@link SetEditModeAction} toggling READONLY ↔ EDITABLE — editing
402
+ * is disabled while the syntax is broken but re-enabled once it parses, a
403
+ * sound generic for any Langium-backed diagram — plus the
404
+ * {@link DIAGRAM_READONLY_PARSE_ERROR} band that says why, cleared on the way
405
+ * back. Adopters override to add or replace the transition feedback. The
406
+ * {@link AbstractHydraniumGlspState.editMode} flip itself is owned by
407
+ * {@link refreshEditMode}.
408
+ *
409
+ * **Both actions or neither, which is why they are one seam rather than
410
+ * two.** The mode flip removes the tool palette and the band is the only
411
+ * account of that, so an override that keeps one and drops the other produces
412
+ * either an unexplained loss of the palette or a warning about a restriction
413
+ * that is not in force.
414
+ *
415
+ * **The status is dispatched with no `timeout`, so it persists** — a
416
+ * time-limited band would describe a condition that outlasts it.
417
+ *
418
+ * **The slot is SHARED, and the other writer wins on one path.**
419
+ * `ModelSubmissionHandler`'s live validation writes the same slot, clearing
420
+ * it with `severity: 'NONE'` when it finishes, and an adopter dispatching its
421
+ * own `StatusAction` replaces this one too. Nothing re-asserts it. That is
422
+ * harmless while a document is being edited, because a resubmit is skipped
423
+ * once the AST is broken (see {@link doUpdateAndSubmit}) — but NOT at load:
424
+ * the initial `requestModel` submit is not that skipped path, so a diagram
425
+ * opened on an already-broken document shows this band and then loses it to
426
+ * the validation clear a moment later. Measured on a browser host, polling the
427
+ * overlay: no element, empty, the sentence, empty again.
250
428
  */
251
- protected onParseErrorChanged(_document: AstDocument<AstNode, unknown>, broken: boolean): Action[];
429
+ protected onParseErrorChanged(_document: AstDocument<AstNode>, broken: boolean): Action[];
252
430
  /**
253
431
  * Seam: extra actions to dispatch right after the initial settled root is
254
432
  * captured (e.g. an adopter-specific status or palette refresh). Default: none.
255
433
  */
256
434
  protected onSourceModelSettled(_document: AstDocument<AstNode, never>): Action[];
257
- /** The effective {@link SaveConflictPolicy}: the bound option, or {@link DEFAULT_SAVE_CONFLICT_POLICY} when unbound. */
258
- protected get saveConflictPolicy(): SaveConflictPolicy;
259
- /**
260
- * Default save flow: route through `ModelService.save`. The framework
261
- * serialise-and-persist machinery handles serialisation (via the
262
- * language-specific `Serializer` bound at `services.serializer.Serializer`),
263
- * the multi-client text-document update, the rebuild, and the eventual
264
- * `WritableFileSystemProvider.writeFile`.
435
+ /** The effective {@link SaveDeliveryPolicy}: the bound option, or {@link DEFAULT_SAVE_DELIVERY_POLICY} when unbound. */
436
+ protected get saveDeliveryPolicy(): SaveDeliveryPolicy;
437
+ /**
438
+ * Default save flow: persist the store's current text for every document the
439
+ * diagram's session has open.
440
+ *
441
+ * **A save persists, it does not author.** Every diagram gesture already
442
+ * reached the store through the diagram's session, so the store holds the
443
+ * settled text and disk is the only thing behind. Re-serializing from the AST
444
+ * here cannot improve on that text and can only damage it: a serializer
445
+ * normalises formatting, and the comments the write path carries over keep
446
+ * none of the hand-formatting around them, so a save would reflow a document
447
+ * nothing changed — which is what a pure bounds drag does to the semantic
448
+ * file when only its layout moved.
449
+ *
450
+ * **What is saved is the primary, every tracked secondary
451
+ * (`AbstractHydraniumGlspState.trackSecondaryDocument`) and every document
452
+ * that left the write set since the last save**, so a document the diagram
453
+ * wrote is persisted whether or not it is the one the client named. One the
454
+ * diagram's session does not have open is skipped, even when another client
455
+ * has it open: that client's unsaved edits are not the diagram's to persist.
456
+ *
457
+ * **A save therefore names documents the gesture did not aim at**, which is
458
+ * why an unchanged one is not rewritten even though the user asked for a
459
+ * save: the mtime would move on a file they never touched.
460
+ * `AstDocumentManager.save` decides that per document and announces the save
461
+ * either way.
265
462
  *
266
- * The configured {@link SaveConflictPolicy} (see {@link saveConflictPolicy})
267
- * decides how a concurrent edit that advanced the document is handled:
268
- * - `overwrite` (default): no based-on guard, await, propagate failures —
269
- * last-write-wins, correct for a single-editor head.
270
- * - `reject`: guard on the captured `state.version`, await, surface a
271
- * `ConflictError` (and any other failure) to the GLSP save action.
272
- * - `drop-and-log`: guard, fire-and-forget, log + swallow failures — a stale
273
- * diagram save is dropped because a concurrent form/code edit already wrote
274
- * the truth, and GLSP exposes no save-failure back-channel.
463
+ * The configured {@link SaveDeliveryPolicy} (see {@link saveDeliveryPolicy})
464
+ * decides await-vs-fire-and-forget and failure handling. It carries no
465
+ * based-on guard: the guard exists to stop a stale writer overwriting a newer
466
+ * document, and a flush persists the store — which already holds every other
467
+ * client's change, including the one that advanced the version.
275
468
  *
276
469
  * Returns `MaybePromise<void>` to match upstream `SourceModelStorage`:
277
- * resolves with the persist under `overwrite`/`reject`, returns synchronously
278
- * under `drop-and-log`. Adopters that bypass `ModelService` (writing through
279
- * `WritableFileSystemProvider` directly) still override the whole method.
470
+ * resolves with the flush under `await`, returns synchronously under
471
+ * `fire-and-forget`. Adopters that bypass `AstDocumentManager` (writing
472
+ * through `WritableFileSystemProvider` directly) still override the whole
473
+ * method.
280
474
  */
281
475
  saveSourceModel(action: SaveModelAction): MaybePromise<void>;
476
+ /**
477
+ * Save the stored text of `primaryUri`, every tracked secondary and every
478
+ * document that left the write set since the last save, each only where
479
+ * the diagram's session has it open; then close those that left.
480
+ *
481
+ * Deduplicated, because a state that tracks its own primary as a secondary
482
+ * would otherwise save it twice and fire two save notifications for one
483
+ * save. Every save is called in one synchronous step, so each takes its text
484
+ * before anything can close a document of the set: saved one after another,
485
+ * a GLSP session ending during the first write closes the rest unsaved.
486
+ */
487
+ protected flushWriteSet(primaryUri: string): Promise<void>;
282
488
  /**
283
489
  * Normalise GLSP's `sourceUri` — which may be a filesystem PATH or a URI
284
490
  * string — to the URI string the workspace keys documents by.
@@ -305,6 +511,17 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
305
511
  *
306
512
  * Returns it VERBATIM, in whatever form the client sent;
307
513
  * {@link toSourceModelUri} is what normalises it.
514
+ *
515
+ * A model request DOES carry a request id, so a throw here takes the
516
+ * client-request path rather than the toast path — and on that path `detail`
517
+ * comes from `cause?.toString?.()`. A single-argument throw therefore reaches
518
+ * neither the server log nor the client console: both print `undefined`. So
519
+ * the two readers are addressed separately, as on the save path: `message`
520
+ * names what failed in the user's terms and is rendered, `cause` names the
521
+ * action and the option key that was missing and stays English. On THIS path
522
+ * the cause reaches only logs — `RejectAction.detail` is read by nothing but
523
+ * the client action-dispatcher's `logger.warn` — which is not what makes it
524
+ * English; its content is.
308
525
  */
309
526
  protected getSourceUri(action: RequestModelAction): string;
310
527
  /**
@@ -314,12 +531,18 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
314
531
  * {@link AbstractHydraniumGlspState.setSourceRoot}.
315
532
  *
316
533
  * A save action carries no request id, so a throw here reaches the user as a
317
- * toast built from `message`, with `cause` behind its details control. The
318
- * two therefore address different readers and must not be collapsed: the
319
- * message names what failed in the user's terms, and the cause names which
320
- * lookups came back empty for whom. Neither can name the URI — not having
321
- * one IS the failure, and both sources are written together, so the typed
322
- * `sourceUri` is equally empty whenever this fires.
534
+ * toast built from `message`, while `cause` travels in
535
+ * `MessageAction.details` — **which a Theia host DOES put in front of a
536
+ * user**, as a "Show details" button on the toast opening a dialog. So the
537
+ * two are not split by reachability; they are split by AUDIENCE, which is
538
+ * the older rule and the one that holds here. The message names what failed
539
+ * in the user's terms and is rendered; the cause names which lookups came
540
+ * back empty for whom, and stays English because a wire action kind, an
541
+ * option key and a client id address whoever composes the system — a
542
+ * translated developer string is a worse outcome than an untranslated one.
543
+ * Neither can name the URI — not having one IS the failure, and both sources
544
+ * are written together, so the typed `sourceUri` is equally empty whenever
545
+ * this fires.
323
546
  */
324
547
  protected getFileUri(action: SaveModelAction): string;
325
548
  /**
@@ -338,10 +561,14 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
338
561
  refreshDiagnosticMarkers(): Promise<void>;
339
562
  sessionDisposed(_clientSession: ClientSession): void;
340
563
  /**
341
- * Cancel any pending resubmit and drain every subscription — those registered
564
+ * Cancel any pending resubmit, drain every subscription — those registered
342
565
  * during {@link doLoadSourceModel} and the per-secondary ones, which live
343
- * outside {@link toDispose} because they come and go with the write set.
566
+ * outside {@link toDispose} because they come and go with the write set —
567
+ * and end the diagram's client session, closing everything it has open.
344
568
  * Idempotent.
569
+ *
570
+ * The session ends last, once the detach listener is gone: its closes would
571
+ * otherwise report this storage's own teardown as a client detaching.
345
572
  */
346
573
  dispose(): void;
347
574
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-glsp-storage.d.ts","sourceRoot":"","sources":["../../src/storage/hydranium-glsp-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EACJ,KAAK,MAAM,EACX,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,oBAAoB,EAEpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAGf,MAAM,IAAI,UAAU,EACpB,KAAK,YAAY,EAGjB,cAAc,EACd,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,KAAK,qBAAqB,EAAE,KAAK,uBAAuB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEnI,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAEzG,OAAO,EAAgC,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AA8B7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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