@hydranium/data-server 1.0.0-next.187 → 1.0.0-next.189

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.
package/README.md CHANGED
@@ -29,8 +29,8 @@ Installed by the server process that already composes
29
29
  (`DataServerOptions.subscriptionPhase`, `DocumentState.Validated` by default),
30
30
  `onDocumentSaved` on a separate channel, `onDocumentDirtyChanged` when a
31
31
  subscribed document starts or stops differing from its file (every document
32
- the head sends that it holds also carries its current `dirty`, and a
33
- `textHash` of its text), `onDocumentDeleted` (a deleted document has no built
32
+ the head sends that it holds also carries its `text` block: version, hash
33
+ and current `dirty`), `onDocumentDeleted` (a deleted document has no built
34
34
  state to carry, and the build-phase path never runs for one),
35
35
  `onDocumentsBuilt` once per build for the documents nobody watches — chiefly
36
36
  those rebuilt as a cascade, which no filesystem watcher can see because their
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { DisposableCollection, ReferenceSource, type CloseModelArgs, type HydraniumMessageData, type HydraniumResponseError, type Disposable, type ElementSource, type FindNextNameArgs, type LatencyCollector, type LatencyReport, type OpenModelArgs, type Project, type ReferenceCandidate, type ReferenceContext, type ReferenceRequest, type ReferenceTarget, type Tracer, type TransferDiagnostic, TransferDocument, type TransferElement } from '@hydranium/protocol';
9
+ import { DisposableCollection, ReferenceSource, type CloseModelArgs, type HydraniumMessageData, type HydraniumResponseError, type Disposable, type ElementSource, type FindNextNameArgs, type LatencyCollector, type LatencyReport, type OpenModelArgs, type Project, type ReferenceCandidate, type ReferenceContext, type ReferenceRequest, type ReferenceTarget, type ModelVersion, type TextState, type Tracer, type TransferDiagnostic, TransferDocument, type TransferElement } from '@hydranium/protocol';
10
10
  import { type DataClientProtocol, type DataServerDiagnosticsProtocol, type DataServerProtocol, type DumpServerStateArgs, type StartProfilingArgs, type StopProfilingArgs, type WriteServerHeapSnapshotArgs, type CloseSessionArgs, type CreateModelDocumentArgs, type CreateSessionArgs, type GetModelDocumentArgs, type GetProjectForUriArgs, type TransferSaveDocumentArgs, type WatchModelDocumentArgs, type TransferUpdateDocumentArgs, type TransferUpdateDocumentsArgs } from '@hydranium/protocol/data';
11
11
  /**
12
12
  * Raised when a profiling command arrives with no capture running.
@@ -39,7 +39,7 @@ export declare const referenceSettleTimeoutError: (elapsedMs: number) => Respons
39
39
  readonly elapsedMs: number;
40
40
  }>;
41
41
  import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
42
- import type { ClientSession, ClientSessionWriteArgs, ClientTextDocumentChangeEvent, DocumentDirtyChangedEvent, HydraniumLanguageServices, LogNameOptions, AstDiagnostic, AstDocument, ModelService, ProjectChangeEvent, ServerSharedServices, SessionEndCause, TransferEncoder } from '@hydranium/core';
42
+ import type { ClientSession, ClientSessionWriteArgs, ClientTextDocumentChangeEvent, DocumentDirtyChangedEvent, HydraniumLanguageServices, LogNameOptions, AstDiagnostic, AstDocument, EncodedTransferDocument, ModelService, ProjectChangeEvent, ServerSharedServices, SessionEndCause, TransferEncoder } from '@hydranium/core';
43
43
  import type { TextDocument } from 'vscode-languageserver-textdocument';
44
44
  import { type AstNode, DocumentState, type LangiumDocument, type URI } from '@hydranium/langium';
45
45
  import { type CancellationToken, type MessageConnection, ResponseError } from 'vscode-jsonrpc';
@@ -63,9 +63,9 @@ export interface ResumableSession {
63
63
  * folded in on a cascade rebuild that leaves the document's own text
64
64
  * untouched. Safe for any adopter whose AST extensions fold derived state
65
65
  * into the transfer projection (the framework norm).
66
- * - `'text-diagnostics'` — the cheaper `getText()` + diagnostics hash. An
67
- * opt-DOWN for adopters that fold no derived state and want to avoid the
68
- * transfer-encode per phase event.
66
+ * - `'text-diagnostics'` — the cheaper parsed-text + diagnostics hash. An
67
+ * opt-DOWN for adopters that fold no derived state and want to avoid
68
+ * stringifying the transfer root per phase event.
69
69
  */
70
70
  export type FingerprintStrategy = 'transfer-document' | 'text-diagnostics';
71
71
  /**
@@ -226,6 +226,13 @@ export interface DataServerUriWatchRecord {
226
226
  readonly watchers: Set<string>;
227
227
  /** Digest of the last emitted state, or of the state a first watch found; see {@link DataServer.dispatchPhaseEvent} for why it de-duplicates, {@link DataServer.computeDocumentFingerprint} for its inputs. */
228
228
  fingerprint?: string;
229
+ /**
230
+ * The version {@link DataServerUriWatchRecord.fingerprint} was taken at; an
231
+ * event goes out when either moves. Not {@link DataServerUriWatchRecord.sentVersion}:
232
+ * a first watch sets this and sends nothing, so the next event at its
233
+ * version still carries the manager's attribution.
234
+ */
235
+ fingerprintVersion?: ModelVersion;
229
236
  /** Set by {@link DataServer.subscribeToTextDocumentCloses}; the next phase event broadcasts even without a watcher. */
230
237
  revertPending?: boolean;
231
238
  /**
@@ -260,6 +267,10 @@ export interface DataServerUriWatchRecord {
260
267
  * adopters subclass ONLY when they need to decorate wire returns or
261
268
  * notifications. The usual adoption path is DI rebinds alone.
262
269
  *
270
+ * **`TTransfer` is not checked.** It declares the union of the transfer roots
271
+ * the workspace's languages produce. Which root a document has is known only
272
+ * at runtime, from its language, so a `TTransfer` missing a language compiles.
273
+ *
263
274
  * Lifecycle: the constructor registers framework request handlers (plus
264
275
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
265
276
  * builds the {@link DataClientProtocol} notification proxy on the same
@@ -385,12 +396,6 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
385
396
  * fails, `rollback` undoes the open this call made before the failure is
386
397
  * rethrown: the caller sees no open, so nothing on its side would ever close
387
398
  * it.
388
- *
389
- * Versioned with the store's shared version rather than the snapshot's own:
390
- * the built document's `textDocument.version` lags the store's whenever the
391
- * store assigned the version, and the store's is what a write's `basedOn` is
392
- * compared against, so reporting the snapshot's would make the caller's
393
- * first based-on write conflict with itself.
394
399
  */
