@hydranium/protocol 1.0.0-next.25 → 1.0.0-next.250

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 (250) hide show
  1. package/README.md +44 -49
  2. package/lib/abstract-logger.d.ts +5 -0
  3. package/lib/abstract-logger.d.ts.map +1 -1
  4. package/lib/abstract-logger.js +7 -0
  5. package/lib/abstract-logger.js.map +1 -1
  6. package/lib/client/data-connection.d.ts +245 -0
  7. package/lib/client/data-connection.d.ts.map +1 -0
  8. package/lib/client/data-connection.js +425 -0
  9. package/lib/client/data-connection.js.map +1 -0
  10. package/lib/client/data-events.d.ts +13 -1
  11. package/lib/client/data-events.d.ts.map +1 -1
  12. package/lib/client/data-events.js +21 -0
  13. package/lib/client/data-events.js.map +1 -1
  14. package/lib/client/data-port.d.ts +44 -27
  15. package/lib/client/data-port.d.ts.map +1 -1
  16. package/lib/client/data-session.d.ts +473 -81
  17. package/lib/client/data-session.d.ts.map +1 -1
  18. package/lib/client/data-session.js +743 -108
  19. package/lib/client/data-session.js.map +1 -1
  20. package/lib/client/index.d.ts +14 -9
  21. package/lib/client/index.d.ts.map +1 -1
  22. package/lib/client/index.js +14 -9
  23. package/lib/client/index.js.map +1 -1
  24. package/lib/client/message-relay.d.ts +10 -4
  25. package/lib/client/message-relay.d.ts.map +1 -1
  26. package/lib/client/message-relay.js +12 -6
  27. package/lib/client/message-relay.js.map +1 -1
  28. package/lib/client/post-message-transport.d.ts +64 -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 +157 -0
  33. package/lib/client/rpc-connection.d.ts.map +1 -0
  34. package/lib/client/rpc-connection.js +214 -0
  35. package/lib/client/rpc-connection.js.map +1 -0
  36. package/lib/client-ids.d.ts +45 -0
  37. package/lib/client-ids.d.ts.map +1 -0
  38. package/lib/client-ids.js +48 -0
  39. package/lib/client-ids.js.map +1 -0
  40. package/lib/clock.d.ts +38 -0
  41. package/lib/clock.d.ts.map +1 -1
  42. package/lib/clock.js +36 -1
  43. package/lib/clock.js.map +1 -1
  44. package/lib/console-logger.d.ts +23 -0
  45. package/lib/console-logger.d.ts.map +1 -0
  46. package/lib/console-logger.js +39 -0
  47. package/lib/console-logger.js.map +1 -0
  48. package/lib/data/data-protocol-methods.d.ts +4 -4
  49. package/lib/data/data-protocol-methods.d.ts.map +1 -1
  50. package/lib/data/data-protocol-methods.js +12 -1
  51. package/lib/data/data-protocol-methods.js.map +1 -1
  52. package/lib/data/data-server-protocol.d.ts +132 -41
  53. package/lib/data/data-server-protocol.d.ts.map +1 -1
  54. package/lib/data/events.d.ts +117 -21
  55. package/lib/data/events.d.ts.map +1 -1
  56. package/lib/data/requests.d.ts +69 -11
  57. package/lib/data/requests.d.ts.map +1 -1
  58. package/lib/debouncer.d.ts.map +1 -1
  59. package/lib/debouncer.js.map +1 -1
  60. package/lib/errors.d.ts +187 -29
  61. package/lib/errors.d.ts.map +1 -1
  62. package/lib/errors.js +270 -29
  63. package/lib/errors.js.map +1 -1
  64. package/lib/glsp-request-model-args.d.ts +16 -0
  65. package/lib/glsp-request-model-args.d.ts.map +1 -0
  66. package/lib/glsp-request-model-args.js +19 -0
  67. package/lib/glsp-request-model-args.js.map +1 -0
  68. package/lib/glsp-save-model-actions.d.ts +50 -0
  69. package/lib/glsp-save-model-actions.d.ts.map +1 -0
  70. package/lib/glsp-save-model-actions.js +28 -0
  71. package/lib/glsp-save-model-actions.js.map +1 -0
  72. package/lib/index.d.ts +7 -0
  73. package/lib/index.d.ts.map +1 -1
  74. package/lib/index.js +10 -0
  75. package/lib/index.js.map +1 -1
  76. package/lib/latency-collector.d.ts +8 -4
  77. package/lib/latency-collector.d.ts.map +1 -1
  78. package/lib/latency-collector.js.map +1 -1
  79. package/lib/logger.d.ts +22 -1
  80. package/lib/logger.d.ts.map +1 -1
  81. package/lib/logger.js +31 -3
  82. package/lib/logger.js.map +1 -1
  83. package/lib/messages/index.d.ts +30 -0
  84. package/lib/messages/index.d.ts.map +1 -0
  85. package/lib/messages/index.js +62 -0
  86. package/lib/messages/index.js.map +1 -0
  87. package/lib/messages/primitives.d.ts +188 -0
  88. package/lib/messages/primitives.d.ts.map +1 -0
  89. package/lib/messages/primitives.js +161 -0
  90. package/lib/messages/primitives.js.map +1 -0
  91. package/lib/model-server.d.ts +60 -13
  92. package/lib/model-server.d.ts.map +1 -1
  93. package/lib/model-server.js +4 -2
  94. package/lib/model-server.js.map +1 -1
  95. package/lib/model-service/base-version.d.ts +64 -0
  96. package/lib/model-service/base-version.d.ts.map +1 -0
  97. package/lib/model-service/base-version.js +43 -0
  98. package/lib/model-service/base-version.js.map +1 -0
  99. package/lib/model-service/index.d.ts +1 -1
  100. package/lib/model-service/index.d.ts.map +1 -1
  101. package/lib/model-service/index.js +4 -5
  102. package/lib/model-service/index.js.map +1 -1
  103. package/lib/model-service/reference-candidate.d.ts +5 -3
  104. package/lib/model-service/reference-candidate.d.ts.map +1 -1
  105. package/lib/{model-service/args.js → node/index.d.ts} +2 -3
  106. package/lib/node/index.d.ts.map +1 -0
  107. package/lib/node/index.js +29 -0
  108. package/lib/node/index.js.map +1 -0
  109. package/lib/node/process-memory.d.ts +66 -0
  110. package/lib/node/process-memory.d.ts.map +1 -0
  111. package/lib/node/process-memory.js +291 -0
  112. package/lib/node/process-memory.js.map +1 -0
  113. package/lib/noop-logger.d.ts.map +1 -1
  114. package/lib/noop-logger.js.map +1 -1
  115. package/lib/observable-value.js.map +1 -1
  116. package/lib/patch-merge.d.ts +35 -32
  117. package/lib/patch-merge.d.ts.map +1 -1
  118. package/lib/patch-merge.js +67 -23
  119. package/lib/patch-merge.js.map +1 -1
  120. package/lib/profile-session.d.ts +8 -4
  121. package/lib/profile-session.d.ts.map +1 -1
  122. package/lib/profile-session.js.map +1 -1
  123. package/lib/random-uuid.d.ts +14 -0
  124. package/lib/random-uuid.d.ts.map +1 -0
  125. package/lib/random-uuid.js +24 -0
  126. package/lib/random-uuid.js.map +1 -0
  127. package/lib/reconcile-write.d.ts +65 -0
  128. package/lib/reconcile-write.d.ts.map +1 -0
  129. package/lib/reconcile-write.js +67 -0
  130. package/lib/reconcile-write.js.map +1 -0
  131. package/lib/rpc/bind-rpc-methods.d.ts +33 -3
  132. package/lib/rpc/bind-rpc-methods.d.ts.map +1 -1
  133. package/lib/rpc/bind-rpc-methods.js +32 -3
  134. package/lib/rpc/bind-rpc-methods.js.map +1 -1
  135. package/lib/rpc/create-rpc-proxy.d.ts +10 -0
  136. package/lib/rpc/create-rpc-proxy.d.ts.map +1 -1
  137. package/lib/rpc/create-rpc-proxy.js +12 -2
  138. package/lib/rpc/create-rpc-proxy.js.map +1 -1
  139. package/lib/rpc/index.d.ts +1 -0
  140. package/lib/rpc/index.d.ts.map +1 -1
  141. package/lib/rpc/index.js +1 -0
  142. package/lib/rpc/index.js.map +1 -1
  143. package/lib/rpc/send-by-method-name.d.ts +76 -0
  144. package/lib/rpc/send-by-method-name.d.ts.map +1 -0
  145. package/lib/rpc/send-by-method-name.js +120 -0
  146. package/lib/rpc/send-by-method-name.js.map +1 -0
  147. package/lib/rpc/wire-prefix.js.map +1 -1
  148. package/lib/testing/catalogue-audit.d.ts +80 -0
  149. package/lib/testing/catalogue-audit.d.ts.map +1 -0
  150. package/lib/testing/catalogue-audit.js +94 -0
  151. package/lib/testing/catalogue-audit.js.map +1 -0
  152. package/lib/testing/data-doubles.d.ts +46 -15
  153. package/lib/testing/data-doubles.d.ts.map +1 -1
  154. package/lib/testing/data-doubles.js +58 -10
  155. package/lib/testing/data-doubles.js.map +1 -1
  156. package/lib/testing/fake-clock.d.ts +9 -1
  157. package/lib/testing/fake-clock.d.ts.map +1 -1
  158. package/lib/testing/fake-clock.js +54 -45
  159. package/lib/testing/fake-clock.js.map +1 -1
  160. package/lib/testing/index.d.ts +1 -0
  161. package/lib/testing/index.d.ts.map +1 -1
  162. package/lib/testing/index.js +5 -2
  163. package/lib/testing/index.js.map +1 -1
  164. package/lib/testing/node/duplex-connection.d.ts.map +1 -1
  165. package/lib/testing/node/duplex-connection.js +3 -2
  166. package/lib/testing/node/duplex-connection.js.map +1 -1
  167. package/lib/testing/node/duplex-stream.js.map +1 -1
  168. package/lib/testing/node/index.d.ts +1 -0
  169. package/lib/testing/node/index.d.ts.map +1 -1
  170. package/lib/testing/node/index.js +2 -2
  171. package/lib/testing/node/index.js.map +1 -1
  172. package/lib/testing/node/message-port-pair.d.ts +25 -0
  173. package/lib/testing/node/message-port-pair.d.ts.map +1 -0
  174. package/lib/testing/node/message-port-pair.js +26 -0
  175. package/lib/testing/node/message-port-pair.js.map +1 -0
  176. package/lib/testing/wait-for.d.ts +3 -2
  177. package/lib/testing/wait-for.d.ts.map +1 -1
  178. package/lib/testing/wait-for.js +40 -10
  179. package/lib/testing/wait-for.js.map +1 -1
  180. package/lib/tracer.d.ts.map +1 -1
  181. package/lib/tracer.js.map +1 -1
  182. package/lib/transfer-diagnostic.d.ts +33 -0
  183. package/lib/transfer-diagnostic.d.ts.map +1 -1
  184. package/lib/transfer-diagnostic.js +23 -0
  185. package/lib/transfer-diagnostic.js.map +1 -1
  186. package/lib/transfer-document.d.ts +70 -32
  187. package/lib/transfer-document.d.ts.map +1 -1
  188. package/lib/transfer-document.js +17 -9
  189. package/lib/transfer-document.js.map +1 -1
  190. package/lib/uri.d.ts.map +1 -1
  191. package/lib/uri.js.map +1 -1
  192. package/lib/util.d.ts +8 -0
  193. package/lib/util.d.ts.map +1 -1
  194. package/lib/util.js +32 -0
  195. package/lib/util.js.map +1 -1
  196. package/package.json +29 -37
  197. package/src/abstract-logger.ts +8 -0
  198. package/src/client/data-connection.ts +520 -0
  199. package/src/client/data-events.ts +33 -1
  200. package/src/client/data-port.ts +46 -28
  201. package/src/client/data-session.ts +951 -126
  202. package/src/client/index.ts +14 -9
  203. package/src/client/message-relay.ts +30 -8
  204. package/src/client/post-message-transport.ts +219 -4
  205. package/src/client/rpc-connection.ts +281 -0
  206. package/src/client-ids.ts +49 -0
  207. package/src/clock.ts +56 -0
  208. package/src/console-logger.ts +39 -0
  209. package/src/data/data-protocol-methods.ts +13 -4
  210. package/src/data/data-server-protocol.ts +157 -41
  211. package/src/data/events.ts +123 -21
  212. package/src/data/requests.ts +74 -11
  213. package/src/errors.ts +322 -36
  214. package/src/glsp-request-model-args.ts +16 -0
  215. package/src/glsp-save-model-actions.ts +59 -0
  216. package/src/index.ts +10 -0
  217. package/src/latency-collector.ts +8 -3
  218. package/src/logger.ts +28 -2
  219. package/src/messages/index.ts +37 -0
  220. package/src/messages/primitives.ts +271 -0
  221. package/src/model-server.ts +64 -19
  222. package/src/model-service/base-version.ts +72 -0
  223. package/src/model-service/index.ts +4 -5
  224. package/src/model-service/reference-candidate.ts +5 -3
  225. package/src/node/index.ts +14 -0
  226. package/src/node/process-memory.ts +299 -0
  227. package/src/patch-merge.ts +97 -42
  228. package/src/profile-session.ts +9 -4
  229. package/src/random-uuid.ts +21 -0
  230. package/src/reconcile-write.ts +124 -0
  231. package/src/rpc/README.md +4 -5
  232. package/src/rpc/bind-rpc-methods.ts +59 -4
  233. package/src/rpc/create-rpc-proxy.ts +20 -2
  234. package/src/rpc/index.ts +1 -0
  235. package/src/rpc/send-by-method-name.ts +140 -0
  236. package/src/testing/catalogue-audit.ts +111 -0
  237. package/src/testing/data-doubles.ts +149 -25
  238. package/src/testing/fake-clock.ts +62 -47
  239. package/src/testing/index.ts +5 -2
  240. package/src/testing/node/duplex-connection.ts +3 -2
  241. package/src/testing/node/index.ts +2 -2
  242. package/src/testing/node/message-port-pair.ts +40 -0
  243. package/src/testing/wait-for.ts +38 -11
  244. package/src/transfer-diagnostic.ts +40 -0
  245. package/src/transfer-document.ts +87 -34
  246. package/src/util.ts +33 -0
  247. package/lib/model-service/args.d.ts +0 -64
  248. package/lib/model-service/args.d.ts.map +0 -1
  249. package/lib/model-service/args.js.map +0 -1
  250. package/src/model-service/args.ts +0 -67
