@hydranium/data-server 1.0.0-next.12 → 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.
package/README.md CHANGED
@@ -19,10 +19,19 @@ Installed by the server process that already composes
19
19
  `getModelDocument`, `updateModelDocument`, `saveModelDocument`,
20
20
  `closeModelDocument`, `watchModelDocument` / `unwatchModelDocument`, and
21
21
  `waitForReady` for clients that must not race workspace initialisation.
22
+ - **Client sessions per connection:** `createSession` registers a participant,
23
+ whose requests then write only what it has open; `createModelDocument` and
24
+ the all-or-none `updateModelDocuments` serve sessions only; `closeSession`, or
25
+ the connection closing, ends a session and closes everything it has open. See
26
+ [Client sessions](../../docs/concepts/client-sessions.md).
22
27
  - **Push notifications instead of polling:** `onDocumentUpdated` when a
23
28
  subscribed document reaches the configured build phase
24
29
  (`DataServerOptions.subscriptionPhase`, `DocumentState.Validated` by default),
25
- `onDocumentSaved` on a separate channel, and `onProjectsChanged` from the
30
+ `onDocumentSaved` on a separate channel, `onDocumentDeleted` on a third (a
31
+ deleted document has no built state to carry, and the build-phase path never
32
+ runs for one), `onDocumentsBuilt` once per build for the documents nobody
33
+ watches — chiefly those rebuilt as a cascade, which no filesystem watcher can
34
+ see because their own files did not change — and `onProjectsChanged` from the
26
35
  project registry.
27
36
  - **Projects as first-class:** `getProjects` and `getProjectForUri`, answered from
28
37
  the framework's `ProjectManager`.
@@ -38,6 +47,8 @@ The projection itself is not this package's: it delegates to `TransferEncoder`
38
47
  and `ModelService` from `@hydranium/core`, so there is no second in-memory model
39
48
  to keep in sync.
40
49
 
50
+ For the adopter extension path, see [Add a data-server method](../../docs/guides/data-server-method.md). It covers the typed subclass, `additionalMethods`, shared namespace, and client proxy as one wire contract.
51
+
41
52
  ## Install
42
53
 
