@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,7 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { ConflictError, isSnapshotVersion, defineMessage, Logger, ObservableValue } from '@hydranium/protocol';
9
+ import { defineMessage, ObservableValue } from '@hydranium/protocol';
10
10
  import { DocumentState, UriUtils } from '@hydranium/langium';
11
11
  import { ReentrantWriteLockError, isInsideWriteLock } from '../workspace/write-lock-scope.js';
12
12
  import { AstDocument } from '../../documents/ast-document-manager.js';
@@ -14,8 +14,6 @@ import { isConnectionGoneError } from '../../util/connection-liveness.js';
14
14
  import { IntegrityService } from '../integrity/integrity-service.js';
15
15
  import { labelPhaseListener } from '../document-builder/labeled-phase-listener.js';
16
16
  import { LANGUAGE_CLIENT_ID } from '../../documents/client-ids.js';
17
- import { DocumentNotOpenError } from '../../documents/client-session-errors.js';
18
- import { DefaultClientSession } from './client-session.js';
19
17
  /**
20
18
  * The undo-stack entry for a server-authored write pushed to the editor.
21
19
  *
@@ -55,12 +53,6 @@ export class DefaultModelService {
55
53
  * (see {@link DocumentUriPolicy}).
56
54
  */
57
55
  uriPolicy;
58
- /**
59
- * Live slow-update-warn threshold cell, or `undefined` when the option
60
- * was not supplied (warn line + stopwatch disabled). Reads `.value` per
61
- * update so a setting-bound threshold retunes without reconstruction.
62
- */
63
- slowUpdateWarn;
64
56
  /** See {@link ModelServiceOptions.serializeBuilds}. Defaults to `true`. */
65
57
  serializeBuilds;
66
58
  /**
@@ -71,11 +63,7 @@ export class DefaultModelService {
71
63
  */
72
64
  syncChains = new Map();
73
65
  pendingSync = new Map();
74
- /**
75
- * The live sessions this service started, by client id. {@link update}
76
- * reads it to tell a session's write, which must find its document open,
77
- * from a write under a plain client id, which opens it.
78
- */
66
+ /** The live sessions this service started, by client id, for {@link getSession}. */
79
67
  sessions = new Map();