@@ -12,8 +12,14 @@
12
12
  * language identifier — consumers parameterise the document/root types
13
13
  * over `TRoot`.
14
14
  */
15
- import type { TransferClientArgs } from './model-service/args';
16
15
  import type { ReferenceCandidate } from './model-service/reference-candidate';
16
+ /** Identifies a client-document binding. */
17
+ export interface TransferClientArgs {
18
+ /** Document URI. */
19
+ uri: string;
20
+ /** Stable identifier for the client invoking the operation. */
21
+ clientId: string;
22
+ }
17
23
  /** Open a document on behalf of a client. */
18
24
  export interface OpenModelArgs extends TransferClientArgs {
19
25
  /**
@@ -35,19 +41,43 @@ export interface OpenModelArgs extends TransferClientArgs {
35
41
  * means read from the filesystem, which is the normal case.
36
42
  *
37
43
  * Honoured only on the first open of a URI: opening an already-open document
38
- * is a no-op, so passing `text` for one silently changes nothing. Write
39
- * through the update path instead.
44
+ * attaches the caller to the existing shared entry and does not replace its
45
+ * content with this seed. Write through the update path instead. The open
46
+ * response reads the current shared content after registration; a textual
47
+ * `didOpen` attach may separately refresh the build.
40
48
  */
41
49
  text?: string;
50
+ /**
51
+ * Kept on the server for this client's open until it closes, for the
52
+ * server's own open path to read. Only a client session's open keeps them,
53
+ * and a repeat open keeps the first open's.
54
+ */
55
+ options?: object;
42
56
  }
