@hydranium/data-server 1.0.0-next.7 → 1.0.0-next.71

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
@@ -22,7 +22,11 @@ Installed by the server process that already composes
22
22
  - **Push notifications instead of polling:** `onDocumentUpdated` when a
23
23
  subscribed document reaches the configured build phase
24
24
  (`DataServerOptions.subscriptionPhase`, `DocumentState.Validated` by default),
25
- `onDocumentSaved` on a separate channel, and `onProjectsChanged` from the
25
+ `onDocumentSaved` on a separate channel, `onDocumentDeleted` on a third (a
26
+ deleted document has no built state to carry, and the build-phase path never
27
+ runs for one), `onDocumentsBuilt` once per build for the documents nobody
28
+ watches — chiefly those rebuilt as a cascade, which no filesystem watcher can
29
+ see because their own files did not change — and `onProjectsChanged` from the
26
30
  project registry.
27
31
  - **Projects as first-class:** `getProjects` and `getProjectForUri`, answered from
28
32
  the framework's `ProjectManager`.
@@ -6,8 +6,23 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { DisposableCollection, ReferenceSource, type CloseModelArgs, 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, type TransferDocument, type TransferElement } from '@hydranium/protocol';
9
+ import { DisposableCollection, ReferenceSource, type CloseModelArgs, 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, type TransferDocument, type TransferElement } from '@hydranium/protocol';
10
10
  import { type DataClientProtocol, type DataServerDiagnosticsProtocol, type DataServerProtocol, type DumpServerStateArgs, type StartProfilingArgs, type StopProfilingArgs, type WriteServerHeapSnapshotArgs, type GetModelDocumentArgs, type GetProjectForUriArgs, type TransferSaveDocumentArgs, type WatchModelDocumentArgs, type TransferDocumentUpdatedEvent, type TransferUpdateDocumentArgs } from '@hydranium/protocol/data';
11
+ /**
12
+ * Raised when a profiling command arrives with no capture running.
13
+ *
14
+ * A `ResponseError` rather than a plain `Error` so the identity survives to the
15
+ * response boundary, which is where the message is rendered. An unwrapped throw
16
+ * reaches the client as a generic internal error instead: no code for a caller
17
+ * to switch on, and nothing for the boundary to render from.
18
+ */
19
+ export declare const NO_ACTIVE_PROFILE: import("@hydranium/protocol").MessageDefinition<"No profiling capture is active; call startProfiling first.">;
20
+ /**
21
+ * The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
22
+ * survives reconstruction and is what a caller switches on.
23
+ */
24
+ export declare const NO_ACTIVE_PROFILE_CODE = 1002;
25
+ export declare const noActiveProfileError: () => HydraniumResponseError;
11
26
  import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
12
27
  import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
13
28
  import type { TextDocument } from 'vscode-languageserver-textdocument';
@@ -136,9 +151,9 @@ export interface DataServerOptions extends LogNameOptions {
136
151
  * When supplied, every inbound data-server RPC is timed into this collector
137
152
  * (via the `createRpcProxy` binding) and exposed through
138
153
  * {@link DataServerDiagnosticsProtocol.getLatency}. A head that also runs an
139
- * LSP connection can pass the SAME collector to
140
- * `instrumentLspConnection(connection, latency)` so one report covers both
141
- * heads. Absent by default (no timing overhead).
154
+ * LSP connection can pass the SAME collector through `lspLatencyOptions` to
155
+ * that connection, so one report covers both heads. Absent by default (no
156
+ * timing overhead).
142
157
  */
143
158
  readonly latency?: LatencyCollector;
144
159
  }
@@ -177,9 +192,11 @@ interface ResolvedDataServerOptions {
177
192
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
178
193
  * builds the {@link DataClientProtocol} notification proxy on the same
179
194
  * connection in one {@link createRpcProxy} call (binding `this` as its
180
- * `localTarget`) under the configured namespace, and subscribes one
181
- * `DocumentBuilder.onDocumentPhase` listener per configured phase that
182
- * dispatches subscription events via `clientProxy.onDocumentUpdated`.
195
+ * `localTarget`) under the configured namespace, and subscribes two listeners
196
+ * at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
197
+ * per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
198
+ * `DocumentBuilder.onBuildPhase` one dispatching a single
199
+ * `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
183
200
  *
184
201
  * The data-server requires the full {@link ServerSharedServices}
185
202
  * shape — `HydraniumTextDocuments` for client-attributed updates,
@@ -225,10 +242,12 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
225
242
  /**
226
243
  * Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
227
244
  * `reason` discrimination on outbound `onDocumentUpdated` notifications:
228
- * a URI in the `changed` list emits `'changed'`, in `deleted` emits
229
- * `'deleted'`, otherwise `'rebuilt'` (cascade rebuild from a dependent
230
- * URI's change). The same mechanism `AstDocumentManager.onUpdate` uses on
231
- * the LSP side, so reason fidelity stays consistent between heads.
245
+ * a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
246
+ * (cascade rebuild from a dependent URI's change). The same mechanism
247
+ * `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
248
+ * stays consistent between heads. The `deleted` half is read by
249
+ * {@link dispatchDeleteEvents} rather than by the reason discrimination,
250
+ * a deletion travelling on its own channel.
232
251
  */
