@fluidframework/container-runtime 2.13.0 → 2.20.0

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 (443) hide show
  1. package/.eslintrc.cjs +36 -0
  2. package/CHANGELOG.md +46 -0
  3. package/api-report/container-runtime.legacy.alpha.api.md +9 -203
  4. package/container-runtime.test-files.tar +0 -0
  5. package/dist/batchTracker.d.ts.map +1 -1
  6. package/dist/batchTracker.js.map +1 -1
  7. package/dist/blobManager/blobManager.d.ts +5 -1
  8. package/dist/blobManager/blobManager.d.ts.map +1 -1
  9. package/dist/blobManager/blobManager.js +16 -2
  10. package/dist/blobManager/blobManager.js.map +1 -1
  11. package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  12. package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
  13. package/dist/channelCollection.d.ts +23 -12
  14. package/dist/channelCollection.d.ts.map +1 -1
  15. package/dist/channelCollection.js +22 -12
  16. package/dist/channelCollection.js.map +1 -1
  17. package/dist/connectionTelemetry.d.ts.map +1 -1
  18. package/dist/connectionTelemetry.js +6 -2
  19. package/dist/connectionTelemetry.js.map +1 -1
  20. package/dist/containerHandleContext.d.ts +1 -1
  21. package/dist/containerHandleContext.d.ts.map +1 -1
  22. package/dist/containerHandleContext.js.map +1 -1
  23. package/dist/containerRuntime.d.ts +74 -65
  24. package/dist/containerRuntime.d.ts.map +1 -1
  25. package/dist/containerRuntime.js +53 -37
  26. package/dist/containerRuntime.js.map +1 -1
  27. package/dist/dataStore.d.ts +7 -3
  28. package/dist/dataStore.d.ts.map +1 -1
  29. package/dist/dataStore.js +2 -1
  30. package/dist/dataStore.js.map +1 -1
  31. package/dist/dataStoreContext.d.ts +41 -25
  32. package/dist/dataStoreContext.d.ts.map +1 -1
  33. package/dist/dataStoreContext.js +31 -18
  34. package/dist/dataStoreContext.js.map +1 -1
  35. package/dist/dataStoreContexts.d.ts +6 -2
  36. package/dist/dataStoreContexts.d.ts.map +1 -1
  37. package/dist/dataStoreContexts.js +6 -2
  38. package/dist/dataStoreContexts.js.map +1 -1
  39. package/dist/dataStoreRegistry.d.ts +1 -1
  40. package/dist/dataStoreRegistry.d.ts.map +1 -1
  41. package/dist/dataStoreRegistry.js.map +1 -1
  42. package/dist/deltaManagerProxies.d.ts +1 -17
  43. package/dist/deltaManagerProxies.d.ts.map +1 -1
  44. package/dist/deltaManagerProxies.js.map +1 -1
  45. package/dist/deltaScheduler.d.ts +9 -6
  46. package/dist/deltaScheduler.d.ts.map +1 -1
  47. package/dist/deltaScheduler.js +95 -89
  48. package/dist/deltaScheduler.js.map +1 -1
  49. package/dist/gc/garbageCollection.d.ts +21 -7
  50. package/dist/gc/garbageCollection.d.ts.map +1 -1
  51. package/dist/gc/garbageCollection.js +12 -5
  52. package/dist/gc/garbageCollection.js.map +1 -1
  53. package/dist/gc/gcConfigs.d.ts +11 -0
  54. package/dist/gc/gcConfigs.d.ts.map +1 -1
  55. package/dist/gc/gcConfigs.js +3 -2
  56. package/dist/gc/gcConfigs.js.map +1 -1
  57. package/dist/gc/gcDefinitions.d.ts +210 -70
  58. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  59. package/dist/gc/gcDefinitions.js +39 -13
  60. package/dist/gc/gcDefinitions.js.map +1 -1
  61. package/dist/gc/gcHelpers.d.ts +6 -2
  62. package/dist/gc/gcHelpers.d.ts.map +1 -1
  63. package/dist/gc/gcHelpers.js +6 -2
  64. package/dist/gc/gcHelpers.js.map +1 -1
  65. package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
  66. package/dist/gc/gcSummaryDefinitions.d.ts +18 -6
  67. package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
  68. package/dist/gc/gcSummaryDefinitions.js.map +1 -1
  69. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  70. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  71. package/dist/gc/gcTelemetry.d.ts +33 -11
  72. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  73. package/dist/gc/gcTelemetry.js +6 -2
  74. package/dist/gc/gcTelemetry.js.map +1 -1
  75. package/dist/gc/gcUnreferencedStateTracker.d.ts +42 -13
  76. package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  77. package/dist/gc/gcUnreferencedStateTracker.js +27 -9
  78. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
  79. package/dist/gc/index.d.ts +1 -0
  80. package/dist/gc/index.d.ts.map +1 -1
  81. package/dist/gc/index.js +3 -1
  82. package/dist/gc/index.js.map +1 -1
  83. package/dist/inboundBatchAggregator.d.ts +34 -0
  84. package/dist/inboundBatchAggregator.d.ts.map +1 -0
  85. package/dist/inboundBatchAggregator.js +185 -0
  86. package/dist/inboundBatchAggregator.js.map +1 -0
  87. package/dist/index.d.ts +1 -1
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js.map +1 -1
  90. package/dist/legacy.d.ts +0 -4
  91. package/dist/messageTypes.d.ts +14 -5
  92. package/dist/messageTypes.d.ts.map +1 -1
  93. package/dist/messageTypes.js.map +1 -1
  94. package/dist/metadata.d.ts +12 -4
  95. package/dist/metadata.d.ts.map +1 -1
  96. package/dist/metadata.js +6 -2
  97. package/dist/metadata.js.map +1 -1
  98. package/dist/opLifecycle/batchManager.d.ts +9 -3
  99. package/dist/opLifecycle/batchManager.d.ts.map +1 -1
  100. package/dist/opLifecycle/batchManager.js +3 -1
  101. package/dist/opLifecycle/batchManager.js.map +1 -1
  102. package/dist/opLifecycle/duplicateBatchDetector.d.ts +9 -3
  103. package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  104. package/dist/opLifecycle/duplicateBatchDetector.js +9 -3
  105. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  106. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  107. package/dist/opLifecycle/opCompressor.js.map +1 -1
  108. package/dist/opLifecycle/opDecompressor.d.ts +3 -1
  109. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  110. package/dist/opLifecycle/opDecompressor.js +12 -7
  111. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  112. package/dist/opLifecycle/opGroupingManager.d.ts +0 -1
  113. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  114. package/dist/opLifecycle/opGroupingManager.js +5 -4
  115. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  116. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  117. package/dist/opLifecycle/opSplitter.js +2 -0
  118. package/dist/opLifecycle/opSplitter.js.map +1 -1
  119. package/dist/opLifecycle/outbox.d.ts +1 -1
  120. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  121. package/dist/opLifecycle/outbox.js +6 -1
  122. package/dist/opLifecycle/outbox.js.map +1 -1
  123. package/dist/opLifecycle/remoteMessageProcessor.d.ts +9 -3
  124. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  125. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  126. package/dist/package.json +2 -1
  127. package/dist/packageVersion.d.ts +1 -1
  128. package/dist/packageVersion.js +1 -1
  129. package/dist/packageVersion.js.map +1 -1
  130. package/dist/pendingStateManager.d.ts +19 -7
  131. package/dist/pendingStateManager.d.ts.map +1 -1
  132. package/dist/pendingStateManager.js +13 -5
  133. package/dist/pendingStateManager.js.map +1 -1
  134. package/dist/summary/documentSchema.d.ts.map +1 -1
  135. package/dist/summary/documentSchema.js +2 -0
  136. package/dist/summary/documentSchema.js.map +1 -1
  137. package/dist/summary/index.d.ts +1 -1
  138. package/dist/summary/index.d.ts.map +1 -1
  139. package/dist/summary/index.js.map +1 -1
  140. package/dist/summary/orderedClientElection.d.ts +93 -31
  141. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  142. package/dist/summary/orderedClientElection.js +15 -5
  143. package/dist/summary/orderedClientElection.js.map +1 -1
  144. package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  145. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
  146. package/dist/summary/runningSummarizer.d.ts +17 -6
  147. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  148. package/dist/summary/runningSummarizer.js +12 -4
  149. package/dist/summary/runningSummarizer.js.map +1 -1
  150. package/dist/summary/summarizer.d.ts +9 -5
  151. package/dist/summary/summarizer.d.ts.map +1 -1
  152. package/dist/summary/summarizer.js +9 -3
  153. package/dist/summary/summarizer.js.map +1 -1
  154. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  155. package/dist/summary/summarizerClientElection.js.map +1 -1
  156. package/dist/summary/summarizerHeuristics.d.ts +6 -2
  157. package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
  158. package/dist/summary/summarizerHeuristics.js +12 -4
  159. package/dist/summary/summarizerHeuristics.js.map +1 -1
  160. package/dist/summary/summarizerNode/summarizerNode.d.ts +24 -8
  161. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  162. package/dist/summary/summarizerNode/summarizerNode.js +15 -5
  163. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  164. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
  165. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  166. package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -1
  167. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  168. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +12 -4
  169. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  170. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +12 -4
  171. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  172. package/dist/summary/summarizerTypes.d.ts +246 -135
  173. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  174. package/dist/summary/summarizerTypes.js.map +1 -1
  175. package/dist/summary/summaryCollection.d.ts.map +1 -1
  176. package/dist/summary/summaryCollection.js +1 -2
  177. package/dist/summary/summaryCollection.js.map +1 -1
  178. package/dist/summary/summaryFormat.d.ts +24 -8
  179. package/dist/summary/summaryFormat.d.ts.map +1 -1
  180. package/dist/summary/summaryFormat.js.map +1 -1
  181. package/dist/summary/summaryGenerator.d.ts +9 -3
  182. package/dist/summary/summaryGenerator.d.ts.map +1 -1
  183. package/dist/summary/summaryGenerator.js +3 -1
  184. package/dist/summary/summaryGenerator.js.map +1 -1
  185. package/dist/summary/summaryManager.d.ts +8 -4
  186. package/dist/summary/summaryManager.d.ts.map +1 -1
  187. package/dist/summary/summaryManager.js +12 -4
  188. package/dist/summary/summaryManager.js.map +1 -1
  189. package/dist/throttler.d.ts +26 -10
  190. package/dist/throttler.d.ts.map +1 -1
  191. package/dist/throttler.js +12 -4
  192. package/dist/throttler.js.map +1 -1
  193. package/lib/batchTracker.d.ts.map +1 -1
  194. package/lib/batchTracker.js.map +1 -1
  195. package/lib/blobManager/blobManager.d.ts +5 -1
  196. package/lib/blobManager/blobManager.d.ts.map +1 -1
  197. package/lib/blobManager/blobManager.js +16 -2
  198. package/lib/blobManager/blobManager.js.map +1 -1
  199. package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  200. package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
  201. package/lib/channelCollection.d.ts +23 -12
  202. package/lib/channelCollection.d.ts.map +1 -1
  203. package/lib/channelCollection.js +22 -12
  204. package/lib/channelCollection.js.map +1 -1
  205. package/lib/connectionTelemetry.d.ts.map +1 -1
  206. package/lib/connectionTelemetry.js +6 -2
  207. package/lib/connectionTelemetry.js.map +1 -1
  208. package/lib/containerHandleContext.d.ts +1 -1
  209. package/lib/containerHandleContext.d.ts.map +1 -1
  210. package/lib/containerHandleContext.js.map +1 -1
  211. package/lib/containerRuntime.d.ts +74 -65
  212. package/lib/containerRuntime.d.ts.map +1 -1
  213. package/lib/containerRuntime.js +53 -37
  214. package/lib/containerRuntime.js.map +1 -1
  215. package/lib/dataStore.d.ts +7 -3
  216. package/lib/dataStore.d.ts.map +1 -1
  217. package/lib/dataStore.js +2 -1
  218. package/lib/dataStore.js.map +1 -1
  219. package/lib/dataStoreContext.d.ts +41 -25
  220. package/lib/dataStoreContext.d.ts.map +1 -1
  221. package/lib/dataStoreContext.js +31 -18
  222. package/lib/dataStoreContext.js.map +1 -1
  223. package/lib/dataStoreContexts.d.ts +6 -2
  224. package/lib/dataStoreContexts.d.ts.map +1 -1
  225. package/lib/dataStoreContexts.js +6 -2
  226. package/lib/dataStoreContexts.js.map +1 -1
  227. package/lib/dataStoreRegistry.d.ts +1 -1
  228. package/lib/dataStoreRegistry.d.ts.map +1 -1
  229. package/lib/dataStoreRegistry.js.map +1 -1
  230. package/lib/deltaManagerProxies.d.ts +1 -17
  231. package/lib/deltaManagerProxies.d.ts.map +1 -1
  232. package/lib/deltaManagerProxies.js.map +1 -1
  233. package/lib/deltaScheduler.d.ts +9 -6
  234. package/lib/deltaScheduler.d.ts.map +1 -1
  235. package/lib/deltaScheduler.js +95 -89
  236. package/lib/deltaScheduler.js.map +1 -1
  237. package/lib/gc/garbageCollection.d.ts +21 -7
  238. package/lib/gc/garbageCollection.d.ts.map +1 -1
  239. package/lib/gc/garbageCollection.js +12 -5
  240. package/lib/gc/garbageCollection.js.map +1 -1
  241. package/lib/gc/gcConfigs.d.ts +11 -0
  242. package/lib/gc/gcConfigs.d.ts.map +1 -1
  243. package/lib/gc/gcConfigs.js +2 -2
  244. package/lib/gc/gcConfigs.js.map +1 -1
  245. package/lib/gc/gcDefinitions.d.ts +210 -70
  246. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  247. package/lib/gc/gcDefinitions.js +39 -13
  248. package/lib/gc/gcDefinitions.js.map +1 -1
  249. package/lib/gc/gcHelpers.d.ts +6 -2
  250. package/lib/gc/gcHelpers.d.ts.map +1 -1
  251. package/lib/gc/gcHelpers.js +6 -2
  252. package/lib/gc/gcHelpers.js.map +1 -1
  253. package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
  254. package/lib/gc/gcSummaryDefinitions.d.ts +18 -6
  255. package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
  256. package/lib/gc/gcSummaryDefinitions.js.map +1 -1
  257. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  258. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  259. package/lib/gc/gcTelemetry.d.ts +33 -11
  260. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  261. package/lib/gc/gcTelemetry.js +6 -2
  262. package/lib/gc/gcTelemetry.js.map +1 -1
  263. package/lib/gc/gcUnreferencedStateTracker.d.ts +42 -13
  264. package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  265. package/lib/gc/gcUnreferencedStateTracker.js +27 -9
  266. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
  267. package/lib/gc/index.d.ts +1 -0
  268. package/lib/gc/index.d.ts.map +1 -1
  269. package/lib/gc/index.js +1 -0
  270. package/lib/gc/index.js.map +1 -1
  271. package/lib/inboundBatchAggregator.d.ts +34 -0
  272. package/lib/inboundBatchAggregator.d.ts.map +1 -0
  273. package/lib/inboundBatchAggregator.js +181 -0
  274. package/lib/inboundBatchAggregator.js.map +1 -0
  275. package/lib/index.d.ts +1 -1
  276. package/lib/index.d.ts.map +1 -1
  277. package/lib/index.js.map +1 -1
  278. package/lib/legacy.d.ts +0 -4
  279. package/lib/messageTypes.d.ts +14 -5
  280. package/lib/messageTypes.d.ts.map +1 -1
  281. package/lib/messageTypes.js.map +1 -1
  282. package/lib/metadata.d.ts +12 -4
  283. package/lib/metadata.d.ts.map +1 -1
  284. package/lib/metadata.js +6 -2
  285. package/lib/metadata.js.map +1 -1
  286. package/lib/opLifecycle/batchManager.d.ts +9 -3
  287. package/lib/opLifecycle/batchManager.d.ts.map +1 -1
  288. package/lib/opLifecycle/batchManager.js +3 -1
  289. package/lib/opLifecycle/batchManager.js.map +1 -1
  290. package/lib/opLifecycle/duplicateBatchDetector.d.ts +9 -3
  291. package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  292. package/lib/opLifecycle/duplicateBatchDetector.js +9 -3
  293. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  294. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  295. package/lib/opLifecycle/opCompressor.js +1 -1
  296. package/lib/opLifecycle/opCompressor.js.map +1 -1
  297. package/lib/opLifecycle/opDecompressor.d.ts +3 -1
  298. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  299. package/lib/opLifecycle/opDecompressor.js +13 -8
  300. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  301. package/lib/opLifecycle/opGroupingManager.d.ts +0 -1
  302. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  303. package/lib/opLifecycle/opGroupingManager.js +6 -5
  304. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  305. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  306. package/lib/opLifecycle/opSplitter.js +2 -0
  307. package/lib/opLifecycle/opSplitter.js.map +1 -1
  308. package/lib/opLifecycle/outbox.d.ts +1 -1
  309. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  310. package/lib/opLifecycle/outbox.js +6 -1
  311. package/lib/opLifecycle/outbox.js.map +1 -1
  312. package/lib/opLifecycle/remoteMessageProcessor.d.ts +9 -3
  313. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  314. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  315. package/lib/packageVersion.d.ts +1 -1
  316. package/lib/packageVersion.js +1 -1
  317. package/lib/packageVersion.js.map +1 -1
  318. package/lib/pendingStateManager.d.ts +19 -7
  319. package/lib/pendingStateManager.d.ts.map +1 -1
  320. package/lib/pendingStateManager.js +13 -5
  321. package/lib/pendingStateManager.js.map +1 -1
  322. package/lib/summary/documentSchema.d.ts.map +1 -1
  323. package/lib/summary/documentSchema.js +2 -0
  324. package/lib/summary/documentSchema.js.map +1 -1
  325. package/lib/summary/index.d.ts +1 -1
  326. package/lib/summary/index.d.ts.map +1 -1
  327. package/lib/summary/index.js.map +1 -1
  328. package/lib/summary/orderedClientElection.d.ts +93 -31
  329. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  330. package/lib/summary/orderedClientElection.js +15 -5
  331. package/lib/summary/orderedClientElection.js.map +1 -1
  332. package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  333. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
  334. package/lib/summary/runningSummarizer.d.ts +17 -6
  335. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  336. package/lib/summary/runningSummarizer.js +12 -4
  337. package/lib/summary/runningSummarizer.js.map +1 -1
  338. package/lib/summary/summarizer.d.ts +9 -5
  339. package/lib/summary/summarizer.d.ts.map +1 -1
  340. package/lib/summary/summarizer.js +9 -3
  341. package/lib/summary/summarizer.js.map +1 -1
  342. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  343. package/lib/summary/summarizerClientElection.js.map +1 -1
  344. package/lib/summary/summarizerHeuristics.d.ts +6 -2
  345. package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
  346. package/lib/summary/summarizerHeuristics.js +12 -4
  347. package/lib/summary/summarizerHeuristics.js.map +1 -1
  348. package/lib/summary/summarizerNode/summarizerNode.d.ts +24 -8
  349. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  350. package/lib/summary/summarizerNode/summarizerNode.js +15 -5
  351. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  352. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
  353. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  354. package/lib/summary/summarizerNode/summarizerNodeUtils.js +3 -1
  355. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  356. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +12 -4
  357. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  358. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +12 -4
  359. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  360. package/lib/summary/summarizerTypes.d.ts +246 -135
  361. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  362. package/lib/summary/summarizerTypes.js.map +1 -1
  363. package/lib/summary/summaryCollection.d.ts.map +1 -1
  364. package/lib/summary/summaryCollection.js +1 -2
  365. package/lib/summary/summaryCollection.js.map +1 -1
  366. package/lib/summary/summaryFormat.d.ts +24 -8
  367. package/lib/summary/summaryFormat.d.ts.map +1 -1
  368. package/lib/summary/summaryFormat.js.map +1 -1
  369. package/lib/summary/summaryGenerator.d.ts +9 -3
  370. package/lib/summary/summaryGenerator.d.ts.map +1 -1
  371. package/lib/summary/summaryGenerator.js +3 -1
  372. package/lib/summary/summaryGenerator.js.map +1 -1
  373. package/lib/summary/summaryManager.d.ts +8 -4
  374. package/lib/summary/summaryManager.d.ts.map +1 -1
  375. package/lib/summary/summaryManager.js +12 -4
  376. package/lib/summary/summaryManager.js.map +1 -1
  377. package/lib/throttler.d.ts +26 -10
  378. package/lib/throttler.d.ts.map +1 -1
  379. package/lib/throttler.js +12 -4
  380. package/lib/throttler.js.map +1 -1
  381. package/package.json +43 -30
  382. package/src/batchTracker.ts +31 -33
  383. package/src/blobManager/blobManager.ts +38 -19
  384. package/src/blobManager/blobManagerSnapSum.ts +2 -2
  385. package/src/channelCollection.ts +45 -38
  386. package/src/connectionTelemetry.ts +31 -13
  387. package/src/containerHandleContext.ts +2 -2
  388. package/src/containerRuntime.ts +199 -142
  389. package/src/dataStore.ts +11 -6
  390. package/src/dataStoreContext.ts +80 -59
  391. package/src/dataStoreContexts.ts +16 -12
  392. package/src/dataStoreRegistry.ts +1 -1
  393. package/src/deltaManagerProxies.ts +5 -5
  394. package/src/deltaScheduler.ts +19 -13
  395. package/src/gc/garbageCollection.ts +42 -20
  396. package/src/gc/gcConfigs.ts +4 -4
  397. package/src/gc/gcDefinitions.ts +212 -70
  398. package/src/gc/gcHelpers.ts +13 -7
  399. package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
  400. package/src/gc/gcSummaryDefinitions.ts +18 -6
  401. package/src/gc/gcSummaryStateTracker.ts +4 -2
  402. package/src/gc/gcTelemetry.ts +47 -19
  403. package/src/gc/gcUnreferencedStateTracker.ts +40 -16
  404. package/src/gc/index.ts +1 -0
  405. package/src/{scheduleManager.ts → inboundBatchAggregator.ts} +53 -120
  406. package/src/index.ts +0 -3
  407. package/src/messageTypes.ts +14 -5
  408. package/src/metadata.ts +12 -4
  409. package/src/opLifecycle/batchManager.ts +12 -6
  410. package/src/opLifecycle/duplicateBatchDetector.ts +10 -4
  411. package/src/opLifecycle/opCompressor.ts +8 -4
  412. package/src/opLifecycle/opDecompressor.ts +19 -10
  413. package/src/opLifecycle/opGroupingManager.ts +12 -8
  414. package/src/opLifecycle/opSplitter.ts +10 -7
  415. package/src/opLifecycle/outbox.ts +22 -13
  416. package/src/opLifecycle/remoteMessageProcessor.ts +10 -4
  417. package/src/packageVersion.ts +1 -1
  418. package/src/pendingStateManager.ts +34 -16
  419. package/src/summary/documentSchema.ts +30 -18
  420. package/src/summary/index.ts +0 -3
  421. package/src/summary/orderedClientElection.ts +100 -38
  422. package/src/summary/runWhileConnectedCoordinator.ts +6 -3
  423. package/src/summary/runningSummarizer.ts +38 -19
  424. package/src/summary/summarizer.ts +29 -16
  425. package/src/summary/summarizerClientElection.ts +2 -2
  426. package/src/summary/summarizerHeuristics.ts +22 -11
  427. package/src/summary/summarizerNode/summarizerNode.ts +22 -12
  428. package/src/summary/summarizerNode/summarizerNodeUtils.ts +48 -16
  429. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +21 -11
  430. package/src/summary/summarizerTypes.ts +246 -139
  431. package/src/summary/summaryCollection.ts +22 -23
  432. package/src/summary/summaryFormat.ts +24 -8
  433. package/src/summary/summaryGenerator.ts +14 -8
  434. package/src/summary/summaryManager.ts +28 -18
  435. package/src/throttler.ts +23 -11
  436. package/dist/scheduleManager.d.ts +0 -28
  437. package/dist/scheduleManager.d.ts.map +0 -1
  438. package/dist/scheduleManager.js +0 -233
  439. package/dist/scheduleManager.js.map +0 -1
  440. package/lib/scheduleManager.d.ts +0 -28
  441. package/lib/scheduleManager.d.ts.map +0 -1
  442. package/lib/scheduleManager.js +0 -229
  443. package/lib/scheduleManager.js.map +0 -1
