@fluidframework/container-runtime 2.0.0-internal.3.4.2 → 2.0.0-internal.4.0.1

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 (137) hide show
  1. package/dist/containerRuntime.d.ts +1 -5
  2. package/dist/containerRuntime.d.ts.map +1 -1
  3. package/dist/containerRuntime.js +12 -16
  4. package/dist/containerRuntime.js.map +1 -1
  5. package/dist/gc/garbageCollection.d.ts +2 -1
  6. package/dist/gc/garbageCollection.d.ts.map +1 -1
  7. package/dist/gc/garbageCollection.js.map +1 -1
  8. package/dist/gc/gcDefinitions.d.ts +2 -3
  9. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  10. package/dist/gc/gcDefinitions.js.map +1 -1
  11. package/dist/gc/gcSummaryStateTracker.d.ts +2 -1
  12. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  13. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  14. package/dist/gc/index.d.ts +1 -2
  15. package/dist/gc/index.d.ts.map +1 -1
  16. package/dist/gc/index.js.map +1 -1
  17. package/dist/index.d.ts +1 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.js +1 -1
  23. package/dist/packageVersion.js.map +1 -1
  24. package/dist/pendingStateManager.d.ts +2 -8
  25. package/dist/pendingStateManager.d.ts.map +1 -1
  26. package/dist/pendingStateManager.js +6 -12
  27. package/dist/pendingStateManager.js.map +1 -1
  28. package/dist/summary/index.d.ts +2 -2
  29. package/dist/summary/index.d.ts.map +1 -1
  30. package/dist/summary/index.js +4 -5
  31. package/dist/summary/index.js.map +1 -1
  32. package/dist/summary/summarizer.d.ts +2 -5
  33. package/dist/summary/summarizer.d.ts.map +1 -1
  34. package/dist/summary/summarizer.js +8 -13
  35. package/dist/summary/summarizer.js.map +1 -1
  36. package/dist/summary/summarizerNode/index.d.ts +8 -0
  37. package/dist/summary/summarizerNode/index.d.ts.map +1 -0
  38. package/dist/summary/summarizerNode/index.js +12 -0
  39. package/dist/summary/summarizerNode/index.js.map +1 -0
  40. package/dist/summary/summarizerNode/summarizerNode.d.ts +149 -0
  41. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
  42. package/dist/summary/summarizerNode/summarizerNode.js +520 -0
  43. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -0
  44. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +125 -0
  45. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
  46. package/dist/summary/summarizerNode/summarizerNodeUtils.js +132 -0
  47. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
  48. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +22 -0
  49. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
  50. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +420 -0
  51. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
  52. package/dist/summary/summarizerTypes.d.ts +5 -17
  53. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  54. package/dist/summary/summarizerTypes.js +0 -5
  55. package/dist/summary/summarizerTypes.js.map +1 -1
  56. package/lib/containerRuntime.d.ts +1 -5
  57. package/lib/containerRuntime.d.ts.map +1 -1
  58. package/lib/containerRuntime.js +13 -17
  59. package/lib/containerRuntime.js.map +1 -1
  60. package/lib/gc/garbageCollection.d.ts +2 -1
  61. package/lib/gc/garbageCollection.d.ts.map +1 -1
  62. package/lib/gc/garbageCollection.js +1 -1
  63. package/lib/gc/garbageCollection.js.map +1 -1
  64. package/lib/gc/gcDefinitions.d.ts +2 -3
  65. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  66. package/lib/gc/gcDefinitions.js.map +1 -1
  67. package/lib/gc/gcSummaryStateTracker.d.ts +2 -1
  68. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  69. package/lib/gc/gcSummaryStateTracker.js +1 -1
  70. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  71. package/lib/gc/index.d.ts +1 -2
  72. package/lib/gc/index.d.ts.map +1 -1
  73. package/lib/gc/index.js.map +1 -1
  74. package/lib/index.d.ts +1 -2
  75. package/lib/index.d.ts.map +1 -1
  76. package/lib/index.js +1 -1
  77. package/lib/index.js.map +1 -1
  78. package/lib/packageVersion.d.ts +1 -1
  79. package/lib/packageVersion.js +1 -1
  80. package/lib/packageVersion.js.map +1 -1
  81. package/lib/pendingStateManager.d.ts +2 -8
  82. package/lib/pendingStateManager.d.ts.map +1 -1
  83. package/lib/pendingStateManager.js +6 -12
  84. package/lib/pendingStateManager.js.map +1 -1
  85. package/lib/summary/index.d.ts +2 -2
  86. package/lib/summary/index.d.ts.map +1 -1
  87. package/lib/summary/index.js +1 -2
  88. package/lib/summary/index.js.map +1 -1
  89. package/lib/summary/summarizer.d.ts +2 -5
  90. package/lib/summary/summarizer.d.ts.map +1 -1
  91. package/lib/summary/summarizer.js +8 -13
  92. package/lib/summary/summarizer.js.map +1 -1
  93. package/lib/summary/summarizerNode/index.d.ts +8 -0
  94. package/lib/summary/summarizerNode/index.d.ts.map +1 -0
  95. package/lib/summary/summarizerNode/index.js +7 -0
  96. package/lib/summary/summarizerNode/index.js.map +1 -0
  97. package/lib/summary/summarizerNode/summarizerNode.d.ts +149 -0
  98. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
  99. package/lib/summary/summarizerNode/summarizerNode.js +515 -0
  100. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -0
  101. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +125 -0
  102. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
  103. package/lib/summary/summarizerNode/summarizerNodeUtils.js +125 -0
  104. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
  105. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +22 -0
  106. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
  107. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +416 -0
  108. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
  109. package/lib/summary/summarizerTypes.d.ts +5 -17
  110. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  111. package/lib/summary/summarizerTypes.js +1 -4
  112. package/lib/summary/summarizerTypes.js.map +1 -1
  113. package/package.json +52 -15
  114. package/src/containerRuntime.ts +19 -19
  115. package/src/gc/garbageCollection.ts +2 -6
  116. package/src/gc/gcDefinitions.ts +6 -4
  117. package/src/gc/gcSummaryStateTracker.ts +2 -7
  118. package/src/gc/index.ts +1 -1
  119. package/src/index.ts +0 -7
  120. package/src/packageVersion.ts +1 -1
  121. package/src/pendingStateManager.ts +8 -20
  122. package/src/summary/index.ts +8 -2
  123. package/src/summary/summarizer.ts +7 -21
  124. package/src/summary/summarizerNode/index.ts +12 -0
  125. package/src/summary/summarizerNode/summarizerNode.ts +744 -0
  126. package/src/summary/summarizerNode/summarizerNodeUtils.ts +214 -0
  127. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +631 -0
  128. package/src/summary/summarizerTypes.ts +6 -22
  129. package/dist/summary/summarizerHandle.d.ts +0 -12
  130. package/dist/summary/summarizerHandle.d.ts.map +0 -1
  131. package/dist/summary/summarizerHandle.js +0 -22
  132. package/dist/summary/summarizerHandle.js.map +0 -1
  133. package/lib/summary/summarizerHandle.d.ts +0 -12
  134. package/lib/summary/summarizerHandle.d.ts.map +0 -1
  135. package/lib/summary/summarizerHandle.js +0 -18
  136. package/lib/summary/summarizerHandle.js.map +0 -1
  137. package/src/summary/summarizerHandle.ts +0 -23