43
57
  /** Close a previously-opened document for the client. */
44
58
  export interface CloseModelArgs extends TransferClientArgs {
45
59
  }
46
60
  export interface TransferUpdatedEvent<TDocument> {
47
61
  document: TDocument;
62
+ /**
63
+ * The client whose write this event echoes: the author of the version on a
64
+ * `'changed'`, and the unknown-client id on a `'rebuilt'`, which echoes no
65
+ * write. A recipient compares it against its own id to recognise its echo.
66
+ */
48
67
  sourceClientId: string;
49
- /** See `ModelDocumentUpdateReason` in `./data/events` for the canonical reason set + semantics. */
50
- reason: 'changed' | 'deleted' | 'rebuilt' | 'saved';
68
+ /** See `TransferDocumentUpdateReason` in `./data/events` for the canonical reason set + semantics. */
69
+ reason: 'changed' | 'rebuilt' | 'saved';
70
+ /**
71
+ * The client whose write caused the build that produced this event, or the
72
+ * unknown-client id when no single client's did. On a `'changed'` it is the
73
+ * version's author. A `'rebuilt'` names the writer of another document, so
74
+ * it is a cause, never an echo: its diagnostics and references are new to
75
+ * that writer too.
76
+ *
77
+ * In-process only: the data head does not send it, and an event built
78
+ * elsewhere may leave it out, which a reader takes as "not known".
79
+ */
80
+ causedBy?: string;
51
81
  }