@@ -64,7 +64,6 @@ import {
64
64
  ISequencedDocumentMessage,
65
65
  ISignalMessage,
66
66
  type ISummaryContext,
67
- type SummaryObject,
68
67
  } from "@fluidframework/driver-definitions/internal";
69
68
  import { readAndParse } from "@fluidframework/driver-utils/internal";
70
69
  import type { IIdCompressor } from "@fluidframework/id-compressor";
@@ -93,6 +92,7 @@ import {
93
92
  gcTreeKey,
94
93
  IInboundSignalMessage,
95
94
  type IRuntimeMessagesContent,
95
+ type ISummarizerNodeWithGC,
96
96
  } from "@fluidframework/runtime-definitions/internal";
97
97
  import {
98
98
  GCDataBuilder,
@@ -157,6 +157,7 @@ import {
157
157
  DeltaManagerPendingOpsProxy,
158
158
  DeltaManagerSummarizerProxy,
159
159
  } from "./deltaManagerProxies.js";
160
+ import { DeltaScheduler } from "./deltaScheduler.js";
160
161
  import {
161
162
  GCNodeType,
162
163
  GarbageCollector,
@@ -166,6 +167,7 @@ import {
166
167
  gcGenerationOptionName,
167
168
  type GarbageCollectionMessage,
168
169
  } from "./gc/index.js";
170
+ import { InboundBatchAggregator } from "./inboundBatchAggregator.js";
169
171
  import {
170
172
  ContainerMessageType,
171
173
  type ContainerRuntimeDocumentSchemaMessage,
@@ -199,7 +201,6 @@ import {
199
201
  IPendingLocalState,
200
202
  PendingStateManager,
201
203
  } from "./pendingStateManager.js";
202
- import { ScheduleManager } from "./scheduleManager.js";
203
204
  import {
204
205
  DocumentsSchemaController,
205
206
  EnqueueSummarizeResult,
@@ -243,6 +244,7 @@ import {
243
244
  rootHasIsolatedChannels,
244
245
  summarizerClientType,
245
246
  wrapSummaryInChannelsTree,
247
+ type IDocumentSchemaFeatures,
246
248
  } from "./summary/index.js";
247
249
  import { Throttler, formExponentialFn } from "./throttler.js";
248
250
 
@@ -422,7 +424,9 @@ export const DefaultSummaryConfiguration: ISummaryConfiguration = {
422
424
  * @alpha
423
425
  */
424
426
  export interface ISummaryRuntimeOptions {
425
- /** Override summary configurations set by the server. */
427
+ /**
428
+ * Override summary configurations set by the server.
429
+ */
426
430
  summaryConfigOverrides?: ISummaryConfiguration;
427
431
 
428
432
  /**
@@ -470,15 +474,7 @@ export interface IContainerRuntimeOptions {
470
474
  * 3. "bypass" will skip the check entirely. This is not recommended.
471
475
  */
472
476
  readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
473
- /**
474
- * Sets the flush mode for the runtime. In Immediate flush mode the runtime will immediately
475
- * send all operations to the driver layer, while in TurnBased the operations will be buffered
476
- * and then sent them as a single batch at the end of the turn.
477
- * By default, flush mode is TurnBased.
478
- *
479
- * @deprecated Only the default value TurnBased is supported. This option will be removed in the future.
480
- */
481
- readonly flushMode?: FlushMode;
477
+
482
478
  /**
483
479
  * Enables the runtime to compress ops. See {@link ICompressionRuntimeOptions}.
484
480
  */
@@ -520,8 +516,8 @@ export interface IContainerRuntimeOptions {
520
516
  * message to be sent to the service.
521
517
  * The grouping and ungrouping of such messages is handled by the "OpGroupingManager".
522
518
  *
523
- * By default, the feature is enabled.
524
- * @deprecated The ability to disable Grouped Batching is deprecated and will be removed in v2.20.0. This feature is required for the proper functioning of the Fluid Framework.
519
+ * By default, the feature is enabled. This feature can only be disabled when compression is also disabled.
520
+ * @deprecated The ability to disable Grouped Batching is deprecated and will be removed in a future release. This feature is required for the proper functioning of the Fluid Framework.
525
521
  */
526
522
  readonly enableGroupedBatching?: boolean;
527
523
 
@@ -592,7 +588,9 @@ export interface RuntimeHeaderData {
592
588
  allowTombstone?: boolean;
593
589
  }
594
590
 
595
- /** Default values for Runtime Headers */
591
+ /**
592
+ * Default values for Runtime Headers
593
+ */
596
594
  export const defaultRuntimeHeaderData: Required<RuntimeHeaderData> = {
597
595
  wait: true,
598
596
  viaHandle: false,
@@ -671,9 +669,13 @@ const defaultCompressionConfig = {
671
669
 
672
670
  const defaultChunkSizeInBytes = 204800;
673
671
 
674
- /** The default time to wait for pending ops to be processed during summarization */
672
+ /**
673
+ * The default time to wait for pending ops to be processed during summarization
674
+ */
675
675
  export const defaultPendingOpsWaitTimeoutMs = 1000;
676
- /** The default time to delay a summarization retry attempt when there are pending ops */
676
+ /**
677
+ * The default time to delay a summarization retry attempt when there are pending ops
678
+ */
677
679
  export const defaultPendingOpsRetryDelayMs = 1000;
678
680
 
679
681
  /**
@@ -699,10 +701,14 @@ export function isUnpackedRuntimeMessage(message: ISequencedDocumentMessage): bo
699
701
  export const agentSchedulerId = "_scheduler";
700
702
 
701
703
  // safely check navigator and get the hardware spec value
702
- export function getDeviceSpec() {
704
+ export function getDeviceSpec(): {
705
+ deviceMemory?: number | undefined;
706
+ hardwareConcurrency?: number | undefined;
707
+ } {
703
708
  try {
704
709
  if (typeof navigator === "object" && navigator !== null) {
705
710
  return {
711
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
706
712
  deviceMemory: (navigator as any).deviceMemory,
707
713
  hardwareConcurrency: navigator.hardwareConcurrency,
708
714
  };
@@ -718,10 +724,15 @@ export function getDeviceSpec() {
718
724
  */
719
725
  export const makeLegacySendBatchFn =
720
726
  (
721
- submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number,
727
+ submitFn: (
728
+ type: MessageType,
729
+ contents: unknown,
730
+ batch: boolean,
731
+ appData?: unknown,
732
+ ) => number,
722
733
  deltaManager: Pick<IDeltaManager<unknown, unknown>, "flush">,
723
734
  ) =>
724
- (batch: IBatch) => {
735
+ (batch: IBatch): number => {
725
736
  // Default to negative one to match Container.submitBatch behavior
726
737
  let clientSequenceNumber: number = -1;
727
738
  for (const message of batch.messages) {
@@ -766,12 +777,15 @@ async function createSummarizer(loader: ILoader, url: string): Promise<ISummariz
766
777
  if (resolvedContainer.getEntryPoint !== undefined) {
767
778
  fluidObject = await resolvedContainer.getEntryPoint();
768
779
  } else {
780
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
769
781
  const response = await (resolvedContainer as any).request({
770
782
  url: `/${summarizerRequestUrl}`,
771
783
  });
784
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
772
785
  if (response.status !== 200 || response.mimeType !== "fluid/object") {
773
786
  throw responseToException(response, request);
774
787
  }
788
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
775
789
  fluidObject = response.value;
776
790
  }
777
791
 
@@ -787,7 +801,9 @@ async function createSummarizer(loader: ILoader, url: string): Promise<ISummariz
787
801
  * This allows new runtime to make documents not openable for old runtimes, one explicit document schema control is enabled.
788
802
  * Please see addMetadataToSummary() as well
789
803
  */
790
- function lastMessageFromMetadata(metadata: IContainerRuntimeMetadata | undefined) {
804
+ function lastMessageFromMetadata(
805
+ metadata: IContainerRuntimeMetadata | undefined,
806
+ ): ISummaryMetadataMessage | undefined {
791
807
  return metadata?.documentSchema?.runtime?.explicitSchemaControl
792
808
  ? metadata?.lastMessage
793
809
  : metadata?.message;
@@ -799,7 +815,7 @@ function lastMessageFromMetadata(metadata: IContainerRuntimeMetadata | undefined
799
815
  * We only want to log this once, to avoid spamming telemetry if we are wrong and these cases are hit commonly.
800
816
  */
801
817
  export let getSingleUseLegacyLogCallback = (logger: ITelemetryLoggerExt, type: string) => {
802
- return (codePath: string) => {
818
+ return (codePath: string): void => {
803
819
  logger.sendTelemetryEvent({
804
820
  eventName: "LegacyMessageFormat",
805
821
  details: { codePath, type },
@@ -865,11 +881,7 @@ export async function loadContainerRuntime(
865
881
  * Represents the runtime of the container. Contains helper functions/state of the container.
866
882
  * It will define the store level mappings.
867
883
  *
868
- * @deprecated To be removed from the Legacy-Alpha API in version 2.20.0.
869
- * Use the loadContainerRuntime function and interfaces IContainerRuntime / IRuntime instead.
870
- *
871
- * @legacy
872
- * @alpha
884
+ * @internal
873
885
  */
874
886
  export class ContainerRuntime
875
887
  extends TypedEventEmitter<IContainerRuntimeEvents>
@@ -902,7 +914,9 @@ export class ContainerRuntime
902
914
  runtimeOptions?: IContainerRuntimeOptions; // May also include options from IContainerRuntimeOptionsInternal
903
915
  containerScope?: FluidObject;
904
916
  containerRuntimeCtor?: typeof ContainerRuntime;
905
- /** @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 */
917
+ /**
918
+ * @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
919
+ */
906
920
  requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
907
921
  provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;
908
922
  }): Promise<ContainerRuntime> {
@@ -940,7 +954,9 @@ export class ContainerRuntime
940
954
  gcOptions = {},
941
955
  loadSequenceNumberVerification = "close",
942
956
  flushMode = defaultFlushMode,
943
- compressionOptions = defaultCompressionConfig,
957
+ compressionOptions = runtimeOptions.enableGroupedBatching === false
958
+ ? disabledCompressionConfig // Compression must be disabled if Grouping is disabled
959
+ : defaultCompressionConfig,
944
960
  maxBatchSizeInBytes = defaultMaxBatchSizeInBytes,
945
961
  enableRuntimeIdCompressor,
946
962
  chunkSizeInBytes = defaultChunkSizeInBytes,
@@ -1066,7 +1082,7 @@ export class ContainerRuntime
1066
1082
  idCompressorMode = desiredIdCompressorMode;
1067
1083
  }
1068
1084
 
1069
- const createIdCompressorFn = async () => {
1085
+ const createIdCompressorFn = async (): Promise<IIdCompressor & IIdCompressorCore> => {
1070
1086
  const { createIdCompressor, deserializeIdCompressor, createSessionId } = await import(
1071
1087
  "@fluidframework/id-compressor/internal"
1072
1088
  );
@@ -1123,6 +1139,10 @@ export class ContainerRuntime
1123
1139
  },
1124
1140
  );
1125
1141
 
1142
+ if (compressionLz4 && !enableGroupedBatching) {
1143
+ throw new UsageError("If compression is enabled, op grouping must be enabled too");
1144
+ }
1145
+
1126
1146
  const featureGatesForTelemetry: Record<string, boolean | number | undefined> = {};
1127
1147
 
1128
1148
  // Make sure we've got all the options including internal ones
@@ -1183,7 +1203,7 @@ export class ContainerRuntime
1183
1203
  return runtime;
1184
1204
  }
1185
1205
 
1186
- public readonly options: Record<string | number, any>;
1206
+ public readonly options: Record<string | number, unknown>;
1187
1207
  private imminentClosure: boolean = false;
1188
1208
 
1189
1209
  private readonly _getClientId: () => string | undefined;
@@ -1197,15 +1217,15 @@ export class ContainerRuntime
1197
1217
  return this._storage;
1198
1218
  }
1199
1219
 
1200
- public get containerRuntime() {
1220
+ public get containerRuntime(): ContainerRuntime {
1201
1221
  return this;
1202
1222
  }
1203
1223
 
1204
1224
  private readonly submitFn: (
1205
1225
  type: MessageType,
1206
- contents: any,
1226
+ contents: unknown,
1207
1227
  batch: boolean,
1208
- appData?: any,
1228
+ appData?: unknown,
1209
1229
  ) => number;
1210
1230
  /**
1211
1231
  * Although current IContainerContext guarantees submitBatchFn, it is not available on older loaders.
@@ -1249,9 +1269,13 @@ export class ContainerRuntime
1249
1269
  * has to deal with compressed ops as other clients might send them.
1250
1270
  * And in reverse, session schema can have compression Off, but feature gates / runtime options want it On.
1251
1271
  * In such case it will be off in session schema, however this client will propose change to schema, and once / if
1252
- * this op rountrips, compression will be On. Client can't send compressed ops until it's change in schema.
1272
+ * this op roundtrips, compression will be On. Client can't send compressed ops until it's change in schema.
1253
1273
  */
1254
- public get sessionSchema() {
1274
+ public get sessionSchema(): {
1275
+ [P in keyof IDocumentSchemaFeatures]?: IDocumentSchemaFeatures[P] extends boolean
1276
+ ? true
1277
+ : IDocumentSchemaFeatures[P];
1278
+ } {
1255
1279
  return this.documentsSchemaController.sessionSchema.runtime;
1256
1280
  }
1257
1281
 
@@ -1267,13 +1291,13 @@ export class ContainerRuntime
1267
1291
  // In such case we have to process all ops, including those marked with savedOp === true.
1268
1292
  private readonly skipSavedCompressorOps: boolean;
1269
1293
 
1270
- public get idCompressorMode() {
1294
+ public get idCompressorMode(): IdCompressorMode {
1271
1295
  return this.sessionSchema.idCompressorMode;
1272
1296
  }
1273
1297
  /**
1274
- * See IContainerRuntimeBase.idCompressor() for details.
1298
+ * {@inheritDoc @fluidframework/runtime-definitions#IContainerRuntimeBase.idCompressor}
1275
1299
  */
1276
- public get idCompressor() {
1300
+ public get idCompressor(): (IIdCompressor & IIdCompressorCore) | undefined {
1277
1301
  // Expose ID Compressor only if it's On from the start.
1278
1302
  // If container uses delayed mode, then we can only expose generateDocumentUniqueId() and nothing else.
1279
1303
  // That's because any other usage will require immidiate loading of ID Compressor in next sessions in order
@@ -1291,9 +1315,9 @@ export class ContainerRuntime
1291
1315
  protected _loadIdCompressor: Promise<void> | undefined;
1292
1316
 
1293
1317
  /**
1294
- * See IContainerRuntimeBase.generateDocumentUniqueId() for details.
1318
+ * {@inheritDoc @fluidframework/runtime-definitions#IContainerRuntimeBase.generateDocumentUniqueId}
1295
1319
  */
1296
- public generateDocumentUniqueId() {
1320
+ public generateDocumentUniqueId(): string | number {
1297
1321
  return this._idCompressor?.generateDocumentUniqueId() ?? uuid();
1298
1322
  }
1299
1323
 
@@ -1377,13 +1401,15 @@ export class ContainerRuntime
1377
1401
  return this._connected;
1378
1402
  }
1379
1403
 
1380
- /** clientId of parent (non-summarizing) container that owns summarizer container */
1404
+ /**
1405
+ * clientId of parent (non-summarizing) container that owns summarizer container
1406
+ */
1381
1407
  public get summarizerClientId(): string | undefined {
1382
1408
  return this.summarizerClientElection?.electedClientId;
1383
1409
  }
1384
1410
 
1385
1411
  private _disposed = false;
1386
- public get disposed() {
1412
+ public get disposed(): boolean {
1387
1413
  return this._disposed;
1388
1414
  }
1389
1415
 
@@ -1411,7 +1437,8 @@ export class ContainerRuntime
1411
1437
  * It is created only by summarizing container (i.e. one with clientType === "summarizer")
1412
1438
  */
1413
1439
  private readonly _summarizer?: Summarizer;
1414
- private readonly scheduleManager: ScheduleManager;
1440
+ private readonly deltaScheduler: DeltaScheduler;
1441
+ private readonly inboundBatchAggregator: InboundBatchAggregator;
1415
1442
  private readonly blobManager: BlobManager;
1416
1443
  private readonly pendingStateManager: PendingStateManager;
1417
1444
  private readonly duplicateBatchDetector: DuplicateBatchDetector | undefined;
@@ -1421,7 +1448,9 @@ export class ContainerRuntime
1421
1448
  private readonly channelCollection: ChannelCollection;
1422
1449
  private readonly remoteMessageProcessor: RemoteMessageProcessor;
1423
1450
 
1424
- /** The last message processed at the time of the last summary. */
1451
+ /**
1452
+ * The last message processed at the time of the last summary.
1453
+ */
1425
1454
  private messageAtLastSummary: ISummaryMetadataMessage | undefined;
1426
1455
 
1427
1456
  private get summarizer(): Summarizer {
@@ -1522,10 +1551,7 @@ export class ContainerRuntime
1522
1551
  electedSummarizerData: ISerializedElection | undefined,
1523
1552
  chunks: [string, string[]][],
1524
1553
  dataStoreAliasMap: [string, string][],
1525
- runtimeOptions: Readonly<
1526
- Required<Omit<IContainerRuntimeOptions, "flushMode" | "enableGroupedBatching">> &
1527
- IContainerRuntimeOptions // Let flushMode and enabledGroupedBatching be optional now since they're soon to be removed
1528
- >,
1554
+ runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>,
1529
1555
  private readonly containerScope: FluidObject,
1530
1556
  // Create a custom ITelemetryBaseLogger to output telemetry events.
1531
1557
  public readonly baseLogger: ITelemetryBaseLogger,
@@ -1573,7 +1599,6 @@ export class ContainerRuntime
1573
1599
  // Backfill in defaults for the internal runtimeOptions, since they may not be present on the provided runtimeOptions object
1574
1600
  this.runtimeOptions = {
1575
1601
  flushMode: defaultFlushMode,
1576
- enableGroupedBatching: true,
1577
1602
  ...runtimeOptions,
1578
1603
  };
1579
1604
  this.logger = createChildLogger({ logger: this.baseLogger });
@@ -1660,6 +1685,7 @@ export class ContainerRuntime
1660
1685
  eventName: "GCFeatureMatrix",
1661
1686
  metadataValue: JSON.stringify(metadata?.gcFeatureMatrix),
1662
1687
  inputs: JSON.stringify({
1688
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1663
1689
  gcOptions_gcGeneration: this.runtimeOptions.gcOptions[gcGenerationOptionName],
1664
1690
  }),
1665
1691
  });
@@ -1675,9 +1701,6 @@ export class ContainerRuntime
1675
1701
  groupedBatchingEnabled: this.groupedBatchingEnabled,
1676
1702
  opCountThreshold:
1677
1703
  this.mc.config.getNumber("Fluid.ContainerRuntime.GroupedBatchingOpCount") ?? 2,
1678
- reentrantBatchGroupingEnabled:
1679
- this.mc.config.getBoolean("Fluid.ContainerRuntime.GroupedBatchingReentrancy") ??
1680
- true,
1681
1704
  },
1682
1705
  this.mc.logger,
1683
1706
  );
@@ -1902,11 +1925,16 @@ export class ContainerRuntime
1902
1925
  closeContainer: (error?: ICriticalContainerError) => this.closeFn(error),
1903
1926
  });
1904
1927
 
1905
- this.scheduleManager = new ScheduleManager(
1928
+ this.deltaScheduler = new DeltaScheduler(
1906
1929
  this.innerDeltaManager,
1907
1930
  this,
1931
+ createChildLogger({ logger: this.logger, namespace: "DeltaScheduler" }),
1932
+ );
1933
+
1934
+ this.inboundBatchAggregator = new InboundBatchAggregator(
1935
+ this.innerDeltaManager,
1908
1936
  () => this.clientId,
1909
- createChildLogger({ logger: this.logger, namespace: "ScheduleManager" }),
1937
+ createChildLogger({ logger: this.logger, namespace: "InboundBatchAggregator" }),
1910
1938
  );
1911
1939
 
1912
1940
  const disablePartialFlush = this.mc.config.getBoolean(
@@ -2028,7 +2056,7 @@ export class ContainerRuntime
2028
2056
  } else if (SummarizerClientElection.clientDetailsPermitElection(this.clientDetails)) {
2029
2057
  // Only create a SummaryManager and SummarizerClientElection
2030
2058
  // if summaries are enabled and we are not the summarizer client.
2031
- const defaultAction = () => {
2059
+ const defaultAction = (): void => {
2032
2060
  if (this.summaryCollection.opsSinceLastAck > this.maxOpsSinceLastSummary) {
2033
2061
  this.mc.logger.sendTelemetryEvent({ eventName: "SummaryStatus:Behind" });
2034
2062
  // unregister default to no log on every op after falling behind
@@ -2130,7 +2158,7 @@ export class ContainerRuntime
2130
2158
  this.skipSavedCompressorOps = pendingRuntimeState?.pendingIdCompressorState !== undefined;
2131
2159
  }
2132
2160
 
2133
- public onSchemaChange(schema: IDocumentSchemaCurrent) {
2161
+ public onSchemaChange(schema: IDocumentSchemaCurrent): void {
2134
2162
  this.logger.sendTelemetryEvent({
2135
2163
  eventName: "SchemaChangeAccept",
2136
2164
  sessionRuntimeSchema: JSON.stringify(schema),
@@ -2157,7 +2185,7 @@ export class ContainerRuntime
2157
2185
  return (
2158
2186
  summarizeInternal: SummarizeInternalFn,
2159
2187
  getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
2160
- ) =>
2188
+ ): ISummarizerNodeWithGC =>
2161
2189
  this.summarizerNode.createChild(
2162
2190
  summarizeInternal,
2163
2191
  id,
@@ -2167,19 +2195,22 @@ export class ContainerRuntime
2167
2195
  );
2168
2196
  }
2169
2197
 
2170
- public deleteChildSummarizerNode(id: string) {
2198
+ public deleteChildSummarizerNode(id: string): void {
2171
2199
  return this.summarizerNode.deleteChild(id);
2172
2200
  }
2173
2201
 
2174
- /* IFluidParentContext APIs that should not be called on Root */
2175
- public makeLocallyVisible() {
2202
+ // #region `IFluidParentContext` APIs that should not be called on Root
2203
+
2204
+ public makeLocallyVisible(): void {
2176
2205
  assert(false, 0x8eb /* should not be called */);
2177
2206
  }
2178
2207
 
2179
- public setChannelDirty(address: string) {
2208
+ public setChannelDirty(address: string): void {
2180
2209
  assert(false, 0x909 /* should not be called */);
2181
2210
  }
2182
2211
 
2212
+ // #endregion
2213
+
2183
2214
  /**
2184
2215
  * Initializes the state from the base snapshot this container runtime loaded from.
2185
2216
  */
@@ -2219,6 +2250,8 @@ export class ContainerRuntime
2219
2250
  this._summarizer?.dispose();
2220
2251
  this.channelCollection.dispose();
2221
2252
  this.pendingStateManager.dispose();
2253
+ this.inboundBatchAggregator.dispose();
2254
+ this.deltaScheduler.dispose();
2222
2255
  this.emit("dispose");
2223
2256
  this.removeAllListeners();
2224
2257
  }
@@ -2431,8 +2464,10 @@ export class ContainerRuntime
2431
2464
  return this.channelCollection.internalId(maybeAlias);
2432
2465
  }
2433
2466
 
2434
- /** Adds the container's metadata to the given summary tree. */
2435
- private addMetadataToSummary(summaryTree: ISummaryTreeWithStats) {
2467
+ /**
2468
+ * Adds the container's metadata to the given summary tree.
2469
+ */
2470
+ private addMetadataToSummary(summaryTree: ISummaryTreeWithStats): void {
2436
2471
  // The last message processed at the time of summary. If there are no new messages, use the message from the
2437
2472
  // last summary.
2438
2473
  const message =
@@ -2459,7 +2494,7 @@ export class ContainerRuntime
2459
2494
  // last message's sequence number.
2460
2495
  // See also lastMessageFromMetadata()
2461
2496
  message: explicitSchemaControl
2462
- ? ({ sequenceNumber: -1 } as any as ISummaryMetadataMessage)
2497
+ ? ({ sequenceNumber: -1 } as unknown as ISummaryMetadataMessage)
2463
2498
  : message,
2464
2499
  lastMessage: explicitSchemaControl ? message : undefined,
2465
2500
  documentSchema,
@@ -2473,7 +2508,7 @@ export class ContainerRuntime
2473
2508
  fullTree: boolean,
2474
2509
  trackState: boolean,
2475
2510
  telemetryContext?: ITelemetryContext,
2476
- ) {
2511
+ ): void {
2477
2512
  this.addMetadataToSummary(summaryTree);
2478
2513
 
2479
2514
  if (this._idCompressor) {
@@ -2549,11 +2584,11 @@ export class ContainerRuntime
2549
2584
  return this.consecutiveReconnects < this.maxConsecutiveReconnects;
2550
2585
  }
2551
2586
 
2552
- private resetReconnectCount() {
2587
+ private resetReconnectCount(): void {
2553
2588
  this.consecutiveReconnects = 0;
2554
2589
  }
2555
2590
 
2556
- private replayPendingStates() {
2591
+ private replayPendingStates(): void {
2557
2592
  // We need to be able to send ops to replay states
2558
2593
  if (!this.canSendOps()) {
2559
2594
  return;
@@ -2593,7 +2628,7 @@ export class ContainerRuntime
2593
2628
  // TODO: markfields: confirm Local- versus Outbound- ContainerRuntimeMessage typing
2594
2629
  private parseLocalOpContent(serializedContents?: string): LocalContainerRuntimeMessage {
2595
2630
  assert(serializedContents !== undefined, 0x6d5 /* content must be defined */);
2596
- const message: LocalContainerRuntimeMessage = JSON.parse(serializedContents);
2631
+ const message = JSON.parse(serializedContents) as LocalContainerRuntimeMessage;
2597
2632
  assert(message.type !== undefined, 0x6d6 /* incorrect op content format */);
2598
2633
  return message;
2599
2634
  }
@@ -2641,7 +2676,7 @@ export class ContainerRuntime
2641
2676
  }
2642
2677
  }
2643
2678
 
2644
- private async loadIdCompressor() {
2679
+ private async loadIdCompressor(): Promise<void | undefined> {
2645
2680
  if (
2646
2681
  this._idCompressor === undefined &&
2647
2682
  this.idCompressorMode !== undefined &&
@@ -2666,7 +2701,7 @@ export class ContainerRuntime
2666
2701
  return this._loadIdCompressor;
2667
2702
  }
2668
2703
 
2669
- public setConnectionState(connected: boolean, clientId?: string) {
2704
+ public setConnectionState(connected: boolean, clientId?: string): void {
2670
2705
  // Validate we have consistent state
2671
2706
  const currentClientId = this._audience.getSelf()?.clientId;
2672
2707
  assert(clientId === currentClientId, 0x977 /* input clientId does not match Audience */);
@@ -2709,7 +2744,7 @@ export class ContainerRuntime
2709
2744
  this.setConnectionStateCore(connected, clientId);
2710
2745
  }
2711
2746
 
2712
- private setConnectionStateCore(connected: boolean, clientId?: string) {
2747
+ private setConnectionStateCore(connected: boolean, clientId?: string): void {
2713
2748
  assert(
2714
2749
  !this.delayConnectClientId,
2715
2750
  0x394 /* connect event delay must be cleared before propagating connect event */,
@@ -2777,7 +2812,7 @@ export class ContainerRuntime
2777
2812
  raiseConnectedEvent(this.mc.logger, this, connected, clientId);
2778
2813
  }
2779
2814
 
2780
- public async notifyOpReplay(message: ISequencedDocumentMessage) {
2815
+ public async notifyOpReplay(message: ISequencedDocumentMessage): Promise<void> {
2781
2816
  await this.pendingStateManager.applyStashedOpsAt(message.sequenceNumber);
2782
2817
  }
2783
2818
 
@@ -2786,7 +2821,7 @@ export class ContainerRuntime
2786
2821
  * @param messageCopy - Sequenced message for a distributed document.
2787
2822
  * @param local - true if the message was originally generated by the client receiving it.
2788
2823
  */
2789
- public process({ ...messageCopy }: ISequencedDocumentMessage, local: boolean) {
2824
+ public process({ ...messageCopy }: ISequencedDocumentMessage, local: boolean): void {
2790
2825
  // spread operator above ensure we make a shallow copy of message, as the processing flow will modify it.
2791
2826
  // There might be multiple container instances receiving the same message.
2792
2827
 
@@ -2924,7 +2959,7 @@ export class ContainerRuntime
2924
2959
  private _processedClientSequenceNumber: number | undefined;
2925
2960
 
2926
2961
  /**
2927
- * Processes inbound message(s). It calls schedule manager according to the messages' location in the batch.
2962
+ * Processes inbound message(s). It calls delta scheduler according to the messages' location in the batch.
2928
2963
  * @param messagesWithMetadata - messages to process along with their metadata.
2929
2964
  * @param locationInBatch - Are we processing the start and/or end of a batch?
2930
2965
  * @param local - true if the messages were originally generated by the client receiving it.
@@ -2942,11 +2977,11 @@ export class ContainerRuntime
2942
2977
  savedOp: boolean | undefined,
2943
2978
  runtimeBatch: boolean,
2944
2979
  groupedBatch: boolean,
2945
- ) {
2980
+ ): void {
2946
2981
  if (locationInBatch.batchStart) {
2947
2982
  const firstMessage = messagesWithMetadata[0]?.message;
2948
2983
  assert(firstMessage !== undefined, 0xa31 /* Batch must have at least one message */);
2949
- this.scheduleManager.batchBegin(firstMessage);
2984
+ this.emit("batchBegin", firstMessage);
2950
2985
  }
2951
2986
 
2952
2987
  let error: unknown;
@@ -2960,9 +2995,11 @@ export class ContainerRuntime
2960
2995
  return;
2961
2996
  }
2962
2997
 
2963
- // Helper that updates a message's minimum sequence number to the minimum sequence number that container
2998
+ // Updates a message's minimum sequence number to the minimum sequence number that container
2964
2999
  // runtime is tracking and sets _processedClientSequenceNumber. It returns the updated message.
2965
- const updateSequenceNumbers = (message: ISequencedDocumentMessage) => {
3000
+ const updateSequenceNumbers = (
3001
+ message: ISequencedDocumentMessage,
3002
+ ): InboundSequencedContainerRuntimeMessage => {
2966
3003
  // Set the minimum sequence number to the containerRuntime's understanding of minimum sequence number.
2967
3004
  message.minimumSequenceNumber =
2968
3005
  this.useDeltaManagerOpsProxy &&
@@ -2999,8 +3036,8 @@ export class ContainerRuntime
2999
3036
  let bunchedMessagesContent: IRuntimeMessagesContent[] = [];
3000
3037
  let previousMessage: InboundSequencedContainerRuntimeMessage | undefined;
3001
3038
 
3002
- // Helper that processes the previous bunch of messages.
3003
- const sendBunchedMessages = () => {
3039
+ // Process the previous bunch of messages.
3040
+ const sendBunchedMessages = (): void => {
3004
3041
  assert(previousMessage !== undefined, 0xa67 /* previous message must exist */);
3005
3042
  this.ensureNoDataModelChanges(() => {
3006
3043
  this.validateAndProcessRuntimeMessages(
@@ -3046,7 +3083,7 @@ export class ContainerRuntime
3046
3083
  if (locationInBatch.batchEnd) {
3047
3084
  const lastMessage = messagesWithMetadata[messagesWithMetadata.length - 1]?.message;
3048
3085
  assert(lastMessage !== undefined, 0xa32 /* Batch must have at least one message */);
3049
- this.scheduleManager.batchEnd(error, lastMessage);
3086
+ this.emit("batchEnd", error, lastMessage);
3050
3087
  }
3051
3088
  }
3052
3089
  }
@@ -3055,7 +3092,7 @@ export class ContainerRuntime
3055
3092
  * Observes messages that are not intended for the runtime layer, updating/notifying Runtime systems as needed.
3056
3093
  * @param message - non-runtime message to process.
3057
3094
  */
3058
- private observeNonRuntimeMessage(message: ISequencedDocumentMessage) {
3095
+ private observeNonRuntimeMessage(message: ISequencedDocumentMessage): void {
3059
3096
  // Set the minimum sequence number to the containerRuntime's understanding of minimum sequence number.
3060
3097
  if (this.deltaManager.minimumSequenceNumber < message.minimumSequenceNumber) {
3061
3098
  message.minimumSequenceNumber = this.deltaManager.minimumSequenceNumber;
@@ -3155,7 +3192,10 @@ export class ContainerRuntime
3155
3192
  }
3156
3193
  }
3157
3194
 
3158
- private processIdCompressorMessages(messageContents: IdCreationRange[], savedOp?: boolean) {
3195
+ private processIdCompressorMessages(
3196
+ messageContents: IdCreationRange[],
3197
+ savedOp?: boolean,
3198
+ ): void {
3159
3199
  for (const range of messageContents) {
3160
3200
  // Don't re-finalize the range if we're processing a "savedOp" in
3161
3201
  // stashed ops flow. The compressor is stashed with these ops already processed.
@@ -3184,7 +3224,7 @@ export class ContainerRuntime
3184
3224
  /**
3185
3225
  * Emits the Signal event and update the perf signal data.
3186
3226
  */
3187
- private sendSignalTelemetryEvent() {
3227
+ private sendSignalTelemetryEvent(): void {
3188
3228
  const duration = Date.now() - this._signalTracking.signalTimestamp;
3189
3229
  this.mc.logger.sendPerformanceEvent({
3190
3230
  eventName: "SignalLatency",
@@ -3278,7 +3318,7 @@ export class ContainerRuntime
3278
3318
  }
3279
3319
  }
3280
3320
 
3281
- public processSignal(message: ISignalMessage, local: boolean) {
3321
+ public processSignal(message: ISignalMessage, local: boolean): void {
3282
3322
  const envelope = message.content as ISignalEnvelope;
3283
3323
  const transformed: IInboundSignalMessage = {
3284
3324
  clientId: message.clientId,
@@ -3440,7 +3480,6 @@ export class ContainerRuntime
3440
3480
  ): Promise<IDataStore> {
3441
3481
  const context = this.channelCollection.createDataStoreContext(
3442
3482
  Array.isArray(pkg) ? pkg : [pkg],
3443
- undefined, // props
3444
3483
  loadingGroupId,
3445
3484
  );
3446
3485
  return channelToDataStore(
@@ -3451,26 +3490,7 @@ export class ContainerRuntime
3451
3490
  );
3452
3491
  }
3453
3492
 
3454
- /**
3455
- * @deprecated 0.16 Issue #1537, #3631
3456
- */
3457
- public async _createDataStoreWithProps(
3458
- pkg: Readonly<string | string[]>,
3459
- props?: any,
3460
- ): Promise<IDataStore> {
3461
- const context = this.channelCollection.createDataStoreContext(
3462
- Array.isArray(pkg) ? pkg : [pkg],
3463
- props,
3464
- );
3465
- return channelToDataStore(
3466
- await context.realize(),
3467
- context.id,
3468
- this.channelCollection,
3469
- this.mc.logger,
3470
- );
3471
- }
3472
-
3473
- private canSendOps() {
3493
+ private canSendOps(): boolean {
3474
3494
  // Note that the real (non-proxy) delta manager is needed here to get the readonly info. This is because
3475
3495
  // container runtime's ability to send ops depend on the actual readonly state of the delta manager.
3476
3496
  return (
@@ -3481,7 +3501,7 @@ export class ContainerRuntime
3481
3501
  /**
3482
3502
  * Typically ops are batched and later flushed together, but in some cases we want to flush immediately.
3483
3503
  */
3484
- private currentlyBatching() {
3504
+ private currentlyBatching(): boolean {
3485
3505
  return this.flushMode !== FlushMode.Immediate || this._orderSequentiallyCalls !== 0;
3486
3506
  }
3487
3507
 
@@ -3503,7 +3523,10 @@ export class ContainerRuntime
3503
3523
  return this.dirtyContainer;
3504
3524
  }
3505
3525
 
3506
- private isContainerMessageDirtyable({ type, contents }: OutboundContainerRuntimeMessage) {
3526
+ private isContainerMessageDirtyable({
3527
+ type,
3528
+ contents,
3529
+ }: OutboundContainerRuntimeMessage): boolean {
3507
3530
  // Certain container runtime messages should not mark the container dirty such as the old built-in
3508
3531
  // AgentScheduler and Garbage collector messages.
3509
3532
  switch (type) {
@@ -3535,7 +3558,7 @@ export class ContainerRuntime
3535
3558
  private createNewSignalEnvelope(
3536
3559
  address: string | undefined,
3537
3560
  type: string,
3538
- content: any,
3561
+ content: unknown,
3539
3562
  ): Omit<ISignalEnvelope, "broadcastSignalSequenceNumber"> {
3540
3563
  const newEnvelope: Omit<ISignalEnvelope, "broadcastSignalSequenceNumber"> = {
3541
3564
  address,
@@ -3545,7 +3568,7 @@ export class ContainerRuntime
3545
3568
  return newEnvelope;
3546
3569
  }
3547
3570
 
3548
- private submitEnvelopedSignal(envelope: ISignalEnvelope, targetClientId?: string) {
3571
+ private submitEnvelopedSignal(envelope: ISignalEnvelope, targetClientId?: string): void {
3549
3572
  const isBroadcastSignal = targetClientId === undefined;
3550
3573
 
3551
3574
  if (isBroadcastSignal) {
@@ -3597,7 +3620,7 @@ export class ContainerRuntime
3597
3620
  * Support for this option at container runtime is planned to be deprecated in the future.
3598
3621
  *
3599
3622
  */
3600
- public submitSignal(type: string, content: unknown, targetClientId?: string) {
3623
+ public submitSignal(type: string, content: unknown, targetClientId?: string): void {
3601
3624
  this.verifyNotClosed();
3602
3625
  const envelope = this.createNewSignalEnvelope(undefined /* address */, type, content);
3603
3626
  return this.submitEnvelopedSignal(envelope, targetClientId);
@@ -3694,17 +3717,29 @@ export class ContainerRuntime
3694
3717
  * Returns a summary of the runtime at the current sequence number.
3695
3718
  */
3696
3719
  public async summarize(options: {
3697
- /** True to generate the full tree with no handle reuse optimizations; defaults to false */
3720
+ /**
3721
+ * True to generate the full tree with no handle reuse optimizations; defaults to false
3722
+ */
3698
3723
  fullTree?: boolean;
3699
- /** True to track the state for this summary in the SummarizerNodes; defaults to true */
3724
+ /**
3725
+ * True to track the state for this summary in the SummarizerNodes; defaults to true
3726
+ */
3700
3727
  trackState?: boolean;
3701
- /** Logger to use for correlated summary events */
3728
+ /**
3729
+ * Logger to use for correlated summary events
3730
+ */
3702
3731
  summaryLogger?: ITelemetryLoggerExt;
3703
- /** True to run garbage collection before summarizing; defaults to true */
3732
+ /**
3733
+ * True to run garbage collection before summarizing; defaults to true
3734
+ */
3704
3735
  runGC?: boolean;
3705
- /** True to generate full GC data */
3736
+ /**
3737
+ * True to generate full GC data
3738
+ */
3706
3739
  fullGC?: boolean;
3707
- /** True to run GC sweep phase after the mark phase */
3740
+ /**
3741
+ * True to run GC sweep phase after the mark phase
3742
+ */
3708
3743
  runSweep?: boolean;
3709
3744
  }): Promise<ISummaryTreeWithStats> {
3710
3745
  this.verifyNotClosed();
@@ -3780,7 +3815,7 @@ export class ContainerRuntime
3780
3815
  * @param usedRoutes - The routes that are used in all nodes in this Container.
3781
3816
  * @see IGarbageCollectionRuntime.updateUsedRoutes
3782
3817
  */
3783
- public updateUsedRoutes(usedRoutes: readonly string[]) {
3818
+ public updateUsedRoutes(usedRoutes: readonly string[]): void {
3784
3819
  // Update our summarizer node's used routes. Updating used routes in summarizer node before
3785
3820
  // summarizing is required and asserted by the the summarizer node. We are the root and are
3786
3821
  // always referenced, so the used routes is only self-route (empty string).
@@ -3811,7 +3846,7 @@ export class ContainerRuntime
3811
3846
  *
3812
3847
  * @param tombstonedRoutes - Data store and attachment blob routes that are tombstones in this Container.
3813
3848
  */
3814
- public updateTombstonedRoutes(tombstonedRoutes: readonly string[]) {
3849
+ public updateTombstonedRoutes(tombstonedRoutes: readonly string[]): void {
3815
3850
  const { dataStoreRoutes } = this.getDataStoreAndBlobManagerRoutes(tombstonedRoutes);
3816
3851
  this.channelCollection.updateTombstonedRoutes(dataStoreRoutes);
3817
3852
  }
@@ -3864,7 +3899,10 @@ export class ContainerRuntime
3864
3899
  * @returns Two route lists - One that contains routes for blob manager and another one that contains routes
3865
3900
  * for data stores.
3866
3901
  */
3867
- private getDataStoreAndBlobManagerRoutes(routes: readonly string[]) {
3902
+ private getDataStoreAndBlobManagerRoutes(routes: readonly string[]): {
3903
+ blobManagerRoutes: string[];
3904
+ dataStoreRoutes: string[];
3905
+ } {
3868
3906
  const blobManagerRoutes: string[] = [];
3869
3907
  const dataStoreRoutes: string[] = [];
3870
3908
  for (const route of routes) {
@@ -3883,11 +3921,17 @@ export class ContainerRuntime
3883
3921
  */
3884
3922
  public async collectGarbage(
3885
3923
  options: {
3886
- /** Logger to use for logging GC events */
3924
+ /**
3925
+ * Logger to use for logging GC events
3926
+ */
3887
3927
  logger?: ITelemetryLoggerExt;
3888
- /** True to run GC sweep phase after the mark phase */
3928
+ /**
3929
+ * True to run GC sweep phase after the mark phase
3930
+ */
3889
3931
  runSweep?: boolean;
3890
- /** True to generate full GC data */
3932
+ /**
3933
+ * True to generate full GC data
3934
+ */
3891
3935
  fullGC?: boolean;
3892
3936
  },
3893
3937
  telemetryContext?: ITelemetryContext,
@@ -3902,7 +3946,11 @@ export class ContainerRuntime
3902
3946
  * @param toPath - The absolute path of the outbound node that is referenced.
3903
3947
  * @param messageTimestampMs - The timestamp of the message that added the reference.
3904
3948
  */
3905
- public addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number) {
3949
+ public addedGCOutboundRoute(
3950
+ fromPath: string,
3951
+ toPath: string,
3952
+ messageTimestampMs?: number,
3953
+ ): void {
3906
3954
  // This is always called when processing an op so messageTimestampMs should exist. Due to back-compat
3907
3955
  // across the data store runtime / container runtime boundary, this may be undefined and if so, get
3908
3956
  // the timestamp from the last processed message which should exist.
@@ -4171,7 +4219,7 @@ export class ContainerRuntime
4171
4219
  // Counting dataStores and handles
4172
4220
  // Because handles are unchanged dataStores in the current logic,
4173
4221
  // summarized dataStore count is total dataStore count minus handle count
4174
- const dataStoreTree: SummaryObject | undefined = summaryTree.tree[channelsTreeName];
4222
+ const dataStoreTree = summaryTree.tree[channelsTreeName];
4175
4223
 
4176
4224
  assert(dataStoreTree.type === SummaryType.Tree, 0x1fc /* "summary is not a tree" */);
4177
4225
  const handleCount = Object.values(dataStoreTree.tree).filter(
@@ -4363,11 +4411,11 @@ export class ContainerRuntime
4363
4411
  return this.pendingStateManager.pendingMessagesCount + this.outbox.messageCount;
4364
4412
  }
4365
4413
 
4366
- private hasPendingMessages() {
4414
+ private hasPendingMessages(): boolean {
4367
4415
  return this.pendingMessagesCount !== 0;
4368
4416
  }
4369
4417
 
4370
- private updateDocumentDirtyState(dirty: boolean) {
4418
+ private updateDocumentDirtyState(dirty: boolean): void {
4371
4419
  if (this.attachState !== AttachState.Attached) {
4372
4420
  assert(dirty, 0x3d2 /* Non-attached container is dirty */);
4373
4421
  } else {
@@ -4393,9 +4441,12 @@ export class ContainerRuntime
4393
4441
  | ContainerMessageType.FluidDataStoreOp
4394
4442
  | ContainerMessageType.Alias
4395
4443
  | ContainerMessageType.Attach,
4444
+ // TODO: better typing
4445
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
4396
4446
  contents: any,
4397
4447
  localOpMetadata: unknown = undefined,
4398
4448
  ): void {
4449
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
4399
4450
  this.submit({ type, contents }, localOpMetadata);
4400
4451
  }
4401
4452
 
@@ -4517,13 +4568,13 @@ export class ContainerRuntime
4517
4568
  }
4518
4569
  }
4519
4570
 
4520
- private scheduleFlush() {
4571
+ private scheduleFlush(): void {
4521
4572
  if (this.flushTaskExists) {
4522
4573
  return;
4523
4574
  }
4524
4575
 
4525
4576
  this.flushTaskExists = true;
4526
- const flush = () => {
4577
+ const flush = (): void => {
4527
4578
  this.flushTaskExists = false;
4528
4579
  try {
4529
4580
  this.flush();
@@ -4557,7 +4608,10 @@ export class ContainerRuntime
4557
4608
  }
4558
4609
  }
4559
4610
 
4560
- private submitSummaryMessage(contents: ISummaryContent, referenceSequenceNumber: number) {
4611
+ private submitSummaryMessage(
4612
+ contents: ISummaryContent,
4613
+ referenceSequenceNumber: number,
4614
+ ): number {
4561
4615
  this.verifyNotClosed();
4562
4616
  assert(
4563
4617
  this.connected,
@@ -4577,7 +4631,7 @@ export class ContainerRuntime
4577
4631
  * Throw an error if the runtime is closed. Methods that are expected to potentially
4578
4632
  * be called after dispose due to asynchrony should not call this.
4579
4633
  */
4580
- private verifyNotClosed() {
4634
+ private verifyNotClosed(): void {
4581
4635
  if (this._disposed) {
4582
4636
  throw new Error("Runtime is closed");
4583
4637
  }
@@ -4589,7 +4643,7 @@ export class ContainerRuntime
4589
4643
  * @remarks - If the "Offline Load" feature is enabled, the batchId is included in the resubmitted messages,
4590
4644
  * for correlation to detect container forking.
4591
4645
  */
4592
- private reSubmitBatch(batch: PendingMessageResubmitData[], batchId: BatchId) {
4646
+ private reSubmitBatch(batch: PendingMessageResubmitData[], batchId: BatchId): void {
4593
4647
  this.orderSequentially(() => {
4594
4648
  for (const message of batch) {
4595
4649
  this.reSubmit(message);
@@ -4601,7 +4655,7 @@ export class ContainerRuntime
4601
4655
  this.flush(this.offlineEnabled ? batchId : undefined);
4602
4656
  }
4603
4657
 
4604
- private reSubmit(message: PendingMessageResubmitData) {
4658
+ private reSubmit(message: PendingMessageResubmitData): void {
4605
4659
  // Need to parse from string for back-compat
4606
4660
  const containerRuntimeMessage = this.parseLocalOpContent(message.content);
4607
4661
  this.reSubmitCore(containerRuntimeMessage, message.localOpMetadata, message.opMetadata);
@@ -4618,7 +4672,7 @@ export class ContainerRuntime
4618
4672
  message: LocalContainerRuntimeMessage,
4619
4673
  localOpMetadata: unknown,
4620
4674
  opMetadata: Record<string, unknown> | undefined,
4621
- ) {
4675
+ ): void {
4622
4676
  assert(
4623
4677
  !this.isSummarizerClient,
4624
4678
  0x8f2 /* Summarizer never reconnects so should never resubmit */,
@@ -4663,7 +4717,7 @@ export class ContainerRuntime
4663
4717
  }
4664
4718
  }
4665
4719
 
4666
- private rollback(content: string | undefined, localOpMetadata: unknown) {
4720
+ private rollback(content: string | undefined, localOpMetadata: unknown): void {
4667
4721
  // Need to parse from string for back-compat
4668
4722
  const { type, contents } = this.parseLocalOpContent(content);
4669
4723
  switch (type) {
@@ -4677,8 +4731,10 @@ export class ContainerRuntime
4677
4731
  }
4678
4732
  }
4679
4733
 
4680
- /** Implementation of ISummarizerInternalsProvider.refreshLatestSummaryAck */
4681
- public async refreshLatestSummaryAck(options: IRefreshSummaryAckOptions) {
4734
+ /**
4735
+ * Implementation of ISummarizerInternalsProvider.refreshLatestSummaryAck
4736
+ */
4737
+ public async refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void> {
4682
4738
  const { proposalHandle, ackHandle, summaryRefSeq, summaryLogger } = options;
4683
4739
  // proposalHandle is always passed from RunningSummarizer.
4684
4740
  assert(proposalHandle !== undefined, 0x766 /* proposalHandle should be available */);
@@ -4735,7 +4791,7 @@ export class ContainerRuntime
4735
4791
  targetRefSeq: number,
4736
4792
  targetAckHandle: string,
4737
4793
  logger: ITelemetryLoggerExt,
4738
- ) {
4794
+ ): Promise<void> {
4739
4795
  const fetchedSnapshotRefSeq = await PerformanceEvent.timedExecAsync(
4740
4796
  logger,
4741
4797
  { eventName: "RefreshLatestSummaryAckFetch" },
@@ -4799,7 +4855,8 @@ export class ContainerRuntime
4799
4855
  }
4800
4856
 
4801
4857
  props.getSnapshotDuration = trace.trace().duration;
4802
- const readAndParseBlob = async <T>(id: string) => readAndParse<T>(this.storage, id);
4858
+ const readAndParseBlob = async <T>(id: string): Promise<T> =>
4859
+ readAndParse<T>(this.storage, id);
4803
4860
  const snapshotRefSeq = await seqFromTree(snapshotTree, readAndParseBlob);
4804
4861
  props.snapshotRefSeq = snapshotRefSeq;
4805
4862
  props.newerSnapshotPresent = snapshotRefSeq >= targetRefSeq;
@@ -4852,7 +4909,7 @@ export class ContainerRuntime
4852
4909
  const logAndReturnPendingState = (
4853
4910
  event: PerformanceEvent,
4854
4911
  pendingState?: IPendingRuntimeState,
4855
- ) => {
4912
+ ): IPendingRuntimeState | undefined => {
4856
4913
  event.end({
4857
4914
  attachmentBlobsSize: Object.keys(pendingState?.pendingAttachmentBlobs ?? {}).length,
4858
4915
  pendingOpsSize: pendingState?.pending?.pendingStates.length,
@@ -4916,7 +4973,7 @@ export class ContainerRuntime
4916
4973
 
4917
4974
  private validateSummaryHeuristicConfiguration(
4918
4975
  configuration: ISummaryConfigurationHeuristics,
4919
- ) {
4976
+ ): void {
4920
4977
  // eslint-disable-next-line no-restricted-syntax
4921
4978
  for (const prop in configuration) {
4922
4979
  if (typeof configuration[prop] === "number" && configuration[prop] < 0) {