@fluidframework/container-runtime 1.4.0-121020 → 2.0.0-dev-rc.1.0.0.225277

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 (705) hide show
  1. package/.eslintrc.js +19 -29
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +427 -0
  4. package/README.md +69 -0
  5. package/api-extractor-esm.json +4 -0
  6. package/api-extractor-lint.json +4 -0
  7. package/api-extractor.json +2 -2
  8. package/api-report/container-runtime.api.md +863 -0
  9. package/dist/{batchTracker.js → batchTracker.cjs} +9 -8
  10. package/dist/batchTracker.cjs.map +1 -0
  11. package/dist/batchTracker.d.ts +6 -5
  12. package/dist/batchTracker.d.ts.map +1 -1
  13. package/dist/blobManager.cjs +709 -0
  14. package/dist/blobManager.cjs.map +1 -0
  15. package/dist/blobManager.d.ts +140 -39
  16. package/dist/blobManager.d.ts.map +1 -1
  17. package/dist/connectionTelemetry.cjs +230 -0
  18. package/dist/connectionTelemetry.cjs.map +1 -0
  19. package/dist/connectionTelemetry.d.ts +2 -2
  20. package/dist/connectionTelemetry.d.ts.map +1 -1
  21. package/dist/container-runtime-alpha.d.ts +1690 -0
  22. package/dist/container-runtime-beta.d.ts +250 -0
  23. package/dist/container-runtime-public.d.ts +250 -0
  24. package/dist/container-runtime-untrimmed.d.ts +1805 -0
  25. package/dist/{containerHandleContext.js → containerHandleContext.cjs} +4 -2
  26. package/dist/containerHandleContext.cjs.map +1 -0
  27. package/dist/containerHandleContext.d.ts.map +1 -1
  28. package/dist/containerRuntime.cjs +2535 -0
  29. package/dist/containerRuntime.cjs.map +1 -0
  30. package/dist/containerRuntime.d.ts +458 -256
  31. package/dist/containerRuntime.d.ts.map +1 -1
  32. package/dist/{dataStore.js → dataStore.cjs} +54 -45
  33. package/dist/dataStore.cjs.map +1 -0
  34. package/dist/dataStore.d.ts +2 -2
  35. package/dist/dataStore.d.ts.map +1 -1
  36. package/dist/{dataStoreContext.js → dataStoreContext.cjs} +343 -247
  37. package/dist/dataStoreContext.cjs.map +1 -0
  38. package/dist/dataStoreContext.d.ts +73 -41
  39. package/dist/dataStoreContext.d.ts.map +1 -1
  40. package/dist/{dataStoreContexts.js → dataStoreContexts.cjs} +19 -15
  41. package/dist/dataStoreContexts.cjs.map +1 -0
  42. package/dist/dataStoreContexts.d.ts +1 -1
  43. package/dist/dataStoreContexts.d.ts.map +1 -1
  44. package/dist/{dataStoreRegistry.js → dataStoreRegistry.cjs} +9 -4
  45. package/dist/dataStoreRegistry.cjs.map +1 -0
  46. package/dist/dataStoreRegistry.d.ts +3 -0
  47. package/dist/dataStoreRegistry.d.ts.map +1 -1
  48. package/dist/{dataStores.js → dataStores.cjs} +276 -124
  49. package/dist/dataStores.cjs.map +1 -0
  50. package/dist/dataStores.d.ts +56 -23
  51. package/dist/dataStores.d.ts.map +1 -1
  52. package/dist/deltaManagerProxyBase.cjs +77 -0
  53. package/dist/deltaManagerProxyBase.cjs.map +1 -0
  54. package/dist/deltaManagerProxyBase.d.ts +35 -0
  55. package/dist/deltaManagerProxyBase.d.ts.map +1 -0
  56. package/dist/deltaManagerSummarizerProxy.cjs +42 -0
  57. package/dist/deltaManagerSummarizerProxy.cjs.map +1 -0
  58. package/dist/deltaManagerSummarizerProxy.d.ts +19 -0
  59. package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -0
  60. package/dist/{deltaScheduler.js → deltaScheduler.cjs} +25 -18
  61. package/dist/deltaScheduler.cjs.map +1 -0
  62. package/dist/deltaScheduler.d.ts +8 -6
  63. package/dist/deltaScheduler.d.ts.map +1 -1
  64. package/dist/error.cjs +21 -0
  65. package/dist/error.cjs.map +1 -0
  66. package/dist/error.d.ts +14 -0
  67. package/dist/error.d.ts.map +1 -0
  68. package/dist/gc/garbageCollection.cjs +865 -0
  69. package/dist/gc/garbageCollection.cjs.map +1 -0
  70. package/dist/gc/garbageCollection.d.ts +224 -0
  71. package/dist/gc/garbageCollection.d.ts.map +1 -0
  72. package/dist/gc/gcConfigs.cjs +160 -0
  73. package/dist/gc/gcConfigs.cjs.map +1 -0
  74. package/dist/gc/gcConfigs.d.ts +23 -0
  75. package/dist/gc/gcConfigs.d.ts.map +1 -0
  76. package/dist/gc/gcDefinitions.cjs +96 -0
  77. package/dist/gc/gcDefinitions.cjs.map +1 -0
  78. package/dist/gc/gcDefinitions.d.ts +458 -0
  79. package/dist/gc/gcDefinitions.d.ts.map +1 -0
  80. package/dist/gc/gcHelpers.cjs +235 -0
  81. package/dist/gc/gcHelpers.cjs.map +1 -0
  82. package/dist/gc/gcHelpers.d.ts +71 -0
  83. package/dist/gc/gcHelpers.d.ts.map +1 -0
  84. package/dist/gc/gcReferenceGraphAlgorithm.cjs +49 -0
  85. package/dist/gc/gcReferenceGraphAlgorithm.cjs.map +1 -0
  86. package/dist/gc/gcReferenceGraphAlgorithm.d.ts +16 -0
  87. package/dist/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -0
  88. package/dist/{summarizerTypes.js → gc/gcSummaryDefinitions.cjs} +1 -6
  89. package/dist/gc/gcSummaryDefinitions.cjs.map +1 -0
  90. package/dist/gc/gcSummaryDefinitions.d.ts +52 -0
  91. package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -0
  92. package/dist/gc/gcSummaryStateTracker.cjs +213 -0
  93. package/dist/gc/gcSummaryStateTracker.cjs.map +1 -0
  94. package/dist/gc/gcSummaryStateTracker.d.ts +94 -0
  95. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -0
  96. package/dist/gc/gcTelemetry.cjs +307 -0
  97. package/dist/gc/gcTelemetry.cjs.map +1 -0
  98. package/dist/gc/gcTelemetry.d.ts +99 -0
  99. package/dist/gc/gcTelemetry.d.ts.map +1 -0
  100. package/dist/gc/gcUnreferencedStateTracker.cjs +118 -0
  101. package/dist/gc/gcUnreferencedStateTracker.cjs.map +1 -0
  102. package/dist/gc/gcUnreferencedStateTracker.d.ts +40 -0
  103. package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -0
  104. package/dist/gc/index.cjs +44 -0
  105. package/dist/gc/index.cjs.map +1 -0
  106. package/dist/gc/index.d.ts +13 -0
  107. package/dist/gc/index.d.ts.map +1 -0
  108. package/dist/index.cjs +47 -0
  109. package/dist/index.cjs.map +1 -0
  110. package/dist/index.d.ts +19 -8
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/messageTypes.cjs +37 -0
  113. package/dist/messageTypes.cjs.map +1 -0
  114. package/dist/messageTypes.d.ts +142 -0
  115. package/dist/messageTypes.d.ts.map +1 -0
  116. package/dist/metadata.cjs +7 -0
  117. package/dist/metadata.cjs.map +1 -0
  118. package/dist/metadata.d.ts +24 -0
  119. package/dist/metadata.d.ts.map +1 -0
  120. package/dist/opLifecycle/batchManager.cjs +139 -0
  121. package/dist/opLifecycle/batchManager.cjs.map +1 -0
  122. package/dist/opLifecycle/batchManager.d.ts +48 -0
  123. package/dist/opLifecycle/batchManager.d.ts.map +1 -0
  124. package/dist/opLifecycle/definitions.cjs +7 -0
  125. package/dist/opLifecycle/definitions.cjs.map +1 -0
  126. package/dist/opLifecycle/definitions.d.ts +83 -0
  127. package/dist/opLifecycle/definitions.d.ts.map +1 -0
  128. package/dist/opLifecycle/index.cjs +26 -0
  129. package/dist/opLifecycle/index.cjs.map +1 -0
  130. package/dist/opLifecycle/index.d.ts +13 -0
  131. package/dist/opLifecycle/index.d.ts.map +1 -0
  132. package/dist/opLifecycle/opCompressor.cjs +84 -0
  133. package/dist/opLifecycle/opCompressor.cjs.map +1 -0
  134. package/dist/opLifecycle/opCompressor.d.ts +18 -0
  135. package/dist/opLifecycle/opCompressor.d.ts.map +1 -0
  136. package/dist/opLifecycle/opDecompressor.cjs +132 -0
  137. package/dist/opLifecycle/opDecompressor.cjs.map +1 -0
  138. package/dist/opLifecycle/opDecompressor.d.ts +25 -0
  139. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -0
  140. package/dist/opLifecycle/opGroupingManager.cjs +95 -0
  141. package/dist/opLifecycle/opGroupingManager.cjs.map +1 -0
  142. package/dist/opLifecycle/opGroupingManager.d.ts +22 -0
  143. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -0
  144. package/dist/opLifecycle/opSplitter.cjs +202 -0
  145. package/dist/opLifecycle/opSplitter.cjs.map +1 -0
  146. package/dist/opLifecycle/opSplitter.d.ts +61 -0
  147. package/dist/opLifecycle/opSplitter.d.ts.map +1 -0
  148. package/dist/opLifecycle/outbox.cjs +326 -0
  149. package/dist/opLifecycle/outbox.cjs.map +1 -0
  150. package/dist/opLifecycle/outbox.d.ts +104 -0
  151. package/dist/opLifecycle/outbox.d.ts.map +1 -0
  152. package/dist/opLifecycle/remoteMessageProcessor.cjs +136 -0
  153. package/dist/opLifecycle/remoteMessageProcessor.cjs.map +1 -0
  154. package/dist/opLifecycle/remoteMessageProcessor.d.ts +47 -0
  155. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -0
  156. package/dist/opProperties.cjs +17 -0
  157. package/dist/opProperties.cjs.map +1 -0
  158. package/dist/opProperties.d.ts +7 -0
  159. package/dist/opProperties.d.ts.map +1 -0
  160. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  161. package/dist/packageVersion.cjs.map +1 -0
  162. package/dist/packageVersion.d.ts +1 -1
  163. package/dist/packageVersion.d.ts.map +1 -1
  164. package/dist/pendingStateManager.cjs +282 -0
  165. package/dist/pendingStateManager.cjs.map +1 -0
  166. package/dist/pendingStateManager.d.ts +32 -69
  167. package/dist/pendingStateManager.d.ts.map +1 -1
  168. package/dist/scheduleManager.cjs +258 -0
  169. package/dist/scheduleManager.cjs.map +1 -0
  170. package/dist/scheduleManager.d.ts +31 -0
  171. package/dist/scheduleManager.d.ts.map +1 -0
  172. package/dist/storageServiceWithAttachBlobs.cjs +32 -0
  173. package/dist/storageServiceWithAttachBlobs.cjs.map +1 -0
  174. package/dist/storageServiceWithAttachBlobs.d.ts +17 -0
  175. package/dist/storageServiceWithAttachBlobs.d.ts.map +1 -0
  176. package/dist/summary/index.cjs +51 -0
  177. package/dist/summary/index.cjs.map +1 -0
  178. package/dist/summary/index.d.ts +17 -0
  179. package/dist/summary/index.d.ts.map +1 -0
  180. package/dist/{orderedClientElection.js → summary/orderedClientElection.cjs} +100 -84
  181. package/dist/summary/orderedClientElection.cjs.map +1 -0
  182. package/{lib → dist/summary}/orderedClientElection.d.ts +41 -18
  183. package/dist/summary/orderedClientElection.d.ts.map +1 -0
  184. package/dist/{runWhileConnectedCoordinator.js → summary/runWhileConnectedCoordinator.cjs} +12 -10
  185. package/dist/summary/runWhileConnectedCoordinator.cjs.map +1 -0
  186. package/{lib → dist/summary}/runWhileConnectedCoordinator.d.ts +8 -2
  187. package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -0
  188. package/dist/summary/runningSummarizer.cjs +679 -0
  189. package/dist/summary/runningSummarizer.cjs.map +1 -0
  190. package/dist/summary/runningSummarizer.d.ts +128 -0
  191. package/dist/summary/runningSummarizer.d.ts.map +1 -0
  192. package/dist/summary/summarizer.cjs +263 -0
  193. package/dist/summary/summarizer.cjs.map +1 -0
  194. package/dist/{summarizer.d.ts → summary/summarizer.d.ts} +18 -33
  195. package/dist/summary/summarizer.d.ts.map +1 -0
  196. package/dist/{summarizerClientElection.js → summary/summarizerClientElection.cjs} +15 -46
  197. package/dist/summary/summarizerClientElection.cjs.map +1 -0
  198. package/{lib → dist/summary}/summarizerClientElection.d.ts +4 -4
  199. package/dist/summary/summarizerClientElection.d.ts.map +1 -0
  200. package/dist/summary/summarizerHeuristics.cjs +156 -0
  201. package/dist/summary/summarizerHeuristics.cjs.map +1 -0
  202. package/{lib → dist/summary}/summarizerHeuristics.d.ts +28 -6
  203. package/dist/summary/summarizerHeuristics.d.ts.map +1 -0
  204. package/dist/summary/summarizerNode/index.cjs +12 -0
  205. package/dist/summary/summarizerNode/index.cjs.map +1 -0
  206. package/dist/summary/summarizerNode/index.d.ts +8 -0
  207. package/dist/summary/summarizerNode/index.d.ts.map +1 -0
  208. package/dist/summary/summarizerNode/summarizerNode.cjs +526 -0
  209. package/dist/summary/summarizerNode/summarizerNode.cjs.map +1 -0
  210. package/dist/summary/summarizerNode/summarizerNode.d.ts +167 -0
  211. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
  212. package/dist/summary/summarizerNode/summarizerNodeUtils.cjs +130 -0
  213. package/dist/summary/summarizerNode/summarizerNodeUtils.cjs.map +1 -0
  214. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +121 -0
  215. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
  216. package/dist/summary/summarizerNode/summarizerNodeWithGc.cjs +375 -0
  217. package/dist/summary/summarizerNode/summarizerNodeWithGc.cjs.map +1 -0
  218. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +153 -0
  219. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
  220. package/dist/summary/summarizerTypes.cjs +7 -0
  221. package/dist/summary/summarizerTypes.cjs.map +1 -0
  222. package/{lib → dist/summary}/summarizerTypes.d.ts +233 -83
  223. package/dist/summary/summarizerTypes.d.ts.map +1 -0
  224. package/dist/{summaryCollection.js → summary/summaryCollection.cjs} +80 -49
  225. package/dist/summary/summaryCollection.cjs.map +1 -0
  226. package/dist/{summaryCollection.d.ts → summary/summaryCollection.d.ts} +23 -5
  227. package/dist/summary/summaryCollection.d.ts.map +1 -0
  228. package/dist/{summaryFormat.js → summary/summaryFormat.cjs} +29 -26
  229. package/dist/summary/summaryFormat.cjs.map +1 -0
  230. package/{lib → dist/summary}/summaryFormat.d.ts +25 -30
  231. package/dist/summary/summaryFormat.d.ts.map +1 -0
  232. package/dist/{summaryGenerator.js → summary/summaryGenerator.cjs} +162 -74
  233. package/dist/summary/summaryGenerator.cjs.map +1 -0
  234. package/dist/{summaryGenerator.d.ts → summary/summaryGenerator.d.ts} +53 -11
  235. package/dist/summary/summaryGenerator.d.ts.map +1 -0
  236. package/dist/{summaryManager.js → summary/summaryManager.cjs} +98 -55
  237. package/dist/summary/summaryManager.cjs.map +1 -0
  238. package/{lib → dist/summary}/summaryManager.d.ts +13 -11
  239. package/dist/summary/summaryManager.d.ts.map +1 -0
  240. package/dist/{throttler.js → throttler.cjs} +21 -21
  241. package/dist/throttler.cjs.map +1 -0
  242. package/dist/throttler.d.ts +2 -2
  243. package/dist/throttler.d.ts.map +1 -1
  244. package/dist/tsdoc-metadata.json +11 -0
  245. package/lib/{batchTracker.d.ts → batchTracker.d.mts} +7 -6
  246. package/lib/batchTracker.d.mts.map +1 -0
  247. package/lib/{batchTracker.js → batchTracker.mjs} +9 -8
  248. package/lib/batchTracker.mjs.map +1 -0
  249. package/lib/blobManager.d.mts +196 -0
  250. package/lib/blobManager.d.mts.map +1 -0
  251. package/lib/blobManager.mjs +704 -0
  252. package/lib/blobManager.mjs.map +1 -0
  253. package/lib/{connectionTelemetry.d.ts → connectionTelemetry.d.mts} +3 -3
  254. package/lib/connectionTelemetry.d.mts.map +1 -0
  255. package/lib/connectionTelemetry.mjs +226 -0
  256. package/lib/connectionTelemetry.mjs.map +1 -0
  257. package/lib/container-runtime-alpha.d.mts +1690 -0
  258. package/lib/container-runtime-beta.d.mts +250 -0
  259. package/lib/container-runtime-public.d.mts +250 -0
  260. package/lib/container-runtime-untrimmed.d.mts +1805 -0
  261. package/lib/{containerHandleContext.d.ts → containerHandleContext.d.mts} +2 -2
  262. package/lib/containerHandleContext.d.mts.map +1 -0
  263. package/lib/{containerHandleContext.js → containerHandleContext.mjs} +4 -2
  264. package/lib/containerHandleContext.mjs.map +1 -0
  265. package/lib/containerRuntime.d.mts +813 -0
  266. package/lib/containerRuntime.d.mts.map +1 -0
  267. package/lib/containerRuntime.mjs +2530 -0
  268. package/lib/containerRuntime.mjs.map +1 -0
  269. package/lib/{dataStore.d.ts → dataStore.d.mts} +5 -5
  270. package/lib/dataStore.d.mts.map +1 -0
  271. package/lib/{dataStore.js → dataStore.mjs} +52 -43
  272. package/lib/dataStore.mjs.map +1 -0
  273. package/lib/{dataStoreContext.d.ts → dataStoreContext.d.mts} +75 -43
  274. package/lib/dataStoreContext.d.mts.map +1 -0
  275. package/lib/{dataStoreContext.js → dataStoreContext.mjs} +309 -213
  276. package/lib/dataStoreContext.mjs.map +1 -0
  277. package/lib/{dataStoreContexts.d.ts → dataStoreContexts.d.mts} +3 -3
  278. package/lib/dataStoreContexts.d.mts.map +1 -0
  279. package/lib/{dataStoreContexts.js → dataStoreContexts.mjs} +12 -8
  280. package/lib/dataStoreContexts.mjs.map +1 -0
  281. package/lib/{dataStoreRegistry.d.ts → dataStoreRegistry.d.mts} +4 -1
  282. package/lib/dataStoreRegistry.d.mts.map +1 -0
  283. package/lib/{dataStoreRegistry.js → dataStoreRegistry.mjs} +7 -6
  284. package/lib/dataStoreRegistry.mjs.map +1 -0
  285. package/lib/{dataStores.d.ts → dataStores.d.mts} +60 -27
  286. package/lib/dataStores.d.mts.map +1 -0
  287. package/lib/{dataStores.js → dataStores.mjs} +257 -105
  288. package/lib/dataStores.mjs.map +1 -0
  289. package/lib/deltaManagerProxyBase.d.mts +35 -0
  290. package/lib/deltaManagerProxyBase.d.mts.map +1 -0
  291. package/lib/deltaManagerProxyBase.mjs +73 -0
  292. package/lib/deltaManagerProxyBase.mjs.map +1 -0
  293. package/lib/deltaManagerSummarizerProxy.d.mts +19 -0
  294. package/lib/deltaManagerSummarizerProxy.d.mts.map +1 -0
  295. package/lib/deltaManagerSummarizerProxy.mjs +38 -0
  296. package/lib/deltaManagerSummarizerProxy.mjs.map +1 -0
  297. package/lib/{deltaScheduler.d.ts → deltaScheduler.d.mts} +9 -7
  298. package/lib/deltaScheduler.d.mts.map +1 -0
  299. package/lib/{deltaScheduler.js → deltaScheduler.mjs} +22 -15
  300. package/lib/deltaScheduler.mjs.map +1 -0
  301. package/lib/error.d.mts +14 -0
  302. package/lib/error.d.mts.map +1 -0
  303. package/lib/error.mjs +17 -0
  304. package/lib/error.mjs.map +1 -0
  305. package/lib/gc/garbageCollection.d.mts +224 -0
  306. package/lib/gc/garbageCollection.d.mts.map +1 -0
  307. package/lib/gc/garbageCollection.mjs +861 -0
  308. package/lib/gc/garbageCollection.mjs.map +1 -0
  309. package/lib/gc/gcConfigs.d.mts +23 -0
  310. package/lib/gc/gcConfigs.d.mts.map +1 -0
  311. package/lib/gc/gcConfigs.mjs +156 -0
  312. package/lib/gc/gcConfigs.mjs.map +1 -0
  313. package/lib/gc/gcDefinitions.d.mts +458 -0
  314. package/lib/gc/gcDefinitions.d.mts.map +1 -0
  315. package/lib/gc/gcDefinitions.mjs +93 -0
  316. package/lib/gc/gcDefinitions.mjs.map +1 -0
  317. package/lib/gc/gcHelpers.d.mts +71 -0
  318. package/lib/gc/gcHelpers.d.mts.map +1 -0
  319. package/lib/gc/gcHelpers.mjs +222 -0
  320. package/lib/gc/gcHelpers.mjs.map +1 -0
  321. package/lib/gc/gcReferenceGraphAlgorithm.d.mts +16 -0
  322. package/lib/gc/gcReferenceGraphAlgorithm.d.mts.map +1 -0
  323. package/lib/gc/gcReferenceGraphAlgorithm.mjs +45 -0
  324. package/lib/gc/gcReferenceGraphAlgorithm.mjs.map +1 -0
  325. package/lib/gc/gcSummaryDefinitions.d.mts +52 -0
  326. package/lib/gc/gcSummaryDefinitions.d.mts.map +1 -0
  327. package/lib/gc/gcSummaryDefinitions.mjs +6 -0
  328. package/lib/gc/gcSummaryDefinitions.mjs.map +1 -0
  329. package/lib/gc/gcSummaryStateTracker.d.mts +94 -0
  330. package/lib/gc/gcSummaryStateTracker.d.mts.map +1 -0
  331. package/lib/gc/gcSummaryStateTracker.mjs +209 -0
  332. package/lib/gc/gcSummaryStateTracker.mjs.map +1 -0
  333. package/lib/gc/gcTelemetry.d.mts +99 -0
  334. package/lib/gc/gcTelemetry.d.mts.map +1 -0
  335. package/lib/gc/gcTelemetry.mjs +302 -0
  336. package/lib/gc/gcTelemetry.mjs.map +1 -0
  337. package/lib/gc/gcUnreferencedStateTracker.d.mts +40 -0
  338. package/lib/gc/gcUnreferencedStateTracker.d.mts.map +1 -0
  339. package/lib/gc/gcUnreferencedStateTracker.mjs +114 -0
  340. package/lib/gc/gcUnreferencedStateTracker.mjs.map +1 -0
  341. package/lib/gc/index.d.mts +13 -0
  342. package/lib/gc/index.d.mts.map +1 -0
  343. package/lib/gc/index.mjs +12 -0
  344. package/lib/gc/index.mjs.map +1 -0
  345. package/lib/index.d.mts +25 -0
  346. package/lib/index.d.mts.map +1 -0
  347. package/lib/index.mjs +24 -0
  348. package/lib/index.mjs.map +1 -0
  349. package/lib/messageTypes.d.mts +142 -0
  350. package/lib/messageTypes.d.mts.map +1 -0
  351. package/lib/messageTypes.mjs +34 -0
  352. package/lib/messageTypes.mjs.map +1 -0
  353. package/lib/metadata.d.mts +24 -0
  354. package/lib/metadata.d.mts.map +1 -0
  355. package/lib/metadata.mjs +6 -0
  356. package/lib/metadata.mjs.map +1 -0
  357. package/lib/opLifecycle/batchManager.d.mts +48 -0
  358. package/lib/opLifecycle/batchManager.d.mts.map +1 -0
  359. package/lib/opLifecycle/batchManager.mjs +133 -0
  360. package/lib/opLifecycle/batchManager.mjs.map +1 -0
  361. package/lib/opLifecycle/definitions.d.mts +83 -0
  362. package/lib/opLifecycle/definitions.d.mts.map +1 -0
  363. package/lib/opLifecycle/definitions.mjs +6 -0
  364. package/lib/opLifecycle/definitions.mjs.map +1 -0
  365. package/lib/opLifecycle/index.d.mts +13 -0
  366. package/lib/opLifecycle/index.d.mts.map +1 -0
  367. package/lib/opLifecycle/index.mjs +12 -0
  368. package/lib/opLifecycle/index.mjs.map +1 -0
  369. package/lib/opLifecycle/opCompressor.d.mts +18 -0
  370. package/lib/opLifecycle/opCompressor.d.mts.map +1 -0
  371. package/lib/opLifecycle/opCompressor.mjs +80 -0
  372. package/lib/opLifecycle/opCompressor.mjs.map +1 -0
  373. package/lib/opLifecycle/opDecompressor.d.mts +25 -0
  374. package/lib/opLifecycle/opDecompressor.d.mts.map +1 -0
  375. package/lib/opLifecycle/opDecompressor.mjs +128 -0
  376. package/lib/opLifecycle/opDecompressor.mjs.map +1 -0
  377. package/lib/opLifecycle/opGroupingManager.d.mts +22 -0
  378. package/lib/opLifecycle/opGroupingManager.d.mts.map +1 -0
  379. package/lib/opLifecycle/opGroupingManager.mjs +91 -0
  380. package/lib/opLifecycle/opGroupingManager.mjs.map +1 -0
  381. package/lib/opLifecycle/opSplitter.d.mts +61 -0
  382. package/lib/opLifecycle/opSplitter.d.mts.map +1 -0
  383. package/lib/opLifecycle/opSplitter.mjs +197 -0
  384. package/lib/opLifecycle/opSplitter.mjs.map +1 -0
  385. package/lib/opLifecycle/outbox.d.mts +104 -0
  386. package/lib/opLifecycle/outbox.d.mts.map +1 -0
  387. package/lib/opLifecycle/outbox.mjs +321 -0
  388. package/lib/opLifecycle/outbox.mjs.map +1 -0
  389. package/lib/opLifecycle/remoteMessageProcessor.d.mts +47 -0
  390. package/lib/opLifecycle/remoteMessageProcessor.d.mts.map +1 -0
  391. package/lib/opLifecycle/remoteMessageProcessor.mjs +131 -0
  392. package/lib/opLifecycle/remoteMessageProcessor.mjs.map +1 -0
  393. package/lib/opProperties.d.mts +7 -0
  394. package/lib/opProperties.d.mts.map +1 -0
  395. package/lib/opProperties.mjs +13 -0
  396. package/lib/opProperties.mjs.map +1 -0
  397. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
  398. package/lib/packageVersion.d.mts.map +1 -0
  399. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  400. package/lib/packageVersion.mjs.map +1 -0
  401. package/lib/{pendingStateManager.d.ts → pendingStateManager.d.mts} +33 -70
  402. package/lib/pendingStateManager.d.mts.map +1 -0
  403. package/lib/pendingStateManager.mjs +275 -0
  404. package/lib/pendingStateManager.mjs.map +1 -0
  405. package/lib/scheduleManager.d.mts +27 -0
  406. package/lib/scheduleManager.d.mts.map +1 -0
  407. package/lib/scheduleManager.mjs +254 -0
  408. package/lib/scheduleManager.mjs.map +1 -0
  409. package/lib/storageServiceWithAttachBlobs.d.mts +17 -0
  410. package/lib/storageServiceWithAttachBlobs.d.mts.map +1 -0
  411. package/lib/storageServiceWithAttachBlobs.mjs +28 -0
  412. package/lib/storageServiceWithAttachBlobs.mjs.map +1 -0
  413. package/lib/summary/index.d.mts +17 -0
  414. package/lib/summary/index.d.mts.map +1 -0
  415. package/lib/summary/index.mjs +16 -0
  416. package/lib/summary/index.mjs.map +1 -0
  417. package/{dist/orderedClientElection.d.ts → lib/summary/orderedClientElection.d.mts} +42 -23
  418. package/lib/summary/orderedClientElection.d.mts.map +1 -0
  419. package/lib/{orderedClientElection.js → summary/orderedClientElection.mjs} +95 -79
  420. package/lib/summary/orderedClientElection.mjs.map +1 -0
  421. package/{dist/runWhileConnectedCoordinator.d.ts → lib/summary/runWhileConnectedCoordinator.d.mts} +10 -4
  422. package/lib/summary/runWhileConnectedCoordinator.d.mts.map +1 -0
  423. package/lib/{runWhileConnectedCoordinator.js → summary/runWhileConnectedCoordinator.mjs} +12 -10
  424. package/lib/summary/runWhileConnectedCoordinator.mjs.map +1 -0
  425. package/lib/summary/runningSummarizer.d.mts +128 -0
  426. package/lib/summary/runningSummarizer.d.mts.map +1 -0
  427. package/lib/summary/runningSummarizer.mjs +675 -0
  428. package/lib/summary/runningSummarizer.mjs.map +1 -0
  429. package/lib/{summarizer.d.ts → summary/summarizer.d.mts} +21 -36
  430. package/lib/summary/summarizer.d.mts.map +1 -0
  431. package/lib/summary/summarizer.mjs +257 -0
  432. package/lib/summary/summarizer.mjs.map +1 -0
  433. package/{dist/summarizerClientElection.d.ts → lib/summary/summarizerClientElection.d.mts} +7 -7
  434. package/lib/summary/summarizerClientElection.d.mts.map +1 -0
  435. package/lib/{summarizerClientElection.js → summary/summarizerClientElection.mjs} +14 -45
  436. package/lib/summary/summarizerClientElection.mjs.map +1 -0
  437. package/{dist/summarizerHeuristics.d.ts → lib/summary/summarizerHeuristics.d.mts} +30 -8
  438. package/lib/summary/summarizerHeuristics.d.mts.map +1 -0
  439. package/lib/summary/summarizerHeuristics.mjs +151 -0
  440. package/lib/summary/summarizerHeuristics.mjs.map +1 -0
  441. package/lib/summary/summarizerNode/index.d.mts +8 -0
  442. package/lib/summary/summarizerNode/index.d.mts.map +1 -0
  443. package/lib/summary/summarizerNode/index.mjs +7 -0
  444. package/lib/summary/summarizerNode/index.mjs.map +1 -0
  445. package/lib/summary/summarizerNode/summarizerNode.d.mts +167 -0
  446. package/lib/summary/summarizerNode/summarizerNode.d.mts.map +1 -0
  447. package/lib/summary/summarizerNode/summarizerNode.mjs +521 -0
  448. package/lib/summary/summarizerNode/summarizerNode.mjs.map +1 -0
  449. package/lib/summary/summarizerNode/summarizerNodeUtils.d.mts +121 -0
  450. package/lib/summary/summarizerNode/summarizerNodeUtils.d.mts.map +1 -0
  451. package/lib/summary/summarizerNode/summarizerNodeUtils.mjs +123 -0
  452. package/lib/summary/summarizerNode/summarizerNodeUtils.mjs.map +1 -0
  453. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.mts +153 -0
  454. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.mts.map +1 -0
  455. package/lib/summary/summarizerNode/summarizerNodeWithGc.mjs +370 -0
  456. package/lib/summary/summarizerNode/summarizerNodeWithGc.mjs.map +1 -0
  457. package/{dist/summarizerTypes.d.ts → lib/summary/summarizerTypes.d.mts} +235 -85
  458. package/lib/summary/summarizerTypes.d.mts.map +1 -0
  459. package/lib/summary/summarizerTypes.mjs +6 -0
  460. package/lib/summary/summarizerTypes.mjs.map +1 -0
  461. package/lib/{summaryCollection.d.ts → summary/summaryCollection.d.mts} +24 -6
  462. package/lib/summary/summaryCollection.d.mts.map +1 -0
  463. package/lib/{summaryCollection.js → summary/summaryCollection.mjs} +76 -45
  464. package/lib/summary/summaryCollection.mjs.map +1 -0
  465. package/{dist/summaryFormat.d.ts → lib/summary/summaryFormat.d.mts} +26 -31
  466. package/lib/summary/summaryFormat.d.mts.map +1 -0
  467. package/lib/{summaryFormat.js → summary/summaryFormat.mjs} +30 -26
  468. package/lib/summary/summaryFormat.mjs.map +1 -0
  469. package/lib/summary/summaryGenerator.d.mts +127 -0
  470. package/lib/summary/summaryGenerator.d.mts.map +1 -0
  471. package/lib/{summaryGenerator.js → summary/summaryGenerator.mjs} +153 -67
  472. package/lib/summary/summaryGenerator.mjs.map +1 -0
  473. package/{dist/summaryManager.d.ts → lib/summary/summaryManager.d.mts} +16 -14
  474. package/lib/summary/summaryManager.d.mts.map +1 -0
  475. package/lib/{summaryManager.js → summary/summaryManager.mjs} +94 -51
  476. package/lib/summary/summaryManager.mjs.map +1 -0
  477. package/lib/{throttler.d.ts → throttler.d.mts} +3 -3
  478. package/lib/throttler.d.mts.map +1 -0
  479. package/lib/{throttler.js → throttler.mjs} +21 -21
  480. package/lib/throttler.mjs.map +1 -0
  481. package/package.json +199 -71
  482. package/prettier.config.cjs +8 -0
  483. package/src/batchTracker.ts +59 -54
  484. package/src/blobManager.ts +942 -294
  485. package/src/connectionTelemetry.ts +342 -252
  486. package/src/containerHandleContext.ts +27 -29
  487. package/src/containerRuntime.ts +3883 -3143
  488. package/src/dataStore.ts +170 -140
  489. package/src/dataStoreContext.ts +1166 -986
  490. package/src/dataStoreContexts.ts +176 -163
  491. package/src/dataStoreRegistry.ts +29 -21
  492. package/src/dataStores.ts +924 -678
  493. package/src/deltaManagerProxyBase.ts +111 -0
  494. package/src/deltaManagerSummarizerProxy.ts +49 -0
  495. package/src/deltaScheduler.ts +161 -156
  496. package/src/error.ts +21 -0
  497. package/src/gc/garbageCollection.md +106 -0
  498. package/src/gc/garbageCollection.ts +1157 -0
  499. package/src/gc/gcConfigs.ts +224 -0
  500. package/src/gc/gcDefinitions.ts +524 -0
  501. package/src/gc/gcHelpers.ts +284 -0
  502. package/src/gc/gcReferenceGraphAlgorithm.ts +52 -0
  503. package/src/gc/gcSummaryDefinitions.ts +54 -0
  504. package/src/gc/gcSummaryStateTracker.ts +299 -0
  505. package/src/gc/gcTelemetry.ts +433 -0
  506. package/src/gc/gcUnreferencedStateTracker.ts +153 -0
  507. package/src/gc/index.ts +60 -0
  508. package/src/index.ts +101 -74
  509. package/src/messageTypes.ts +238 -0
  510. package/src/metadata.ts +26 -0
  511. package/src/opLifecycle/README.md +321 -0
  512. package/src/opLifecycle/batchManager.ts +179 -0
  513. package/src/opLifecycle/definitions.ts +89 -0
  514. package/src/opLifecycle/index.ts +19 -0
  515. package/src/opLifecycle/opCompressor.ts +99 -0
  516. package/src/opLifecycle/opDecompressor.ts +190 -0
  517. package/src/opLifecycle/opGroupingManager.ts +133 -0
  518. package/src/opLifecycle/opSplitter.ts +279 -0
  519. package/src/opLifecycle/outbox.ts +474 -0
  520. package/src/opLifecycle/remoteMessageProcessor.ts +175 -0
  521. package/src/opProperties.ts +21 -0
  522. package/src/packageVersion.ts +1 -1
  523. package/src/pendingStateManager.ts +396 -465
  524. package/src/scheduleManager.ts +358 -0
  525. package/src/storageServiceWithAttachBlobs.ts +38 -0
  526. package/src/summary/index.ts +109 -0
  527. package/src/summary/orderedClientElection.ts +571 -0
  528. package/src/summary/runWhileConnectedCoordinator.ts +117 -0
  529. package/src/summary/runningSummarizer.ts +920 -0
  530. package/src/summary/summarizer.ts +352 -0
  531. package/src/summary/summarizerClientElection.ts +140 -0
  532. package/src/summary/summarizerHeuristics.ts +227 -0
  533. package/src/summary/summarizerNode/index.ts +12 -0
  534. package/src/summary/summarizerNode/summarizerNode.ts +725 -0
  535. package/src/summary/summarizerNode/summarizerNodeUtils.ts +206 -0
  536. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +571 -0
  537. package/src/summary/summarizerTypes.ts +631 -0
  538. package/src/summary/summaryCollection.ts +474 -0
  539. package/src/summary/summaryFormat.ts +249 -0
  540. package/src/summary/summaryGenerator.ts +539 -0
  541. package/src/summary/summaryManager.ts +452 -0
  542. package/src/throttler.ts +131 -122
  543. package/tsc-multi.test.json +4 -0
  544. package/tsconfig.json +11 -13
  545. package/dist/batchTracker.js.map +0 -1
  546. package/dist/blobManager.js +0 -249
  547. package/dist/blobManager.js.map +0 -1
  548. package/dist/connectionTelemetry.js +0 -178
  549. package/dist/connectionTelemetry.js.map +0 -1
  550. package/dist/containerHandleContext.js.map +0 -1
  551. package/dist/containerRuntime.js +0 -2174
  552. package/dist/containerRuntime.js.map +0 -1
  553. package/dist/dataStore.js.map +0 -1
  554. package/dist/dataStoreContext.js.map +0 -1
  555. package/dist/dataStoreContexts.js.map +0 -1
  556. package/dist/dataStoreRegistry.js.map +0 -1
  557. package/dist/dataStores.js.map +0 -1
  558. package/dist/deltaScheduler.js.map +0 -1
  559. package/dist/garbageCollection.d.ts +0 -319
  560. package/dist/garbageCollection.d.ts.map +0 -1
  561. package/dist/garbageCollection.js +0 -993
  562. package/dist/garbageCollection.js.map +0 -1
  563. package/dist/index.js +0 -33
  564. package/dist/index.js.map +0 -1
  565. package/dist/opTelemetry.d.ts +0 -22
  566. package/dist/opTelemetry.d.ts.map +0 -1
  567. package/dist/opTelemetry.js +0 -60
  568. package/dist/opTelemetry.js.map +0 -1
  569. package/dist/orderedClientElection.d.ts.map +0 -1
  570. package/dist/orderedClientElection.js.map +0 -1
  571. package/dist/packageVersion.js.map +0 -1
  572. package/dist/pendingStateManager.js +0 -346
  573. package/dist/pendingStateManager.js.map +0 -1
  574. package/dist/runWhileConnectedCoordinator.d.ts.map +0 -1
  575. package/dist/runWhileConnectedCoordinator.js.map +0 -1
  576. package/dist/runningSummarizer.d.ts +0 -93
  577. package/dist/runningSummarizer.d.ts.map +0 -1
  578. package/dist/runningSummarizer.js +0 -384
  579. package/dist/runningSummarizer.js.map +0 -1
  580. package/dist/serializedSnapshotStorage.d.ts +0 -58
  581. package/dist/serializedSnapshotStorage.d.ts.map +0 -1
  582. package/dist/serializedSnapshotStorage.js +0 -108
  583. package/dist/serializedSnapshotStorage.js.map +0 -1
  584. package/dist/summarizer.d.ts.map +0 -1
  585. package/dist/summarizer.js +0 -348
  586. package/dist/summarizer.js.map +0 -1
  587. package/dist/summarizerClientElection.d.ts.map +0 -1
  588. package/dist/summarizerClientElection.js.map +0 -1
  589. package/dist/summarizerHandle.d.ts +0 -12
  590. package/dist/summarizerHandle.d.ts.map +0 -1
  591. package/dist/summarizerHandle.js +0 -22
  592. package/dist/summarizerHandle.js.map +0 -1
  593. package/dist/summarizerHeuristics.d.ts.map +0 -1
  594. package/dist/summarizerHeuristics.js +0 -84
  595. package/dist/summarizerHeuristics.js.map +0 -1
  596. package/dist/summarizerTypes.d.ts.map +0 -1
  597. package/dist/summarizerTypes.js.map +0 -1
  598. package/dist/summaryCollection.d.ts.map +0 -1
  599. package/dist/summaryCollection.js.map +0 -1
  600. package/dist/summaryFormat.d.ts.map +0 -1
  601. package/dist/summaryFormat.js.map +0 -1
  602. package/dist/summaryGenerator.d.ts.map +0 -1
  603. package/dist/summaryGenerator.js.map +0 -1
  604. package/dist/summaryManager.d.ts.map +0 -1
  605. package/dist/summaryManager.js.map +0 -1
  606. package/dist/throttler.js.map +0 -1
  607. package/garbageCollection.md +0 -41
  608. package/lib/batchTracker.d.ts.map +0 -1
  609. package/lib/batchTracker.js.map +0 -1
  610. package/lib/blobManager.d.ts +0 -95
  611. package/lib/blobManager.d.ts.map +0 -1
  612. package/lib/blobManager.js +0 -244
  613. package/lib/blobManager.js.map +0 -1
  614. package/lib/connectionTelemetry.d.ts.map +0 -1
  615. package/lib/connectionTelemetry.js +0 -174
  616. package/lib/connectionTelemetry.js.map +0 -1
  617. package/lib/containerHandleContext.d.ts.map +0 -1
  618. package/lib/containerHandleContext.js.map +0 -1
  619. package/lib/containerRuntime.d.ts +0 -615
  620. package/lib/containerRuntime.d.ts.map +0 -1
  621. package/lib/containerRuntime.js +0 -2166
  622. package/lib/containerRuntime.js.map +0 -1
  623. package/lib/dataStore.d.ts.map +0 -1
  624. package/lib/dataStore.js.map +0 -1
  625. package/lib/dataStoreContext.d.ts.map +0 -1
  626. package/lib/dataStoreContext.js.map +0 -1
  627. package/lib/dataStoreContexts.d.ts.map +0 -1
  628. package/lib/dataStoreContexts.js.map +0 -1
  629. package/lib/dataStoreRegistry.d.ts.map +0 -1
  630. package/lib/dataStoreRegistry.js.map +0 -1
  631. package/lib/dataStores.d.ts.map +0 -1
  632. package/lib/dataStores.js.map +0 -1
  633. package/lib/deltaScheduler.d.ts.map +0 -1
  634. package/lib/deltaScheduler.js.map +0 -1
  635. package/lib/garbageCollection.d.ts +0 -319
  636. package/lib/garbageCollection.d.ts.map +0 -1
  637. package/lib/garbageCollection.js +0 -989
  638. package/lib/garbageCollection.js.map +0 -1
  639. package/lib/index.d.ts +0 -14
  640. package/lib/index.d.ts.map +0 -1
  641. package/lib/index.js +0 -13
  642. package/lib/index.js.map +0 -1
  643. package/lib/opTelemetry.d.ts +0 -22
  644. package/lib/opTelemetry.d.ts.map +0 -1
  645. package/lib/opTelemetry.js +0 -56
  646. package/lib/opTelemetry.js.map +0 -1
  647. package/lib/orderedClientElection.d.ts.map +0 -1
  648. package/lib/orderedClientElection.js.map +0 -1
  649. package/lib/packageVersion.d.ts.map +0 -1
  650. package/lib/packageVersion.js.map +0 -1
  651. package/lib/pendingStateManager.d.ts.map +0 -1
  652. package/lib/pendingStateManager.js +0 -339
  653. package/lib/pendingStateManager.js.map +0 -1
  654. package/lib/runWhileConnectedCoordinator.d.ts.map +0 -1
  655. package/lib/runWhileConnectedCoordinator.js.map +0 -1
  656. package/lib/runningSummarizer.d.ts +0 -93
  657. package/lib/runningSummarizer.d.ts.map +0 -1
  658. package/lib/runningSummarizer.js +0 -380
  659. package/lib/runningSummarizer.js.map +0 -1
  660. package/lib/serializedSnapshotStorage.d.ts +0 -58
  661. package/lib/serializedSnapshotStorage.d.ts.map +0 -1
  662. package/lib/serializedSnapshotStorage.js +0 -104
  663. package/lib/serializedSnapshotStorage.js.map +0 -1
  664. package/lib/summarizer.d.ts.map +0 -1
  665. package/lib/summarizer.js +0 -342
  666. package/lib/summarizer.js.map +0 -1
  667. package/lib/summarizerClientElection.d.ts.map +0 -1
  668. package/lib/summarizerClientElection.js.map +0 -1
  669. package/lib/summarizerHandle.d.ts +0 -12
  670. package/lib/summarizerHandle.d.ts.map +0 -1
  671. package/lib/summarizerHandle.js +0 -18
  672. package/lib/summarizerHandle.js.map +0 -1
  673. package/lib/summarizerHeuristics.d.ts.map +0 -1
  674. package/lib/summarizerHeuristics.js +0 -79
  675. package/lib/summarizerHeuristics.js.map +0 -1
  676. package/lib/summarizerTypes.d.ts.map +0 -1
  677. package/lib/summarizerTypes.js +0 -9
  678. package/lib/summarizerTypes.js.map +0 -1
  679. package/lib/summaryCollection.d.ts.map +0 -1
  680. package/lib/summaryCollection.js.map +0 -1
  681. package/lib/summaryFormat.d.ts.map +0 -1
  682. package/lib/summaryFormat.js.map +0 -1
  683. package/lib/summaryGenerator.d.ts +0 -85
  684. package/lib/summaryGenerator.d.ts.map +0 -1
  685. package/lib/summaryGenerator.js.map +0 -1
  686. package/lib/summaryManager.d.ts.map +0 -1
  687. package/lib/summaryManager.js.map +0 -1
  688. package/lib/throttler.d.ts.map +0 -1
  689. package/lib/throttler.js.map +0 -1
  690. package/src/garbageCollection.ts +0 -1434
  691. package/src/opTelemetry.ts +0 -71
  692. package/src/orderedClientElection.ts +0 -511
  693. package/src/runWhileConnectedCoordinator.ts +0 -106
  694. package/src/runningSummarizer.ts +0 -550
  695. package/src/serializedSnapshotStorage.ts +0 -146
  696. package/src/summarizer.ts +0 -438
  697. package/src/summarizerClientElection.ts +0 -161
  698. package/src/summarizerHandle.ts +0 -21
  699. package/src/summarizerHeuristics.ts +0 -108
  700. package/src/summarizerTypes.ts +0 -462
  701. package/src/summaryCollection.ts +0 -406
  702. package/src/summaryFormat.ts +0 -239
  703. package/src/summaryGenerator.ts +0 -427
  704. package/src/summaryManager.ts +0 -368
  705. package/tsconfig.esnext.json +0 -7
