@hydranium/data-server 1.0.0-next.10
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/LICENSE +21 -0
- package/README.md +91 -0
- package/lib/data-server.d.ts +614 -0
- package/lib/data-server.d.ts.map +1 -0
- package/lib/data-server.js +1003 -0
- package/lib/data-server.js.map +1 -0
- package/lib/default-diagnostics.browser.d.ts +18 -0
- package/lib/default-diagnostics.browser.d.ts.map +1 -0
- package/lib/default-diagnostics.browser.js +36 -0
- package/lib/default-diagnostics.browser.js.map +1 -0
- package/lib/default-diagnostics.d.ts +36 -0
- package/lib/default-diagnostics.d.ts.map +1 -0
- package/lib/default-diagnostics.js +38 -0
- package/lib/default-diagnostics.js.map +1 -0
- package/lib/diagnostics-provider.d.ts +65 -0
- package/lib/diagnostics-provider.d.ts.map +1 -0
- package/lib/diagnostics-provider.js +10 -0
- package/lib/diagnostics-provider.js.map +1 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/node/index.d.ts +10 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +16 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/node-diagnostics-provider.d.ts +18 -0
- package/lib/node/node-diagnostics-provider.d.ts.map +1 -0
- package/lib/node/node-diagnostics-provider.js +68 -0
- package/lib/node/node-diagnostics-provider.js.map +1 -0
- package/lib/testing/data-server-harness.d.ts +85 -0
- package/lib/testing/data-server-harness.d.ts.map +1 -0
- package/lib/testing/data-server-harness.js +47 -0
- package/lib/testing/data-server-harness.js.map +1 -0
- package/lib/testing/index.d.ts +11 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/index.js +10 -0
- package/lib/testing/index.js.map +1 -0
- package/package.json +93 -0
- package/src/data-server.ts +1282 -0
- package/src/default-diagnostics.browser.ts +41 -0
- package/src/default-diagnostics.ts +40 -0
- package/src/diagnostics-provider.ts +70 -0
- package/src/index.ts +15 -0
- package/src/node/index.ts +17 -0
- package/src/node/node-diagnostics-provider.ts +82 -0
- package/src/testing/data-server-harness.ts +147 -0
- package/src/testing/index.ts +19 -0
|
@@ -0,0 +1,614 @@
|
|
|
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
|
+
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';
|
|
11
|
+
import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
|
|
12
|
+
import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
|
|
13
|
+
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
14
|
+
import { type AstNode, DocumentState, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
15
|
+
import type { CancellationToken, MessageConnection } from 'vscode-jsonrpc';
|
|
16
|
+
/**
|
|
17
|
+
* Which observable state {@link DataServer.computeDocumentFingerprint} hashes to
|
|
18
|
+
* de-dup `onDocumentUpdated` emissions.
|
|
19
|
+
*
|
|
20
|
+
* - `'transfer-document'` (default) — the client-visible transfer root
|
|
21
|
+
* (`TransferEncoder.toTransferDocument`) plus diagnostics. This is exactly the
|
|
22
|
+
* payload `envelope` sends, so it changes whenever — and only when — the
|
|
23
|
+
* client-visible model changes, INCLUDING cross-document derived state
|
|
24
|
+
* folded in on a cascade rebuild that leaves the document's own text
|
|
25
|
+
* untouched. Safe for any adopter whose AST extensions fold derived state
|
|
26
|
+
* into the transfer projection (the framework norm).
|
|
27
|
+
* - `'text-diagnostics'` — the cheaper `getText()` + diagnostics hash. An
|
|
28
|
+
* opt-DOWN for adopters that fold no derived state and want to avoid the
|
|
29
|
+
* transfer-encode per phase event.
|
|
30
|
+
*/
|
|
31
|
+
export type FingerprintStrategy = 'transfer-document' | 'text-diagnostics';
|
|
32
|
+
/**
|
|
33
|
+
* Construction-time options for {@link DataServer}. Every field is
|
|
34
|
+
* optional; values not supplied fall back to {@link DataServer.DEFAULT_OPTIONS}.
|
|
35
|
+
*/
|
|
36
|
+
export interface DataServerOptions extends LogNameOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Document phase at which the data-server fires subscription events
|
|
39
|
+
* (`DataClientProtocol.onDocumentUpdated`).
|
|
40
|
+
*
|
|
41
|
+
* **Subscription dispatch only** — distinct from the synchronous RPC
|
|
42
|
+
* response phase. The lifecycle reads/writes (`getModelDocument` /
|
|
43
|
+
* `updateModelDocument` / `saveModelDocument`) settle at the
|
|
44
|
+
* integrity-settled landmark (`IntegrityService.SettledState`); a
|
|
45
|
+
* read additionally upgrades to `Validated` per call when
|
|
46
|
+
* {@link GetModelDocumentArgs.includeDiagnostics} is set. This option
|
|
47
|
+
* controls only the async notification phase.
|
|
48
|
+
*
|
|
49
|
+
* Default: `DocumentState.Validated` — validation is the last builder
|
|
50
|
+
* phase and produces the full diagnostic set, so subscription events fired
|
|
51
|
+
* at validation surface the complete diagnostic picture.
|
|
52
|
+
*
|
|
53
|
+
* **Trade-off.** Validation can take seconds on a real workspace. Adopters
|
|
54
|
+
* that publish validation diagnostics through a separate channel —
|
|
55
|
+
* typically LSP `publishDiagnostics` — can fire subscription events earlier
|
|
56
|
+
* (e.g. `IndexedReferences`) since clients observe validation diagnostics
|
|
57
|
+
* asynchronously via that channel regardless of when the subscription
|
|
58
|
+
* event lands.
|
|
59
|
+
*/
|
|
60
|
+
readonly subscriptionPhase?: DocumentState;
|
|
61
|
+
/**
|
|
62
|
+
* Runtime-specific implementation of the four diagnostics methods that need
|
|
63
|
+
* a process to inspect — heap snapshot, profile capture, pod memory, server
|
|
64
|
+
* state.
|
|
65
|
+
*
|
|
66
|
+
* **Defaulted per platform, so most hosts pass nothing.** On Node the default
|
|
67
|
+
* is the real implementation; in a browser bundle `package.json`'s `browser`
|
|
68
|
+
* field selects a twin whose methods reject, because there is no process to
|
|
69
|
+
* inspect. Supply this only to override — a custom implementation, or to say
|
|
70
|
+
* explicitly at the call site which one you mean.
|
|
71
|
+
*
|
|
72
|
+
* It is injected rather than reached for because a static
|
|
73
|
+
* `@hydranium/core/node` import on this package's portable entry pulls
|
|
74
|
+
* `node:fs`, `node:v8` and `node:perf_hooks` into any browser build, over
|
|
75
|
+
* methods a browser cannot call anyway — which is what previously made the
|
|
76
|
+
* head unbundleable.
|
|
77
|
+
*/
|
|
78
|
+
readonly diagnostics?: DataServerDiagnosticsProvider;
|
|
79
|
+
/**
|
|
80
|
+
* Which observable state the `onDocumentUpdated` de-dup fingerprint hashes.
|
|
81
|
+
* Defaults to `'transfer-document'` (the client-visible payload, derived
|
|
82
|
+
* state included). See {@link FingerprintStrategy}.
|
|
83
|
+
*/
|
|
84
|
+
readonly fingerprintStrategy?: FingerprintStrategy;
|
|
85
|
+
/**
|
|
86
|
+
* Wire-method namespace for both inbound request handlers and the
|
|
87
|
+
* outbound notification client proxy. Defaults to
|
|
88
|
+
* {@link DATA_SERVER_WIRE_PREFIX} (`'data-server/'`).
|
|
89
|
+
*
|
|
90
|
+
* Adopters that combine the data-server head with their own protocol
|
|
91
|
+
* head on one connection pass their own namespace, so the full wire
|
|
92
|
+
* surface is partitioned under one prefix instead of two, the way LSP
|
|
93
|
+
* itself partitions `textDocument/*` and `workspace/*`. The client side
|
|
94
|
+
* (the `methodNamespace` option of its client `createRpcProxy`) MUST
|
|
95
|
+
* agree.
|
|
96
|
+
*/
|
|
97
|
+
readonly methodNamespace?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Additional protocol-method names to register as request handlers on
|
|
100
|
+
* the same connection alongside the framework's
|
|
101
|
+
* {@link DATA_SERVER_PROTOCOL_METHODS}. Used by `DataServer` subclasses
|
|
102
|
+
* that implement an adopter-specific protocol — the subclass implements
|
|
103
|
+
* the adopter methods on `this`, the names go here, and the
|
|
104
|
+
* constructor's single `createRpcProxy` call (binding `this` as its
|
|
105
|
+
* `localTarget`) registers framework + adopter handlers under one
|
|
106
|
+
* namespace.
|
|
107
|
+
*
|
|
108
|
+
* Throws at construction time if any name overlaps with a built-in
|
|
109
|
+
* framework method (would cause vscode-jsonrpc duplicate-handler
|
|
110
|
+
* errors at registration). Notification-shaped (`on*`-prefixed) names
|
|
111
|
+
* register as notification handlers; everything else as request
|
|
112
|
+
* handlers — same `on*`-prefix heuristic the framework's
|
|
113
|
+
* `bindRpcMethods` uses for `DataClientProtocol`.
|
|
114
|
+
*/
|
|
115
|
+
readonly additionalMethods?: readonly string[];
|
|
116
|
+
/**
|
|
117
|
+
* Framework method names to NOT register on the wire. Used by adopters
|
|
118
|
+
* that expose renamed domain-vocabulary equivalents of framework
|
|
119
|
+
* methods and want to keep the wire surface free of the unused
|
|
120
|
+
* framework names.
|
|
121
|
+
*
|
|
122
|
+
* Each name is filtered out of the combined `[framework + additional]`
|
|
123
|
+
* set before the handlers are bound. The adopter typically pairs an
|
|
124
|
+
* `excludedMethods` entry with an `additionalMethods` entry naming the
|
|
125
|
+
* renamed equivalent on the same class — the subclass's renamed method
|
|
126
|
+
* usually delegates to the inherited framework implementation via
|
|
127
|
+
* `super.X()` so the behaviour stays identical.
|
|
128
|
+
*
|
|
129
|
+
* Names that are neither in `DATA_SERVER_PROTOCOL_METHODS` nor in
|
|
130
|
+
* `additionalMethods` are simply no-ops — listing an unknown name does
|
|
131
|
+
* not throw. The overlap-detection between `additionalMethods` and
|
|
132
|
+
* built-in framework methods still fires for non-excluded names.
|
|
133
|
+
*/
|
|
134
|
+
readonly excludedMethods?: readonly string[];
|
|
135
|
+
/**
|
|
136
|
+
* When supplied, every inbound data-server RPC is timed into this collector
|
|
137
|
+
* (via the `createRpcProxy` binding) and exposed through
|
|
138
|
+
* {@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).
|
|
142
|
+
*/
|
|
143
|
+
readonly latency?: LatencyCollector;
|
|
144
|
+
}
|
|
145
|
+
/** Fully-resolved variant — every field set, used internally after merging defaults. */
|
|
146
|
+
interface ResolvedDataServerOptions {
|
|
147
|
+
readonly subscriptionPhase: DocumentState;
|
|
148
|
+
readonly fingerprintStrategy: FingerprintStrategy;
|
|
149
|
+
readonly methodNamespace: string;
|
|
150
|
+
readonly additionalMethods: readonly string[];
|
|
151
|
+
readonly excludedMethods: readonly string[];
|
|
152
|
+
/** Always resolved — to the caller's, or to the platform default. */
|
|
153
|
+
readonly diagnostics: DataServerDiagnosticsProvider;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Typed-RPC protocol head for the hydranium framework. The data-server
|
|
157
|
+
* is a PEER of `@hydranium/core/lsp` and `@hydranium/glsp-server` —
|
|
158
|
+
* all three heads coordinate through shared services in
|
|
159
|
+
* `@hydranium/core` (multi-client text documents, self-save
|
|
160
|
+
* registry, document-builder phases, project manager, ModelService
|
|
161
|
+
* facade) and never depend on each other at the package level.
|
|
162
|
+
*
|
|
163
|
+
* **No abstract grammar hooks**. The data-server has no grammar-specific
|
|
164
|
+
* abstract methods: `serialize` / `parseModel` live on
|
|
165
|
+
* {@link ModelService} (the in-process facade), where the `update` /
|
|
166
|
+
* `save` lifecycle owns the transfer-model round-trip. Adopters that want
|
|
167
|
+
* to customise serialisation rebind `services.model.ModelService` with a
|
|
168
|
+
* subclass; adopters that need a typed-overlay encoder rebind
|
|
169
|
+
* `services.model.TransferEncoder` with a subclass exposing the typed
|
|
170
|
+
* `TTransferMap`.
|
|
171
|
+
*
|
|
172
|
+
* **What still subclasses**. The data-server is concrete by default;
|
|
173
|
+
* adopters subclass ONLY when they need to decorate wire returns or
|
|
174
|
+
* notifications. The usual adoption path is DI rebinds alone.
|
|
175
|
+
*
|
|
176
|
+
* Lifecycle: the constructor registers framework request handlers (plus
|
|
177
|
+
* any names supplied via {@link DataServerOptions.additionalMethods}) and
|
|
178
|
+
* builds the {@link DataClientProtocol} notification proxy on the same
|
|
179
|
+
* 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`.
|
|
183
|
+
*
|
|
184
|
+
* The data-server requires the full {@link ServerSharedServices}
|
|
185
|
+
* shape — `HydraniumTextDocuments` for client-attributed updates,
|
|
186
|
+
* `WritableFileSystemProvider` for save, `SelfSaveRegistry` for
|
|
187
|
+
* save-echo suppression, `ProjectManager` for project listing,
|
|
188
|
+
* `ModelService` for the lifecycle delegate, `TransferEncoder` for
|
|
189
|
+
* wire envelope construction — all of which the framework's
|
|
190
|
+
* `createServerSharedModule` binds by default.
|
|
191
|
+
*
|
|
192
|
+
* **No per-head shared module.** The data-server head does not surface a
|
|
193
|
+
* `createDataServerSharedModule` factory because it contributes no
|
|
194
|
+
* shared-tier bindings: it reads exclusively from
|
|
195
|
+
* {@link ServerSharedServices}. An empty factory would only mislead
|
|
196
|
+
* adopters into composing it as though it were the canonical adoption
|
|
197
|
+
* path.
|
|
198
|
+
*/
|
|
199
|
+
export declare class DataServer<TTransfer extends TransferElement, TDiagnostic extends TransferDiagnostic = TransferDiagnostic, TProject extends Project = Project> implements DataServerProtocol<TTransfer, TDiagnostic, TProject>, DataServerDiagnosticsProtocol, Disposable {
|
|
200
|
+
protected readonly connection: MessageConnection;
|
|
201
|
+
protected readonly services: ServerSharedServices<TProject>;
|
|
202
|
+
/**
|
|
203
|
+
* Framework defaults, exposed so an adopter can spread them when
|
|
204
|
+
* extending rather than restate a value the framework may change.
|
|
205
|
+
*/
|
|
206
|
+
static readonly DEFAULT_OPTIONS: Required<Pick<DataServerOptions, 'subscriptionPhase'>>;
|
|
207
|
+
protected readonly options: ResolvedDataServerOptions;
|
|
208
|
+
/** Subscription bookkeeping: URI → set of clientIds that subscribed for that URI. */
|
|
209
|
+
protected readonly subscriptions: Map<string, Set<string>>;
|
|
210
|
+
/**
|
|
211
|
+
* Open-document bookkeeping: URI → set of clientIds that opened it over THIS
|
|
212
|
+
* connection.
|
|
213
|
+
*
|
|
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.
|
|
220
|
+
*/
|
|
221
|
+
protected readonly openedDocuments: Map<string, Set<string>>;
|
|
222
|
+
/** Typed client proxy — sends `data-server/on*` notifications back over the same wire. */
|
|
223
|
+
protected readonly clientProxy: DataClientProtocol<TTransfer, TDiagnostic, TProject>;
|
|
224
|
+
protected readonly disposables: DisposableCollection;
|
|
225
|
+
/**
|
|
226
|
+
* Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
|
|
227
|
+
* `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.
|
|
232
|
+
*/
|
|
233
|
+
protected lastBuildUpdate?: {
|
|
234
|
+
changed: readonly URI[];
|
|
235
|
+
deleted: readonly URI[];
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Per-URI hash of the last emitted (text + diagnostics) state,
|
|
239
|
+
* used by {@link dispatchPhaseEvent} to suppress duplicate
|
|
240
|
+
* `onDocumentUpdated` notifications for rebuilds that produce no
|
|
241
|
+
* observable change since the last emit.
|
|
242
|
+
*
|
|
243
|
+
* Two scenarios routinely produce such rebuilds:
|
|
244
|
+
* 1. **Refresh-triggered rebuilds.** When a second client attaches to a
|
|
245
|
+
* document already open in another client,
|
|
246
|
+
* `HydraniumTextDocuments.refreshContent` fires `onDidChangeContent`
|
|
247
|
+
* purely to re-trigger the build pipeline — the text and diagnostics
|
|
248
|
+
* are identical to the prior emit.
|
|
249
|
+
* 2. **Cascade rebuilds with no diagnostic delta.** Langium rebuilds a
|
|
250
|
+
* document when a dependency changes; if the rebuild produces the
|
|
251
|
+
* same diagnostics, there is nothing new to communicate to subscribers.
|
|
252
|
+
*
|
|
253
|
+
* Without this filter, both scenarios reach subscribers as wire-side
|
|
254
|
+
* `'changed'` events. A subscriber that interprets `'changed'` as
|
|
255
|
+
* "another client wrote new content" and resets its in-memory root to
|
|
256
|
+
* the server view then misreads the spurious event as a concurrent
|
|
257
|
+
* third-party write and loses the user's edits.
|
|
258
|
+
*
|
|
259
|
+
* Initialised on {@link watchModelDocument} to the current
|
|
260
|
+
* document fingerprint so the FIRST phase event after a fresh
|
|
261
|
+
* subscription is also de-duplicated against the state subscribers
|
|
262
|
+
* obtained via `getModelDocument` — they do not need a redundant phase
|
|
263
|
+
* notification for the state they just fetched.
|
|
264
|
+
*
|
|
265
|
+
* Cleared in {@link unwatchModelDocument} when the last
|
|
266
|
+
* subscriber for a URI leaves so memory does not accumulate.
|
|
267
|
+
*
|
|
268
|
+
* Stored as a cyrb53 hex digest (16 chars per URI) rather than the raw
|
|
269
|
+
* text + diagnostics serialisation so the memory cost is constant in
|
|
270
|
+
* document size. See {@link computeDocumentFingerprint} for the inputs.
|
|
271
|
+
*/
|
|
272
|
+
protected readonly lastEmittedFingerprint: Map<string, string>;
|
|
273
|
+
/**
|
|
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
|
|
280
|
+
* {@link subscribeToTextDocumentCloses}) and consumed by
|
|
281
|
+
* {@link dispatchPhaseEvent}, which broadcasts the following rebuild's
|
|
282
|
+
* phase event even without a subscription — de-duplicated against
|
|
283
|
+
* {@link lastEmittedFingerprint} where an entry survives, so a close
|
|
284
|
+
* whose disk state equals the last emitted state stays silent.
|
|
285
|
+
*/
|
|
286
|
+
protected readonly pendingRevertBroadcasts: Set<string>;
|
|
287
|
+
protected readonly tracer: Tracer;
|
|
288
|
+
/** The in-flight interactive profile capture, held between {@link startProfiling} and {@link stopProfiling}. */
|
|
289
|
+
protected activeProfile?: DataServerProfileCapture;
|
|
290
|
+
/** Set once {@link dispose} has run, so a capture that starts after teardown is stopped instead of leaked. */
|
|
291
|
+
protected disposed: boolean;
|
|
292
|
+
/** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
|
|
293
|
+
protected readonly latency?: LatencyCollector;
|
|
294
|
+
/** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
|
|
295
|
+
protected readonly encoder: TransferEncoder<unknown, TDiagnostic>;
|
|
296
|
+
/**
|
|
297
|
+
* In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
|
|
298
|
+
* The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
|
|
299
|
+
* carry LSP-shape diagnostics in their AstDocument (e.g. an adopter's LSP-shape diagnostic type)
|
|
300
|
+
* while the wire shape stays `TDiagnostic extends TransferDiagnostic`. The encoder's
|
|
301
|
+
* `astDocumentToTransferDocument` accepts both shapes (wire-shape or LSP-shape) and projects
|
|
302
|
+
* to wire shape on the return — see `TransferEncoder.astDocumentToTransferDocument`.
|
|
303
|
+
*/
|
|
304
|
+
protected readonly modelService: ModelService<AstNode, unknown, TTransfer>;
|
|
305
|
+
constructor(connection: MessageConnection, services: ServerSharedServices<TProject>, options?: DataServerOptions);
|
|
306
|
+
/**
|
|
307
|
+
* Release everything the constructor wired up — the bound protocol
|
|
308
|
+
* handlers and every listener — and clear the subscription map and the
|
|
309
|
+
* per-URI emission-fingerprint cache, so a long-lived shared services
|
|
310
|
+
* 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>>;
|
|
322
|
+
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
|
+
getModelDocument(args: GetModelDocumentArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
|
|
345
|
+
updateModelDocument(args: TransferUpdateDocumentArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
|
|
346
|
+
saveModelDocument(args: TransferSaveDocumentArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
|
|
347
|
+
/**
|
|
348
|
+
* Record a watch for `(uri, clientId)`. Subsequent phase events on `uri`
|
|
349
|
+
* fan out to the wired `clientProxy.onDocumentUpdated`. The
|
|
350
|
+
* bidirectional pattern means the event channel is the client
|
|
351
|
+
* notification surface, not a returned handle — this method only
|
|
352
|
+
* registers the URI in the dispatch table.
|
|
353
|
+
*
|
|
354
|
+
* Also baselines the per-URI emission fingerprint (see
|
|
355
|
+
* {@link lastEmittedFingerprint}) to the document's current state when
|
|
356
|
+
* the first watcher for the URI registers. This guarantees that any
|
|
357
|
+
* phase event firing immediately after the watch with no observable
|
|
358
|
+
* change is suppressed — watchers obtain initial state via
|
|
359
|
+
* `getModelDocument` (or {@link openModelDocument}) and do not need a
|
|
360
|
+
* redundant phase notification for that same state.
|
|
361
|
+
*/
|
|
362
|
+
watchModelDocument(args: WatchModelDocumentArgs): Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* Remove a watch for `(uri, clientId)` previously created by
|
|
365
|
+
* {@link watchModelDocument}. Idempotent — unwatching twice is a no-op.
|
|
366
|
+
* Dispatch for `uri` stops once no watchers remain, at which point the
|
|
367
|
+
* per-URI emission fingerprint is also cleared so the next first-watch
|
|
368
|
+
* re-baselines against the then-current document state rather than a
|
|
369
|
+
* stale snapshot from the previous watch.
|
|
370
|
+
*/
|
|
371
|
+
unwatchModelDocument(args: WatchModelDocumentArgs): Promise<void>;
|
|
372
|
+
/**
|
|
373
|
+
* Canonicalise a URI string for use as a subscription / fingerprint
|
|
374
|
+
* map key, via the shared `DocumentUriPolicy`. Callers may send
|
|
375
|
+
* non-canonical URIs (drive-letter casing, percent-encoding differences,
|
|
376
|
+
* or a symlink path) over the wire; the dispatch side keys by
|
|
377
|
+
* `document.uri.toString()` from `LangiumDocuments`, so writer keys must
|
|
378
|
+
* canonicalise to the same form or events silently fail to deliver.
|
|
379
|
+
* Routing through the seam (rather than a bare `UriUtils.normalize`)
|
|
380
|
+
* means that when an adopter strengthens document identity — e.g.
|
|
381
|
+
* real-path (symlink) resolution — the data-server head's keys track
|
|
382
|
+
* it too, instead of carrying the same path-identity divergence the
|
|
383
|
+
* LSP head resolves.
|
|
384
|
+
*
|
|
385
|
+
* Adopters can still override for head-specific URI policy by subclassing.
|
|
386
|
+
*/
|
|
387
|
+
protected canonicalKey(uri: string): string;
|
|
388
|
+
getProjects(): Promise<readonly TProject[]>;
|
|
389
|
+
getProjectForUri(args: GetProjectForUriArgs): Promise<TProject | undefined>;
|
|
390
|
+
/**
|
|
391
|
+
* Resolve once the data-server is ready to serve requests. Delegates
|
|
392
|
+
* to {@link ModelService.ready} so adopters that warm-load services
|
|
393
|
+
* (workspace indexing, etc.) override the `ModelService` slot in
|
|
394
|
+
* their shared module rather than this method on a DataServer
|
|
395
|
+
* subclass.
|
|
396
|
+
*/
|
|
397
|
+
waitForReady(): Promise<void>;
|
|
398
|
+
findReferenceCandidates(ctx: ReferenceContext): Promise<ReferenceCandidate[]>;
|
|
399
|
+
resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined>;
|
|
400
|
+
findNextName(args: FindNextNameArgs): Promise<string>;
|
|
401
|
+
/**
|
|
402
|
+
* Resolve the per-language `references` services for a reference source.
|
|
403
|
+
* Delegates the language choice to {@link resolveReferenceLanguage} and
|
|
404
|
+
* throws when no language owns the source — the reference heads have no
|
|
405
|
+
* meaningful empty answer (an empty candidate list reads to the client as
|
|
406
|
+
* "nothing matches" and hides the misrouting).
|
|
407
|
+
*/
|
|
408
|
+
protected resolveReferenceServices(source: ReferenceSource): HydraniumLanguageServices['references'];
|
|
409
|
+
/**
|
|
410
|
+
* Pick the language that owns a reference source, in order:
|
|
411
|
+
*
|
|
412
|
+
* 1. A URI-bearing source ({@link isDocumentSource}/{@link isSyntheticSource})
|
|
413
|
+
* whose URI resolves to a registered language routes by URI.
|
|
414
|
+
* 2. A single-language workspace always routes to that one language — so
|
|
415
|
+
* single-language adopters never reach the steps below, and never pay
|
|
416
|
+
* for them.
|
|
417
|
+
* 3. An {@link isElementSource} source carries no URI, so in a
|
|
418
|
+
* multi-language workspace it is routed via the document that holds the
|
|
419
|
+
* element (see {@link findElementDocumentUri}).
|
|
420
|
+
* 4. A source carrying an AST type is routed by that type when exactly one
|
|
421
|
+
* registered grammar can produce it (see
|
|
422
|
+
* {@link resolveReferenceLanguageByType}, over the registry's own type
|
|
423
|
+
* index). This is what resolves a create-element flow's synthetic source
|
|
424
|
+
* on a bare directory URI without asking the adopter.
|
|
425
|
+
* 5. Anything still unresolved falls to {@link fallbackReferenceLanguage},
|
|
426
|
+
* which is adopter policy.
|
|
427
|
+
*/
|
|
428
|
+
protected resolveReferenceLanguage(source: ReferenceSource): HydraniumLanguageServices | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* Route a reference source by the AST type it carries — a
|
|
431
|
+
* {@link isSyntheticSource}'s `type` (the transient node being created) or an
|
|
432
|
+
* {@link isElementSource}'s optional narrowing `type`.
|
|
433
|
+
*
|
|
434
|
+
* Answers only when EXACTLY ONE registered grammar can produce the type.
|
|
435
|
+
* Several can when the type comes from a grammar both import, and then the
|
|
436
|
+
* type genuinely does not identify a language — that is a fall-through to
|
|
437
|
+
* adopter policy, not a coin toss. Note this asks which grammar can *produce*
|
|
438
|
+
* the type, not which mentions it: a grammar that merely cross-references a
|
|
439
|
+
* type can never hold a node of it.
|
|
440
|
+
*/
|
|
441
|
+
protected resolveReferenceLanguageByType(source: ReferenceSource): HydraniumLanguageServices | undefined;
|
|
442
|
+
/**
|
|
443
|
+
* Locate the document that holds the element an {@link ElementSource}
|
|
444
|
+
* addresses, via the index's O(1) name lookup — `name` is the qualified
|
|
445
|
+
* name the `NameProvider` wrote into the index, and the optional `type`
|
|
446
|
+
* disambiguates names that repeat across types (honouring grammar
|
|
447
|
+
* subtyping through `AstReflection.isSubtype`).
|
|
448
|
+
*
|
|
449
|
+
* Only reached on the multi-language, name-based path (step 3 of
|
|
450
|
+
* {@link resolveReferenceLanguage}); single-language adopters return at
|
|
451
|
+
* step 2.
|
|
452
|
+
*
|
|
453
|
+
* Abstains when the name matches elements in more than one DOCUMENT — the
|
|
454
|
+
* index spans every language and is filled in build order, so "the
|
|
455
|
+
* first match" would be file-watch order rather than an answer. Step 3
|
|
456
|
+
* then falls through to the type-based step 4, which abstains on ties
|
|
457
|
+
* in the same way, and finally to adopter policy.
|
|
458
|
+
*/
|
|
459
|
+
protected findElementDocumentUri(source: ElementSource): URI | undefined;
|
|
460
|
+
/**
|
|
461
|
+
* Language to serve reference queries whose source names no language of
|
|
462
|
+
* its own — a synthetic source addressing a URI with no (or an
|
|
463
|
+
* unregistered) extension, or an element id absent from the index.
|
|
464
|
+
*
|
|
465
|
+
* Returns `undefined` by default, which makes
|
|
466
|
+
* {@link resolveReferenceServices} throw. Only reachable in a
|
|
467
|
+
* multi-language workspace, where choosing among the registered languages
|
|
468
|
+
* is adopter policy: override and return the language such sources belong
|
|
469
|
+
* to.
|
|
470
|
+
*/
|
|
471
|
+
protected fallbackReferenceLanguage(_source: ReferenceSource): HydraniumLanguageServices | undefined;
|
|
472
|
+
/**
|
|
473
|
+
* Build a {@link TransferDocument} envelope from the current document state,
|
|
474
|
+
* delegating root + diagnostic encoding to {@link encoder} (see
|
|
475
|
+
* `TransferEncoder.toTransferDocument` for the walk).
|
|
476
|
+
*
|
|
477
|
+
* The encoder field's generic-map binding is widened to
|
|
478
|
+
* `Record<string, TransferElement>` at the framework-default level, and an
|
|
479
|
+
* adopter supplying a typed-overlay encoder narrows the runtime shape to
|
|
480
|
+
* its wire types. The cast on the return is where that invariant — the
|
|
481
|
+
* adopter's `TTransfer` matches its encoder's overlay — is asserted, at a
|
|
482
|
+
* single boundary point rather than spread across the callers.
|
|
483
|
+
*/
|
|
484
|
+
protected envelope(uri: URI): TransferDocument<TTransfer, TDiagnostic>;
|
|
485
|
+
/**
|
|
486
|
+
* Subscribe one listener at the configured {@link DataServerOptions.subscriptionPhase}.
|
|
487
|
+
* The listener dispatches subscription events for every matching URI. A
|
|
488
|
+
* single listener (rather than one per subscription) keeps the cost flat
|
|
489
|
+
* regardless of subscriber count.
|
|
490
|
+
*/
|
|
491
|
+
protected subscribeToDocumentBuilder(): void;
|
|
492
|
+
/**
|
|
493
|
+
* Subscribe to the universal save event on `HydraniumTextDocuments` so a
|
|
494
|
+
* single `onDocumentSaved` wire notification fires for ANY save of a
|
|
495
|
+
* subscribed URI — regardless of whether the save originated from the
|
|
496
|
+
* data-server's RPC `saveModelDocument`, the LSP head's text-editor save,
|
|
497
|
+
* or any other client writing through `notifyDidSaveTextDocument`.
|
|
498
|
+
*
|
|
499
|
+
* Architectural symmetry with {@link subscribeToDocumentBuilder}: every
|
|
500
|
+
* subscribed client sees every state change to documents they care about,
|
|
501
|
+
* regardless of which client triggered it. Firing `onDocumentSaved` only
|
|
502
|
+
* from the data-server's own RPC path is a bug, not an optimisation: an
|
|
503
|
+
* LSP-driven save then lands on disk without notifying the subscribed
|
|
504
|
+
* clients, which never clear their dirty state.
|
|
505
|
+
*/
|
|
506
|
+
protected subscribeToTextDocumentSaves(): void;
|
|
507
|
+
/**
|
|
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.
|
|
512
|
+
*/
|
|
513
|
+
protected subscribeToTextDocumentCloses(): void;
|
|
514
|
+
/** Fan out a save event for the document's URI, gated by the subscription map. */
|
|
515
|
+
protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void;
|
|
516
|
+
/**
|
|
517
|
+
* Fan out a phase event for the document's URI by calling
|
|
518
|
+
* `clientProxy.onDocumentUpdated`. The proxy lowers the call to a
|
|
519
|
+
* `data-server/onDocumentUpdated` wire notification; the paired client
|
|
520
|
+
* (bound via the client `createRpcProxy`'s `localTarget`/`localMethods`)
|
|
521
|
+
* routes it to its handler. Adopters fan a single inbound onDocumentUpdated
|
|
522
|
+
* out to multiple local subscribers with an `Emitter<T>` — the
|
|
523
|
+
* framework deliberately does NOT promise multi-listener semantics.
|
|
524
|
+
*
|
|
525
|
+
* The dispatch is guarded by two filters:
|
|
526
|
+
* 1. **Subscription map**: events for URIs no subscriber registered for
|
|
527
|
+
* are NOT sent over the wire (bandwidth scales with subscribed URIs,
|
|
528
|
+
* not phase events).
|
|
529
|
+
* 2. **Emission fingerprint**: events for rebuilds that produce no
|
|
530
|
+
* observable change since the last emit are suppressed. See
|
|
531
|
+
* {@link lastEmittedFingerprint} for the rationale.
|
|
532
|
+
*/
|
|
533
|
+
protected dispatchPhaseEvent(document: LangiumDocument, cancelToken: CancellationToken): void;
|
|
534
|
+
/**
|
|
535
|
+
* Fingerprint of the document's observable state, used to de-dup
|
|
536
|
+
* `onDocumentUpdated` emissions. The {@link FingerprintStrategy} option
|
|
537
|
+
* selects what is hashed (default `'transfer-document'` — see the type), and
|
|
538
|
+
* {@link additionalFingerprintInputs} folds in any extra adopter signal.
|
|
539
|
+
*
|
|
540
|
+
* The default `'transfer-document'` strategy goes through the encoder's
|
|
541
|
+
* {@link TransferEncoder.toTransferDocument}, which is cached per build —
|
|
542
|
+
* so within one phase event the fingerprint and the subsequently-emitted
|
|
543
|
+
* `envelope` share a single encode walk.
|
|
544
|
+
*
|
|
545
|
+
* Wrapped in {@link Tracer.time} against {@link FINGERPRINT_LOG_AFTER_MS}.
|
|
546
|
+
*/
|
|
547
|
+
protected computeDocumentFingerprint(document: LangiumDocument): string;
|
|
548
|
+
/**
|
|
549
|
+
* Extra inputs folded into {@link computeDocumentFingerprint} alongside the
|
|
550
|
+
* chosen {@link FingerprintStrategy}. Default: none. Override to contribute a
|
|
551
|
+
* signal that lives outside the document's text / root / diagnostics — each
|
|
552
|
+
* entry need only be stable across equivalent emissions and
|
|
553
|
+
* JSON-serialisable.
|
|
554
|
+
*/
|
|
555
|
+
protected additionalFingerprintInputs(_document: LangiumDocument): readonly unknown[];
|
|
556
|
+
/**
|
|
557
|
+
* Discriminate the reason for a phase-event-driven update notification.
|
|
558
|
+
* Uses the most recent `DocumentBuilder.onUpdate` snapshot:
|
|
559
|
+
* - URI in the `deleted` list → `'deleted'`
|
|
560
|
+
* - URI in the `changed` list → `'changed'` (the URI was passed to
|
|
561
|
+
* `documentBuilder.update(changed, deleted)`, which spans `didChange`
|
|
562
|
+
* text-document events and programmatic `update([uri], [])` calls).
|
|
563
|
+
* - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
|
|
564
|
+
* because something it depends on changed; its own text wasn't flagged).
|
|
565
|
+
*
|
|
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.
|
|
569
|
+
*/
|
|
570
|
+
protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'];
|
|
571
|
+
/**
|
|
572
|
+
* Subscribe to the project tier's change channel and re-fan registry
|
|
573
|
+
* diffs into per-project wire notifications. The internal
|
|
574
|
+
* `ProjectChangeEvent` carries arrays of added/updated ids plus a
|
|
575
|
+
* removed list of `{ id, snapshot }` pairs; each affected project
|
|
576
|
+
* emits one wire `onProjectsChanged` event so clients react
|
|
577
|
+
* one-at-a-time without walking arrays. `'removed'` dispatches carry
|
|
578
|
+
* the pre-removal snapshot bundled in
|
|
579
|
+
* {@link ProjectChangeEvent.removed} because the registry entry is
|
|
580
|
+
* already gone by the time the event fires.
|
|
581
|
+
*
|
|
582
|
+
* Adopters that warm-load services may want to defer this subscription
|
|
583
|
+
* until {@link waitForReady} resolves (to avoid replaying the initial
|
|
584
|
+
* discovery as a burst of `'added'` events). Override
|
|
585
|
+
* {@link subscribeToProjectManager} on the subclass to gate.
|
|
586
|
+
*/
|
|
587
|
+
protected subscribeToProjectManager(): void;
|
|
588
|
+
/**
|
|
589
|
+
* Fan one internal {@link ProjectChangeEvent} out to per-project wire
|
|
590
|
+
* notifications. Each `removed` entry pairs the id with the pre-removal
|
|
591
|
+
* snapshot needed for the `'removed'` wire payload.
|
|
592
|
+
*/
|
|
593
|
+
protected dispatchProjectChangeEvent(event: ProjectChangeEvent<TProject>): void;
|
|
594
|
+
/**
|
|
595
|
+
* Resolve the wire-level `sourceClientId` for `document`'s events — the client
|
|
596
|
+
* that authored its current version, from the version-author history on
|
|
597
|
+
* `HydraniumTextDocuments`. The protocol-level counterpart of the internal
|
|
598
|
+
* `AstDocumentManager.getAuthor`: a framework-internal rebuild has no author,
|
|
599
|
+
* so this surfaces the {@link UNKNOWN_CLIENT_ID} presentation default. Adopters
|
|
600
|
+
* that rebuild through non-text-document channels override to derive a
|
|
601
|
+
* source id of their own.
|
|
602
|
+
*/
|
|
603
|
+
protected resolveSourceClientId(document: LangiumDocument): string;
|
|
604
|
+
dumpServerState(args: DumpServerStateArgs): Promise<string>;
|
|
605
|
+
writeHeapSnapshot(args: WriteServerHeapSnapshotArgs): Promise<string>;
|
|
606
|
+
dumpPodMemory(): Promise<string>;
|
|
607
|
+
startProfiling(args: StartProfilingArgs): Promise<void>;
|
|
608
|
+
stopProfiling(args: StopProfilingArgs): Promise<string>;
|
|
609
|
+
getLatency(): Promise<LatencyReport>;
|
|
610
|
+
/** Resolve a partial options object into a fully-defaulted form. */
|
|
611
|
+
protected resolveOptions(partial: DataServerOptions): ResolvedDataServerOptions;
|
|
612
|
+
}
|
|
613
|
+
export {};
|
|
614
|
+
//# sourceMappingURL=data-server.d.ts.map
|
|
@@ -0,0 +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,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