@hydranium/core 1.0.0-next.117 → 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 (108) hide show
  1. package/lib/documents/ast-document-manager.d.ts +8 -44
  2. package/lib/documents/ast-document-manager.d.ts.map +1 -1
  3. package/lib/documents/ast-document-manager.js +22 -41
  4. package/lib/documents/ast-document-manager.js.map +1 -1
  5. package/lib/documents/client-session-errors.d.ts +4 -33
  6. package/lib/documents/client-session-errors.d.ts.map +1 -1
  7. package/lib/documents/client-session-errors.js +4 -46
  8. package/lib/documents/client-session-errors.js.map +1 -1
  9. package/lib/documents/client-session-registry.d.ts +40 -20
  10. package/lib/documents/client-session-registry.d.ts.map +1 -1
  11. package/lib/documents/client-session-registry.js +33 -20
  12. package/lib/documents/client-session-registry.js.map +1 -1
  13. package/lib/documents/file-system-task-queue.d.ts +49 -0
  14. package/lib/documents/file-system-task-queue.d.ts.map +1 -0
  15. package/lib/documents/file-system-task-queue.js +34 -0
  16. package/lib/documents/file-system-task-queue.js.map +1 -0
  17. package/lib/documents/hydranium-text-documents.d.ts +138 -13
  18. package/lib/documents/hydranium-text-documents.d.ts.map +1 -1
  19. package/lib/documents/hydranium-text-documents.js +283 -40
  20. package/lib/documents/hydranium-text-documents.js.map +1 -1
  21. package/lib/documents/index.d.ts +1 -0
  22. package/lib/documents/index.d.ts.map +1 -1
  23. package/lib/documents/index.js +1 -0
  24. package/lib/documents/index.js.map +1 -1
  25. package/lib/langium/document-builder/document-builder.d.ts +15 -2
  26. package/lib/langium/document-builder/document-builder.d.ts.map +1 -1
  27. package/lib/langium/document-builder/document-builder.js +15 -2
  28. package/lib/langium/document-builder/document-builder.js.map +1 -1
  29. package/lib/langium/integrity/integrity-service.d.ts +3 -2
  30. package/lib/langium/integrity/integrity-service.d.ts.map +1 -1
  31. package/lib/langium/integrity/integrity-service.js +9 -6
  32. package/lib/langium/integrity/integrity-service.js.map +1 -1
  33. package/lib/langium/language-module.d.ts +2 -2
  34. package/lib/langium/language-module.js +2 -2
  35. package/lib/langium/language-module.js.map +1 -1
  36. package/lib/langium/model-service/client-session.d.ts +203 -24
  37. package/lib/langium/model-service/client-session.d.ts.map +1 -1
  38. package/lib/langium/model-service/client-session.js +233 -29
  39. package/lib/langium/model-service/client-session.js.map +1 -1
  40. package/lib/langium/model-service/model-service.d.ts +62 -217
  41. package/lib/langium/model-service/model-service.d.ts.map +1 -1
  42. package/lib/langium/model-service/model-service.js +54 -357
  43. package/lib/langium/model-service/model-service.js.map +1 -1
  44. package/lib/langium/module.d.ts +11 -1
  45. package/lib/langium/module.d.ts.map +1 -1
  46. package/lib/langium/module.js +5 -1
  47. package/lib/langium/module.js.map +1 -1
  48. package/lib/langium/update-rewrite/update-rewrite.d.ts +1 -1
  49. package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -1
  50. package/lib/langium/workspace/in-memory-file-system-provider.js +10 -2
  51. package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -1
  52. package/lib/langium/workspace/write-lock-scope.d.ts +1 -1
  53. package/lib/langium/workspace/write-lock-scope.js +1 -1
  54. package/lib/lsp/hydranium-document-update-handler.d.ts +69 -67
  55. package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -1
  56. package/lib/lsp/hydranium-document-update-handler.js +111 -89
  57. package/lib/lsp/hydranium-document-update-handler.js.map +1 -1
  58. package/lib/lsp/shared-module.d.ts +4 -8
  59. package/lib/lsp/shared-module.d.ts.map +1 -1
  60. package/lib/lsp/shared-module.js.map +1 -1
  61. package/lib/lsp/start-language-server.d.ts +3 -4
  62. package/lib/lsp/start-language-server.d.ts.map +1 -1
  63. package/lib/lsp/start-language-server.js +3 -4
  64. package/lib/lsp/start-language-server.js.map +1 -1
  65. package/lib/testing/make-test-services.d.ts +16 -4
  66. package/lib/testing/make-test-services.d.ts.map +1 -1
  67. package/lib/testing/make-test-services.js +6 -2
  68. package/lib/testing/make-test-services.js.map +1 -1
  69. package/lib/testing/node/lsp-server-connection.d.ts +1 -1
  70. package/lib/testing/node/scratch-workspace.js +1 -1
  71. package/lib/testing/run-update-pipeline.d.ts +4 -4
  72. package/lib/testing/run-update-pipeline.d.ts.map +1 -1
  73. package/lib/testing/stub-ast-document-manager.d.ts +5 -5
  74. package/lib/testing/stub-ast-document-manager.d.ts.map +1 -1
  75. package/lib/testing/stub-ast-document-manager.js +6 -8
  76. package/lib/testing/stub-ast-document-manager.js.map +1 -1
  77. package/lib/testing/stub-hydranium-text-documents.d.ts +10 -5
  78. package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -1
  79. package/lib/testing/stub-hydranium-text-documents.js +16 -9
  80. package/lib/testing/stub-hydranium-text-documents.js.map +1 -1
  81. package/lib/testing/stub-model-service.d.ts +2 -2
  82. package/lib/testing/stub-model-service.js +2 -2
  83. package/package.json +5 -5
  84. package/src/documents/ast-document-manager.ts +27 -78
  85. package/src/documents/client-session-errors.ts +11 -43
  86. package/src/documents/client-session-registry.ts +54 -28
  87. package/src/documents/file-system-task-queue.ts +68 -0
  88. package/src/documents/hydranium-text-documents.ts +348 -44
  89. package/src/documents/index.ts +1 -0
  90. package/src/langium/document-builder/document-builder.ts +16 -2
  91. package/src/langium/integrity/integrity-service.ts +9 -6
  92. package/src/langium/language-module.ts +4 -4
  93. package/src/langium/model-service/client-session.ts +363 -39
  94. package/src/langium/model-service/model-service.ts +91 -420
  95. package/src/langium/module.ts +14 -2
  96. package/src/langium/update-rewrite/update-rewrite.ts +1 -1
  97. package/src/langium/workspace/in-memory-file-system-provider.ts +11 -2
  98. package/src/langium/workspace/write-lock-scope.ts +1 -1
  99. package/src/lsp/hydranium-document-update-handler.ts +138 -92
  100. package/src/lsp/shared-module.ts +4 -8
  101. package/src/lsp/start-language-server.ts +3 -4
  102. package/src/testing/make-test-services.ts +25 -6
  103. package/src/testing/node/lsp-server-connection.ts +1 -1
  104. package/src/testing/node/scratch-workspace.ts +1 -1
  105. package/src/testing/run-update-pipeline.ts +4 -4
  106. package/src/testing/stub-ast-document-manager.ts +10 -24
  107. package/src/testing/stub-hydranium-text-documents.ts +29 -16
  108. package/src/testing/stub-model-service.ts +2 -2
