@hydranium/protocol 1.0.0-next.12 → 1.0.0-next.127

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 (172) hide show
  1. package/README.md +35 -1
  2. package/lib/client/data-connection.d.ts +145 -0
  3. package/lib/client/data-connection.d.ts.map +1 -0
  4. package/lib/client/data-connection.js +205 -0
  5. package/lib/client/data-connection.js.map +1 -0
  6. package/lib/client/data-events.d.ts +13 -1
  7. package/lib/client/data-events.d.ts.map +1 -1
  8. package/lib/client/data-events.js +21 -0
  9. package/lib/client/data-events.js.map +1 -1
  10. package/lib/client/data-port.d.ts +17 -22
  11. package/lib/client/data-port.d.ts.map +1 -1
  12. package/lib/client/data-session.d.ts +301 -80
  13. package/lib/client/data-session.d.ts.map +1 -1
  14. package/lib/client/data-session.js +425 -107
  15. package/lib/client/data-session.js.map +1 -1
  16. package/lib/client/index.d.ts +13 -8
  17. package/lib/client/index.d.ts.map +1 -1
  18. package/lib/client/index.js +13 -8
  19. package/lib/client/index.js.map +1 -1
  20. package/lib/client/message-relay.d.ts +9 -3
  21. package/lib/client/message-relay.d.ts.map +1 -1
  22. package/lib/client/message-relay.js +11 -5
  23. package/lib/client/message-relay.js.map +1 -1
  24. package/lib/client/post-message-transport.d.ts +64 -3
  25. package/lib/client/post-message-transport.d.ts.map +1 -1
  26. package/lib/client/post-message-transport.js +175 -1
  27. package/lib/client/post-message-transport.js.map +1 -1
  28. package/lib/client/rpc-connection.d.ts +149 -0
  29. package/lib/client/rpc-connection.d.ts.map +1 -0
  30. package/lib/client/rpc-connection.js +179 -0
  31. package/lib/client/rpc-connection.js.map +1 -0
  32. package/lib/client-ids.d.ts +41 -0
  33. package/lib/client-ids.d.ts.map +1 -0
  34. package/lib/client-ids.js +44 -0
  35. package/lib/client-ids.js.map +1 -0
  36. package/lib/clock.d.ts +38 -0
  37. package/lib/clock.d.ts.map +1 -1
  38. package/lib/clock.js +36 -1
  39. package/lib/clock.js.map +1 -1
  40. package/lib/data/data-protocol-methods.d.ts +4 -4
  41. package/lib/data/data-protocol-methods.d.ts.map +1 -1
  42. package/lib/data/data-protocol-methods.js +11 -1
  43. package/lib/data/data-protocol-methods.js.map +1 -1
  44. package/lib/data/data-server-protocol.d.ts +110 -31
  45. package/lib/data/data-server-protocol.d.ts.map +1 -1
  46. package/lib/data/events.d.ts +84 -3
  47. package/lib/data/events.d.ts.map +1 -1
  48. package/lib/data/requests.d.ts +67 -11
  49. package/lib/data/requests.d.ts.map +1 -1
  50. package/lib/errors.d.ts +102 -12
  51. package/lib/errors.d.ts.map +1 -1
  52. package/lib/errors.js +136 -18
  53. package/lib/errors.js.map +1 -1
  54. package/lib/glsp-save-model-actions.d.ts +50 -0
  55. package/lib/glsp-save-model-actions.d.ts.map +1 -0
  56. package/lib/glsp-save-model-actions.js +28 -0
  57. package/lib/glsp-save-model-actions.js.map +1 -0
  58. package/lib/index.d.ts +3 -0
  59. package/lib/index.d.ts.map +1 -1
  60. package/lib/index.js +6 -0
  61. package/lib/index.js.map +1 -1
  62. package/lib/latency-collector.d.ts +8 -4
  63. package/lib/latency-collector.d.ts.map +1 -1
  64. package/lib/latency-collector.js.map +1 -1
  65. package/lib/messages/index.d.ts +29 -0
  66. package/lib/messages/index.d.ts.map +1 -0
  67. package/lib/messages/index.js +56 -0
  68. package/lib/messages/index.js.map +1 -0
  69. package/lib/messages/primitives.d.ts +188 -0
  70. package/lib/messages/primitives.d.ts.map +1 -0
  71. package/lib/messages/primitives.js +161 -0
  72. package/lib/messages/primitives.js.map +1 -0
  73. package/lib/model-server.d.ts +44 -13
  74. package/lib/model-server.d.ts.map +1 -1
  75. package/lib/model-server.js +4 -2
  76. package/lib/model-server.js.map +1 -1
  77. package/lib/model-service/based-on.d.ts +57 -0
  78. package/lib/model-service/based-on.d.ts.map +1 -0
  79. package/lib/model-service/based-on.js +37 -0
  80. package/lib/model-service/based-on.js.map +1 -0
  81. package/lib/model-service/index.d.ts +1 -1
  82. package/lib/model-service/index.d.ts.map +1 -1
  83. package/lib/model-service/index.js +4 -5
  84. package/lib/model-service/index.js.map +1 -1
  85. package/lib/patch-merge.d.ts +28 -27
  86. package/lib/patch-merge.d.ts.map +1 -1
  87. package/lib/patch-merge.js +66 -22
  88. package/lib/patch-merge.js.map +1 -1
  89. package/lib/profile-session.d.ts +8 -4
  90. package/lib/profile-session.d.ts.map +1 -1
  91. package/lib/profile-session.js.map +1 -1
  92. package/lib/rpc/bind-rpc-methods.d.ts +29 -3
  93. package/lib/rpc/bind-rpc-methods.d.ts.map +1 -1
  94. package/lib/rpc/bind-rpc-methods.js +22 -3
  95. package/lib/rpc/bind-rpc-methods.js.map +1 -1
  96. package/lib/rpc/create-rpc-proxy.d.ts +7 -0
  97. package/lib/rpc/create-rpc-proxy.d.ts.map +1 -1
  98. package/lib/rpc/create-rpc-proxy.js +6 -1
  99. package/lib/rpc/create-rpc-proxy.js.map +1 -1
  100. package/lib/testing/catalogue-audit.d.ts +80 -0
  101. package/lib/testing/catalogue-audit.d.ts.map +1 -0
  102. package/lib/testing/catalogue-audit.js +94 -0
  103. package/lib/testing/catalogue-audit.js.map +1 -0
  104. package/lib/testing/data-doubles.d.ts +13 -12
  105. package/lib/testing/data-doubles.d.ts.map +1 -1
  106. package/lib/testing/data-doubles.js +19 -5
  107. package/lib/testing/data-doubles.js.map +1 -1
  108. package/lib/testing/fake-clock.d.ts +9 -1
  109. package/lib/testing/fake-clock.d.ts.map +1 -1
  110. package/lib/testing/fake-clock.js +54 -45
  111. package/lib/testing/fake-clock.js.map +1 -1
  112. package/lib/testing/index.d.ts +1 -0
  113. package/lib/testing/index.d.ts.map +1 -1
  114. package/lib/testing/index.js +4 -1
  115. package/lib/testing/index.js.map +1 -1
  116. package/lib/testing/node/index.d.ts +1 -0
  117. package/lib/testing/node/index.d.ts.map +1 -1
  118. package/lib/testing/node/index.js +2 -2
  119. package/lib/testing/node/index.js.map +1 -1
  120. package/lib/testing/node/message-port-pair.d.ts +25 -0
  121. package/lib/testing/node/message-port-pair.d.ts.map +1 -0
  122. package/lib/testing/node/message-port-pair.js +26 -0
  123. package/lib/testing/node/message-port-pair.js.map +1 -0
  124. package/lib/transfer-diagnostic.d.ts +33 -0
  125. package/lib/transfer-diagnostic.d.ts.map +1 -1
  126. package/lib/transfer-diagnostic.js +23 -0
  127. package/lib/transfer-diagnostic.js.map +1 -1
  128. package/lib/transfer-document.d.ts +22 -5
  129. package/lib/transfer-document.d.ts.map +1 -1
  130. package/lib/transfer-document.js +14 -1
  131. package/lib/transfer-document.js.map +1 -1
  132. package/package.json +11 -2
  133. package/src/client/data-connection.ts +282 -0
  134. package/src/client/data-events.ts +33 -1
  135. package/src/client/data-port.ts +17 -23
  136. package/src/client/data-session.ts +549 -126
  137. package/src/client/index.ts +13 -8
  138. package/src/client/message-relay.ts +29 -7
  139. package/src/client/post-message-transport.ts +219 -4
  140. package/src/client/rpc-connection.ts +244 -0
  141. package/src/client-ids.ts +45 -0
  142. package/src/clock.ts +56 -0
  143. package/src/data/data-protocol-methods.ts +11 -3
  144. package/src/data/data-server-protocol.ts +131 -31
  145. package/src/data/events.ts +90 -3
  146. package/src/data/requests.ts +71 -11
  147. package/src/errors.ts +154 -20
  148. package/src/glsp-save-model-actions.ts +59 -0
  149. package/src/index.ts +6 -0
  150. package/src/latency-collector.ts +8 -3
  151. package/src/messages/index.ts +36 -0
  152. package/src/messages/primitives.ts +271 -0
  153. package/src/model-server.ts +47 -18
  154. package/src/model-service/based-on.ts +63 -0
  155. package/src/model-service/index.ts +4 -5
  156. package/src/patch-merge.ts +90 -37
  157. package/src/profile-session.ts +9 -4
  158. package/src/rpc/bind-rpc-methods.ts +49 -4
  159. package/src/rpc/create-rpc-proxy.ts +14 -1
  160. package/src/testing/catalogue-audit.ts +111 -0
  161. package/src/testing/data-doubles.ts +42 -17
  162. package/src/testing/fake-clock.ts +62 -47
  163. package/src/testing/index.ts +4 -1
  164. package/src/testing/node/index.ts +2 -2
  165. package/src/testing/node/message-port-pair.ts +40 -0
  166. package/src/transfer-diagnostic.ts +40 -0
  167. package/src/transfer-document.ts +29 -6
  168. package/lib/model-service/args.d.ts +0 -64
  169. package/lib/model-service/args.d.ts.map +0 -1
  170. package/lib/model-service/args.js +0 -11
  171. package/lib/model-service/args.js.map +0 -1
  172. package/src/model-service/args.ts +0 -67