43
54
  ```bash
@@ -6,13 +6,49 @@
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';
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';
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, TransferDocument, type TransferElement } from '@hydranium/protocol';
10
+ import { type DataClientProtocol, type DataServerDiagnosticsProtocol, type DataServerProtocol, type DumpServerStateArgs, type StartProfilingArgs, type StopProfilingArgs, type WriteServerHeapSnapshotArgs, type CloseSessionArgs, type CreateModelDocumentArgs, type CreateSessionArgs, type GetModelDocumentArgs, type GetProjectForUriArgs, type TransferSaveDocumentArgs, type WatchModelDocumentArgs, type TransferDocumentUpdatedEvent, type TransferUpdateDocumentArgs, type TransferUpdateDocumentsArgs } 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;
26
+ /**
27
+ * Raised when a reference question's wait for the build exceeds
28
+ * {@link DataServerOptions.referenceSettleTimeoutMs}.
29
+ *
30
+ * A `ResponseError` because a class name does not cross RPC: without the code a
31
+ * wire client cannot tell a wedged build from a reference that resolves to
32
+ * nothing, which is the distinction the wait exists to keep.
33
+ */
34
+ export declare const REFERENCE_SETTLE_TIMEOUT: import("@hydranium/protocol").MessageDefinition<"Timed out after {elapsedMs}ms waiting for the build to settle before answering a reference query.">;
35
+ /** See {@link NO_ACTIVE_PROFILE_CODE} for why this is separate from the catalogue code. */
36
+ export declare const REFERENCE_SETTLE_TIMEOUT_CODE = 1003;
37
+ export declare const referenceSettleTimeoutError: (elapsedMs: number) => HydraniumResponseError;
11
38
  import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
12
- import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
39
+ import type { ClientSession, ClientSessionWriteArgs, ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, AstDiagnostic, ModelService, ProjectChangeEvent, ServerSharedServices, SessionEndCause, TransferEncoder } from '@hydranium/core';
13
40
  import type { TextDocument } from 'vscode-languageserver-textdocument';
14
41
  import { type AstNode, DocumentState, type LangiumDocument, type URI } from '@hydranium/langium';
15
42
  import type { CancellationToken, MessageConnection } from 'vscode-jsonrpc';
43
+ /**
44
+ * A session a data connection registered with a resume token, and how to end
45
+ * it from another connection. See {@link DataServer.resumableSessions}.
46
+ */
47
+ export interface ResumableSession {
48
+ readonly token: string;
49
+ /** End the session as its connection closing would. */
50
+ readonly end: () => void;
51
+ }
16
52
  /**
17
53
  * Which observable state {@link DataServer.computeDocumentFingerprint} hashes to
18
54
  * de-dup `onDocumentUpdated` emissions.
@@ -82,6 +118,21 @@ export interface DataServerOptions extends LogNameOptions {
82
118
  * state included). See {@link FingerprintStrategy}.
83
119
  */
84
120
  readonly fingerprintStrategy?: FingerprintStrategy;
121
+ /**
122
+ * How long a reference question waits for the build to reach `Linked` before
123
+ * failing with {@link REFERENCE_SETTLE_TIMEOUT_CODE}. Bounded because the
124
+ * wait resolves off a build-phase notification, so a build cancelled below
125
+ * `Linked` with nothing after it leaves the request unanswered for the life
126
+ * of the server.
127
+ *
128
+ * Expiry rejects rather than reading the index anyway: the unsettled index
129
+ * is what the wait keeps the caller away from, so falling through to it on a
130
+ * slow build reinstates the fault — and on a name proposal persists it.
131
+ *
132
+ * Default {@link DataServer.DEFAULT_OPTIONS}, sized for a cold workspace
133
+ * still reaching `Linked` for the first time.
134
+ */
135
+ readonly referenceSettleTimeoutMs?: number;
85
136
  /**
86
137
  * Wire-method namespace for both inbound request handlers and the
87
138
  * outbound notification client proxy. Defaults to
@@ -136,14 +187,19 @@ export interface DataServerOptions extends LogNameOptions {
136
187
  * When supplied, every inbound data-server RPC is timed into this collector
137
188
  * (via the `createRpcProxy` binding) and exposed through
138
189
  * {@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).
190
+ * LSP connection can pass the SAME collector through `lspLatencyOptions` to
191
+ * that connection, so one report covers both heads. Absent by default (no
192
+ * timing overhead).
142
193
  */
143
194
  readonly latency?: LatencyCollector;
144
195
  }
145
- /** Fully-resolved variant — every field set, used internally after merging defaults. */
146
- interface ResolvedDataServerOptions {
196
+ /**
197
+ * Fully-resolved variant of {@link DataServerOptions} — every field set, after
198
+ * merging defaults. Returned by the `protected`
199
+ * {@link DataServer.resolveOptions} and held on {@link DataServer.options}, so
200
+ * an adopter changing how defaults resolve has to name it.
201
+ */
202
+ export interface ResolvedDataServerOptions {
147
203
  readonly subscriptionPhase: DocumentState;
148
204
  readonly fingerprintStrategy: FingerprintStrategy;
149
205
  readonly methodNamespace: string;
@@ -151,6 +207,7 @@ interface ResolvedDataServerOptions {
151
207
  readonly excludedMethods: readonly string[];
152
208
  /** Always resolved — to the caller's, or to the platform default. */
153
209
  readonly diagnostics: DataServerDiagnosticsProvider;
210
+ readonly referenceSettleTimeoutMs: number;
154
211
  }
155
212
  /**
156
213
  * Typed-RPC protocol head for the hydranium framework. The data-server
@@ -177,9 +234,11 @@ interface ResolvedDataServerOptions {
177
234
  * any names supplied via {@link DataServerOptions.additionalMethods}) and
178
235
  * builds the {@link DataClientProtocol} notification proxy on the same
179
236
  * 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`.