80
68
  /**
81
69
  * Drops an ended session from {@link sessions}. Subscribed by the first
@@ -121,7 +109,6 @@ export class DefaultModelService {
121
109
  this.services = services;
122
110
  this.tracer = services.Tracer.for(options.logName ?? 'ModelService').trace('instantiated');
123
111
  this.uriPolicy = services.workspace.DocumentUriPolicy;
124
- this.slowUpdateWarn = options.slowUpdateWarnMs !== undefined ? ObservableValue.from(options.slowUpdateWarnMs) : undefined;
125
112
  this.serializeBuilds = ObservableValue.from(options.serializeBuilds ?? true);
126
113
  // Optional-chain so a harness that binds no WorkspaceManager awaits
127
114
  // `undefined` and resolves immediately; production hosts always have it
@@ -239,6 +226,12 @@ export class DefaultModelService {
239
226
  * {@link ModelServiceOptions.serializeBuilds} — see there for the
240
227
  * non-reentrancy hazard that is the reason the opt-out exists.
241
228
  *
229
+ * An override calls the base before it awaits. Under an LSP connection the
230
+ * store's change event has already asked the update handler to build a
231
+ * session's write; an override whose await outlasts that build makes the
232
+ * base's request start a build of its own, so the write is built and
233
+ * delivered twice.
234
+ *
242
235
  * Returns an empty `{ root, diagnostics }` envelope when the document
243
236
  * cannot be loaded; adopters that want to throw override this method
244
237
  * on their subclass.
@@ -384,187 +377,6 @@ export class DefaultModelService {
384
377
  }
385
378
  return this.rebuild(uri, target, cancelToken);
386
379
  }
387
- /**
388
- * Apply an update for `uri`. The structured-or-textual `model` payload
389
- * is serialised (via {@link serialize} after {@link rewriteModel} when
390
- * structured), pushed into the multi-client text-document store with
391
- * a fresh version, drives a build to the target phase, and returns
392
- * the post-build AST snapshot.
393
- *
394
- * **Read-latest supersession**: concurrent callers on the same URI
395
- * all see the same post-build state once `waitUntil` resolves; none
396
- * deadlock waiting for a specific version's settled event. The
397
- * framework emits a post-resolution `debug` log line distinguishing
398
- * "vN ready" from "vN ready at vM (superseded)" so callers can
399
- * observe when their write was overtaken by a newer one before
400
- * settling — purely observability, doesn't change resolution
401
- * semantics. Adopters wanting version-matched resolution (resolve
402
- * with vN's specific settled snapshot, intermediate-phase
403
- * observability, slow-warn / hard-timeout behaviour) override this
404
- * method.
405
- *
406
- * **Upsert, except for a session.** Under a plain client id the write opens
407
- * the document for that client first, creating it from the payload when no
408
- * file exists. Under the id of a live session from {@link createSession} it
409
- * opens nothing, and fails with `DocumentNotOpenError` unless the session
410
- * has the URI open at the moment the text is applied.
411
- */
412
- async update(args, cancelToken) {
413
- // Read before the first await, while the call is still the caller's: a
414
- // session that ends during the serialise would otherwise read as a plain
415
- // client id here, and the write would open the document for an id no
416
- // session owns any more and land there.
417
- const bySession = this.sessions.has(args.clientId);
418
- const stopwatch = this.slowUpdateWarn !== undefined ? this.services.Clock.stopwatch() : undefined;
419
- // Per-stage self-time breakdown of the update/reconcile chain (serialise →
420
- // open → apply → rebuild), opt-in at debug — the default path skips the
421
- // session and `run` calls the stage directly. `update` is a per-operation
422
- // method (one user save / diagram edit), not a per-node hot loop, so the
423
- // stage closures `run` allocates on the non-debug path are negligible.
424
- // Canonicalize the write URI once at the door and thread the resulting
425
- // CanonicalUri through the chain. The text store keys documents by their
426
- // canonical identity, so any spelling of a file — a canonical
427
- // (server-identity) URI from a GLSP cross-document save derived from
428
- // `findDocument(node).uri`, or the symlink path an editor opened — collapses
429
- // to the one registration; there is no second registration to fork. The
430
- // build step reuses the canonical wait core (`rebuildCanonical`) so the
431
- // identity is not re-resolved downstream.
432
- const uri = this.uriPolicy.canonicalUri(args.uri);
433
- const session = Logger.isLevelEnabled('debug') ? this.tracer.profile(`model-update ${uri}`) : undefined;
434
- const run = async (stage, fn) => (session ? session.scope(stage, fn) : fn());
435
- // Open WITH the new text so a cold URI (no open editor, no file on disk) is
436
- // created from the payload rather than read from the filesystem — `update`
437
- // is an upsert. For an already-open document `open` only attaches the
438
- // client (the text is ignored on that branch), and the actual update is
439
- // `AstDocumentManager.update`'s. `version` is intentionally NOT
440
- // forwarded to `open`, so a cold create stays at its initial version
441
- // rather than adopting a number the caller chose.
442
- //
443
- // The gate reads the version and decides BEFORE the open, and both halves
444
- // of that matter.
445
- //
446
- // Reading first, because for a document no client holds open the open
447
- // assigns the shared version from the INCOMING text, so a version read
448
- // afterwards has already absorbed the caller's own write. Gating on it
449
- // rejects every modifying write to a closed document, comparing the
450
- // caller's `basedOn` against a number the caller itself produced — and a
451
- // serialised round-trip that is not byte-identical to the stored text is
452
- // enough to trigger that. Reading first keeps both cases the gate exists
453
- // for: an unknown URI answers 0, so a based-on-version update of a
454
- // not-yet-existing document still trips it, and a genuine conflict still
455
- // trips it, another writer having advanced the sequence past the version
456
- // the caller read.
457
- //
458
- // Deciding first, because the open is a mutation and `update` is an
459
- // upsert: for a cold URI it installs the payload in the shared text store
460
- // and records a hold for the writing client. Throwing after it hands the
461
- // caller its rejection while the server keeps the refused text — and the
462
- // hold outlives the call, because a client whose write failed has no
463
- // reason to close a document it never asked to open. Serialisation is
464
- // held back too; it is the adopter's code and need not be side-effect
465
- // free.
466
- const textDocuments = this.services.workspace.TextDocuments;
467
- this.checkBasedOn(uri, args.basedOn, textDocuments.version(uri));
468
- // Whether this call's own open is the one that creates the document, read
469
- // in the same step as the check above so no other open can land between.
470
- const opensCold = !bySession && textDocuments.get(uri) === undefined;
471
- const text = await run('serialize', () => this.modelToText(uri, args.model, cancelToken));
472
- if (!bySession) {
473
- await run('open', () => this.open({ uri, clientId: args.clientId, text }));
474
- }
475
- const appliedVersion = await run('apply', () => {
476
- // A session's write never opens its document. The check sits in the
477
- // same synchronous step as the apply: made before the serialize await
478
- // instead, it passes for a write whose session closes the document
479
- // during that await, and the write then lands on a document the
480
- // session no longer has open.
481
- if (bySession && !textDocuments.isOpenInClient(uri, args.clientId)) {
482
- throw new DocumentNotOpenError(uri, args.clientId);
483
- }
484
- // The gate again, in the same step as the apply: two writes based on
485
- // one version both pass the check at the door while they serialise,
486
- // and without this both apply. The version a cold open assigned from
487
- // this write's own text is not a conflict; the store holding exactly
488
- // that text is how it shows.
489
- if (!(opensCold && textDocuments.get(uri)?.getText() === text)) {
490
- this.checkBasedOn(uri, args.basedOn, textDocuments.version(uri));
491
- }
492
- return this.services.workspace.AstDocumentManager.update(uri, text, args.clientId);
493
- });
494
- // Dispatch through the public `rebuild` (which re-canonicalizes the already-
495
- // canonical `uri` once, idempotently) rather than `rebuildCanonical`, so an
496
- // adopter `rebuild` override stays in the update path. The redundant call is
497
- // a single kernel-cached `realpath`; correctness of the override contract
498
- // wins over shaving it.
499
- const doc = await run('rebuild', () => this.rebuild(uri, undefined, cancelToken));
500
- const finalVersion = this.services.workspace.TextDocuments.version(uri);
501
- if (finalVersion > appliedVersion) {
502
- this.tracer.debug(`Update to v${appliedVersion} ready at v${finalVersion} (superseded)`);
503
- }
504
- else {
505
- this.tracer.debug(`Update to v${appliedVersion} ready`);
506
- }
507
- if (this.slowUpdateWarn !== undefined && stopwatch) {
508
- const elapsed = Math.round(stopwatch.elapsedMs);
509
- const threshold = this.slowUpdateWarn.value;
510
- if (elapsed >= threshold) {
511
- this.tracer.withUri(uri).warn(`Slow update: ${elapsed}ms ≥ ${threshold}ms (v${appliedVersion}, client=${args.clientId})`);
512
- }
513
- }
514
- // One line per stage (serialise / open / apply / rebuild) + unaccounted — only when profiling.
515
- session?.report('debug');
516
- return doc;
517
- }
518
- /**
519
- * Throw {@link ConflictError} when `basedOn` names a version other than
520
- * `currentVersion`. {@link update} calls it at the door and again in the
521
- * synchronous step that applies the text, and has to call it synchronously
522
- * there: a check separated from the apply by an await lets two writes based
523
- * on one version both apply.
524
- */
525
- checkBasedOn(uri, basedOn, currentVersion) {
526
- if (isSnapshotVersion(basedOn) && currentVersion !== basedOn) {
527
- // Distinct from the post-build "superseded" debug line in `update`: this
528
- // is a based-on-stale rejection (the write never applies), not two
529
- // writes racing.
530
- this.tracer.debug(`Conflict on ${uri}: based-on v${basedOn} stale, server at v${currentVersion}`);
531
- throw new ConflictError(uri, basedOn, currentVersion);
532
- }
533
- }
534
- /**
535
- * Persist `uri` to disk. Same content-change + settled-phase flow as
536
- * {@link update}, then writes via the
537
- * `WritableFileSystemProvider` and notifies the multi-client
538
- * text-document store of the save (so any open LSP-side editor sees
539
- * the `onDidSave` event regardless of who originated the persist).
540
- *
541
- * Returns the post-save AST snapshot.
542
- *
543
- * Under the id of a live session the save also fails with
544
- * `DocumentNotOpenError` when the session closes the URI while the text is
545
- * being built, and writes nothing. Once the manager has taken the text, the
546
- * write completes whatever the session does next.
547
- */
548
- async save(args, cancelToken) {
549
- // Read before the first await, as in `update`: a session that ends during
550
- // the rebuild would otherwise read as a plain client id below.
551
- const bySession = this.sessions.has(args.clientId);
552
- // Dispatch through `update` (not its internals) so an adopter `update`
553
- // override — version-matched resolution, etc. — applies to saves too.
554
- const doc = await this.update(args, cancelToken);
555
- // Persist under the same canonical identity `update` operated on. Writing
556
- // the canonical (real) path follows any symlink to the same file, and the
557
- // `onDidSave` keys the one canonical registration.
558
- const uri = this.uriPolicy.canonicalUri(args.uri);
559
- // In the same synchronous step as the manager taking the text: checked
560
- // any earlier, a session that closes the URI during the rebuild still has
561
- // the shared text, other clients' edits included, written in its name.
562
- if (bySession && !this.services.workspace.TextDocuments.isOpenInClient(uri, args.clientId)) {
563
- throw new DocumentNotOpenError(uri, args.clientId);
564
- }
565
- await this.services.workspace.AstDocumentManager.save(uri, args.clientId);
566
- return doc;
567
- }
568
380
  /**
569
381
  * Wait for the document at `uri` to reach the integrity-settled landmark and
570
382
  * drain any in-flight write-path applyEdit sync chain (see {@link syncChains})
@@ -599,36 +411,6 @@ export class DefaultModelService {
599
411
  }
600
412
  }
601
413
  }
602
- /**
603
- * Open the document at `args.uri` on behalf of `args.clientId`.
604
- * Multi-client: each (uri, clientId) pair is tracked as one
605
- * registration; the underlying document stays open until the last
606
- * client closes it. If `args.text` is omitted the document content
607
- * is read from the `FileSystemProvider`.
608
- *
609
- * Returns a {@link Disposable} that closes the registration when
610
- * disposed — useful for `using` blocks and shutdown cleanup.
611
- *
612
- * Delegates to the framework-bound
613
- * `services.workspace.AstDocumentManager`. Adopter subclasses with
614
- * extra open-time behaviour (logging, sync-chain bootstrapping)
615
- * override on their `ModelService` subclass and call `super.open`.
616
- *
617
- * The open path does not thread cancellation: `AstDocumentManager.open`
618
- * and the filesystem read behind it take no token, so a cancelled caller
619
- * still completes the open.
620
- */
621
- async open(args) {
622
- return this.services.workspace.AstDocumentManager.open(args);
623
- }
624
- /**
625
- * Close the document at `args.uri` for `args.clientId`. Counterpart
626
- * to {@link open}; the underlying document stays open until every
627
- * registered client has closed.
628
- */
629
- async close(args) {
630
- return this.services.workspace.AstDocumentManager.close(args);
631
- }
632
414
  /**
633
415
  * True when the document at `uri` is currently open for at least one
634
416
  * client. Pure read; no side effects.
@@ -696,7 +478,10 @@ export class DefaultModelService {
696
478
  });
697
479
  let session;
698
480
  try {
699
- session = this.newSession(id, sessionLabel);
481
+ // Unchecked: the session keeps whatever options its `open` is handed,
482
+ // and the factory types it for every grammar, so the narrowed type
483
+ // holds only for the caller that started it.
484
+ session = this.services.model.ClientSessionFactory.create(id, sessionLabel);
700
485
  }
701
486
  catch (err) {
702
487
  textDocuments.closeSession(id);
@@ -709,15 +494,35 @@ export class DefaultModelService {
709
494
  return this.sessions.get(clientId);
710
495
  }
711
496
  /**
712
- * Build the handle for a session {@link createSession} has already
713
- * registered. The override point for a custom session class; narrow the
714
- * return type to it.
497
+ * Convert a structured-or-textual `model` payload to its textual form.
715
498
  *
716
- * Registration and the uniqueness check have already happened when this
717
- * runs, so an override cannot skip them.
499
+ * Textual payloads (LSP / pre-serialised callers) pass through untouched.
500
+ * Structured payloads run the per-language `UpdateRewriteService` chain
501
+ * (transfer-model transforms; diff-aware rewrites see the previous AST root),
502
+ * then serialise. The chain is the single transfer-model-transform seam — a
503
+ * unary normalisation is just a rewrite that ignores `previous`, as
504
+ * `NormalizeEmptyStringsContribution` does. The chain is empty by
505
+ * default, so this is a no-op for adopters that register none.
718
506
  */
