@hydranium/protocol 1.0.0-next.39 → 1.0.0-next.391

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/README.md +46 -83
  2. package/lib/abstract-logger.d.ts +11 -0
  3. package/lib/abstract-logger.d.ts.map +1 -1
  4. package/lib/abstract-logger.js +16 -0
  5. package/lib/abstract-logger.js.map +1 -1
  6. package/lib/client/data-connection.d.ts +303 -0
  7. package/lib/client/data-connection.d.ts.map +1 -0
  8. package/lib/client/data-connection.js +534 -0
  9. package/lib/client/data-connection.js.map +1 -0
  10. package/lib/client/data-events.d.ts +11 -2
  11. package/lib/client/data-events.d.ts.map +1 -1
  12. package/lib/client/data-events.js +13 -1
  13. package/lib/client/data-events.js.map +1 -1
  14. package/lib/client/data-port.d.ts +34 -24
  15. package/lib/client/data-port.d.ts.map +1 -1
  16. package/lib/client/data-session.d.ts +762 -89
  17. package/lib/client/data-session.d.ts.map +1 -1
  18. package/lib/client/data-session.js +1253 -115
  19. package/lib/client/data-session.js.map +1 -1
  20. package/lib/client/index.d.ts +16 -9
  21. package/lib/client/index.d.ts.map +1 -1
  22. package/lib/client/index.js +16 -9
  23. package/lib/client/index.js.map +1 -1
  24. package/lib/client/message-relay.d.ts +6 -4
  25. package/lib/client/message-relay.d.ts.map +1 -1
  26. package/lib/client/message-relay.js +4 -4
  27. package/lib/client/message-relay.js.map +1 -1
  28. package/lib/client/post-message-transport.d.ts +69 -3
  29. package/lib/client/post-message-transport.d.ts.map +1 -1
  30. package/lib/client/post-message-transport.js +175 -1
  31. package/lib/client/post-message-transport.js.map +1 -1
  32. package/lib/client/rpc-connection.d.ts +173 -0
  33. package/lib/client/rpc-connection.d.ts.map +1 -0
  34. package/lib/client/rpc-connection.js +225 -0
  35. package/lib/client/rpc-connection.js.map +1 -0
  36. package/lib/client/worker-handshake.d.ts +94 -0
  37. package/lib/client/worker-handshake.d.ts.map +1 -0
  38. package/lib/client/worker-handshake.js +51 -0
  39. package/lib/client/worker-handshake.js.map +1 -0
  40. package/lib/client/working-copy.d.ts +420 -0
  41. package/lib/client/working-copy.d.ts.map +1 -0
  42. package/lib/client/working-copy.js +958 -0
  43. package/lib/client/working-copy.js.map +1 -0
  44. package/lib/client-ids.d.ts +45 -0
  45. package/lib/client-ids.d.ts.map +1 -0
  46. package/lib/client-ids.js +48 -0
  47. package/lib/client-ids.js.map +1 -0
  48. package/lib/clock.d.ts +50 -10
  49. package/lib/clock.d.ts.map +1 -1
  50. package/lib/clock.js +36 -1
  51. package/lib/clock.js.map +1 -1
  52. package/lib/console-logger.d.ts +23 -0
  53. package/lib/console-logger.d.ts.map +1 -0
  54. package/lib/console-logger.js +39 -0
  55. package/lib/console-logger.js.map +1 -0
  56. package/lib/data/data-protocol-methods.d.ts +4 -4
  57. package/lib/data/data-protocol-methods.d.ts.map +1 -1
  58. package/lib/data/data-protocol-methods.js +7 -0
  59. package/lib/data/data-protocol-methods.js.map +1 -1
  60. package/lib/data/data-server-protocol.d.ts +160 -50
  61. package/lib/data/data-server-protocol.d.ts.map +1 -1
  62. package/lib/data/events.d.ts +75 -31
  63. package/lib/data/events.d.ts.map +1 -1
  64. package/lib/data/requests.d.ts +84 -11
  65. package/lib/data/requests.d.ts.map +1 -1
  66. package/lib/debouncer.d.ts +7 -4
  67. package/lib/debouncer.d.ts.map +1 -1
  68. package/lib/debouncer.js +10 -10
  69. package/lib/debouncer.js.map +1 -1
  70. package/lib/errors.d.ts +241 -48
  71. package/lib/errors.d.ts.map +1 -1
  72. package/lib/errors.js +395 -60
  73. package/lib/errors.js.map +1 -1
  74. package/lib/format-log-arg.d.ts +33 -0
  75. package/lib/format-log-arg.d.ts.map +1 -0
  76. package/lib/format-log-arg.js +158 -0
  77. package/lib/format-log-arg.js.map +1 -0
  78. package/lib/glsp-edits-settled-actions.d.ts +54 -0
  79. package/lib/glsp-edits-settled-actions.d.ts.map +1 -0
  80. package/lib/glsp-edits-settled-actions.js +28 -0
  81. package/lib/glsp-edits-settled-actions.js.map +1 -0
  82. package/lib/glsp-request-model-args.d.ts +16 -0
  83. package/lib/glsp-request-model-args.d.ts.map +1 -0
  84. package/lib/glsp-request-model-args.js +19 -0
  85. package/lib/glsp-request-model-args.js.map +1 -0
  86. package/lib/glsp-save-model-actions.d.ts +55 -0
  87. package/lib/glsp-save-model-actions.d.ts.map +1 -0
  88. package/lib/glsp-save-model-actions.js +28 -0
  89. package/lib/glsp-save-model-actions.js.map +1 -0
  90. package/lib/index.d.ts +11 -0
  91. package/lib/index.d.ts.map +1 -1
  92. package/lib/index.js +11 -0
  93. package/lib/index.js.map +1 -1
  94. package/lib/latency-collector.d.ts +10 -4
  95. package/lib/latency-collector.d.ts.map +1 -1
  96. package/lib/latency-collector.js +2 -0
  97. package/lib/latency-collector.js.map +1 -1
  98. package/lib/logger.d.ts +38 -7
  99. package/lib/logger.d.ts.map +1 -1
  100. package/lib/logger.js +42 -4
  101. package/lib/logger.js.map +1 -1
  102. package/lib/messages/index.d.ts +4 -2
  103. package/lib/messages/index.d.ts.map +1 -1
  104. package/lib/messages/index.js +17 -4
  105. package/lib/messages/index.js.map +1 -1
  106. package/lib/messages/primitives.d.ts +59 -4
  107. package/lib/messages/primitives.d.ts.map +1 -1
  108. package/lib/messages/primitives.js +97 -4
  109. package/lib/messages/primitives.js.map +1 -1
  110. package/lib/model-server.d.ts +58 -11
  111. package/lib/model-server.d.ts.map +1 -1
  112. package/lib/model-server.js +4 -2
  113. package/lib/model-server.js.map +1 -1
  114. package/lib/model-service/base-version.d.ts +67 -0
  115. package/lib/model-service/base-version.d.ts.map +1 -0
  116. package/lib/model-service/base-version.js +44 -0
  117. package/lib/model-service/base-version.js.map +1 -0
  118. package/lib/model-service/index.d.ts +1 -1
  119. package/lib/model-service/index.d.ts.map +1 -1
  120. package/lib/model-service/index.js +4 -5
  121. package/lib/model-service/index.js.map +1 -1
  122. package/lib/model-service/reference-candidate.d.ts +5 -3
  123. package/lib/model-service/reference-candidate.d.ts.map +1 -1
  124. package/lib/node/index.d.ts +10 -0
  125. package/lib/node/index.d.ts.map +1 -0
  126. package/lib/node/index.js +29 -0
  127. package/lib/node/index.js.map +1 -0
  128. package/lib/node/process-memory.d.ts +66 -0
  129. package/lib/node/process-memory.d.ts.map +1 -0
  130. package/lib/node/process-memory.js +291 -0
  131. package/lib/node/process-memory.js.map +1 -0
  132. package/lib/noop-logger.d.ts.map +1 -1
  133. package/lib/noop-logger.js.map +1 -1
  134. package/lib/observable-value.js.map +1 -1
  135. package/lib/patch-merge.d.ts +63 -35
  136. package/lib/patch-merge.d.ts.map +1 -1
  137. package/lib/patch-merge.js +171 -25
  138. package/lib/patch-merge.js.map +1 -1
  139. package/lib/pending-work-tracker.d.ts +33 -0
  140. package/lib/pending-work-tracker.d.ts.map +1 -0
  141. package/lib/pending-work-tracker.js +48 -0
  142. package/lib/pending-work-tracker.js.map +1 -0
  143. package/lib/profile-session.d.ts +24 -8
  144. package/lib/profile-session.d.ts.map +1 -1
  145. package/lib/profile-session.js +13 -4
  146. package/lib/profile-session.js.map +1 -1
  147. package/lib/profiling.d.ts +15 -2
  148. package/lib/profiling.d.ts.map +1 -1
  149. package/lib/profiling.js.map +1 -1
  150. package/lib/project.d.ts +6 -2
  151. package/lib/project.d.ts.map +1 -1
  152. package/lib/project.js.map +1 -1
  153. package/lib/random-uuid.d.ts +14 -0
  154. package/lib/random-uuid.d.ts.map +1 -0
  155. package/lib/random-uuid.js +24 -0
  156. package/lib/random-uuid.js.map +1 -0
  157. package/lib/reconcile-write.d.ts +70 -0
  158. package/lib/reconcile-write.d.ts.map +1 -0
  159. package/lib/reconcile-write.js +69 -0
  160. package/lib/reconcile-write.js.map +1 -0
  161. package/lib/rpc/bind-rpc-methods.d.ts +6 -2
  162. package/lib/rpc/bind-rpc-methods.d.ts.map +1 -1
  163. package/lib/rpc/bind-rpc-methods.js +17 -7
  164. package/lib/rpc/bind-rpc-methods.js.map +1 -1
  165. package/lib/rpc/create-rpc-proxy.d.ts +3 -0
  166. package/lib/rpc/create-rpc-proxy.d.ts.map +1 -1
  167. package/lib/rpc/create-rpc-proxy.js +6 -1
  168. package/lib/rpc/create-rpc-proxy.js.map +1 -1
  169. package/lib/rpc/index.d.ts +1 -0
  170. package/lib/rpc/index.d.ts.map +1 -1
  171. package/lib/rpc/index.js +1 -0
  172. package/lib/rpc/index.js.map +1 -1
  173. package/lib/rpc/send-by-method-name.d.ts +76 -0
  174. package/lib/rpc/send-by-method-name.d.ts.map +1 -0
  175. package/lib/rpc/send-by-method-name.js +120 -0
  176. package/lib/rpc/send-by-method-name.js.map +1 -0
  177. package/lib/rpc/wire-prefix.js.map +1 -1
  178. package/lib/save-text-document.d.ts +40 -0
  179. package/lib/save-text-document.d.ts.map +1 -0
  180. package/lib/save-text-document.js +34 -0
  181. package/lib/save-text-document.js.map +1 -0
  182. package/lib/testing/catalogue-audit.js.map +1 -1
  183. package/lib/testing/data-doubles.d.ts +36 -11
  184. package/lib/testing/data-doubles.d.ts.map +1 -1
  185. package/lib/testing/data-doubles.js +47 -9
  186. package/lib/testing/data-doubles.js.map +1 -1
  187. package/lib/testing/fake-clock.d.ts +17 -2
  188. package/lib/testing/fake-clock.d.ts.map +1 -1
  189. package/lib/testing/fake-clock.js +61 -46
  190. package/lib/testing/fake-clock.js.map +1 -1
  191. package/lib/testing/harness.d.ts +9 -0
  192. package/lib/testing/harness.d.ts.map +1 -1
  193. package/lib/testing/index.d.ts +1 -0
  194. package/lib/testing/index.d.ts.map +1 -1
  195. package/lib/testing/index.js +4 -3
  196. package/lib/testing/index.js.map +1 -1
  197. package/lib/testing/node/duplex-connection.d.ts.map +1 -1
  198. package/lib/testing/node/duplex-connection.js +3 -2
  199. package/lib/testing/node/duplex-connection.js.map +1 -1
  200. package/lib/testing/node/duplex-stream.js.map +1 -1
  201. package/lib/testing/node/index.d.ts +2 -0
  202. package/lib/testing/node/index.d.ts.map +1 -1
  203. package/lib/testing/node/index.js +3 -2
  204. package/lib/testing/node/index.js.map +1 -1
  205. package/lib/testing/node/message-port-pair.d.ts +25 -0
  206. package/lib/testing/node/message-port-pair.d.ts.map +1 -0
  207. package/lib/testing/node/message-port-pair.js +26 -0
  208. package/lib/testing/node/message-port-pair.js.map +1 -0
  209. package/lib/testing/node/unhandled-rejections.d.ts +20 -0
  210. package/lib/testing/node/unhandled-rejections.d.ts.map +1 -0
  211. package/lib/testing/node/unhandled-rejections.js +35 -0
  212. package/lib/testing/node/unhandled-rejections.js.map +1 -0
  213. package/lib/testing/transfer-node-builder.d.ts +81 -0
  214. package/lib/testing/transfer-node-builder.d.ts.map +1 -0
  215. package/lib/testing/transfer-node-builder.js +47 -0
  216. package/lib/testing/transfer-node-builder.js.map +1 -0
  217. package/lib/testing/wait-for.d.ts +9 -3
  218. package/lib/testing/wait-for.d.ts.map +1 -1
  219. package/lib/testing/wait-for.js +57 -11
  220. package/lib/testing/wait-for.js.map +1 -1
  221. package/lib/tracer.d.ts.map +1 -1
  222. package/lib/tracer.js +5 -9
  223. package/lib/tracer.js.map +1 -1
  224. package/lib/transfer-diagnostic.d.ts +11 -0
  225. package/lib/transfer-diagnostic.d.ts.map +1 -1
  226. package/lib/transfer-diagnostic.js +17 -0
  227. package/lib/transfer-diagnostic.js.map +1 -1
  228. package/lib/transfer-document.d.ts +108 -32
  229. package/lib/transfer-document.d.ts.map +1 -1
  230. package/lib/transfer-document.js +17 -9
  231. package/lib/transfer-document.js.map +1 -1
  232. package/lib/transfer-element.d.ts +4 -4
  233. package/lib/types.d.ts +32 -0
  234. package/lib/types.d.ts.map +1 -0
  235. package/lib/{model-service/args.js → types.js} +2 -2
  236. package/lib/types.js.map +1 -0
  237. package/lib/uri.d.ts.map +1 -1
  238. package/lib/uri.js.map +1 -1
  239. package/lib/util.d.ts +8 -2
  240. package/lib/util.d.ts.map +1 -1
  241. package/lib/util.js +32 -4
  242. package/lib/util.js.map +1 -1
  243. package/package.json +24 -40
  244. package/src/abstract-logger.ts +18 -0
  245. package/src/client/data-connection.ts +654 -0
  246. package/src/client/data-events.ts +15 -1
  247. package/src/client/data-port.ts +36 -25
  248. package/src/client/data-session.ts +1606 -137
  249. package/src/client/index.ts +16 -9
  250. package/src/client/message-relay.ts +6 -4
  251. package/src/client/post-message-transport.ts +224 -4
  252. package/src/client/rpc-connection.ts +302 -0
  253. package/src/client/worker-handshake.ts +121 -0
  254. package/src/client/working-copy.ts +1116 -0
  255. package/src/client-ids.ts +49 -0
  256. package/src/clock.ts +68 -10
  257. package/src/console-logger.ts +39 -0
  258. package/src/data/data-protocol-methods.ts +8 -1
  259. package/src/data/data-server-protocol.ts +184 -49
  260. package/src/data/events.ts +77 -31
  261. package/src/data/requests.ts +90 -11
  262. package/src/debouncer.ts +11 -11
  263. package/src/errors.ts +496 -71
  264. package/src/format-log-arg.ts +176 -0
  265. package/src/glsp-edits-settled-actions.ts +62 -0
  266. package/src/glsp-request-model-args.ts +16 -0
  267. package/src/glsp-save-model-actions.ts +64 -0
  268. package/src/index.ts +11 -0
  269. package/src/latency-collector.ts +10 -3
  270. package/src/logger.ts +44 -8
  271. package/src/messages/index.ts +12 -2
  272. package/src/messages/primitives.ts +129 -5
  273. package/src/model-server.ts +62 -17
  274. package/src/model-service/base-version.ts +75 -0
  275. package/src/model-service/index.ts +4 -5
  276. package/src/model-service/reference-candidate.ts +5 -3
  277. package/src/node/index.ts +14 -0
  278. package/src/node/process-memory.ts +299 -0
  279. package/src/patch-merge.ts +230 -45
  280. package/src/pending-work-tracker.ts +48 -0
  281. package/src/profile-session.ts +31 -11
  282. package/src/profiling.ts +15 -2
  283. package/src/project.ts +6 -2
  284. package/src/random-uuid.ts +21 -0
  285. package/src/reconcile-write.ts +131 -0
  286. package/src/rpc/README.md +6 -6
  287. package/src/rpc/bind-rpc-methods.ts +18 -8
  288. package/src/rpc/create-rpc-proxy.ts +6 -1
  289. package/src/rpc/index.ts +1 -0
  290. package/src/rpc/send-by-method-name.ts +140 -0
  291. package/src/save-text-document.ts +39 -0
  292. package/src/testing/data-doubles.ts +119 -19
  293. package/src/testing/fake-clock.ts +76 -48
  294. package/src/testing/harness.ts +10 -0
  295. package/src/testing/index.ts +4 -3
  296. package/src/testing/node/duplex-connection.ts +3 -2
  297. package/src/testing/node/index.ts +3 -2
  298. package/src/testing/node/message-port-pair.ts +40 -0
  299. package/src/testing/node/unhandled-rejections.ts +31 -0
  300. package/src/testing/transfer-node-builder.ts +107 -0
  301. package/src/testing/wait-for.ts +61 -13
  302. package/src/tracer.ts +5 -9
  303. package/src/transfer-diagnostic.ts +17 -0
  304. package/src/transfer-document.ts +130 -34
  305. package/src/transfer-element.ts +4 -4
  306. package/src/types.ts +30 -0
  307. package/src/util.ts +33 -6
  308. package/lib/model-service/args.d.ts +0 -64
  309. package/lib/model-service/args.d.ts.map +0 -1
  310. package/lib/model-service/args.js.map +0 -1
  311. package/src/model-service/args.ts +0 -67
