## Alpha API Report File for "@fluidframework/container-runtime"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

// @alpha @legacy
export const AllowTombstoneRequestHeaderKey = "allowTombstone";

// @alpha @legacy
export enum CompressionAlgorithms {
    // (undocumented)
    lz4 = "lz4"
}

// @alpha @legacy (undocumented)
export enum ContainerMessageType {
    // (undocumented)
    Alias = "alias",
    // (undocumented)
    Attach = "attach",
    // (undocumented)
    BlobAttach = "blobAttach",
    // (undocumented)
    ChunkedOp = "chunkedOp",
    DocumentSchemaChange = "schema",
    // (undocumented)
    FluidDataStoreOp = "component",
    GC = "GC",
    IdAllocation = "idAllocation",
    // (undocumented)
    Rejoin = "rejoin"
}

// @alpha @legacy
export interface ContainerRuntimeOptions {
    readonly chunkSizeInBytes: number;
    readonly compressionOptions: ICompressionRuntimeOptions;
    readonly createBlobPayloadPending: true | undefined;
    // @deprecated
    readonly enableGroupedBatching: boolean;
    readonly enableRuntimeIdCompressor: IdCompressorMode;
    readonly explicitSchemaControl: boolean;
    // (undocumented)
    readonly gcOptions: IGCRuntimeOptions;
    readonly loadSequenceNumberVerification: "close" | "log" | "bypass";
    readonly maxBatchSizeInBytes: number;
    // (undocumented)
    readonly summaryOptions: ISummaryRuntimeOptions;
}

// @alpha @legacy (undocumented)
export const DefaultSummaryConfiguration: ISummaryConfiguration;

// @alpha @legacy (undocumented)
export const disabledCompressionConfig: ICompressionRuntimeOptions;

// @alpha @legacy (undocumented)
export type EnqueueSummarizeResult = (ISummarizeResults & {
    readonly alreadyEnqueued?: undefined;
}) | (ISummarizeResults & {
    readonly alreadyEnqueued: true;
    readonly overridden: true;
}) | {
    readonly alreadyEnqueued: true;
    readonly overridden?: undefined;
};

// @alpha @legacy
export interface IAckedSummary {
    // (undocumented)
    readonly summaryAck: ISummaryAckMessage;
    // (undocumented)
    readonly summaryOp: ISummaryOpMessage;
}

// @alpha @legacy (undocumented)
export interface IAckSummaryResult {
    // (undocumented)
    readonly ackNackDuration: number;
    // (undocumented)
    readonly summaryAckOp: ISummaryAckMessage;
}

// @alpha @legacy
export interface IBaseSummarizeResult {
    readonly error: IRetriableFailureError | undefined;
    // (undocumented)
    readonly minimumSequenceNumber: number;
    readonly referenceSequenceNumber: number;
    // (undocumented)
    readonly stage: "base";
}

// @alpha @legacy (undocumented)
export interface IBroadcastSummaryResult {
    // (undocumented)
    readonly broadcastDuration: number;
    // (undocumented)
    readonly summarizeOp: ISummaryOpMessage;
}

// @alpha @legacy
export interface IClientSummaryWatcher extends IDisposable {
    // (undocumented)
    waitFlushed(): Promise<IAckedSummary | undefined>;
    // (undocumented)
    watchSummary(clientSequenceNumber: number): ISummary;
}

// @alpha @legacy
export interface ICompressionRuntimeOptions {
    readonly compressionAlgorithm: CompressionAlgorithms;
    readonly minimumBatchSizeInBytes: number;
}

// @alpha @legacy
export type IContainerRuntimeOptions = Partial<ContainerRuntimeOptions>;

// @alpha @legacy
export type IdCompressorMode = "on" | "delayed" | undefined;

// @alpha @legacy
export interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {
    readonly afterSequenceNumber?: number;
    readonly override?: boolean;
}

// @alpha @deprecated @legacy (undocumented)
export interface IFluidDataStoreAttributes0 {
    readonly isRootDataStore?: boolean;
    // (undocumented)
    pkg: string;
    // (undocumented)
    readonly snapshotFormatVersion?: undefined;
    // (undocumented)
    readonly summaryFormatVersion?: undefined;
}

// @alpha @deprecated @legacy (undocumented)
export interface IFluidDataStoreAttributes1 extends OmitAttributesVersions<IFluidDataStoreAttributes0> {
    // (undocumented)
    readonly snapshotFormatVersion: "0.1";
    // (undocumented)
    readonly summaryFormatVersion?: undefined;
}