233
252
  protected lastBuildUpdate?: {
234
253
  changed: readonly URI[];
@@ -292,7 +311,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
292
311
  /** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
293
312
  protected readonly latency?: LatencyCollector;
294
313
  /** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
295
- protected readonly encoder: TransferEncoder<unknown, TDiagnostic>;
314
+ protected readonly encoder: TransferEncoder<TDiagnostic>;
296
315
  /**
297
316
  * In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
298
317
  * The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
@@ -489,6 +508,42 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
489
508
  * regardless of subscriber count.
490
509
  */
491
510
  protected subscribeToDocumentBuilder(): void;
511
+ /**
512
+ * Report the documents that reached {@link DataServerOptions.subscriptionPhase}
513
+ * and that NOBODY on this
514
+ * connection is watching — the ones a client was not told about through
515
+ * {@link dispatchPhaseEvent}, which is gated per URI.
516
+ *
517
+ * **The gap this closes is the one no other source can observe.** A document
518
+ * the client watches, it hears about already. A file changed on disk, the
519
+ * host's own filesystem watcher reports — and on a browser host, where the
520
+ * workspace lives behind this head, an external change cannot happen at all.
521
+ * What is left, and what nothing outside the server can see, is a document
522
+ * rebuilt because something it DEPENDS ON changed: its file never changed, so
523
+ * a filesystem watcher is silent by construction, and it has no subscriber, so
524
+ * the update channel is silent by design. A consumer displaying data derived
525
+ * from that document — a tree label, a decorator — otherwise goes stale with
526
+ * no signal from any source, and repairs itself the moment someone opens the
527
+ * file to investigate, which is what makes it expensive to diagnose later.
528
+ *
529
+ * Payload-free on purpose: URIs only, so a client re-reads what it displays
530
+ * rather than being handed transfer documents it did not ask for. That is the
531
+ * property the subscription map protects, and it is preserved here by
532
+ * carrying no document rather than by gating the message.
533
+ *
534
+ * Quiet in the common case. Editing a document that an editor has open leaves
535
+ * that URI watched and therefore out of this set, so a build with no
536
+ * dependents produces nothing at all, and workspace initialisation produces
537
+ * nothing because it does not build to this phase. The ceiling is a
538
+ * whole-workspace rebuild at the subscription phase: one message, URIs only.
539
+ *
540
+ * The URI is canonicalised for the same reason the subscription map is keyed
541
+ * that way, and is untested for the same reason as its twin in
542
+ * {@link dispatchDeleteEvents}: the builder reports URIs out of its own
543
+ * store, so a non-canonical one cannot be produced without a fixture
544
+ * asserting a shape the real system never emits.
545
+ */
546
+ protected dispatchBuiltEvent(built: readonly LangiumDocument[]): void;
492
547
  /**
493
548
  * Subscribe to the universal save event on `HydraniumTextDocuments` so a
494
549
  * single `onDocumentSaved` wire notification fires for ANY save of a
@@ -511,6 +566,48 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
511
566
  * hold, so a `false` answer means this close was the last one.
512
567
  */
513
568
  protected subscribeToTextDocumentCloses(): void;
569
+ /**
570
+ * Fan out a deletion for each removed URI, to EVERY client on the connection
571
+ * rather than only to the ones watching that URI.
572
+ *
573
+ * **Deliberately ungated, where {@link dispatchPhaseEvent} and
574
+ * {@link dispatchSaveEvent} are gated.** Those two carry a built document and
575
+ * fire on every build, so the subscription map is what keeps bandwidth
576
+ * proportional to what a client asked for. A deletion is neither: it is one
577
+ * URI, it is rare, and it reports the workspace's STRUCTURE rather than a
578
+ * document's content. Gating it forces any consumer that displays the
579
+ * workspace — a model tree, a file decorator — to learn about disappearances
580
+ * from a filesystem watcher instead, which a client hosted in a browser has
581
+ * no way to run: its workspace lives behind the head. A client that does not
582
+ * care filters on the URI, which costs it a comparison.
583
+ *
584
+ * The precedent is the last-close revert broadcast (see
585
+ * {@link pendingRevertBroadcasts}), where the same judgement was already made
586
+ * in the other direction: a transition that matters enough is delivered
587
+ * without a subscription.
588
+ *
589
+ * Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
590
+ * listener, which is the only place a deletion is observable: `update`
591
+ * removes the document before deriving the rebuild set, so it is never built.
592
+ * That ordering also puts this notification ahead of the `'rebuilt'` events
593
+ * for the dependents whose references the deletion just broke.
594
+ *
595
+ * The `deleted` list arrives already expanded to concrete document URIs —
596
+ * `deleteDocuments` resolves a directory URI to the documents beneath it — so
597
+ * no caller has to handle a directory here.
598
+ *
599
+ * Per-URI derived state is dropped for the same reason it is dropped
600
+ * anywhere: it describes a document that no longer exists.
601
+ * {@link lastEmittedFingerprint} in particular can outlive its subscriptions
602
+ * through the last-close revert path — left behind, it is adopted as the
603
+ * baseline by the next {@link watchModelDocument} and suppresses the first
604
+ * emit after the file returns with its previous content.
605
+ *
606
+ * The subscription itself SURVIVES: a recreated file resumes delivering to
607
+ * the same watchers with no re-subscription, and a client that answers the
608
+ * deletion by closing releases the watch through `closeModelDocument` anyway.
609
+ */
610
+ protected dispatchDeleteEvents(deleted: readonly URI[]): void;
514
611
  /** Fan out a save event for the document's URI, gated by the subscription map. */
515
612
  protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void;
516
613
  /**
@@ -556,16 +653,16 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
556
653
  /**
557
654
  * Discriminate the reason for a phase-event-driven update notification.
558
655
  * Uses the most recent `DocumentBuilder.onUpdate` snapshot:
559
- * - URI in the `deleted` list → `'deleted'`
560
656
  * - URI in the `changed` list → `'changed'` (the URI was passed to
561
657
  * `documentBuilder.update(changed, deleted)`, which spans `didChange`
562
658
  * text-document events and programmatic `update([uri], [])` calls).
563
659
  * - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
564
660
  * because something it depends on changed; its own text wasn't flagged).
565
661
  *
566
- * `'saved'` is NOT emitted from this code path — saves take the dedicated
567
- * `DataClientProtocol.onDocumentSaved` channel; adopters that want a
568
- * unified update stream synthesise `'saved'` in their bridge layer.
662
+ * `'saved'` is NOT emitted here — saves take the dedicated
663
+ * `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
664
+ * unified stream synthesise it in their bridge layer. A deletion is not a
665
+ * reason at all; see {@link dispatchDeleteEvents}.
569
666
  */
570
667
  protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'];
571
668
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"data-server.d.ts","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,oBAAoB,EAIpB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,a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;;;;OAeG;IACH,SAAS,CAAC,yBAAyB,IAAI,IAAI;IAI3C;;;;OAIG;IACH,SAAS,CAAC,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,IAAI;IAkB/E;;;;;;;;OAQG;IACH,SAAS,CAAC,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM;IAY5D,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;IAM3D,iBAAiB,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrE,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAMhC,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAevD,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAcvD,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAI1C,oEAAoE;IACpE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,yBAAyB;CAmBjF"}
@@ -6,10 +6,25 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { createRpcProxy, DisposableCollection, isDocumentSource, isElementSource, isSyntheticSource, ReferenceSource } from '@hydranium/protocol';
9
+ import { createRpcProxy, defineMessage, DisposableCollection, isDocumentSource, isElementSource, isSyntheticSource, messageError, ReferenceSource } 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, UNKNOWN_CLIENT_ID } from '@hydranium/core';
12
12
  import { defaultDataServerDiagnostics } from './default-diagnostics.js';
13
+ /**
14
+ * Raised when a profiling command arrives with no capture running.
15
+ *
16
+ * A `ResponseError` rather than a plain `Error` so the identity survives to the
17
+ * response boundary, which is where the message is rendered. An unwrapped throw
18
+ * reaches the client as a generic internal error instead: no code for a caller
19
+ * to switch on, and nothing for the boundary to render from.
20
+ */
21
+ export const NO_ACTIVE_PROFILE = defineMessage('hydranium/data-server/no-active-profile', 'No profiling capture is active; call startProfiling first.');
22
+ /**
23
+ * The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
24
+ * survives reconstruction and is what a caller switches on.
25
+ */
26
+ export const NO_ACTIVE_PROFILE_CODE = 1002;
27
+ export const noActiveProfileError = () => messageError(NO_ACTIVE_PROFILE_CODE, NO_ACTIVE_PROFILE);
13
28
  import { DocumentState, UriUtils } from '@hydranium/langium';
