@fluidframework/container-runtime 2.13.0 → 2.21.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 (489) hide show
  1. package/.eslintrc.cjs +71 -5
  2. package/CHANGELOG.md +84 -0
  3. package/api-report/container-runtime.legacy.alpha.api.md +38 -232
  4. package/dist/batchTracker.d.ts +1 -2
  5. package/dist/batchTracker.d.ts.map +1 -1
  6. package/dist/batchTracker.js +1 -1
  7. package/dist/batchTracker.js.map +1 -1
  8. package/dist/blobManager/blobManager.d.ts +5 -1
  9. package/dist/blobManager/blobManager.d.ts.map +1 -1
  10. package/dist/blobManager/blobManager.js +30 -13
  11. package/dist/blobManager/blobManager.js.map +1 -1
  12. package/dist/blobManager/blobManagerSnapSum.d.ts +1 -0
  13. package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  14. package/dist/blobManager/blobManagerSnapSum.js +7 -5
  15. package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
  16. package/dist/channelCollection.d.ts +23 -12
  17. package/dist/channelCollection.d.ts.map +1 -1
  18. package/dist/channelCollection.js +85 -53
  19. package/dist/channelCollection.js.map +1 -1
  20. package/dist/connectionTelemetry.d.ts +2 -2
  21. package/dist/connectionTelemetry.d.ts.map +1 -1
  22. package/dist/connectionTelemetry.js +10 -6
  23. package/dist/connectionTelemetry.js.map +1 -1
  24. package/dist/containerHandleContext.d.ts +1 -1
  25. package/dist/containerHandleContext.d.ts.map +1 -1
  26. package/dist/containerHandleContext.js.map +1 -1
  27. package/dist/containerRuntime.d.ts +87 -94
  28. package/dist/containerRuntime.d.ts.map +1 -1
  29. package/dist/containerRuntime.js +312 -226
  30. package/dist/containerRuntime.js.map +1 -1
  31. package/dist/dataStore.d.ts +7 -3
  32. package/dist/dataStore.d.ts.map +1 -1
  33. package/dist/dataStore.js +8 -4
  34. package/dist/dataStore.js.map +1 -1
  35. package/dist/dataStoreContext.d.ts +41 -25
  36. package/dist/dataStoreContext.d.ts.map +1 -1
  37. package/dist/dataStoreContext.js +47 -29
  38. package/dist/dataStoreContext.js.map +1 -1
  39. package/dist/dataStoreContexts.d.ts +6 -2
  40. package/dist/dataStoreContexts.d.ts.map +1 -1
  41. package/dist/dataStoreContexts.js +7 -2
  42. package/dist/dataStoreContexts.js.map +1 -1
  43. package/dist/dataStoreRegistry.d.ts +1 -1
  44. package/dist/dataStoreRegistry.d.ts.map +1 -1
  45. package/dist/dataStoreRegistry.js.map +1 -1
  46. package/dist/deltaManagerProxies.d.ts +1 -17
  47. package/dist/deltaManagerProxies.d.ts.map +1 -1
  48. package/dist/deltaManagerProxies.js.map +1 -1
  49. package/dist/deltaScheduler.d.ts +9 -6
  50. package/dist/deltaScheduler.d.ts.map +1 -1
  51. package/dist/deltaScheduler.js +95 -89
  52. package/dist/deltaScheduler.js.map +1 -1
  53. package/dist/gc/garbageCollection.d.ts +21 -7
  54. package/dist/gc/garbageCollection.d.ts.map +1 -1
  55. package/dist/gc/garbageCollection.js +48 -19
  56. package/dist/gc/garbageCollection.js.map +1 -1
  57. package/dist/gc/gcConfigs.d.ts +11 -0
  58. package/dist/gc/gcConfigs.d.ts.map +1 -1
  59. package/dist/gc/gcConfigs.js +5 -2
  60. package/dist/gc/gcConfigs.js.map +1 -1
  61. package/dist/gc/gcDefinitions.d.ts +218 -70
  62. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  63. package/dist/gc/gcDefinitions.js +40 -13
  64. package/dist/gc/gcDefinitions.js.map +1 -1
  65. package/dist/gc/gcHelpers.d.ts +6 -2
  66. package/dist/gc/gcHelpers.d.ts.map +1 -1
  67. package/dist/gc/gcHelpers.js +14 -7
  68. package/dist/gc/gcHelpers.js.map +1 -1
  69. package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
  70. package/dist/gc/gcSummaryDefinitions.d.ts +18 -6
  71. package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
  72. package/dist/gc/gcSummaryDefinitions.js.map +1 -1
  73. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  74. package/dist/gc/gcSummaryStateTracker.js +2 -1
  75. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  76. package/dist/gc/gcTelemetry.d.ts +33 -11
  77. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  78. package/dist/gc/gcTelemetry.js +35 -17
  79. package/dist/gc/gcTelemetry.js.map +1 -1
  80. package/dist/gc/gcUnreferencedStateTracker.d.ts +42 -13
  81. package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  82. package/dist/gc/gcUnreferencedStateTracker.js +27 -9
  83. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
  84. package/dist/gc/index.d.ts +1 -0
  85. package/dist/gc/index.d.ts.map +1 -1
  86. package/dist/gc/index.js +3 -1
  87. package/dist/gc/index.js.map +1 -1
  88. package/dist/inboundBatchAggregator.d.ts +34 -0
  89. package/dist/inboundBatchAggregator.d.ts.map +1 -0
  90. package/dist/inboundBatchAggregator.js +185 -0
  91. package/dist/inboundBatchAggregator.js.map +1 -0
  92. package/dist/index.d.ts +1 -1
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js.map +1 -1
  95. package/dist/layerCompatState.d.ts +19 -0
  96. package/dist/layerCompatState.d.ts.map +1 -0
  97. package/dist/layerCompatState.js +64 -0
  98. package/dist/layerCompatState.js.map +1 -0
  99. package/dist/legacy.d.ts +0 -4
  100. package/dist/messageTypes.d.ts +14 -5
  101. package/dist/messageTypes.d.ts.map +1 -1
  102. package/dist/messageTypes.js.map +1 -1
  103. package/dist/metadata.d.ts +12 -4
  104. package/dist/metadata.d.ts.map +1 -1
  105. package/dist/metadata.js +6 -2
  106. package/dist/metadata.js.map +1 -1
  107. package/dist/opLifecycle/batchManager.d.ts +9 -3
  108. package/dist/opLifecycle/batchManager.d.ts.map +1 -1
  109. package/dist/opLifecycle/batchManager.js +3 -1
  110. package/dist/opLifecycle/batchManager.js.map +1 -1
  111. package/dist/opLifecycle/duplicateBatchDetector.d.ts +9 -3
  112. package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  113. package/dist/opLifecycle/duplicateBatchDetector.js +11 -5
  114. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  115. package/dist/opLifecycle/opCompressor.d.ts +3 -2
  116. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  117. package/dist/opLifecycle/opCompressor.js +13 -19
  118. package/dist/opLifecycle/opCompressor.js.map +1 -1
  119. package/dist/opLifecycle/opDecompressor.d.ts +6 -1
  120. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  121. package/dist/opLifecycle/opDecompressor.js +16 -8
  122. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  123. package/dist/opLifecycle/opGroupingManager.d.ts +1 -2
  124. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  125. package/dist/opLifecycle/opGroupingManager.js +9 -6
  126. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  127. package/dist/opLifecycle/opSplitter.d.ts +13 -10
  128. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  129. package/dist/opLifecycle/opSplitter.js +16 -11
  130. package/dist/opLifecycle/opSplitter.js.map +1 -1
  131. package/dist/opLifecycle/outbox.d.ts +4 -4
  132. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  133. package/dist/opLifecycle/outbox.js +17 -16
  134. package/dist/opLifecycle/outbox.js.map +1 -1
  135. package/dist/opLifecycle/remoteMessageProcessor.d.ts +9 -3
  136. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  137. package/dist/opLifecycle/remoteMessageProcessor.js +3 -1
  138. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  139. package/dist/package.json +2 -1
  140. package/dist/packageVersion.d.ts +1 -1
  141. package/dist/packageVersion.js +1 -1
  142. package/dist/packageVersion.js.map +1 -1
  143. package/dist/pendingStateManager.d.ts +22 -11
  144. package/dist/pendingStateManager.d.ts.map +1 -1
  145. package/dist/pendingStateManager.js +24 -15
  146. package/dist/pendingStateManager.js.map +1 -1
  147. package/dist/summary/documentSchema.d.ts +7 -0
  148. package/dist/summary/documentSchema.d.ts.map +1 -1
  149. package/dist/summary/documentSchema.js +8 -4
  150. package/dist/summary/documentSchema.js.map +1 -1
  151. package/dist/summary/index.d.ts +1 -1
  152. package/dist/summary/index.d.ts.map +1 -1
  153. package/dist/summary/index.js.map +1 -1
  154. package/dist/summary/orderedClientElection.d.ts +94 -31
  155. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  156. package/dist/summary/orderedClientElection.js +28 -16
  157. package/dist/summary/orderedClientElection.js.map +1 -1
  158. package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -0
  159. package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  160. package/dist/summary/runWhileConnectedCoordinator.js +7 -2
  161. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
  162. package/dist/summary/runningSummarizer.d.ts +17 -6
  163. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  164. package/dist/summary/runningSummarizer.js +48 -19
  165. package/dist/summary/runningSummarizer.js.map +1 -1
  166. package/dist/summary/summarizer.d.ts +10 -5
  167. package/dist/summary/summarizer.d.ts.map +1 -1
  168. package/dist/summary/summarizer.js +26 -11
  169. package/dist/summary/summarizer.js.map +1 -1
  170. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  171. package/dist/summary/summarizerClientElection.js +1 -0
  172. package/dist/summary/summarizerClientElection.js.map +1 -1
  173. package/dist/summary/summarizerHeuristics.d.ts +6 -2
  174. package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
  175. package/dist/summary/summarizerHeuristics.js +13 -5
  176. package/dist/summary/summarizerHeuristics.js.map +1 -1
  177. package/dist/summary/summarizerNode/index.d.ts.map +1 -1
  178. package/dist/summary/summarizerNode/index.js.map +1 -1
  179. package/dist/summary/summarizerNode/summarizerNode.d.ts +24 -8
  180. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  181. package/dist/summary/summarizerNode/summarizerNode.js +45 -36
  182. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  183. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
  184. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  185. package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -1
  186. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  187. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +13 -5
  188. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  189. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +15 -7
  190. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  191. package/dist/summary/summarizerTypes.d.ts +253 -135
  192. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  193. package/dist/summary/summarizerTypes.js.map +1 -1
  194. package/dist/summary/summaryCollection.d.ts +3 -4
  195. package/dist/summary/summaryCollection.d.ts.map +1 -1
  196. package/dist/summary/summaryCollection.js +10 -8
  197. package/dist/summary/summaryCollection.js.map +1 -1
  198. package/dist/summary/summaryFormat.d.ts +28 -9
  199. package/dist/summary/summaryFormat.d.ts.map +1 -1
  200. package/dist/summary/summaryFormat.js +3 -2
  201. package/dist/summary/summaryFormat.js.map +1 -1
  202. package/dist/summary/summaryGenerator.d.ts +9 -3
  203. package/dist/summary/summaryGenerator.d.ts.map +1 -1
  204. package/dist/summary/summaryGenerator.js +22 -9
  205. package/dist/summary/summaryGenerator.js.map +1 -1
  206. package/dist/summary/summaryManager.d.ts +8 -4
  207. package/dist/summary/summaryManager.d.ts.map +1 -1
  208. package/dist/summary/summaryManager.js +20 -9
  209. package/dist/summary/summaryManager.js.map +1 -1
  210. package/dist/throttler.d.ts +26 -10
  211. package/dist/throttler.d.ts.map +1 -1
  212. package/dist/throttler.js +12 -4
  213. package/dist/throttler.js.map +1 -1
  214. package/lib/batchTracker.d.ts +1 -2
  215. package/lib/batchTracker.d.ts.map +1 -1
  216. package/lib/batchTracker.js +2 -2
  217. package/lib/batchTracker.js.map +1 -1
  218. package/lib/blobManager/blobManager.d.ts +5 -1
  219. package/lib/blobManager/blobManager.d.ts.map +1 -1
  220. package/lib/blobManager/blobManager.js +30 -13
  221. package/lib/blobManager/blobManager.js.map +1 -1
  222. package/lib/blobManager/blobManagerSnapSum.d.ts +1 -0
  223. package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  224. package/lib/blobManager/blobManagerSnapSum.js +7 -5
  225. package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
  226. package/lib/channelCollection.d.ts +23 -12
  227. package/lib/channelCollection.d.ts.map +1 -1
  228. package/lib/channelCollection.js +88 -54
  229. package/lib/channelCollection.js.map +1 -1
  230. package/lib/connectionTelemetry.d.ts +2 -2
  231. package/lib/connectionTelemetry.d.ts.map +1 -1
  232. package/lib/connectionTelemetry.js +11 -7
  233. package/lib/connectionTelemetry.js.map +1 -1
  234. package/lib/containerHandleContext.d.ts +1 -1
  235. package/lib/containerHandleContext.d.ts.map +1 -1
  236. package/lib/containerHandleContext.js.map +1 -1
  237. package/lib/containerRuntime.d.ts +87 -94
  238. package/lib/containerRuntime.d.ts.map +1 -1
  239. package/lib/containerRuntime.js +319 -228
  240. package/lib/containerRuntime.js.map +1 -1
  241. package/lib/dataStore.d.ts +7 -3
  242. package/lib/dataStore.d.ts.map +1 -1
  243. package/lib/dataStore.js +8 -4
  244. package/lib/dataStore.js.map +1 -1
  245. package/lib/dataStoreContext.d.ts +41 -25
  246. package/lib/dataStoreContext.d.ts.map +1 -1
  247. package/lib/dataStoreContext.js +47 -29
  248. package/lib/dataStoreContext.js.map +1 -1
  249. package/lib/dataStoreContexts.d.ts +6 -2
  250. package/lib/dataStoreContexts.d.ts.map +1 -1
  251. package/lib/dataStoreContexts.js +7 -2
  252. package/lib/dataStoreContexts.js.map +1 -1
  253. package/lib/dataStoreRegistry.d.ts +1 -1
  254. package/lib/dataStoreRegistry.d.ts.map +1 -1
  255. package/lib/dataStoreRegistry.js.map +1 -1
  256. package/lib/deltaManagerProxies.d.ts +1 -17
  257. package/lib/deltaManagerProxies.d.ts.map +1 -1
  258. package/lib/deltaManagerProxies.js.map +1 -1
  259. package/lib/deltaScheduler.d.ts +9 -6
  260. package/lib/deltaScheduler.d.ts.map +1 -1
  261. package/lib/deltaScheduler.js +96 -90
  262. package/lib/deltaScheduler.js.map +1 -1
  263. package/lib/gc/garbageCollection.d.ts +21 -7
  264. package/lib/gc/garbageCollection.d.ts.map +1 -1
  265. package/lib/gc/garbageCollection.js +51 -20
  266. package/lib/gc/garbageCollection.js.map +1 -1
  267. package/lib/gc/gcConfigs.d.ts +11 -0
  268. package/lib/gc/gcConfigs.d.ts.map +1 -1
  269. package/lib/gc/gcConfigs.js +4 -2
  270. package/lib/gc/gcConfigs.js.map +1 -1
  271. package/lib/gc/gcDefinitions.d.ts +218 -70
  272. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  273. package/lib/gc/gcDefinitions.js +40 -13
  274. package/lib/gc/gcDefinitions.js.map +1 -1
  275. package/lib/gc/gcHelpers.d.ts +6 -2
  276. package/lib/gc/gcHelpers.d.ts.map +1 -1
  277. package/lib/gc/gcHelpers.js +14 -7
  278. package/lib/gc/gcHelpers.js.map +1 -1
  279. package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
  280. package/lib/gc/gcSummaryDefinitions.d.ts +18 -6
  281. package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
  282. package/lib/gc/gcSummaryDefinitions.js.map +1 -1
  283. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  284. package/lib/gc/gcSummaryStateTracker.js +2 -1
  285. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  286. package/lib/gc/gcTelemetry.d.ts +33 -11
  287. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  288. package/lib/gc/gcTelemetry.js +38 -18
  289. package/lib/gc/gcTelemetry.js.map +1 -1
  290. package/lib/gc/gcUnreferencedStateTracker.d.ts +42 -13
  291. package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  292. package/lib/gc/gcUnreferencedStateTracker.js +27 -9
  293. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
  294. package/lib/gc/index.d.ts +1 -0
  295. package/lib/gc/index.d.ts.map +1 -1
  296. package/lib/gc/index.js +1 -0
  297. package/lib/gc/index.js.map +1 -1
  298. package/lib/inboundBatchAggregator.d.ts +34 -0
  299. package/lib/inboundBatchAggregator.d.ts.map +1 -0
  300. package/lib/inboundBatchAggregator.js +181 -0
  301. package/lib/inboundBatchAggregator.js.map +1 -0
  302. package/lib/index.d.ts +1 -1
  303. package/lib/index.d.ts.map +1 -1
  304. package/lib/index.js.map +1 -1
  305. package/lib/layerCompatState.d.ts +19 -0
  306. package/lib/layerCompatState.d.ts.map +1 -0
  307. package/lib/layerCompatState.js +60 -0
  308. package/lib/layerCompatState.js.map +1 -0
  309. package/lib/legacy.d.ts +0 -4
  310. package/lib/messageTypes.d.ts +14 -5
  311. package/lib/messageTypes.d.ts.map +1 -1
  312. package/lib/messageTypes.js.map +1 -1
  313. package/lib/metadata.d.ts +12 -4
  314. package/lib/metadata.d.ts.map +1 -1
  315. package/lib/metadata.js +6 -2
  316. package/lib/metadata.js.map +1 -1
  317. package/lib/opLifecycle/batchManager.d.ts +9 -3
  318. package/lib/opLifecycle/batchManager.d.ts.map +1 -1
  319. package/lib/opLifecycle/batchManager.js +3 -1
  320. package/lib/opLifecycle/batchManager.js.map +1 -1
  321. package/lib/opLifecycle/duplicateBatchDetector.d.ts +9 -3
  322. package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  323. package/lib/opLifecycle/duplicateBatchDetector.js +11 -5
  324. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  325. package/lib/opLifecycle/opCompressor.d.ts +3 -2
  326. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  327. package/lib/opLifecycle/opCompressor.js +14 -20
  328. package/lib/opLifecycle/opCompressor.js.map +1 -1
  329. package/lib/opLifecycle/opDecompressor.d.ts +6 -1
  330. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  331. package/lib/opLifecycle/opDecompressor.js +17 -9
  332. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  333. package/lib/opLifecycle/opGroupingManager.d.ts +1 -2
  334. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  335. package/lib/opLifecycle/opGroupingManager.js +10 -7
  336. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  337. package/lib/opLifecycle/opSplitter.d.ts +13 -10
  338. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  339. package/lib/opLifecycle/opSplitter.js +16 -11
  340. package/lib/opLifecycle/opSplitter.js.map +1 -1
  341. package/lib/opLifecycle/outbox.d.ts +4 -4
  342. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  343. package/lib/opLifecycle/outbox.js +17 -16
  344. package/lib/opLifecycle/outbox.js.map +1 -1
  345. package/lib/opLifecycle/remoteMessageProcessor.d.ts +9 -3
  346. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  347. package/lib/opLifecycle/remoteMessageProcessor.js +3 -1
  348. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  349. package/lib/packageVersion.d.ts +1 -1
  350. package/lib/packageVersion.js +1 -1
  351. package/lib/packageVersion.js.map +1 -1
  352. package/lib/pendingStateManager.d.ts +22 -11
  353. package/lib/pendingStateManager.d.ts.map +1 -1
  354. package/lib/pendingStateManager.js +25 -16
  355. package/lib/pendingStateManager.js.map +1 -1
  356. package/lib/summary/documentSchema.d.ts +7 -0
  357. package/lib/summary/documentSchema.d.ts.map +1 -1
  358. package/lib/summary/documentSchema.js +8 -4
  359. package/lib/summary/documentSchema.js.map +1 -1
  360. package/lib/summary/index.d.ts +1 -1
  361. package/lib/summary/index.d.ts.map +1 -1
  362. package/lib/summary/index.js.map +1 -1
  363. package/lib/summary/orderedClientElection.d.ts +94 -31
  364. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  365. package/lib/summary/orderedClientElection.js +28 -16
  366. package/lib/summary/orderedClientElection.js.map +1 -1
  367. package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -0
  368. package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  369. package/lib/summary/runWhileConnectedCoordinator.js +7 -2
  370. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
  371. package/lib/summary/runningSummarizer.d.ts +17 -6
  372. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  373. package/lib/summary/runningSummarizer.js +48 -19
  374. package/lib/summary/runningSummarizer.js.map +1 -1
  375. package/lib/summary/summarizer.d.ts +10 -5
  376. package/lib/summary/summarizer.d.ts.map +1 -1
  377. package/lib/summary/summarizer.js +26 -11
  378. package/lib/summary/summarizer.js.map +1 -1
  379. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  380. package/lib/summary/summarizerClientElection.js +1 -0
  381. package/lib/summary/summarizerClientElection.js.map +1 -1
  382. package/lib/summary/summarizerHeuristics.d.ts +6 -2
  383. package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
  384. package/lib/summary/summarizerHeuristics.js +13 -5
  385. package/lib/summary/summarizerHeuristics.js.map +1 -1
  386. package/lib/summary/summarizerNode/index.d.ts.map +1 -1
  387. package/lib/summary/summarizerNode/index.js.map +1 -1
  388. package/lib/summary/summarizerNode/summarizerNode.d.ts +24 -8
  389. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  390. package/lib/summary/summarizerNode/summarizerNode.js +45 -36
  391. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  392. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
  393. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  394. package/lib/summary/summarizerNode/summarizerNodeUtils.js +3 -1
  395. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  396. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +13 -5
  397. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  398. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +15 -7
  399. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  400. package/lib/summary/summarizerTypes.d.ts +253 -135
  401. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  402. package/lib/summary/summarizerTypes.js.map +1 -1
  403. package/lib/summary/summaryCollection.d.ts +3 -4
  404. package/lib/summary/summaryCollection.d.ts.map +1 -1
  405. package/lib/summary/summaryCollection.js +10 -8
  406. package/lib/summary/summaryCollection.js.map +1 -1
  407. package/lib/summary/summaryFormat.d.ts +28 -9
  408. package/lib/summary/summaryFormat.d.ts.map +1 -1
  409. package/lib/summary/summaryFormat.js +2 -2
  410. package/lib/summary/summaryFormat.js.map +1 -1
  411. package/lib/summary/summaryGenerator.d.ts +9 -3
  412. package/lib/summary/summaryGenerator.d.ts.map +1 -1
  413. package/lib/summary/summaryGenerator.js +22 -9
  414. package/lib/summary/summaryGenerator.js.map +1 -1
  415. package/lib/summary/summaryManager.d.ts +8 -4
  416. package/lib/summary/summaryManager.d.ts.map +1 -1
  417. package/lib/summary/summaryManager.js +20 -9
  418. package/lib/summary/summaryManager.js.map +1 -1
  419. package/lib/throttler.d.ts +26 -10
  420. package/lib/throttler.d.ts.map +1 -1
  421. package/lib/throttler.js +12 -4
  422. package/lib/throttler.js.map +1 -1
  423. package/package.json +22 -31
  424. package/src/batchTracker.ts +34 -36
  425. package/src/blobManager/blobManager.ts +54 -33
  426. package/src/blobManager/blobManagerSnapSum.ts +10 -10
  427. package/src/channelCollection.ts +108 -82
  428. package/src/connectionTelemetry.ts +43 -19
  429. package/src/containerHandleContext.ts +2 -2
  430. package/src/containerRuntime.ts +492 -364
  431. package/src/dataStore.ts +17 -9
  432. package/src/dataStoreContext.ts +94 -73
  433. package/src/dataStoreContexts.ts +17 -12
  434. package/src/dataStoreRegistry.ts +1 -1
  435. package/src/deltaManagerProxies.ts +5 -5
  436. package/src/deltaScheduler.ts +24 -18
  437. package/src/gc/garbageCollection.ts +89 -40
  438. package/src/gc/gcConfigs.ts +13 -5
  439. package/src/gc/gcDefinitions.ts +224 -70
  440. package/src/gc/gcHelpers.ts +22 -11
  441. package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
  442. package/src/gc/gcSummaryDefinitions.ts +18 -6
  443. package/src/gc/gcSummaryStateTracker.ts +7 -3
  444. package/src/gc/gcTelemetry.ts +73 -30
  445. package/src/gc/gcUnreferencedStateTracker.ts +40 -16
  446. package/src/gc/index.ts +1 -0
  447. package/src/{scheduleManager.ts → inboundBatchAggregator.ts} +55 -122
  448. package/src/index.ts +0 -3
  449. package/src/layerCompatState.ts +75 -0
  450. package/src/messageTypes.ts +16 -5
  451. package/src/metadata.ts +12 -4
  452. package/src/opLifecycle/README.md +43 -34
  453. package/src/opLifecycle/batchManager.ts +12 -6
  454. package/src/opLifecycle/duplicateBatchDetector.ts +12 -6
  455. package/src/opLifecycle/opCompressor.ts +22 -25
  456. package/src/opLifecycle/opDecompressor.ts +23 -11
  457. package/src/opLifecycle/opGroupingManager.ts +16 -11
  458. package/src/opLifecycle/opSplitter.ts +24 -18
  459. package/src/opLifecycle/outbox.ts +35 -33
  460. package/src/opLifecycle/remoteMessageProcessor.ts +13 -5
  461. package/src/packageVersion.ts +1 -1
  462. package/src/pendingStateManager.ts +49 -26
  463. package/src/summary/documentSchema.ts +41 -22
  464. package/src/summary/index.ts +0 -3
  465. package/src/summary/orderedClientElection.ts +114 -49
  466. package/src/summary/runWhileConnectedCoordinator.ts +12 -3
  467. package/src/summary/runningSummarizer.ts +79 -36
  468. package/src/summary/summarizer.ts +51 -25
  469. package/src/summary/summarizerClientElection.ts +4 -2
  470. package/src/summary/summarizerHeuristics.ts +23 -12
  471. package/src/summary/summarizerNode/index.ts +1 -0
  472. package/src/summary/summarizerNode/summarizerNode.ts +54 -43
  473. package/src/summary/summarizerNode/summarizerNodeUtils.ts +48 -16
  474. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +25 -15
  475. package/src/summary/summarizerTypes.ts +253 -139
  476. package/src/summary/summaryCollection.ts +41 -31
  477. package/src/summary/summaryFormat.ts +34 -13
  478. package/src/summary/summaryGenerator.ts +39 -18
  479. package/src/summary/summaryManager.ts +36 -24
  480. package/src/throttler.ts +23 -11
  481. package/container-runtime.test-files.tar +0 -0
  482. package/dist/scheduleManager.d.ts +0 -28
  483. package/dist/scheduleManager.d.ts.map +0 -1
  484. package/dist/scheduleManager.js +0 -233
  485. package/dist/scheduleManager.js.map +0 -1
  486. package/lib/scheduleManager.d.ts +0 -28
  487. package/lib/scheduleManager.d.ts.map +0 -1
  488. package/lib/scheduleManager.js +0 -229
  489. package/lib/scheduleManager.js.map +0 -1