52
82
  export interface TransferSavedEvent<TDocument> {
53
83
  /** The document as persisted — the state that reached disk, not the state at request time. */
@@ -114,10 +144,10 @@ export declare function isElementSource(object: unknown): object is ElementSourc
114
144
  /** An element of a document that does not yet exist on disk — used during element creation flows. */
115
145
  export interface SyntheticSource {
116
146
  /**
117
- * The document the element would belong to. That document must already be
118
- * LOADED — the default resolution takes its parse root as the synthetic
119
- * node's container and answers `undefined` when it is not, so a URI for a
120
- * file that exists on disk but was never opened resolves to nothing.
147
+ * The document the element would belong to. It need not be loaded, or
148
+ * exist — an unloaded URI materialises a transient empty document, so a
149
+ * folder is a valid anchor. A URI that IS loaded contributes that
150
+ * document's parse root as the container, putting its contents in scope.
121
151
  */
122
152
  uri: string;
123
153
  /**
@@ -126,6 +156,16 @@ export interface SyntheticSource {
126
156
  * it is what scoping filters candidates against.
127
157
  */
128
158
  type: string;
159
+ /**
160
+ * The grammar the element will belong to, as a language id.
161
+ *
162
+ * Optional because `uri` and `type` each answer on their own when
163
+ * unambiguous. Set it when neither is: a URI naming no file carries no
164
+ * extension to route on, and a `type` two grammars can produce identifies
165
+ * neither. Unset, such a source reaches the server's own policy, which
166
+ * answers the same way for every caller.
167
+ */
168
+ language?: string;
129
169
  }
130
170
  export declare function isSyntheticSource(object: unknown): object is SyntheticSource;
131
171
  /**
@@ -135,7 +175,7 @@ export declare function isSyntheticSource(object: unknown): object is SyntheticS
135
175
  export declare namespace ReferenceSource {
136
176
  function document(uri: string): DocumentSource;
137
177
  function element(name: string, type?: string): ElementSource;
138
- function synthetic(uri: string, type: string): SyntheticSource;
178
+ function synthetic(uri: string, type: string, language?: string): SyntheticSource;
139
179
  }
140
180
  /**
141
181
  * One step in a synthetic navigation path from a {@link ReferenceSource}
@@ -329,9 +369,10 @@ export interface FindNextNameArgs {
329
369
  */
330
370
  uri: string;
331
371
  /**
332
- * The AST `$type` of the element being named. Collisions are only looked for
333
- * among elements of that same type, so the returned name may still be taken
334
- * by an element of another type.
372
+ * The AST `$type` of the element being named. Collisions are looked for
373
+ * among elements of that type and of any subtype of it, so a supertype
374
+ * names a uniqueness scope its concrete types share; the returned name may
375
+ * still be taken by an element outside that hierarchy.
335
376
  */
336
377
  type: string;
337
378
  /**
@@ -348,5 +389,11 @@ export interface FindNextNameArgs {
348
389
  * See {@link NameTier} for what each tier covers.
349
390
  */
350
391
  tier?: NameTier;
392
+ /**
393
+ * The grammar to name under, routed as {@link SyntheticSource.language} —
394
+ * this call builds one. A caller that sets it there must set it here, or
395
+ * candidates and the name it proposes come from different grammars.
396
+ */
397
+ language?: string;
351
398
  }
