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

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