@fluidframework/container-runtime-definitions 2.11.0 → 2.13.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fluidframework/container-runtime-definitions
2
2
 
3
+ ## 2.13.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.12.0
8
+
9
+ Dependency updates only.
10
+
3
11
  ## 2.11.0
4
12
 
5
13
  Dependency updates only.
@@ -31,7 +31,7 @@ export interface IContainerRuntime extends IProvideFluidDataStoreRegistry, ICont
31
31
  export type IContainerRuntimeBaseWithCombinedEvents = IContainerRuntimeBase & IEventProvider<IContainerRuntimeEvents>;
32
32
 
33
33
  // @alpha @sealed
34
- export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents {
34
+ export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents, ISummarizerEvents {
35
35
  // (undocumented)
36
36
  (event: "dirty" | "disconnected" | "saved" | "attached", listener: () => void): any;
37
37
  // (undocumented)
@@ -46,6 +46,84 @@ export interface IContainerRuntimeWithResolveHandle_Deprecated extends IContaine
46
46
  resolveHandle(request: IRequest): Promise<IResponse>;
47
47
  }
48
48
 
49
+ // @alpha @sealed (undocumented)
50
+ export interface ISummarizeEventProps {
51
+ // (undocumented)
52
+ currentAttempt: number;
53
+ // (undocumented)
54
+ error?: any;
55
+ failureMessage?: string;
56
+ isLastSummary?: boolean;
57
+ // (undocumented)
58
+ maxAttempts: number;
59
+ // (undocumented)
60
+ result: "success" | "failure" | "canceled";
61
+ }
62
+
63
+ // @alpha @sealed (undocumented)
64
+ export interface ISummarizerEvents extends IEvent {
65
+ // (undocumented)
66
+ (event: "summarize", listener: (props: ISummarizeEventProps & ISummarizerObservabilityProps) => void): any;
67
+ // (undocumented)
68
+ (event: "summarizeAllAttemptsFailed", listener: (props: Omit<ISummarizeEventProps, "result"> & ISummarizerObservabilityProps) => void): any;
69
+ // (undocumented)
70
+ (event: "summarizerStop", listener: (props: {
71
+ stopReason: SummarizerStopReason;
72
+ error?: any;
73
+ } & ISummarizerObservabilityProps) => void): any;
74
+ // (undocumented)
75
+ (event: "summarizerStart", listener: (props: {
76
+ onBehalfOf: string;
77
+ } & ISummarizerObservabilityProps) => void): any;
78
+ // (undocumented)
79
+ (event: "summarizerStartupFailed", listener: (props: {
80
+ reason: SummarizerStopReason;
81
+ } & ISummarizerObservabilityProps) => void): any;
82
+ }
83
+
84
+ // @alpha @sealed (undocumented)
85
+ export interface ISummarizerObservabilityProps {
86
+ // (undocumented)
87
+ numUnsummarizedNonRuntimeOps: number;
88
+ // (undocumented)
89
+ numUnsummarizedRuntimeOps: number;
90
+ }
91
+
92
+ // @alpha @sealed (undocumented)
93
+ export type SummarizerStopReason =
94
+ /**
95
+ * Summarizer client failed to summarize in all attempts.
96
+ */
97
+ "failToSummarize"
98
+ /**
99
+ * Parent client reported that it is no longer connected.
100
+ */
101
+ | "parentNotConnected"
102
+ /**
103
+ * Parent client reported that it is no longer elected the summarizer.
104
+ * This is the normal flow; a disconnect will always trigger the parent
105
+ * client to no longer be elected as responsible for summaries. Then it
106
+ * tries to stop its spawned summarizer client.
107
+ */
108
+ | "notElectedParent"
109
+ /**
110
+ * We are not already running the summarizer and we are not the current elected client id.
111
+ */
112
+ | "notElectedClient"
113
+ /**
114
+ * Summarizer client was disconnected
115
+ */
116
+ | "summarizerClientDisconnected"
117
+ /**
118
+ * running summarizer threw an exception
119
+ */
120
+ | "summarizerException"
121
+ /**
122
+ * The previous summary state on the summarizer is not the most recently acked summary. this also happens when the
123
+ * first submitSummary attempt fails for any reason and there's a 2nd summary attempt without an ack
124
+ */
125
+ | "latestSummaryStateStale";
126
+
49
127
  // (No @packageDocumentation comment for this package)
50
128
 
51
129
  ```
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { AttachState } from "@fluidframework/container-definitions";
6
6
  import type { IDeltaManager } from "@fluidframework/container-definitions/internal";
7
- import type { FluidObject, IEventProvider, IRequest, IResponse } from "@fluidframework/core-interfaces";
7
+ import type { FluidObject, IEvent, IEventProvider, IRequest, IResponse } from "@fluidframework/core-interfaces";
8
8
  import type { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
9
9
  import type { IClientDetails } from "@fluidframework/driver-definitions";
10
10
  import type { IDocumentStorageService, IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
@@ -24,10 +24,95 @@ export interface IContainerRuntimeWithResolveHandle_Deprecated extends IContaine
24
24
  * @alpha
25
25
  * @sealed
26
26
  */
27
- export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents {
27
+ export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents, ISummarizerEvents {
28
28
  (event: "dirty" | "disconnected" | "saved" | "attached", listener: () => void): any;
29
29
  (event: "connected", listener: (clientId: string) => void): any;
30
30
  }
31
+ /**
32
+ * @legacy
33
+ * @alpha
34
+ * @sealed
35
+ */
36
+ export type SummarizerStopReason =
37
+ /**
38
+ * Summarizer client failed to summarize in all attempts.
39
+ */
40
+ "failToSummarize"
41
+ /**
42
+ * Parent client reported that it is no longer connected.
43
+ */
44
+ | "parentNotConnected"
45
+ /**
46
+ * Parent client reported that it is no longer elected the summarizer.
47
+ * This is the normal flow; a disconnect will always trigger the parent
48
+ * client to no longer be elected as responsible for summaries. Then it
49
+ * tries to stop its spawned summarizer client.
50
+ */
51
+ | "notElectedParent"
52
+ /**
53
+ * We are not already running the summarizer and we are not the current elected client id.
54
+ */
55
+ | "notElectedClient"
56
+ /**
57
+ * Summarizer client was disconnected
58
+ */
59
+ | "summarizerClientDisconnected"
60
+ /**
61
+ * running summarizer threw an exception
62
+ */
63
+ | "summarizerException"
64
+ /**
65
+ * The previous summary state on the summarizer is not the most recently acked summary. this also happens when the
66
+ * first submitSummary attempt fails for any reason and there's a 2nd summary attempt without an ack
67
+ */
68
+ | "latestSummaryStateStale";
69
+ /**
70
+ * @legacy
71
+ * @alpha
72
+ * @sealed
73
+ */
74
+ export interface ISummarizeEventProps {
75
+ result: "success" | "failure" | "canceled";
76
+ currentAttempt: number;
77
+ maxAttempts: number;
78
+ error?: any;
79
+ /**
80
+ * Result message of a failed summarize attempt
81
+ */
82
+ failureMessage?: string;
83
+ /**
84
+ * Was this summarize attempt part of the lastSummary process?
85
+ */
86
+ isLastSummary?: boolean;
87
+ }
88
+ /**
89
+ * @legacy
90
+ * @alpha
91
+ * @sealed
92
+ */
93
+ export interface ISummarizerObservabilityProps {
94
+ numUnsummarizedRuntimeOps: number;
95
+ numUnsummarizedNonRuntimeOps: number;
96
+ }
97
+ /**
98
+ * @legacy
99
+ * @alpha
100
+ * @sealed
101
+ */
102
+ export interface ISummarizerEvents extends IEvent {
103
+ (event: "summarize", listener: (props: ISummarizeEventProps & ISummarizerObservabilityProps) => void): any;
104
+ (event: "summarizeAllAttemptsFailed", listener: (props: Omit<ISummarizeEventProps, "result"> & ISummarizerObservabilityProps) => void): any;
105
+ (event: "summarizerStop", listener: (props: {
106
+ stopReason: SummarizerStopReason;
107
+ error?: any;
108
+ } & ISummarizerObservabilityProps) => void): any;
109
+ (event: "summarizerStart", listener: (props: {
110
+ onBehalfOf: string;
111
+ } & ISummarizerObservabilityProps) => void): any;
112
+ (event: "summarizerStartupFailed", listener: (props: {
113
+ reason: SummarizerStopReason;
114
+ } & ISummarizerObservabilityProps) => void): any;
115
+ }
31
116
  /**
32
117
  * @legacy
33
118
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"containerRuntime.d.ts","sourceRoot":"","sources":["../src/containerRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,m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
3
  * Licensed under the MIT License.
4
4
  */
5
- export type { IContainerRuntime, IContainerRuntimeBaseWithCombinedEvents, IContainerRuntimeEvents, IContainerRuntimeWithResolveHandle_Deprecated, } from "./containerRuntime.js";
5
+ export type { IContainerRuntime, IContainerRuntimeBaseWithCombinedEvents, IContainerRuntimeEvents, IContainerRuntimeWithResolveHandle_Deprecated, SummarizerStopReason, ISummarizeEventProps, ISummarizerObservabilityProps, ISummarizerEvents, } from "./containerRuntime.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,iBAAiB,EACjB,uCAAuC,EACvC,uBAAuB,EACvB,6CAA6C,GAC7C,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,iBAAiB,EACjB,uCAAuC,EACvC,uBAAuB,EACvB,6CAA6C,EAC7C,oBAAoB,EACpB,oBAAoB,EACpB,6BAA6B,EAC7B,iBAAiB,GACjB,MAAM,uBAAuB,CAAC"}
package/dist/legacy.d.ts CHANGED
@@ -13,5 +13,9 @@ export {
13
13
  IContainerRuntime,
14
14
  IContainerRuntimeBaseWithCombinedEvents,
15
15
  IContainerRuntimeEvents,
16
- IContainerRuntimeWithResolveHandle_Deprecated
16
+ IContainerRuntimeWithResolveHandle_Deprecated,
17
+ ISummarizeEventProps,
18
+ ISummarizerEvents,
19
+ ISummarizerObservabilityProps,
20
+ SummarizerStopReason
17
21
  } from "./index.js";
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { AttachState } from "@fluidframework/container-definitions";
6
6
  import type { IDeltaManager } from "@fluidframework/container-definitions/internal";
7
- import type { FluidObject, IEventProvider, IRequest, IResponse } from "@fluidframework/core-interfaces";
7
+ import type { FluidObject, IEvent, IEventProvider, IRequest, IResponse } from "@fluidframework/core-interfaces";
8
8
  import type { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
9
9
  import type { IClientDetails } from "@fluidframework/driver-definitions";
10
10
  import type { IDocumentStorageService, IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
@@ -24,10 +24,95 @@ export interface IContainerRuntimeWithResolveHandle_Deprecated extends IContaine
24
24
  * @alpha
25
25
  * @sealed
26
26
  */
27
- export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents {
27
+ export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents, ISummarizerEvents {
28
28
  (event: "dirty" | "disconnected" | "saved" | "attached", listener: () => void): any;
29
29
  (event: "connected", listener: (clientId: string) => void): any;
30
30
  }
31
+ /**
32
+ * @legacy
33
+ * @alpha
34
+ * @sealed
35
+ */
36
+ export type SummarizerStopReason =
37
+ /**
38
+ * Summarizer client failed to summarize in all attempts.
39
+ */
40
+ "failToSummarize"
41
+ /**
42
+ * Parent client reported that it is no longer connected.
43
+ */
44
+ | "parentNotConnected"
45
+ /**
46
+ * Parent client reported that it is no longer elected the summarizer.
47
+ * This is the normal flow; a disconnect will always trigger the parent
48
+ * client to no longer be elected as responsible for summaries. Then it
49
+ * tries to stop its spawned summarizer client.
50
+ */
51
+ | "notElectedParent"
52
+ /**
53
+ * We are not already running the summarizer and we are not the current elected client id.
54
+ */
55
+ | "notElectedClient"
56
+ /**
57
+ * Summarizer client was disconnected
58
+ */
59
+ | "summarizerClientDisconnected"
60
+ /**
61
+ * running summarizer threw an exception
62
+ */
63
+ | "summarizerException"
64
+ /**
65
+ * The previous summary state on the summarizer is not the most recently acked summary. this also happens when the
66
+ * first submitSummary attempt fails for any reason and there's a 2nd summary attempt without an ack
67
+ */
68
+ | "latestSummaryStateStale";
69
+ /**
70
+ * @legacy
71
+ * @alpha
72
+ * @sealed
73
+ */
74
+ export interface ISummarizeEventProps {
75
+ result: "success" | "failure" | "canceled";
76
+ currentAttempt: number;
77
+ maxAttempts: number;
78
+ error?: any;
79
+ /**
80
+ * Result message of a failed summarize attempt
81
+ */
82
+ failureMessage?: string;
83
+ /**
84
+ * Was this summarize attempt part of the lastSummary process?
85
+ */
86
+ isLastSummary?: boolean;
87
+ }
88
+ /**
89
+ * @legacy
90
+ * @alpha
91
+ * @sealed
92
+ */
93
+ export interface ISummarizerObservabilityProps {
94
+ numUnsummarizedRuntimeOps: number;
95
+ numUnsummarizedNonRuntimeOps: number;
96
+ }
97
+ /**
98
+ * @legacy
99
+ * @alpha
100
+ * @sealed
101
+ */
102
+ export interface ISummarizerEvents extends IEvent {
103
+ (event: "summarize", listener: (props: ISummarizeEventProps & ISummarizerObservabilityProps) => void): any;
104
+ (event: "summarizeAllAttemptsFailed", listener: (props: Omit<ISummarizeEventProps, "result"> & ISummarizerObservabilityProps) => void): any;
105
+ (event: "summarizerStop", listener: (props: {
106
+ stopReason: SummarizerStopReason;
107
+ error?: any;
108
+ } & ISummarizerObservabilityProps) => void): any;
109
+ (event: "summarizerStart", listener: (props: {
110
+ onBehalfOf: string;
111
+ } & ISummarizerObservabilityProps) => void): any;
112
+ (event: "summarizerStartupFailed", listener: (props: {
113
+ reason: SummarizerStopReason;
114
+ } & ISummarizerObservabilityProps) => void): any;
115
+ }
31
116
  /**
32
117
  * @legacy
33
118
  * @alpha
@@ -1 +1 @@
1
- {"version":3,"file":"containerRuntime.d.ts","sourceRoot":"","sources":["../src/containerRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCA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AQ,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,6BAA6B,KAAK,IAAI,OAChF;IACF,CACC,KAAK,EAAE,yBAAyB,EAChC,QAAQ,EAAE,CACT,KAAK,EAAE;QAAE,MAAM,EAAE,oBAAoB,CAAA;KAAE,GAAG,6BAA6B,KACnE,IAAI,OACR;CACF;AAED;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,qBAAqB,GAC1E,cAAc,CAAC,uBAAuB,CAAC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,iBAChB,SAAQ,8BAA8B,EACrC,uCAAuC;IAExC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,CAAC;IAClF,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACjE"}
package/lib/index.d.ts CHANGED
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export type { IContainerRuntime, IContainerRuntimeBaseWithCombinedEvents, IContainerRuntimeEvents, IContainerRuntimeWithResolveHandle_Deprecated, } from "./containerRuntime.js";
5
+ export type { IContainerRuntime, IContainerRuntimeBaseWithCombinedEvents, IContainerRuntimeEvents, IContainerRuntimeWithResolveHandle_Deprecated, SummarizerStopReason, ISummarizeEventProps, ISummarizerObservabilityProps, ISummarizerEvents, } from "./containerRuntime.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,iBAAiB,EACjB,uCAAuC,EACvC,uBAAuB,EACvB,6CAA6C,GAC7C,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,iBAAiB,EACjB,uCAAuC,EACvC,uBAAuB,EACvB,6CAA6C,EAC7C,oBAAoB,EACpB,oBAAoB,EACpB,6BAA6B,EAC7B,iBAAiB,GACjB,MAAM,uBAAuB,CAAC"}
package/lib/legacy.d.ts CHANGED
@@ -13,5 +13,9 @@ export {
13
13
  IContainerRuntime,
14
14
  IContainerRuntimeBaseWithCombinedEvents,
15
15
  IContainerRuntimeEvents,
16
- IContainerRuntimeWithResolveHandle_Deprecated
16
+ IContainerRuntimeWithResolveHandle_Deprecated,
17
+ ISummarizeEventProps,
18
+ ISummarizerEvents,
19
+ ISummarizerObservabilityProps,
20
+ SummarizerStopReason
17
21
  } from "./index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime-definitions",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -41,18 +41,18 @@
41
41
  "main": "",
42
42
  "types": "lib/public.d.ts",
43
43
  "dependencies": {
44
- "@fluidframework/container-definitions": "~2.11.0",
45
- "@fluidframework/core-interfaces": "~2.11.0",
46
- "@fluidframework/driver-definitions": "~2.11.0",
47
- "@fluidframework/runtime-definitions": "~2.11.0"
44
+ "@fluidframework/container-definitions": "~2.13.0",
45
+ "@fluidframework/core-interfaces": "~2.13.0",
46
+ "@fluidframework/driver-definitions": "~2.13.0",
47
+ "@fluidframework/runtime-definitions": "~2.13.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@arethetypeswrong/cli": "^0.16.4",
50
+ "@arethetypeswrong/cli": "^0.17.1",
51
51
  "@biomejs/biome": "~1.9.3",
52
52
  "@fluid-tools/build-cli": "^0.51.0",
53
53
  "@fluidframework/build-common": "^2.0.3",
54
54
  "@fluidframework/build-tools": "^0.51.0",
55
- "@fluidframework/container-runtime-definitions-previous": "npm:@fluidframework/container-runtime-definitions@2.10.0",
55
+ "@fluidframework/container-runtime-definitions-previous": "npm:@fluidframework/container-runtime-definitions@2.12.0",
56
56
  "@fluidframework/eslint-config-fluid": "^5.6.0",
57
57
  "@microsoft/api-extractor": "7.47.8",
58
58
  "concurrently": "^8.2.1",
@@ -7,6 +7,7 @@ import type { AttachState } from "@fluidframework/container-definitions";
7
7
  import type { IDeltaManager } from "@fluidframework/container-definitions/internal";
8
8
  import type {
9
9
  FluidObject,
10
+ IEvent,
10
11
  IEventProvider,
11
12
  IRequest,
12
13
  IResponse,
@@ -41,11 +42,118 @@ export interface IContainerRuntimeWithResolveHandle_Deprecated extends IContaine
41
42
  * @alpha
42
43
  * @sealed
43
44
  */
44
- export interface IContainerRuntimeEvents extends IContainerRuntimeBaseEvents {
45
+ export interface IContainerRuntimeEvents
46
+ extends IContainerRuntimeBaseEvents,
47
+ ISummarizerEvents {
45
48
  (event: "dirty" | "disconnected" | "saved" | "attached", listener: () => void);
46
49
  (event: "connected", listener: (clientId: string) => void);
47
50
  }
48
51
 
52
+ /**
53
+ * @legacy
54
+ * @alpha
55
+ * @sealed
56
+ */
57
+ export type SummarizerStopReason =
58
+ /**
59
+ * Summarizer client failed to summarize in all attempts.
60
+ */
61
+ | "failToSummarize"
62
+ /**
63
+ * Parent client reported that it is no longer connected.
64
+ */
65
+ | "parentNotConnected"
66
+ /**
67
+ * Parent client reported that it is no longer elected the summarizer.
68
+ * This is the normal flow; a disconnect will always trigger the parent
69
+ * client to no longer be elected as responsible for summaries. Then it
70
+ * tries to stop its spawned summarizer client.
71
+ */
72
+ | "notElectedParent"
73
+ /**
74
+ * We are not already running the summarizer and we are not the current elected client id.
75
+ */
76
+ | "notElectedClient"
77
+ /**
78
+ * Summarizer client was disconnected
79
+ */
80
+ | "summarizerClientDisconnected"
81
+ /**
82
+ * running summarizer threw an exception
83
+ */
84
+ | "summarizerException"
85
+ /**
86
+ * The previous summary state on the summarizer is not the most recently acked summary. this also happens when the
87
+ * first submitSummary attempt fails for any reason and there's a 2nd summary attempt without an ack
88
+ */
89
+ | "latestSummaryStateStale";
90
+
91
+ /**
92
+ * @legacy
93
+ * @alpha
94
+ * @sealed
95
+ */
96
+ export interface ISummarizeEventProps {
97
+ result: "success" | "failure" | "canceled";
98
+ currentAttempt: number;
99
+ maxAttempts: number;
100
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101
+ error?: any;
102
+ /**
103
+ * Result message of a failed summarize attempt
104
+ */
105
+ failureMessage?: string;
106
+ /**
107
+ * Was this summarize attempt part of the lastSummary process?
108
+ */
109
+ isLastSummary?: boolean;
110
+ }
111
+
112
+ /**
113
+ * @legacy
114
+ * @alpha
115
+ * @sealed
116
+ */
117
+ export interface ISummarizerObservabilityProps {
118
+ numUnsummarizedRuntimeOps: number;
119
+ numUnsummarizedNonRuntimeOps: number;
120
+ }
121
+
122
+ /**
123
+ * @legacy
124
+ * @alpha
125
+ * @sealed
126
+ */
127
+ export interface ISummarizerEvents extends IEvent {
128
+ (
129
+ event: "summarize",
130
+ listener: (props: ISummarizeEventProps & ISummarizerObservabilityProps) => void,
131
+ );
132
+ (
133
+ event: "summarizeAllAttemptsFailed",
134
+ listener: (
135
+ props: Omit<ISummarizeEventProps, "result"> & ISummarizerObservabilityProps,
136
+ ) => void,
137
+ );
138
+ (
139
+ event: "summarizerStop",
140
+ listener: (
141
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
142
+ props: { stopReason: SummarizerStopReason; error?: any } & ISummarizerObservabilityProps,
143
+ ) => void,
144
+ );
145
+ (
146
+ event: "summarizerStart",
147
+ listener: (props: { onBehalfOf: string } & ISummarizerObservabilityProps) => void,
148
+ );
149
+ (
150
+ event: "summarizerStartupFailed",
151
+ listener: (
152
+ props: { reason: SummarizerStopReason } & ISummarizerObservabilityProps,
153
+ ) => void,
154
+ );
155
+ }
156
+
49
157
  /**
50
158
  * @legacy
51
159
  * @alpha
package/src/index.ts CHANGED
@@ -8,4 +8,8 @@ export type {
8
8
  IContainerRuntimeBaseWithCombinedEvents,
9
9
  IContainerRuntimeEvents,
10
10
  IContainerRuntimeWithResolveHandle_Deprecated,
11
+ SummarizerStopReason,
12
+ ISummarizeEventProps,
13
+ ISummarizerObservabilityProps,
14
+ ISummarizerEvents,
11
15
  } from "./containerRuntime.js";