352
399
  //# sourceMappingURL=model-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-server.d.ts","sourceRoot":"","sources":["../src/model-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAW9E,6CAA6C;AAC7C,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACtD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yDAAyD;AAEzD,MAAM,WAAW,cAAe,SAAQ,kBAAkB;CAAG;AAM7D,MAAM,WAAW,oBAAoB,CAAC,SAAS;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IAC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,EAAE,MAAM,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClG,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAC;CAC7C;AAED,2EAA2E;AAC3E,MAAM,WAAW,0BAA0B;IACxC,KAAK,IAAI,gBAAgB,CAAC;CAC5B;AAED,oGAAoG;AACpG,MAAM,WAAW,0BAA0B;IACxC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,0BAA0B,CAAC;CACnD;AAED,4CAA4C;AAC5C,MAAM,WAAW,0BAA0B;IACxC,KAAK,IAAI,gBAAgB,CAAC;CAC5B;AA8BD,yBAAiB,gBAAgB,CAAC;IAC/B,oEAAoE;IACpE,SAAgB,OAAO,IAAI,oBAAoB,CAAC,0BAA0B,CAAC,CAE1E;CACH;AAED,yBAAiB,gBAAgB,CAAC;IAC/B,6EAA6E;IAC7E,SAAgB,OAAO,IAAI,oBAAoB,CAAC,0BAA0B,CAAC,CAI1E;IAED;;;;;;OAMG;IACH,SAAgB,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAE/F;CACH;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtD,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC9B;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -47,8 +47,10 @@ var ReferenceSource;
47
47
  return { name, type };
48
48
  }
49
49
  ReferenceSource.element = element;