14
29
  /**
15
30
  * Domain separator between text and diagnostics inputs of
@@ -94,9 +109,11 @@ const FINGERPRINT_LOG_AFTER_MS = 5;
94
109
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
95
110
  * builds the {@link DataClientProtocol} notification proxy on the same
96
111
  * connection in one {@link createRpcProxy} call (binding `this` as its
97
- * `localTarget`) under the configured namespace, and subscribes one
98
- * `DocumentBuilder.onDocumentPhase` listener per configured phase that
99
- * dispatches subscription events via `clientProxy.onDocumentUpdated`.
112
+ * `localTarget`) under the configured namespace, and subscribes two listeners
113
+ * at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
114
+ * per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
115
+ * `DocumentBuilder.onBuildPhase` one dispatching a single
116
+ * `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
100
117
  *
101
118
  * The data-server requires the full {@link ServerSharedServices}
102
119
  * shape — `HydraniumTextDocuments` for client-attributed updates,
@@ -144,10 +161,12 @@ export class DataServer {
144
161
  /**
145
162
  * Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
146
163
  * `reason` discrimination on outbound `onDocumentUpdated` notifications:
147
- * a URI in the `changed` list emits `'changed'`, in `deleted` emits
148
- * `'deleted'`, otherwise `'rebuilt'` (cascade rebuild from a dependent
149
- * URI's change). The same mechanism `AstDocumentManager.onUpdate` uses on
150
- * the LSP side, so reason fidelity stays consistent between heads.
164
+ * a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
165
+ * (cascade rebuild from a dependent URI's change). The same mechanism
166
+ * `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
167
+ * stays consistent between heads. The `deleted` half is read by
168
+ * {@link dispatchDeleteEvents} rather than by the reason discrimination,
169
+ * a deletion travelling on its own channel.
151
170
  */
152
171
  lastBuildUpdate;
153
172
  /**
@@ -248,10 +267,15 @@ export class DataServer {
248
267
  methodNamespace: this.options.methodNamespace,
249
268
  localTarget: this,
250
269
  localMethods: registeredMethods,
251
- latency: this.latency
270
+ latency: this.latency,
271
+ // Bound at the chokepoint rather than per handler, so an adopter's
272
+ // `additionalMethods` are rendered on the same terms as the
273
+ // framework's own rejections.
274
+ renderErrorMessage: error => this.services.MessageRenderer.renderError(error)
252
275
  });
253
276
  this.disposables.push(this.services.workspace.DocumentBuilder.onUpdate((changed, deleted) => {
254
277
  this.lastBuildUpdate = { changed, deleted };
278
+ this.dispatchDeleteEvents(deleted);
255
279
  }));
256
280
  this.subscribeToDocumentBuilder();
257
281
  this.subscribeToTextDocumentSaves();
@@ -715,6 +739,54 @@ export class DataServer {
715
739
  */
716
740
  subscribeToDocumentBuilder() {
717
741
  this.disposables.push(this.services.workspace.DocumentBuilder.onDocumentPhase(this.options.subscriptionPhase, (document, cancelToken) => this.dispatchPhaseEvent(document, cancelToken)));
742
+ // The BUILD-phase hook, not the per-document one: this notification is one
743
+ // message per build rather than one per document, and Langium hands the
744
+ // whole batch over here. It also does not fire for a cancelled build,
745
+ // which is what the per-document dispatch has to check by hand.
746
+ this.disposables.push(this.services.workspace.DocumentBuilder.onBuildPhase(this.options.subscriptionPhase, built => this.dispatchBuiltEvent(built)));
747
+ }
748
+ /**
749
+ * Report the documents that reached {@link DataServerOptions.subscriptionPhase}
750
+ * and that NOBODY on this
751
+ * connection is watching — the ones a client was not told about through
752
+ * {@link dispatchPhaseEvent}, which is gated per URI.
753
+ *
754
+ * **The gap this closes is the one no other source can observe.** A document
755
+ * the client watches, it hears about already. A file changed on disk, the
756
+ * host's own filesystem watcher reports — and on a browser host, where the
757
+ * workspace lives behind this head, an external change cannot happen at all.
758
+ * What is left, and what nothing outside the server can see, is a document
759
+ * rebuilt because something it DEPENDS ON changed: its file never changed, so
760
+ * a filesystem watcher is silent by construction, and it has no subscriber, so
761
+ * the update channel is silent by design. A consumer displaying data derived
762
+ * from that document — a tree label, a decorator — otherwise goes stale with
763
+ * no signal from any source, and repairs itself the moment someone opens the
764
+ * file to investigate, which is what makes it expensive to diagnose later.
765
+ *
766
+ * Payload-free on purpose: URIs only, so a client re-reads what it displays
767
+ * rather than being handed transfer documents it did not ask for. That is the
768
+ * property the subscription map protects, and it is preserved here by
769
+ * carrying no document rather than by gating the message.
770
+ *
771
+ * Quiet in the common case. Editing a document that an editor has open leaves
772
+ * that URI watched and therefore out of this set, so a build with no
773
+ * dependents produces nothing at all, and workspace initialisation produces
774
+ * nothing because it does not build to this phase. The ceiling is a
775
+ * whole-workspace rebuild at the subscription phase: one message, URIs only.
776
+ *
777
+ * The URI is canonicalised for the same reason the subscription map is keyed
778
+ * that way, and is untested for the same reason as its twin in
779
+ * {@link dispatchDeleteEvents}: the builder reports URIs out of its own
780
+ * store, so a non-canonical one cannot be produced without a fixture
781
+ * asserting a shape the real system never emits.
782
+ */
783
+ dispatchBuiltEvent(built) {
784
+ const uris = built.map(document => this.canonicalKey(document.uri.toString())).filter(uri => !this.subscriptions.has(uri));
785
+ if (uris.length === 0) {
786
+ return;
787
+ }
788
+ this.tracer.debug(`Emit onDocumentsBuilt: ${uris.length} unwatched document(s)`);
789
+ this.clientProxy.onDocumentsBuilt({ uris });
718
790
  }