@@ -0,0 +1,813 @@
1
+ import { FluidObject, IFluidHandle, IFluidHandleContext, IRequest, IResponse, IProvideFluidHandleContext } from "@fluidframework/core-interfaces";
2
+ import { IAudience, IContainerContext, IDeltaManager, IRuntime, ICriticalContainerError, AttachState, ILoaderOptions, IGetPendingLocalStateProps } from "@fluidframework/container-definitions";
3
+ import { IContainerRuntime, IContainerRuntimeEvents } from "@fluidframework/container-runtime-definitions";
4
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
5
+ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
6
+ import { IDocumentStorageService } from "@fluidframework/driver-definitions";
7
+ import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISignalMessage, ISummaryTree, MessageType } from "@fluidframework/protocol-definitions";
8
+ import { FlushMode, IFluidDataStoreContextDetached, IFluidDataStoreRegistry, IGarbageCollectionData, NamedFluidDataStoreRegistryEntries, ISummaryTreeWithStats, IDataStore, ITelemetryContext } from "@fluidframework/runtime-definitions";
9
+ import type { IIdCompressor, IIdCompressorCore, SerializedIdCompressorWithOngoingSession } from "@fluidframework/id-compressor";
10
+ import { IPendingLocalState } from "./pendingStateManager.mjs";
11
+ import { IBlobManagerLoadInfo, IPendingBlobs } from "./blobManager.mjs";
12
+ import { IContainerRuntimeMetadata, ISerializedElection, SubmitSummaryResult, ISubmitSummaryOptions, ISummarizerInternalsProvider, ISummarizerRuntime, IRefreshSummaryAckOptions, IOnDemandSummarizeOptions, ISummarizeResults, IEnqueueSummarizeOptions, EnqueueSummarizeResult, ISummarizerEvents } from "./summary/index.mjs";
13
+ import { GCNodeType, IGCRuntimeOptions, IGCStats } from "./gc/index.mjs";
14
+ import { IBatch } from "./opLifecycle/index.mjs";
15
+ /**
16
+ * @alpha
17
+ */
18
+ export interface ISummaryBaseConfiguration {
19
+ /**
20
+ * Delay before first attempt to spawn summarizing container.
21
+ */
22
+ initialSummarizerDelayMs: number;
23
+ /**
24
+ * Defines the maximum allowed time to wait for a pending summary ack.
25
+ * The maximum amount of time client will wait for a summarize is the minimum of
26
+ * maxSummarizeAckWaitTime (currently 3 * 60 * 1000) and maxAckWaitTime.
27
+ */
28
+ maxAckWaitTime: number;
29
+ /**
30
+ * Defines the maximum number of Ops in between Summaries that can be
31
+ * allowed before forcibly electing a new summarizer client.
32
+ */
33
+ maxOpsSinceLastSummary: number;
34
+ }
35
+ /**
36
+ * @alpha
37
+ */
38
+ export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfiguration {
39
+ state: "enabled";
40
+ /**
41
+ * Defines the maximum allowed time, since the last received Ack, before running the summary
42
+ * with reason maxTime.
43
+ * For example, say we receive ops one by one just before the idle time is triggered.
44
+ * In this case, we still want to run a summary since it's been a while since the last summary.
45
+ */
46
+ maxTime: number;
47
+ /**
48
+ * Defines the maximum number of Ops, since the last received Ack, that can be allowed
49
+ * before running the summary with reason maxOps.
50
+ */
51
+ maxOps: number;
52
+ /**
53
+ * Defines the minimum number of Ops, since the last received Ack, that can be allowed
54
+ * before running the last summary.
55
+ */
56
+ minOpsForLastSummaryAttempt: number;
57
+ /**
58
+ * Defines the lower boundary for the allowed time in between summarizations.
59
+ * Pairs with maxIdleTime to form a range.
60
+ * For example, if we only receive 1 op, we don't want to have the same idle time as say 100 ops.
61
+ * Based on the boundaries we set in minIdleTime and maxIdleTime, the idle time will change
62
+ * linearly depending on the number of ops we receive.
63
+ */
64
+ minIdleTime: number;
65
+ /**
66
+ * Defines the upper boundary for the allowed time in between summarizations.
67
+ * Pairs with minIdleTime to form a range.
68
+ * For example, if we only receive 1 op, we don't want to have the same idle time as say 100 ops.
69
+ * Based on the boundaries we set in minIdleTime and maxIdleTime, the idle time will change
70
+ * linearly depending on the number of ops we receive.
71
+ */
72
+ maxIdleTime: number;
73
+ /**
74
+ * Runtime op weight to use in heuristic summarizing.
75
+ * This number is a multiplier on the number of runtime ops we process when running summarize heuristics.
76
+ * For example: (multiplier) * (number of runtime ops) = weighted number of runtime ops
77
+ */
78
+ runtimeOpWeight: number;
79
+ /**
80
+ * Non-runtime op weight to use in heuristic summarizing
81
+ * This number is a multiplier on the number of non-runtime ops we process when running summarize heuristics.
82
+ * For example: (multiplier) * (number of non-runtime ops) = weighted number of non-runtime ops
83
+ */
84
+ nonRuntimeOpWeight: number;
85
+ /**
86
+ * Number of ops since last summary needed before a non-runtime op can trigger running summary heuristics.
87
+ *
88
+ * Note: Any runtime ops sent before the threshold is reached will trigger heuristics normally.
89
+ * This threshold ONLY applies to non-runtime ops triggering summaries.
90
+ *
91
+ * For example: Say the threshold is 20. Sending 19 non-runtime ops will not trigger any heuristic checks.
92
+ * Sending the 20th non-runtime op will trigger the heuristic checks for summarizing.
93
+ */
94
+ nonRuntimeHeuristicThreshold?: number;
95
+ }
96
+ /**
97
+ * @alpha
98
+ */
99
+ export interface ISummaryConfigurationDisableSummarizer {
100
+ state: "disabled";
101
+ }
102
+ /**
103
+ * @alpha
104
+ */
105
+ export interface ISummaryConfigurationDisableHeuristics extends ISummaryBaseConfiguration {
106
+ state: "disableHeuristics";
107
+ }
108
+ /**
109
+ * @alpha
110
+ */
111
+ export type ISummaryConfiguration = ISummaryConfigurationDisableSummarizer | ISummaryConfigurationDisableHeuristics | ISummaryConfigurationHeuristics;
112
+ /**
113
+ * @alpha
114
+ */
115
+ export declare const DefaultSummaryConfiguration: ISummaryConfiguration;
116
+ /**
117
+ * @alpha
118
+ */
119
+ export interface ISummaryRuntimeOptions {
120
+ /** Override summary configurations set by the server. */
121
+ summaryConfigOverrides?: ISummaryConfiguration;
122
+ /**
123
+ * Delay before first attempt to spawn summarizing container.
124
+ *
125
+ * @deprecated Use {@link ISummaryRuntimeOptions.summaryConfigOverrides}'s
126
+ * {@link ISummaryBaseConfiguration.initialSummarizerDelayMs} instead.
127
+ */
128
+ initialSummarizerDelayMs?: number;
129
+ }
130
+ /**
131
+ * Options for op compression.
132
+ * @alpha
133
+ */
134
+ export interface ICompressionRuntimeOptions {
135
+ /**
136
+ * The value the batch's content size must exceed for the batch to be compressed.
137
+ * By default the value is 600 * 1024 = 614400 bytes. If the value is set to `Infinity`, compression will be disabled.
138
+ */
139
+ readonly minimumBatchSizeInBytes: number;
140
+ /**
141
+ * The compression algorithm that will be used to compress the op.
142
+ * By default the value is `lz4` which is the only compression algorithm currently supported.
143
+ */
144
+ readonly compressionAlgorithm: CompressionAlgorithms;
145
+ }
146
+ /**
147
+ * Options for container runtime.
148
+ * @alpha
149
+ */
150
+ export interface IContainerRuntimeOptions {
151
+ readonly summaryOptions?: ISummaryRuntimeOptions;
152
+ readonly gcOptions?: IGCRuntimeOptions;
153
+ /**
154
+ * Affects the behavior while loading the runtime when the data verification check which
155
+ * compares the DeltaManager sequence number (obtained from protocol in summary) to the
156
+ * runtime sequence number (obtained from runtime metadata in summary) finds a mismatch.
157
+ * 1. "close" (default) will close the container with an assertion.
158
+ * 2. "log" will log an error event to telemetry, but still continue to load.
159
+ * 3. "bypass" will skip the check entirely. This is not recommended.
160
+ */
161
+ readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
162
+ /**
163
+ * Sets the flush mode for the runtime. In Immediate flush mode the runtime will immediately
164
+ * send all operations to the driver layer, while in TurnBased the operations will be buffered
165
+ * and then sent them as a single batch at the end of the turn.
166
+ * By default, flush mode is TurnBased.
167
+ */
168
+ readonly flushMode?: FlushMode;
169
+ /**
170
+ * Enables the runtime to compress ops. See {@link ICompressionRuntimeOptions}.
171
+ */
172
+ readonly compressionOptions?: ICompressionRuntimeOptions;
173
+ /**
174
+ * If specified, when in FlushMode.TurnBased, if the size of the ops between JS turns exceeds this value,
175
+ * an error will be thrown and the container will close.
176
+ *
177
+ * If unspecified, the limit is 950 * 1024.
178
+ *
179
+ * 'Infinity' will disable any limit.
180
+ *
181
+ * @experimental This config should be driven by the connection with the service and will be moved in the future.
182
+ */
183
+ readonly maxBatchSizeInBytes?: number;
184
+ /**
185
+ * If the op payload needs to be chunked in order to work around the maximum size of the batch, this value represents
186
+ * how large the individual chunks will be. This is only supported when compression is enabled. If after compression, the
187
+ * batch content size exceeds this value, it will be chunked into smaller ops of this exact size.
188
+ *
189
+ * This value is a trade-off between having many small chunks vs fewer larger chunks and by default, the runtime is configured to use
190
+ * 200 * 1024 = 204800 bytes. This default value ensures that no compressed payload's content is able to exceed {@link IContainerRuntimeOptions.maxBatchSizeInBytes}
191
+ * regardless of the overhead of an individual op.
192
+ *
193
+ * Any value of `chunkSizeInBytes` exceeding {@link IContainerRuntimeOptions.maxBatchSizeInBytes} will disable this feature, therefore if a compressed batch's content
194
+ * size exceeds {@link IContainerRuntimeOptions.maxBatchSizeInBytes} after compression, the container will close with an instance of `GenericError` with
195
+ * the `BatchTooLarge` message.
196
+ */
197
+ readonly chunkSizeInBytes?: number;
198
+ /**
199
+ * Enable the IdCompressor in the runtime.
200
+ * @experimental Not ready for use.
201
+ */
202
+ readonly enableRuntimeIdCompressor?: boolean;
203
+ /**
204
+ * If enabled, the runtime will block all attempts to send an op inside the
205
+ * {@link ContainerRuntime#ensureNoDataModelChanges} callback. The callback is used by
206
+ * {@link @fluidframework/shared-object-base#SharedObjectCore} for event handlers so enabling this
207
+ * will disallow modifying DDSes while handling DDS events.
208
+ *
209
+ * By default, the feature is disabled. If enabled from options, the `Fluid.ContainerRuntime.DisableOpReentryCheck`
210
+ * can be used to disable it at runtime.
211
+ */
212
+ readonly enableOpReentryCheck?: boolean;
213
+ /**
214
+ * If enabled, the runtime will group messages within a batch into a single
215
+ * message to be sent to the service.
216
+ * The grouping an ungrouping of such messages is handled by the "OpGroupingManager".
217
+ *
218
+ * By default, the feature is disabled. If enabled from options, the `Fluid.ContainerRuntime.DisableGroupedBatching`
219
+ * flag can be used to disable it at runtime.
220
+ *
221
+ * @experimental Not ready for use.
222
+ */
223
+ readonly enableGroupedBatching?: boolean;
224
+ }
225
+ /**
226
+ * Accepted header keys for requests coming to the runtime.
227
+ * @internal
228
+ */
229
+ export declare enum RuntimeHeaders {
230
+ /** True to wait for a data store to be created and loaded before returning it. */
231
+ wait = "wait",
232
+ /** True if the request is coming from an IFluidHandle. */
233
+ viaHandle = "viaHandle"
234
+ }
235
+ /** True if a tombstoned object should be returned without erroring
236
+ * @alpha
237
+ */
238
+ export declare const AllowTombstoneRequestHeaderKey = "allowTombstone";
239
+ /**
240
+ * [IRRELEVANT IF throwOnInactiveLoad OPTION NOT SET] True if an inactive object should be returned without erroring
241
+ * @internal
242
+ */
243
+ export declare const AllowInactiveRequestHeaderKey = "allowInactive";
244
+ /**
245
+ * Tombstone error responses will have this header set to true
246
+ * @alpha
247
+ */
248
+ export declare const TombstoneResponseHeaderKey = "isTombstoned";
249
+ /**
250
+ * Inactive error responses will have this header set to true
251
+ * @alpha
252
+ */
253
+ export declare const InactiveResponseHeaderKey = "isInactive";
254
+ /**
255
+ * The full set of parsed header data that may be found on Runtime requests
256
+ */
257
+ export interface RuntimeHeaderData {
258
+ wait?: boolean;
259
+ viaHandle?: boolean;
260
+ allowTombstone?: boolean;
261
+ allowInactive?: boolean;
262
+ }
263
+ /** Default values for Runtime Headers */
264
+ export declare const defaultRuntimeHeaderData: Required<RuntimeHeaderData>;
265
+ /**
266
+ * Available compression algorithms for op compression.
267
+ * @alpha
268
+ */
269
+ export declare enum CompressionAlgorithms {
270
+ lz4 = "lz4"
271
+ }
272
+ /**
273
+ * State saved when the container closes, to be given back to a newly
274
+ * instantiated runtime in a new instance of the container, so it can load to the
275
+ * same state
276
+ */
277
+ export interface IPendingRuntimeState {
278
+ /**
279
+ * Pending ops from PendingStateManager
280
+ */
281
+ pending?: IPendingLocalState;
282
+ /**
283
+ * Pending blobs from BlobManager
284
+ */
285
+ pendingAttachmentBlobs?: IPendingBlobs;
286
+ /**
287
+ * Pending idCompressor state
288
+ */
289
+ pendingIdCompressorState?: SerializedIdCompressorWithOngoingSession;
290
+ }
291
+ /** The default time to wait for pending ops to be processed during summarization */
292
+ export declare const defaultPendingOpsWaitTimeoutMs = 1000;
293
+ /** The default time to delay a summarization retry attempt when there are pending ops */
294
+ export declare const defaultPendingOpsRetryDelayMs = 1000;
295
+ /**
296
+ * @deprecated use ContainerRuntimeMessageType instead
297
+ * @internal
298
+ */
299
+ export declare enum RuntimeMessage {
300
+ FluidDataStoreOp = "component",
301
+ Attach = "attach",
302
+ ChunkedOp = "chunkedOp",
303
+ BlobAttach = "blobAttach",
304
+ Rejoin = "rejoin",
305
+ Alias = "alias",
306
+ Operation = "op"
307
+ }
308
+ /**
309
+ * @deprecated please use version in driver-utils
310
+ * @internal
311
+ */
312
+ export declare function isRuntimeMessage(message: ISequencedDocumentMessage): boolean;
313
+ /**
314
+ * Legacy ID for the built-in AgentScheduler. To minimize disruption while removing it, retaining this as a
315
+ * special-case for document dirty state. Ultimately we should have no special-cases from the
316
+ * ContainerRuntime's perspective.
317
+ * @internal
318
+ */
319
+ export declare const agentSchedulerId = "_scheduler";
320
+ export declare function getDeviceSpec(): {
321
+ deviceMemory: any;
322
+ hardwareConcurrency: number;
323
+ } | {
324
+ deviceMemory?: undefined;
325
+ hardwareConcurrency?: undefined;
326
+ };
327
+ /**
328
+ * Older loader doesn't have a submitBatchFn member, this is the older way of submitting a batch.
329
+ * Rather than exposing the submitFn (now deprecated) and IDeltaManager (dangerous to hand out) to the Outbox,
330
+ * we can provide a partially-applied function to keep those items private to the ContainerRuntime.
331
+ */
332
+ export declare const makeLegacySendBatchFn: (submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number, deltaManager: Pick<IDeltaManager<unknown, unknown>, "flush">) => (batch: IBatch) => void;
333
+ /**
334
+ * Represents the runtime of the container. Contains helper functions/state of the container.
335
+ * It will define the store level mappings.
336
+ * @alpha
337
+ */
338
+ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents & ISummarizerEvents> implements IContainerRuntime, IRuntime, ISummarizerRuntime, ISummarizerInternalsProvider, IProvideFluidHandleContext {
339
+ private readonly registry;
340
+ private readonly runtimeOptions;
341
+ private readonly containerScope;
342
+ readonly logger: ITelemetryLoggerExt;
343
+ private readonly _storage;
344
+ private readonly requestHandler?;
345
+ private readonly summaryConfiguration;
346
+ /**
347
+ * Load the stores from a snapshot and returns the runtime.
348
+ * @param params - An object housing the runtime properties:
349
+ * - context - Context of the container.
350
+ * - registryEntries - Mapping from data store types to their corresponding factories.
351
+ * - existing - Pass 'true' if loading from an existing snapshot.
352
+ * - requestHandler - (optional) Request handler for the request() method of the container runtime.
353
+ * Only relevant for back-compat while we remove the request() method and move fully to entryPoint as the main pattern.
354
+ * - runtimeOptions - Additional options to be passed to the runtime
355
+ * - containerScope - runtime services provided with context
356
+ * - containerRuntimeCtor - Constructor to use to create the ContainerRuntime instance.
357
+ * This allows mixin classes to leverage this method to define their own async initializer.
358
+ * - provideEntryPoint - Promise that resolves to an object which will act as entryPoint for the Container.
359
+ * This object should provide all the functionality that the Container is expected to provide to the loader layer.
360
+ */
361
+ static loadRuntime(params: {
362
+ context: IContainerContext;
363
+ registryEntries: NamedFluidDataStoreRegistryEntries;
364
+ existing: boolean;
365
+ runtimeOptions?: IContainerRuntimeOptions;
366
+ containerScope?: FluidObject;
367
+ containerRuntimeCtor?: typeof ContainerRuntime;
368
+ /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
369
+ requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
370
+ provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;
371
+ }): Promise<ContainerRuntime>;
372
+ readonly options: ILoaderOptions;
373
+ private imminentClosure;
374
+ private readonly _getClientId;
375
+ get clientId(): string | undefined;
376
+ readonly clientDetails: IClientDetails;
377
+ get storage(): IDocumentStorageService;
378
+ private readonly submitFn;
379
+ /**
380
+ * Although current IContainerContext guarantees submitBatchFn, it is not available on older loaders.
381
+ */
382
+ private readonly submitBatchFn;
383
+ private readonly submitSummaryFn;
384
+ private readonly submitSignalFn;
385
+ readonly disposeFn: (error?: ICriticalContainerError) => void;
386
+ readonly closeFn: (error?: ICriticalContainerError) => void;
387
+ get flushMode(): FlushMode;
388
+ get scope(): FluidObject;
389
+ get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
390
+ private readonly _getAttachState;
391
+ get attachState(): AttachState;
392
+ idCompressor: (IIdCompressor & IIdCompressorCore) | undefined;
393
+ get IFluidHandleContext(): IFluidHandleContext;
394
+ private readonly handleContext;
395
+ /**
396
+ * This is a proxy to the delta manager provided by the container context (innerDeltaManager). It restricts certain
397
+ * accesses such as sets "read-only" mode for the summarizer client. This is the default delta manager that should
398
+ * be used unless the innerDeltaManager is required.
399
+ */
400
+ readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
401
+ /**
402
+ * The delta manager provided by the container context. By default, using the default delta manager (proxy)
403
+ * should be sufficient. This should be used only if necessary. For example, for validating and propagating connected
404
+ * events which requires access to the actual real only info, this is needed.
405
+ */
406
+ private readonly innerDeltaManager;
407
+ private readonly mc;
408
+ private readonly summarizerClientElection?;
409
+ /**
410
+ * summaryManager will only be created if this client is permitted to spawn a summarizing client
411
+ * It is created only by interactive client, i.e. summarizer client, as well as non-interactive bots
412
+ * do not create it (see SummarizerClientElection.clientDetailsPermitElection() for details)
413
+ */
414
+ private readonly summaryManager?;
415
+ private readonly summaryCollection;
416
+ private readonly summarizerNode;
417
+ private readonly maxConsecutiveReconnects;
418
+ private readonly defaultMaxConsecutiveReconnects;
419
+ private _orderSequentiallyCalls;
420
+ private readonly _flushMode;
421
+ private flushTaskExists;
422
+ private _connected;
423
+ private consecutiveReconnects;
424
+ /**
425
+ * Used to delay transition to "connected" state while we upload
426
+ * attachment blobs that were added while disconnected
427
+ */
428
+ private delayConnectClientId?;
429
+ private ensureNoDataModelChangesCalls;
430
+ /**
431
+ * Tracks the number of detected reentrant ops to report,
432
+ * in order to self-throttle the telemetry events.
433
+ *
434
+ * This should be removed as part of ADO:2322
435
+ */
436
+ private opReentryCallsToReport;
437
+ /**
438
+ * Invokes the given callback and expects that no ops are submitted
439
+ * until execution finishes. If an op is submitted, an error will be raised.
440
+ *
441
+ * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`
442
+ *
443
+ * @param callback - the callback to be invoked
444
+ */
445
+ ensureNoDataModelChanges<T>(callback: () => T): T;
446
+ get connected(): boolean;
447
+ /** clientId of parent (non-summarizing) container that owns summarizer container */
448
+ get summarizerClientId(): string | undefined;
449
+ private _disposed;
450
+ get disposed(): boolean;
451
+ private dirtyContainer;
452
+ private emitDirtyDocumentEvent;
453
+ private readonly enableOpReentryCheck;
454
+ private readonly disableAttachReorder;
455
+ private readonly closeSummarizerDelayMs;
456
+ /**
457
+ * If true, summary generated is validate before uploading it to the server. With single commit summaries,
458
+ * summaries will be accepted once uploaded, so they should be validated before upload. However, this can
459
+ * currently be controlled via a feature flag as its a new functionality.
460
+ */
461
+ private readonly validateSummaryBeforeUpload;
462
+ private readonly defaultTelemetrySignalSampleCount;
463
+ private readonly _perfSignalData;
464
+ /**
465
+ * Summarizer is responsible for coordinating when to send generate and send summaries.
466
+ * It is the main entry point for summary work.
467
+ * It is created only by summarizing container (i.e. one with clientType === "summarizer")
468
+ */
469
+ private readonly _summarizer?;
470
+ private readonly scheduleManager;
471
+ private readonly blobManager;
472
+ private readonly pendingStateManager;
473
+ private readonly outbox;
474
+ private readonly garbageCollector;
475
+ private readonly dataStores;
476
+ private readonly remoteMessageProcessor;
477
+ /** The last message processed at the time of the last summary. */
478
+ private messageAtLastSummary;
479
+ private get summarizer();
480
+ private readonly summariesDisabled;
481
+ private isSummariesDisabled;
482
+ private readonly heuristicsDisabled;
483
+ private isHeuristicsDisabled;
484
+ private readonly maxOpsSinceLastSummary;
485
+ private getMaxOpsSinceLastSummary;
486
+ private readonly initialSummarizerDelayMs;
487
+ private getInitialSummarizerDelayMs;
488
+ private readonly createContainerMetadata;
489
+ /**
490
+ * The summary number of the next summary that will be generated for this container. This is incremented every time
491
+ * a summary is generated.
492
+ */
493
+ private nextSummaryNumber;
494
+ /** If false, loading or using a Tombstoned object should merely log, not fail */
495
+ get gcTombstoneEnforcementAllowed(): boolean;
496
+ /** If true, throw an error when a tombstone data store is used. */
497
+ get gcThrowOnTombstoneUsage(): boolean;
498
+ /**
499
+ * GUID to identify a document in telemetry
500
+ * ! Note: should not be used for anything other than telemetry and is not considered a stable GUID
501
+ */
502
+ private readonly telemetryDocumentId;
503
+ /**
504
+ * If true, the runtime has access to an IdCompressor
505
+ */
506
+ private readonly idCompressorEnabled;
507
+ /**
508
+ * Whether this client is the summarizer client itself (type is summarizerClientType)
509
+ */
510
+ private readonly isSummarizerClient;
511
+ /**
512
+ * The id of the version used to initially load this runtime, or undefined if it's newly created.
513
+ */
514
+ private readonly loadedFromVersionId;
515
+ /***/
516
+ protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>, containerScope: FluidObject, logger: ITelemetryLoggerExt, existing: boolean, blobManagerSnapshot: IBlobManagerLoadInfo, _storage: IDocumentStorageService, idCompressor: (IIdCompressor & IIdCompressorCore) | undefined, provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration);
517
+ /**
518
+ * Initializes the state from the base snapshot this container runtime loaded from.
519
+ */
520
+ private initializeBaseState;
521
+ dispose(error?: Error): void;
522
+ /**
523
+ * Notifies this object about the request made to the container.
524
+ * @param request - Request made to the handler.
525
+ * @deprecated Will be removed in future major release. This method needs to stay private until LTS version of Loader moves to "2.0.0-internal.7.0.0".
526
+ */
527
+ private request;
528
+ /**
529
+ * Resolves URI representing handle
530
+ * @param request - Request made to the handler.
531
+ */
532
+ resolveHandle(request: IRequest): Promise<IResponse>;
533
+ /**
534
+ * {@inheritDoc @fluidframework/container-definitions#IRuntime.getEntryPoint}
535
+ */
536
+ getEntryPoint(): Promise<FluidObject>;
537
+ private readonly entryPoint;
538
+ private internalId;
539
+ private getDataStoreFromRequest;
540
+ /** Adds the container's metadata to the given summary tree. */
541
+ private addMetadataToSummary;
542
+ protected addContainerStateToSummary(summaryTree: ISummaryTreeWithStats, fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext): void;
543
+ private shouldContinueReconnecting;
544
+ private resetReconnectCount;
545
+ private replayPendingStates;
546
+ /**
547
+ * Parse an op's type and actual content from given serialized content
548
+ * ! Note: this format needs to be in-line with what is set in the "ContainerRuntime.submit(...)" method
549
+ */
550
+ private parseLocalOpContent;
551
+ private applyStashedOp;
552
+ setConnectionState(connected: boolean, clientId?: string): void;
553
+ private setConnectionStateCore;
554
+ notifyOpReplay(message: ISequencedDocumentMessage): Promise<void>;
555
+ process(messageArg: ISequencedDocumentMessage, local: boolean): void;
556
+ private _processedClientSequenceNumber;
557
+ /**
558
+ * Direct the message to the correct subsystem for processing, and implement other side effects
559
+ */
560
+ private processCore;
561
+ /**
562
+ * Assuming the given message is also a TypedContainerRuntimeMessage,
563
+ * checks its type and dispatches the message to the appropriate handler in the runtime.
564
+ * Throws a DataProcessingError if the message looks like but doesn't conform to a known TypedContainerRuntimeMessage type.
565
+ */
566
+ private validateAndProcessRuntimeMessage;
567
+ /**
568
+ * Emits the Signal event and update the perf signal data.
569
+ * @param clientSignalSequenceNumber - is the client signal sequence number to be uploaded.
570
+ */
571
+ private sendSignalTelemetryEvent;
572
+ processSignal(message: ISignalMessage, local: boolean): void;
573
+ /**
574
+ * Flush the pending ops manually.
575
+ * This method is expected to be called at the end of a batch.
576
+ */
577
+ private flush;
578
+ orderSequentially<T>(callback: () => T): T;
579
+ /**
580
+ * Returns the aliased data store's entryPoint, given the alias.
581
+ * @param alias - The alias for the data store.
582
+ * @returns The data store's entry point ({@link @fluidframework/core-interfaces#IFluidHandle}) if it exists and is aliased.
583
+ * Returns undefined if no data store has been assigned the given alias.
584
+ */
585
+ getAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;
586
+ createDetachedRootDataStore(pkg: Readonly<string[]>, rootDataStoreId: string): IFluidDataStoreContextDetached;
587
+ createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
588
+ createDataStore(pkg: string | string[]): Promise<IDataStore>;
589
+ /**
590
+ * @deprecated 0.16 Issue #1537, #3631
591
+ */
592
+ _createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
593
+ private canSendOps;
594
+ /**
595
+ * Are we in the middle of batching ops together?
596
+ */
597
+ private currentlyBatching;
598
+ private readonly _quorum;
599
+ getQuorum(): IQuorumClients;
600
+ private readonly _audience;
601
+ getAudience(): IAudience;
602
+ /**
603
+ * Returns true of container is dirty, i.e. there are some pending local changes that
604
+ * either were not sent out to delta stream or were not yet acknowledged.
605
+ */
606
+ get isDirty(): boolean;
607
+ private isContainerMessageDirtyable;
608
+ private createNewSignalEnvelope;
609
+ /**
610
+ * Submits the signal to be sent to other clients.
611
+ * @param type - Type of the signal.
612
+ * @param content - Content of the signal.
613
+ * @param targetClientId - When specified, the signal is only sent to the provided client id.
614
+ */
615
+ submitSignal(type: string, content: any, targetClientId?: string): void;
616
+ /**
617
+ * Submits the signal to be sent to other clients.
618
+ * @param type - Type of the signal.
619
+ * @param content - Content of the signal.
620
+ * @param targetClientId - When specified, the signal is only sent to the provided client id.
621
+ */
622
+ submitDataStoreSignal(address: string, type: string, content: any, targetClientId?: string): void;
623
+ setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
624
+ /**
625
+ * Create a summary. Used when attaching or serializing a detached container.
626
+ *
627
+ * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported
628
+ * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the
629
+ * new storage IDs so requests can be redirected.
630
+ * @param telemetryContext - summary data passed through the layers for telemetry purposes
631
+ */
632
+ createSummary(blobRedirectTable?: Map<string, string>, telemetryContext?: ITelemetryContext): ISummaryTree;
633
+ readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>;
634
+ private summarizeInternal;
635
+ /**
636
+ * Returns a summary of the runtime at the current sequence number.
637
+ */
638
+ summarize(options: {
639
+ /** True to generate the full tree with no handle reuse optimizations; defaults to false */
640
+ fullTree?: boolean;
641
+ /** True to track the state for this summary in the SummarizerNodes; defaults to true */
642
+ trackState?: boolean;
643
+ /** Logger to use for correlated summary events */
644
+ summaryLogger?: ITelemetryLoggerExt;
645
+ /** True to run garbage collection before summarizing; defaults to true */
646
+ runGC?: boolean;
647
+ /** True to generate full GC data */
648
+ fullGC?: boolean;
649
+ /** True to run GC sweep phase after the mark phase */
650
+ runSweep?: boolean;
651
+ }): Promise<ISummaryTreeWithStats>;
652
+ /**
653
+ * Before GC runs, called by the garbage collector to update any pending GC state. This is mainly used to notify
654
+ * the garbage collector of references detected since the last GC run. Most references are notified immediately
655
+ * but there can be some for which async operation is required (such as detecting new root data stores).
656
+ * @see IGarbageCollectionRuntime.updateStateBeforeGC
657
+ */
658
+ updateStateBeforeGC(): Promise<void>;
659
+ private getGCDataInternal;
660
+ /**
661
+ * Generates and returns the GC data for this container.
662
+ * @param fullGC - true to bypass optimizations and force full generation of GC data.
663
+ * @see IGarbageCollectionRuntime.getGCData
664
+ */
665
+ getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
666
+ /**
667
+ * After GC has run, called to notify this container's nodes of routes that are used in it.
668
+ * @param usedRoutes - The routes that are used in all nodes in this Container.
669
+ * @see IGarbageCollectionRuntime.updateUsedRoutes
670
+ */
671
+ updateUsedRoutes(usedRoutes: readonly string[]): void;
672
+ /**
673
+ * This is called to update objects whose routes are unused.
674
+ * @param unusedRoutes - Data store and attachment blob routes that are unused in this Container.
675
+ */
676
+ updateUnusedRoutes(unusedRoutes: readonly string[]): void;
677
+ /**
678
+ * @deprecated Replaced by deleteSweepReadyNodes.
679
+ */
680
+ deleteUnusedNodes(unusedRoutes: readonly string[]): string[];
681
+ /**
682
+ * After GC has run and identified nodes that are sweep ready, this is called to delete the sweep ready nodes.
683
+ * @param sweepReadyRoutes - The routes of nodes that are sweep ready and should be deleted.
684
+ * @returns The routes of nodes that were deleted.
685
+ */
686
+ deleteSweepReadyNodes(sweepReadyRoutes: readonly string[]): readonly string[];
687
+ /**
688
+ * This is called to update objects that are tombstones.
689
+ *
690
+ * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.
691
+ * Tombstoned objects are eventually deleted by GC.
692
+ *
693
+ * @param tombstonedRoutes - Data store and attachment blob routes that are tombstones in this Container.
694
+ */
695
+ updateTombstonedRoutes(tombstonedRoutes: readonly string[]): void;
696
+ /**
697
+ * Returns a server generated referenced timestamp to be used to track unreferenced nodes by GC.
698
+ */
699
+ getCurrentReferenceTimestampMs(): number | undefined;
700
+ /**
701
+ * Returns the type of the GC node. Currently, there are nodes that belong to the root ("/"), data stores or
702
+ * blob manager.
703
+ */
704
+ getNodeType(nodePath: string): GCNodeType;
705
+ /**
706
+ * Called by GC to retrieve the package path of the node with the given path. The node should belong to a
707
+ * data store or an attachment blob.
708
+ */
709
+ getGCNodePackagePath(nodePath: string): Promise<readonly string[] | undefined>;
710
+ /**
711
+ * Returns whether a given path is for attachment blobs that are in the format - "/BlobManager.basePath/...".
712
+ */
713
+ private isBlobPath;
714
+ /**
715
+ * From a given list of routes, separate and return routes that belong to blob manager and data stores.
716
+ * @param routes - A list of routes that can belong to data stores or blob manager.
717
+ * @returns Two route lists - One that contains routes for blob manager and another one that contains routes
718
+ * for data stores.
719
+ */
720
+ private getDataStoreAndBlobManagerRoutes;
721
+ /**
722
+ * Runs garbage collection and updates the reference / used state of the nodes in the container.
723
+ * @returns the statistics of the garbage collection run; undefined if GC did not run.
724
+ */
725
+ collectGarbage(options: {
726
+ /** Logger to use for logging GC events */
727
+ logger?: ITelemetryLoggerExt;
728
+ /** True to run GC sweep phase after the mark phase */
729
+ runSweep?: boolean;
730
+ /** True to generate full GC data */
731
+ fullGC?: boolean;
732
+ }, telemetryContext?: ITelemetryContext): Promise<IGCStats | undefined>;
733
+ /**
734
+ * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
735
+ * all references added in the system.
736
+ * @param srcHandle - The handle of the node that added the reference.
737
+ * @param outboundHandle - The handle of the outbound node that is referenced.
738
+ */
739
+ addedGCOutboundReference(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
740
+ /**
741
+ * Generates the summary tree, uploads it to storage, and then submits the summarize op.
742
+ * This is intended to be called by the summarizer, since it is the implementation of
743
+ * ISummarizerInternalsProvider.submitSummary.
744
+ * It takes care of state management at the container level, including pausing inbound
745
+ * op processing, updating SummarizerNode state tracking, and garbage collection.
746
+ * @param options - options controlling how the summary is generated or submitted
747
+ */
748
+ submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
749
+ /**
750
+ * This helper is called during summarization. If the container is dirty, it will return a failed summarize result
751
+ * (IBaseSummarizeResult) unless this is the final summarize attempt and SkipFailingIncorrectSummary option is set.
752
+ * @param logger - The logger to be used for sending telemetry.
753
+ * @param referenceSequenceNumber - The reference sequence number of the summary attempt.
754
+ * @param minimumSequenceNumber - The minimum sequence number of the summary attempt.
755
+ * @param finalAttempt - Whether this is the final summary attempt.
756
+ * @param beforeSummaryGeneration - Whether this is called before summary generation or after.
757
+ * @returns failed summarize result (IBaseSummarizeResult) if summary should be failed, undefined otherwise.
758
+ */
759
+ private shouldFailSummaryOnPendingOps;
760
+ private get pendingMessagesCount();
761
+ private hasPendingMessages;
762
+ private updateDocumentDirtyState;
763
+ submitDataStoreOp(id: string, contents: any, localOpMetadata?: unknown): void;
764
+ submitDataStoreAliasOp(contents: any, localOpMetadata: unknown): void;
765
+ uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
766
+ private maybeSubmitIdAllocationOp;
767
+ private submit;
768
+ private scheduleFlush;
769
+ private submitSummaryMessage;
770
+ /**
771
+ * Throw an error if the runtime is closed. Methods that are expected to potentially
772
+ * be called after dispose due to asynchrony should not call this.
773
+ */
774
+ private verifyNotClosed;
775
+ private verifyCanSubmitOps;
776
+ private reSubmitBatch;
777
+ private reSubmit;
778
+ /**
779
+ * Finds the right store and asks it to resubmit the message. This typically happens when we
780
+ * reconnect and there are pending messages.
781
+ * ! Note: successfully resubmitting an op that has been successfully sequenced is not possible due to checks in the ConnectionStateHandler (Loader layer)
782
+ * @param message - The original LocalContainerRuntimeMessage.
783
+ * @param localOpMetadata - The local metadata associated with the original message.
784
+ */
785
+ private reSubmitCore;
786
+ private rollback;
787
+ /** Implementation of ISummarizerInternalsProvider.refreshLatestSummaryAck */
788
+ refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
789
+ /**
790
+ * Fetches the latest snapshot from storage to refresh the cache as a performance optimization and closes the
791
+ * summarizer to reload from new state.
792
+ * @param summaryLogger - logger to use when fetching snapshot from storage
793
+ * @returns a generic summarization error
794
+ */
795
+ private prefetchLatestSummaryThenClose;
796
+ private closeStaleSummarizer;
797
+ /**
798
+ * Downloads the latest snapshot from storage.
799
+ * By default, it also closes the container after downloading the snapshot. However, this may be
800
+ * overridden via options.
801
+ */
802
+ private fetchLatestSnapshotFromStorage;
803
+ getPendingLocalState(props?: IGetPendingLocalStateProps): Promise<unknown>;
804
+ summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
805
+ enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
806
+ /**
807
+ * Forms a function that will create and retrieve a Summarizer.
808
+ */
809
+ private formCreateSummarizerFn;
810
+ private validateSummaryHeuristicConfiguration;
811
+ private get groupedBatchingEnabled();
812
+ }
813
+ //# sourceMappingURL=containerRuntime.d.mts.map