package/README.md CHANGED
@@ -1,41 +1,42 @@
1
1
  # `@hydranium/protocol`
2
2
 
3
- Generic, language-agnostic types, constants, and pure utilities for the
4
- [Hydranium](https://github.com/eclipse-emfcloud/hydranium) framework.
5
-
6
- This package is the contract surface shared between hydranium servers and
7
- their clients. It contains:
8
-
9
- - Cross-reference and reference-resolution types.
10
- - The `TransferDocument<TTransfer, TDiagnostic>` transfer-document wrapper.
11
- - The generic `DataServerProtocol` and `DataClientProtocol` RPC interfaces.
12
- - Pure utility functions and version constants.
13
-
14
- **Dependency budget:** one runtime dependency, `fast-json-patch`. Anything
15
- heavier (transport, Inversify, Theia, Langium runtime) lives in consuming
16
- packages.
3
+ The contract shared between
4
+ [Hydranium](https://github.com/eclipse-emfcloud/hydranium) servers and their
5
+ clients. With `vscode-jsonrpc`, it is the only Hydranium package a pure client
6
+ needs: a form editor, a tree view or a code generator talking to the data head
7
+ never depends on `@hydranium/core`, which carries the Langium runtime.
8
+
9
+ ## What it gives you
10
+
11
+ - Type your client against `DataServerProtocol` and `DataClientProtocol`.
12
+ - Connect, reconnect and open documents through one client tier, in a Theia
13
+ frontend, a VS Code extension or webview, or a plain browser page.
14
+ - Edit a document from a form with `WorkingCopy`, which sends your edits,
15
+ reconciles a write that raced another client's, and saves.
16
+ - Declare your own RPC contract as a TypeScript interface and use it on both
17
+ ends of a connection.
18
+ - Test your client, and audit your translation catalogues (see *Translate your
19
+ language* in
20
+ [Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md)).
17
21
 
18
22
  ## Install
19
23
 
20
24
  ```bash
21
- npm install @hydranium/protocol
25
+ npm install @hydranium/protocol vscode-jsonrpc
22
26
  ```
23
27
 
24
- This is the only hydranium package a pure client needs. A form editor, a tree
25
- view or a code generator talking to the data head depends on this and on
26
- `vscode-jsonrpc` for the transport — never on `@hydranium/core`, which carries
27
- the Langium runtime and does not bundle for a client.
28
+ | Peer | Range |
29
+ | ---------------- | -------- |
30
+ | `vscode-jsonrpc` | `^9.0.0` |
28
31
 
29
32
  ## The RPC pattern
30
33
 
31
- The data head is not a bespoke wire format — it is a TypeScript interface, bound
32
- on one side and proxied on the other. An adopter declares a contract `T`, binds
33
- it with `bindRpcMethods`, and consumes it with `createRpcProxy<T>`; nothing
34
- between the two is hand-written, and the compiler is what keeps the ends
35
- agreeing.
34
+ You declare a contract `T`, bind it on the server with `bindRpcMethods`, and
35
+ call it with `createRpcProxy<T>`. Nothing between the two is hand-written, so
36
+ the compiler keeps the ends agreeing.
36
37
 
37
38
  ```
38
- adopter contract T adopter contract T
39
+ your contract T your contract T
39
40
  │ │
40
41
  ▼ ▼
41
42
  bindRpcMethods createRpcProxy<T>
@@ -45,71 +46,33 @@ agreeing.
45
46
  (vscode-jsonrpc)
46
47
  ```
47
48
 
48
- The two helpers are deliberately symmetric — the same wire-name composition
49
- rule, the same notification heuristic, the same deferred-connection support — so
50
- a contract written once works on both ends with no per-method configuration.
51
- Both are exported from the package root; there is no `/rpc` subpath.
52
-
53
- Full reference — the options both ends must agree on, the reserved property
54
- names, a worked example — is in
55
- [`src/rpc/README.md`](./src/rpc/README.md), which ships in the tarball.
56
-
57
- ## Subpaths
58
-
59
- ```bash
60
- @hydranium/protocol # transfer documents, references, RPC machinery
61
- @hydranium/protocol/data # DataServerProtocol / DataClientProtocol
62
- @hydranium/protocol/client # the host-neutral client tier
63
- @hydranium/protocol/testing # test doubles, waiters, catalogue audit
64
- @hydranium/protocol/testing/node # the Node-only doubles
65
- ```
66
-
67
- The root barrel re-exports `data` and `client`, so those two subpaths buy a
68
- narrower surface rather than reach; `testing` is only reachable by its own
69
- specifier, which is what keeps the doubles out of a production bundle. The RPC
70
- machinery documents itself in [`src/rpc/README.md`](./src/rpc/README.md).
71
-
72
- ### Auditing a translation catalogue
73
-
74
- An adopter with i18n has one failure mode nothing else catches: a catalogue key
75
- naming no declared code falls back to the English, which is byte-identical to
76
- the deliberately-partial behaviour every adopter relies on. So a typo is
77
- invisible at runtime, and `theia nls-extract` reports what the source declares
78
- rather than whether a catalogue matches it.
49
+ The options both ends must agree on, and a worked example, are in
50
+ [`src/rpc/README.md`](./src/rpc/README.md).
79
51
 
80
- `@hydranium/protocol/testing` ships the audit for it — call it from your own
81
- test, over your own barrels:
52
+ ## Entry points
82
53
 
83
- <!-- snippet-preamble
84
- import { flattenCatalogue, findUndeclaredCodes, findSharedCodes } from '@hydranium/protocol/testing';
85
- import * as protocolMessages from '@hydranium/protocol';
86
- declare const readFileSync: (path: string, encoding: string) => string;
87
- declare const expect: (actual: unknown) => { toEqual(expected: unknown): void };
88
- -->
89
-
90
- ```ts
91
- const keys = Object.keys(flattenCatalogue(JSON.parse(readFileSync('nls/de.json', 'utf-8'))));
92
-
93
- // Every key names a code some barrel declares. `exemptPrefixes` is for keys no
94
- // barrel CAN declare — a host mechanism taking its key as an inline literal.
95
- expect(findUndeclaredCodes(keys, [protocolMessages])).toEqual([]);
96
- ```
54
+ | Subpath | Use it for | Runs in |
55
+ | ---------------- | --------------------------------------------------------- | --------------- |
56
+ | `.` | The production surface, `./data` and `./client` included | browser-neutral |
57
+ | `./data` | The data-head protocol types alone | browser-neutral |
58
+ | `./client` | The client tier alone | browser-neutral |
59
+ | `./messages` | The message codes this package raises | browser-neutral |
60
+ | `./node` | Process-memory and heap-snapshot diagnostics | Node-only |
61
+ | `./testing` | Test doubles, waiters and the translation-catalogue audit | browser-neutral |
62
+ | `./testing/node` | In-memory transports and rejection capture for tests | Node-only |
97
63
 
98
- `flattenCatalogue` joins nested keys with `/` (the separator a code already
99
- uses, and what Theia does to a nested catalogue) and drops `_`-prefixed note
100
- keys, so a flat server-side catalogue and a nested host-side one both go through
101
- it. `findSharedCodes` covers the other half: exactly one side renders a given
102
- message, so two catalogues holding one code are two authorities over one
103
- sentence — assert both key sets non-empty first, since an empty one satisfies
104
- disjointness while proving nothing.
64
+ The subpaths need a TypeScript `moduleResolution` that reads `exports`
65
+ (`NodeNext` or `Bundler`); see *Requirements* in
66
+ [Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
105
67
 
106
68
  ## Status
107
69
 
108
- Alpha — pre-v0. The package is being populated incrementally, and its API is
109
- not yet stable. See the [repository README](../../README.md) for the current
110
- status and known limitations.
70
+ Alpha: every release is a prerelease that may break the API, so pin an exact
71
+ version. Guides and known limitations:
72
+ [Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
111
73
 
112
74
  ## License
113
75
 
114
76
  `MIT` — see this package's [`LICENSE`](./LICENSE), and the repository
115
- [`NOTICE.md`](../../NOTICE.md) for third-party notices.
77
+ [`NOTICE.md`](https://github.com/eclipse-emfcloud/hydranium/blob/main/NOTICE.md)
78
+ for third-party notices.
@@ -35,6 +35,17 @@ export declare abstract class AbstractLogger implements Logger {
35
35
  protected clock(): Clock;
36
36
  /** Render the current wall-clock instant as `HH:MM:SS.mmm`, sourced from {@link clock}. */
37
37
  protected timestamp(): string;
38
+ /**
39
+ * The `[Label - HH:MM:SS.mmm] [component]` prefix every sink starts a line
40
+ * with. The label is padded to the widest, so timestamps line up across sinks.
41
+ */
42
+ protected formatLinePrefix(label: string): string;
43
+ /**
44
+ * One log argument as the text a sink appends to its line; {@link formatLogArg}
45
+ * by default. `ConsoleLogger` hands its arguments to the console instead.
46
+ * Never throws, since a log call that throws loses the line.
47
+ */
48
+ protected formatArg(arg: unknown): string;
38
49
  error(message?: string, ...args: unknown[]): this;
39
50
  warn(message?: string, ...args: unknown[]): this;
40
51
  info(message?: string, ...args: unknown[]): this;
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-logger.d.ts","sourceRoot":"","sources":["../src/abstract-logger.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,SAAS,CAAC;AAClD,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAK1F;;;;;;;;;;;;GAYG;AACH,8BAAsB,cAAe,YAAW,MAAM;IACvC,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM;gBAAlB,SAAS,CAAC,EAAE,MAAM,YAAA;IAExC;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,IAAI,KAAK;IAIxB,2FAA2F;IAC3F,SAAS,CAAC,SAAS,IAAI,MAAM;IAI7B,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIjD,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIjD,uFAAuF;IACvF,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO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AG,IAAI,CAE5B;IAED;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEzB;IAED,yFAAyF;IACzF,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,SAAS,OAAO,EAAO,EAAE,KAAK,SAAsB,GAAG,IAAI,CAKlH;IAED,gGAAgG;IAChG,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAAC;IAEzG,qFAAqF;IACrF,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACrD"}
@@ -10,6 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.AbstractLogger = void 0;
12
12
  const clock_1 = require("./clock");
13
+ const format_log_arg_1 = require("./format-log-arg");
13
14
  const logger_1 = require("./logger");
14
15
  /** Default time source for every {@link AbstractLogger}; overridable per subclass via {@link AbstractLogger.clock}. */
15
16
  const systemClock = new clock_1.SystemClock();
@@ -46,6 +47,21 @@ class AbstractLogger {
46
47
  timestamp() {
47
48
  return logger_1.Format.timestamp(new Date(this.clock().now()));
48
49
  }
50
+ /**
51
+ * The `[Label - HH:MM:SS.mmm] [component]` prefix every sink starts a line
52
+ * with. The label is padded to the widest, so timestamps line up across sinks.
53
+ */
54
+ formatLinePrefix(label) {
55
+ return `[${label.padEnd(5)} - ${this.timestamp()}]${this.component ? ` [${this.component}]` : ''}`;
56
+ }
57
+ /**
58
+ * One log argument as the text a sink appends to its line; {@link formatLogArg}
59
+ * by default. `ConsoleLogger` hands its arguments to the console instead.
60
+ * Never throws, since a log call that throws loses the line.
61
+ */
62
+ formatArg(arg) {
63
+ return (0, format_log_arg_1.formatLogArg)(arg);
64
+ }
49
65
  error(message, ...args) {
50
66
  this.send('error', message, args);
51
67
  return this;
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-logger.js","sourceRoot":"","sources":["../src/abstract-logger.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,mCAAkD;AAClD,qCAA0F;AAE1F,uHAAuH;AACvH,MAAM,WAAW,GAAG,IAAI,mBAAW,EAAE,CAAC;AAEtC;;;;;;;;;;;;GAYG;AACH,MAAsB,cAAc;IACX;IAAtB,YAAsB,SAAkB;QAAlB,cAAS,GAAT,SAAS,CAAS;IAAG,CAAC;IAE5C;;;;;;;OAOG;IACO,KAAK;QACZ,OAAO,WAAW,CAAC;IACtB,CAAC;IAED,2FAA2F;IACjF,SAAS;QAChB,OAAO,eAAM,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,OAAgB,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACf,CAAC;IACD,IAAI,CAAC,OAAgB,EAAE,GAAG,IAAe;QACtC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACf,CAAC;IACD,IAAI,CAAC,OAAgB,EAAE,GAAG,IAAe;QACtC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACf,CAAC;IACD,KAAK,CAAC,OAAgB,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACf,CAAC;IACD,uFAAuF;IACvF,KAAK,CAAC,OAAgB,EAA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AAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACxF,CAAC;IAED,kFAAkF;IAClF,IAAI,CAAC,SAAiB;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,MAAM,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,yFAAyF;IAC/E,IAAI,CAAC,KAAe,EAAE,OAAgB,EAAE,IAAI,GAAuB,EAAE,EAAE,KAAK,GAAG,qBAAY,CAAC,KAAK,CAAC;QACzG,IAAI,CAAC,OAAO,IAAI,CAAC,eAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7C,OAAO;QACV,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CAOH"}
@@ -0,0 +1,303 @@
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 { Disposable, Emitter, type Event } from 'vscode-jsonrpc';
10
+ import { type DataClientProtocol, type DataServerProtocol, type DiagnosticOf, type ProjectOf, type TransferDocumentDeletedEvent, type TransferDocumentDirtyChangedEvent, type TransferDocumentUpdatedEvent } from '../data';
11
+ import type { Logger } from '../logger';
12
+ import type { TransferElement } from '../transfer-element';
13
+ import { DataEvents } from './data-events';
14
+ import type { DataPort } from './data-port';
15
+ import { DataSession, type DataSessionFactory } from './data-session';
16
+ import { RpcConnection, type RpcConnectionGeneration, type RpcConnectionLifecycle } from './rpc-connection';
17
+ /**
18
+ * A watch {@link DataConnection.watchDocument} keeps could not be sent again to
19
+ * a connection that became ready after a drop; the next one sends it again.
20
+ */
21
+ export declare const DATA_CONNECTION_WATCH_RESTORE_FAILED: import("../messages/primitives").MessageDefinition<"Could not watch {uri} again after reconnecting to the data server: {detail}">;
22
+ /**
23
+ * A session's restore threw when its connection came back; the connection
24
+ * went on restoring the others.
25
+ */
26
+ export declare const DATA_CONNECTION_SESSION_RESTORE_FAILED: import("../messages/primitives").MessageDefinition<"Could not restore a session after reconnecting to the data server: {detail}">;
27
+ /**
28
+ * A watch {@link DataConnection.watchDocument} keeps, with what the client last
29
+ * heard of its document: a reconnect whose watch answers that no document
30
+ * exists tells the client of a deletion only where it had heard one did.
31
+ */
32
+ export interface DataConnectionWatch {
33
+ /** The URI as the caller named it, which the watch is sent under. */
34
+ readonly uri: string;
35
+ /** The key a watch of it last answered with, which events name; absent until one answered. */
36
+ readonly serverUri?: string;
37
+ /** Whether the client last heard that the document exists. */
38
+ readonly exists: boolean;
39
+ }
40
+ /** What an event heard while a watch was in flight said of its document, and the event's position. */
41
+ export interface DataConnectionHeardEvent {
42
+ readonly exists: boolean;
43
+ readonly sequence: number;
44
+ }
45
+ /** Options for {@link DataConnection}. */
46
+ export interface DataConnectionOptions<TTransfer extends TransferElement = TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> extends RpcConnectionLifecycle {
47
+ /**
48
+ * Wire namespace the server is addressed under. Defaults to the
49
+ * framework's {@link DATA_SERVER_WIRE_PREFIX}, which is what an unmodified
50
+ * `DataServer` binds. Override only alongside the server's own
51
+ * `methodNamespace` option — a mismatch turns every request into
52
+ * "Unhandled method" rather than failing at wire-up.
53
+ */
54
+ readonly methodNamespace?: string;
55
+ /** Builds the sessions `createSession` hands out. Defaults to a plain {@link DataSession}. */
56
+ readonly sessionFactory?: DataSessionFactory<TTransfer, TServer>;
57
+ }
58
+ /** {@link DataConnectionOptions} for a client that does not speak {@link DataClientProtocol}. */
59
+ export interface DataConnectionOptionsWithMethods<TClient extends object, TTransfer extends TransferElement = TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> extends DataConnectionOptions<TTransfer, TServer> {
60
+ /**
61
+ * Method names of the client to bind as inbound handlers. Declare it
62
+ * `as const satisfies ReadonlyArray<keyof YourClient & string>` so the list
63
+ * cannot drift from the interface.
64
+ */
65
+ readonly clientMethods: readonly (keyof TClient & string)[];
66
+ }
67
+ /**
68
+ * Trailing constructor arguments, required only when the client cannot take
69
+ * the framework's default method list.
70
+ *
71
+ * `bindRpcMethods` throws for a name the target does not implement, so a
72
+ * request/response-only client binding the default list fails at wire-up. The
73
+ * conditional turns that into a compile error.
74
+ */
75
+ export type DataConnectionArgs<TTransfer extends TransferElement, TClient extends object, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = TClient extends DataClientProtocol<TTransfer> ? [options?: DataConnectionOptions<TTransfer, TServer> & Partial<DataConnectionOptionsWithMethods<TClient, TTransfer, TServer>>] : [options: DataConnectionOptionsWithMethods<TClient, TTransfer, TServer>];
76
+ /**
77
+ * A {@link RpcConnection} to the data head, carrying as many participants as
78
+ * the host has interested parties.
79
+ *
80
+ * Document operations live on the participants rather than here: they carry a
81
+ * `clientId`, which identifies a participant rather than a wire, and the server
82
+ * keys its opens and watches per `(uri, clientId)`. Two parties sharing one
83
+ * identity cannot tell each other's writes from their own echoes.
84
+ * {@link DataConnection.watchDocument} is the exception: it acts as no
85
+ * participant, under an id no session holds, and opens or writes nothing.
86
+ *
87
+ * Generic over the transfer root so this file names no grammar. An adopter
88
+ * binds the concrete root (or the union of them, for a multi-grammar head) at
89
+ * its own edge.
90
+ */
91
+ export declare class DataConnection<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>, TClient extends object = DataClientProtocol<TTransfer>> extends RpcConnection<TServer, TClient> {
92
+ /** Backs {@link liveSessions}, and is what {@link createSession} checks a new id against. */
93
+ protected readonly sessions: Set<DataSession<TTransfer, TServer>>;
94
+ protected readonly sessionFactory: DataSessionFactory<TTransfer, TServer>;
95
+ protected readonly createSessionEmitter: Emitter<DataSession<TTransfer, TServer>>;
96
+ /**
97
+ * Fires with each session {@link createSession} starts, before it returns,
98
+ * so a listener sees every session a caller can. A session started before
99
+ * the listener subscribed is in {@link liveSessions}.
100
+ */
101
+ readonly onDidCreateSession: Event<DataSession<TTransfer, TServer>>;
102
+ /**
103
+ * Per URI, the `dirty` the client was last told, whether a session of this
104
+ * connection has it open or a watch follows it. A session's open or close
105
+ * of the URI forgets it; disposing a watch does not, since a watch knows
106
+ * only the caller's spelling of the URI, not the server's key. A
107
+ * session's restore and a watch sent again after a reconnect tell the
108
+ * client their answer where it differs, a forgotten URI included; see
109
+ * {@link restoreDirty}.
110
+ */
111
+ protected readonly dirtyStates: Map<string, boolean>;
112
+ /** Backs each session's {@link DataSessionHost.onDidChangeDirty}. */
113
+ protected readonly dirtyChangedEmitter: Emitter<TransferDocumentDirtyChangedEvent>;
114
+ /** Backs each session's {@link DataSessionHost.onDidUpdateDocument}. */
115
+ protected readonly documentUpdatedEmitter: Emitter<TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>>;
116
+ /** Backs each session's {@link DataSessionHost.onDidDeleteDocument}. */
117
+ protected readonly documentDeletedEmitter: Emitter<TransferDocumentDeletedEvent>;
118
+ /**
119
+ * Per id {@link watchDocument} watches under, the watch, which
120
+ * {@link generationReady} sends again to every later generation until the
121
+ * watch's handle is disposed.
122
+ */
123
+ protected readonly watches: Map<string, DataConnectionWatch>;
124
+ /**
125
+ * Per id, the URI of a watch whose handle was disposed with no ready
126
+ * generation to unwatch on. {@link generationReady} sends the unwatch to the
127
+ * next ready one: a generation that failed its readiness check after its
128
+ * watches were sent leaves them on a connection the port may hand back.
129
+ */
130
+ protected readonly pendingUnwatches: Map<string, string>;
131
+ /**
132
+ * The keys of the deletions the current generation's reconnect told the
133
+ * client of, so a URI several sessions and watches follow is told once.
134
+ */
135
+ protected readonly toldDeletions: Set<string>;
136
+ /**
137
+ * One map per watch in flight, keyed by document, of what the last event
138
+ * heard since the watch was sent said of its existence, and the event's
139
+ * position. The server may take the answer before an event goes out, so
140
+ * an event heard in flight wins over the answer where its position is
141
+ * past the one the answer carries.
142
+ */
143
+ protected readonly heardInFlight: Set<Map<string, DataConnectionHeardEvent>>;
144
+ /** The port's logger, or one that logs nothing. */
145
+ protected readonly logger: Logger;
146
+ /** Backs {@link onDidReconnect}. */
147
+ protected readonly reconnectEmitter: Emitter<void>;
148
+ /**
149
+ * Fires on every reconnect: once a connection becomes ready after an
150
+ * earlier one was, and its watches have been sent. The server sends no
151
+ * event for a change made while the connection was down, so a watcher reads
152
+ * its document again on this; a read it sends now reaches the server after
153
+ * its watch.
154
+ */
155
+ readonly onDidReconnect: Event<void>;
156
+ /** Whether a generation was ready before, which makes the next one a reconnect. */
157
+ protected readyBefore: boolean;
158
+ constructor(port: DataPort, client: TClient, ...rest: DataConnectionArgs<TTransfer, TClient, TServer>);
159
+ /**
160
+ * The sessions of this connection that have not ended, in the order they
161
+ * started. A session is listed until its `onDidDispose` fires, or until
162
+ * {@link dispose} clears the list.
163
+ */
164
+ get liveSessions(): readonly DataSession<TTransfer, TServer>[];
165
+ /**
166
+ * Start a participant on this connection, registered with the server under a
167
+ * fresh id, `label` plus `#` plus a random UUID, or under `clientId` when
168
+ * given. Pass a `label` naming the participant; without one it is
169
+ * `session`. Synchronous: the registration is sent at once, and the
170
+ * session's calls wait for it. The server refuses an id live anywhere in
171
+ * its process, and every call of that session then rejects with an error
172
+ * `isDuplicateClientIdError` recognises; an id the server reserves beyond
173
+ * {@link FRAMEWORK_CLIENT_IDS}, such as the integrity author, with one
174
+ * `isReservedClientIdError` recognises. Test with those guards rather than
175
+ * `instanceof`, which misses an error from another copy of this package.
176
+ *
177
+ * Throws a {@link ReservedClientIdError} for an id in
178
+ * {@link FRAMEWORK_CLIENT_IDS} — those are authors the SERVER emits rather
179
+ * than participants, so a session holding one would read the framework's
180
+ * own broadcasts as its own echoes and drop them — and a
181
+ * {@link DuplicateClientIdError} for an id a live session on this
182
+ * connection already holds.
183
+ */
184
+ createSession(label?: string, clientId?: string): DataSession<TTransfer, TServer>;
185
+ /**
186
+ * Follow `uri` without opening it: its update events reach this
187
+ * connection's client once this resolves. An open would hold the document
188
+ * for as long as the caller follows it. The watch runs under an id of its
189
+ * own, `label` plus `#` plus a random UUID, and needs no session: a session
190
+ * closing the document would also end its own watch of it. Every later
191
+ * connection that becomes ready gets the watch again, and tells the client
192
+ * of a deletion while it was down. Disposing the handle unwatches.
193
+ */
194
+ watchDocument(uri: string, label?: string): Promise<Disposable>;
195
+ /**
196
+ * The client, with its `onDocumentDirtyChanged` passing through
197
+ * {@link deliverDirty} first, so {@link dirtyStates} holds what the server
198
+ * told it, and every session hears it through {@link dirtyChangedEmitter};
199
+ * and with its `onDocumentUpdated` and `onDocumentDeleted` heard by every
200
+ * session through {@link documentUpdatedEmitter} and
201
+ * {@link documentDeletedEmitter} first. Every other bound method forwards
202
+ * to the client unchanged, and one the client lacks stays absent, so the
203
+ * binding still refuses it.
204
+ */
205
+ protected localTarget(): TClient;
206
+ /**
207
+ * Whether the client binds `onDocumentDeleted`. Without it no deletion
208
+ * reaches the client or the sessions, the server's or one a reconnect
209
+ * found, and a session's restore reports what a gone document took.
210
+ */
211
+ protected get hearsDeletions(): boolean;
212
+ /** Whether `name` is among the methods bound for the client, and the client implements it. */
213
+ protected bindsClientMethod(name: string): boolean;
214
+ /**
215
+ * Hand the client a deletion a session's restore or a watch sent again
216
+ * found, which no event brought while the connection was down, unless
217
+ * {@link toldDeletions} says this generation told it already. The sessions
218
+ * do not hear it: each finds what it lost in its own restore.
219
+ */
220
+ protected restoreDeletion(event: TransferDocumentDeletedEvent): void;
221
+ /**
222
+ * Record in every watch whose answer named `uri` whether the document
223
+ * exists, and in {@link heardInFlight} for the watches not answered yet,
224
+ * with the event's position.
225
+ */
226
+ protected markWatches(uri: string, exists: boolean, sequence: number): void;
227
+ /**
228
+ * Hand a dirty state a restore read to the client, unless it is what
229
+ * {@link dirtyStates} says the client was last told; a URI it holds
230
+ * nothing for counts as different.
231
+ */
232
+ protected restoreDirty(event: TransferDocumentDirtyChangedEvent): void;
233
+ /** Record `event` in {@link dirtyStates} and hand it to the client. */
234
+ protected deliverDirty(event: TransferDocumentDirtyChangedEvent): void;
235
+ /**
236
+ * After the transport dropped, reconnect on the next macrotask for the
237
+ * sessions with documents open, so they re-watch and follow their documents
238
+ * again without waiting for a call of their own, and connect for what
239
+ * {@link watchDocument} watches, which {@link generationReady} places
240
+ * again; a session with nothing open restores on its next call. Nothing is
241
+ * scheduled once this connection is disposed, which drops its generation
242
+ * too.
243
+ */
244
+ protected dropGeneration(): void;
245
+ /**
246
+ * Call `reconnect()` on every session, reporting a throw instead of letting
247
+ * one session's restore stop the others and the watches after them, and,
248
+ * inside the readiness gate, fail the whole generation.
249
+ */
250
+ protected reconnectSessions(): void;
251
+ /**
252
+ * Restore what the server lost with an earlier generation, whichever
253
+ * request brought this one up: the documents of sessions that have some
254
+ * open, and every watch {@link watchDocument} keeps.
255
+ */
256
+ protected generationReady(generation: RpcConnectionGeneration<TServer>): void;
257
+ /** Take back the watch of `uri` under `clientId` on `generation`; the server ignores one it does not hold. */
258
+ protected unwatch(generation: RpcConnectionGeneration<TServer>, clientId: string, uri: string): void;
259
+ /**
260
+ * Send the watch of `uri` under `clientId` to `generation`, which has just
261
+ * passed its readiness gate. Sent at once rather than after a wait, so no
262
+ * drop can come between choosing the generation and sending. A failure is
263
+ * reported, since no caller waits on it, only while the watch is kept and
264
+ * `generation` is still current: otherwise the next generation sends it
265
+ * again.
266
+ *
267
+ * A document the client last heard exists that the watch's answer says
268
+ * is gone goes to the client as a deletion; once the watch is in place,
269
+ * the document's dirty state is read and goes through
270
+ * {@link restoreDirty}, as a session's restore does. Neither reached
271
+ * anyone while the connection was down.
272
+ */
273
+ protected watchAgain(generation: RpcConnectionGeneration<TServer>, clientId: string, uri: string): void;
274
+ /**
275
+ * Sessions are detached rather than disposed: the server ends every session
276
+ * on a connection it sees close, so ending each one first sends requests
277
+ * over a connection this call is about to dispose.
278
+ */
279
+ dispose(): void;
280
+ }
281
+ /**
282
+ * A {@link DataConnection} that brings its own {@link DataEvents}, so a host
283
+ * with several interested parties does not have to supply one.
284
+ *
285
+ * **The client slot holds exactly one object, and that is why this exists.**
286
+ * `createRpcProxy` binds a single `localTarget`, and underneath a method name
287
+ * maps to one handler — a second registration replaces the first silently. So a
288
+ * properties panel and a tree cannot both be the client; one fan-out sits in the
289
+ * slot and both subscribe to it.
290
+ *
291
+ * Use {@link DataConnection} directly instead when the client is yours: an
292
+ * adopter service that implements the protocol plus its own methods, a single
293
+ * consumer that IS the client, or a request/response-only client that binds
294
+ * nothing.
295
+ */
296
+ export declare class DataConnectionWithEvents<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> extends DataConnection<TTransfer, TServer, DataEvents<TTransfer, DiagnosticOf<TServer>, ProjectOf<TServer>>> {
297
+ /** Server pushes, fanned out to as many local listeners as the host has. */
298
+ readonly events: DataEvents<TTransfer, DiagnosticOf<TServer>, ProjectOf<TServer>>;
299
+ constructor(port: DataPort, options?: DataConnectionOptions<TTransfer, TServer>);
300
+ /** Disposes the fan-out it created, which no caller else holds. */
301
+ dispose(): void;
302
+ }
303
+ //# sourceMappingURL=data-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-connection.d.ts","sourceRoot":"","sources":["../../src/client/data-connection.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAGJ,KAAK,kBAAkB,EACvB,KAAK,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