50
- function synthetic(uri, type) {
51
- return { uri, type };
50
+ function synthetic(uri, type, language) {
51
+ // The key is omitted rather than set to `undefined`, so a source built
52
+ // without a language stays deep-equal to the two-argument form.
53
+ return language === undefined ? { uri, type } : { uri, type, language };
52
54
  }
53
55
  ReferenceSource.synthetic = synthetic;
54
56
  })(ReferenceSource || (exports.ReferenceSource = ReferenceSource = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"model-server.js","sourceRoot":"","sources":["../src/model-server.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAyGlF,4CAEC;AA4BD,0CAEC;AAmBD,8CASC;AAkED,0CASC;AAyDD,gDAQC;AA7MD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,MAAe;IAC7C,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC;AACtG,CAAC;AA4BD,SAAgB,eAAe,CAAC,MAAe;IAC5C,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC;AACxG,CAAC;AAmBD,SAAgB,iBAAiB,CAAC,MAAe;IAC9C,OAAO,CACJ,CAAC,CAAC,MAAM;QACR,OAAO,MAAM,KAAK,QAAQ;QAC1B,KAAK,IAAI,MAAM;QACf,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;QAC9B,MAAM,IAAI,MAAM;QAChB,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CACjC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,IAAiB,eAAe,CAU/B;AAVD,WAAiB,eAAe;IAC7B,SAAgB,QAAQ,CAAC,GAAW;QACjC,OAAO,EAAE,GAAG,EAAE,CAAC;IAClB,CAAC;IAFe,wBAAQ,WAEvB,CAAA;IACD,SAAgB,OAAO,CAAC,IAAY,EAAE,IAAa;QAChD,OAAO,EAAE,IA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I,EAAE,EAAE,EAAE,CAAC;QACzD,SAAS,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;KAC3D,CAAC;AACL,CAAC;AAED,IAAiB,gBAAgB,CAKhC;AALD,WAAiB,gBAAgB;IAC9B,oEAAoE;IACpE,SAAgB,OAAO;QACpB,OAAO,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAFe,iBAAA,OAAO,UAEtB,CAAA;AACJ,CAAC,EALgB,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QAKhC;AAED,IAAiB,gBAAgB,CAkBhC;AAlBD,WAAiB,gBAAgB;IAC9B,6EAA6E;IAC7E,SAAgB,OAAO;QACpB,OAAO,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACjC,KAAK,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;SACtE,CAAC,CAAC,CAAC;IACP,CAAC;IAJe,iBAAA,OAAO,UAItB,CAAA;IAED;;;;;;OAMG;IACH,SAAgB,IAAI,CAAC,OAAyB,EAAE,SAA6B;QAC1E,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;IACjD,CAAC;IAFe,iBAAA,IAAI,OAEnB,CAAA;AACJ,CAAC,EAlBgB,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QAkBhC"}
@@ -0,0 +1,64 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 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
+ declare const snapshotMarker: unique symbol;
10
+ /**
11
+ * The version of the text a model was parsed from: a snapshot of the store's
12
+ * {@link TextVersion}, not a counter of its own. A document envelope carries
13
+ * it, and it cannot move once the envelope exists.
14
+ *
15
+ * A plain number at runtime, usable anywhere a number is, and it travels the
16
+ * wire as one. The marker exists only so the compiler can tell it apart from a
17
+ * version read off a LIVE document, which is the same number type and is the
18
+ * defect the conflict gate exists to prevent: read at write time it is whatever
19
+ * the server is at now, which is the number the gate is about to compare it
20
+ * against, so the gate passes unconditionally and a concurrent edit is
21
+ * overwritten with nothing logged.
22
+ */
23
+ export type ModelVersion = number & {
24
+ readonly [snapshotMarker]: true;
25
+ };
26
+ /**
27
+ * The store's version of a document's text, which moves with every change of it.
28
+ * Unbranded, so a write refuses it as `baseVersion`: it can name text newer than
29
+ * the caller's model, and a write based on it would pass the gate with older content.
30
+ */
31
+ export type TextVersion = number;
32
+ /**
33
+ * The version a write was authored against, from a snapshot read, or `'any'`: a
34
+ * precondition that always holds, so the write overwrites whatever the server has.
35
+ * `'any'` is a lie for a write authored against a document a read handed over.
36
+ */
37
+ export type BaseVersion = ModelVersion | 'any';
38
+ /** Whether `baseVersion` names a version, and so arms the gate. */
39
+ export declare function isModelVersion(baseVersion: BaseVersion): baseVersion is ModelVersion;
40
+ /**
41
+ * Mark a version as having come from a snapshot read.
42
+ *
43
+ * **For the envelope constructors, not for callers.** Every door that builds a
44
+ * document envelope applies it on the way in, so anything a read returns
45
+ * already carries it and a writer never needs this. A caller reaching for it is
46
+ * asserting a provenance the compiler was about to deny — the read-late defect
47
+ * written out where a reviewer can see it.
48
+ */
49
+ export declare function asModelVersion(version: number): ModelVersion;
50
+ /**
51
+ * The model version of a root no document factory path built, so nothing
52
+ * records the text it came from. No write matches it, so a write based on it
53
+ * conflicts.
54
+ */
55
+ export declare const UNRECORDED_VERSION: ModelVersion;
56
+ /**
57
+ * The model version of a root parsed from text the store holds under no
58
+ * version: the file, read while the store held the document open with other
59
+ * text. Below every text version, so the model reads as behind and a write
60
+ * based on it conflicts.
61
+ */
62
+ export declare const STALE_VERSION: ModelVersion;
63
+ export {};
64
+ //# sourceMappingURL=base-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-version.d.ts","sourceRoot":"","sources":["../../src/model-service/base-version.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,CAAC,MAAM,cAAc,EAAE,OAAO,MAAM,CAAC;AAE5C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,KAAK,CAAC;AAE/C,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,IAAI,YAAY,CAEpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAE5D;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,YAAiC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,YAAiC,CAAC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.STALE_VERSION = exports.UNRECORDED_VERSION = void 0;
12
+ exports.isModelVersion = isModelVersion;
13
+ exports.asModelVersion = asModelVersion;
14
+ /** Whether `baseVersion` names a version, and so arms the gate. */
15
+ function isModelVersion(baseVersion) {
16
+ return typeof baseVersion === 'number';
17
+ }
18
+ /**
19
+ * Mark a version as having come from a snapshot read.
20
+ *
21
+ * **For the envelope constructors, not for callers.** Every door that builds a
22
+ * document envelope applies it on the way in, so anything a read returns
23
+ * already carries it and a writer never needs this. A caller reaching for it is
24
+ * asserting a provenance the compiler was about to deny — the read-late defect
25
+ * written out where a reviewer can see it.
26
+ */
27
+ function asModelVersion(version) {
28
+ return version;
29
+ }
30
+ /**
31
+ * The model version of a root no document factory path built, so nothing
32
+ * records the text it came from. No write matches it, so a write based on it
33
+ * conflicts.
34
+ */
35
+ exports.UNRECORDED_VERSION = asModelVersion(-2);
36
+ /**
37
+ * The model version of a root parsed from text the store holds under no
38
+ * version: the file, read while the store held the document open with other
39
+ * text. Below every text version, so the model reads as behind and a write
40
+ * based on it conflicts.
41
+ */
42
+ exports.STALE_VERSION = asModelVersion(-1);
43
+ //# sourceMappingURL=base-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-version.js","sourceRoot":"","sources":["../../src/model-service/base-version.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;AAiClF,mEAAmE;AACnE,wBAA+B,WAAwB;IACpD,OAAO,OAAO,WAAW,KAAK,QAAQ,CAAC;AAC1C,CAAC;AAED;;;;;;;;GAQG;AACH,wBAA+B,OAAe;IAC3C,OAAO,OAAuB,CAAC;AAClC,CAAC;AAED;;;;GAIG;AACU,QAAA,kBAAkB,GAAiB,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE;;;;;GAKG;AACU,QAAA,aAAa,GAAiB,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -6,6 +6,6 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- export * from './args';
9
+ export * from './base-version';
10
10
  export * from './reference-candidate';
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model-service/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAOlF,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model-service/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAMlF,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
@@ -22,10 +22,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
22
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- // Subpath barrel for the in-process `ModelService` facade contract. The
26
- // implementation lives in `@hydranium/core`; this package owns the
27
- // argument types so both the framework facade and the data-server wire
28
- // protocol can structurally agree on the lifecycle shape.
29
- __exportStar(require("./args"), exports);
25
+ // Generic payload types the data protocol shares with core: the base
26
+ // version, which the server's model service checks writes against, and the
27
+ // reference candidates, which core's scope and completion code produce.
28
+ __exportStar(require("./base-version"), exports);
30
29
  __exportStar(require("./reference-candidate"), exports);
31
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model-service/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,wEAAwE;AACxE,mEAAmE;AACnE,uEAAuE;AACvE,0DAA0D;AAE1D,yCAAuB;AACvB,wDAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model-service/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,qEAAqE;AACrE,2EAA2E;AAC3E,wEAAwE;AAExE,iDAA+B;AAC/B,wDAAsC"}
@@ -47,10 +47,12 @@ export interface ReferenceCandidate {
47
47
  * node's subtree, NOT the whole document root — callers that want the full
48
48
  * document fetch it via `getModelDocument(uri)`.
49
49
  *
50
- * Generic over the transfer root type so adopters get their typed overlay.
50
+ * `TElement` is the type of the target node, not of a document root. A server
51
+ * answers with the structural base, since a reference can name any node; a
52
+ * caller that knows what the reference targets may narrow it.
51
53
  */
52
- export interface ReferenceTarget<TTransfer extends TransferElement = TransferElement> extends ReferenceCandidate {
54
+ export interface ReferenceTarget<TElement extends TransferElement = TransferElement> extends ReferenceCandidate {
53
55
  /** The resolved target node, encoded as a transfer subtree. */
54
- element: TTransfer;
56
+ element: TElement;
55
57
  }
56
58
  //# sourceMappingURL=reference-candidate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference-candidate.d.ts","sourceRoot":"","sources":["../../src/model-service/reference-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IAChC,4DAA4D;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe,CAAC,SAAS,SAAS,eAAe,GAAG,eAAe,CAAE,SAAQ,kBAAkB;IAC7G,+DAA+D;IAC/D,OAAO,EAAE,SAAS,CAAC;CACrB"}
1
+ {"version":3,"file":"reference-candidate.d.ts","sourceRoot":"","sources":["../../src/model-service/reference-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IAChC,4DAA4D;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,eAAe,GAAG,eAAe,CAAE,SAAQ,kBAAkB;IAC5G,+DAA+D;IAC/D,OAAO,EAAE,QAAQ,CAAC;CACpB"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /********************************************************************************
3
2
  * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
3
  *
@@ -7,5 +6,5 @@
7
6
  *
8
7
  * SPDX-License-Identifier: MIT
9
8
  ********************************************************************************/
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- //# sourceMappingURL=args.js.map
9
+ export * from './process-memory';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAMlF,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ // Subpath barrel for `@hydranium/protocol/node` — the diagnostics helpers that
26
+ // need a Node runtime, kept out of the root barrel so the root stays
27
+ // bundleable for a browser.
28
+ __exportStar(require("./process-memory"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,+EAA+E;AAC/E,qEAAqE;AACrE,4BAA4B;AAE5B,mDAAiC"}
@@ -0,0 +1,66 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Format a one-shot memory snapshot of the CURRENT process (heap, rss, external, V8 limit).
11
+ * Suited to a process that hosts no Langium documents (e.g. a host backend); for the
12
+ * language-server process with document counts, see `formatServerState`.
13
+ */
14
+ export declare function formatProcessMemory(label: string): string;
15
+ /**
16
+ * Compose an absolute artifact file path of the form `<prefix>[-<label>].<ext>` inside
17
+ * {@link directory} (e.g. the workspace folder, so it lands on the persistent volume in cloud and
18
+ * is visible in the file explorer), falling back to the OS temp dir when the directory is missing
19
+ * or does not exist. The {@link prefix} carries the origin-first stem (e.g. `server-cpu`) and, when
20
+ * a non-empty {@link label} is given (a named capture window), it is sanitised (non-word characters
21
+ * → `_`, truncated to 40 chars) and appended as `-<label>`; an empty label yields the bare
22
+ * `<prefix>.<ext>` so the manifest `kind` equals the filename stem. No timestamp — a fresh session
23
+ * directory per run keeps names stable and collision-free. Shared by the heap-snapshot writer and
24
+ * the sampled-profile capture so heap / CPU / allocation artefacts land identically, differing only
25
+ * by extension.
26
+ */
27
+ export declare function snapshotFilePath(directory: string | undefined, label: string, prefix: string, ext: string): string;
28
+ /**
29
+ * Write a V8 heap snapshot of the CURRENT process to {@link directory}, falling back to the OS temp
30
+ * dir when it is missing (see {@link snapshotFilePath}). `v8.writeHeapSnapshot` runs a full GC first and
31
+ * briefly pauses the process; it also transiently inflates RSS while serialising. Returns the
32
+ * absolute file path. The {@link prefix} (default `server-heap`, the origin-first stem) and
33
+ * {@link label} are folded into the name.
34
+ */
35
+ export declare function writeHeapSnapshotToDir(directory: string | undefined, label: string, prefix?: string): string;
36
+ /** A readable role for a process, whether it belongs to the app, and whether exactly one is expected. */
37
+ export interface ProcessRole {
38
+ /** Human-readable role shown in the snapshot. */
39
+ role: string;
40
+ /** Whether this process is part of the application (vs. tooling/debugger), counted in the app total. */
41
+ isApp: boolean;
42
+ /**
43
+ * Set when at most one instance of this role should exist; `formatPodMemory` warns when more than
44
+ * one is found (e.g. a duplicated/ghost language server).
45
+ */
46
+ singletonExpected?: boolean;
47
+ }
48
+ /** Map a raw command line to a {@link ProcessRole}. A head supplies this to label its own processes. */
49
+ export type ProcessClassifier = (cmdline: string) => ProcessRole;
50
+ /** Options for {@link formatPodMemory}. */
51
+ export interface PodMemoryOptions {
52
+ /** Map a process command line to a readable role; lets a head label its own processes. */
53
+ classify?: ProcessClassifier;
54
+ /** Heading for the in-app process group (default `Application`). */
55
+ appLabel?: string;
56
+ }
57
+ /**
58
+ * Format a pod/container-level memory snapshot read from the cgroup this process belongs to
59
+ * (cgroup v2 `memory.current`/`peak`/`max`/`stat`, falling back to cgroup v1). This is the figure
60
+ * the Kubernetes OOM-killer watches — it covers every process in the pod plus page cache and kernel
61
+ * memory, so it is higher than any single `process.memoryUsage().rss`. Also sums per-process RSS so
62
+ * the per-process split is visible. Explains itself when no cgroup memory controller is present
63
+ * (e.g. local dev outside a container).
64
+ */
65
+ export declare function formatPodMemory(options?: PodMemoryOptions): string;
66
+ //# sourceMappingURL=process-memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-memory.d.ts","sourceRoot":"","sources":["../../src/node/process-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAelF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAKlH;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAgB,GAAG,MAAM,CAInH;AA8CD,yGAAyG;AACzG,MAAM,WAAW,WAAW;IACzB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wGAAwG;IACxG,KAAK,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wGAAwG;AACxG,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,WAAW,CAAC;AA2EjE,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC9B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,CA6EtE"}