237
+ * `localTarget`) under the configured namespace, and subscribes two listeners
238
+ * at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
239
+ * per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
240
+ * `DocumentBuilder.onBuildPhase` one dispatching a single
241
+ * `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
183
242
  *
184
243
  * The data-server requires the full {@link ServerSharedServices}
185
244
  * shape — `HydraniumTextDocuments` for client-attributed updates,
@@ -203,32 +262,32 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
203
262
  * Framework defaults, exposed so an adopter can spread them when
204
263
  * extending rather than restate a value the framework may change.
205
264
  */
206
- static readonly DEFAULT_OPTIONS: Required<Pick<DataServerOptions, 'subscriptionPhase'>>;
265
+ static readonly DEFAULT_OPTIONS: Required<Pick<DataServerOptions, 'subscriptionPhase' | 'referenceSettleTimeoutMs'>>;
207
266
  protected readonly options: ResolvedDataServerOptions;
208
267
  /** Subscription bookkeeping: URI → set of clientIds that subscribed for that URI. */
209
268
  protected readonly subscriptions: Map<string, Set<string>>;
210
269
  /**
211
- * Open-document bookkeeping: URI → set of clientIds that opened it over THIS
212
- * connection.
270
+ * The client sessions this connection registered, by client id. A document
271
+ * request carrying one of these ids acts as that session; one carrying any
272
+ * other id fails.
213
273
  *
214
- * Kept because the document store releases a client's hold only from an
215
- * explicit close, and a client that dies without closing would otherwise keep
216
- * the document open forever — resident, and with its last-close revert
217
- * suppressed. The store has no notion of which connection a clientId reached
218
- * it over, so the connection-scoped set has to live here; teaching it a client
219
- * identity is the more robust and much larger alternative.
274
+ * Entries stay after {@link dispose} has ended their sessions, so a request
275
+ * still running from before the connection closed reaches the ended handle
276
+ * and fails with the session's own error.
220
277
  */
221
- protected readonly openedDocuments: Map<string, Set<string>>;
278
+ protected readonly clientSessions: Map<string, ClientSession<AstNode, AstDiagnostic, TTransfer, object>>;
222
279
  /** Typed client proxy — sends `data-server/on*` notifications back over the same wire. */
223
280
  protected readonly clientProxy: DataClientProtocol<TTransfer, TDiagnostic, TProject>;
224
281
  protected readonly disposables: DisposableCollection;
225
282
  /**
226
283
  * Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
227
284
  * `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.