@@ -6,14 +6,31 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { type MaybePromise, type TransferElement, type TransferSaveArgs, type TransferUpdateArgs } from '@hydranium/protocol';
9
+ import { type BasedOn, type MaybeObservableValue, type MaybePromise, ObservableValue, type Tracer, type TransferElement } from '@hydranium/protocol';
10
10
  import { type AstNode } from '@hydranium/langium';
11
- import { type CancellationToken } from 'vscode-languageserver';
11
+ import { type CancellationToken, type Disposable } from 'vscode-languageserver';
12
12
  import { type AstDocument } from '../../documents/ast-document-manager.js';
13
- import { type OpenOptions } from '../../documents/client-session-registry.js';
13
+ import { type OpenOptions, type SessionEndCause } from '../../documents/client-session-registry.js';
14
+ import { type LogNameOptions } from '../diagnostics/logger.js';
14
15
  import { type ServerSharedServices } from '../module.js';
15
16
  import { type AstDiagnostic } from '../validation/document-validator.js';
16
17
  import { type ModelService } from './model-service.js';
18
+ /** What a session's `update` and `save` write into one document; the session supplies its own client id. */
19
+ export interface ClientSessionWriteArgs<TTransfer> {
20
+ uri: string;
21
+ /** The whole structured model root, or its serialised textual form. */
22
+ model: TTransfer | string;
23
+ /**
24
+ * The version the write was authored against, or `'anything'` to write
25
+ * unconditionally. Required, so an ungated write is a decision the caller
26
+ * makes rather than a field it forgot.
27
+ */
28
+ basedOn: BasedOn;
29
+ }
30
+ /** What a session's `updateAll` writes, all or none. */
31
+ export interface ClientSessionUpdateAllArgs<TTransfer> {
32
+ updates: ClientSessionWriteArgs<TTransfer>[];
33
+ }
17
34
  /**
18
35
  * One participant's handle on the documents it works on, started by
19
36
  * `ModelService.createSession`.
@@ -38,19 +55,29 @@ export interface ClientSession<TAst extends AstNode, TDiagnostic extends AstDiag
38
55
  readonly label: string;
39
56
  /**
40
57
  * Open `uri` for this session, reading it from disk unless some client has
41
- * it open already. `options` are kept for this open until it closes; a
42
- * repeat open, concurrent or not, keeps the options of the first.
58
+ * it open already or it holds this client's unsaved text within its revert
59
+ * grace. `options` are kept for this open until it closes; a repeat open,
60
+ * concurrent or not, keeps the options of the first.
43
61
  */