719
791
  /**
720
792
  * Subscribe to the universal save event on `HydraniumTextDocuments` so a
@@ -747,6 +819,55 @@ export class DataServer {
747
819
  }
748
820
  }));
749
821
  }
822
+ /**
823
+ * Fan out a deletion for each removed URI, to EVERY client on the connection
824
+ * rather than only to the ones watching that URI.
825
+ *
826
+ * **Deliberately ungated, where {@link dispatchPhaseEvent} and
827
+ * {@link dispatchSaveEvent} are gated.** Those two carry a built document and
828
+ * fire on every build, so the subscription map is what keeps bandwidth
829
+ * proportional to what a client asked for. A deletion is neither: it is one
830
+ * URI, it is rare, and it reports the workspace's STRUCTURE rather than a
831
+ * document's content. Gating it forces any consumer that displays the
832
+ * workspace — a model tree, a file decorator — to learn about disappearances
833
+ * from a filesystem watcher instead, which a client hosted in a browser has
834
+ * no way to run: its workspace lives behind the head. A client that does not
835
+ * care filters on the URI, which costs it a comparison.
836
+ *
837
+ * The precedent is the last-close revert broadcast (see
838
+ * {@link pendingRevertBroadcasts}), where the same judgement was already made
839
+ * in the other direction: a transition that matters enough is delivered
840
+ * without a subscription.
841
+ *
842
+ * Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
843
+ * listener, which is the only place a deletion is observable: `update`
844
+ * removes the document before deriving the rebuild set, so it is never built.
845
+ * That ordering also puts this notification ahead of the `'rebuilt'` events
846
+ * for the dependents whose references the deletion just broke.
847
+ *
848
+ * The `deleted` list arrives already expanded to concrete document URIs —
849
+ * `deleteDocuments` resolves a directory URI to the documents beneath it — so
850
+ * no caller has to handle a directory here.
851
+ *
852
+ * Per-URI derived state is dropped for the same reason it is dropped
853
+ * anywhere: it describes a document that no longer exists.
854
+ * {@link lastEmittedFingerprint} in particular can outlive its subscriptions
855
+ * through the last-close revert path — left behind, it is adopted as the
856
+ * baseline by the next {@link watchModelDocument} and suppresses the first
857
+ * emit after the file returns with its previous content.
858
+ *
859
+ * The subscription itself SURVIVES: a recreated file resumes delivering to
860
+ * the same watchers with no re-subscription, and a client that answers the
861
+ * deletion by closing releases the watch through `closeModelDocument` anyway.
862
+ */
863
+ dispatchDeleteEvents(deleted) {
864
+ for (const removed of deleted) {
865
+ const uri = this.canonicalKey(removed.toString());
866
+ this.lastEmittedFingerprint.delete(uri);
867
+ this.pendingRevertBroadcasts.delete(uri);
868
+ this.clientProxy.onDocumentDeleted({ uri });
869
+ }
870
+ }
750
871
  /** Fan out a save event for the document's URI, gated by the subscription map. */