package/src/dataStore.ts CHANGED
@@ -26,9 +26,13 @@ import { ContainerMessageType } from "./messageTypes.js";
26
26
  * alias to a datastore
27
27
  */
28
28
  export interface IDataStoreAliasMessage {
29
- /** The internal id of the datastore */
29
+ /**
30
+ * The internal id of the datastore
31
+ */
30
32
  readonly internalId: string;
31
- /** The alias name to be assigned to the datastore */
33
+ /**
34
+ * The alias name to be assigned to the datastore
35
+ */
32
36
  readonly alias: string;
33
37
  }
34
38
 
@@ -39,11 +43,12 @@ export interface IDataStoreAliasMessage {
39
43
  * @returns True if the {@link IDataStoreAliasMessage} is fully implemented, false otherwise
40
44
  */
41
45
  export const isDataStoreAliasMessage = (
42
- maybeDataStoreAliasMessage: any,
46
+ maybeDataStoreAliasMessage: unknown,
43
47
  ): maybeDataStoreAliasMessage is IDataStoreAliasMessage => {
44
48
  return (
45
- typeof maybeDataStoreAliasMessage?.internalId === "string" &&
46
- typeof maybeDataStoreAliasMessage?.alias === "string"
49
+ typeof (maybeDataStoreAliasMessage as Partial<IDataStoreAliasMessage>)?.internalId ===
50
+ "string" &&
51
+ typeof (maybeDataStoreAliasMessage as Partial<IDataStoreAliasMessage>)?.alias === "string"
47
52
  );
48
53
  };
49
54
 
@@ -77,18 +82,20 @@ class DataStore implements IDataStore {
77
82
  switch (this.aliasState) {
78
83
  // If we're already aliasing, check if it's for the same value and return
79
84
  // the stored promise, otherwise return 'AlreadyAliased'
80
- case AliasState.Aliasing:
85
+ case AliasState.Aliasing: {
81
86
  assert(
82
87
  this.aliasResult !== undefined,
83
88
  0x316 /* There should be a cached promise of in-progress aliasing */,
84
89
  );
85
90
  await this.aliasResult;
86
91
  return this.alias === alias ? "Success" : "AlreadyAliased";
92
+ }
87
93
 
88
94
  // If this datastore is already aliased, return true only if this
89
95
  // is a repeated call for the same alias
90
- case AliasState.Aliased:
96
+ case AliasState.Aliased: {
91
97
  return this.alias === alias ? "Success" : "AlreadyAliased";
98
+ }
92
99
 
93
100
  case AliasState.None: {
94
101
  const existingAlias = this.pendingAliases.get(alias);
@@ -103,8 +110,9 @@ class DataStore implements IDataStore {
103
110
  break;
104
111
  }
105
112
 
106
- default:
113
+ default: {
107
114
  unreachableCase(this.aliasState);
115
+ }
108
116
  }
109
117
 
110
118
  this.aliasState = AliasState.Aliasing;
@@ -187,7 +195,7 @@ class DataStore implements IDataStore {
187
195
  private async ackBasedPromise<T>(
188
196
  executor: (
189
197
  resolve: (value: T | PromiseLike<T>) => void,
190
- reject: (reason?: any) => void,
198
+ reject: (reason?: unknown) => void,
191
199
  ) => void,
192
200
  ): Promise<T> {
193
201
  let rejectBecauseDispose: () => void;
@@ -14,7 +14,11 @@ import {
14
14
  ITelemetryBaseProperties,
15
15
  type IEvent,
16
16
  } from "@fluidframework/core-interfaces";
17
- import { type IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
17
+ import {
18
+ type IFluidHandleContext,
19
+ type IFluidHandleInternal,
20
+ type ITelemetryBaseLogger,
21
+ } from "@fluidframework/core-interfaces/internal";
18
22
  import { assert, LazyPromise, unreachableCase } from "@fluidframework/core-utils/internal";
19
23
  import { IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
20
24
  import {
@@ -104,7 +108,9 @@ export function createAttributesBlob(
104
108
  return new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));
105
109
  }
106
110
 
107
- /** @internal */
111
+ /**
112
+ * @internal
113
+ */
108
114
  export interface ISnapshotDetails {
109
115
  pkg: readonly string[];
110
116
  isRootDataStore: boolean;
@@ -152,10 +158,6 @@ export interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContext
152
158
  readonly pkg: Readonly<string[]> | undefined;
153
159
  readonly snapshotTree: ISnapshotTree | undefined;
154
160
  readonly makeLocallyVisibleFn: () => void;
155
- /**
156
- * @deprecated 0.16 Issue #1635, #3631
157
- */
158
- readonly createProps?: any;
159
161
  }
160
162
 
161
163
  /**
@@ -177,7 +179,9 @@ export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContex
177
179
 
178
180
  // back-compat: To be removed in the future.
179
181
  // Added in "2.0.0-rc.2.0.0" timeframe (to support older builds).
180
- /** @internal */
182
+ /**
183
+ * @internal
184
+ */
181
185
  export interface IFluidDataStoreContextEvents extends IEvent {
182
186
  (event: "attaching" | "attached", listener: () => void);
183
187
  }
@@ -195,7 +199,7 @@ export abstract class FluidDataStoreContext
195
199
  return this.pkg;
196
200
  }
197
201
 
198
- public get options(): Record<string | number, any> {
202
+ public get options(): Record<string | number, unknown> {
199
203
  return this.parentContext.options;
200
204
  }
201
205
 
@@ -207,7 +211,7 @@ export abstract class FluidDataStoreContext
207
211
  return this.parentContext.clientDetails;
208
212
  }
209
213
 
210
- public get baseLogger() {
214
+ public get baseLogger(): ITelemetryBaseLogger {
211
215
  return this.parentContext.baseLogger;
212
216
  }
213
217
 
@@ -219,7 +223,7 @@ export abstract class FluidDataStoreContext
219
223
  return this.parentContext.connected;
220
224
  }
221
225
 
222
- public get IFluidHandleContext() {
226
+ public get IFluidHandleContext(): IFluidHandleContext {
223
227
  return this.parentContext.IFluidHandleContext;
224
228
  }
225
229
 
@@ -239,7 +243,7 @@ export abstract class FluidDataStoreContext
239
243
  }
240
244
 
241
245
  private _disposed = false;
242
- public get disposed() {
246
+ public get disposed(): boolean {
243
247
  return this._disposed;
244
248
  }
245
249
 
@@ -248,7 +252,7 @@ export abstract class FluidDataStoreContext
248
252
  * Tombstoned objects are eventually deleted by GC.
249
253
  */
250
254
  private _tombstoned = false;
251
- public get tombstoned() {
255
+ public get tombstoned(): boolean {
252
256
  return this._tombstoned;
253
257
  }
254
258
  /**
@@ -261,7 +265,9 @@ export abstract class FluidDataStoreContext
261
265
  */
262
266
  public readonly gcTombstoneEnforcementAllowed: boolean = false;
263
267
 
264
- /** If true, this means that this data store context and its children have been removed from the runtime */
268
+ /**
269
+ * If true, this means that this data store context and its children have been removed from the runtime
270
+ */
265
271
  protected deleted: boolean = false;
266
272
 
267
273
  public get attachState(): AttachState {
@@ -289,11 +295,13 @@ export abstract class FluidDataStoreContext
289
295
  // We know that if the base snapshot is omitted, then the isRootDataStore flag is not set.
290
296
  // That means we can skip the expensive call to getInitialSnapshotDetails for virtualized datastores,
291
297
  // and get the information from the alias map directly.
298
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
292
299
  if (aliasedDataStores !== undefined && (this.baseSnapshot as any)?.omitted === true) {
293
300
  return aliasedDataStores.has(this.id);
294
301
  }
295
302
 
296
- return (await this.getInitialSnapshotDetails()).isRootDataStore;
303
+ const snapshotDetails = await this.getInitialSnapshotDetails();
304
+ return snapshotDetails.isRootDataStore;
297
305
  }
298
306
 
299
307
  /**
@@ -319,7 +327,9 @@ export abstract class FluidDataStoreContext
319
327
  protected detachedRuntimeCreation = false;
320
328
  protected channel: IFluidDataStoreChannel | undefined;
321
329
  private loaded = false;
322
- /** Tracks the messages for this data store that are sent while it's not loaded */
330
+ /**
331
+ * Tracks the messages for this data store that are sent while it's not loaded
332
+ */
323
333
  private pendingMessagesState: IPendingMessagesState | undefined = {
324
334
  messageCollections: [],
325
335
  pendingCount: 0,
@@ -374,14 +384,9 @@ export abstract class FluidDataStoreContext
374
384
  ? this.parentContext.attachState
375
385
  : AttachState.Detached;
376
386
 
377
- const thisSummarizeInternal = async (
378
- fullTree: boolean,
379
- trackState: boolean,
380
- telemetryContext?: ITelemetryContext,
381
- ) => this.summarizeInternal(fullTree, trackState, telemetryContext);
382
-
383
387
  this.summarizerNode = props.createSummarizerNodeFn(
384
- thisSummarizeInternal,
388
+ async (fullTree, trackState, telemetryContext) =>
389
+ this.summarizeInternal(fullTree, trackState, telemetryContext),
385
390
  async (fullGC?: boolean) => this.getGCDataInternal(fullGC),
386
391
  );
387
392
 
@@ -429,11 +434,11 @@ export abstract class FluidDataStoreContext
429
434
  * This function is called to prevent ops from being generated from this data store once it has been deleted. Furthermore, this data store
430
435
  * should not receive any ops/signals.
431
436
  */
432
- public delete() {
437
+ public delete(): void {
433
438
  this.deleted = true;
434
439
  }
435
440
 
436
- public setTombstone(tombstone: boolean) {
441
+ public setTombstone(tombstone: boolean): void {
437
442
  if (this.tombstoned === tombstone) {
438
443
  return;
439
444
  }
@@ -483,7 +488,7 @@ export abstract class FluidDataStoreContext
483
488
  return this.channelP;
484
489
  }
485
490
 
486
- protected async factoryFromPackagePath() {
491
+ protected async factoryFromPackagePath(): Promise<IFluidDataStoreFactory> {
487
492
  const packages = this.pkg;
488
493
  if (packages === undefined) {
489
494
  this.rejectDeferredRealize("packages is undefined");
@@ -555,7 +560,7 @@ export abstract class FluidDataStoreContext
555
560
  return created;
556
561
  }
557
562
 
558
- private async realizeCore(existing: boolean) {
563
+ private async realizeCore(existing: boolean): Promise<IFluidDataStoreChannel> {
559
564
  const details = await this.getInitialSnapshotDetails();
560
565
  // Base snapshot is the baseline where pending ops are applied to.
561
566
  // It is important that this be in sync with the pending ops, and also
@@ -584,7 +589,7 @@ export abstract class FluidDataStoreContext
584
589
  * @param clientId - ID of the client. Its old ID when in disconnected state and
585
590
  * its new client ID when we are connecting or connected.
586
591
  */
587
- public setConnectionState(connected: boolean, clientId?: string) {
592
+ public setConnectionState(connected: boolean, clientId?: string): void {
588
593
  // ConnectionState should not fail in tombstone mode as this is internally run
589
594
  this.verifyNotClosed("setConnectionState", false /* checkTombstone */);
590
595
 
@@ -608,10 +613,8 @@ export abstract class FluidDataStoreContext
608
613
  private processMessagesCompat(
609
614
  channel: IFluidDataStoreChannel,
610
615
  messageCollection: IRuntimeMessageCollection,
611
- ) {
612
- if (channel.processMessages !== undefined) {
613
- channel.processMessages(messageCollection);
614
- } else {
616
+ ): void {
617
+ if (channel.processMessages === undefined) {
615
618
  const { envelope, messagesContent, local } = messageCollection;
616
619
  for (const { contents, localOpMetadata, clientSequenceNumber } of messagesContent) {
617
620
  channel.process(
@@ -620,6 +623,8 @@ export abstract class FluidDataStoreContext
620
623
  localOpMetadata,
621
624
  );
622
625
  }
626
+ } else {
627
+ channel.processMessages(messageCollection);
623
628
  }
624
629
  }
625
630
 
@@ -647,7 +652,7 @@ export abstract class FluidDataStoreContext
647
652
  );
648
653
  this.pendingMessagesState.messageCollections.push({
649
654
  ...messageCollection,
650
- messagesContent: Array.from(messagesContent),
655
+ messagesContent: [...messagesContent],
651
656
  });
652
657
  this.pendingMessagesState.pendingCount += messagesContent.length;
653
658
  this.thresholdOpsCounter.sendIfMultiple(
@@ -769,7 +774,7 @@ export abstract class FluidDataStoreContext
769
774
  *
770
775
  * @param usedRoutes - The routes that are used in this data store.
771
776
  */
772
- public updateUsedRoutes(usedRoutes: string[]) {
777
+ public updateUsedRoutes(usedRoutes: string[]): void {
773
778
  // Update the used routes in this data store's summarizer node.
774
779
  this.summarizerNode.updateUsedRoutes(usedRoutes);
775
780
 
@@ -794,10 +799,15 @@ export abstract class FluidDataStoreContext
794
799
  * @param toPath - The absolute path of the outbound node that is referenced.
795
800
  * @param messageTimestampMs - The timestamp of the message that added the reference.
796
801
  */
797
- public addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number) {
802
+ public addedGCOutboundRoute(
803
+ fromPath: string,
804
+ toPath: string,
805
+ messageTimestampMs?: number,
806
+ ): void {
798
807
  this.parentContext.addedGCOutboundRoute(fromPath, toPath, messageTimestampMs);
799
808
  }
800
809
 
810
+ // eslint-disable-next-line jsdoc/require-description
801
811
  /**
802
812
  * @deprecated 0.18.Should call request on the runtime directly
803
813
  */
@@ -806,7 +816,7 @@ export abstract class FluidDataStoreContext
806
816
  return runtime.request(request);
807
817
  }
808
818
 
809
- public submitMessage(type: string, content: any, localOpMetadata: unknown): void {
819
+ public submitMessage(type: string, content: unknown, localOpMetadata: unknown): void {
810
820
  this.verifyNotClosed("submitMessage");
811
821
  assert(!!this.channel, 0x146 /* "Channel must exist when submitting message" */);
812
822
  // Summarizer clients should not submit messages.
@@ -845,7 +855,7 @@ export abstract class FluidDataStoreContext
845
855
  * @param content - Content of the signal. Should be a JSON serializable object or primitive.
846
856
  * @param targetClientId - When specified, the signal is only sent to the provided client id.
847
857
  */
848
- public submitSignal(type: string, content: unknown, targetClientId?: string) {
858
+ public submitSignal(type: string, content: unknown, targetClientId?: string): void {
849
859
  this.verifyNotClosed("submitSignal");
850
860
 
851
861
  assert(!!this.channel, 0x147 /* "Channel must exist on submitting signal" */);
@@ -856,12 +866,12 @@ export abstract class FluidDataStoreContext
856
866
  * This is called by the data store channel when it becomes locally visible indicating that it is ready to become
857
867
  * globally visible now.
858
868
  */
859
- public makeLocallyVisible() {
869
+ public makeLocallyVisible(): void {
860
870
  assert(this.channel !== undefined, 0x2cf /* "undefined channel on datastore context" */);
861
871
  this.makeLocallyVisibleFn();
862
872
  }
863
873
 
864
- protected processPendingOps(channel: IFluidDataStoreChannel) {
874
+ protected processPendingOps(channel: IFluidDataStoreChannel): void {
865
875
  const baseSequenceNumber = this.baseSnapshotSequenceNumber ?? -1;
866
876
 
867
877
  assert(
@@ -879,7 +889,7 @@ export abstract class FluidDataStoreContext
879
889
  this.pendingMessagesState = undefined;
880
890
  }
881
891
 
882
- protected completeBindingRuntime(channel: IFluidDataStoreChannel) {
892
+ protected completeBindingRuntime(channel: IFluidDataStoreChannel): void {
883
893
  // And now mark the runtime active
884
894
  this.loaded = true;
885
895
  this.channel = channel;
@@ -895,7 +905,10 @@ export abstract class FluidDataStoreContext
895
905
  Object.freeze(this.pkg);
896
906
  }
897
907
 
898
- protected async bindRuntime(channel: IFluidDataStoreChannel, existing: boolean) {
908
+ protected async bindRuntime(
909
+ channel: IFluidDataStoreChannel,
910
+ existing: boolean,
911
+ ): Promise<void> {
899
912
  if (this.channel) {
900
913
  throw new Error("Runtime already bound");
901
914
  }
@@ -946,6 +959,7 @@ export abstract class FluidDataStoreContext
946
959
 
947
960
  public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;
948
961
 
962
+ // eslint-disable-next-line jsdoc/require-description
949
963
  /**
950
964
  * @deprecated Sets the datastore as root, for aliasing purposes: #7948
951
965
  * This method should not be used outside of the aliasing context.
@@ -955,6 +969,7 @@ export abstract class FluidDataStoreContext
955
969
  this._isInMemoryRoot = true;
956
970
  }
957
971
 
972
+ // eslint-disable-next-line jsdoc/require-description
958
973
  /**
959
974
  * @deprecated The functionality to get base GC details has been moved to summarizer node.
960
975
  */
@@ -962,12 +977,12 @@ export abstract class FluidDataStoreContext
962
977
  return {};
963
978
  }
964
979
 
965
- public reSubmit(type: string, contents: any, localOpMetadata: unknown) {
980
+ public reSubmit(type: string, contents: unknown, localOpMetadata: unknown): void {
966
981
  assert(!!this.channel, 0x14b /* "Channel must exist when resubmitting ops" */);
967
982
  this.channel.reSubmit(type, contents, localOpMetadata);
968
983
  }
969
984
 
970
- public rollback(type: string, contents: any, localOpMetadata: unknown) {
985
+ public rollback(type: string, contents: unknown, localOpMetadata: unknown): void {
971
986
  if (!this.channel) {
972
987
  throw new Error("Channel must exist when rolling back ops");
973
988
  }
@@ -977,7 +992,7 @@ export abstract class FluidDataStoreContext
977
992
  this.channel.rollback(type, contents, localOpMetadata);
978
993
  }
979
994
 
980
- public async applyStashedOp(contents: any): Promise<unknown> {
995
+ public async applyStashedOp(contents: unknown): Promise<unknown> {
981
996
  if (!this.channel) {
982
997
  await this.realize();
983
998
  }
@@ -989,7 +1004,7 @@ export abstract class FluidDataStoreContext
989
1004
  callSite: string,
990
1005
  checkTombstone = true,
991
1006
  safeTelemetryProps: ITelemetryBaseProperties = {},
992
- ) {
1007
+ ): void {
993
1008
  if (this.deleted) {
994
1009
  const messageString = `Context is deleted! Call site [${callSite}]`;
995
1010
  const error = DataProcessingError.create(
@@ -1038,7 +1053,7 @@ export abstract class FluidDataStoreContext
1038
1053
  * eventual consistency. For example, the next summary (say at ref seq# 100) may contain these changes whereas
1039
1054
  * other clients that are up-to-date till seq# 100 may not have them yet.
1040
1055
  */
1041
- protected identifyLocalChangeInSummarizer(eventName: string, type?: string) {
1056
+ protected identifyLocalChangeInSummarizer(eventName: string, type?: string): void {
1042
1057
  if (
1043
1058
  this.clientDetails.type !== summarizerClientType ||
1044
1059
  this.localChangesTelemetryCount <= 0
@@ -1065,7 +1080,7 @@ export abstract class FluidDataStoreContext
1065
1080
  return (
1066
1081
  summarizeInternal: SummarizeInternalFn,
1067
1082
  getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
1068
- ) =>
1083
+ ): ISummarizerNodeWithGC =>
1069
1084
  this.summarizerNode.createChild(
1070
1085
  summarizeInternal,
1071
1086
  id,
@@ -1075,7 +1090,7 @@ export abstract class FluidDataStoreContext
1075
1090
  );
1076
1091
  }
1077
1092
 
1078
- public deleteChildSummarizerNode(id: string) {
1093
+ public deleteChildSummarizerNode(id: string): void {
1079
1094
  this.summarizerNode.deleteChild(id);
1080
1095
  }
1081
1096
 
@@ -1087,7 +1102,9 @@ export abstract class FluidDataStoreContext
1087
1102
  }
1088
1103
  }
1089
1104
 
1090
- /** @internal */
1105
+ /**
1106
+ * @internal
1107
+ */
1091
1108
  export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1092
1109
  // Tells whether we need to fetch the snapshot before use. This is to support Data Virtualization.
1093
1110
  private snapshotFetchRequired: boolean | undefined;
@@ -1111,18 +1128,23 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1111
1128
  }
1112
1129
  }
1113
1130
 
1114
- /*
1115
- This API should not be called for RemoteFluidDataStoreContext. But here is one scenario where it's not the case:
1116
- The scenario (hit by stashedOps.spec.ts, "resends attach op" UT is the following (as far as I understand):
1117
- 1. data store is being attached in attached container
1118
- 2. container state is serialized (stashed ops feature)
1119
- 3. new container instance is rehydrated (from stashed ops)
1120
- - As result, we create RemoteFluidDataStoreContext for this data store that is actually in "attaching" state (as of # 2).
1121
- But its state is set to attached when loading container from stashed ops
1122
- 4. attach op for this data store is processed - setAttachState() is called.
1123
- */
1124
- public setAttachState(attachState: AttachState.Attaching | AttachState.Attached) {}
1131
+ /**
1132
+ * This API should not be called for RemoteFluidDataStoreContext. But here is one scenario where it's not the case:
1133
+ * The scenario (hit by stashedOps.spec.ts, "resends attach op" UT is the following (as far as I understand):
1134
+ *
1135
+ * 1. data store is being attached in attached container
1136
+ *
1137
+ * 2. container state is serialized (stashed ops feature)
1138
+ *
1139
+ * 3. new container instance is rehydrated (from stashed ops) -
1140
+ * As result, we create RemoteFluidDataStoreContext for this data store that is actually in "attaching" state * (as of # 2).
1141
+ * But its state is set to attached when loading container from stashed ops.
1142
+ *
1143
+ * 4. attach op for this data store is processed - setAttachState() is called.
1144
+ */
1145
+ public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {}
1125
1146
 
1147
+ // eslint-disable-next-line unicorn/consistent-function-scoping -- Property is defined once; no need to extract inner lambda
1126
1148
  private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
1127
1149
  // Sequence number of the snapshot.
1128
1150
  let sequenceNumber: number | undefined;
@@ -1218,14 +1240,14 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1218
1240
  }
1219
1241
 
1220
1242
  /**
1221
- * @see FluidDataStoreContext.getAttachSummary
1243
+ * {@inheritDoc FluidDataStoreContext.getAttachSummary}
1222
1244
  */
1223
1245
  public getAttachSummary(): ISummaryTreeWithStats {
1224
1246
  throw new Error("Cannot attach remote store");
1225
1247
  }
1226
1248
 
1227
1249
  /**
1228
- * @see FluidDataStoreContext.getAttachGCData
1250
+ * {@inheritDoc FluidDataStoreContext.getAttachGCData}
1229
1251
  */
1230
1252
  public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
1231
1253
  throw new Error("Cannot attach remote store");
@@ -1238,10 +1260,6 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
1238
1260
  */
1239
1261
  export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1240
1262
  private readonly snapshotTree: ISnapshotTree | undefined;
1241
- /**
1242
- * @deprecated 0.16 Issue #1635, #3631
1243
- */
1244
- public readonly createProps?: any;
1245
1263
 
1246
1264
  constructor(props: ILocalFluidDataStoreContextProps) {
1247
1265
  super(
@@ -1255,12 +1273,11 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1255
1273
  this.identifyLocalChangeInSummarizer("DataStoreCreatedInSummarizer");
1256
1274
 
1257
1275
  this.snapshotTree = props.snapshotTree;
1258
- this.createProps = props.createProps;
1259
1276
  }
1260
1277
 
1261
1278
  public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {
1262
1279
  switch (attachState) {
1263
- case AttachState.Attaching:
1280
+ case AttachState.Attaching: {
1264
1281
  assert(
1265
1282
  this.attachState === AttachState.Detached,
1266
1283
  0x14d /* "Should move from detached to attaching" */,
@@ -1274,7 +1291,8 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1274
1291
  this.emit("attaching");
1275
1292
  }
1276
1293
  break;
1277
- case AttachState.Attached:
1294
+ }
1295
+ case AttachState.Attached: {
1278
1296
  // We can get called into here twice, as result of both container and data store being attached, if
1279
1297
  // those processes overlapped, for example, in a flow like that one:
1280
1298
  // 1. Container attach started
@@ -1297,13 +1315,15 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1297
1315
  }
1298
1316
  }
1299
1317
  break;
1300
- default:
1318
+ }
1319
+ default: {
1301
1320
  unreachableCase(attachState, "unreached");
1321
+ }
1302
1322
  }
1303
1323
  }
1304
1324
 
1305
1325
  /**
1306
- * @see FluidDataStoreContext.getAttachSummary
1326
+ * {@inheritDoc FluidDataStoreContext.getAttachSummary}
1307
1327
  */
1308
1328
  public getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
1309
1329
  assert(
@@ -1333,7 +1353,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1333
1353
  }
1334
1354
 
1335
1355
  /**
1336
- * @see FluidDataStoreContext.getAttachGCData
1356
+ * {@inheritDoc FluidDataStoreContext.getAttachGCData}
1337
1357
  */
1338
1358
  public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
1339
1359
  assert(
@@ -1343,6 +1363,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1343
1363
  return this.channel.getAttachGCData(telemetryContext);
1344
1364
  }
1345
1365
 
1366
+ // eslint-disable-next-line unicorn/consistent-function-scoping -- Property is defined once; no need to extract inner lambda
1346
1367
  private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
1347
1368
  let snapshot = this.snapshotTree;
1348
1369
  // eslint-disable-next-line import/no-deprecated
@@ -1390,7 +1411,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
1390
1411
  * it was unreferenced. Thus the sweeping container should have loaded from a snapshot and thus creating a remote
1391
1412
  * context.
1392
1413
  */
1393
- public delete() {
1414
+ public delete(): void {
1394
1415
  // TODO: GC:Validation - potentially prevent this from happening or asserting. Maybe throw here.
1395
1416
  this.mc.logger.sendErrorEvent({
1396
1417
  eventName: "GC_Deleted_DataStore_Unexpected_Delete",
@@ -1477,7 +1498,7 @@ export class LocalDetachedFluidDataStoreContext
1477
1498
  *
1478
1499
  * If used incorrectly, this function can result in permanent data corruption.
1479
1500
  */
1480
- public unsafe_AttachRuntimeSync(channel: IFluidDataStoreChannel) {
1501
+ public unsafe_AttachRuntimeSync(channel: IFluidDataStoreChannel): IDataStore {
1481
1502
  this.channelP = Promise.resolve(channel);
1482
1503
  this.processPendingOps(channel);
1483
1504
  this.completeBindingRuntime(channel);
@@ -12,13 +12,17 @@ import {
12
12
 
13
13
  import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext.js";
14
14
 
15
- /** @internal */
15
+ /**
16
+ * @internal
17
+ */
16
18
  export class DataStoreContexts
17
19
  implements Iterable<[string, FluidDataStoreContext]>, IDisposable
18
20
  {
19
21
  private readonly notBoundContexts = new Set<string>();
20
22
 
21
- /** Attached and loaded context proxies */
23
+ /**
24
+ * Attached and loaded context proxies
25
+ */
22
26
  private readonly _contexts = new Map<string, FluidDataStoreContext>();
23
27
 
24
28
  /**
@@ -30,6 +34,7 @@ export class DataStoreContexts
30
34
  */
31
35
  private readonly deferredContexts = new Map<string, Deferred<FluidDataStoreContext>>();
32
36
 
37
+ // eslint-disable-next-line unicorn/consistent-function-scoping -- Property is defined once; no need to extract inner lambda
33
38
  private readonly disposeOnce = new Lazy<void>(() => {
34
39
  // close/stop all store contexts
35
40
  for (const [fluidDataStoreId, contextD] of this.deferredContexts) {
@@ -63,20 +68,20 @@ export class DataStoreContexts
63
68
  return this._contexts.size;
64
69
  }
65
70
 
66
- public get disposed() {
71
+ public get disposed(): boolean {
67
72
  return this.disposeOnce.evaluated;
68
73
  }
69
- public readonly dispose = () => this.disposeOnce.value;
74
+ public readonly dispose = (): void => this.disposeOnce.value;
70
75
 
71
- public notBoundLength() {
76
+ public notBoundLength(): number {
72
77
  return this.notBoundContexts.size;
73
78
  }
74
79
 
75
- public isNotBound(id: string) {
80
+ public isNotBound(id: string): boolean {
76
81
  return this.notBoundContexts.has(id);
77
82
  }
78
83
 
79
- public has(id: string) {
84
+ public has(id: string): boolean {
80
85
  return this._contexts.has(id);
81
86
  }
82
87
 
@@ -98,7 +103,7 @@ export class DataStoreContexts
98
103
  private readonly _recentlyDeletedContexts: Map<string, FluidDataStoreContext | undefined> =
99
104
  new Map();
100
105
 
101
- public getRecentlyDeletedContext(id: string) {
106
+ public getRecentlyDeletedContext(id: string): FluidDataStoreContext | undefined {
102
107
  return this._recentlyDeletedContexts.get(id);
103
108
  }
104
109
 
@@ -118,7 +123,7 @@ export class DataStoreContexts
118
123
  /**
119
124
  * Add the given context, marking it as to-be-bound
120
125
  */
121
- public addUnbound(context: LocalFluidDataStoreContext) {
126
+ public addUnbound(context: LocalFluidDataStoreContext): void {
122
127
  const id = context.id;
123
128
  assert(!this._contexts.has(id), 0x158 /* "Creating store with existing ID" */);
124
129
 
@@ -161,7 +166,7 @@ export class DataStoreContexts
161
166
  /**
162
167
  * Update this context as bound
163
168
  */
164
- public bind(id: string) {
169
+ public bind(id: string): void {
165
170
  const removed: boolean = this.notBoundContexts.delete(id);
166
171
  assert(removed, 0x159 /* "The given id was not found in notBoundContexts to delete" */);
167
172
 
@@ -172,7 +177,7 @@ export class DataStoreContexts
172
177
  * Triggers the deferred to resolve, indicating the context is not local-only
173
178
  * @param id - The id of the context to resolve to
174
179
  */
175
- private resolveDeferred(id: string) {
180
+ private resolveDeferred(id: string): void {
176
181
  const context = this._contexts.get(id);
177
182
  assert(!!context, 0x15a /* "Cannot find context to resolve to" */);
178
183
  assert(
@@ -190,7 +195,7 @@ export class DataStoreContexts
190
195
  * This could be because it's a local context that's been bound, or because it's a remote context.
191
196
  * @param context - The context to add
192
197
  */
193
- public addBoundOrRemoted(context: FluidDataStoreContext) {
198
+ public addBoundOrRemoted(context: FluidDataStoreContext): void {
194
199
  const id = context.id;
195
200
  assert(!this._contexts.has(id), 0x15d /* "Creating store with existing ID" */);
196
201