@@ -1 +1 @@
1
- {"version":3,"file":"data-protocol-methods.js","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAalF,8DAA8D;AACjD,QAAA,gCAAgC,GAAG;IAC7C,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;CACyE,CAAC;AAE3F,6DAA6D;AAChD,QAAA,+BAA+B,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAEhF,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,wCAAgC;IACnC,GAAG,uCAA+B;CACiD,CAAC;AAEvF;;;;;GAKG;AACU,QAAA,iCAAiC,GAAG;IAC9C,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;CAC0E,CAAC;AAE5F,mEAAmE;AACtD,QAAA,gCAAgC,GAAG,CAAC,mBAAmB,EAAE,iBAAiB,CAEtF,CAAC;AAEF,kEAAkE;AACrD,QAAA,+BAA+B,GAAG,CAAC,mBAAmB,CAAwE,CAAC;AAE5I;;;;;;GAMG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,wCAAgC;IACnC,GAAG,uCAA+B;CACiD,CAAC"}
1
+ {"version":3,"file":"data-protocol-methods.js","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAalF,8DAA8D;AACjD,QAAA,gCAAgC,GAAG;IAC7C,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;CACyE,CAAC;AAE3F,6DAA6D;AAChD,QAAA,+BAA+B,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAEhF,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,wCAAgC;IACnC,GAAG,uCAA+B;CACiD,CAAC;AAEvF;;;;;GAKG;AACU,QAAA,iCAAiC,GAAG;IAC9C,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;CAC0E,CAAC;AAE5F,mEAAmE;AACtD,QAAA,gCAAgC,GAAG;IAC7C,mBAAmB;IACnB,iBAAiB;IACjB,wBAAwB;IACxB,mBAAmB;IACnB,kBAAkB;CACqE,CAAC;AAE3F,kEAAkE;AACrD,QAAA,+BAA+B,GAAG,CAAC,mBAAmB,CAAwE,CAAC;AAE5I;;;;;;GAMG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,wCAAgC;IACnC,GAAG,uCAA+B;CACiD,CAAC"}
@@ -12,8 +12,8 @@ import type { Project } from '../project';
12
12
  import type { TransferDocument } from '../transfer-document';