395
400
  protected openedSnapshot(uri: string, rollback?: () => Promise<void>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
396
401
  closeModelDocument(args: CloseModelArgs): Promise<void>;
@@ -471,7 +476,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
471
476
  */
472
477
  protected awaitReferencesLinked(source: ReferenceSource): Promise<void>;
473
478
  findReferenceCandidates(ctx: ReferenceContext): Promise<ReferenceCandidate[]>;
474
- resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined>;
479
+ resolveReference<TElement extends TransferElement = TransferElement>(ref: ReferenceRequest): Promise<ReferenceTarget<TElement> | undefined>;
475
480
  findNextName(args: FindNextNameArgs): Promise<string>;
476
481
  /**
477
482
  * Resolve the per-language `references` services for a reference source.
@@ -559,32 +564,31 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
559
564
  /**
560
565
  * Build a {@link TransferDocument} envelope from the current document state,
561
566
  * delegating root + diagnostic encoding to {@link encoder} (see
562
- * `TransferEncoder.toTransferDocument` for the walk).
563
- *
564
- * The encoder field's generic-map binding is widened to
565
- * `Record<string, TransferElement>` at the framework-default level, and an
566
- * adopter supplying a typed-overlay encoder narrows the runtime shape to
567
- * its wire types. The cast on the return is where that invariant — the
568
- * adopter's `TTransfer` matches its encoder's overlay — is asserted, at a
569
- * single boundary point rather than spread across the callers.
567
+ * `TransferEncoder.toTransferDocument` for the walk). `fingerprint` is the
568
+ * caller's {@link computeDocumentFingerprint} of that same state, which
569
+ * spares hashing it twice.
570
570
  */
571
- protected envelope(uri: URI): TransferDocument<TTransfer, TDiagnostic>;
571
+ protected envelope(uri: URI, fingerprint?: string): TransferDocument<TTransfer, TDiagnostic>;
572
572
  /**
573
- * The transfer document a request answers with for `astDocument`, the
574
- * store's current `dirty` and `textHash` stamped on it by
575
- * {@link withServerState}. Every document a request answers with goes
576
- * through here, so none goes out without the stamp.
573
+ * The transfer document a request answers with for `astDocument`, its model
574
+ * hashed and the text stamped on it by {@link withServerState}. Every
575
+ * document a request answers with goes through here, so none goes out
576
+ * without them.
577
577
  */
578
578
  protected encodeDocument(astDocument: AstDocument<AstNode, AstDiagnostic>): TransferDocument<TTransfer, TDiagnostic>;
579
579
  /**
580
- * `document` with the store's current {@link TransferDocument.dirty} and
581
- * the {@link TransferDocument.textHash} of the text the server holds for
582
- * it: the store's text while a client has it open, the build's otherwise.
583
- * Both are read when the document is sent rather than kept with the build:
584
- * a save changes `dirty` without a rebuild, and the store's text moves on
585
- * before the build that follows it.
580
+ * `encoded` with `hash` on its model and the text the server holds for it:
581
+ * the store's while it holds the document, the build's otherwise. The text
582
+ * is read when the document is sent rather than kept with the build: a save
583
+ * changes `text.dirty` without a rebuild, and the store's text moves on before
584
+ * the build that follows it.
586
585
  */
587
- protected withServerState(document: TransferDocument<TTransfer, TDiagnostic>): TransferDocument<TTransfer, TDiagnostic>;
586
+ protected withServerState(encoded: EncodedTransferDocument<TransferElement, TDiagnostic>, hash: string): TransferDocument<TTransfer, TDiagnostic>;
587
+ /**
588
+ * The text a build read for a document the store never held, which is
589
+ * clean: the store holds every text a client gave it.
590
+ */
591
+ protected builtTextState(uri: string): TextState | undefined;
588
592
  /**
589
593
  * Subscribe one listener at the configured {@link DataServerOptions.subscriptionPhase}.
590
594
  * The listener dispatches subscription events for every matching URI. A
@@ -726,7 +730,9 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
726
730
  * {@link subscribeToTextDocumentCloses}).
727
731
  *
728
732
  * An event for a rebuild with no observable change since the last emit is
729
- * suppressed against the URI's fingerprint. Such rebuilds are routine: a
733
+ * suppressed against the URI's fingerprint and the version it was taken at;
734
+ * a new version with the same fingerprint goes out with the same
735
+ * `model.hash`, so a watcher still learns the version. Such rebuilds are routine: a
730
736
  * second client attaching to an open document makes
731
737
  * `HydraniumTextDocuments.refreshContent` fire `onDidChangeContent` purely
732
738
  * to re-trigger the build, and Langium rebuilds a document when a
@@ -742,27 +748,19 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
742
748
  */
743
749
  protected dispatchPhaseEvent(document: LangiumDocument, cancelToken: CancellationToken): void;
744
750
  /**
745
- * Fingerprint of the document's observable state, used to de-dup
746
- * `onDocumentUpdated` emissions. The {@link FingerprintStrategy} option
747
- * selects what is hashed (default `'transfer-document'` — see the type), and
748
- * {@link additionalFingerprintInputs} folds in any extra adopter signal.
751
+ * Fingerprint of the snapshot `root` and its encoding `encoded`, used to
752
+ * de-dup `onDocumentUpdated` emissions and sent as every document's
753
+ * `model.hash`, so it must not depend on the version or on live state. The
754
+ * {@link FingerprintStrategy} option selects what is hashed (default
755
+ * `'transfer-document'` — see the type).
749
756
  *
750
- * The default `'transfer-document'` strategy goes through the encoder's
751
- * {@link TransferEncoder.toTransferDocument}, which is cached per build —
752
- * so within one phase event the fingerprint and the subsequently-emitted
753
- * `envelope` share a single encode walk.
757
+ * {@link TransferEncoder.toTransferDocument} is cached per build, so within
758
+ * one phase event the fingerprint and the subsequently-emitted `envelope`
759
+ * share a single encode walk.
754
760
  *
755
761
  * Wrapped in {@link Tracer.time} against {@link FINGERPRINT_LOG_AFTER_MS}.
756
762
  */
757
- protected computeDocumentFingerprint(document: LangiumDocument): string;
758
- /**
759
- * Extra inputs folded into {@link computeDocumentFingerprint} alongside the
760
- * chosen {@link FingerprintStrategy}. Default: none. Override to contribute a
761
- * signal that lives outside the document's text / root / diagnostics — each
762
- * entry need only be stable across equivalent emissions and
763
- * JSON-serialisable.
764
- */
765
- protected additionalFingerprintInputs(_document: LangiumDocument): readonly unknown[];
763
+ protected computeDocumentFingerprint(root: AstNode, encoded: EncodedTransferDocument<TransferElement, TDiagnostic>): string;
766
764
  /**
767
765
  * Subscribe to the project tier's change channel and re-fan registry
768
766
  * diffs into per-project wire notifications. The internal
@@ -1 +1 @@
1
- {"version":3,"file":"data-server.d.ts","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAGJ,oBAAoB,EAOpB,eAAe,EAGf,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,g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,CAAC,CAa5D;IAEK,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAY5D;IAEK,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC,CAEzC;IAED,oEAAoE;IACpE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,yBAAyB,CAmB9E;CACH"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { createRpcProxy, defineMessage, DisposableCollection, HYDRANIUM_ERROR_CODES, isDocumentSource, isElementSource, isSyntheticSource, messageData, messageError, ReferenceSource, SessionClosedError, TIMED_OUT, TransferDocument, UNKNOWN_CLIENT_ID, asSnapshotVersion, textHash } from '@hydranium/protocol';
9
+ import { createRpcProxy, defineMessage, DisposableCollection, HYDRANIUM_ERROR_CODES, isDocumentSource, isElementSource, isSyntheticSource, messageData, messageError, ReferenceSource, SessionClosedError, TIMED_OUT, TransferDocument, UNKNOWN_CLIENT_ID, textHash } from '@hydranium/protocol';
10
10
  import { DATA_SERVER_DIAGNOSTICS_METHODS, DATA_SERVER_PROTOCOL_METHODS, DATA_SERVER_WIRE_PREFIX } from '@hydranium/protocol/data';
11
11
  import { REVERT_ON_CLOSE_CLIENT_ID } from '@hydranium/core';
12
12
  import { defaultDataServerDiagnostics } from './default-diagnostics.js';
@@ -57,15 +57,25 @@ const FINGERPRINT_SEPARATOR = '\0';
57
57
  */
58
58
  const SERVER_CANCELLED = -32802;
59
59
  const resumableByModelService = new WeakMap();
60
- /** Hash a document's raw text + diagnostics — the `'text-diagnostics'` strategy. */
61
- function textDiagnosticsFingerprint(document) {
62
- return textHash([document.textDocument.getText(), FINGERPRINT_SEPARATOR, JSON.stringify(document.diagnostics ?? [])]);
60
+ /**
61
+ * Hash `text`, the text the model was parsed from, + `model`'s diagnostics — the `'text-diagnostics'` strategy.
62
+ * The text comes from the root's ledger record or CST, as the document's own may have moved on,
63
+ * and a repair in place leaves the CST on the unrepaired text;
64
+ * a root built without a CST hashes as `'transfer-document'`.
65
+ * Absent diagnostics must hash apart from `[]`, as in {@link transferDocumentFingerprint}.
66
+ */
67
+ function textDiagnosticsFingerprint(text, model) {
68
+ return text === undefined
69
+ ? transferDocumentFingerprint(model)
70
+ : textHash([text, FINGERPRINT_SEPARATOR, JSON.stringify(model.diagnostics ?? null)]);
63
71
  }
64
- /** Hash an encoded transfer document's root + diagnostics — the `'transfer-document'` strategy. */
65
- function transferDocumentFingerprint(transferDocument) {
66
- // null, not undefined: `JSON.stringify(undefined)` yields undefined rather
67
- // than a string, putting a non-string into the hash inputs.
68
- return textHash([JSON.stringify(transferDocument.root ?? null), FINGERPRINT_SEPARATOR, JSON.stringify(transferDocument.diagnostics)]);
72
+ /**
73
+ * Hash an encoded model's root + diagnostics — the `'transfer-document'` strategy.
74
+ * Absent diagnostics must hash apart from `[]`: a client skipping a render on an
75
+ * equal hash would otherwise miss a validation that found nothing.
76
+ */
77
+ function transferDocumentFingerprint(model) {
78
+ return textHash([JSON.stringify(model.root), FINGERPRINT_SEPARATOR, JSON.stringify(model.diagnostics ?? null)]);
69
79
  }
70
80
  /**
71
81
  * `logAfterMs` threshold passed to {@link Tracer.time} around
@@ -96,6 +106,10 @@ const FINGERPRINT_LOG_AFTER_MS = 5;
96
106
  * adopters subclass ONLY when they need to decorate wire returns or
97
107
  * notifications. The usual adoption path is DI rebinds alone.
98
108
  *
109
+ * **`TTransfer` is not checked.** It declares the union of the transfer roots
110
+ * the workspace's languages produce. Which root a document has is known only
111
+ * at runtime, from its language, so a `TTransfer` missing a language compiles.
112
+ *
99
113
  * Lifecycle: the constructor registers framework request handlers (plus
100
114
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
101
115
  * builds the {@link DataClientProtocol} notification proxy on the same
@@ -338,7 +352,7 @@ export class DataServer {
338
352
  * through an override of this.
339
353
  */
340
354
  toSessionWrite(request) {
341
- return { uri: request.uri, model: request.model, basedOn: request.basedOn };
355
+ return { uri: request.uri, model: request.model, baseVersion: request.baseVersion };
342
356
  }
343
357
  /**
344
358
  * The session this connection registered under `clientId`, which every
@@ -365,26 +379,16 @@ export class DataServer {
365
379
  * fails, `rollback` undoes the open this call made before the failure is
366
380
  * rethrown: the caller sees no open, so nothing on its side would ever close
367
381
  * it.
368
- *
369
- * Versioned with the store's shared version rather than the snapshot's own:
370
- * the built document's `textDocument.version` lags the store's whenever the
371
- * store assigned the version, and the store's is what a write's `basedOn` is
372
- * compared against, so reporting the snapshot's would make the caller's
373
- * first based-on write conflict with itself.
374
382
  */
375
383
  async openedSnapshot(uri, rollback) {
376
- let document;
377
384
  try {
378
- document = await this.getModelDocument({ uri });
385
+ return await this.getModelDocument({ uri });
379
386
  }
380
387
  catch (error) {
381
388
  // The open's failure is the one the caller needs, not the cleanup's.
382
389
  await rollback?.().catch(() => undefined);
383
390
  throw error;
384
391
  }
385
- // Stamped again with the version, in one step: a write landing after the
386
- // read would otherwise pair its version with the read's text hash.
387
- return this.withServerState({ ...document, version: asSnapshotVersion(this.services.workspace.TextDocuments.version(uri)) });
388
392
  }
389
393
  async closeModelDocument(args) {
390
394
  // Through the handle, so a close under an ended session fails as that
@@ -413,7 +417,7 @@ export class DataServer {
413
417
  }
414
418
  catch (error) {
415
419
  // The protocol answers a read of a URI with no document with an
416
- // envelope that has no root.
420
+ // envelope that has no model.
417
421
  if (this.isMissingDocument(error, args.uri)) {
418
422
  return this.envelope(UriUtils.toUri(args.uri));
419
423
  }
@@ -449,8 +453,9 @@ export class DataServer {
449
453
  record.watchers.add(args.clientId);
450
454
  if (record.fingerprint === undefined) {
451
455
  const document = this.services.workspace.LangiumDocuments.getDocument(UriUtils.toUri(uri));
452
- if (document) {
453
- record.fingerprint = this.computeDocumentFingerprint(document);
456
+ if (document && !this.services.workspace.ModelLedger.isPlaceholder(document.parseResult.value)) {
457
+ record.fingerprint = this.computeDocumentFingerprint(document.parseResult.value, this.encoder.toTransferDocument(document));
458
+ record.fingerprintVersion = this.services.workspace.ModelLedger.versionOf(document.parseResult.value);
454
459
  }
455
460
  }
456
461
  }
@@ -480,6 +485,7 @@ export class DataServer {
480
485
  }
481
486
  if (record.revertPending) {
482
487
  record.fingerprint = undefined;
488
+ record.fingerprintVersion = undefined;
483
489
  }
484
490
  else {
485
491
  this.uriWatchRecords.delete(uri);
@@ -581,8 +587,8 @@ export class DataServer {
581
587
  if (!resolved) {
582
588
  return undefined;
583
589
  }
584
- const element = this.encoder.toTransfer(resolved.node);
585
- return { ...resolved.candidate, element };
590
+ // The caller's claim about the target's type; see `ReferenceServerProtocol.resolveReference`.
591
+ return { ...resolved.candidate, element: this.encoder.toTransfer(resolved.node) };
586
592
  }
587
593
  async findNextName(args) {
588
594
  const uri = UriUtils.toUri(args.uri);
@@ -783,55 +789,65 @@ export class DataServer {
783
789
  /**
784
790
  * Build a {@link TransferDocument} envelope from the current document state,
785
791
  * delegating root + diagnostic encoding to {@link encoder} (see
786
- * `TransferEncoder.toTransferDocument` for the walk).
787
- *
788
- * The encoder field's generic-map binding is widened to
789
- * `Record<string, TransferElement>` at the framework-default level, and an
790
- * adopter supplying a typed-overlay encoder narrows the runtime shape to
791
- * its wire types. The cast on the return is where that invariant — the
792
- * adopter's `TTransfer` matches its encoder's overlay — is asserted, at a
793
- * single boundary point rather than spread across the callers.
792
+ * `TransferEncoder.toTransferDocument` for the walk). `fingerprint` is the
793
+ * caller's {@link computeDocumentFingerprint} of that same state, which
794
+ * spares hashing it twice.
794
795
  */
795
- envelope(uri) {
796
+ envelope(uri, fingerprint) {
796
797
  // Resolve through the model service's canonicalizing gateway rather than
797
798
  // reaching into `LangiumDocuments` directly, so a divergent (symlink) URI
798
799
  // still finds the document the build keys by its real path — and so the
799
800
  // data-server never has to remember to canonicalize this lookup itself.
800
801
  const document = this.modelService.getDocument(uri.toString());
801
- if (!document) {
802
+ if (!document || this.services.workspace.ModelLedger.isPlaceholder(document.parseResult.value)) {
802
803
  // No document — a shaped envelope rather than a throw, so the caller
803
- // decides policy at its own layer; `root` is optional on the envelope
804
+ // decides policy at its own layer; `model` is optional on the envelope
804
805
  // so the compiler forces that decision. Adopters preferring to throw
805
- // override `envelope`.
806
+ // override `envelope`. The builder's unparsed placeholder is no
807
+ // document either: its root parses no text.
806
808
  return TransferDocument.absent(uri.toString());
807
809
  }
808
- return this.withServerState(this.encoder.toTransferDocument(document));
810
+ const encoded = this.encoder.toTransferDocument(document);
811
+ return this.withServerState(encoded, fingerprint ?? this.computeDocumentFingerprint(document.parseResult.value, encoded));
809
812
  }
810
813
  /**
811
- * The transfer document a request answers with for `astDocument`, the
812
- * store's current `dirty` and `textHash` stamped on it by
813
- * {@link withServerState}. Every document a request answers with goes
814
- * through here, so none goes out without the stamp.
814
+ * The transfer document a request answers with for `astDocument`, its model
815
+ * hashed and the text stamped on it by {@link withServerState}. Every
816
+ * document a request answers with goes through here, so none goes out
817
+ * without them.
815
818
  */
816
819
  encodeDocument(astDocument) {
817
- return this.withServerState(this.encoder.astDocumentToTransferDocument(astDocument));
820
+ const encoded = this.encoder.astDocumentToTransferDocument(astDocument);
821
+ return this.withServerState(encoded, this.computeDocumentFingerprint(astDocument.root, encoded));
818
822
  }
819
823
  /**
820
- * `document` with the store's current {@link TransferDocument.dirty} and
821
- * the {@link TransferDocument.textHash} of the text the server holds for
822
- * it: the store's text while a client has it open, the build's otherwise.
823
- * Both are read when the document is sent rather than kept with the build:
824
- * a save changes `dirty` without a rebuild, and the store's text moves on
825
- * before the build that follows it.
824
+ * `encoded` with `hash` on its model and the text the server holds for it:
825
+ * the store's while it holds the document, the build's otherwise. The text
826
+ * is read when the document is sent rather than kept with the build: a save
827
+ * changes `text.dirty` without a rebuild, and the store's text moves on before
828
+ * the build that follows it.
826
829
  */
827
- withServerState(document) {
828
- const text = (this.services.workspace.TextDocuments.get(document.uri) ?? this.modelService.getDocument(document.uri)?.textDocument)?.getText();
830
+ withServerState(encoded, hash) {
831
+ const text = this.services.workspace.TextDocuments.textState(encoded.uri) ?? this.builtTextState(encoded.uri);
832
+ if (text && text.version > encoded.model.version) {
833
+ this.tracer.withUri(encoded.uri).debug(`Send a model behind its text: model v${encoded.model.version} / text v${text.version}`);
834
+ }
829
835
  return {
830
- ...document,
831
- dirty: this.services.workspace.TextDocuments.isDirty(document.uri),
832
- ...(text === undefined ? {} : { textHash: textHash(text) })
836
+ uri: encoded.uri,
837
+ // The encoder returns the structural base; `TTransfer` is the adopter's
838
+ // declaration of the roots its languages produce, and nothing checks it.
839
+ model: { ...encoded.model, hash },
840
+ ...(text ? { text } : {})
833
841
  };
834
842
  }
843
+ /**
844
+ * The text a build read for a document the store never held, which is
845
+ * clean: the store holds every text a client gave it.
846
+ */
847
+ builtTextState(uri) {
848
+ const textDocument = this.modelService.getDocument(uri)?.textDocument;
849
+ return textDocument && { version: textDocument.version, hash: textHash(textDocument.getText()), dirty: false };
850
+ }
835
851
  /**
836
852
  * Subscribe one listener at the configured {@link DataServerOptions.subscriptionPhase}.
837
853
  * The listener dispatches subscription events for every matching URI. A
@@ -920,7 +936,7 @@ export class DataServer {
920
936
  dispatchDirtyEvent(event) {
921
937
  const uri = this.canonicalKey(event.uri);
922
938
  if (this.uriWatchRecords.get(uri)?.watchers.size) {
923
- this.clientProxy.onDocumentDirtyChanged({ uri, dirty: event.dirty });
939
+ this.clientProxy.onDocumentDirtyChanged({ uri, text: event.text });
924
940
  }
925
941
  }
926
942
  /**
@@ -993,6 +1009,7 @@ export class DataServer {
993
1009
  const record = this.uriWatchRecords.get(uri);
994
1010
  if (record) {
995
1011
  record.fingerprint = undefined;
1012
+ record.fingerprintVersion = undefined;
996
1013
  record.revertPending = undefined;
997
1014
  record.sentVersion = undefined;
998
1015
  this.pruneUriWatchRecord(uri);
@@ -1033,7 +1050,9 @@ export class DataServer {
1033
1050
  * {@link subscribeToTextDocumentCloses}).
1034
1051
  *
1035
1052
  * An event for a rebuild with no observable change since the last emit is
1036
- * suppressed against the URI's fingerprint. Such rebuilds are routine: a
1053
+ * suppressed against the URI's fingerprint and the version it was taken at;
1054
+ * a new version with the same fingerprint goes out with the same
1055
+ * `model.hash`, so a watcher still learns the version. Such rebuilds are routine: a
1037
1056
  * second client attaching to an open document makes
1038
1057
  * `HydraniumTextDocuments.refreshContent` fire `onDidChangeContent` purely
1039
1058
  * to re-trigger the build, and Langium rebuilds a document when a
@@ -1072,16 +1091,18 @@ export class DataServer {
1072
1091
  record.revertPending = undefined;
1073
1092
  this.pruneUriWatchRecord(uri);
1074
1093
  }
1075
- const fingerprint = this.computeDocumentFingerprint(document);
1076
- if (record.fingerprint === fingerprint) {
1094
+ const fingerprint = this.computeDocumentFingerprint(document.parseResult.value, this.encoder.toTransferDocument(document));
1095
+ const stamped = this.services.workspace.ModelLedger.versionOf(document.parseResult.value);
1096
+ if (record.fingerprint === fingerprint && record.fingerprintVersion === stamped) {
1077
1097
  // A rebuild that produced no observable change since the last emit —
1078
1098
  // suppressed so RPC subscribers don't see a no-op broadcast. Logged at
1079
1099
  // debug so a *needed* re-broadcast wrongly suppressed by this dedup
1080
1100
  // (the failure mode the fingerprint strategy must avoid) is visible.
1081
- this.tracer.withUri(uri).debug(`Suppress onDocumentUpdated v${document.textDocument.version}: fingerprint unchanged`);
1101
+ this.tracer.withUri(uri).debug(`Suppress onDocumentUpdated v${stamped}: fingerprint and version unchanged`);
1082
1102
  return;
1083
1103
  }
1084
1104
  record.fingerprint = fingerprint;
1105
+ record.fingerprintVersion = stamped;
1085
1106
  // The manager's attribution, so this head names the same client as the
1086
1107
  // in-process heads do for one build, except for a version this head
1087
1108
  // already sent; see `DataServerUriWatchRecord.sentVersion`.
@@ -1091,46 +1112,32 @@ export class DataServer {
1091
1112
  : this.services.workspace.AstDocumentManager.attributeUpdate(document);
1092
1113
  record.sentVersion = version;
1093
1114
  const event = {
1094
- document: this.envelope(document.uri),
1115
+ document: this.envelope(document.uri, fingerprint),
1095
1116
  sourceClientId: revertedOnClose ? REVERT_ON_CLOSE_CLIENT_ID : sourceClientId,
1096
1117
  reason
1097
1118
  };
1098
- this.tracer
1099
- .withUri(uri)
1100
- .debug(`Emit onDocumentUpdated v${event.document.version} (reason=${event.reason}, sourceClientId=${event.sourceClientId})`);
1119
+ this.tracer.withUri(uri).debug(`Emit onDocumentUpdated v${stamped} (reason=${event.reason}, sourceClientId=${event.sourceClientId})`);
1101
1120
  this.clientProxy.onDocumentUpdated(event);
1102
1121
  }
1103
1122
  /**
1104
- * Fingerprint of the document's observable state, used to de-dup
1105
- * `onDocumentUpdated` emissions. The {@link FingerprintStrategy} option
1106
- * selects what is hashed (default `'transfer-document'` — see the type), and
1107
- * {@link additionalFingerprintInputs} folds in any extra adopter signal.
1123
+ * Fingerprint of the snapshot `root` and its encoding `encoded`, used to
1124
+ * de-dup `onDocumentUpdated` emissions and sent as every document's
1125
+ * `model.hash`, so it must not depend on the version or on live state. The
1126
+ * {@link FingerprintStrategy} option selects what is hashed (default
1127
+ * `'transfer-document'` — see the type).
1108
1128
  *
1109
- * The default `'transfer-document'` strategy goes through the encoder's
1110
- * {@link TransferEncoder.toTransferDocument}, which is cached per build —
1111
- * so within one phase event the fingerprint and the subsequently-emitted
1112
- * `envelope` share a single encode walk.
1129
+ * {@link TransferEncoder.toTransferDocument} is cached per build, so within
1130
+ * one phase event the fingerprint and the subsequently-emitted `envelope`
1131
+ * share a single encode walk.
1113
1132
  *
1114
1133
  * Wrapped in {@link Tracer.time} against {@link FINGERPRINT_LOG_AFTER_MS}.
1115
1134
  */
1116
- computeDocumentFingerprint(document) {
1117
- return this.tracer.withUri(document.uri.toString()).time('Compute fingerprint', () => {
1118
- const base = this.options.fingerprintStrategy === 'text-diagnostics'
1119
- ? textDiagnosticsFingerprint(document)
1120
- : transferDocumentFingerprint(this.encoder.toTransferDocument(document));
1121
- const extra = this.additionalFingerprintInputs(document);
1122
- return extra.length === 0 ? base : textHash([base, FINGERPRINT_SEPARATOR, ...extra.map(value => JSON.stringify(value))]);
1123
- }, 'debug', { logAfterMs: FINGERPRINT_LOG_AFTER_MS });
1124
- }
1125
- /**
1126
- * Extra inputs folded into {@link computeDocumentFingerprint} alongside the
1127
- * chosen {@link FingerprintStrategy}. Default: none. Override to contribute a
1128
- * signal that lives outside the document's text / root / diagnostics — each
1129
- * entry need only be stable across equivalent emissions and
1130
- * JSON-serialisable.
1131
- */
1132
- additionalFingerprintInputs(_document) {
1133
- return [];
1135
+ computeDocumentFingerprint(root, encoded) {
1136
+ return this.tracer
1137
+ .withUri(encoded.uri)
1138
+ .time('Compute fingerprint', () => this.options.fingerprintStrategy === 'text-diagnostics'
1139
+ ? textDiagnosticsFingerprint(this.services.workspace.ModelLedger.textOf(root), encoded.model)
1140
+ : transferDocumentFingerprint(encoded.model), 'debug', { logAfterMs: FINGERPRINT_LOG_AFTER_MS });
1134
1141
  }
1135
1142
  /**
1136
1143
  * Subscribe to the project tier's change channel and re-fan registry
@@ -1 +1 @@
1
- {"version":3,"file":"data-server.js","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,SAAS,EAiBT,gBAAgB,EAEhB,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACJ,+BAA+B,EAC/B,4BAA4B,EAC5B,uBAAuB,EAmBzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC3C,yCAAyC,EACzC,4DAA4D,CAC9D,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAq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wBAAwB,IAAI,UAAU,CAAC,eAAe,CAAC,wBAAwB;SACnH,CAAC;IACL,CAAC;CACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydranium/data-server",
3
- "version": "1.0.0-next.187",
3
+ "version": "1.0.0-next.189",
4
4
  "description": "Typed-RPC protocol head for the hydranium framework. Peer of @hydranium/core/lsp and @hydranium/glsp-server; built on @hydranium/core.",
5
5
  "keywords": [
6
6
  "data-server",
@@ -78,18 +78,18 @@
78
78
  "watch": "tsc -b -w --preserveWatchOutput"
79
79
  },
80
80
  "devDependencies": {
81
- "@hydranium/core": "1.0.0-next.187",
82
- "@hydranium/langium": "1.0.0-next.187",
83
- "@hydranium/protocol": "1.0.0-next.187",
81
+ "@hydranium/core": "1.0.0-next.189",
82
+ "@hydranium/langium": "1.0.0-next.189",
83
+ "@hydranium/protocol": "1.0.0-next.189",
84
84
  "rimraf": "^5.0.0",
85
85
  "typescript": "^7.0.2",
86
86
  "vscode-jsonrpc": "9.0.1",
87
87
  "vscode-languageserver-textdocument": "^1.0.12"
88
88
  },
89
89
  "peerDependencies": {
90
- "@hydranium/core": "1.0.0-next.187",
91
- "@hydranium/langium": "1.0.0-next.187",
92
- "@hydranium/protocol": "1.0.0-next.187",
90
+ "@hydranium/core": "1.0.0-next.189",
91
+ "@hydranium/langium": "1.0.0-next.189",
92
+ "@hydranium/protocol": "1.0.0-next.189",
93
93
  "vscode-jsonrpc": "9.0.1",
94
94
  "vscode-languageserver-textdocument": "^1.0.12"
95
95
  },
@@ -34,12 +34,14 @@ import {
34
34
  type ReferenceContext,
35
35
  type ReferenceRequest,
36
36
  type ReferenceTarget,
37
+ type TransferModelSnapshot,
38
+ type ModelVersion,
39
+ type TextState,
37
40
  type Tracer,
38
41
  type TransferDiagnostic,
39
42
  TransferDocument,
40
43
  type TransferElement,
41
44
  UNKNOWN_CLIENT_ID,
42
- asSnapshotVersion,
43
45
  textHash
44
46
  } from '@hydranium/protocol';
45
47
  import {
@@ -122,6 +124,7 @@ import type {
122
124
  LogNameOptions,
123
125
  AstDiagnostic,
124
126
  AstDocument,
127
+ EncodedTransferDocument,
125
128
  ModelService,
126
129
  ProjectChangeEvent,
127
130
  ServerSharedServices,
@@ -170,22 +173,32 @@ const resumableByModelService = new WeakMap<object, Map<string, ResumableSession
170
173
  * folded in on a cascade rebuild that leaves the document's own text
171
174
  * untouched. Safe for any adopter whose AST extensions fold derived state
172
175
  * into the transfer projection (the framework norm).
173
- * - `'text-diagnostics'` — the cheaper `getText()` + diagnostics hash. An
174
- * opt-DOWN for adopters that fold no derived state and want to avoid the
175
- * transfer-encode per phase event.
176
+ * - `'text-diagnostics'` — the cheaper parsed-text + diagnostics hash. An
177
+ * opt-DOWN for adopters that fold no derived state and want to avoid
178
+ * stringifying the transfer root per phase event.
176
179
  */
177
180
  export type FingerprintStrategy = 'transfer-document' | 'text-diagnostics';
178
181
 
179
- /** Hash a document's raw text + diagnostics — the `'text-diagnostics'` strategy. */
180
- function textDiagnosticsFingerprint(document: LangiumDocument): string {
181
- return textHash([document.textDocument.getText(), FINGERPRINT_SEPARATOR, JSON.stringify(document.diagnostics ?? [])]);
182
+ /**
183
+ * Hash `text`, the text the model was parsed from, + `model`'s diagnostics — the `'text-diagnostics'` strategy.
184
+ * The text comes from the root's ledger record or CST, as the document's own may have moved on,
185
+ * and a repair in place leaves the CST on the unrepaired text;
186
+ * a root built without a CST hashes as `'transfer-document'`.
187
+ * Absent diagnostics must hash apart from `[]`, as in {@link transferDocumentFingerprint}.
188
+ */
189
+ function textDiagnosticsFingerprint(text: string | undefined, model: EncodedTransferDocument<TransferElement, unknown>['model']): string {
190
+ return text === undefined
191
+ ? transferDocumentFingerprint(model)
192
+ : textHash([text, FINGERPRINT_SEPARATOR, JSON.stringify(model.diagnostics ?? null)]);
182
193
  }
183
194
 
184
- /** Hash an encoded transfer document's root + diagnostics — the `'transfer-document'` strategy. */
185
- function transferDocumentFingerprint(transferDocument: Pick<TransferDocument<TransferElement, unknown>, 'root' | 'diagnostics'>): string {
186
- // null, not undefined: `JSON.stringify(undefined)` yields undefined rather
187
- // than a string, putting a non-string into the hash inputs.
188
- return textHash([JSON.stringify(transferDocument.root ?? null), FINGERPRINT_SEPARATOR, JSON.stringify(transferDocument.diagnostics)]);
195
+ /**
196
+ * Hash an encoded model's root + diagnostics — the `'transfer-document'` strategy.
197
+ * Absent diagnostics must hash apart from `[]`: a client skipping a render on an
198
+ * equal hash would otherwise miss a validation that found nothing.
199
+ */
200
+ function transferDocumentFingerprint(model: EncodedTransferDocument<TransferElement, unknown>['model']): string {
201
+ return textHash([JSON.stringify(model.root), FINGERPRINT_SEPARATOR, JSON.stringify(model.diagnostics ?? null)]);
189
202
  }
190
203
  /**
191
204
  * `logAfterMs` threshold passed to {@link Tracer.time} around
@@ -363,6 +376,13 @@ export interface DataServerUriWatchRecord {
363
376
  readonly watchers: Set<string>;
364
377
  /** Digest of the last emitted state, or of the state a first watch found; see {@link DataServer.dispatchPhaseEvent} for why it de-duplicates, {@link DataServer.computeDocumentFingerprint} for its inputs. */
365
378
  fingerprint?: string;
379
+ /**
380
+ * The version {@link DataServerUriWatchRecord.fingerprint} was taken at; an
381
+ * event goes out when either moves. Not {@link DataServerUriWatchRecord.sentVersion}:
382
+ * a first watch sets this and sends nothing, so the next event at its
383
+ * version still carries the manager's attribution.
384
+ */
385
+ fingerprintVersion?: ModelVersion;
366
386
  /** Set by {@link DataServer.subscribeToTextDocumentCloses}; the next phase event broadcasts even without a watcher. */
367
387
  revertPending?: boolean;
368
388
  /**
@@ -398,6 +418,10 @@ export interface DataServerUriWatchRecord {
398
418
  * adopters subclass ONLY when they need to decorate wire returns or
399
419
  * notifications. The usual adoption path is DI rebinds alone.
400
420
  *
421
+ * **`TTransfer` is not checked.** It declares the union of the transfer roots
422
+ * the workspace's languages produce. Which root a document has is known only
423
+ * at runtime, from its language, so a `TTransfer` missing a language compiles.
424
+ *
401
425
  * Lifecycle: the constructor registers framework request handlers (plus
402
426
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
403
427
  * builds the {@link DataClientProtocol} notification proxy on the same
@@ -663,7 +687,7 @@ export class DataServer<
663
687
  * through an override of this.
664
688
  */
665
689
  protected toSessionWrite(request: Omit<TransferUpdateDocumentArgs<TTransfer>, 'clientId'>): ClientSessionWriteArgs<TTransfer> {
666
- return { uri: request.uri, model: request.model, basedOn: request.basedOn };
690
+ return { uri: request.uri, model: request.model, baseVersion: request.baseVersion };
667
691
  }
668
692
 
669
693
  /**
@@ -693,25 +717,15 @@ export class DataServer<
693
717
  * fails, `rollback` undoes the open this call made before the failure is
694
718
  * rethrown: the caller sees no open, so nothing on its side would ever close
695
719
  * it.
696
- *
697
- * Versioned with the store's shared version rather than the snapshot's own:
698
- * the built document's `textDocument.version` lags the store's whenever the
699
- * store assigned the version, and the store's is what a write's `basedOn` is
700
- * compared against, so reporting the snapshot's would make the caller's
701
- * first based-on write conflict with itself.
702
720
  */
703
721
  protected async openedSnapshot(uri: string, rollback?: () => Promise<void>): Promise<TransferDocument<TTransfer, TDiagnostic>> {
704
- let document: TransferDocument<TTransfer, TDiagnostic>;
705
722
  try {
706
- document = await this.getModelDocument({ uri });
723
+ return await this.getModelDocument({ uri });
707
724
  } catch (error: unknown) {
708
725
  // The open's failure is the one the caller needs, not the cleanup's.
709
726
  await rollback?.().catch(() => undefined);
710
727
  throw error;
711
728
  }
712
- // Stamped again with the version, in one step: a write landing after the
713
- // read would otherwise pair its version with the read's text hash.
714
- return this.withServerState({ ...document, version: asSnapshotVersion(this.services.workspace.TextDocuments.version(uri)) });
715
729
  }
716
730
 
717
731
  async closeModelDocument(args: CloseModelArgs): Promise<void> {
@@ -741,7 +755,7 @@ export class DataServer<
741
755
  return this.encodeDocument(await this.modelService.ensureDocumentState(args.uri, state));
742
756
  } catch (error: unknown) {
743
757
  // The protocol answers a read of a URI with no document with an
744
- // envelope that has no root.
758
+ // envelope that has no model.
745
759
  if (this.isMissingDocument(error, args.uri)) {
746
760
  return this.envelope(UriUtils.toUri(args.uri));
747
761
  }
@@ -780,8 +794,9 @@ export class DataServer<
780
794
  record.watchers.add(args.clientId);
781
795
  if (record.fingerprint === undefined) {
782
796
  const document = this.services.workspace.LangiumDocuments.getDocument(UriUtils.toUri(uri));
783
- if (document) {
784
- record.fingerprint = this.computeDocumentFingerprint(document);
797
+ if (document && !this.services.workspace.ModelLedger.isPlaceholder(document.parseResult.value)) {
798
+ record.fingerprint = this.computeDocumentFingerprint(document.parseResult.value, this.encoder.toTransferDocument(document));
799
+ record.fingerprintVersion = this.services.workspace.ModelLedger.versionOf(document.parseResult.value);
785
800
  }
786
801
  }
787
802
  }
@@ -813,6 +828,7 @@ export class DataServer<
813
828
  }
814
829
  if (record.revertPending) {
815
830
  record.fingerprint = undefined;
831
+ record.fingerprintVersion = undefined;
816
832
  } else {
817
833
  this.uriWatchRecords.delete(uri);
818
834
  }
@@ -915,14 +931,16 @@ export class DataServer<
915
931
  return this.resolveReferenceServices(ctx.source).CandidateProvider.find(ctx);
916
932
  }
917
933
 
918
- async resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined> {
934
+ async resolveReference<TElement extends TransferElement = TransferElement>(
935
+ ref: ReferenceRequest
936
+ ): Promise<ReferenceTarget<TElement> | undefined> {
919
937
  await this.awaitReferencesLinked(ref.source);
920
938
  const resolved = this.resolveReferenceServices(ref.source).CandidateProvider.resolveCandidate(ref);
921
939
  if (!resolved) {
922
940
  return undefined;
923
941
  }
924
- const element = this.encoder.toTransfer(resolved.node) as TTransfer;
925
- return { ...resolved.candidate, element };
942
+ // The caller's claim about the target's type; see `ReferenceServerProtocol.resolveReference`.
943
+ return { ...resolved.candidate, element: this.encoder.toTransfer(resolved.node) as TElement };
926
944
  }
927
945
 
928
946
  async findNextName(args: FindNextNameArgs): Promise<string> {
@@ -1133,60 +1151,72 @@ export class DataServer<
1133
1151
  /**
1134
1152
  * Build a {@link TransferDocument} envelope from the current document state,
1135
1153
  * delegating root + diagnostic encoding to {@link encoder} (see
1136
- * `TransferEncoder.toTransferDocument` for the walk).
1137
- *
1138
- * The encoder field's generic-map binding is widened to
1139
- * `Record<string, TransferElement>` at the framework-default level, and an
1140
- * adopter supplying a typed-overlay encoder narrows the runtime shape to
1141
- * its wire types. The cast on the return is where that invariant — the
1142
- * adopter's `TTransfer` matches its encoder's overlay — is asserted, at a
1143
- * single boundary point rather than spread across the callers.
1154
+ * `TransferEncoder.toTransferDocument` for the walk). `fingerprint` is the
1155
+ * caller's {@link computeDocumentFingerprint} of that same state, which
1156
+ * spares hashing it twice.
1144
1157
  */
1145
- protected envelope(uri: URI): TransferDocument<TTransfer, TDiagnostic> {
1158
+ protected envelope(uri: URI, fingerprint?: string): TransferDocument<TTransfer, TDiagnostic> {
1146
1159
  // Resolve through the model service's canonicalizing gateway rather than
1147
1160
  // reaching into `LangiumDocuments` directly, so a divergent (symlink) URI
1148
1161
  // still finds the document the build keys by its real path — and so the
1149
1162
  // data-server never has to remember to canonicalize this lookup itself.
1150
1163
  const document = this.modelService.getDocument(uri.toString());
1151
- if (!document) {
1164
+ if (!document || this.services.workspace.ModelLedger.isPlaceholder(document.parseResult.value)) {
1152
1165
  // No document — a shaped envelope rather than a throw, so the caller
1153
- // decides policy at its own layer; `root` is optional on the envelope
1166
+ // decides policy at its own layer; `model` is optional on the envelope
1154
1167
  // so the compiler forces that decision. Adopters preferring to throw
1155
- // override `envelope`.
1168
+ // override `envelope`. The builder's unparsed placeholder is no
1169
+ // document either: its root parses no text.
1156
1170
  return TransferDocument.absent<TTransfer, TDiagnostic>(uri.toString());
1157
1171
  }
1158
- return this.withServerState(this.encoder.toTransferDocument(document) as TransferDocument<TTransfer, TDiagnostic>);
1172
+ const encoded = this.encoder.toTransferDocument(document);
1173
+ return this.withServerState(encoded, fingerprint ?? this.computeDocumentFingerprint(document.parseResult.value, encoded));
1159
1174
  }
1160
1175
 
1161
1176
  /**
1162
- * The transfer document a request answers with for `astDocument`, the
1163
- * store's current `dirty` and `textHash` stamped on it by
1164
- * {@link withServerState}. Every document a request answers with goes
1165
- * through here, so none goes out without the stamp.
1177
+ * The transfer document a request answers with for `astDocument`, its model
1178
+ * hashed and the text stamped on it by {@link withServerState}. Every
1179
+ * document a request answers with goes through here, so none goes out
1180
+ * without them.
1166
1181
  */
1167
1182
  protected encodeDocument(astDocument: AstDocument<AstNode, AstDiagnostic>): TransferDocument<TTransfer, TDiagnostic> {
1168
- return this.withServerState(this.encoder.astDocumentToTransferDocument(astDocument) as TransferDocument<TTransfer, TDiagnostic>);
1183
+ const encoded = this.encoder.astDocumentToTransferDocument(astDocument);
1184
+ return this.withServerState(encoded, this.computeDocumentFingerprint(astDocument.root, encoded));
1169
1185
  }
1170
1186
 
1171
1187
  /**
1172
- * `document` with the store's current {@link TransferDocument.dirty} and
1173
- * the {@link TransferDocument.textHash} of the text the server holds for
1174
- * it: the store's text while a client has it open, the build's otherwise.
1175
- * Both are read when the document is sent rather than kept with the build:
1176
- * a save changes `dirty` without a rebuild, and the store's text moves on
1177
- * before the build that follows it.
1188
+ * `encoded` with `hash` on its model and the text the server holds for it:
1189
+ * the store's while it holds the document, the build's otherwise. The text
1190
+ * is read when the document is sent rather than kept with the build: a save
1191
+ * changes `text.dirty` without a rebuild, and the store's text moves on before
1192
+ * the build that follows it.
1178
1193
  */
1179
- protected withServerState(document: TransferDocument<TTransfer, TDiagnostic>): TransferDocument<TTransfer, TDiagnostic> {
1180
- const text = (
1181
- this.services.workspace.TextDocuments.get(document.uri) ?? this.modelService.getDocument(document.uri)?.textDocument
1182
- )?.getText();
1194
+ protected withServerState(
1195
+ encoded: EncodedTransferDocument<TransferElement, TDiagnostic>,
1196
+ hash: string
1197
+ ): TransferDocument<TTransfer, TDiagnostic> {
1198
+ const text = this.services.workspace.TextDocuments.textState(encoded.uri) ?? this.builtTextState(encoded.uri);
1199
+ if (text && text.version > encoded.model.version) {
1200
+ this.tracer.withUri(encoded.uri).debug(`Send a model behind its text: model v${encoded.model.version} / text v${text.version}`);
1201
+ }
1183
1202
  return {
1184
- ...document,
1185
- dirty: this.services.workspace.TextDocuments.isDirty(document.uri),
1186
- ...(text === undefined ? {} : { textHash: textHash(text) })
1203
+ uri: encoded.uri,
1204
+ // The encoder returns the structural base; `TTransfer` is the adopter's
1205
+ // declaration of the roots its languages produce, and nothing checks it.
1206
+ model: { ...encoded.model, hash } as TransferModelSnapshot<TTransfer, TDiagnostic>,
1207
+ ...(text ? { text } : {})
1187
1208
  };
1188
1209
  }
1189
1210
 
1211
+ /**
1212
+ * The text a build read for a document the store never held, which is
1213
+ * clean: the store holds every text a client gave it.
1214
+ */
1215
+ protected builtTextState(uri: string): TextState | undefined {
1216
+ const textDocument = this.modelService.getDocument(uri)?.textDocument;
1217
+ return textDocument && { version: textDocument.version, hash: textHash(textDocument.getText()), dirty: false };
1218
+ }
1219
+
1190
1220
  /**
1191
1221
  * Subscribe one listener at the configured {@link DataServerOptions.subscriptionPhase}.
1192
1222
  * The listener dispatches subscription events for every matching URI. A
@@ -1285,7 +1315,7 @@ export class DataServer<
1285
1315
  protected dispatchDirtyEvent(event: DocumentDirtyChangedEvent): void {
1286
1316
  const uri = this.canonicalKey(event.uri);
1287
1317
  if (this.uriWatchRecords.get(uri)?.watchers.size) {
1288
- this.clientProxy.onDocumentDirtyChanged({ uri, dirty: event.dirty });
1318
+ this.clientProxy.onDocumentDirtyChanged({ uri, text: event.text });
1289
1319
  }
1290
1320
  }
1291
1321
 
@@ -1362,6 +1392,7 @@ export class DataServer<
1362
1392
  const record = this.uriWatchRecords.get(uri);
1363
1393
  if (record) {
1364
1394
  record.fingerprint = undefined;
1395
+ record.fingerprintVersion = undefined;
1365
1396
  record.revertPending = undefined;
1366
1397
  record.sentVersion = undefined;
1367
1398
  this.pruneUriWatchRecord(uri);
@@ -1404,7 +1435,9 @@ export class DataServer<
1404
1435
  * {@link subscribeToTextDocumentCloses}).
1405
1436
  *
1406
1437
  * An event for a rebuild with no observable change since the last emit is
1407
- * suppressed against the URI's fingerprint. Such rebuilds are routine: a
1438
+ * suppressed against the URI's fingerprint and the version it was taken at;
1439
+ * a new version with the same fingerprint goes out with the same
1440
+ * `model.hash`, so a watcher still learns the version. Such rebuilds are routine: a
1408
1441
  * second client attaching to an open document makes
1409
1442
  * `HydraniumTextDocuments.refreshContent` fire `onDidChangeContent` purely
1410
1443
  * to re-trigger the build, and Langium rebuilds a document when a
@@ -1443,16 +1476,18 @@ export class DataServer<
1443
1476
  record.revertPending = undefined;
1444
1477
  this.pruneUriWatchRecord(uri);
1445
1478
  }
1446
- const fingerprint = this.computeDocumentFingerprint(document);
1447
- if (record.fingerprint === fingerprint) {
1479
+ const fingerprint = this.computeDocumentFingerprint(document.parseResult.value, this.encoder.toTransferDocument(document));
1480
+ const stamped = this.services.workspace.ModelLedger.versionOf(document.parseResult.value);
1481
+ if (record.fingerprint === fingerprint && record.fingerprintVersion === stamped) {
1448
1482
  // A rebuild that produced no observable change since the last emit —
1449
1483
  // suppressed so RPC subscribers don't see a no-op broadcast. Logged at
1450
1484
  // debug so a *needed* re-broadcast wrongly suppressed by this dedup
1451
1485
  // (the failure mode the fingerprint strategy must avoid) is visible.
1452
- this.tracer.withUri(uri).debug(`Suppress onDocumentUpdated v${document.textDocument.version}: fingerprint unchanged`);
1486
+ this.tracer.withUri(uri).debug(`Suppress onDocumentUpdated v${stamped}: fingerprint and version unchanged`);
1453
1487
  return;
1454
1488
  }
1455
1489
  record.fingerprint = fingerprint;
1490
+ record.fingerprintVersion = stamped;
1456
1491
  // The manager's attribution, so this head names the same client as the
1457
1492
  // in-process heads do for one build, except for a version this head
1458
1493
  // already sent; see `DataServerUriWatchRecord.sentVersion`.
@@ -1463,54 +1498,39 @@ export class DataServer<
1463
1498
  : this.services.workspace.AstDocumentManager.attributeUpdate(document);
1464
1499
  record.sentVersion = version;
1465
1500
  const event: TransferDocumentUpdatedEvent<TTransfer, TDiagnostic> = {
1466
- document: this.envelope(document.uri),
1501
+ document: this.envelope(document.uri, fingerprint),
1467
1502
  sourceClientId: revertedOnClose ? REVERT_ON_CLOSE_CLIENT_ID : sourceClientId,
1468
1503
  reason
1469
1504
  };
1470
- this.tracer
1471
- .withUri(uri)
1472
- .debug(`Emit onDocumentUpdated v${event.document.version} (reason=${event.reason}, sourceClientId=${event.sourceClientId})`);
1505
+ this.tracer.withUri(uri).debug(`Emit onDocumentUpdated v${stamped} (reason=${event.reason}, sourceClientId=${event.sourceClientId})`);
1473
1506
  this.clientProxy.onDocumentUpdated(event);
1474
1507
  }
1475
1508
 
1476
1509
  /**
1477
- * Fingerprint of the document's observable state, used to de-dup
1478
- * `onDocumentUpdated` emissions. The {@link FingerprintStrategy} option
1479
- * selects what is hashed (default `'transfer-document'` — see the type), and
1480
- * {@link additionalFingerprintInputs} folds in any extra adopter signal.
1510
+ * Fingerprint of the snapshot `root` and its encoding `encoded`, used to
1511
+ * de-dup `onDocumentUpdated` emissions and sent as every document's
1512
+ * `model.hash`, so it must not depend on the version or on live state. The
1513
+ * {@link FingerprintStrategy} option selects what is hashed (default
1514
+ * `'transfer-document'` — see the type).
1481
1515
  *
1482
- * The default `'transfer-document'` strategy goes through the encoder's
1483
- * {@link TransferEncoder.toTransferDocument}, which is cached per build —
1484
- * so within one phase event the fingerprint and the subsequently-emitted
1485
- * `envelope` share a single encode walk.
1516
+ * {@link TransferEncoder.toTransferDocument} is cached per build, so within
1517
+ * one phase event the fingerprint and the subsequently-emitted `envelope`
1518
+ * share a single encode walk.
1486
1519
  *
1487
1520
  * Wrapped in {@link Tracer.time} against {@link FINGERPRINT_LOG_AFTER_MS}.
1488
1521
  */
1489
- protected computeDocumentFingerprint(document: LangiumDocument): string {
1490
- return this.tracer.withUri(document.uri.toString()).time(
1491
- 'Compute fingerprint',
1492
- () => {
1493
- const base =
1522
+ protected computeDocumentFingerprint(root: AstNode, encoded: EncodedTransferDocument<TransferElement, TDiagnostic>): string {
1523
+ return this.tracer
1524
+ .withUri(encoded.uri)
1525
+ .time(
1526
+ 'Compute fingerprint',
1527
+ () =>
1494
1528
  this.options.fingerprintStrategy === 'text-diagnostics'
1495
- ? textDiagnosticsFingerprint(document)
1496
- : transferDocumentFingerprint(this.encoder.toTransferDocument(document));
1497
- const extra = this.additionalFingerprintInputs(document);
1498
- return extra.length === 0 ? base : textHash([base, FINGERPRINT_SEPARATOR, ...extra.map(value => JSON.stringify(value))]);
1499
- },
1500
- 'debug',
1501
- { logAfterMs: FINGERPRINT_LOG_AFTER_MS }
1502
- );
1503
- }
1504
-
1505
- /**
1506
- * Extra inputs folded into {@link computeDocumentFingerprint} alongside the
1507
- * chosen {@link FingerprintStrategy}. Default: none. Override to contribute a
1508
- * signal that lives outside the document's text / root / diagnostics — each
1509
- * entry need only be stable across equivalent emissions and
1510
- * JSON-serialisable.
1511
- */
1512
- protected additionalFingerprintInputs(_document: LangiumDocument): readonly unknown[] {
1513
- return [];
1529
+ ? textDiagnosticsFingerprint(this.services.workspace.ModelLedger.textOf(root), encoded.model)
1530
+ : transferDocumentFingerprint(encoded.model),
1531
+ 'debug',
1532
+ { logAfterMs: FINGERPRINT_LOG_AFTER_MS }
1533
+ );
1514
1534
  }
1515
1535
 
1516
1536
  /**