44
62
  open(uri: string, options?: TOpenOptions): Promise<void>;
63
+ /** The options this session opened `uri` with, or `undefined` when it gave none or does not have `uri` open. */
64
+ openOptions(uri: string): TOpenOptions | undefined;
45
65
  /**
46
66
  * Create a document with `text` and open it for this session. It reaches
47
- * disk on the first `save`. Fails when the file exists or any client has the
48
- * URI open, and of two creates of one URI at most one succeeds.
67
+ * disk on the first `save`. Fails when the file exists, any client has the
68
+ * URI open, or the URI waits out the revert grace, and of two creates of one
69
+ * URI at most one succeeds.
49
70
  */
50
71
  create(uri: string, text: string): Promise<void>;
51
- update(args: Omit<TransferUpdateArgs<TTransfer>, 'clientId'>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
72
+ update(args: ClientSessionWriteArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
73
+ /**
74
+ * Write several documents this session has open, all or none: a
75
+ * `ConflictError` or `DocumentNotOpenError` for any of them is thrown before
76
+ * any text applies. Resolves to the rebuilt documents, in the order given.
77
+ */
78
+ updateAll(args: ClientSessionUpdateAllArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>[]>;
52
79
  /** Write `args.model` as {@link update} does, then persist the document. */
53
- save(args: Omit<TransferSaveArgs<TTransfer>, 'clientId'>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
80
+ save(args: ClientSessionWriteArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
54
81
  /** Close this session's open of `uri`, at once. A no-op when it does not have `uri` open. */
55
82
  close(uri: string): Promise<void>;
56
83
  /**
@@ -62,25 +89,30 @@ export interface ClientSession<TAst extends AstNode, TDiagnostic extends AstDiag
62
89
  withOpen<T>(uri: string, fn: () => MaybePromise<T>): Promise<T>;
63
90
  /** Whether an event's `sourceClientId` names this session, i.e. the event echoes its own write. */
64
91
  isOwnEcho(sourceClientId: string): boolean;
65
- /** End the session: close everything it has open and free its id. Idempotent. */
66
- dispose(): void;
92
+ /**
93
+ * End the session: close everything it has open and free its id.
94
+ * Idempotent. `cause` is `'lost'` when the session ends because its
95
+ * client's connection went away, which lets each document it was the last
96
+ * to have open wait out the store's revert grace; ending it for any other
97
+ * reason reverts such a document at once.
98
+ */
99
+ dispose(cause?: SessionEndCause): void;
67
100
  }
68
101
  /**
69
102
  * The framework's {@link ClientSession}, built by
70
- * `DefaultModelService.newSession`.
103
+ * {@link DefaultClientSessionFactory}.
71
104
  *
72
- * Writes go through the owning `ModelService`, so its overrides apply to a
73
- * session's writes as they do to anyone's. The open rule is enforced there, not
74
- * here, because only the service reaches the point where the text is applied.
105
+ * Override the protected method behind a member to change how every session
106
+ * writes, and return the subclass from a {@link ClientSessionFactory} bound on
107
+ * `model.ClientSessionFactory`. Serialising a model and rebuilding a document
108
+ * are the {@link ModelService}'s.
75
109
  *
76
- * An override of {@link dispose} calls `super.dispose()`: that is what closes
77
- * the session's opens and frees its id.
110
+ * An override of {@link dispose} calls `super.dispose(cause)`: that is what
111
+ * closes the session's opens and frees its id, and dropping `cause` reverts
112
+ * a lost client's documents without their grace.
78
113
  */
79
114
  export declare class DefaultClientSession<TAst extends AstNode, TDiagnostic extends AstDiagnostic = AstDiagnostic, TTransfer extends TransferElement = TransferElement, TOpenOptions extends OpenOptions = OpenOptions> implements ClientSession<TAst, TDiagnostic, TTransfer, TOpenOptions> {
80
- protected readonly modelService: ModelService<TAst, TDiagnostic, TTransfer>;
81
115
  protected readonly services: ServerSharedServices;
82
- readonly clientId: string;
83
- readonly label: string;
84
116
  protected disposed: boolean;
85
117
  /**
86
118
  * This session's opens still under way, by canonical URI. Recorded before
@@ -88,18 +120,99 @@ export declare class DefaultClientSession<TAst extends AstNode, TDiagnostic exte
88
120
  * than racing it, and `withOpen` can tell an open another call is making.
89
121
  */
90
122
  protected readonly pendingOpens: Map<string, Promise<void>>;
91
- constructor(modelService: ModelService<TAst, TDiagnostic, TTransfer>, services: ServerSharedServices, clientId: string, label: string);
123
+ /**
124
+ * The options of this session's opens, by canonical URI. A first open
125
+ * records its entry before the store has the URI open, and the entry goes
126
+ * when that open closes, whoever ends it: this session, or the store for a
127
+ * deleted file. A first open that fails never opens, so nothing closes it
128
+ * and its entry stays until the next first open of the URI overwrites it;
129
+ * {@link openOptions} therefore reads an entry only while the store has the
130
+ * URI open for this session.
131
+ */
132
+ protected readonly openOptionsByUri: Map<string, TOpenOptions | undefined>;
133
+ /** Drops an open's options from {@link openOptionsByUri} when the store closes the open. */
134
+ protected readonly closeListener: Disposable;
135
+ /** Logs under `logName`, `ClientSession` when none is given, with this session's id in a bracket of its own, so a line names the session that wrote. */
136
+ protected readonly tracer: Tracer;
137
+ /** The service bound on `model.ModelService`, which serialises and rebuilds for this session. */
138
+ protected readonly modelService: ModelService<TAst, TDiagnostic, TTransfer>;
139
+ /** See {@link ClientSessionFactoryOptions.slowUpdateWarnMs}; `undefined` when not set. */
140
+ protected readonly slowUpdateWarn?: ObservableValue<number>;
141
+ readonly clientId: string;
142
+ readonly label: string;
143
+ constructor(services: ServerSharedServices, options: ClientSessionOptions);
92
144
  open(uri: string, options?: TOpenOptions): Promise<void>;
145
+ openOptions(uri: string): TOpenOptions | undefined;
93
146
  create(uri: string, text: string): Promise<void>;
94
- update(args: Omit<TransferUpdateArgs<TTransfer>, 'clientId'>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
95
- save(args: Omit<TransferSaveArgs<TTransfer>, 'clientId'>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
147
+ update(args: ClientSessionWriteArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
148
+ updateAll(args: ClientSessionUpdateAllArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>[]>;
149
+ save(args: ClientSessionWriteArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
96
150
  close(uri: string): Promise<void>;
97
151
  withOpen<T>(uri: string, fn: () => MaybePromise<T>): Promise<T>;
98
152
  isOwnEcho(sourceClientId: string): boolean;
99
- dispose(): void;
153
+ dispose(cause?: SessionEndCause): void;
100
154
  protected assertLive(): void;
155
+ /** Throw `DocumentNotOpenError` unless this session has `uri` open. */
156
+ protected assertOpen(uri: string): void;
157
+ /**
158
+ * Throw `ConflictError` when `basedOn` names a version other than
159
+ * `currentVersion`. A write calls it at the door and again in the
160
+ * synchronous step that applies the text, and has to call it synchronously
161
+ * there: a check separated from the apply by an await lets two writes based
162
+ * on one version both apply.
163
+ */
164
+ protected assertBasedOn(uri: string, basedOn: BasedOn, currentVersion: number): void;
165
+ /**
166
+ * Serialise `args.model`, apply it to the store under this session's id,
167
+ * rebuild, and resolve to the rebuilt document.
168
+ *
169
+ * The open check and the `basedOn` gate run at the door, so a write that
170
+ * cannot land is refused before any adopter serialiser runs, and again in
171
+ * the synchronous step that applies the text: made only before the
172
+ * serialiser's await, a close during it lets the write land on a document
173
+ * this session no longer has open, and two writes based on one version
174
+ * both apply.
175
+ *
176
+ * Resolves with the latest build of the document, which may already carry
177
+ * a newer write; that is logged at debug, and a slow update at warn when
178
+ * `ClientSessionFactoryOptions.slowUpdateWarnMs` is set.
179
+ */
180
+ protected updateDocument(args: ClientSessionWriteArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
181
+ /**
182
+ * Write every document of `args.updates`, all or none: every model is
183
+ * serialised first, then every open check and `basedOn` gate runs and every
184
+ * text is applied in one synchronous step. Checked at the door as well, so
185
+ * a stale set is refused before any adopter serialiser runs.
186
+ *
187
+ * The apply step relies on `AstDocumentManager.update` applying its text
188
+ * before its first await, as the default does: an override that awaits first
189
+ * lets another write land between two documents of the set.
190
+ */
191
+ protected updateDocuments(args: ClientSessionUpdateAllArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>[]>;
192
+ /**
193
+ * Write `args.model` through {@link updateDocument}, so an override of it
194
+ * applies to saves too, then persist the document.
195
+ *
196
+ * Fails with `DocumentNotOpenError` and writes nothing when this session
197
+ * closes the URI while the text is being built: the check sits in the same
198
+ * synchronous step as the manager taking the text. Checked any earlier, a
199
+ * session that closes the URI during the rebuild still has the shared
200
+ * text, other clients' edits included, written in its name. Once taken,
201
+ * the write completes whatever the session does next.
202
+ */
203
+ protected saveDocument(args: ClientSessionWriteArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
204
+ protected closeDocument(uri: string): Promise<void>;
101
205
  /** Open `uri`, or join the open of it this session already has under way, whose options then stand. */
102
206
  protected openDocument(uri: string, options: TOpenOptions | undefined): Promise<void>;
207
+ /**
208
+ * Open `uri` in the store for this session. The open path does not thread
209
+ * cancellation: the file read behind it takes no token, so a cancelled
210
+ * caller still completes the open.
211
+ *
212
+ * A first open records its options before the store opens the URI, so a
213
+ * listener of the store's open reads this open's options rather than an
214
+ * earlier one's.
215
+ */
103
216
  protected registerOpen(uri: string, options: TOpenOptions | undefined): Promise<void>;
104
217
  protected canonicalKey(uri: string): string;
105
218
  protected createDocument(uri: string, text: string): Promise<void>;
@@ -117,4 +230,70 @@ export declare class DefaultClientSession<TAst extends AstNode, TDiagnostic exte
117
230
  */
118
231
  protected rejectIfEnded(uri: string, wasOpen: boolean): Promise<void>;
119
232
  }
233
+ /** Constructor options for {@link DefaultClientSessionFactory}. */
234
+ export interface ClientSessionFactoryOptions extends LogNameOptions {
235
+ /**
236
+ * The name the factory and every session it builds log under, so one
237
+ * option renames both. Default: `ClientSessionFactory` for the factory,
238
+ * and `ClientSession` for a session, which adds its client id in a bracket
239
+ * of its own.
240
+ */
241
+ readonly logName?: string;
242
+ /**
243
+ * When set, a session's `update` logs a `warn` line if its end-to-end wait
244
+ * (serialise, apply, rebuild) takes at least this many milliseconds. Default
245
+ * `undefined`: no warn line, and no per-update stopwatch.
246
+ *
247
+ * Observability only: the update is neither aborted nor resolved
248
+ * differently. A hard timeout that throws is an override of
249
+ * `DefaultClientSession.updateDocument` racing the parent call against a
250
+ * deadline.
251
+ *
252
+ * A recommended starting threshold is 2-5 seconds; workspaces with very
253
+ * large documents or slow validation can exceed 5 s on a cold build. A
254
+ * `Settings.number` binding retunes it live.
255
+ */
256
+ readonly slowUpdateWarnMs?: MaybeObservableValue<number>;
257
+ }
258
+ /**
259
+ * Constructor options for {@link DefaultClientSession}: the factory's options,
260
+ * which it forwards, plus the session's identity.
261
+ */
262
+ export interface ClientSessionOptions extends ClientSessionFactoryOptions {
263
+ readonly clientId: string;
264
+ /** What the session is. Pass one: the client id stands in for it otherwise. */
265
+ readonly label?: string;
266
+ }
267
+ /**
268
+ * Builds the handle for a session `ModelService.createSession` has already
269
+ * registered, so registration and the uniqueness check cannot be skipped by
270
+ * binding a factory of one's own. Bind one on `model.ClientSessionFactory` to
271
+ * use a session class of your own. A factory that does not pass
272
+ * {@link ClientSessionFactoryOptions.slowUpdateWarnMs} on to its sessions
273
+ * loses their slow-update warn; subclassing {@link DefaultClientSessionFactory}
274
+ * keeps it.
275
+ *
276
+ * Typed for every grammar, since the slot is shared: `createSession` narrows
277
+ * the result to its caller's types.
278
+ */
279
+ export interface ClientSessionFactory {
280
+ create(clientId: string, label: string): ClientSession<AstNode>;
281
+ }
282
+ /**
283
+ * The framework's {@link ClientSessionFactory}: a {@link DefaultClientSession}
284
+ * over the {@link ModelService} bound on `model.ModelService`, which the session
285
+ * serialises and rebuilds through. A model service constructed outside that
286
+ * slot therefore starts sessions that write through the bound one.
287
+ *
288
+ * A subclass that overrides {@link create} to build a session class of its
289
+ * own passes {@link options} on to that session's constructor; a session built
290
+ * without them has no slow-update warn and logs under the default name.
291
+ */
292
+ export declare class DefaultClientSessionFactory implements ClientSessionFactory {
293
+ protected readonly services: ServerSharedServices;
294
+ protected readonly options: ClientSessionFactoryOptions;
295
+ protected readonly tracer: Tracer;
296
+ constructor(services: ServerSharedServices, options?: ClientSessionFactoryOptions);
297
+ create(clientId: string, label: string): ClientSession<AstNode>;
298
+ }
120
299
  //# sourceMappingURL=client-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-session.d.ts","sourceRoot":"","sources":["../../../src/langium/model-service/client-session.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9H,OAAO,EAAE,KAAK,OAAO,EAAY,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aAAa,CAC3B,IAAI,SAAS,OAAO,EACpB,WAAW,SAAS,aAAa,GAAG,aAAa,EACjD,SAAS,SAAS,eAAe,GAAG,eAAe,EACnD,YAAY,SAAS,WAAW,GAAG,WAAW;IAE9C,gHAAgH;IAChH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YA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