13
13
  import type { CloseModelArgs, FindNextNameArgs, OpenModelArgs, ReferenceContext, ReferenceRequest } from '../model-server';
14
14
  import type { ReferenceCandidate, ReferenceTarget } from '../model-service/reference-candidate';
15
- import type { ProjectsChangedEvent, TransferDocumentSavedEvent, TransferDocumentUpdatedEvent } from './events';
16
- import type { GetModelDocumentArgs, GetProjectForUriArgs, TransferSaveDocumentArgs, WatchModelDocumentArgs, TransferUpdateDocumentArgs } from './requests';
15
+ import type { ProjectsChangedEvent, TransferDocumentDeletedEvent, TransferDocumentDirtyChangedEvent, TransferDocumentSavedEvent, TransferDocumentsBuiltEvent, TransferDocumentUpdatedEvent } from './events';
16
+ import type { CloseSessionArgs, CreateModelDocumentArgs, CreateSessionArgs, GetModelDocumentArgs, GetProjectForUriArgs, TransferSaveDocumentArgs, WatchModelDocumentArgs, TransferUpdateDocumentArgs, TransferUpdateDocumentsArgs } from './requests';
17
17
  /**
18
18
  * Document-scoped slice of the data-server wire contract: the per-document
19
19
  * lifecycle (get / update / save), the per-`(uri, clientId)` watch
@@ -32,34 +32,69 @@ import type { GetModelDocumentArgs, GetProjectForUriArgs, TransferSaveDocumentAr
32
32
  */