285
+ * a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
286
+ * (cascade rebuild from a dependent URI's change). The same mechanism
287
+ * `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
288
+ * stays consistent between heads. The `deleted` half is read by
289
+ * {@link dispatchDeleteEvents} rather than by the reason discrimination,
290
+ * a deletion travelling on its own channel.
232
291
  */
233
292
  protected lastBuildUpdate?: {
234
293
  changed: readonly URI[];
@@ -271,12 +330,12 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
271
330
  */
272
331
  protected readonly lastEmittedFingerprint: Map<string, string>;
273
332
  /**
274
- * URIs whose LAST client just closed. The update handler rebuilds such a
275
- * document from its disk content (discarding unsaved in-session edits),
276
- * but {@link dispatchPhaseEvent} gates on the subscription map — and the
277
- * last close typically also removed the last watcher, so consumers that
278
- * only ever fetch via `getModelDocument` would keep showing the
279
- * discarded state forever. Marked on the last-close transition (see
333
+ * URIs the text store just released after their last close. The store
334
+ * rebuilds such a document from its disk content (discarding unsaved
335
+ * in-session edits), but {@link dispatchPhaseEvent} gates on the
336
+ * subscription map — and the last close typically also removed the last
337
+ * watcher, so consumers that only ever fetch via `getModelDocument` would
338
+ * keep showing the discarded state forever. Marked on the release (see
280
339
  * {@link subscribeToTextDocumentCloses}) and consumed by
281
340
  * {@link dispatchPhaseEvent}, which broadcasts the following rebuild's
282
341
  * phase event even without a subscription — de-duplicated against
@@ -292,7 +351,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
292
351
  /** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
293
352
  protected readonly latency?: LatencyCollector;
294
353
  /** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
295
- protected readonly encoder: TransferEncoder<unknown, TDiagnostic>;
354
+ protected readonly encoder: TransferEncoder<TDiagnostic>;
296
355
  /**
297
356
  * In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
298
357
  * The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
@@ -301,46 +360,78 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
301
360
  * `astDocumentToTransferDocument` accepts both shapes (wire-shape or LSP-shape) and projects
302
361
  * to wire shape on the return — see `TransferEncoder.astDocumentToTransferDocument`.
303
362
  */
304
- protected readonly modelService: ModelService<AstNode, unknown, TTransfer>;
363
+ protected readonly modelService: ModelService<AstNode, AstDiagnostic, TTransfer>;
305
364
  constructor(connection: MessageConnection, services: ServerSharedServices<TProject>, options?: DataServerOptions);
306
365
  /**
307
366
  * Release everything the constructor wired up — the bound protocol
308
367
  * handlers and every listener — and clear the subscription map and the
309
368
  * per-URI emission-fingerprint cache, so a long-lived shared services
310
369
  * bundle does not retain per-connection memory after the connection
311
- * closes. Also closes every document still open over this connection (see
312
- * {@link closeOpenDocuments}), which is the SHARED store's state rather than
313
- * this server's and so outlives the connection unless released here.
314
- *
315
- * Idempotent: subsequent calls are no-ops. Self-fires on
316
- * `connection.onClose` so adopters who don't hold a reference still
317
- * get per-connection cleanup; adopters that DO hold a reference may
318
- * call `dispose()` directly for early teardown.
319
- */
320
- dispose(): void;
321
- openModelDocument(args: OpenModelArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
370
+ * closes. Also ends every session this connection registered, which closes
371
+ * every document it has open: the SHARED store's state rather than this
372
+ * server's, which outlives the connection unless released here.
373
+ *
374
+ * Idempotent: subsequent calls are no-ops. Runs by itself when the
375
+ * connection closes, so adopters who don't hold a reference still get
376
+ * per-connection cleanup; adopters that DO hold a reference may call
377
+ * `dispose()` directly for early teardown. The sessions end with `cause`:
378
+ * `'closed'` reverts every document whose last open they close at once,
379
+ * and `'lost'`, the connection's own close, lets each wait out the revert
380
+ * grace.
381
+ */
382
+ dispose(cause?: SessionEndCause): void;
383
+ createSession(args: CreateSessionArgs): Promise<void>;
384
+ /**
385
+ * End a session this connection registered. The ended handle stays in
386
+ * {@link clientSessions}, as it does after {@link dispose}, so a request for
387
+ * the id still arriving fails with the ended session's own error.
388
+ */
389
+ closeSession(args: CloseSessionArgs): Promise<void>;
390
+ /** End `session`, registered here under `clientId`, with `cause`, and drop its watches on this connection. */
391
+ protected endSession(clientId: string, session: ClientSession<AstNode, AstDiagnostic, TTransfer>, cause?: SessionEndCause): void;
392
+ /**
393
+ * The resumable sessions of this services tree, by client id, across all of
394
+ * its data connections: a client resumes on another connection than the one
395
+ * that registered it. An entry leaves when its session ends, by any path, so
396
+ * it keeps no ended connection alive.
397
+ *
398
+ * A takeover by resume token ends the old session even when its connection
399
+ * is still alive, so two clients that shared an id and its token would end
400
+ * each other's sessions. And the token is a guard against colliding with a
401
+ * session the server has not yet seen end, not a secret: the wire carries no
402
+ * authentication, and a peer that learns the token can end the session.
403
+ */
404
+ protected resumableSessions(): Map<string, ResumableSession>;
405
+ createModelDocument(args: CreateModelDocumentArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
406
+ updateModelDocuments(args: TransferUpdateDocumentsArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>[]>;
407
+ /**
408
+ * The session write a wire write request carries. Only the fields a session
409
+ * takes: a field an adopter adds to a request reaches the session only
410
+ * through an override of this.
411
+ */
412
+ protected toSessionWrite(request: Omit<TransferUpdateDocumentArgs<TTransfer>, 'clientId'>): ClientSessionWriteArgs<TTransfer>;
413
+ /**
414
+ * The session this connection registered under `clientId`, which every
415
+ * document request acts as. An id that is not one fails with the
416
+ * closed-session code: opening or writing under it would leave an open that
417
+ * no session end ever closes.
418
+ */
419
+ protected requireSession(clientId: string): ClientSession<AstNode, AstDiagnostic, TTransfer>;
420
+ openModelDocument(args: Pick<OpenModelArgs, 'uri' | 'clientId' | 'options'>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
421
+ /**
422
+ * The snapshot a session's open or create answers with. When the read
423
+ * fails, `rollback` undoes the open this call made before the failure is
424
+ * rethrown: the caller sees no open, so nothing on its side would ever close
425
+ * it.
426
+ *
427
+ * Versioned with the store's shared version rather than the snapshot's own:
428
+ * the built document's `textDocument.version` lags the store's whenever the
429
+ * store assigned the version, and the store's is what a write's `basedOn` is
430
+ * compared against, so reporting the snapshot's would make the caller's
431
+ * first based-on write conflict with itself.
432
+ */
433
+ protected openedSnapshot(uri: string, rollback?: () => Promise<void>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
322
434
  closeModelDocument(args: CloseModelArgs): Promise<void>;
323
- /**
324
- * Drop the recorded hold for `(uri, clientId)` so {@link dispose} does not
325
- * close it a second time. Idempotent.
326
- */
327
- protected forgetOpenDocument(uri: string, clientId: string): void;
328
- /**
329
- * Close every document still open over this connection, for the clients that
330
- * opened it here.
331
- *
332
- * The document store releases a per-URI hold only from an explicit close, so
333
- * without this a client that dies mid-session keeps its documents open for the
334
- * lifetime of the process: `isOpenInAnyClient` stays true, the document stays
335
- * resident, and the last-close revert never runs. A long-lived multi-client
336
- * head is the configuration where a dead client is normal rather than
337
- * exceptional, so the leak accumulates there.
338
- *
339
- * Runs from {@link dispose}, which is synchronous, so each close is fired and
340
- * its failure swallowed — a teardown must not reject, and a URI whose close
341
- * fails is no worse off than it was before this drain existed.
342
- */
343
- protected closeOpenDocuments(): void;
344
435
  getModelDocument(args: GetModelDocumentArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
345
436
  updateModelDocument(args: TransferUpdateDocumentArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
346
437
  saveModelDocument(args: TransferSaveDocumentArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
@@ -395,6 +486,23 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
395
486
  * subclass.
396
487
  */
397
488
  waitForReady(): Promise<void>;
489
+ /**
490
+ * Settle the build before a reference question is answered from the index.
491
+ *
492
+ * A query issued right after a model update otherwise races the rebuild and
493
+ * reads an index missing the symbols it asks about. The cost is not confined
494
+ * to this call: a scope built inside that window is cached, and the build's
495
+ * remaining documents link against it.
496
+ *
497
+ * Waits the source document specifically, but ONLY when one is loaded at
498
+ * that URI: a synthetic source can address a URI with no document (a
499
+ * directory URI, typically), where a per-URI `waitUntil` throws "No document
500
+ * found". Falls back to a global settle, matching the id-based
501
+ * `ElementSource` path.
502
+ *
503
+ * Bounded by {@link DataServerOptions.referenceSettleTimeoutMs}.
504
+ */
505
+ protected awaitReferencesLinked(source: ReferenceSource): Promise<void>;
398
506
  findReferenceCandidates(ctx: ReferenceContext): Promise<ReferenceCandidate[]>;
399
507
  resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined>;
400
508
  findNextName(args: FindNextNameArgs): Promise<string>;
@@ -409,6 +517,9 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
409
517
  /**
410
518
  * Pick the language that owns a reference source, in order:
411
519
  *
520
+ * 0. A {@link isSyntheticSource} naming its own `language` routes there.
521
+ * First because every step below infers, and an inference must not
522
+ * override a caller that has said which grammar it means.
412
523
  * 1. A URI-bearing source ({@link isDocumentSource}/{@link isSyntheticSource})
413
524
  * whose URI resolves to a registered language routes by URI.
414
525
  * 2. A single-language workspace always routes to that one language — so
@@ -489,6 +600,42 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
489
600
  * regardless of subscriber count.
490
601
  */
491
602
  protected subscribeToDocumentBuilder(): void;
603
+ /**
604
+ * Report the documents that reached {@link DataServerOptions.subscriptionPhase}
605
+ * and that NOBODY on this
606
+ * connection is watching — the ones a client was not told about through
607
+ * {@link dispatchPhaseEvent}, which is gated per URI.
608
+ *
609
+ * **The gap this closes is the one no other source can observe.** A document
610
+ * the client watches, it hears about already. A file changed on disk, the
611
+ * host's own filesystem watcher reports — and on a browser host, where the
612
+ * workspace lives behind this head, an external change cannot happen at all.
613
+ * What is left, and what nothing outside the server can see, is a document
614
+ * rebuilt because something it DEPENDS ON changed: its file never changed, so
615
+ * a filesystem watcher is silent by construction, and it has no subscriber, so
616
+ * the update channel is silent by design. A consumer displaying data derived
617
+ * from that document — a tree label, a decorator — otherwise goes stale with
618
+ * no signal from any source, and repairs itself the moment someone opens the
619
+ * file to investigate, which is what makes it expensive to diagnose later.
620
+ *
621
+ * Payload-free on purpose: URIs only, so a client re-reads what it displays
622
+ * rather than being handed transfer documents it did not ask for. That is the
623
+ * property the subscription map protects, and it is preserved here by
624
+ * carrying no document rather than by gating the message.
625
+ *
626
+ * Quiet in the common case. Editing a document that an editor has open leaves
627
+ * that URI watched and therefore out of this set, so a build with no
628
+ * dependents produces nothing at all, and workspace initialisation produces
629
+ * nothing because it does not build to this phase. The ceiling is a
630
+ * whole-workspace rebuild at the subscription phase: one message, URIs only.
631
+ *
632
+ * The URI is canonicalised for the same reason the subscription map is keyed
633
+ * that way, and is untested for the same reason as its twin in
634
+ * {@link dispatchDeleteEvents}: the builder reports URIs out of its own
635
+ * store, so a non-canonical one cannot be produced without a fixture
636
+ * asserting a shape the real system never emits.
637
+ */
638
+ protected dispatchBuiltEvent(built: readonly LangiumDocument[]): void;
492
639
  /**
493
640
  * Subscribe to the universal save event on `HydraniumTextDocuments` so a
494
641
  * single `onDocumentSaved` wire notification fires for ANY save of a
@@ -505,12 +652,56 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
505
652
  */
506
653
  protected subscribeToTextDocumentSaves(): void;
507
654
  /**
508
- * Mark the last-close transition per URI (see
509
- * {@link pendingRevertBroadcasts}). The listener consults
510
- * `isOpenInAnyClient` AFTER the store decremented the closing client's
511
- * hold, so a `false` answer means this close was the last one.
655
+ * Mark each document the store releases after its last close (see
656
+ * {@link pendingRevertBroadcasts}). A release, not the close itself: a
657
+ * document whose last client lost its connection is released only once
658
+ * the revert grace runs out, or when another client opens it meanwhile, and
659
+ * not at all when a client lost from it opens it again within its own
660
+ * grace.
512
661
  */
513
662
  protected subscribeToTextDocumentCloses(): void;
663
+ /**
664
+ * Fan out a deletion for each removed URI, to EVERY client on the connection
665
+ * rather than only to the ones watching that URI.
666
+ *
667
+ * **Deliberately ungated, where {@link dispatchPhaseEvent} and
668
+ * {@link dispatchSaveEvent} are gated.** Those two carry a built document and
669
+ * fire on every build, so the subscription map is what keeps bandwidth
670
+ * proportional to what a client asked for. A deletion is neither: it is one
671
+ * URI, it is rare, and it reports the workspace's STRUCTURE rather than a
672
+ * document's content. Gating it forces any consumer that displays the
673
+ * workspace — a model tree, a file decorator — to learn about disappearances
674
+ * from a filesystem watcher instead, which a client hosted in a browser has
675
+ * no way to run: its workspace lives behind the head. A client that does not
676
+ * care filters on the URI, which costs it a comparison.
677
+ *
678
+ * The precedent is the last-close revert broadcast (see
679
+ * {@link pendingRevertBroadcasts}), where the same judgement was already made
680
+ * in the other direction: a transition that matters enough is delivered
681
+ * without a subscription.
682
+ *
683
+ * Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
684
+ * listener, which is the only place a deletion is observable: `update`
685
+ * removes the document before deriving the rebuild set, so it is never built.
686
+ * That ordering also puts this notification ahead of the `'rebuilt'` events
687
+ * for the dependents whose references the deletion just broke.
688
+ *
689
+ * The `deleted` list arrives already expanded to concrete document URIs —
690
+ * `deleteDocuments` resolves a directory URI to the documents beneath it — so
691
+ * no caller has to handle a directory here.
692
+ *
693
+ * Per-URI derived state is dropped for the same reason it is dropped
694
+ * anywhere: it describes a document that no longer exists.
695
+ * {@link lastEmittedFingerprint} in particular can outlive its subscriptions
696
+ * through the last-close revert path — left behind, it is adopted as the
697
+ * baseline by the next {@link watchModelDocument} and suppresses the first
698
+ * emit after the file returns with its previous content.
699
+ *
700
+ * The subscription itself SURVIVES: a recreated file resumes delivering to
701
+ * the same watchers with no re-subscription, and a client that answers the
702
+ * deletion by closing releases the watch through `closeModelDocument` anyway.
703
+ */
704
+ protected dispatchDeleteEvents(deleted: readonly URI[]): void;
514
705
  /** Fan out a save event for the document's URI, gated by the subscription map. */
515
706
  protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void;
516
707
  /**
@@ -556,16 +747,16 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
556
747
  /**
557
748
  * Discriminate the reason for a phase-event-driven update notification.
558
749
  * Uses the most recent `DocumentBuilder.onUpdate` snapshot:
559
- * - URI in the `deleted` list → `'deleted'`
560
750
  * - URI in the `changed` list → `'changed'` (the URI was passed to
561
751
  * `documentBuilder.update(changed, deleted)`, which spans `didChange`
562
752
  * text-document events and programmatic `update([uri], [])` calls).
563
753
  * - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
564
754
  * because something it depends on changed; its own text wasn't flagged).
565
755
  *
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.
756
+ * `'saved'` is NOT emitted here — saves take the dedicated
757
+ * `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
758
+ * unified stream synthesise it in their bridge layer. A deletion is not a
759
+ * reason at all; see {@link dispatchDeleteEvents}.
569
760
  */
570
761
  protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'];
571
762
  /**
@@ -610,5 +801,4 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
610
801
  /** Resolve a partial options object into a fully-defaulted form. */
611
802
  protected resolveOptions(partial: DataServerOptions): ResolvedDataServerOptions;
612
803
  }
613
- export {};
614
804
  //# sourceMappingURL=data-server.d.ts.map
@@ -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,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIJ,KAAK,kBAAkB,EACvB,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAE3B,KAAK,4BAA4B,EACjC,KAAK,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