// @alpha @deprecated @legacy (undocumented)
export interface IFluidDataStoreAttributes2 extends OmitAttributesVersions<IFluidDataStoreAttributes1> {
    readonly disableIsolatedChannels?: true;
    readonly snapshotFormatVersion?: undefined;
    // (undocumented)
    readonly summaryFormatVersion: 2;
}

// @alpha @legacy (undocumented)
export interface IGCRuntimeOptions {
    [key: string]: any;
    enableGCSweep?: true;
    runFullGC?: boolean;
    sessionExpiryTimeoutMs?: number;
    sweepGracePeriodMs?: number;
}

// @alpha @legacy
export interface IGeneratedSummaryStats extends ISummaryStats {
    readonly dataStoreCount: number;
    readonly gcBlobNodeCount?: number;
    readonly gcStateUpdatedDataStoreCount?: number;
    readonly gcTotalBlobsSize?: number;
    readonly summarizedDataStoreCount: number;
    readonly summaryNumber: number;
}

// @alpha @legacy
export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "stage"> {
    readonly generateDuration: number;
    // (undocumented)
    readonly stage: "generate";
    readonly summaryStats: IGeneratedSummaryStats;
    readonly summaryTree: ISummaryTree;
}

// @alpha @legacy (undocumented)
export interface INackSummaryResult {
    // (undocumented)
    readonly ackNackDuration: number;
    // (undocumented)
    readonly summaryNackOp: ISummaryNackMessage;
}

// @alpha @deprecated @legacy
export const InactiveResponseHeaderKey = "isInactive";

// @alpha @legacy (undocumented)
export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
    readonly reason: string;
    readonly retryOnFailure?: boolean;
}

// @alpha @legacy
export interface IRetriableFailureError extends Error {
    // (undocumented)
    readonly retryAfterSeconds?: number;
}

// @alpha @legacy
export interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stage" | "error"> {
    readonly clientSequenceNumber: number;
    // (undocumented)
    readonly stage: "submit";
    readonly submitOpDuration: number;
}

// @alpha @legacy
export interface ISummarizeOptions {
    readonly fullTree?: boolean;
}

// @alpha @legacy (undocumented)
export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
    // (undocumented)
    close(): void;
    enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
    readonly ISummarizer?: ISummarizer;
    // (undocumented)
    run(onBehalfOf: string): Promise<SummarizerStopReason>;
    // (undocumented)
    stop(reason: SummarizerStopReason): void;
    summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
}

// @alpha @legacy (undocumented)
export interface ISummarizeResults {
    readonly receivedSummaryAckOrNack: Promise<SummarizeResultPart<IAckSummaryResult, INackSummaryResult>>;
    readonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;
    readonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>>;
}

// @alpha @legacy
export interface ISummary {
    // (undocumented)
    readonly clientId: string;
    // (undocumented)
    readonly clientSequenceNumber: number;
    // (undocumented)
    waitAckNack(): Promise<ISummaryAckMessage | ISummaryNackMessage>;
    // (undocumented)
    waitBroadcast(): Promise<ISummaryOpMessage>;
}

// @alpha @legacy
export interface ISummaryAckMessage extends ISequencedDocumentMessage {
    // (undocumented)
    contents: ISummaryAck;
    // (undocumented)
    type: MessageType.SummaryAck;
}

// @alpha @legacy (undocumented)
export interface ISummaryBaseConfiguration {
    initialSummarizerDelayMs: number;
    maxAckWaitTime: number;
    maxOpsSinceLastSummary: number;
}

// @alpha @legacy (undocumented)
export interface ISummaryCollectionOpEvents extends IEvent {
    // (undocumented)
    (event: OpActionEventName, listener: OpActionEventListener): any;
}

// @alpha @legacy (undocumented)
export type ISummaryConfiguration = ISummaryConfigurationDisableSummarizer | ISummaryConfigurationDisableHeuristics | ISummaryConfigurationHeuristics;

// @alpha @legacy (undocumented)
export interface ISummaryConfigurationDisableHeuristics extends ISummaryBaseConfiguration {
    // (undocumented)
    state: "disableHeuristics";
}

// @alpha @legacy (undocumented)
export interface ISummaryConfigurationDisableSummarizer {
    // (undocumented)
    state: "disabled";
}