751
872
  dispatchSaveEvent(event) {
752
873
  // The save event arrives under the CLIENT URI the text store keys by (e.g. a
@@ -855,26 +976,19 @@ export class DataServer {
855
976
  /**
856
977
  * Discriminate the reason for a phase-event-driven update notification.
857
978
  * Uses the most recent `DocumentBuilder.onUpdate` snapshot:
858
- * - URI in the `deleted` list → `'deleted'`
859
979
  * - URI in the `changed` list → `'changed'` (the URI was passed to
860
980
  * `documentBuilder.update(changed, deleted)`, which spans `didChange`
861
981
  * text-document events and programmatic `update([uri], [])` calls).
862
982
  * - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
863
983
  * because something it depends on changed; its own text wasn't flagged).
864
984
  *
865
- * `'saved'` is NOT emitted from this code path — saves take the dedicated
866
- * `DataClientProtocol.onDocumentSaved` channel; adopters that want a
867
- * unified update stream synthesise `'saved'` in their bridge layer.
985
+ * `'saved'` is NOT emitted here — saves take the dedicated
986
+ * `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
987
+ * unified stream synthesise it in their bridge layer. A deletion is not a
988
+ * reason at all; see {@link dispatchDeleteEvents}.
868
989
  */
869
990
  resolveUpdateReason(uri) {
870
- const last = this.lastBuildUpdate;
871
- if (last?.deleted.some(deleted => UriUtils.equals(deleted, uri))) {
872
- return 'deleted';
873
- }
874
- if (last?.changed.some(changed => UriUtils.equals(changed, uri))) {
875
- return 'changed';
876
- }
877
- return 'rebuilt';
991
+ return this.lastBuildUpdate?.changed.some(changed => UriUtils.equals(changed, uri)) ? 'changed' : 'rebuilt';
878
992
  }
879
993
  /**
880
994
  * Subscribe to the project tier's change channel and re-fan registry
@@ -967,7 +1081,7 @@ export class DataServer {
967
1081
  }
968
1082
  async stopProfiling(args) {
969
1083
  if (!this.activeProfile) {
970
- throw new Error('No profiling capture is active; call startProfiling first.');
1084
+ throw noActiveProfileError();
971
1085
  }
972
1086
  const capture = this.activeProfile;
973
1087
  this.activeProfile = undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"data-server.js","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EAiBjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACJ,+BAA+B,EAC/B,4BAA4B,EAC5B,uBAAuB,EAezB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAYxE,OAAO,EAAgB,aAAa,EAAwB,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAG3G;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC;;;;;;;;;;GAUG;AACH,SAAS,eAAe,CAAC,KAAwB;IAC9C,IAAI,EAAE,GAAG,UAAU,CAAC;IACpB,IAAI,EAAE,GAAG,UAAU,CAAC;IACpB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACpC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC9B,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;YACpC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;QACvC,CAAC;IACJ,CAAC;IACD,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EA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AC;QAC1D,MAAM,OAAO,GAAG,CAAC,GAAG,4BAA4B,EAAE,GAAG,+BAA+B,CAAsB,CAAC;QAC3G,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACzE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACZ,4EAA4E,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;gBAC/F,6HAA6H,CAClI,CAAC;QACL,CAAC;QACD,OAAO;YACJ,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,IAAI,UAAU,CAAC,eAAe,CAAC,iBAAiB;YAC5F,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,IAAI,mBAAmB;YACvE,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,uBAAuB;YACnE,iBAAiB;YACjB,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,EAAE;YAC9C,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,4BAA4B,EAAE;SACpE,CAAC;IACL,CAAC"}
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Every user-facing message `@hydranium/data-server` raises.
11
+ *
12
+ * Declarations stay beside their call sites and are re-exported here, so this is
13
+ * enumeration rather than centralization: a code's package segment has to name
14
+ * the package that raises it. The English is a fallback, not a contract; the
15
+ * code is the contract, and renaming one is a breaking change.
16
+ */
17
+ export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Every user-facing message `@hydranium/data-server` raises.
11
+ *
12
+ * Declarations stay beside their call sites and are re-exported here, so this is
13
+ * enumeration rather than centralization: a code's package segment has to name
14
+ * the package that raises it. The English is a fallback, not a contract; the
15
+ * code is the contract, and renaming one is a breaking change.
16
+ */
17
+ export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { type Project, type TransferDiagnostic, type TransferElement } from '@hydranium/protocol';
10
- import { type DataClientProtocol, type DataServerProtocol, type ProjectsChangedEvent, type TransferDocumentSavedEvent, type TransferDocumentUpdatedEvent } from '@hydranium/protocol/data';
10
+ import { type DataClientProtocol, type DataServerProtocol, type ProjectsChangedEvent, type TransferDocumentDeletedEvent, type TransferDocumentSavedEvent, type TransferDocumentsBuiltEvent, type TransferDocumentUpdatedEvent } from '@hydranium/protocol/data';
11
11
  import { type Harness } from '@hydranium/protocol/testing';
12
12
  import { type DuplexConnectionPair } from '@hydranium/protocol/testing/node';
13
13
  import type { MessageConnection } from 'vscode-jsonrpc/node';
@@ -66,6 +66,10 @@ export interface DataServerHarness<TServer, TTransfer extends TransferElement, T
66
66
  readonly events: ReadonlyArray<TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>>;
67
67
  /** Captured `onDocumentSaved` events. */
68
68
  readonly saves: ReadonlyArray<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
69
+ /** Captured `onDocumentDeleted` events. */
70
+ readonly deletions: ReadonlyArray<TransferDocumentDeletedEvent>;
71
+ /** Captured `onDocumentsBuilt` events, one per build that had unwatched documents. */
72
+ readonly builds: ReadonlyArray<TransferDocumentsBuiltEvent>;
69
73
  /** Captured `onProjectsChanged` events. */
70
74
  readonly projectsChanges: ReadonlyArray<ProjectsChangedEvent<TProject>>;
71
75
  /** Dispose the underlying duplex pair. Idempotent. */
@@ -1 +1 @@
1
- {"version":3,"file":"data-server-harness.d.ts","sourceRoot":"","sources":["../../src/testing/data-server-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAkB,KAAK,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAGJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,OAAO,EAA2B,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAA4B,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,4BAA4B,CAC1C,OAAO,EACP,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,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S,OAAO,GAAG,OAAO,CACnC,SAAQ,OAAO;IACd,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACrE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,4BAA4B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IACrF,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAClF,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAChE,sFAAsF;IACtF,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxE,sDAAsD;IACtD,OAAO,IAAI,IAAI,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAClC,OAAO,EACP,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,EAC3D,QAAQ,SAAS,OAAO,GAAG,OAAO,EAElC,OAAO,EAAE,4BAA4B,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,GAChF,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAsC9D"}
@@ -24,11 +24,11 @@ export function makeDataServerHarness(options) {
24
24
  const pair = makeDuplexConnectionPair();
25
25
  const server = options.server(pair.left);
26
26
  // The capture half is the shared client double, not a local copy: the same
27
- // recording semantics (all three channels, an override replacing rather than
27
+ // recording semantics (every channel, an override replacing rather than
28
28
  // supplementing) then hold for a client-side suite that stands the double up
29
29
  // without a server, so an assertion learnt against one reads the same in the
30
30
  // other.
31
- const { client: localClient, updates: events, saves, projectsChanges } = makeCapturingDataClient(options.client);
31
+ const { client: localClient, updates: events, saves, deletions, builds, projectsChanges } = makeCapturingDataClient(options.client);
32
32
  const proxy = createRpcProxy(pair.right, {
33
33
  methodNamespace: options.methodNamespace ?? DATA_SERVER_WIRE_PREFIX,
34
34
  localTarget: localClient,
@@ -40,6 +40,8 @@ export function makeDataServerHarness(options) {
40
40
  pair,
41
41
  events,
42
42
  saves,
43
+ deletions,
44
+ builds,
43
45
  projectsChanges,
44
46
  dispose: () => pair.dispose()
45
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"data-server-harness.js","sourceRoot":"","sources":["../../src/testing/data-server-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAA+D,MAAM,qBAAqB,CAAC;AAClH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,EAMzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAgB,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAA6B,MAAM,kCAAkC,CAAC;AA2EvG;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAMlC,OAAgF;IAEhF,MAAM,IAAI,GAAG,wBAAwB,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,2EAA2E;IAC3E,6EAA6E;IAC7E,6EAA6E;IAC7E,6EAA6E;IAC7E,SAAS;IACT,MAAM,EACH,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EACL,eAAe,EACjB,GAAG,uBAAuB,CAAmC,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9E,MAAM,KAAK,GAAG,cAAc,CACzB,IAAI,CAAC,KAAK,EACV;QACG,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,uBAAuB;QACnE,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,4BAA4B;KAC5C,CACH,CAAC;IAEF,OAAO;QACJ,MAAM;QACN,KAAK;QACL,IAAI;QACJ,MAAM;QACN,KAAK;QACL,eAAe;QACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;KAC/B,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"data-server-harness.js","sourceRoot":"","sources":["../../src/testing/data-server-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAA+D,MAAM,qBAAqB,CAAC;AAClH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,EAQzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAgB,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAA6B,MAAM,kCAAkC,CAAC;AA+EvG;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAMlC,OAAgF;IAEhF,MAAM,IAAI,GAAG,wBAAwB,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,2EAA2E;IAC3E,wEAAwE;IACxE,6EAA6E;IAC7E,6EAA6E;IAC7E,SAAS;IACT,MAAM,EACH,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EACL,SAAS,EACT,MAAM,EACN,eAAe,EACjB,GAAG,uBAAuB,CAAmC,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9E,MAAM,KAAK,GAAG,cAAc,CACzB,IAAI,CAAC,KAAK,EACV;QACG,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,uBAAuB;QACnE,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,4BAA4B;KAC5C,CACH,CAAC;IAEF,OAAO;QACJ,MAAM;QACN,KAAK;QACL,IAAI;QACJ,MAAM;QACN,KAAK;QACL,SAAS;QACT,MAAM;QACN,eAAe;QACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;KAC/B,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydranium/data-server",
3
- "version": "1.0.0-next.7",
3
+ "version": "1.0.0-next.71",
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
  "hydranium",
@@ -38,6 +38,14 @@
38
38
  "types": "./lib/node/index.d.ts",
39
39
  "default": "./lib/node/index.js"
40
40
  },
41
+ "./messages": {
42
+ "types": "./lib/messages/index.d.ts",
43
+ "default": "./lib/messages/index.js"
44
+ },
45
+ "./lib/messages": {
46
+ "types": "./lib/messages/index.d.ts",
47
+ "default": "./lib/messages/index.js"
48
+ },
41
49
  "./testing": {
42
50
  "types": "./lib/testing/index.d.ts",
43
51
  "default": "./lib/testing/index.js"
@@ -67,19 +75,19 @@
67
75
  "watch": "tsc -b -w --preserveWatchOutput"
68
76
  },
69
77
  "devDependencies": {
70
- "@hydranium/core": "1.0.0-next.7",
71
- "@hydranium/langium": "1.0.0-next.7",
72
- "@hydranium/protocol": "1.0.0-next.7",
78
+ "@hydranium/core": "1.0.0-next.71",
79
+ "@hydranium/langium": "1.0.0-next.71",
80
+ "@hydranium/protocol": "1.0.0-next.71",
73
81
  "rimraf": "^5.0.0",
74
82
  "typescript": "^5.8.0",
75
83
  "vscode-jsonrpc": "9.0.1",
76
84
  "vscode-languageserver-textdocument": "^1.0.12"
77
85
  },
78
86
  "peerDependencies": {
79
- "@hydranium/core": "1.0.0-next.7",
80
- "@hydranium/langium": "1.0.0-next.7",
81
- "@hydranium/protocol": "1.0.0-next.7",
82
- "vscode-jsonrpc": "^8.0.0 || ^9.0.0",
87
+ "@hydranium/core": "1.0.0-next.71",
88
+ "@hydranium/langium": "1.0.0-next.71",
89
+ "@hydranium/protocol": "1.0.0-next.71",
90
+ "vscode-jsonrpc": "9.0.1",
83
91
  "vscode-languageserver-textdocument": "^1.0.12"
84
92
  },
85
93
  "engines": {
@@ -89,5 +97,6 @@
89
97
  "access": "public"
90
98
  },
91
99
  "//browser": "Selects the diagnostics default per platform, the same mechanism @eclipse-glsp/server uses to swap its node build for its browser one. The Node module imports @hydranium/core/node; a browser bundler resolves the twin instead and therefore never follows that import, which is what keeps this package's `.` entry bundleable. Node ignores this field, so a Node host keeps the real implementation with no configuration. `check:neutral` is the proof it still applies — it bundles `.` for the browser and would fail on node:fs the moment the mapping stops matching.",
100
+ "//peerDependencies": "`vscode-jsonrpc` is EXACT rather than a range, because it is one link of an atomic chain with no independently movable link: `vscode-languageserver-protocol` depends on it at exactly 9.0.1, so any other value an adopter supplies is a SECOND physical copy rather than an upgrade. This wire stack breaks on copy identity rather than on structure — `ParameterStructures.auto` is a singleton compared by `===` in connection.js, so a request type built by one copy and sent over a connection owned by the other throws `Unknown parameter structure auto`. A caret or union range was rejected because npm then resolves a `vscode-jsonrpc@8.2.0` tree SILENTLY, with no diagnostic at all, and the failure surfaces only later at server init. Exact does not fail the install either — npm downgrades an unsatisfiable peer to a warning — but it is a NAMED ERESOLVE warning printing the required version beside the found one, and a hard error for anyone installing with `--strict-peer-deps`. It does NOT prevent a NESTED copy — `@eclipse-glsp/*` carries its own exact `vscode-jsonrpc@8.2.0` dependency and root `overrides` do not ship — so a consumer of the GLSP head must pin the chain in its own manifest, and docs/adopting/requirements.md carries the block to paste.",
92
101
  "//prepack": "The publish guard, and it deliberately is NOT a `prepare`: npm runs a workspace `prepare` BEFORE the root `postinstall` that applies patches/vscode-jsonrpc+9.0.1.patch, so building there fails on a cold clone and npm rolls the entire install back. `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. It FAILS rather than rebuilds, because the rebuild is exactly the part that ordering defeats. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error."
93
102
  }
@@ -9,12 +9,15 @@
9
9
 
10
10
  import {
11
11
  createRpcProxy,
12
+ defineMessage,
12
13
  DisposableCollection,
13
14
  isDocumentSource,
14
15
  isElementSource,
15
16
  isSyntheticSource,
17
+ messageError,
16
18
  ReferenceSource,
17
19
  type CloseModelArgs,
20
+ type HydraniumResponseError,
18
21
  type Disposable,
19
22
  type ElementSource,
20
23
  type FindNextNameArgs,
@@ -52,6 +55,28 @@ import {
52
55
  } from '@hydranium/protocol/data';
53
56
  import { REVERT_ON_CLOSE_CLIENT_ID, UNKNOWN_CLIENT_ID } from '@hydranium/core';
54
57
  import { defaultDataServerDiagnostics } from './default-diagnostics.js';
58
+
59
+ /**
60
+ * Raised when a profiling command arrives with no capture running.
61
+ *
62
+ * A `ResponseError` rather than a plain `Error` so the identity survives to the
63
+ * response boundary, which is where the message is rendered. An unwrapped throw
64
+ * reaches the client as a generic internal error instead: no code for a caller
65
+ * to switch on, and nothing for the boundary to render from.
66
+ */
67
+ export const NO_ACTIVE_PROFILE = defineMessage(
68
+ 'hydranium/data-server/no-active-profile',
69
+ 'No profiling capture is active; call startProfiling first.'
70
+ );
71
+
72
+ /**
73
+ * The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
74
+ * survives reconstruction and is what a caller switches on.
75
+ */
76
+ export const NO_ACTIVE_PROFILE_CODE = 1002;
77
+
78
+ export const noActiveProfileError = (): HydraniumResponseError => messageError(NO_ACTIVE_PROFILE_CODE, NO_ACTIVE_PROFILE);
79
+
55
80
  import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
56
81
  import type {
57
82
  ClientTextDocumentChangeEvent,
@@ -258,9 +283,9 @@ export interface DataServerOptions extends LogNameOptions {
258
283
  * When supplied, every inbound data-server RPC is timed into this collector
259
284
  * (via the `createRpcProxy` binding) and exposed through
260
285
  * {@link DataServerDiagnosticsProtocol.getLatency}. A head that also runs an
261
- * LSP connection can pass the SAME collector to
262
- * `instrumentLspConnection(connection, latency)` so one report covers both
263
- * heads. Absent by default (no timing overhead).
286
+ * LSP connection can pass the SAME collector through `lspLatencyOptions` to
287
+ * that connection, so one report covers both heads. Absent by default (no
288
+ * timing overhead).
264
289
  */
265
290
  readonly latency?: LatencyCollector;
266
291
  }
@@ -301,9 +326,11 @@ interface ResolvedDataServerOptions {
301
326
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
302
327
  * builds the {@link DataClientProtocol} notification proxy on the same
303
328
  * connection in one {@link createRpcProxy} call (binding `this` as its
304
- * `localTarget`) under the configured namespace, and subscribes one
305
- * `DocumentBuilder.onDocumentPhase` listener per configured phase that
306
- * dispatches subscription events via `clientProxy.onDocumentUpdated`.
329
+ * `localTarget`) under the configured namespace, and subscribes two listeners
330
+ * at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
331
+ * per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
332
+ * `DocumentBuilder.onBuildPhase` one dispatching a single
333
+ * `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
307
334
  *
308
335
  * The data-server requires the full {@link ServerSharedServices}
309
336
  * shape — `HydraniumTextDocuments` for client-attributed updates,
@@ -356,10 +383,12 @@ export class DataServer<
356
383
  /**
357
384
  * Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
358
385
  * `reason` discrimination on outbound `onDocumentUpdated` notifications:
359
- * a URI in the `changed` list emits `'changed'`, in `deleted` emits
360
- * `'deleted'`, otherwise `'rebuilt'` (cascade rebuild from a dependent
361
- * URI's change). The same mechanism `AstDocumentManager.onUpdate` uses on
362
- * the LSP side, so reason fidelity stays consistent between heads.
386
+ * a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
387
+ * (cascade rebuild from a dependent URI's change). The same mechanism
388
+ * `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
389
+ * stays consistent between heads. The `deleted` half is read by
390
+ * {@link dispatchDeleteEvents} rather than by the reason discrimination,
391
+ * a deletion travelling on its own channel.
363
392
  */
364
393
  protected lastBuildUpdate?: { changed: readonly URI[]; deleted: readonly URI[] };
365
394
  /**
@@ -420,7 +449,7 @@ export class DataServer<
420
449
  /** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
421
450
  protected readonly latency?: LatencyCollector;
422
451
  /** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
423
- protected readonly encoder: TransferEncoder<unknown, TDiagnostic>;
452
+ protected readonly encoder: TransferEncoder<TDiagnostic>;
424
453
  /**
425
454
  * In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
426
455
  * The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
@@ -448,7 +477,7 @@ export class DataServer<
448
477
  'Did you compose `createServerSharedModule(ctx)` into your shared module?'
449
478
  );
450
479
  }
451
- this.encoder = encoder as TransferEncoder<unknown, TDiagnostic>;
480
+ this.encoder = encoder as TransferEncoder<TDiagnostic>;
452
481
  this.modelService = modelService as ModelService<AstNode, unknown, TTransfer>;
453
482
  const excluded = new Set<string>(this.options.excludedMethods);
454
483
  const registeredMethods = [
@@ -465,11 +494,16 @@ export class DataServer<
465
494
  methodNamespace: this.options.methodNamespace,
466
495
  localTarget: this,
467
496
  localMethods: registeredMethods as readonly (keyof this & string)[],
468
- latency: this.latency
497
+ latency: this.latency,
498
+ // Bound at the chokepoint rather than per handler, so an adopter's
499
+ // `additionalMethods` are rendered on the same terms as the
500
+ // framework's own rejections.
501
+ renderErrorMessage: error => this.services.MessageRenderer.renderError(error)
469
502
  });
470
503
  this.disposables.push(
471
504
  this.services.workspace.DocumentBuilder.onUpdate((changed, deleted) => {
472
505
  this.lastBuildUpdate = { changed, deleted };
506
+ this.dispatchDeleteEvents(deleted);
473
507
  })
474
508
  );
475
509
  this.subscribeToDocumentBuilder();
@@ -952,7 +986,7 @@ export class DataServer<
952
986
  diagnostics: [] as TDiagnostic[]
953
987
  };
954
988
  }
955
- return this.encoder.toTransferDocument<AstNode>(document) as unknown as TransferDocument<TTransfer, TDiagnostic>;
989
+ return this.encoder.toTransferDocument(document) as unknown as TransferDocument<TTransfer, TDiagnostic>;
956
990
  }
957
991
 
958
992
  /**
@@ -967,6 +1001,57 @@ export class DataServer<
967
1001
  this.dispatchPhaseEvent(document, cancelToken)
968
1002
  )
969
1003
  );
1004
+ // The BUILD-phase hook, not the per-document one: this notification is one
1005
+ // message per build rather than one per document, and Langium hands the
1006
+ // whole batch over here. It also does not fire for a cancelled build,
1007
+ // which is what the per-document dispatch has to check by hand.
1008
+ this.disposables.push(
1009
+ this.services.workspace.DocumentBuilder.onBuildPhase(this.options.subscriptionPhase, built => this.dispatchBuiltEvent(built))
1010
+ );
1011
+ }
1012
+
1013
+ /**
1014
+ * Report the documents that reached {@link DataServerOptions.subscriptionPhase}
1015
+ * and that NOBODY on this
1016
+ * connection is watching — the ones a client was not told about through
1017
+ * {@link dispatchPhaseEvent}, which is gated per URI.
1018
+ *
1019
+ * **The gap this closes is the one no other source can observe.** A document
1020
+ * the client watches, it hears about already. A file changed on disk, the
1021
+ * host's own filesystem watcher reports — and on a browser host, where the
1022
+ * workspace lives behind this head, an external change cannot happen at all.
1023
+ * What is left, and what nothing outside the server can see, is a document
1024
+ * rebuilt because something it DEPENDS ON changed: its file never changed, so
1025
+ * a filesystem watcher is silent by construction, and it has no subscriber, so
1026
+ * the update channel is silent by design. A consumer displaying data derived
1027
+ * from that document — a tree label, a decorator — otherwise goes stale with
1028
+ * no signal from any source, and repairs itself the moment someone opens the
1029
+ * file to investigate, which is what makes it expensive to diagnose later.
1030
+ *
1031
+ * Payload-free on purpose: URIs only, so a client re-reads what it displays
1032
+ * rather than being handed transfer documents it did not ask for. That is the
1033
+ * property the subscription map protects, and it is preserved here by
1034
+ * carrying no document rather than by gating the message.
1035
+ *
1036
+ * Quiet in the common case. Editing a document that an editor has open leaves
1037
+ * that URI watched and therefore out of this set, so a build with no
1038
+ * dependents produces nothing at all, and workspace initialisation produces
1039
+ * nothing because it does not build to this phase. The ceiling is a
1040
+ * whole-workspace rebuild at the subscription phase: one message, URIs only.
1041
+ *
1042
+ * The URI is canonicalised for the same reason the subscription map is keyed
1043
+ * that way, and is untested for the same reason as its twin in
1044
+ * {@link dispatchDeleteEvents}: the builder reports URIs out of its own
1045
+ * store, so a non-canonical one cannot be produced without a fixture
1046
+ * asserting a shape the real system never emits.
1047
+ */
1048
+ protected dispatchBuiltEvent(built: readonly LangiumDocument[]): void {
1049
+ const uris = built.map(document => this.canonicalKey(document.uri.toString())).filter(uri => !this.subscriptions.has(uri));
1050
+ if (uris.length === 0) {
1051
+ return;
1052
+ }
1053
+ this.tracer.debug(`Emit onDocumentsBuilt: ${uris.length} unwatched document(s)`);
1054
+ this.clientProxy.onDocumentsBuilt({ uris });
970
1055
  }
971
1056
 
972
1057
  /**
@@ -1004,6 +1089,56 @@ export class DataServer<
1004
1089
  );
1005
1090
  }
1006
1091
 
1092
+ /**
1093
+ * Fan out a deletion for each removed URI, to EVERY client on the connection
1094
+ * rather than only to the ones watching that URI.
1095
+ *
1096
+ * **Deliberately ungated, where {@link dispatchPhaseEvent} and
1097
+ * {@link dispatchSaveEvent} are gated.** Those two carry a built document and
1098
+ * fire on every build, so the subscription map is what keeps bandwidth
1099
+ * proportional to what a client asked for. A deletion is neither: it is one
1100
+ * URI, it is rare, and it reports the workspace's STRUCTURE rather than a
1101
+ * document's content. Gating it forces any consumer that displays the
1102
+ * workspace — a model tree, a file decorator — to learn about disappearances
1103
+ * from a filesystem watcher instead, which a client hosted in a browser has
1104
+ * no way to run: its workspace lives behind the head. A client that does not
1105
+ * care filters on the URI, which costs it a comparison.
1106
+ *
1107
+ * The precedent is the last-close revert broadcast (see
1108
+ * {@link pendingRevertBroadcasts}), where the same judgement was already made
1109
+ * in the other direction: a transition that matters enough is delivered
1110
+ * without a subscription.
1111
+ *
1112
+ * Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
1113
+ * listener, which is the only place a deletion is observable: `update`
1114
+ * removes the document before deriving the rebuild set, so it is never built.
1115
+ * That ordering also puts this notification ahead of the `'rebuilt'` events
1116
+ * for the dependents whose references the deletion just broke.
1117
+ *
1118
+ * The `deleted` list arrives already expanded to concrete document URIs —
1119
+ * `deleteDocuments` resolves a directory URI to the documents beneath it — so
1120
+ * no caller has to handle a directory here.
1121
+ *
1122
+ * Per-URI derived state is dropped for the same reason it is dropped
1123
+ * anywhere: it describes a document that no longer exists.
1124
+ * {@link lastEmittedFingerprint} in particular can outlive its subscriptions
1125
+ * through the last-close revert path — left behind, it is adopted as the
1126
+ * baseline by the next {@link watchModelDocument} and suppresses the first
1127
+ * emit after the file returns with its previous content.
1128
+ *
1129
+ * The subscription itself SURVIVES: a recreated file resumes delivering to
1130
+ * the same watchers with no re-subscription, and a client that answers the
1131
+ * deletion by closing releases the watch through `closeModelDocument` anyway.
1132
+ */
1133
+ protected dispatchDeleteEvents(deleted: readonly URI[]): void {
1134
+ for (const removed of deleted) {
1135
+ const uri = this.canonicalKey(removed.toString());
1136
+ this.lastEmittedFingerprint.delete(uri);
1137
+ this.pendingRevertBroadcasts.delete(uri);
1138
+ this.clientProxy.onDocumentDeleted({ uri });
1139
+ }
1140
+ }
1141
+
1007
1142
  /** Fan out a save event for the document's URI, gated by the subscription map. */
1008
1143
  protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void {
1009
1144
  // The save event arrives under the CLIENT URI the text store keys by (e.g. a
@@ -1122,26 +1257,19 @@ export class DataServer<
1122
1257
  /**
1123
1258
  * Discriminate the reason for a phase-event-driven update notification.
1124
1259
  * Uses the most recent `DocumentBuilder.onUpdate` snapshot:
1125
- * - URI in the `deleted` list → `'deleted'`
1126
1260
  * - URI in the `changed` list → `'changed'` (the URI was passed to
1127
1261
  * `documentBuilder.update(changed, deleted)`, which spans `didChange`
1128
1262
  * text-document events and programmatic `update([uri], [])` calls).
1129
1263
  * - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
1130
1264
  * because something it depends on changed; its own text wasn't flagged).
1131
1265
  *
1132
- * `'saved'` is NOT emitted from this code path — saves take the dedicated
1133
- * `DataClientProtocol.onDocumentSaved` channel; adopters that want a
1134
- * unified update stream synthesise `'saved'` in their bridge layer.
1266
+ * `'saved'` is NOT emitted here — saves take the dedicated
1267
+ * `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
1268
+ * unified stream synthesise it in their bridge layer. A deletion is not a
1269
+ * reason at all; see {@link dispatchDeleteEvents}.
1135
1270
  */
1136
1271
  protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'] {
1137
- const last = this.lastBuildUpdate;
1138
- if (last?.deleted.some(deleted => UriUtils.equals(deleted, uri))) {
1139
- return 'deleted';
1140
- }
1141
- if (last?.changed.some(changed => UriUtils.equals(changed, uri))) {
1142
- return 'changed';
1143
- }
1144
- return 'rebuilt';
1272
+ return this.lastBuildUpdate?.changed.some(changed => UriUtils.equals(changed, uri)) ? 'changed' : 'rebuilt';
1145
1273
  }
1146
1274
 
1147
1275
  /**
@@ -1243,7 +1371,7 @@ export class DataServer<
1243
1371
 
1244
1372
  async stopProfiling(args: StopProfilingArgs): Promise<string> {
1245
1373
  if (!this.activeProfile) {
1246
- throw new Error('No profiling capture is active; call startProfiling first.');
1374
+ throw noActiveProfileError();
1247
1375
  }
1248
1376
  const capture = this.activeProfile;
1249
1377
  this.activeProfile = undefined;
@@ -0,0 +1,19 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+
10
+ /**
11
+ * Every user-facing message `@hydranium/data-server` raises.
12
+ *
13
+ * Declarations stay beside their call sites and are re-exported here, so this is
14
+ * enumeration rather than centralization: a code's package segment has to name
15
+ * the package that raises it. The English is a fallback, not a contract; the
16
+ * code is the contract, and renaming one is a breaking change.
17
+ */
18
+
19
+ export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
@@ -14,7 +14,9 @@ import {
14
14
  type DataClientProtocol,
15
15
  type DataServerProtocol,
16
16
  type ProjectsChangedEvent,
17
+ type TransferDocumentDeletedEvent,
17
18
  type TransferDocumentSavedEvent,
19
+ type TransferDocumentsBuiltEvent,
18
20
  type TransferDocumentUpdatedEvent
19
21
  } from '@hydranium/protocol/data';
20
22
  import { type Harness, makeCapturingDataClient } from '@hydranium/protocol/testing';
@@ -87,6 +89,10 @@ export interface DataServerHarness<
87
89
  readonly events: ReadonlyArray<TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>>;
88
90
  /** Captured `onDocumentSaved` events. */
89
91
  readonly saves: ReadonlyArray<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
92
+ /** Captured `onDocumentDeleted` events. */
93
+ readonly deletions: ReadonlyArray<TransferDocumentDeletedEvent>;
94
+ /** Captured `onDocumentsBuilt` events, one per build that had unwatched documents. */
95
+ readonly builds: ReadonlyArray<TransferDocumentsBuiltEvent>;
90
96
  /** Captured `onProjectsChanged` events. */
91
97
  readonly projectsChanges: ReadonlyArray<ProjectsChangedEvent<TProject>>;
92
98
  /** Dispose the underlying duplex pair. Idempotent. */
@@ -115,7 +121,7 @@ export function makeDataServerHarness<
115
121
  const server = options.server(pair.left);
116
122
 
117
123
  // The capture half is the shared client double, not a local copy: the same
118
- // recording semantics (all three channels, an override replacing rather than
124
+ // recording semantics (every channel, an override replacing rather than
119
125
  // supplementing) then hold for a client-side suite that stands the double up
120
126
  // without a server, so an assertion learnt against one reads the same in the
121
127
  // other.
@@ -123,6 +129,8 @@ export function makeDataServerHarness<
123
129
  client: localClient,
124
130
  updates: events,
125
131
  saves,
132
+ deletions,
133
+ builds,
126
134
  projectsChanges
127
135
  } = makeCapturingDataClient<TTransfer, TDiagnostic, TProject>(options.client);
128
136
 
@@ -141,6 +149,8 @@ export function makeDataServerHarness<
141
149
  pair,
142
150
  events,
143
151
  saves,
152
+ deletions,
153
+ builds,
144
154
  projectsChanges,
145
155
  dispose: () => pair.dispose()
146
156
  };