719
- newSession(clientId, label) {
720
- return new DefaultClientSession(this, this.services, clientId, label);
507
+ async modelToText(uri, model, cancelToken) {
508
+ if (typeof model === 'string') {
509
+ return model;
510
+ }
511
+ const rewritten = await this.rewriteModel(uri, model, cancelToken);
512
+ const target = UriUtils.toUri(uri);
513
+ const trivia = this.services.ServiceRegistry?.getServices(target)?.trivia?.TriviaService;
514
+ // Extracted BEFORE serializing, so it reads the document the write is
515
+ // about to replace rather than whatever a concurrent build left behind.
516
+ let document = this.services.workspace.LangiumDocuments.getDocument(target);
517
+ if (trivia !== undefined && document === undefined) {
518
+ const source = await this.textToTakeTriviaFrom(uri, target);
519
+ if (source !== undefined) {
520
+ document = this.services.workspace.LangiumDocumentFactory.fromString(source, target);
521
+ }
522
+ }
523
+ const extracted = trivia !== undefined && document !== undefined ? trivia.extract(document) : undefined;
524
+ const serialized = await this.serialize(uri, rewritten);
525
+ return extracted === undefined ? serialized : trivia.apply(serialized, extracted, target);
721
526
  }
722
527
  // ============================================================
723
528
  // LSP-client sync (mirror non-LSP-client changes back to Monaco)
@@ -726,23 +531,14 @@ export class DefaultModelService {
726
531
  * Mirror a server-side change of `document` back to the LSP textual language
727
532
  * client, run per document as it reaches the post-integrity settled phase.
728
533
  * The single framework caller of
729
- * `HydraniumTextDocuments.applyEditToLanguageClient` and
730
- * `HydraniumTextDocuments.stagePendingContent`.
731
- *
732
- * Routes by client registration, because an open and a closed document
733
- * answer different questions:
534
+ * `HydraniumTextDocuments.applyEditToLanguageClient`.
734
535
  *
735
- * - **Open in the language client** → {@link syncOpenDocument}: mirror the
736
- * settled text via a coalesced `applyEditToLanguageClient`, routed purely by
737
- * **content**.
738
- * - **Open only in another client** (the data or GLSP head) → nothing. A
739
- * language client opening it joins the existing entry and is refreshed from
740
- * the store, and only a FIRST open reads a stage, so staging here would
741
- * leave text nothing reads.
742
- * - **Closed in every client** → {@link stageClosedDocument}, gated by
743
- * **provenance** ({@link isNonLanguageClientEdit}). With the default text
744
- * store this never stages; see {@link stageClosedDocument} for why, and
745
- * for the store it serves.
536
+ * Only a document open in the language client is mirrored, through
537
+ * {@link syncOpenDocument}, routed purely by **content**. A document open
538
+ * only in another client needs nothing: a language client opening it joins
539
+ * the existing entry and is refreshed from the store. A session writes only
540
+ * what it has open, so no session edit of a closed document waits here for
541
+ * the language client's next open.
746
542
  *
747
543
  * The decision is **re-derived from the current settled state every time** (it
748
544
  * is not a one-shot enrolment), which is what makes it self-healing: a doc
@@ -762,13 +558,9 @@ export class DefaultModelService {
762
558
  // the canonical key to the recorded language-client URI(s); driving the chain
763
559
  // in client space here would key it under a URI `settleSave` never computes, so
764
560
  // the drain would miss for a divergent open path.
765
- const textDocuments = this.services.workspace.TextDocuments;
766
- if (textDocuments.isOpenInLanguageClient(document.textDocument.uri)) {
561
+ if (this.services.workspace.TextDocuments.isOpenInLanguageClient(document.textDocument.uri)) {
767
562
  this.syncOpenDocument(document.textDocument.uri, document.textDocument.getText());
768
563
  }
769
- else if (!textDocuments.isOpenInAnyClient(document.textDocument.uri)) {
770
- this.stageClosedDocument(document);
771
- }
772
564
  }
773
565
  /**
774
566
  * Mirror the settled text of a document open in the language client via a
@@ -784,51 +576,6 @@ export class DefaultModelService {
784
576
  syncOpenDocument(uri, text) {
785
577
  this.queueSync(uri, text);
786
578
  }
787
- /**
788
- * Stage the settled text of a document no client holds so the eventual
789
- * first `didOpen` sees this in-memory text instead of stale disk —
790
- * but only for a {@link isNonLanguageClientEdit genuine non-language-client edit}.
791
- * A document rebuilt by an internal build is skipped, leaving disk authoritative
792
- * on the next open.
793
- *
794
- * The default `HydraniumTextDocuments` never gets this far. Its own paths
795
- * record a version's author only while a client holds the document, and the
796
- * last close drops that history with the tracking record, so a document no
797
- * client holds reports no author and the provenance gate refuses. The stage
798
- * is reachable for a text store that keeps authorship past the last close,
799
- * or a subclass overriding {@link isNonLanguageClientEdit}.
800
- */
801
- stageClosedDocument(document) {
802
- if (this.isNonLanguageClientEdit(document)) {
803
- this.services.workspace.TextDocuments.stagePendingContent(document.textDocument.uri, document.textDocument.getText());
804
- }
805
- }
806
- /**
807
- * Whether `document`'s settled state is a genuine edit by a client *other than
808
- * the language client* — a write a form / GLSP / integrity client actually made.
809
- * Excludes two non-edits: the **language client** itself (the LSP/Monaco text
810
- * client — it already holds its own edits, and the staging here exists to feed
811
- * it) and an **internal build** (workspace startup, a cascade relink, a
812
- * `didClose`-reload). This is the gate for {@link stageClosedDocument}: staging
813
- * an internal build would
814
- * (a) pre-stage every file on boot and (b) re-stage discarded content after
815
- * close (e.g. a disposing GLSP session's debounced submit firing after close),
816
- * which then shadows clean disk on the next open.
817
- *
818
- * The signal is "a known client other than the language client authored this
819
- * version **and** the URI was in the last build's changed set
820
- * (`isTriggeringEdit`)". A framework-internal rebuild reports no author
821
- * (`getAuthor` → `undefined`), so it fails `hasKnownAuthor` without comparing
822
- * against a sentinel. This is NOT redundant with content/registration — it
823
- * distinguishes "client edited" from "framework rebuilt", which neither the
824
- * shadow nor `isTriggeringEdit` alone can.
825
- */
826
- isNonLanguageClientEdit(document) {
827
- const documents = this.services.workspace.AstDocumentManager;
828
- const author = documents.getAuthor(document);
829
- const hasKnownAuthor = !!author && author !== LANGUAGE_CLIENT_ID;
830
- return hasKnownAuthor && documents.isTriggeringEdit(document.textDocument.uri);
831
- }
832
579
  /**
833
580
  * Enqueue a sync to the language client. The pending slot per URI holds only
834
581
  * the latest text: if a newer settle fires while the current RPC is in
@@ -968,13 +715,13 @@ export class DefaultModelService {
968
715
  * Adopters whose serializer call shape differs (custom service
969
716
  * names, generator-driven YAML pretty printers, etc.) override this
970
717
  * method. Routes through `Serializer.serializeTransfer` because
971
- * `ModelService.update` / `ModelService.save` always receive a
718
+ * a session's `update` / `save` always receive a
972
719
  * transfer-model shape (cross-references as plain strings) from
973
720
  * adopter callers — the AST-shape entry point is `serializeAst`.
974
721
  *
975
722
  * Returns {@link MaybePromise} so adopter `Serializer` overrides can be
976
723
  * async (remote schema lookup, external canonical-value resolution); the
977
- * single caller ({@link modelToText} → {@link update}) is already `async`,
724
+ * single caller ({@link modelToText}) is already `async`,
978
725
  * so a naive `await` covers both branches without extra ceremony.
979
726
  */
980
727
  serialize(uri, root) {
@@ -985,62 +732,12 @@ export class DefaultModelService {
985
732
  // Protected plumbing (override sparingly)
986
733
  // ============================================================
987
734
  /**
988
- * Convert a structured-or-textual `model` payload to its textual form.
989
- *
990
- * Textual payloads (LSP / pre-serialised callers) pass through untouched.
991
- * Structured payloads run the per-language `UpdateRewriteService` chain
992
- * (transfer-model transforms; diff-aware rewrites see the previous AST root),
993
- * then serialise. The chain is the single transfer-model-transform seam — a
994
- * unary normalisation is just a rewrite that ignores `previous`, as
995
- * `NormalizeEmptyStringsContribution` does. The chain is empty by
996
- * default, so this is a no-op for adopters that register none.
735
+ * The text a write into a document not yet built should take its trivia
736
+ * from: the store's, which a write always has, since it writes only a
737
+ * document its client has open.
997
738
  */
998
- async modelToText(uri, model, cancelToken) {
999
- if (typeof model === 'string') {
1000
- return model;
1001
- }
1002
- const rewritten = await this.rewriteModel(uri, model, cancelToken);
1003
- const target = UriUtils.toUri(uri);
1004
- const trivia = this.services.ServiceRegistry?.getServices(target)?.trivia?.TriviaService;
1005
- // Extracted BEFORE serializing, so it reads the document the write is
1006
- // about to replace rather than whatever a concurrent build left behind.
1007
- let document = this.services.workspace.LangiumDocuments.getDocument(target);
1008
- if (trivia !== undefined && document === undefined) {
1009
- const source = await this.textToTakeTriviaFrom(uri, target);
1010
- if (source !== undefined) {
1011
- document = this.services.workspace.LangiumDocumentFactory.fromString(source, target);
1012
- }
1013
- }
1014
- const extracted = trivia !== undefined && document !== undefined ? trivia.extract(document) : undefined;
1015
- const serialized = await this.serialize(uri, rewritten);
1016
- return extracted === undefined ? serialized : trivia.apply(serialized, extracted, target);
1017
- }
1018
- /**
1019
- * The text a write into an unloaded document should take its trivia from —
1020
- * the open editor's if one holds it, the file's otherwise, and `undefined`
1021
- * when neither can supply it.
1022
- *
1023
- * **A read that fails answers `undefined` rather than throwing.** `getDocument`
1024
- * is a store read, so an ordinary create answers nothing here and must still
1025
- * write; letting a permission error or a path that turned into a directory
1026
- * escape would fail the user's write instead, having found nothing to preserve
1027
- * in a file the write is about to replace anyway. Losing the comments is
1028
- * recoverable, and traced; losing the write is neither.
1029
- */
1030
- async textToTakeTriviaFrom(uri, target) {
1031
- const open = this.services.workspace.TextDocuments.get(uri)?.getText();
1032
- if (open !== undefined) {
1033
- return open;
1034
- }
1035
- const fileSystem = this.services.workspace.FileSystemProvider;
1036
- try {
1037
- return (await fileSystem.exists(target)) ? await fileSystem.readFile(target) : undefined;
1038
- }
1039
- catch (err) {
1040
- const detail = err instanceof Error ? err.message : String(err);
1041
- this.tracer.withUri(uri).debug(`Could not read the file to take trivia from; writing as emitted. ${detail}`);
1042
- return undefined;
1043
- }
739
+ async textToTakeTriviaFrom(uri, _target) {
740
+ return this.services.workspace.TextDocuments.get(uri)?.getText();
1044
741
  }
1045
742
  /**
1046
743
  * Run the per-language transfer-model rewrite chain. Resolves the
@@ -1 +1 @@
1
- {"version":3,"file":"model-service.js","sourceRoot":"","sources":["../../../src/langium/model-service/model-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,MAAM,EAGN,eAAe,EAMjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAgB,aAAa,EAAwB,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAG3G,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE9F,OAAO,EAAE,WAAW,EAA4D,MAAM,yCAAyC,CAAC;AAChI,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGhF,OAAO,EAAsB,oBAAoB,EAAE,MAAM,q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