## 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
export const AllowTombstoneRequestHeaderKey = "allowTombstone";

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

// @alpha (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 @deprecated
export const currentDocumentVersionSchema = 1;

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

// @alpha @deprecated
export const DeletedResponseHeaderKey = "wasDeleted";

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

// @alpha @deprecated
export type DocumentSchemaValueType = string | string[] | true | number | undefined;

// @alpha @sealed @deprecated
export class DocumentsSchemaController {
    constructor(existing: boolean, snapshotSequenceNumber: number, documentMetadataSchema: IDocumentSchema | undefined, features: IDocumentSchemaFeatures, onSchemaChange: (schema: IDocumentSchemaCurrent) => void);
    maybeSendSchemaMessage(): IDocumentSchemaChangeMessage | undefined;
    // (undocumented)
    onDisconnect(): void;
    processDocumentSchemaMessages(contents: IDocumentSchemaChangeMessage[], local: boolean, sequenceNumber: number): boolean;
    // @deprecated
    processDocumentSchemaOp(content: IDocumentSchemaChangeMessage, local: boolean, sequenceNumber: number): boolean;
    // (undocumented)
    sessionSchema: IDocumentSchemaCurrent;
    // (undocumented)
    summarizeDocumentSchema(refSeq: number): IDocumentSchemaCurrent | undefined;
}

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

// @alpha @deprecated (undocumented)
export type GCFeatureMatrix = {
    gcGeneration?: number;
    tombstoneGeneration?: undefined;
} | {
    tombstoneGeneration: number;
};

// @alpha @deprecated
export const GCNodeType: {
    readonly DataStore: "DataStore";
    readonly SubDataStore: "SubDataStore";
    readonly Blob: "Blob";
    readonly Other: "Other";
};

// @alpha @deprecated (undocumented)
export type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];

// @alpha @deprecated (undocumented)
export type GCVersion = number;

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

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

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

// @alpha @deprecated
export interface IBlobManagerLoadInfo {
    // (undocumented)
    ids?: string[];
    // (undocumented)
    redirectTable?: [string, string][];
}

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

// @alpha @deprecated
export interface ICancellableSummarizerController extends ISummaryCancellationToken {
    // (undocumented)
    stop(reason: SummarizerStopReason): void;
}

// @alpha @deprecated
export interface ICancellationToken<T> {
    readonly cancelled: boolean;
    readonly waitCancelled: Promise<T>;
}

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

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

// @alpha @deprecated (undocumented)
export interface IConnectableRuntime {
    // (undocumented)
    readonly clientId: string | undefined;
    // (undocumented)
    readonly connected: boolean;
    // (undocumented)
    readonly disposed: boolean;
    // (undocumented)
    once(event: "connected" | "disconnected" | "dispose", listener: () => void): this;
}

// @alpha @deprecated (undocumented)
export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {
    readonly disableIsolatedChannels?: true;
    // (undocumented)
    readonly documentSchema?: IDocumentSchema;
    readonly lastMessage?: ISummaryMetadataMessage;
    // @deprecated (undocumented)
    readonly message?: ISummaryMetadataMessage;
    // (undocumented)
    readonly summaryFormatVersion: 1;
    readonly summaryNumber?: number;
    readonly telemetryDocumentId?: string;
}