33
33
  export interface DocumentServerProtocol<TTransfer extends TransferElement, TDiagnostic extends TransferDiagnostic = TransferDiagnostic> {
34
34
  /**
35
- * Open a document for an editor session and return its current state.
36
- * Registers `(uri, clientId)` with the multi-client document manager
37
- * (so concurrent editors share one built document) and returns the
38
- * document at the server's configured target phase — the same shape
39
- * {@link getModelDocument} returns, except that `version` is taken from
40
- * the text-document store so the caller's first `baseVersion` write
41
- * cannot self-conflict. Idempotent in registration terms: opening an
42
- * already-open document refreshes the client registration. Note it does
43
- * NOT avoid a rebuild — a second client attaching triggers
44
- * `refreshContent`, which fires a change event, so mounting a form on a
45
- * document already open in a text editor rebuilds it.
35
+ * Register `args.clientId` as a client session owned by this connection.
36
+ * Rejects with a `DuplicateClientIdError` code when the id is live anywhere
37
+ * in the server process or reserved by the framework.
46
38
  *
47
- * The default `DataServer` impl delegates to `ModelService.open` then
48
- * reads the built state. Pair with {@link watchModelDocument} to receive
49
- * subsequent build-phase events (open returns a one-shot snapshot;
50
- * later validation diagnostics arrive on the watch channel).
39
+ * A request carrying a registered id acts as that session: it writes only
40
+ * what the session has open, failing with a `DocumentNotOpenError` code
41
+ * otherwise, and opens nothing implicitly; its open reads the file and takes
42
+ * no `languageId`, `version` or `text` seed. The session ends with
43
+ * {@link closeSession} or when the connection closes, and either closes
44
+ * every document it has open.
45
+ *
46
+ * A registration carrying the `resumeToken` an earlier registration of the
47
+ * same id carried ends that session first, from any connection, so a client
48
+ * whose connection dropped can register again before the server notices.
49
+ */
50
+ createSession(args: CreateSessionArgs): Promise<void>;
51
+ /**
52
+ * End a session this connection registered: close every document it has
53
+ * open, drop its watches, and free its id. A no-op for an id this
54
+ * connection did not register.
55
+ */
56
+ closeSession(args: CloseSessionArgs): Promise<void>;
57
+ /**
58
+ * Create a document with `args.text`, open for the session, and return it
59
+ * as {@link openModelDocument} does. It reaches disk with the first save.
60
+ * Fails when the file exists or any client has the URI open, and with a
61
+ * `SessionClosedError` code when `args.clientId` is not a session
62
+ * registered on this connection.
63
+ */
64
+ createModelDocument(args: CreateModelDocumentArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
65
+ /**
66
+ * Write several documents the session has open, all or none: a conflict or
67
+ * a document not open fails the whole set before any text applies.
68
+ * Resolves to the documents in the order given. Only for a session
69
+ * registered on this connection.
70
+ */
71
+ updateModelDocuments(args: TransferUpdateDocumentsArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>[]>;
72
+ /**
73
+ * Open a document for the client session `clientId` and return its current
74
+ * state. `clientId` must be a session this connection registered with
75
+ * {@link createSession}; any other id fails with the closed-session code,
76
+ * as every document request here does. The document is read from disk
77
+ * unless a client has it open already, so the request carries no
78
+ * `languageId`, `version` or `text` seed. Returns the document at
79
+ * the server's configured target phase — the same shape
80
+ * {@link getModelDocument} returns, except that `version` is taken from the
81
+ * text-document store so the caller's first `basedOn` write cannot
82
+ * self-conflict. A repeat open changes nothing.
83
+ *
84
+ * Pair with {@link watchModelDocument} to receive subsequent build-phase
85
+ * events (open returns a one-shot snapshot; later validation diagnostics
86
+ * arrive on the watch channel).
51
87
  */
52
- openModelDocument(args: OpenModelArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
88
+ openModelDocument(args: Pick<OpenModelArgs, 'uri' | 'clientId' | 'options'>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
53
89
  /**
54
- * Close an editor session for `(uri, clientId)`. Counterpart to
55
- * {@link openModelDocument}; the underlying document stays built until
56
- * every registered client has closed. The default `DataServer` impl
57
- * delegates to `ModelService.close` and ALSO releases any watch for the
58
- * same `(uri, clientId)` (closing a session frees its own watch — a
59
- * forgotten {@link unwatchModelDocument} would otherwise leak dispatch;
60
- * the implicit unwatch is idempotent). `watchModelDocument` is NOT
61
- * coupled the other way: opening does not force a watch, so a snapshot
62
- * reader can open without streaming.
90
+ * Close the session's open of `uri`. Counterpart to
91
+ * {@link openModelDocument}; the document stays open until every client
92
+ * has closed it, and the last close reverts it to disk. The default
93
+ * `DataServer` impl ALSO releases any watch for the same
94
+ * `(uri, clientId)` (a forgotten {@link unwatchModelDocument} would
95
+ * otherwise leak dispatch; the implicit unwatch is idempotent).
96
+ * `watchModelDocument` is NOT coupled the other way: opening does not force
97
+ * a watch, so a snapshot reader can open without streaming.
63
98
  */
64
99
  closeModelDocument(args: CloseModelArgs): Promise<void>;
65
100
  /**
@@ -70,13 +105,14 @@ export interface DocumentServerProtocol<TTransfer extends TransferElement, TDiag
70
105
  */
71
106
  getModelDocument(args: GetModelDocumentArgs): Promise<TransferDocument<TTransfer, TDiagnostic>>;
72
107
  /**
73
- * Update a document's content. The response carries the latest built
74
- * state including diagnostics; callers observe convergence via that
75
- * response.
108
+ * Update a document's content as the session `clientId`, which must have
109
+ * it open. The response carries the latest built state including
110
+ * diagnostics; callers observe convergence via that response.
76
111
  */
77
112
  updateModelDocument(args: TransferUpdateDocumentArgs<TTransfer>): Promise<TransferDocument<TTransfer, TDiagnostic>>;
78
113
  /**
79
- * Persist a document to disk. The response is the post-save document
114
+ * Write a document as the session `clientId`, which must have it open, and
115
+ * persist it to disk. The response is the post-save document
80
116
  * state (matches the file on disk). Save semantics depend on the
81
117
  * filesystem-provider wiring; rejection paths surface as awaited
82
118
  * promise rejections.
@@ -171,6 +207,19 @@ export interface ProjectServerProtocol<TProject extends Project = Project> {
171
207
  */
172
208
  export interface DataServerProtocol<TTransfer extends TransferElement, TDiagnostic extends TransferDiagnostic = TransferDiagnostic, TProject extends Project = Project> extends DocumentServerProtocol<TTransfer, TDiagnostic>, ProjectServerProtocol<TProject> {
173
209
  }
210
+ /**
211
+ * The diagnostic shape a server answers with, read back off its own
212
+ * declaration.
213
+ *
214
+ * This is what lets a client tier stay generic over the server alone and still
215
+ * describe what it hands back. Both parameters must be inferred: naming
216
+ * {@link TransferElement} for the transfer instead fails to match while that
217
+ * parameter is still generic, and a default declared against the constraint
218
+ * then stops satisfying it.
219
+ */
220
+ export type DiagnosticOf<TServer> = TServer extends DocumentServerProtocol<infer _TTransfer, infer TDiagnostic> ? TDiagnostic : TransferDiagnostic;
221
+ /** The project shape a server answers with, read back off its own declaration. */
222
+ export type ProjectOf<TServer> = TServer extends ProjectServerProtocol<infer TProject> ? TProject : Project;
174
223
  /**
175
224
  * Cross-reference / naming slice of the server surface — scope-aware
176
225
  * queries that resolve against the language's reference services. NOT part
@@ -235,6 +284,36 @@ export interface DocumentClientProtocol<TTransfer extends TransferElement, TDiag
235
284
  * codepath, not a subscription codepath).
236
285
  */
237
286
  onDocumentSaved(event: TransferDocumentSavedEvent<TTransfer, TDiagnostic>): void;
287
+ /**
288
+ * Delivered when a subscribed document's text starts or stops differing
289
+ * from its file, as the server last knew it. Gated like
290
+ * {@link onDocumentSaved}; the answer at any one moment is the `dirty` of
291
+ * the documents the server sends. After a reconnect, a `DataSession`
292
+ * delivers here the answer of each document it restored, when that differs
293
+ * from the last this client was told: the flips while the connection was
294
+ * down reached no one.
295
+ */
296
+ onDocumentDirtyChanged(event: TransferDocumentDirtyChangedEvent): void;
297
+ /**
298
+ * Delivered when a document's backing file was removed. Separate from
299
+ * {@link onDocumentUpdated} for the same reason as {@link onDocumentSaved},
300
+ * and more strongly: there is no built state to deliver, and the build-phase
301
+ * path cannot report a deletion at all.
302
+ *
303
+ * Ungated, because on a browser host — where the workspace lives behind the
304
+ * head — no other source can observe a file disappearing. Recipients that
305
+ * only care about their own documents filter by URI.
306
+ */
307
+ onDocumentDeleted(event: TransferDocumentDeletedEvent): void;
308
+ /**
309
+ * Delivered once per build, naming the documents that reached the
310
+ * subscription phase and that
311
+ * nobody on this connection watches — chiefly the ones rebuilt as a cascade
312
+ * from a dependency's change, which no filesystem watcher can see because
313
+ * their own files did not change. The complement of
314
+ * {@link onDocumentUpdated}; carries URIs and no documents.
315
+ */
316
+ onDocumentsBuilt(event: TransferDocumentsBuiltEvent): void;
238
317
  }
239
318
  /**
240
319
  * Project-scoped slice of the client surface — the project-registry change
@@ -1 +1 @@
1
- {"version":3,"file":"data-server-protocol.d.ts","sourceRoot":"","sources":["../../src/data/data-server-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC3H,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAChG,OAAO,KAAK,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC/G,OAAO,KAAK,EACT,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC5B,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,sBAAsB,CAAC,SAAS,SAAS,eAAe,EAAE,WAAW,SAAS,kBAAkB,GAAG,kBAAkB;IACnI;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1F;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,IAAI,EAA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B,CAAC,KAAK,EAAE,4BAA4B,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IAErF;;;;;;;;;OASG;IACH,eAAe,CAAC,KAAK,EAAE,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IAEjF;;;;;;;;OAQG;IACH,sBAAsB,CAAC,KAAK,EAAE,iCAAiC,GAAG,IAAI,CAAC;IAEvE;;;;;;;;;OASG;IACH,iBAAiB,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAE7D;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC7D;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO;IACtE;;;;;;;;OAQG;IACH,iBAAiB,CAAC,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;CACjE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB,CAChC,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,EAC3D,QAAQ,SAAS,OAAO,GAAG,OAAO,CAElC,SAAQ,sBAAsB,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,qBAAqB,CAAC,QAAQ,CAAC;CAAG"}
@@ -28,10 +28,14 @@ import type { TransferDocument } from '../transfer-document';
28
28
  * from both `onDocumentUpdated` and `onDocumentSaved`. The framework's own
29
29
  * `dispatchPhaseEvent` does NOT emit `'saved'` — saves take the dedicated
30
30
  * `DataClientProtocol.onDocumentSaved` channel.
31
- * - `'deleted'` — the URI appeared in `DocumentBuilder.onUpdate`'s
32
- * `deleted` list. The backing file was removed.
31
+ *
32
+ * Deletion is deliberately NOT a member. An update event carries a built
33
+ * document, which a deleted one has none of, and the phase-driven path that
34
+ * produces these events never runs for a deleted URI — the builder drops the
35
+ * document before deriving the rebuild set. It travels as
36
+ * {@link TransferDocumentDeletedEvent} on its own channel instead.
33
37
  */
34
- export type TransferDocumentUpdateReason = 'changed' | 'rebuilt' | 'saved' | 'deleted';
38
+ export type TransferDocumentUpdateReason = 'changed' | 'rebuilt' | 'saved';
35
39
  /**
36
40
  * Delivered on the data-server when a document's content (or existence)
37
41
  * changed. Subscribers receive this via `DocumentServerProtocol.watchModelDocument`.
@@ -72,6 +76,83 @@ export interface TransferDocumentSavedEvent<TTransfer extends TransferElement, T
72
76
  }
73
77
  /** Callback shape for `DataClientProtocol.onDocumentSaved`. */
74
78
  export type TransferDocumentSavedListener<TTransfer extends TransferElement, TDiagnostic extends TransferDiagnostic = TransferDiagnostic> = (event: TransferDocumentSavedEvent<TTransfer, TDiagnostic>) => void;
79
+ /**
80
+ * Delivered on the data-server when a watched document's text starts or stops
81
+ * differing from its file, as the server last knew the file. The current
82
+ * answer rides on every transfer document the server sends as `dirty`; this
83
+ * carries only its changes, so a client that follows it needs no rebuild to
84
+ * learn of a save.
85
+ */
86
+ export interface TransferDocumentDirtyChangedEvent {
87
+ /** Canonical URI, keyed as the subscription is. */
88
+ readonly uri: string;
89
+ readonly dirty: boolean;
90
+ }
91
+ /** Callback shape for `DataClientProtocol.onDocumentDirtyChanged`. */
92
+ export type TransferDocumentDirtyChangedListener = (event: TransferDocumentDirtyChangedEvent) => void;
93
+ /**
94
+ * Delivered on the data-server when a document's backing file was removed.
95
+ * Carries no document, and cannot: the state a
96
+ * {@link TransferDocumentUpdatedEvent} would have to carry no longer exists by
97
+ * the time anyone can be told. That is also why deletion is not a `reason` on
98
+ * the update stream — `DocumentBuilder.update` drops the document before
99
+ * deriving the rebuild set, so the phase-driven path that produces update
100
+ * events never runs for it.
101
+ *
102
+ * **Delivered for EVERY document, not only watched ones**, unlike
103
+ * `onDocumentUpdated` and `onDocumentSaved`. The test that decides which
104
+ * channels are gated is whether any OTHER source can observe the fact on the
105
+ * least capable host: a browser-hosted client's workspace lives behind the
106
+ * head, so nothing there can see a file disappear, and gating the notification
107
+ * would leave it blind. (A Theia frontend's filesystem watcher would cover it,
108
+ * which is why this is a host argument and not a structure-versus-content one.)
109
+ * A watcher is told about its own document's deletion here too, the update
110
+ * channel being silent for deletions by construction. Filter on {@link uri} if
111
+ * the receiver only cares about documents it opened.
112
+ *
113
+ * A watch survives the deletion, so a file that comes back resumes delivering
114
+ * `onDocumentUpdated` to the same subscribers with no re-subscription. A
115
+ * client that responds by closing its editor releases the watch through
116
+ * `closeModelDocument` as usual.
117
+ */
118
+ export interface TransferDocumentDeletedEvent {
119
+ /** Canonical URI of the removed document, keyed as the subscription is. */
120
+ readonly uri: string;
121
+ }
122
+ /** Callback shape for `DataClientProtocol.onDocumentDeleted`. */
123
+ export type TransferDocumentDeletedListener = (event: TransferDocumentDeletedEvent) => void;
124
+ /**
125
+ * Delivered on the data-server once per build, naming the documents that reached
126
+ * the configured subscription phase (`DataServerOptions.subscriptionPhase`,
127
+ * `Validated` by default) and that NO client on the connection is watching. Not
128
+ * the integrity-settled landmark, which is a different point and a different
129
+ * word in this framework.
130
+ *
131
+ * The complement of {@link TransferDocumentUpdatedEvent}, which is gated per
132
+ * URI: together the two cover every document a build touched. This one exists
133
+ * for the case no source outside the server can observe — a document rebuilt
134
+ * because something it DEPENDS ON changed. Its own file never changed, so a
135
+ * filesystem watcher cannot see it, and it has no subscriber, so the update
136
+ * channel does not report it. A consumer showing data derived from such a
137
+ * document (a tree label, a decorator) would otherwise hold a stale value with
138
+ * nothing to invalidate it.
139
+ *
140
+ * Carries URIs and no documents: a recipient re-reads what it displays, through
141
+ * `getModelDocument` or its own request. That keeps the bandwidth property the
142
+ * per-URI subscription exists for, without gating the message.
143
+ *
144
+ * Not sent when the set is empty, which is the normal case while editing — the
145
+ * document being edited is watched by its own editor and therefore excluded.
146
+ * Workspace initialisation sends nothing either: it does not build to the
147
+ * subscription phase. The largest message a workspace can produce is therefore
148
+ * a whole-workspace rebuild at that phase, which is one message of URIs.
149
+ */
150
+ export interface TransferDocumentsBuiltEvent {
151
+ /** Canonical URIs, keyed as subscriptions are. Never empty. */
152
+ readonly uris: readonly string[];
153
+ }
154
+ /** Callback shape for `DataClientProtocol.onDocumentsBuilt`. */
155
+ export type TransferDocumentsBuiltListener = (event: TransferDocumentsBuiltEvent) => void;
75
156
  /**
76
157
  * Why a project-change event fired. `added` — the project was newly
77
158
  * registered (descriptor discovered); `updated` — the project's
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/data/events.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B,CAC1C,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB;IAE3D,QAAQ,EAAE,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACnD,iEAAiE;IACjE,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,4BAA4B,CAAC;CACvC;AAED,iEAAiE;AACjE,MAAM,MAAM,+BAA+B,CACxC,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,IAC1D,CAAC,KAAK,EAAE,4BAA4B,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,IAAI,CAAC;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,0BAA0B,CACxC,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAA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AAG,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,2BAA2B;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,gEAAgE;AAChE,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;AAE1F;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAElE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,oBAAoB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO;IACrE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACvC;AAED,iEAAiE;AACjE,MAAM,MAAM,uBAAuB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO,IAAI,CAAC,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import type { TransferSaveArgs, TransferUpdateArgs } from '../model-service/args';
9
+ import type { BasedOn } from '../model-service/based-on';
10
10
  /** Get the current state of a single document. The server returns the latest built version. */
11
11
  export interface GetModelDocumentArgs {
12
12
  /** Document URI. */
@@ -37,22 +37,78 @@ export interface GetProjectForUriArgs {
37
37
  uri: string;
38
38
  }
39
39
  /**
40
- * Update a document's content. Wire-side projection of the facade's
41
- * {@link TransferUpdateArgs}; structurally identical so the data-server RPC
42
- * handler can forward straight to the in-process `ModelService.update`
43
- * without an args mapping.
40
+ * Update a document the session `clientId` has open. Generic over `TTransfer`
41
+ * so adopters parameterise the structured shape against their grammar's
42
+ * transfer-model overlay; passing a string is always allowed.
44
43
  */
45
- export type TransferUpdateDocumentArgs<TTransfer> = TransferUpdateArgs<TTransfer>;
46
- /** Persist a document to disk. Wire-side projection of {@link TransferSaveArgs}. */
47
- export type TransferSaveDocumentArgs<TTransfer> = TransferSaveArgs<TTransfer>;
44
+ export interface TransferUpdateDocumentArgs<TTransfer> {
45
+ /** Document URI. */
46
+ uri: string;
47
+ /** The id of a live session registered on this connection. */
48
+ clientId: string;
49
+ /** The whole structured model root, or its serialised textual form. */
50
+ model: TTransfer | string;
51
+ /**
52
+ * What this write was authored against. A `SnapshotVersion` is compared
53
+ * against the server's current text-document version for `uri` and throws
54
+ * `ConflictError` on mismatch; `'anything'` writes unconditionally.
55
+ *
56
+ * **Required so that an ungated write is a decision rather than an
57
+ * omission.** An optional gate is indistinguishable from a forgotten one at
58
+ * the call site, and a file of twenty writes hides the one that lost the
59
+ * field. Nothing else here can see that, since the defect is an absence.
60
+ */
61
+ basedOn: BasedOn;
62
+ }
63
+ /** Update a document the session `clientId` has open, then persist it to disk. */
64
+ export interface TransferSaveDocumentArgs<TTransfer> extends TransferUpdateDocumentArgs<TTransfer> {
65
+ }
66
+ /** Register a client session on the connection. */
67
+ export interface CreateSessionArgs {
68
+ /** The session's id, minted by the client; unique in the server process while the session is live. */
69
+ clientId: string;
70
+ /** What the participant is; kept as the server session's `label`. */
71
+ label?: string;
72
+ /**
73
+ * A token the client keeps for the session's lifetime. It is no secret: the
74
+ * wire carries no authentication. A later `createSession` for the same id
75
+ * carrying the same token, from any connection, ends the session it names
76
+ * and registers the id afresh, so a client whose connection dropped before
77
+ * the server noticed can register again. Without it the id stays refused
78
+ * until the server notices.
79
+ */
80
+ resumeToken?: string;
81
+ }
82
+ /** End a client session registered on the connection. */
83
+ export interface CloseSessionArgs {
84
+ clientId: string;
85
+ }
86
+ /** Create a document that exists nowhere yet, open for the session creating it. */
87
+ export interface CreateModelDocumentArgs {
88
+ uri: string;
89
+ /** The id of a live session registered on this connection. */
90
+ clientId: string;
91
+ /** The document's initial content; it reaches disk with the first save. */
92
+ text: string;
93
+ }
94
+ /**
95
+ * Write several documents a session has open, all or none. `clientId` is on
96
+ * the set rather than on each update: an id per update would allow a set
97
+ * mixing clients, which the server would have to refuse.
98
+ */
99
+ export interface TransferUpdateDocumentsArgs<TTransfer> {
100
+ /** The id of a live session registered on this connection. */
101
+ clientId: string;
102
+ updates: Omit<TransferUpdateDocumentArgs<TTransfer>, 'clientId'>[];
103
+ }
48
104
  /**
49
105
  * Identifies a per-document watch on the data server. Shared by both
50
106
  * `watchModelDocument` and `unwatchModelDocument` — the `(uri, clientId)`
51
107
  * pair is the watch key, so unwatching names the same watch that was
52
108
  * started. The `clientId` identifies the originator the same way it does
53
- * on facade-side mutations (`TransferUpdateArgs.clientId`,
54
- * `TransferSaveArgs.clientId`): it keys the per-`(uri, clientId)` watch
55
- * bucket so multiple watchers on the same wire stay distinct, AND it lets
109
+ * on the document writes (`TransferUpdateDocumentArgs.clientId`,
110
+ * `TransferSaveDocumentArgs.clientId`): it keys the per-`(uri, clientId)`
111
+ * watch bucket so multiple watchers on the same wire stay distinct, AND it lets
56
112
  * each watcher recognise its own echo on inbound `onDocumentUpdated` events
57
113
  * (the wire shape's `sourceClientId` carries the originating mutation's
58
114
  * `clientId`).
@@ -1 +1 @@
1
- {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/data/requests.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAElF,+FAA+F;AAC/F,MAAM,WAAW,oBAAoB;IAClC,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IAClC,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,C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AAyD;AACzD,MAAM,WAAW,gBAAgB;IAC9B,QAAQ,EAAE,MAAM,CAAC;CACnB;AAED,mFAAmF;AACnF,MAAM,WAAW,uBAAuB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B,CAAC,SAAS;IACnD,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,IAAI,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC;CACrE;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,sBAAsB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;CACnB"}
package/lib/errors.d.ts CHANGED
@@ -7,6 +7,16 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { ResponseError } from 'vscode-jsonrpc';
10
+ import { type HydraniumMessageData } from './messages/primitives';
11
+ /**
12
+ * The catalogue declaration behind {@link ConflictError}'s sentence.
13
+ *
14
+ * Its English must keep containing {@link CONFLICT_ERROR_MESSAGE_MARKER}: the
15
+ * marker is tier 3 of {@link isConflictError}'s ladder, and it matches on text.
16
+ * That tier only ever works untranslated, which is why it is the last resort
17
+ * behind the numeric code rather than the primary check.
18
+ */
19
+ export declare const STALE_BASED_UPDATE: import("./messages/primitives").MessageDefinition<"Stale-based update for {uri}: expected v{expectedVersion}, server is at v{actualVersion}">;
10
20
  /**
11
21
  * Application-specific JSON-RPC error code for {@link ConflictError}.
12
22
  * Outside the reserved range (-32768 .. -32000) per JSON-RPC 2.0.
@@ -21,15 +31,15 @@ export declare const CONFLICT_ERROR_CODE = 1001;
21
31
  * Structured payload carried in {@link ConflictError.data}, and the only place
22
32
  * a post-RPC caller can read the version mismatch from.
23
33
  */
24
- export interface ConflictErrorData {
34
+ export interface ConflictErrorData extends HydraniumMessageData {
25
35
  readonly uri: string;
26
36
  /** The based-on version the caller authored against. */
27
- readonly expected: number;
37
+ readonly expectedVersion: number;
28
38
  /** The server's current text-document version at the time of the throw. */
29
- readonly actual: number;
39
+ readonly actualVersion: number;
30
40
  }
31
41
  /**
32
- * Thrown by `ModelService.update` / `ModelService.save` when the caller-
42
+ * Thrown by a client session's `update` / `save` when the caller-
33
43
  * supplied based-on version no longer matches the server's current text-
34
44
  * document version for the same URI — i.e. the snapshot the caller
35
45
  * authored against has been superseded by an intervening edit.
@@ -42,11 +52,9 @@ export interface ConflictErrorData {
42
52
  * `err.data` (the instance is reconstructed as a generic
43
53
  * `ResponseError`, so subclass getters / fields do not survive).
44
54
  *
45
- * Detection is opt-in via the optional `baseVersion` field on
46
- * `TransferUpdateArgs` / `TransferSaveArgs`; callers that omit the field get
47
- * no gating. This mirrors LSP's `OptionalVersionedTextDocumentIdentifier`
48
- * posture, so headless / CLI / batch tooling with no meaningful based-on
49
- * version can opt out explicitly.
55
+ * Detection is driven by the required `basedOn` field of every write
56
+ * request; a caller with no meaningful based-on version passes
57
+ * `'anything'` and gets no gating.
50
58
  *
51
59
  * Three reasonable adopter recovery strategies:
52
60
  *
@@ -60,11 +68,93 @@ export interface ConflictErrorData {
60
68
  * No auto-retry or auto-merge ships by default.
61
69
  */
62
70
  export declare class ConflictError extends ResponseError<ConflictErrorData> {
63
- constructor(uri: string, expected: number, actual: number);
71
+ constructor(uri: string, expectedVersion: number, actualVersion: number);
64
72
  get uri(): string;
65
- get expected(): number;
66
- get actual(): number;
73
+ /**
74
+ * The based-on version the caller authored against.
75
+ *
76
+ * Must not be renamed to `expected`, nor its sibling to `actual`: a test
77
+ * reporter reads an error carrying both as an assertion failure, and
78
+ * vitest's formatter then ASSIGNS to them, which throws on an accessor and
79
+ * replaces the real failure with a `TypeError`.
80
+ */
81
+ get expectedVersion(): number;
82
+ /** The server's version at the time of the throw. Not `actual` — see {@link expectedVersion}. */
83
+ get actualVersion(): number;
84
+ }
85
+ /**
86
+ * JSON-RPC code for {@link SessionClosedError}, beside {@link CONFLICT_ERROR_CODE}
87
+ * and for the same reason: the code survives reconstruction, the class does not.
88
+ */
89
+ export declare const SESSION_CLOSED_ERROR_CODE = 1004;
90
+ /** JSON-RPC code for {@link DocumentNotOpenError}. */
91
+ export declare const DOCUMENT_NOT_OPEN_ERROR_CODE = 1005;
92
+ /** JSON-RPC code for {@link DuplicateClientIdError}. */
93
+ export declare const DUPLICATE_CLIENT_ID_ERROR_CODE = 1006;
94
+ /**
95
+ * The catalogue declaration behind {@link SessionClosedError}'s default
96
+ * sentence. It names no client id: the sentence can reach an end user, and the
97
+ * id stays in {@link SessionClosedErrorData.clientId} for whoever needs it.
98
+ */
99
+ export declare const SESSION_CLOSED: import("./messages/primitives").MessageDefinition<"The editing session has ended.">;
100
+ /** Structured payload carried in {@link SessionClosedError.data}. */
101
+ export interface SessionClosedErrorData extends HydraniumMessageData {
102
+ readonly clientId: string;
103
+ }
104
+ /**
105
+ * Thrown by every call on a client session after it ended, and by an open that
106
+ * was still in flight when its session ended: by the server for its sessions,
107
+ * and by a client-side `DataSession` once disposed, so a caller handles both
108
+ * the same way. A caller recognises it with {@link isSessionClosedError}, never
109
+ * by its sentence.
110
+ */
111
+ export declare class SessionClosedError extends ResponseError<SessionClosedErrorData> {
112
+ /**
113
+ * `message` replaces the default English, for a caller that knows more than
114
+ * that the session is gone. The identity stays {@link SESSION_CLOSED}'s, so a
115
+ * translating renderer renders the catalogue sentence in its place.
116
+ */
117
+ constructor(clientId: string, message?: string);
118
+ get clientId(): string;
67
119
  }
120
+ /**
121
+ * Thrown when a client session writes a document it does not have open.
122
+ *
123
+ * A session writes only what it has open, so this is the answer both to a write
124
+ * that never opened and to one whose open was closed underneath it — by the
125
+ * session itself, or by the document being deleted.
126
+ */
127
+ export declare class DocumentNotOpenError extends ResponseError<{
128
+ readonly uri: string;
129
+ readonly clientId: string;
130
+ }> {
131
+ constructor(uri: string, clientId: string);
132
+ get uri(): string;
133
+ get clientId(): string;
134
+ }
135
+ /**
136
+ * Thrown when a client session is started under an id that is already live in
137
+ * the process, or that the framework reserves for itself.
138
+ *
139
+ * Ids are unique process-wide because the id is also the author label on every
140
+ * version and the key a client recognises its own echoes by; two participants
141
+ * sharing one would each take the other's writes for their own.
142
+ */
143
+ export declare class DuplicateClientIdError extends ResponseError<{
144
+ readonly clientId: string;
145
+ }> {
146
+ constructor(clientId: string);
147
+ get clientId(): string;
148
+ }
149
+ /**
150
+ * Whether `error` is a {@link SessionClosedError}: by name in-process, by code
151
+ * after an RPC, where it arrives as a plain `ResponseError`.
152
+ */
153
+ export declare function isSessionClosedError(error: unknown): error is SessionClosedError;
154
+ /** Whether `error` is a {@link DocumentNotOpenError}; see {@link isSessionClosedError}. */
155
+ export declare function isDocumentNotOpenError(error: unknown): error is DocumentNotOpenError;
156
+ /** Whether `error` is a {@link DuplicateClientIdError}; see {@link isSessionClosedError}. */
157
+ export declare function isDuplicateClientIdError(error: unknown): error is DuplicateClientIdError;
68
158
  /**
69
159
  * Type guard for {@link ConflictError}. Detection ladder:
70
160
  *
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,aAAc,SAAQ,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