@fluidframework/container-runtime 2.0.0-internal.7.1.0 → 2.0.0-internal.7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/api-extractor.json +1 -13
- package/api-report/container-runtime.api.md +75 -10
- package/dist/blobManager.d.ts +4 -6
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +42 -56
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +71 -23
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +72 -32
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.js +2 -2
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +8 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +15 -8
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +3 -0
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js +3 -0
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/dataStores.d.ts +0 -2
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +2 -7
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerProxyBase.d.ts +1 -1
- package/dist/deltaManagerProxyBase.d.ts.map +1 -1
- package/dist/deltaManagerProxyBase.js +2 -2
- package/dist/deltaManagerProxyBase.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +6 -0
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +16 -3
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +1 -0
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +12 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +40 -9
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +4 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +2 -3
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +7 -8
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +2 -2
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -5
- package/dist/gc/index.js.map +1 -1
- package/dist/id-compressor/utilities.d.ts +3 -0
- package/dist/id-compressor/utilities.d.ts.map +1 -1
- package/dist/id-compressor/utilities.js +3 -0
- package/dist/id-compressor/utilities.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +4 -1
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js +3 -0
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +3 -0
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +4 -1
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +5 -0
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +1 -0
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/summarizer.d.ts +1 -0
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +1 -0
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +94 -10
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +16 -0
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +1 -0
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +10 -1
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/lib/blobManager.d.ts +4 -6
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +44 -58
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +71 -23
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +73 -33
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.js +2 -2
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +8 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +16 -9
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +3 -0
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js +3 -0
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/dataStores.d.ts +0 -2
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +3 -8
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerProxyBase.d.ts +1 -1
- package/lib/deltaManagerProxyBase.d.ts.map +1 -1
- package/lib/deltaManagerProxyBase.js +2 -2
- package/lib/deltaManagerProxyBase.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +6 -0
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +16 -3
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +1 -0
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +14 -4
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +40 -9
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +4 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +2 -3
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +7 -8
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/index.d.ts +2 -2
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +2 -2
- package/lib/gc/index.js.map +1 -1
- package/lib/id-compressor/utilities.d.ts +3 -0
- package/lib/id-compressor/utilities.d.ts.map +1 -1
- package/lib/id-compressor/utilities.js +3 -0
- package/lib/id-compressor/utilities.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +4 -1
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js +3 -0
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +3 -0
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +4 -1
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +5 -0
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +1 -0
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/summarizer.d.ts +1 -0
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +1 -0
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +94 -10
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +16 -0
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -0
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +10 -1
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/package.json +25 -22
- package/src/blobManager.ts +61 -74
- package/src/containerRuntime.ts +103 -50
- package/src/dataStore.ts +2 -2
- package/src/dataStoreContext.ts +16 -9
- package/src/dataStoreRegistry.ts +3 -0
- package/src/dataStores.ts +4 -16
- package/src/deltaManagerProxyBase.ts +2 -2
- package/src/gc/garbageCollection.ts +18 -3
- package/src/gc/gcConfigs.ts +22 -4
- package/src/gc/gcDefinitions.ts +41 -9
- package/src/gc/gcSummaryDefinitions.ts +1 -1
- package/src/gc/gcTelemetry.ts +8 -8
- package/src/gc/index.ts +0 -4
- package/src/id-compressor/utilities.ts +3 -0
- package/src/index.ts +13 -1
- package/src/messageTypes.ts +4 -1
- package/src/opLifecycle/definitions.ts +3 -0
- package/src/packageVersion.ts +1 -1
- package/src/summary/orderedClientElection.ts +4 -1
- package/src/summary/runWhileConnectedCoordinator.ts +5 -1
- package/src/summary/summarizer.ts +1 -0
- package/src/summary/summarizerTypes.ts +95 -11
- package/src/summary/summaryCollection.ts +18 -1
- package/src/summary/summaryFormat.ts +11 -1
- package/dist/container-runtime-alpha.d.ts +0 -1554
- package/dist/container-runtime-beta.d.ts +0 -1554
- package/dist/container-runtime-public.d.ts +0 -1554
- package/dist/container-runtime.d.ts +0 -1611
- package/src/gc/gcEarlyAdoption.md +0 -145
|
@@ -19,6 +19,7 @@ import { SummarizeReason } from "./summaryGenerator";
|
|
|
19
19
|
/**
|
|
20
20
|
* Similar to AbortSignal, but using promise instead of events
|
|
21
21
|
* @param T - cancellation reason type
|
|
22
|
+
* @public
|
|
22
23
|
*/
|
|
23
24
|
export interface ICancellationToken<T> {
|
|
24
25
|
/** Tells if this cancellable token is cancelled */
|
|
@@ -30,11 +31,15 @@ export interface ICancellationToken<T> {
|
|
|
30
31
|
readonly waitCancelled: Promise<T>;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Similar to AbortSignal, but using promise instead of events
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
34
38
|
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;
|
|
35
39
|
|
|
36
40
|
/**
|
|
37
41
|
* Data required to update internal tracking state after receiving a Summary Ack.
|
|
42
|
+
* @public
|
|
38
43
|
*/
|
|
39
44
|
export interface IRefreshSummaryAckOptions {
|
|
40
45
|
/** Handle from the ack's summary op. */
|
|
@@ -47,6 +52,9 @@ export interface IRefreshSummaryAckOptions {
|
|
|
47
52
|
readonly summaryLogger: ITelemetryLoggerExt;
|
|
48
53
|
}
|
|
49
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
50
58
|
export interface ISummarizerInternalsProvider {
|
|
51
59
|
/** Encapsulates the work to walk the internals of the running container to generate a summary */
|
|
52
60
|
submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
|
|
@@ -57,6 +65,7 @@ export interface ISummarizerInternalsProvider {
|
|
|
57
65
|
|
|
58
66
|
/**
|
|
59
67
|
* @deprecated Options that control the behavior of a running summarizer.
|
|
68
|
+
* @public
|
|
60
69
|
* */
|
|
61
70
|
export interface ISummarizerOptions {
|
|
62
71
|
/**
|
|
@@ -68,11 +77,17 @@ export interface ISummarizerOptions {
|
|
|
68
77
|
disableHeuristics: boolean;
|
|
69
78
|
}
|
|
70
79
|
|
|
80
|
+
/**
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
71
83
|
export interface ISummarizingWarning extends ContainerWarning {
|
|
72
84
|
readonly errorType: "summarizingError";
|
|
73
85
|
readonly logged: boolean;
|
|
74
86
|
}
|
|
75
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
76
91
|
export interface IConnectableRuntime {
|
|
77
92
|
readonly disposed: boolean;
|
|
78
93
|
readonly connected: boolean;
|
|
@@ -80,6 +95,9 @@ export interface IConnectableRuntime {
|
|
|
80
95
|
once(event: "connected" | "disconnected" | "dispose", listener: () => void): this;
|
|
81
96
|
}
|
|
82
97
|
|
|
98
|
+
/**
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
83
101
|
export interface ISummarizerRuntime extends IConnectableRuntime {
|
|
84
102
|
readonly logger: ITelemetryLoggerExt;
|
|
85
103
|
/** clientId of parent (non-summarizing) container that owns summarizer container */
|
|
@@ -97,19 +115,25 @@ export interface ISummarizerRuntime extends IConnectableRuntime {
|
|
|
97
115
|
): this;
|
|
98
116
|
}
|
|
99
117
|
|
|
100
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Options affecting summarize behavior.
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
101
122
|
export interface ISummarizeOptions {
|
|
102
123
|
/** True to generate the full tree with no handle reuse optimizations; defaults to false */
|
|
103
124
|
readonly fullTree?: boolean;
|
|
104
125
|
/**
|
|
105
126
|
* True to ask the server what the latest summary is first; defaults to false
|
|
106
127
|
*
|
|
107
|
-
* @deprecated
|
|
128
|
+
* @deprecated Summarize will not refresh latest snapshot state anymore. Instead it updates the cache and closes.
|
|
108
129
|
* It's expected a new summarizer client will be created, likely by the same parent.
|
|
109
130
|
*/
|
|
110
131
|
readonly refreshLatestAck?: boolean;
|
|
111
132
|
}
|
|
112
133
|
|
|
134
|
+
/**
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
113
137
|
export interface ISubmitSummaryOptions extends ISummarizeOptions {
|
|
114
138
|
/** Logger to use for correlated summary events */
|
|
115
139
|
readonly summaryLogger: ITelemetryLoggerExt;
|
|
@@ -119,12 +143,18 @@ export interface ISubmitSummaryOptions extends ISummarizeOptions {
|
|
|
119
143
|
readonly finalAttempt?: boolean;
|
|
120
144
|
}
|
|
121
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
122
149
|
export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
|
|
123
150
|
/** Reason for generating summary. */
|
|
124
151
|
readonly reason: string;
|
|
125
152
|
}
|
|
126
153
|
|
|
127
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Options to use when enqueueing a summarize attempt.
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
128
158
|
export interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {
|
|
129
159
|
/** If specified, The summarize attempt will not occur until after this sequence number. */
|
|
130
160
|
readonly afterSequenceNumber?: number;
|
|
@@ -141,6 +171,7 @@ export interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {
|
|
|
141
171
|
/**
|
|
142
172
|
* In addition to the normal summary tree + stats, this contains additional stats
|
|
143
173
|
* only relevant at the root of the tree.
|
|
174
|
+
* @public
|
|
144
175
|
*/
|
|
145
176
|
export interface IGeneratedSummaryStats extends ISummaryStats {
|
|
146
177
|
/** The total number of data stores in the container. */
|
|
@@ -157,7 +188,10 @@ export interface IGeneratedSummaryStats extends ISummaryStats {
|
|
|
157
188
|
readonly summaryNumber: number;
|
|
158
189
|
}
|
|
159
190
|
|
|
160
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Base results for all submitSummary attempts.
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
161
195
|
export interface IBaseSummarizeResult {
|
|
162
196
|
readonly stage: "base";
|
|
163
197
|
/** Error object related to failed summarize attempt. */
|
|
@@ -167,7 +201,10 @@ export interface IBaseSummarizeResult {
|
|
|
167
201
|
readonly minimumSequenceNumber: number;
|
|
168
202
|
}
|
|
169
203
|
|
|
170
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Results of submitSummary after generating the summary tree.
|
|
206
|
+
* @public
|
|
207
|
+
*/
|
|
171
208
|
export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "stage"> {
|
|
172
209
|
readonly stage: "generate";
|
|
173
210
|
/** Generated summary tree. */
|
|
@@ -180,7 +217,10 @@ export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "
|
|
|
180
217
|
readonly forcedFullTree: boolean;
|
|
181
218
|
}
|
|
182
219
|
|
|
183
|
-
/**
|
|
220
|
+
/**
|
|
221
|
+
* Results of submitSummary after uploading the tree to storage.
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
184
224
|
export interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, "stage"> {
|
|
185
225
|
readonly stage: "upload";
|
|
186
226
|
/** The handle returned by storage pointing to the uploaded summary tree. */
|
|
@@ -189,7 +229,10 @@ export interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, "
|
|
|
189
229
|
readonly uploadDuration: number;
|
|
190
230
|
}
|
|
191
231
|
|
|
192
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* Results of submitSummary after submitting the summarize op.
|
|
234
|
+
* @public
|
|
235
|
+
*/
|
|
193
236
|
export interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stage" | "error"> {
|
|
194
237
|
readonly stage: "submit";
|
|
195
238
|
/** The client sequence number of the summarize op submitted for the summary. */
|
|
@@ -213,6 +256,7 @@ export interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stag
|
|
|
213
256
|
* 3. "upload" - the summary was uploaded to storage, and the result contains the server-provided handle
|
|
214
257
|
*
|
|
215
258
|
* 4. "submit" - the summarize op was submitted, and the result contains the op client sequence number.
|
|
259
|
+
* @public
|
|
216
260
|
*/
|
|
217
261
|
export type SubmitSummaryResult =
|
|
218
262
|
| IBaseSummarizeResult
|
|
@@ -220,34 +264,55 @@ export type SubmitSummaryResult =
|
|
|
220
264
|
| IUploadSummaryResult
|
|
221
265
|
| ISubmitSummaryOpResult;
|
|
222
266
|
|
|
223
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* The stages of Summarize, used to describe how far progress succeeded in case of a failure at a later stage.
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
224
271
|
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";
|
|
225
272
|
|
|
226
|
-
/**
|
|
273
|
+
/**
|
|
274
|
+
* Type for summarization failures that are retriable.
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
227
277
|
export interface IRetriableFailureResult {
|
|
228
278
|
readonly retryAfterSeconds?: number;
|
|
229
279
|
}
|
|
230
280
|
|
|
231
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* The data in summarizer result when submit summary stage fails.
|
|
283
|
+
* @public
|
|
284
|
+
*/
|
|
232
285
|
export interface SubmitSummaryFailureData extends IRetriableFailureResult {
|
|
233
286
|
stage: SummaryStage;
|
|
234
287
|
}
|
|
235
288
|
|
|
289
|
+
/**
|
|
290
|
+
* @public
|
|
291
|
+
*/
|
|
236
292
|
export interface IBroadcastSummaryResult {
|
|
237
293
|
readonly summarizeOp: ISummaryOpMessage;
|
|
238
294
|
readonly broadcastDuration: number;
|
|
239
295
|
}
|
|
240
296
|
|
|
297
|
+
/**
|
|
298
|
+
* @public
|
|
299
|
+
*/
|
|
241
300
|
export interface IAckSummaryResult {
|
|
242
301
|
readonly summaryAckOp: ISummaryAckMessage;
|
|
243
302
|
readonly ackNackDuration: number;
|
|
244
303
|
}
|
|
245
304
|
|
|
305
|
+
/**
|
|
306
|
+
* @public
|
|
307
|
+
*/
|
|
246
308
|
export interface INackSummaryResult extends IRetriableFailureResult {
|
|
247
309
|
readonly summaryNackOp: ISummaryNackMessage;
|
|
248
310
|
readonly ackNackDuration: number;
|
|
249
311
|
}
|
|
250
312
|
|
|
313
|
+
/**
|
|
314
|
+
* @public
|
|
315
|
+
*/
|
|
251
316
|
export type SummarizeResultPart<TSuccess, TFailure = undefined> =
|
|
252
317
|
| {
|
|
253
318
|
success: true;
|
|
@@ -260,6 +325,9 @@ export type SummarizeResultPart<TSuccess, TFailure = undefined> =
|
|
|
260
325
|
error: any;
|
|
261
326
|
};
|
|
262
327
|
|
|
328
|
+
/**
|
|
329
|
+
* @public
|
|
330
|
+
*/
|
|
263
331
|
export interface ISummarizeResults {
|
|
264
332
|
/** Resolves when we generate, upload, and submit the summary. */
|
|
265
333
|
readonly summarySubmitted: Promise<
|
|
@@ -273,6 +341,9 @@ export interface ISummarizeResults {
|
|
|
273
341
|
>;
|
|
274
342
|
}
|
|
275
343
|
|
|
344
|
+
/**
|
|
345
|
+
* @public
|
|
346
|
+
*/
|
|
276
347
|
export type EnqueueSummarizeResult =
|
|
277
348
|
| (ISummarizeResults & {
|
|
278
349
|
/**
|
|
@@ -300,6 +371,9 @@ export type EnqueueSummarizeResult =
|
|
|
300
371
|
readonly overridden?: undefined;
|
|
301
372
|
};
|
|
302
373
|
|
|
374
|
+
/**
|
|
375
|
+
* @public
|
|
376
|
+
*/
|
|
303
377
|
export type SummarizerStopReason =
|
|
304
378
|
/** Summarizer client failed to summarize in all 3 consecutive attempts. */
|
|
305
379
|
| "failToSummarize"
|
|
@@ -326,16 +400,26 @@ export type SummarizerStopReason =
|
|
|
326
400
|
*/
|
|
327
401
|
| "latestSummaryStateStale";
|
|
328
402
|
|
|
403
|
+
/**
|
|
404
|
+
* @public
|
|
405
|
+
*/
|
|
329
406
|
export interface ISummarizeEventProps {
|
|
330
407
|
result: "success" | "failure" | "canceled";
|
|
331
408
|
currentAttempt: number;
|
|
332
409
|
maxAttempts: number;
|
|
333
410
|
error?: any;
|
|
334
411
|
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @public
|
|
415
|
+
*/
|
|
335
416
|
export interface ISummarizerEvents extends IEvent {
|
|
336
417
|
(event: "summarize", listener: (props: ISummarizeEventProps) => void);
|
|
337
418
|
}
|
|
338
419
|
|
|
420
|
+
/**
|
|
421
|
+
* @public
|
|
422
|
+
*/
|
|
339
423
|
export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
|
|
340
424
|
/**
|
|
341
425
|
* Allows {@link ISummarizer} to be used with our {@link @fluidframework/core-interfaces#FluidObject} pattern.
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Interface for summary op messages with typed contents.
|
|
22
|
+
* @public
|
|
22
23
|
*/
|
|
23
24
|
export interface ISummaryOpMessage extends ISequencedDocumentMessage {
|
|
24
25
|
type: MessageType.Summarize;
|
|
@@ -27,6 +28,7 @@ export interface ISummaryOpMessage extends ISequencedDocumentMessage {
|
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Interface for summary ack messages with typed contents.
|
|
31
|
+
* @public
|
|
30
32
|
*/
|
|
31
33
|
export interface ISummaryAckMessage extends ISequencedDocumentMessage {
|
|
32
34
|
type: MessageType.SummaryAck;
|
|
@@ -35,6 +37,7 @@ export interface ISummaryAckMessage extends ISequencedDocumentMessage {
|
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* Interface for summary nack messages with typed contents.
|
|
40
|
+
* @public
|
|
38
41
|
*/
|
|
39
42
|
export interface ISummaryNackMessage extends ISequencedDocumentMessage {
|
|
40
43
|
type: MessageType.SummaryNack;
|
|
@@ -44,6 +47,7 @@ export interface ISummaryNackMessage extends ISequencedDocumentMessage {
|
|
|
44
47
|
/**
|
|
45
48
|
* A single summary which can be tracked as it goes through its life cycle.
|
|
46
49
|
* The life cycle is: Local to Broadcast to Acked/Nacked.
|
|
50
|
+
* @public
|
|
47
51
|
*/
|
|
48
52
|
export interface ISummary {
|
|
49
53
|
readonly clientId: string;
|
|
@@ -54,6 +58,7 @@ export interface ISummary {
|
|
|
54
58
|
|
|
55
59
|
/**
|
|
56
60
|
* A single summary which has already been acked by the server.
|
|
61
|
+
* @public
|
|
57
62
|
*/
|
|
58
63
|
export interface IAckedSummary {
|
|
59
64
|
readonly summaryOp: ISummaryOpMessage;
|
|
@@ -140,6 +145,7 @@ class Summary implements ISummary {
|
|
|
140
145
|
|
|
141
146
|
/**
|
|
142
147
|
* Watches summaries created by a specific client.
|
|
148
|
+
* @public
|
|
143
149
|
*/
|
|
144
150
|
export interface IClientSummaryWatcher extends IDisposable {
|
|
145
151
|
watchSummary(clientSequenceNumber: number): ISummary;
|
|
@@ -207,13 +213,23 @@ class ClientSummaryWatcher implements IClientSummaryWatcher {
|
|
|
207
213
|
this._disposed = true;
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
|
-
|
|
216
|
+
/**
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
211
219
|
export type OpActionEventName =
|
|
212
220
|
| MessageType.Summarize
|
|
213
221
|
| MessageType.SummaryAck
|
|
214
222
|
| MessageType.SummaryNack
|
|
215
223
|
| "default";
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @public
|
|
227
|
+
*/
|
|
216
228
|
export type OpActionEventListener = (op: ISequencedDocumentMessage) => void;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
217
233
|
export interface ISummaryCollectionOpEvents extends IEvent {
|
|
218
234
|
(event: OpActionEventName, listener: OpActionEventListener);
|
|
219
235
|
}
|
|
@@ -222,6 +238,7 @@ export interface ISummaryCollectionOpEvents extends IEvent {
|
|
|
222
238
|
* Data structure that looks at the op stream to track summaries as they
|
|
223
239
|
* are broadcast, acked and nacked.
|
|
224
240
|
* It provides functionality for watching specific summaries.
|
|
241
|
+
* @public
|
|
225
242
|
*/
|
|
226
243
|
export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEvents> {
|
|
227
244
|
// key: clientId
|
|
@@ -84,6 +84,10 @@ export function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttribu
|
|
|
84
84
|
export function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): boolean {
|
|
85
85
|
return !!attributes.summaryFormatVersion && !attributes.disableIsolatedChannels;
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
87
91
|
export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {
|
|
88
92
|
readonly summaryFormatVersion: 1;
|
|
89
93
|
/** The last message processed at the time of summary. Only primitive property types are added to the summary. */
|
|
@@ -98,6 +102,9 @@ export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGC
|
|
|
98
102
|
readonly idCompressorEnabled?: boolean;
|
|
99
103
|
}
|
|
100
104
|
|
|
105
|
+
/**
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
101
108
|
export interface ICreateContainerMetadata {
|
|
102
109
|
/** Runtime version of the container when it was first created */
|
|
103
110
|
createContainerRuntimeVersion?: string;
|
|
@@ -105,7 +112,10 @@ export interface ICreateContainerMetadata {
|
|
|
105
112
|
createContainerTimestamp?: number;
|
|
106
113
|
}
|
|
107
114
|
|
|
108
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary.
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
109
119
|
export type ISummaryMetadataMessage = Pick<
|
|
110
120
|
ISequencedDocumentMessage,
|
|
111
121
|
| "clientId"
|