@@ -1 +1 @@
1
- {"version":3,"file":"summarizerTypes.js","sourceRoot":"","sources":["../../src/summary/summarizerTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAA6B,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryLogger,\n\tITelemetryProperties,\n} from \"@fluidframework/common-definitions\";\nimport { ITelemetryLoggerPropertyBag } from \"@fluidframework/telemetry-utils\";\nimport { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { ContainerWarning, IDeltaManager } from \"@fluidframework/container-definitions\";\nimport {\n\tISequencedDocumentMessage,\n\tISummaryTree,\n\tIDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { ISummaryStats } from \"@fluidframework/runtime-definitions\";\nimport { ISummaryConfigurationHeuristics } from \"../containerRuntime\";\nimport { ISummaryAckMessage, ISummaryNackMessage, ISummaryOpMessage } from \"./summaryCollection\";\nimport { SummarizeReason } from \"./summaryGenerator\";\n\n/**\n * @deprecated This will be removed in a later release.\n */\nexport const ISummarizer: keyof IProvideSummarizer = \"ISummarizer\";\n\n/**\n * @deprecated This will be removed in a later release.\n */\nexport interface IProvideSummarizer {\n\t/**\n\t * @deprecated This will be removed in a later release.\n\t */\n\treadonly ISummarizer: ISummarizer;\n}\n\n/**\n * Similar to AbortSignal, but using promise instead of events\n * @param T - cancellation reason type\n */\nexport interface ICancellationToken<T> {\n\t/** Tells if this cancellable token is cancelled */\n\treadonly cancelled: boolean;\n\t/**\n\t * Promise that gets fulfilled when this cancellable token is cancelled\n\t * @returns reason of cancellation\n\t */\n\treadonly waitCancelled: Promise<T>;\n}\n\n/* Similar to AbortSignal, but using promise instead of events */\nexport type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;\n\nexport interface ISummarizerInternalsProvider {\n\t/** Encapsulates the work to walk the internals of the running container to generate a summary */\n\tsubmitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;\n\n\t/** Callback whenever a new SummaryAck is received, to update internal tracking state */\n\trefreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;\n}\n\n/**\n * @deprecated Options that control the behavior of a running summarizer.\n * */\nexport interface ISummarizerOptions {\n\t/**\n\t * Set to true to disable the default heuristics from running; false by default.\n\t * This affects only the heuristics around when a summarizer should\n\t * submit summaries. So when it is disabled, summarizer clients should\n\t * not be expected to summarize unless an on-demand summary is requested.\n\t */\n\tdisableHeuristics: boolean;\n}\n\nexport interface ISummarizingWarning extends ContainerWarning {\n\treadonly errorType: \"summarizingError\";\n\treadonly logged: boolean;\n}\n\nexport interface IConnectableRuntime {\n\treadonly disposed: boolean;\n\treadonly connected: boolean;\n\treadonly clientId: string | undefined;\n\t/** @deprecated - Moved to `ISummarizerRuntime` as it's no longer needed here */\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\tonce(event: \"connected\" | \"disconnected\" | \"dispose\", listener: () => void): this;\n}\n\nexport interface ISummarizerRuntime extends IConnectableRuntime {\n\treadonly logger: ITelemetryLogger;\n\t/** clientId of parent (non-summarizing) container that owns summarizer container */\n\treadonly summarizerClientId: string | undefined;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\tdisposeFn?(): void;\n\tcloseFn(): void;\n}\n\n/** Options affecting summarize behavior. */\nexport interface ISummarizeOptions {\n\t/** True to generate the full tree with no handle reuse optimizations; defaults to false */\n\treadonly fullTree?: boolean;\n\t/** True to ask the server what the latest summary is first; defaults to false */\n\treadonly refreshLatestAck?: boolean;\n}\n\n/**\n * Data required to update internal tracking state after receiving a Summary Ack.\n */\nexport interface IRefreshSummaryAckOptions {\n\t/** Handle from the ack's summary op. */\n\treadonly proposalHandle: string | undefined;\n\t/** Handle from the summary ack just received */\n\treadonly ackHandle: string;\n\t/** Reference sequence number from the ack's summary op */\n\treadonly summaryRefSeq: number;\n\t/** Telemetry logger to which telemetry events will be forwarded. */\n\treadonly summaryLogger: ITelemetryLogger;\n}\n\nexport interface ISubmitSummaryOptions extends ISummarizeOptions {\n\t/** Logger to use for correlated summary events */\n\treadonly summaryLogger: ITelemetryLogger;\n\t/** Tells when summary process should be cancelled */\n\treadonly cancellationToken: ISummaryCancellationToken;\n}\n\nexport interface IOnDemandSummarizeOptions extends ISummarizeOptions {\n\t/** Reason for generating summary. */\n\treadonly reason: string;\n}\n\n/** Options to use when enqueueing a summarize attempt. */\nexport interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {\n\t/** If specified, The summarize attempt will not occur until after this sequence number. */\n\treadonly afterSequenceNumber?: number;\n\n\t/**\n\t * True to override the existing enqueued summarize attempt if there is one.\n\t * This will guarantee that this attempt gets enqueued. If override is false,\n\t * than an existing enqueued summarize attempt will block a new one from being\n\t * enqueued. There can only be one enqueued at a time. Defaults to false.\n\t */\n\treadonly override?: boolean;\n}\n\n/**\n * In addition to the normal summary tree + stats, this contains additional stats\n * only relevant at the root of the tree.\n */\nexport interface IGeneratedSummaryStats extends ISummaryStats {\n\t/** The total number of data stores in the container. */\n\treadonly dataStoreCount: number;\n\t/** The number of data stores that were summarized in this summary. */\n\treadonly summarizedDataStoreCount: number;\n\t/** The number of data stores whose GC reference state was updated in this summary. */\n\treadonly gcStateUpdatedDataStoreCount?: number;\n\t/** The size of the gc blobs in this summary. */\n\treadonly gcTotalBlobsSize?: number;\n\t/** The number of gc blobs in this summary. */\n\treadonly gcBlobNodeCount?: number;\n\t/** The summary number for a container's summary. Incremented on summaries throughout its lifetime. */\n\treadonly summaryNumber: number;\n}\n\n/** Base results for all submitSummary attempts. */\nexport interface IBaseSummarizeResult {\n\treadonly stage: \"base\";\n\t/** Error object related to failed summarize attempt. */\n\treadonly error: any;\n\t/** Reference sequence number as of the generate summary attempt. */\n\treadonly referenceSequenceNumber: number;\n\treadonly minimumSequenceNumber: number;\n}\n\n/** Results of submitSummary after generating the summary tree. */\nexport interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, \"stage\"> {\n\treadonly stage: \"generate\";\n\t/** Generated summary tree. */\n\treadonly summaryTree: ISummaryTree;\n\t/** Stats for generated summary tree. */\n\treadonly summaryStats: IGeneratedSummaryStats;\n\t/** Time it took to generate the summary tree and stats. */\n\treadonly generateDuration: number;\n\t/** True if the full tree regeneration with no handle reuse optimizations was forced. */\n\treadonly forcedFullTree: boolean;\n}\n\n/** Results of submitSummary after uploading the tree to storage. */\nexport interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, \"stage\"> {\n\treadonly stage: \"upload\";\n\t/** The handle returned by storage pointing to the uploaded summary tree. */\n\treadonly handle: string;\n\t/** Time it took to upload the summary tree to storage. */\n\treadonly uploadDuration: number;\n}\n\n/** Results of submitSummary after submitting the summarize op. */\nexport interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, \"stage\" | \"error\"> {\n\treadonly stage: \"submit\";\n\t/** The client sequence number of the summarize op submitted for the summary. */\n\treadonly clientSequenceNumber: number;\n\t/** Time it took to submit the summarize op to the broadcasting service. */\n\treadonly submitOpDuration: number;\n}\n\n/**\n * Strict type representing result of a submitSummary attempt.\n * The result consists of 4 possible stages, each with its own data.\n * The data is cumulative, so each stage will contain the data from the previous stages.\n * If the final \"submitted\" stage is not reached, the result may contain the error object.\n *\n * Stages:\n *\n * 1. \"base\" - stopped before the summary tree was even generated, and the result only contains the base data\n *\n * 2. \"generate\" - the summary tree was generated, and the result will contain that tree + stats\n *\n * 3. \"upload\" - the summary was uploaded to storage, and the result contains the server-provided handle\n *\n * 4. \"submit\" - the summarize op was submitted, and the result contains the op client sequence number.\n */\nexport type SubmitSummaryResult =\n\t| IBaseSummarizeResult\n\t| IGenerateSummaryTreeResult\n\t| IUploadSummaryResult\n\t| ISubmitSummaryOpResult;\n\nexport interface IBroadcastSummaryResult {\n\treadonly summarizeOp: ISummaryOpMessage;\n\treadonly broadcastDuration: number;\n}\n\nexport interface IAckSummaryResult {\n\treadonly summaryAckOp: ISummaryAckMessage;\n\treadonly ackNackDuration: number;\n}\n\nexport interface INackSummaryResult {\n\treadonly summaryNackOp: ISummaryNackMessage;\n\treadonly ackNackDuration: number;\n}\n\nexport type SummarizeResultPart<TSuccess, TFailure = undefined> =\n\t| {\n\t\t\tsuccess: true;\n\t\t\tdata: TSuccess;\n\t }\n\t| {\n\t\t\tsuccess: false;\n\t\t\tdata: TFailure | undefined;\n\t\t\tmessage: string;\n\t\t\terror: any;\n\t\t\tretryAfterSeconds?: number;\n\t };\n\nexport interface ISummarizeResults {\n\t/** Resolves when we generate, upload, and submit the summary. */\n\treadonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult>>;\n\t/** Resolves when we observe our summarize op broadcast. */\n\treadonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;\n\t/** Resolves when we receive a summaryAck or summaryNack. */\n\treadonly receivedSummaryAckOrNack: Promise<\n\t\tSummarizeResultPart<IAckSummaryResult, INackSummaryResult>\n\t>;\n}\n\nexport type EnqueueSummarizeResult =\n\t| (ISummarizeResults & {\n\t\t\t/**\n\t\t\t * Indicates that another summarize attempt is not already enqueued,\n\t\t\t * and this attempt has been enqueued.\n\t\t\t */\n\t\t\treadonly alreadyEnqueued?: undefined;\n\t })\n\t| (ISummarizeResults & {\n\t\t\t/** Indicates that another summarize attempt was already enqueued. */\n\t\t\treadonly alreadyEnqueued: true;\n\t\t\t/**\n\t\t\t * Indicates that the other enqueued summarize attempt was abandoned,\n\t\t\t * and this attempt has been enqueued enqueued.\n\t\t\t */\n\t\t\treadonly overridden: true;\n\t })\n\t| {\n\t\t\t/** Indicates that another summarize attempt was already enqueued. */\n\t\t\treadonly alreadyEnqueued: true;\n\t\t\t/**\n\t\t\t * Indicates that the other enqueued summarize attempt remains enqueued,\n\t\t\t * and this attempt has not been enqueued.\n\t\t\t */\n\t\t\treadonly overridden?: undefined;\n\t };\n\nexport type SummarizerStopReason =\n\t/** Summarizer client failed to summarize in all 3 consecutive attempts. */\n\t| \"failToSummarize\"\n\t/** Parent client reported that it is no longer connected. */\n\t| \"parentNotConnected\"\n\t/**\n\t * Parent client reported that it is no longer elected the summarizer.\n\t * This is the normal flow; a disconnect will always trigger the parent\n\t * client to no longer be elected as responsible for summaries. Then it\n\t * tries to stop its spawned summarizer client.\n\t */\n\t| \"notElectedParent\"\n\t/**\n\t * We are not already running the summarizer and we are not the current elected client id.\n\t */\n\t| \"notElectedClient\"\n\t/** Summarizer client was disconnected */\n\t| \"summarizerClientDisconnected\"\n\t/* running summarizer threw an exception */\n\t| \"summarizerException\";\n\nexport interface ISummarizerEvents extends IEvent {\n\t/**\n\t * An event indicating that the Summarizer is having problems summarizing\n\t */\n\t(event: \"summarizingError\", listener: (error: ISummarizingWarning) => void);\n}\n\nexport interface ISummarizer\n\textends IEventProvider<ISummarizerEvents>,\n\t\tIFluidLoadable,\n\t\tPartial<IProvideSummarizer> {\n\t/*\n\t * Asks summarizer to move to exit.\n\t * Summarizer will finish current processes, which may take a while.\n\t * For example, summarizer may complete last summary before exiting.\n\t */\n\tstop(reason: SummarizerStopReason): void;\n\n\t/* Closes summarizer. Any pending processes (summary in flight) are abandoned. */\n\tclose(): void;\n\n\trun(onBehalfOf: string, disableHeuristics?: boolean): Promise<SummarizerStopReason>;\n\n\t/**\n\t * Attempts to generate a summary on demand. If already running, takes no action.\n\t * @param options - options controlling the summarize attempt\n\t * @returns an alreadyRunning promise if a summarize attempt is already in progress,\n\t * which will resolve when the current attempt completes. At that point caller can\n\t * decide to try again or not. Otherwise, it will return an object containing promises\n\t * that resolve as the summarize attempt progresses. They will resolve with success\n\t * false if a failure is encountered.\n\t */\n\tsummarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;\n\t/**\n\t * Enqueue an attempt to summarize after the specified sequence number.\n\t * If afterSequenceNumber is provided, the summarize attempt is \"enqueued\"\n\t * to run once an eligible op comes in with sequenceNumber \\>= afterSequenceNumber.\n\t * @param options - options controlling the summarize attempt\n\t * @returns an object containing an alreadyEnqueued flag to indicate if another\n\t * summarize attempt has already been enqueued. It also may contain an overridden flag\n\t * when alreadyEnqueued is true, that indicates whether this attempt forced the\n\t * previous attempt to abort. If this attempt becomes enqueued, it returns an object\n\t * containing promises that resolve as the summarize attempt progresses. They will\n\t * resolve with success false if a failure is encountered.\n\t */\n\tenqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;\n}\n\n/** Data about an attempt to summarize used for heuristics. */\nexport interface ISummarizeAttempt {\n\t/** Reference sequence number when summary was generated or attempted */\n\treadonly refSequenceNumber: number;\n\n\t/** Time of summary attempt after it was sent or attempted */\n\treadonly summaryTime: number;\n\n\t/** Sequence number of summary op */\n\tsummarySequenceNumber?: number;\n}\n\n/** Data relevant for summary heuristics. */\nexport interface ISummarizeHeuristicData {\n\t/** Latest received op sequence number */\n\tlastOpSequenceNumber: number;\n\n\t/** Most recent summary attempt from this client */\n\treadonly lastAttempt: ISummarizeAttempt;\n\n\t/** Most recent summary that received an ack */\n\treadonly lastSuccessfulSummary: Readonly<ISummarizeAttempt>;\n\n\t/** Number of runtime ops since last summary */\n\tnumRuntimeOps: number;\n\n\t/** Number of non-runtime ops since last summary */\n\tnumNonRuntimeOps: number;\n\n\t/** Cumulative size in bytes of all the ops since the last summary */\n\ttotalOpsSize: number;\n\n\t/** Wether or not this instance contains adjusted metrics due to missing op data */\n\thasMissingOpData: boolean;\n\n\t/**\n\t * Updates lastAttempt and lastSuccessfulAttempt based on the last summary.\n\t * @param lastSummary - last ack summary\n\t */\n\tupdateWithLastSummaryAckInfo(lastSummary: ISummarizeAttempt): void;\n\n\t/**\n\t * Records a summary attempt. If the attempt was successfully sent,\n\t * provide the reference sequence number, otherwise it will be set\n\t * to the last seen op sequence number.\n\t * @param referenceSequenceNumber - reference sequence number of sent summary\n\t */\n\trecordAttempt(referenceSequenceNumber?: number): void;\n\n\t/** Mark that the last sent summary attempt has received an ack */\n\tmarkLastAttemptAsSuccessful(): void;\n}\n\n/** Responsible for running heuristics determining when to summarize. */\nexport interface ISummarizeHeuristicRunner {\n\t/** Start specific heuristic trackers (ex: idle timer) */\n\tstart(): void;\n\n\t/** Runs the heuristics to determine if it should try to summarize */\n\trun(): void;\n\n\t/** Runs a different heuristic to check if it should summarize before closing */\n\tshouldRunLastSummary(): boolean;\n\n\t/** Disposes of resources */\n\tdispose(): void;\n}\n\ntype ISummarizeTelemetryRequiredProperties =\n\t/** Reason code for attempting to summarize */\n\t\"reason\";\n\ntype ISummarizeTelemetryOptionalProperties =\n\t/** Number of attempts within the last time window, used for calculating the throttle delay. */\n\t| \"summaryAttempts\"\n\t/** Number of attempts within the current phase (currently capped at 2 ) */\n\t| \"summaryAttemptsPerPhase\"\n\t/** One-based count of phases we've attempted (used to index into an array of ISummarizeOptions */\n\t| \"summaryAttemptPhase\"\n\t| keyof ISummarizeOptions;\n\nexport type ISummarizeTelemetryProperties = Pick<\n\tITelemetryProperties,\n\tISummarizeTelemetryRequiredProperties\n> &\n\tPartial<Pick<ITelemetryProperties, ISummarizeTelemetryOptionalProperties>>;\n\n/** Strategy used to heuristically determine when we should run a summary */\nexport interface ISummaryHeuristicStrategy {\n\t/** Summarize reason for this summarize heuristic strategy (ex: \"maxTime\") */\n\tsummarizeReason: Readonly<SummarizeReason>;\n\n\t/**\n\t * Determines if this strategy's summarize criteria been met\n\t * @param configuration - summary configuration we are to check against\n\t * @param heuristicData - heuristic data used to confirm conditions are met\n\t */\n\tshouldRunSummary(\n\t\tconfiguration: ISummaryConfigurationHeuristics,\n\t\theuristicData: ISummarizeHeuristicData,\n\t): boolean;\n}\n\ntype SummaryGeneratorRequiredTelemetryProperties =\n\t/** True to generate the full tree with no handle reuse optimizations */\n\t| \"fullTree\"\n\t/** Time since we last attempted to generate a summary */\n\t| \"timeSinceLastAttempt\"\n\t/** Time since we last successfully generated a summary */\n\t| \"timeSinceLastSummary\";\n\ntype SummaryGeneratorOptionalTelemetryProperties =\n\t/** Reference sequence number as of the generate summary attempt. */\n\t| \"referenceSequenceNumber\"\n\t/** minimum sequence number (at the reference sequence number) */\n\t| \"minimumSequenceNumber\"\n\t/** Delta between the current reference sequence number and the reference sequence number of the last attempt */\n\t| \"opsSinceLastAttempt\"\n\t/** Delta between the current reference sequence number and the reference sequence number of the last summary */\n\t| \"opsSinceLastSummary\"\n\t/**\n\t * Delta in sum of op sizes between the current reference sequence number and the reference\n\t * sequence number of the last summary\n\t */\n\t| \"opsSizesSinceLastSummary\"\n\t/** Delta between the number of non-runtime ops since the last summary */\n\t| \"nonRuntimeOpsSinceLastSummary\"\n\t/** Wether or not this instance contains adjusted metrics due to missing op data */\n\t| \"hasMissingOpData\"\n\t/** Time it took to generate the summary tree and stats. */\n\t| \"generateDuration\"\n\t/** The handle returned by storage pointing to the uploaded summary tree. */\n\t| \"handle\"\n\t/** Time it took to upload the summary tree to storage. */\n\t| \"uploadDuration\"\n\t/** The client sequence number of the summarize op submitted for the summary. */\n\t| \"clientSequenceNumber\"\n\t/** Time it took for this summary to be acked after it was generated */\n\t| \"ackWaitDuration\"\n\t/** Reference sequence number of the ack/nack message */\n\t| \"ackNackSequenceNumber\"\n\t/** Actual sequence number of the summary op proposal. */\n\t| \"summarySequenceNumber\"\n\t/** Optional Retry-After time in seconds. If specified, the client should wait this many seconds before retrying. */\n\t| \"nackRetryAfter\";\n\nexport type SummaryGeneratorTelemetry = Pick<\n\tITelemetryProperties,\n\tSummaryGeneratorRequiredTelemetryProperties\n> &\n\tPartial<Pick<ITelemetryProperties, SummaryGeneratorOptionalTelemetryProperties>>;\n\nexport interface ISummarizeRunnerTelemetry extends ITelemetryLoggerPropertyBag {\n\t/** Number of times the summarizer run. */\n\tsummarizeCount: () => number;\n\t/** Number of successful attempts to summarize. */\n\tsummarizerSuccessfulAttempts: () => number;\n}\n"]}
1
+ {"version":3,"file":"summarizerTypes.js","sourceRoot":"","sources":["../../src/summary/summarizerTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryLogger,\n\tITelemetryProperties,\n} from \"@fluidframework/common-definitions\";\nimport { ITelemetryLoggerPropertyBag } from \"@fluidframework/telemetry-utils\";\nimport { ContainerWarning, IDeltaManager } from \"@fluidframework/container-definitions\";\nimport {\n\tISequencedDocumentMessage,\n\tISummaryTree,\n\tIDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { ISummaryStats } from \"@fluidframework/runtime-definitions\";\nimport { ISummaryConfigurationHeuristics } from \"../containerRuntime\";\nimport { ISummaryAckMessage, ISummaryNackMessage, ISummaryOpMessage } from \"./summaryCollection\";\nimport { SummarizeReason } from \"./summaryGenerator\";\n\n/**\n * Similar to AbortSignal, but using promise instead of events\n * @param T - cancellation reason type\n */\nexport interface ICancellationToken<T> {\n\t/** Tells if this cancellable token is cancelled */\n\treadonly cancelled: boolean;\n\t/**\n\t * Promise that gets fulfilled when this cancellable token is cancelled\n\t * @returns reason of cancellation\n\t */\n\treadonly waitCancelled: Promise<T>;\n}\n\n/* Similar to AbortSignal, but using promise instead of events */\nexport type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;\n\nexport interface ISummarizerInternalsProvider {\n\t/** Encapsulates the work to walk the internals of the running container to generate a summary */\n\tsubmitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;\n\n\t/** Callback whenever a new SummaryAck is received, to update internal tracking state */\n\trefreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;\n}\n\n/**\n * @deprecated Options that control the behavior of a running summarizer.\n * */\nexport interface ISummarizerOptions {\n\t/**\n\t * Set to true to disable the default heuristics from running; false by default.\n\t * This affects only the heuristics around when a summarizer should\n\t * submit summaries. So when it is disabled, summarizer clients should\n\t * not be expected to summarize unless an on-demand summary is requested.\n\t */\n\tdisableHeuristics: boolean;\n}\n\nexport interface ISummarizingWarning extends ContainerWarning {\n\treadonly errorType: \"summarizingError\";\n\treadonly logged: boolean;\n}\n\nexport interface IConnectableRuntime {\n\treadonly disposed: boolean;\n\treadonly connected: boolean;\n\treadonly clientId: string | undefined;\n\tonce(event: \"connected\" | \"disconnected\" | \"dispose\", listener: () => void): this;\n}\n\nexport interface ISummarizerRuntime extends IConnectableRuntime {\n\treadonly logger: ITelemetryLogger;\n\t/** clientId of parent (non-summarizing) container that owns summarizer container */\n\treadonly summarizerClientId: string | undefined;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\tdisposeFn?(): void;\n\tcloseFn(): void;\n}\n\n/** Options affecting summarize behavior. */\nexport interface ISummarizeOptions {\n\t/** True to generate the full tree with no handle reuse optimizations; defaults to false */\n\treadonly fullTree?: boolean;\n\t/** True to ask the server what the latest summary is first; defaults to false */\n\treadonly refreshLatestAck?: boolean;\n}\n\n/**\n * Data required to update internal tracking state after receiving a Summary Ack.\n */\nexport interface IRefreshSummaryAckOptions {\n\t/** Handle from the ack's summary op. */\n\treadonly proposalHandle: string | undefined;\n\t/** Handle from the summary ack just received */\n\treadonly ackHandle: string;\n\t/** Reference sequence number from the ack's summary op */\n\treadonly summaryRefSeq: number;\n\t/** Telemetry logger to which telemetry events will be forwarded. */\n\treadonly summaryLogger: ITelemetryLogger;\n}\n\nexport interface ISubmitSummaryOptions extends ISummarizeOptions {\n\t/** Logger to use for correlated summary events */\n\treadonly summaryLogger: ITelemetryLogger;\n\t/** Tells when summary process should be cancelled */\n\treadonly cancellationToken: ISummaryCancellationToken;\n}\n\nexport interface IOnDemandSummarizeOptions extends ISummarizeOptions {\n\t/** Reason for generating summary. */\n\treadonly reason: string;\n}\n\n/** Options to use when enqueueing a summarize attempt. */\nexport interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {\n\t/** If specified, The summarize attempt will not occur until after this sequence number. */\n\treadonly afterSequenceNumber?: number;\n\n\t/**\n\t * True to override the existing enqueued summarize attempt if there is one.\n\t * This will guarantee that this attempt gets enqueued. If override is false,\n\t * than an existing enqueued summarize attempt will block a new one from being\n\t * enqueued. There can only be one enqueued at a time. Defaults to false.\n\t */\n\treadonly override?: boolean;\n}\n\n/**\n * In addition to the normal summary tree + stats, this contains additional stats\n * only relevant at the root of the tree.\n */\nexport interface IGeneratedSummaryStats extends ISummaryStats {\n\t/** The total number of data stores in the container. */\n\treadonly dataStoreCount: number;\n\t/** The number of data stores that were summarized in this summary. */\n\treadonly summarizedDataStoreCount: number;\n\t/** The number of data stores whose GC reference state was updated in this summary. */\n\treadonly gcStateUpdatedDataStoreCount?: number;\n\t/** The size of the gc blobs in this summary. */\n\treadonly gcTotalBlobsSize?: number;\n\t/** The number of gc blobs in this summary. */\n\treadonly gcBlobNodeCount?: number;\n\t/** The summary number for a container's summary. Incremented on summaries throughout its lifetime. */\n\treadonly summaryNumber: number;\n}\n\n/** Base results for all submitSummary attempts. */\nexport interface IBaseSummarizeResult {\n\treadonly stage: \"base\";\n\t/** Error object related to failed summarize attempt. */\n\treadonly error: any;\n\t/** Reference sequence number as of the generate summary attempt. */\n\treadonly referenceSequenceNumber: number;\n\treadonly minimumSequenceNumber: number;\n}\n\n/** Results of submitSummary after generating the summary tree. */\nexport interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, \"stage\"> {\n\treadonly stage: \"generate\";\n\t/** Generated summary tree. */\n\treadonly summaryTree: ISummaryTree;\n\t/** Stats for generated summary tree. */\n\treadonly summaryStats: IGeneratedSummaryStats;\n\t/** Time it took to generate the summary tree and stats. */\n\treadonly generateDuration: number;\n\t/** True if the full tree regeneration with no handle reuse optimizations was forced. */\n\treadonly forcedFullTree: boolean;\n}\n\n/** Results of submitSummary after uploading the tree to storage. */\nexport interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, \"stage\"> {\n\treadonly stage: \"upload\";\n\t/** The handle returned by storage pointing to the uploaded summary tree. */\n\treadonly handle: string;\n\t/** Time it took to upload the summary tree to storage. */\n\treadonly uploadDuration: number;\n}\n\n/** Results of submitSummary after submitting the summarize op. */\nexport interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, \"stage\" | \"error\"> {\n\treadonly stage: \"submit\";\n\t/** The client sequence number of the summarize op submitted for the summary. */\n\treadonly clientSequenceNumber: number;\n\t/** Time it took to submit the summarize op to the broadcasting service. */\n\treadonly submitOpDuration: number;\n}\n\n/**\n * Strict type representing result of a submitSummary attempt.\n * The result consists of 4 possible stages, each with its own data.\n * The data is cumulative, so each stage will contain the data from the previous stages.\n * If the final \"submitted\" stage is not reached, the result may contain the error object.\n *\n * Stages:\n *\n * 1. \"base\" - stopped before the summary tree was even generated, and the result only contains the base data\n *\n * 2. \"generate\" - the summary tree was generated, and the result will contain that tree + stats\n *\n * 3. \"upload\" - the summary was uploaded to storage, and the result contains the server-provided handle\n *\n * 4. \"submit\" - the summarize op was submitted, and the result contains the op client sequence number.\n */\nexport type SubmitSummaryResult =\n\t| IBaseSummarizeResult\n\t| IGenerateSummaryTreeResult\n\t| IUploadSummaryResult\n\t| ISubmitSummaryOpResult;\n\nexport interface IBroadcastSummaryResult {\n\treadonly summarizeOp: ISummaryOpMessage;\n\treadonly broadcastDuration: number;\n}\n\nexport interface IAckSummaryResult {\n\treadonly summaryAckOp: ISummaryAckMessage;\n\treadonly ackNackDuration: number;\n}\n\nexport interface INackSummaryResult {\n\treadonly summaryNackOp: ISummaryNackMessage;\n\treadonly ackNackDuration: number;\n}\n\nexport type SummarizeResultPart<TSuccess, TFailure = undefined> =\n\t| {\n\t\t\tsuccess: true;\n\t\t\tdata: TSuccess;\n\t }\n\t| {\n\t\t\tsuccess: false;\n\t\t\tdata: TFailure | undefined;\n\t\t\tmessage: string;\n\t\t\terror: any;\n\t\t\tretryAfterSeconds?: number;\n\t };\n\nexport interface ISummarizeResults {\n\t/** Resolves when we generate, upload, and submit the summary. */\n\treadonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult>>;\n\t/** Resolves when we observe our summarize op broadcast. */\n\treadonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;\n\t/** Resolves when we receive a summaryAck or summaryNack. */\n\treadonly receivedSummaryAckOrNack: Promise<\n\t\tSummarizeResultPart<IAckSummaryResult, INackSummaryResult>\n\t>;\n}\n\nexport type EnqueueSummarizeResult =\n\t| (ISummarizeResults & {\n\t\t\t/**\n\t\t\t * Indicates that another summarize attempt is not already enqueued,\n\t\t\t * and this attempt has been enqueued.\n\t\t\t */\n\t\t\treadonly alreadyEnqueued?: undefined;\n\t })\n\t| (ISummarizeResults & {\n\t\t\t/** Indicates that another summarize attempt was already enqueued. */\n\t\t\treadonly alreadyEnqueued: true;\n\t\t\t/**\n\t\t\t * Indicates that the other enqueued summarize attempt was abandoned,\n\t\t\t * and this attempt has been enqueued enqueued.\n\t\t\t */\n\t\t\treadonly overridden: true;\n\t })\n\t| {\n\t\t\t/** Indicates that another summarize attempt was already enqueued. */\n\t\t\treadonly alreadyEnqueued: true;\n\t\t\t/**\n\t\t\t * Indicates that the other enqueued summarize attempt remains enqueued,\n\t\t\t * and this attempt has not been enqueued.\n\t\t\t */\n\t\t\treadonly overridden?: undefined;\n\t };\n\nexport type SummarizerStopReason =\n\t/** Summarizer client failed to summarize in all 3 consecutive attempts. */\n\t| \"failToSummarize\"\n\t/** Parent client reported that it is no longer connected. */\n\t| \"parentNotConnected\"\n\t/**\n\t * Parent client reported that it is no longer elected the summarizer.\n\t * This is the normal flow; a disconnect will always trigger the parent\n\t * client to no longer be elected as responsible for summaries. Then it\n\t * tries to stop its spawned summarizer client.\n\t */\n\t| \"notElectedParent\"\n\t/**\n\t * We are not already running the summarizer and we are not the current elected client id.\n\t */\n\t| \"notElectedClient\"\n\t/** Summarizer client was disconnected */\n\t| \"summarizerClientDisconnected\"\n\t/* running summarizer threw an exception */\n\t| \"summarizerException\";\n\nexport interface ISummarizerEvents extends IEvent {\n\t/**\n\t * An event indicating that the Summarizer is having problems summarizing\n\t */\n\t(event: \"summarizingError\", listener: (error: ISummarizingWarning) => void);\n}\n\nexport interface ISummarizer extends IEventProvider<ISummarizerEvents> {\n\t/**\n\t * Allows {@link ISummarizer} to be used with our {@link @fluidframework/core-interfaces#FluidObject} pattern.\n\t */\n\treadonly ISummarizer?: ISummarizer;\n\n\t/*\n\t * Asks summarizer to move to exit.\n\t * Summarizer will finish current processes, which may take a while.\n\t * For example, summarizer may complete last summary before exiting.\n\t */\n\tstop(reason: SummarizerStopReason): void;\n\n\t/* Closes summarizer. Any pending processes (summary in flight) are abandoned. */\n\tclose(): void;\n\n\trun(onBehalfOf: string, disableHeuristics?: boolean): Promise<SummarizerStopReason>;\n\n\t/**\n\t * Attempts to generate a summary on demand. If already running, takes no action.\n\t * @param options - options controlling the summarize attempt\n\t * @returns an alreadyRunning promise if a summarize attempt is already in progress,\n\t * which will resolve when the current attempt completes. At that point caller can\n\t * decide to try again or not. Otherwise, it will return an object containing promises\n\t * that resolve as the summarize attempt progresses. They will resolve with success\n\t * false if a failure is encountered.\n\t */\n\tsummarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;\n\t/**\n\t * Enqueue an attempt to summarize after the specified sequence number.\n\t * If afterSequenceNumber is provided, the summarize attempt is \"enqueued\"\n\t * to run once an eligible op comes in with sequenceNumber \\>= afterSequenceNumber.\n\t * @param options - options controlling the summarize attempt\n\t * @returns an object containing an alreadyEnqueued flag to indicate if another\n\t * summarize attempt has already been enqueued. It also may contain an overridden flag\n\t * when alreadyEnqueued is true, that indicates whether this attempt forced the\n\t * previous attempt to abort. If this attempt becomes enqueued, it returns an object\n\t * containing promises that resolve as the summarize attempt progresses. They will\n\t * resolve with success false if a failure is encountered.\n\t */\n\tenqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;\n}\n\n/** Data about an attempt to summarize used for heuristics. */\nexport interface ISummarizeAttempt {\n\t/** Reference sequence number when summary was generated or attempted */\n\treadonly refSequenceNumber: number;\n\n\t/** Time of summary attempt after it was sent or attempted */\n\treadonly summaryTime: number;\n\n\t/** Sequence number of summary op */\n\tsummarySequenceNumber?: number;\n}\n\n/** Data relevant for summary heuristics. */\nexport interface ISummarizeHeuristicData {\n\t/** Latest received op sequence number */\n\tlastOpSequenceNumber: number;\n\n\t/** Most recent summary attempt from this client */\n\treadonly lastAttempt: ISummarizeAttempt;\n\n\t/** Most recent summary that received an ack */\n\treadonly lastSuccessfulSummary: Readonly<ISummarizeAttempt>;\n\n\t/** Number of runtime ops since last summary */\n\tnumRuntimeOps: number;\n\n\t/** Number of non-runtime ops since last summary */\n\tnumNonRuntimeOps: number;\n\n\t/** Cumulative size in bytes of all the ops since the last summary */\n\ttotalOpsSize: number;\n\n\t/** Wether or not this instance contains adjusted metrics due to missing op data */\n\thasMissingOpData: boolean;\n\n\t/**\n\t * Updates lastAttempt and lastSuccessfulAttempt based on the last summary.\n\t * @param lastSummary - last ack summary\n\t */\n\tupdateWithLastSummaryAckInfo(lastSummary: ISummarizeAttempt): void;\n\n\t/**\n\t * Records a summary attempt. If the attempt was successfully sent,\n\t * provide the reference sequence number, otherwise it will be set\n\t * to the last seen op sequence number.\n\t * @param referenceSequenceNumber - reference sequence number of sent summary\n\t */\n\trecordAttempt(referenceSequenceNumber?: number): void;\n\n\t/** Mark that the last sent summary attempt has received an ack */\n\tmarkLastAttemptAsSuccessful(): void;\n}\n\n/** Responsible for running heuristics determining when to summarize. */\nexport interface ISummarizeHeuristicRunner {\n\t/** Start specific heuristic trackers (ex: idle timer) */\n\tstart(): void;\n\n\t/** Runs the heuristics to determine if it should try to summarize */\n\trun(): void;\n\n\t/** Runs a different heuristic to check if it should summarize before closing */\n\tshouldRunLastSummary(): boolean;\n\n\t/** Disposes of resources */\n\tdispose(): void;\n}\n\ntype ISummarizeTelemetryRequiredProperties =\n\t/** Reason code for attempting to summarize */\n\t\"reason\";\n\ntype ISummarizeTelemetryOptionalProperties =\n\t/** Number of attempts within the last time window, used for calculating the throttle delay. */\n\t| \"summaryAttempts\"\n\t/** Number of attempts within the current phase (currently capped at 2 ) */\n\t| \"summaryAttemptsPerPhase\"\n\t/** One-based count of phases we've attempted (used to index into an array of ISummarizeOptions */\n\t| \"summaryAttemptPhase\"\n\t| keyof ISummarizeOptions;\n\nexport type ISummarizeTelemetryProperties = Pick<\n\tITelemetryProperties,\n\tISummarizeTelemetryRequiredProperties\n> &\n\tPartial<Pick<ITelemetryProperties, ISummarizeTelemetryOptionalProperties>>;\n\n/** Strategy used to heuristically determine when we should run a summary */\nexport interface ISummaryHeuristicStrategy {\n\t/** Summarize reason for this summarize heuristic strategy (ex: \"maxTime\") */\n\tsummarizeReason: Readonly<SummarizeReason>;\n\n\t/**\n\t * Determines if this strategy's summarize criteria been met\n\t * @param configuration - summary configuration we are to check against\n\t * @param heuristicData - heuristic data used to confirm conditions are met\n\t */\n\tshouldRunSummary(\n\t\tconfiguration: ISummaryConfigurationHeuristics,\n\t\theuristicData: ISummarizeHeuristicData,\n\t): boolean;\n}\n\ntype SummaryGeneratorRequiredTelemetryProperties =\n\t/** True to generate the full tree with no handle reuse optimizations */\n\t| \"fullTree\"\n\t/** Time since we last attempted to generate a summary */\n\t| \"timeSinceLastAttempt\"\n\t/** Time since we last successfully generated a summary */\n\t| \"timeSinceLastSummary\";\n\ntype SummaryGeneratorOptionalTelemetryProperties =\n\t/** Reference sequence number as of the generate summary attempt. */\n\t| \"referenceSequenceNumber\"\n\t/** minimum sequence number (at the reference sequence number) */\n\t| \"minimumSequenceNumber\"\n\t/** Delta between the current reference sequence number and the reference sequence number of the last attempt */\n\t| \"opsSinceLastAttempt\"\n\t/** Delta between the current reference sequence number and the reference sequence number of the last summary */\n\t| \"opsSinceLastSummary\"\n\t/**\n\t * Delta in sum of op sizes between the current reference sequence number and the reference\n\t * sequence number of the last summary\n\t */\n\t| \"opsSizesSinceLastSummary\"\n\t/** Delta between the number of non-runtime ops since the last summary */\n\t| \"nonRuntimeOpsSinceLastSummary\"\n\t/** Wether or not this instance contains adjusted metrics due to missing op data */\n\t| \"hasMissingOpData\"\n\t/** Time it took to generate the summary tree and stats. */\n\t| \"generateDuration\"\n\t/** The handle returned by storage pointing to the uploaded summary tree. */\n\t| \"handle\"\n\t/** Time it took to upload the summary tree to storage. */\n\t| \"uploadDuration\"\n\t/** The client sequence number of the summarize op submitted for the summary. */\n\t| \"clientSequenceNumber\"\n\t/** Time it took for this summary to be acked after it was generated */\n\t| \"ackWaitDuration\"\n\t/** Reference sequence number of the ack/nack message */\n\t| \"ackNackSequenceNumber\"\n\t/** Actual sequence number of the summary op proposal. */\n\t| \"summarySequenceNumber\"\n\t/** Optional Retry-After time in seconds. If specified, the client should wait this many seconds before retrying. */\n\t| \"nackRetryAfter\";\n\nexport type SummaryGeneratorTelemetry = Pick<\n\tITelemetryProperties,\n\tSummaryGeneratorRequiredTelemetryProperties\n> &\n\tPartial<Pick<ITelemetryProperties, SummaryGeneratorOptionalTelemetryProperties>>;\n\nexport interface ISummarizeRunnerTelemetry extends ITelemetryLoggerPropertyBag {\n\t/** Number of times the summarizer run. */\n\tsummarizeCount: () => number;\n\t/** Number of successful attempts to summarize. */\n\tsummarizerSuccessfulAttempts: () => number;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime",
3
- "version": "2.0.0-internal.3.4.2",
3
+ "version": "2.0.0-internal.4.0.1",
4
4
  "description": "Fluid container runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -37,19 +37,19 @@
37
37
  "dependencies": {
38
38
  "@fluidframework/common-definitions": "^0.20.1",
39
39
  "@fluidframework/common-utils": "^1.1.1",
40
- "@fluidframework/container-definitions": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
41
- "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
42
- "@fluidframework/container-utils": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
43
- "@fluidframework/core-interfaces": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
44
- "@fluidframework/datastore": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
45
- "@fluidframework/driver-definitions": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
46
- "@fluidframework/driver-utils": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
47
- "@fluidframework/garbage-collector": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
40
+ "@fluidframework/container-definitions": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
41
+ "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
42
+ "@fluidframework/container-utils": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
43
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
44
+ "@fluidframework/datastore": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
45
+ "@fluidframework/driver-definitions": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
46
+ "@fluidframework/driver-utils": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
47
+ "@fluidframework/garbage-collector": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
48
48
  "@fluidframework/protocol-base": "^0.1038.4000",
49
49
  "@fluidframework/protocol-definitions": "^1.1.0",
50
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
51
- "@fluidframework/runtime-utils": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
52
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
50
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
51
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
52
+ "@fluidframework/telemetry-utils": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
53
53
  "double-ended-queue": "^2.1.0-0",
54
54
  "events": "^3.1.0",
55
55
  "lz4js": "^0.2.0",
@@ -61,8 +61,8 @@
61
61
  "@fluidframework/build-tools": "^0.13.0",
62
62
  "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.3.2.0",
63
63
  "@fluidframework/eslint-config-fluid": "^2.0.0",
64
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
65
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.3.4.2 <2.0.0-internal.4.0.0",
64
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
65
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.4.0.1 <2.0.0-internal.5.0.0",
66
66
  "@microsoft/api-extractor": "^7.34.4",
67
67
  "@types/double-ended-queue": "^2.1.0",
68
68
  "@types/events": "^3.0.0",
@@ -81,7 +81,44 @@
81
81
  "typescript": "~4.5.5"
82
82
  },
83
83
  "typeValidation": {
84
- "broken": {}
84
+ "broken": {
85
+ "ClassDeclaration_ContainerRuntime": {
86
+ "backCompat": false
87
+ },
88
+ "RemovedInterfaceDeclaration_IPendingFlush": {
89
+ "backCompat": false,
90
+ "forwardCompat": false
91
+ },
92
+ "RemovedInterfaceDeclaration_IPendingLocalState": {
93
+ "backCompat": false,
94
+ "forwardCompat": false
95
+ },
96
+ "RemovedInterfaceDeclaration_IPendingMessage": {
97
+ "backCompat": false,
98
+ "forwardCompat": false
99
+ },
100
+ "RemovedTypeAliasDeclaration_IPendingState": {
101
+ "backCompat": false,
102
+ "forwardCompat": false
103
+ },
104
+ "InterfaceDeclaration_IConnectableRuntime": {
105
+ "backCompat": false
106
+ },
107
+ "RemovedInterfaceDeclaration_IProvideSummarizer": {
108
+ "forwardCompat": false,
109
+ "backCompat": false
110
+ },
111
+ "RemovedVariableDeclaration_ISummarizer": {
112
+ "forwardCompat": false,
113
+ "backCompat": false
114
+ },
115
+ "InterfaceDeclaration_ISummarizer": {
116
+ "backCompat": false
117
+ },
118
+ "ClassDeclaration_Summarizer": {
119
+ "backCompat": false
120
+ }
121
+ }
85
122
  },
86
123
  "scripts": {
87
124
  "build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs",
@@ -17,7 +17,6 @@ import {
17
17
  } from "@fluidframework/core-interfaces";
18
18
  import {
19
19
  IAudience,
20
- IFluidTokenProvider,
21
20
  IContainerContext,
22
21
  IDeltaManager,
23
22
  IRuntime,
@@ -98,9 +97,6 @@ import {
98
97
  addBlobToSummary,
99
98
  addSummarizeResultToSummary,
100
99
  addTreeToSummary,
101
- createRootSummarizerNodeWithGC,
102
- IFetchSnapshotResult,
103
- IRootSummarizerNodeWithGC,
104
100
  RequestParser,
105
101
  create404Response,
106
102
  exceptionToResponse,
@@ -123,10 +119,13 @@ import {
123
119
  aliasBlobName,
124
120
  blobsTreeName,
125
121
  chunksBlobName,
122
+ createRootSummarizerNodeWithGC,
126
123
  electedSummarizerBlobName,
127
124
  extractSummaryMetadataMessage,
128
125
  IContainerRuntimeMetadata,
129
126
  ICreateContainerMetadata,
127
+ IFetchSnapshotResult,
128
+ IRootSummarizerNodeWithGC,
130
129
  ISummaryMetadataMessage,
131
130
  metadataBlobName,
132
131
  Summarizer,
@@ -1323,8 +1322,13 @@ export class ContainerRuntime
1323
1322
  );
1324
1323
 
1325
1324
  if (this.context.clientDetails.type === summarizerClientType) {
1325
+ // ContainerRuntime handles the entryPoint for summarizer clients on its own; we shouldn't receive
1326
+ // an initializeEntryPoint for that case.
1327
+ assert(
1328
+ initializeEntryPoint === undefined,
1329
+ 0x5be /* Summarizer clients cannot have a custom entryPoint */,
1330
+ );
1326
1331
  this._summarizer = new Summarizer(
1327
- "/_summarizer",
1328
1332
  this /* ISummarizerRuntime */,
1329
1333
  () => this.summaryConfiguration,
1330
1334
  this /* ISummarizerInternalsProvider */,
@@ -1440,7 +1444,16 @@ export class ContainerRuntime
1440
1444
  ReportOpPerfTelemetry(this.context.clientId, this.deltaManager, this.logger);
1441
1445
  BindBatchTracker(this, this.logger);
1442
1446
 
1443
- this.entryPoint = new LazyPromise(async () => initializeEntryPoint?.(this));
1447
+ this.entryPoint = new LazyPromise(async () => {
1448
+ if (this.context.clientDetails.type === summarizerClientType) {
1449
+ assert(
1450
+ this._summarizer !== undefined,
1451
+ 0x5bf /* Summarizer object is undefined in a summarizer client */,
1452
+ );
1453
+ return this._summarizer;
1454
+ }
1455
+ return initializeEntryPoint?.(this);
1456
+ });
1444
1457
  }
1445
1458
 
1446
1459
  /**
@@ -1478,19 +1491,6 @@ export class ContainerRuntime
1478
1491
  this.removeAllListeners();
1479
1492
  }
1480
1493
 
1481
- /**
1482
- * @deprecated 2.0.0-internal.3.2.0 ContainerRuntime is not an IFluidTokenProvider. Token providers should be accessed using normal provider patterns.
1483
- */
1484
- public get IFluidTokenProvider() {
1485
- if (this.options?.intelligence) {
1486
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
1487
- return {
1488
- intelligence: this.options.intelligence,
1489
- } as IFluidTokenProvider;
1490
- }
1491
- return undefined;
1492
- }
1493
-
1494
1494
  /**
1495
1495
  * Notifies this object about the request made to the container.
1496
1496
  * @param request - Request made to the handler.
@@ -24,11 +24,7 @@ import {
24
24
  ISummarizeResult,
25
25
  ITelemetryContext,
26
26
  } from "@fluidframework/runtime-definitions";
27
- import {
28
- packagePathToTelemetryProperty,
29
- ReadAndParseBlob,
30
- RefreshSummaryResult,
31
- } from "@fluidframework/runtime-utils";
27
+ import { packagePathToTelemetryProperty, ReadAndParseBlob } from "@fluidframework/runtime-utils";
32
28
  import {
33
29
  ChildLogger,
34
30
  generateStack,
@@ -39,7 +35,7 @@ import {
39
35
  } from "@fluidframework/telemetry-utils";
40
36
 
41
37
  import { RuntimeHeaders } from "../containerRuntime";
42
- import { ICreateContainerMetadata } from "../summary";
38
+ import { ICreateContainerMetadata, RefreshSummaryResult } from "../summary";
43
39
  import { generateGCConfigs } from "./gcConfigs";
44
40
  import {
45
41
  disableSweepLogKey,
@@ -12,9 +12,13 @@ import {
12
12
  ISummarizeResult,
13
13
  ITelemetryContext,
14
14
  } from "@fluidframework/runtime-definitions";
15
- import { ReadAndParseBlob, RefreshSummaryResult } from "@fluidframework/runtime-utils";
15
+ import { ReadAndParseBlob } from "@fluidframework/runtime-utils";
16
16
  import { ITelemetryLogger } from "@fluidframework/common-definitions";
17
- import { IContainerRuntimeMetadata, ICreateContainerMetadata } from "../summary";
17
+ import {
18
+ IContainerRuntimeMetadata,
19
+ ICreateContainerMetadata,
20
+ RefreshSummaryResult,
21
+ } from "../summary";
18
22
 
19
23
  export type GCVersion = number;
20
24
 
@@ -164,9 +168,7 @@ export const GCNodeType = {
164
168
  };
165
169
  export type GCNodeType = typeof GCNodeType[keyof typeof GCNodeType];
166
170
 
167
- // NOTE: Once this is removed from the package exports in the next major, the deprecation tag can be removed as well
168
171
  /**
169
- * @deprecated - Was only to be used internally anyway, no replacement provided.
170
172
  * Defines the APIs for the runtime object to be passed to the garbage collector.
171
173
  */
172
174
  export interface IGarbageCollectionRuntime {
@@ -15,13 +15,8 @@ import {
15
15
  ISummarizeResult,
16
16
  ISummaryTreeWithStats,
17
17
  } from "@fluidframework/runtime-definitions";
18
- import {
19
- mergeStats,
20
- ReadAndParseBlob,
21
- RefreshSummaryResult,
22
- SummaryTreeBuilder,
23
- } from "@fluidframework/runtime-utils";
24
- import { IContainerRuntimeMetadata, metadataBlobName } from "../summary";
18
+ import { mergeStats, ReadAndParseBlob, SummaryTreeBuilder } from "@fluidframework/runtime-utils";
19
+ import { IContainerRuntimeMetadata, metadataBlobName, RefreshSummaryResult } from "../summary";
25
20
  import { GCVersion } from "./gcDefinitions";
26
21
  import { generateSortedGCState, getGCVersion } from "./gcHelpers";
27
22
  import { IGarbageCollectorConfigs } from ".";
package/src/gc/index.ts CHANGED
@@ -16,7 +16,7 @@ export {
16
16
  GCFeatureMatrix,
17
17
  GCVersion,
18
18
  gcVersionUpgradeToV2Key,
19
- IGarbageCollectionRuntime, // Deprecated
19
+ IGarbageCollectionRuntime,
20
20
  IGarbageCollector,
21
21
  IGarbageCollectorConfigs,
22
22
  IGarbageCollectorCreateParams,
package/src/index.ts CHANGED
@@ -27,12 +27,6 @@ export {
27
27
  } from "./containerRuntime";
28
28
  export { FluidDataStoreRegistry } from "./dataStoreRegistry";
29
29
  export { IGCRuntimeOptions, IGCStats } from "./gc";
30
- export {
31
- IPendingFlush,
32
- IPendingLocalState,
33
- IPendingMessage,
34
- IPendingState,
35
- } from "./pendingStateManager";
36
30
  export {
37
31
  IAckedSummary,
38
32
  ISummarizer,
@@ -53,7 +47,6 @@ export {
53
47
  IGeneratedSummaryStats,
54
48
  INackSummaryResult,
55
49
  IOnDemandSummarizeOptions,
56
- IProvideSummarizer,
57
50
  IRefreshSummaryAckOptions,
58
51
  ISubmitSummaryOpResult,
59
52
  ISubmitSummaryOptions,
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-internal.3.4.2";
9
+ export const pkgVersion = "2.0.0-internal.4.0.1";
@@ -15,7 +15,6 @@ import { pkgVersion } from "./packageVersion";
15
15
  /**
16
16
  * This represents a message that has been submitted and is added to the pending queue when `submit` is called on the
17
17
  * ContainerRuntime. This message has either not been ack'd by the server or has not been submitted to the server yet.
18
- * @deprecated - This interface will no longer be exported in a future version
19
18
  */
20
19
  export interface IPendingMessage {
21
20
  type: "message";
@@ -30,20 +29,15 @@ export interface IPendingMessage {
30
29
  /**
31
30
  * This represents an explicit flush call and is added to the pending queue when flush is called on the ContainerRuntime
32
31
  * to flush pending messages.
33
- * @deprecated Use batch metadata on IPendingMessage instead. To be removed in 2.0.0-internal.4.0.0 (AB#2496)
32
+ * ! TODO: Remove in "2.0.0-internal.5.0.0" AB#2496
34
33
  */
35
34
  export interface IPendingFlush {
36
35
  type: "flush";
37
36
  }
38
37
 
39
- /**
40
- * @deprecated - This interface will no longer be exported in a future version
41
- */
38
+ /** ! TODO: Remove in "2.0.0-internal.5.0.0" AB#2496 */
42
39
  export type IPendingState = IPendingMessage | IPendingFlush;
43
40
 
44
- /**
45
- * @deprecated - This interface will no longer be exported in a future version
46
- */
47
41
  export interface IPendingLocalState {
48
42
  /**
49
43
  * list of pending states, including ops and batch information
@@ -114,17 +108,11 @@ export class PendingStateManager implements IDisposable {
114
108
  );
115
109
  if (!this.pendingMessages.isEmpty()) {
116
110
  return {
117
- pendingStates: this.pendingMessages.toArray().reduce((arr, message) => {
118
- // delete localOpMetadata since it may not be serializable
119
- // and will be regenerated by applyStashedOp()
120
- arr.push({ ...message, localOpMetadata: undefined });
121
-
122
- // TODO: Remove in 2.0.0-internal.4.0.0 (AB#2496)
123
- if (message.opMetadata?.batch === false) {
124
- arr.push({ type: "flush" });
125
- }
126
- return arr;
127
- }, new Array<IPendingState>()),
111
+ // delete localOpMetadata since it may not be serializable
112
+ // and will be regenerated by applyStashedOp()
113
+ pendingStates: this.pendingMessages
114
+ .toArray()
115
+ .map((message) => ({ ...message, localOpMetadata: undefined })),
128
116
  };
129
117
  }
130
118
  }
@@ -137,7 +125,7 @@ export class PendingStateManager implements IDisposable {
137
125
  * Convert old local state format to the new format
138
126
  * The old format contained "flush" messages as the indicator of batch ends
139
127
  * The new format instead uses batch metadata on the last message to indicate batch ends
140
- * ! TODO: Remove this conversion in "2.0.0-internal.4.0.0" as rollback from future version will be new format
128
+ * ! TODO: Remove this conversion in "2.0.0-internal.5.0.0" as version from "2.0.0-internal.4.0.0" will be new format
141
129
  * AB#2496 tracks removal
142
130
  */
143
131
  if (initialLocalState?.pendingStates) {
@@ -24,8 +24,15 @@ export {
24
24
  SummarizerClientElection,
25
25
  summarizerClientType,
26
26
  } from "./summarizerClientElection";
27
- export { SummarizerHandle } from "./summarizerHandle";
28
27
  export { SummarizeHeuristicData, SummarizeHeuristicRunner } from "./summarizerHeuristics";
28
+ export {
29
+ createRootSummarizerNode,
30
+ createRootSummarizerNodeWithGC,
31
+ IFetchSnapshotResult,
32
+ IRootSummarizerNode,
33
+ IRootSummarizerNodeWithGC,
34
+ RefreshSummaryResult,
35
+ } from "./summarizerNode";
29
36
  export {
30
37
  IConnectableRuntime,
31
38
  IGeneratedSummaryStats,
@@ -50,7 +57,6 @@ export {
50
57
  IGenerateSummaryTreeResult,
51
58
  INackSummaryResult,
52
59
  IOnDemandSummarizeOptions,
53
- IProvideSummarizer,
54
60
  ISubmitSummaryOpResult,
55
61
  ISummarizeOptions,
56
62
  ISummarizingWarning,
@@ -16,17 +16,11 @@ import {
16
16
  LoggingError,
17
17
  wrapErrorAndLog,
18
18
  } from "@fluidframework/telemetry-utils";
19
- import {
20
- FluidObject,
21
- IFluidHandleContext,
22
- IFluidHandle,
23
- IRequest,
24
- } from "@fluidframework/core-interfaces";
19
+ import { FluidObject, IFluidHandleContext, IRequest } from "@fluidframework/core-interfaces";
25
20
  import { ISummaryConfiguration } from "../containerRuntime";
26
21
  import { ICancellableSummarizerController } from "./runWhileConnectedCoordinator";
27
22
  import { summarizerClientType } from "./summarizerClientElection";
28
23
  import { SummaryCollection } from "./summaryCollection";
29
- import { SummarizerHandle } from "./summarizerHandle";
30
24
  import { RunningSummarizer } from "./runningSummarizer";
31
25
  import {
32
26
  IConnectableRuntime,
@@ -67,9 +61,6 @@ export const createSummarizingWarning = (errorMessage: string, logged: boolean)
67
61
  * It is created only by summarizing container (i.e. one with clientType === "summarizer")
68
62
  */
69
63
  export class Summarizer extends EventEmitter implements ISummarizer {
70
- public get IFluidLoadable() {
71
- return this;
72
- }
73
64
  public get ISummarizer() {
74
65
  return this;
75
66
  }
@@ -79,15 +70,9 @@ export class Summarizer extends EventEmitter implements ISummarizer {
79
70
  private _disposed: boolean = false;
80
71
  private starting: boolean = false;
81
72
 
82
- private readonly innerHandle: IFluidHandle<this>;
83
-
84
- public get handle(): IFluidHandle<this> {
85
- return this.innerHandle;
86
- }
87
73
  private readonly stopDeferred = new Deferred<SummarizerStopReason>();
88
74
 
89
75
  constructor(
90
- url: string,
91
76
  /** Reference to runtime that created this object.
92
77
  * i.e. runtime with clientType === "summarizer"
93
78
  */
@@ -105,7 +90,6 @@ export class Summarizer extends EventEmitter implements ISummarizer {
105
90
  ) {
106
91
  super();
107
92
  this.logger = ChildLogger.create(this.runtime.logger, "Summarizer");
108
- this.innerHandle = new SummarizerHandle(this, url, handleContext);
109
93
  }
110
94
 
111
95
  /**
@@ -132,10 +116,12 @@ export class Summarizer extends EventEmitter implements ISummarizer {
132
116
  };
133
117
 
134
118
  const resolvedContainer = await loader.resolve(request);
135
- const fluidObject = await requestFluidObject<FluidObject<ISummarizer>>(resolvedContainer, {
136
- url: "_summarizer",
137
- });
138
- if (fluidObject.ISummarizer === undefined) {
119
+ const fluidObject: FluidObject<ISummarizer> | undefined = resolvedContainer.getEntryPoint
120
+ ? await resolvedContainer.getEntryPoint?.()
121
+ : await requestFluidObject<FluidObject<ISummarizer>>(resolvedContainer, {
122
+ url: "_summarizer",
123
+ });
124
+ if (fluidObject?.ISummarizer === undefined) {
139
125
  throw new UsageError("Fluid object does not implement ISummarizer");
140
126
  }
141
127
  return fluidObject.ISummarizer;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ export {
7
+ IFetchSnapshotResult,
8
+ ISummarizerNodeRootContract,
9
+ RefreshSummaryResult,
10
+ } from "./summarizerNodeUtils";
11
+ export { IRootSummarizerNode, createRootSummarizerNode } from "./summarizerNode";
12
+ export { IRootSummarizerNodeWithGC, createRootSummarizerNodeWithGC } from "./summarizerNodeWithGc";