// @alpha
export interface IContainerRuntimeOptions {
    readonly chunkSizeInBytes?: number;
    readonly compressionOptions?: ICompressionRuntimeOptions;
    // @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 @deprecated (undocumented)
export interface ICreateContainerMetadata {
    createContainerRuntimeVersion?: string;
    createContainerTimestamp?: number;
}

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

// @alpha @deprecated
export interface IDocumentSchema {
    // (undocumented)
    refSeq: number;
    // (undocumented)
    runtime: Record<string, DocumentSchemaValueType>;
    // (undocumented)
    version: number;
}

// @alpha @deprecated
export type IDocumentSchemaChangeMessage = IDocumentSchema;

// @alpha @deprecated
export type IDocumentSchemaCurrent = {
    version: 1;
    refSeq: number;
    runtime: {
        [P in keyof IDocumentSchemaFeatures]?: IDocumentSchemaFeatures[P] extends boolean ? true : IDocumentSchemaFeatures[P];
    };
};

// @alpha @deprecated
export interface IDocumentSchemaFeatures {
    // (undocumented)
    compressionLz4: boolean;
    disallowedVersions: string[];
    // (undocumented)
    explicitSchemaControl: boolean;
    // (undocumented)
    idCompressorMode: IdCompressorMode;
    // (undocumented)
    opGroupingEnabled: boolean;
}

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

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

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

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

// @alpha @deprecated
export interface IGCMetadata {
    readonly gcFeature?: GCVersion;
    readonly gcFeatureMatrix?: GCFeatureMatrix;
    readonly sessionExpiryTimeoutMs?: number;
    // @deprecated
    readonly sweepEnabled?: boolean;
    readonly tombstoneTimeoutMs?: number;
}

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

// @alpha @deprecated
export interface IGCStats extends IMarkPhaseStats, ISweepPhaseStats {
}

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

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

// @alpha @deprecated
export interface IMarkPhaseStats {
    attachmentBlobCount: number;
    dataStoreCount: number;
    nodeCount: number;
    unrefAttachmentBlobCount: number;
    unrefDataStoreCount: number;
    unrefNodeCount: number;
    updatedAttachmentBlobCount: number;
    updatedDataStoreCount: number;
    updatedNodeCount: number;
}

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

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

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

// @alpha @deprecated
export interface IRefreshSummaryAckOptions {
    readonly ackHandle: string;
    readonly proposalHandle: string | undefined;
    readonly summaryLogger: ITelemetryLoggerExt;
    readonly summaryRefSeq: number;
}

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

// @alpha @deprecated
export interface ISerializedElection {
    readonly electedClientId: string | undefined;
    readonly electedParentId: string | undefined;
    readonly electionSequenceNumber: number;
}

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

// @alpha @deprecated (undocumented)
export interface ISubmitSummaryOptions extends ISummarizeOptions {
    readonly cancellationToken: ISummaryCancellationToken;
    readonly finalAttempt?: boolean;
    readonly latestSummaryRefSeqNum: number;
    readonly summaryLogger: ITelemetryLoggerExt;
}

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

// @alpha (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 (undocumented)
export interface ISummarizeResults {
    readonly receivedSummaryAckOrNack: Promise<SummarizeResultPart<IAckSummaryResult, INackSummaryResult>>;
    readonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;
    readonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>>;
}

// @alpha @deprecated (undocumented)
export interface ISummarizerInternalsProvider {
    refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
    submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
}

// @alpha @deprecated (undocumented)
export interface ISummarizerRuntime extends IConnectableRuntime {
    // (undocumented)
    readonly baseLogger: ITelemetryBaseLogger;
    // (undocumented)
    closeFn(): void;
    // (undocumented)
    readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
    // (undocumented)
    disposeFn(): void;
    // (undocumented)
    off(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): this;
    // (undocumented)
    on(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): this;
    readonly summarizerClientId: string | undefined;
}

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

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

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

// @alpha @deprecated
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;

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

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

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

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

// @alpha (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 @deprecated
export type ISummaryMetadataMessage = Pick<ISequencedDocumentMessage, "clientId" | "clientSequenceNumber" | "minimumSequenceNumber" | "referenceSequenceNumber" | "sequenceNumber" | "timestamp" | "type">;

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

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

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

// @alpha @deprecated
export interface ISweepPhaseStats {
    deletedAttachmentBlobCount: number;
    deletedDataStoreCount: number;
    deletedNodeCount: number;
    lifetimeAttachmentBlobCount: number;
    lifetimeDataStoreCount: number;
    lifetimeNodeCount: number;
}

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

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

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

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

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

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

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

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

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

// @alpha @deprecated
export class Summarizer extends TypedEventEmitter<ISummarizerEvents> implements ISummarizer {
    constructor(
    runtime: ISummarizerRuntime, configurationGetter: () => ISummaryConfiguration,
    internalsProvider: ISummarizerInternalsProvider, handleContext: IFluidHandleContext, summaryCollection: SummaryCollection, runCoordinatorCreateFn: (runtime: IConnectableRuntime) => Promise<ICancellableSummarizerController>);
    // (undocumented)
    close(): void;
    dispose(): void;
    // (undocumented)
    enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
    // (undocumented)
    get ISummarizer(): this;
    // (undocumented)
    recordSummaryAttempt?(summaryRefSeqNum?: number): void;
    // (undocumented)
    run(onBehalfOf: string): Promise<SummarizerStopReason>;
    stop(reason: SummarizerStopReason): void;
    static stopReasonCanRunLastSummary(stopReason: SummarizerStopReason): boolean;
    // (undocumented)
    summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
    // (undocumented)
    readonly summaryCollection: SummaryCollection;
}

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

// @alpha
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
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";

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

// (No @packageDocumentation comment for this package)

```