// @alpha @legacy (undocumented)
export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfiguration {
    maxIdleTime: number;
    maxOps: number;
    maxTime: number;
    minIdleTime: number;
    minOpsForLastSummaryAttempt: number;
    nonRuntimeHeuristicThreshold?: number;
    nonRuntimeOpWeight: number;
    runtimeOpWeight: number;
    // (undocumented)
    state: "enabled";
}

// @alpha @legacy
export interface ISummaryNackMessage extends ISequencedDocumentMessage {
    // (undocumented)
    contents: ISummaryNack;
    // (undocumented)
    type: MessageType.SummaryNack;
}

// @alpha @legacy
export interface ISummaryOpMessage extends ISequencedDocumentMessage {
    // (undocumented)
    contents: ISummaryContent;
    // (undocumented)
    type: MessageType.Summarize;
}

// @alpha @legacy (undocumented)
export interface ISummaryRuntimeOptions {
    // @deprecated
    initialSummarizerDelayMs?: number;
    summaryConfigOverrides?: ISummaryConfiguration;
}

// @alpha @legacy
export interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, "stage"> {
    readonly handle: string;
    // (undocumented)
    readonly stage: "upload";
    readonly uploadDuration: number;
}

// @alpha @legacy
export function loadContainerRuntime(params: LoadContainerRuntimeParams): Promise<IContainerRuntime & IRuntime>;

// @alpha @legacy
export interface LoadContainerRuntimeParams {
    containerScope?: FluidObject;
    context: IContainerContext;
    existing: boolean;
    minVersionForCollab?: MinimumVersionForCollab;
    provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;
    registryEntries: NamedFluidDataStoreRegistryEntries;
    // @deprecated
    requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
    runtimeOptions?: IContainerRuntimeOptions;
}

// @alpha @legacy
export type MinimumVersionForCollab = `${1 | 2}.${bigint}.${bigint}` | `${1 | 2}.${bigint}.${bigint}-${string}`;

// @alpha @deprecated @legacy (undocumented)
export type OmitAttributesVersions<T> = Omit<T, "snapshotFormatVersion" | "summaryFormatVersion">;

// @alpha @legacy (undocumented)
export type OpActionEventListener = (op: ISequencedDocumentMessage) => void;

// @alpha @legacy (undocumented)
export type OpActionEventName = MessageType.Summarize | MessageType.SummaryAck | MessageType.SummaryNack | "default";

// @alpha @deprecated @legacy
export type ReadFluidDataStoreAttributes = IFluidDataStoreAttributes0 | IFluidDataStoreAttributes1 | IFluidDataStoreAttributes2;

// @alpha @legacy
export interface SubmitSummaryFailureData {
    // (undocumented)
    stage: SummaryStage;
}

// @alpha @legacy
export type SubmitSummaryResult = IBaseSummarizeResult | IGenerateSummaryTreeResult | IUploadSummaryResult | ISubmitSummaryOpResult;

// @alpha @legacy (undocumented)
export type SummarizeResultPart<TSuccess, TFailure = undefined> = {
    success: true;
    data: TSuccess;
} | {
    success: false;
    data: TFailure | undefined;
    message: string;
    error: IRetriableFailureError;
};

// @alpha @legacy
export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEvents> {
    constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, logger: ITelemetryBaseLogger);
    // (undocumented)
    addOpListener(listener: () => void): void;
    createWatcher(clientId: string): IClientSummaryWatcher;
    // (undocumented)
    emit(event: OpActionEventName, ...args: Parameters<OpActionEventListener>): boolean;
    // (undocumented)
    get latestAck(): IAckedSummary | undefined;
    // (undocumented)
    get opsSinceLastAck(): number;
    // (undocumented)
    removeOpListener(listener: () => void): void;
    // (undocumented)
    removeWatcher(clientId: string): void;
    // (undocumented)
    setPendingAckTimerTimeoutCallback(maxAckWaitTime: number, timeoutCallback: () => void): void;
    // (undocumented)
    unsetPendingAckTimerTimeoutCallback(): void;
    waitFlushed(): Promise<IAckedSummary | undefined>;
    waitSummaryAck(referenceSequenceNumber: number): Promise<IAckedSummary>;
}

// @alpha @legacy
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";

// @alpha @legacy
export const TombstoneResponseHeaderKey = "isTombstoned";

// (No @packageDocumentation comment for this package)

```
