@fluidframework/container-runtime 1.4.0-115997 → 2.0.0-dev-rc.1.0.0.224419

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