Skip to content

Latest commit

 

History

History
754 lines (682 loc) · 27.4 KB

container-runtime.api.md

File metadata and controls

754 lines (682 loc) · 27.4 KB

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

Do not edit this file. It is a report generated by API Extractor.

import { AttachState } from '@fluidframework/container-definitions';
import { ContainerWarning } from '@fluidframework/container-definitions';
import { EventEmitter } from 'events';
import { FluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
import { FluidObject } from '@fluidframework/core-interfaces';
import { FlushMode } from '@fluidframework/runtime-definitions';
import { IAudience } from '@fluidframework/container-definitions';
import { IClientDetails } from '@fluidframework/protocol-definitions';
import { IContainerContext } from '@fluidframework/container-definitions';
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
import { IContainerRuntimeEvents } from '@fluidframework/container-runtime-definitions';
import { ICriticalContainerError } from '@fluidframework/container-definitions';
import { IDataStore } from '@fluidframework/runtime-definitions';
import { IDeltaManager } from '@fluidframework/container-definitions';
import { IDisposable } from '@fluidframework/common-definitions';
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
import { IEvent } from '@fluidframework/common-definitions';
import { IEventProvider } from '@fluidframework/common-definitions';
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
import { IFluidRouter } from '@fluidframework/core-interfaces';
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
import { IIdCompressor } from '@fluidframework/runtime-definitions';
import { IIdCompressorCore } from '@fluidframework/runtime-definitions';
import { ILoader } from '@fluidframework/container-definitions';
import { ILoaderOptions } from '@fluidframework/container-definitions';
import { IQuorumClients } from '@fluidframework/protocol-definitions';
import { IRequest } from '@fluidframework/core-interfaces';
import { IResponse } from '@fluidframework/core-interfaces';
import { IRuntime } from '@fluidframework/container-definitions';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISignalMessage } from '@fluidframework/protocol-definitions';
import { ISummaryAck } from '@fluidframework/protocol-definitions';
import { ISummaryContent } from '@fluidframework/protocol-definitions';
import { ISummaryNack } from '@fluidframework/protocol-definitions';
import { ISummaryStats } from '@fluidframework/runtime-definitions';
import { ISummaryTree } from '@fluidframework/protocol-definitions';
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
import { MessageType } from '@fluidframework/protocol-definitions';
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
import { StableId } from '@fluidframework/runtime-definitions';
import { TypedEventEmitter } from '@fluidframework/common-utils';

// @public
export const agentSchedulerId = "_scheduler";

// @public
export const AllowTombstoneRequestHeaderKey = "allowTombstone";

// @public
export function assertIsStableId(stableId: string): StableId;

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

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

// @public
export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents> implements IContainerRuntime, IRuntime, ISummarizerRuntime, ISummarizerInternalsProvider {
    // Warning: (ae-forgotten-export) The symbol "IContainerRuntimeMetadata" needs to be exported by the entry point index.d.ts
    // Warning: (ae-forgotten-export) The symbol "ISerializedElection" needs to be exported by the entry point index.d.ts
    // Warning: (ae-forgotten-export) The symbol "IBlobManagerLoadInfo" needs to be exported by the entry point index.d.ts
    //
    // @internal
    protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>, containerScope: FluidObject, logger: ITelemetryLoggerExt, existing: boolean, blobManagerSnapshot: IBlobManagerLoadInfo, _storage: IDocumentStorageService, idCompressor: (IIdCompressor & IIdCompressorCore) | undefined, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration, initializeEntryPoint?: (containerRuntime: IContainerRuntime) => Promise<FluidObject>);
    // (undocumented)
    protected addContainerStateToSummary(summaryTree: ISummaryTreeWithStats, fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext): void;
    addedGCOutboundReference(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
    // (undocumented)
    get attachState(): AttachState;
    // (undocumented)
    get clientDetails(): IClientDetails;
    // (undocumented)
    get clientId(): string | undefined;
    // (undocumented)
    get closeFn(): (error?: ICriticalContainerError) => void;
    collectGarbage(options: {
        logger?: ITelemetryLoggerExt;
        runSweep?: boolean;
        fullGC?: boolean;
    }, telemetryContext?: ITelemetryContext): Promise<IGCStats | undefined>;
    // (undocumented)
    get connected(): boolean;
    // (undocumented)
    createDataStore(pkg: string | string[]): Promise<IDataStore>;
    // (undocumented)
    _createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
    // (undocumented)
    createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
    // (undocumented)
    createDetachedRootDataStore(pkg: Readonly<string[]>, rootDataStoreId: string): IFluidDataStoreContextDetached;
    createSummary(blobRedirectTable?: Map<string, string>, telemetryContext?: ITelemetryContext): ISummaryTree;
    deleteSweepReadyNodes(sweepReadyRoutes: string[]): string[];
    // @deprecated (undocumented)
    deleteUnusedNodes(unusedRoutes: string[]): string[];
    readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
    // (undocumented)
    dispose(error?: Error): void;
    // (undocumented)
    get disposed(): boolean;
    // (undocumented)
    get disposeFn(): (error?: ICriticalContainerError) => void;
    // (undocumented)
    readonly enqueueSummarize: ISummarizer["enqueueSummarize"];
    ensureNoDataModelChanges<T>(callback: () => T): T;
    // (undocumented)
    get flushMode(): FlushMode;
    readonly gcTombstoneEnforcementAllowed: boolean;
    // (undocumented)
    getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
    // (undocumented)
    getAudience(): IAudience;
    getCurrentReferenceTimestampMs(): number | undefined;
    // (undocumented)
    getEntryPoint?(): Promise<FluidObject | undefined>;
    getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
    getGCNodePackagePath(nodePath: string): Promise<readonly string[] | undefined>;
    // Warning: (ae-forgotten-export) The symbol "GCNodeType" needs to be exported by the entry point index.d.ts
    getNodeType(nodePath: string): GCNodeType;
    // (undocumented)
    getPendingLocalState(): unknown;
    // (undocumented)
    getQuorum(): IQuorumClients;
    // (undocumented)
    getRootDataStore(id: string, wait?: boolean): Promise<IFluidRouter>;
    // (undocumented)
    idCompressor: (IIdCompressor & IIdCompressorCore) | undefined;
    // (undocumented)
    get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
    // (undocumented)
    get IFluidHandleContext(): IFluidHandleContext;
    // (undocumented)
    get IFluidRouter(): this;
    get isDirty(): boolean;
    // @deprecated (undocumented)
    static load(context: IContainerContext, registryEntries: NamedFluidDataStoreRegistryEntries, requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>, runtimeOptions?: IContainerRuntimeOptions, containerScope?: FluidObject, existing?: boolean, containerRuntimeCtor?: typeof ContainerRuntime): Promise<ContainerRuntime>;
    static loadRuntime(params: {
        context: IContainerContext;
        registryEntries: NamedFluidDataStoreRegistryEntries;
        existing: boolean;
        requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
        runtimeOptions?: IContainerRuntimeOptions;
        containerScope?: FluidObject;
        containerRuntimeCtor?: typeof ContainerRuntime;
        initializeEntryPoint?: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;
    }): Promise<ContainerRuntime>;
    // (undocumented)
    readonly logger: ITelemetryLoggerExt;
    // (undocumented)
    notifyAttaching(): void;
    // (undocumented)
    notifyOpReplay(message: ISequencedDocumentMessage): Promise<void>;
    // (undocumented)
    get options(): ILoaderOptions;
    // (undocumented)
    orderSequentially<T>(callback: () => T): T;
    // (undocumented)
    process(messageArg: ISequencedDocumentMessage, local: boolean): void;
    // (undocumented)
    processSignal(message: ISignalMessage, local: boolean): void;
    refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
    request(request: IRequest): Promise<IResponse>;
    resolveHandle(request: IRequest): Promise<IResponse>;
    // (undocumented)
    get reSubmitFn(): (type: ContainerMessageType, content: any, localOpMetadata: unknown, opMetadata: Record<string, unknown> | undefined) => void;
    // (undocumented)
    get scope(): FluidObject;
    // (undocumented)
    setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
    // (undocumented)
    setConnectionState(connected: boolean, clientId?: string): void;
    // (undocumented)
    get storage(): IDocumentStorageService;
    // (undocumented)
    submitDataStoreAliasOp(contents: any, localOpMetadata: unknown): void;
    // (undocumented)
    submitDataStoreOp(id: string, contents: any, localOpMetadata?: unknown): void;
    // (undocumented)
    submitDataStoreSignal(address: string, type: string, content: any): void;
    submitSignal(type: string, content: any): void;
    submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
    summarize(options: {
        fullTree?: boolean;
        trackState?: boolean;
        summaryLogger?: ITelemetryLoggerExt;
        runGC?: boolean;
        fullGC?: boolean;
        runSweep?: boolean;
    }): Promise<IRootSummaryTreeWithStats>;
    // (undocumented)
    readonly summarizeOnDemand: ISummarizer["summarizeOnDemand"];
    get summarizerClientId(): string | undefined;
    updateStateBeforeGC(): Promise<void>;
    updateTombstonedRoutes(tombstonedRoutes: string[]): void;
    updateUnusedRoutes(unusedRoutes: string[]): void;
    updateUsedRoutes(usedRoutes: string[]): void;
    // (undocumented)
    uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;
}

// @public (undocumented)
export interface ContainerRuntimeMessage {
    // (undocumented)
    contents: any;
    // (undocumented)
    type: ContainerMessageType;
}

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

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

// @public (undocumented)
export class FluidDataStoreRegistry implements IFluidDataStoreRegistry {
    constructor(namedEntries: NamedFluidDataStoreRegistryEntries);
    // (undocumented)
    get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
    // (undocumented)
    get IFluidDataStoreRegistry(): this;
}

// @public
export function generateStableId(): StableId;

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

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

// @public
export interface IBaseSummarizeResult {
    readonly error: any;
    // (undocumented)
    readonly minimumSequenceNumber: number;
    readonly referenceSequenceNumber: number;
    // (undocumented)
    readonly stage: "base";
}

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

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

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

// @public (undocumented)
export interface IChunkedOp {
    // (undocumented)
    chunkId: number;
    // (undocumented)
    contents: string;
    // (undocumented)
    originalCompression?: string;
    // (undocumented)
    originalMetadata?: Record<string, unknown>;
    // (undocumented)
    originalType: MessageType | ContainerMessageType;
    // (undocumented)
    totalChunks: number;
}

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

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

// @public (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;
}

// @public
export interface IContainerRuntimeOptions {
    readonly chunkSizeInBytes?: number;
    readonly compressionOptions?: ICompressionRuntimeOptions;
    readonly enableGroupedBatching?: boolean;
    readonly enableOpReentryCheck?: boolean;
    readonly enableRuntimeIdCompressor?: boolean;
    readonly flushMode?: FlushMode;
    // (undocumented)
    readonly gcOptions?: IGCRuntimeOptions;
    readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
    readonly maxBatchSizeInBytes?: number;
    // (undocumented)
    readonly summaryOptions?: ISummaryRuntimeOptions;
}

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

// @public (undocumented)
export interface IGCRuntimeOptions {
    [key: string]: any;
    disableGC?: boolean;
    gcAllowed?: boolean;
    runFullGC?: boolean;
    sessionExpiryTimeoutMs?: number;
    // @deprecated (undocumented)
    sweepAllowed?: boolean;
}

// @public
export interface IGCStats {
    attachmentBlobCount: number;
    dataStoreCount: number;
    nodeCount: number;
    unrefAttachmentBlobCount: number;
    unrefDataStoreCount: number;
    unrefNodeCount: number;
    updatedAttachmentBlobCount: number;
    updatedDataStoreCount: number;
    updatedNodeCount: number;
}

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

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

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

// @public (undocumented)
export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
    readonly reason: string;
}

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

// @public
export interface IRootSummaryTreeWithStats extends ISummaryTreeWithStats {
    gcStats?: IGCStats;
}

// @public @deprecated (undocumented)
export function isRuntimeMessage(message: ISequencedDocumentMessage): boolean;

// @public
export function isStableId(str: string): str is StableId;

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

// @public (undocumented)
export interface ISubmitSummaryOptions extends ISummarizeOptions {
    readonly cancellationToken: ISummaryCancellationToken;
    readonly summaryLogger: ITelemetryLoggerExt;
}

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

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

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

// @public (undocumented)
export interface ISummarizerEvents extends IEvent {
    (event: "summarizingError", listener: (error: ISummarizingWarning) => void): any;
}

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

// @public (undocumented)
export interface ISummarizerRuntime extends IConnectableRuntime {
    // (undocumented)
    closeFn(): void;
    // (undocumented)
    readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
    // (undocumented)
    disposeFn(): void;
    // (undocumented)
    readonly logger: ITelemetryLoggerExt;
    // (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;
}

// @public (undocumented)
export interface ISummarizingWarning extends ContainerWarning {
    // (undocumented)
    readonly errorType: "summarizingError";
    // (undocumented)
    readonly logged: boolean;
}

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

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

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

// @public (undocumented)
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;

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

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

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

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

// @public (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";
}

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

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

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

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

// @public
export const neverCancelledSummaryToken: ISummaryCancellationToken;

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

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

// @public
export enum RuntimeHeaders {
    viaHandle = "viaHandle",
    wait = "wait"
}

// @public @deprecated (undocumented)
export enum RuntimeMessage {
    // (undocumented)
    Alias = "alias",
    // (undocumented)
    Attach = "attach",
    // (undocumented)
    BlobAttach = "blobAttach",
    // (undocumented)
    ChunkedOp = "chunkedOp",
    // (undocumented)
    FluidDataStoreOp = "component",
    // (undocumented)
    Operation = "op",
    // (undocumented)
    Rejoin = "rejoin"
}

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

// @public
export class Summarizer extends EventEmitter implements ISummarizer {
    constructor(
    runtime: ISummarizerRuntime, configurationGetter: () => ISummaryConfiguration,
    internalsProvider: ISummarizerInternalsProvider, handleContext: IFluidHandleContext, summaryCollection: SummaryCollection, runCoordinatorCreateFn: (runtime: IConnectableRuntime) => Promise<ICancellableSummarizerController>);
    // (undocumented)
    close(): void;
    static create(loader: ILoader, url: string): Promise<ISummarizer>;
    dispose(): void;
    // (undocumented)
    readonly enqueueSummarize: ISummarizer["enqueueSummarize"];
    // (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)
    readonly summarizeOnDemand: ISummarizer["summarizeOnDemand"];
    // (undocumented)
    readonly summaryCollection: SummaryCollection;
}

// @public (undocumented)
export type SummarizeResultPart<TSuccess, TFailure = undefined> = {
    success: true;
    data: TSuccess;
} | {
    success: false;
    data: TFailure | undefined;
    message: string;
    error: any;
    retryAfterSeconds?: number;
};

// @public (undocumented)
export type SummarizerStopReason =
/** Summarizer client failed to summarize in all 3 consecutive attempts. */
"failToSummarize"
/** Parent client reported that it is no longer connected. */
| "parentNotConnected"
/**
* Parent client reported that it is no longer elected the summarizer.
* This is the normal flow; a disconnect will always trigger the parent
* client to no longer be elected as responsible for summaries. Then it
* tries to stop its spawned summarizer client.
*/
| "notElectedParent"
/**
* We are not already running the summarizer and we are not the current elected client id.
*/
| "notElectedClient"
/** Summarizer client was disconnected */
| "summarizerClientDisconnected"
/** running summarizer threw an exception */
| "summarizerException"
/**
* The previous summary state on the summarizer is not the most recently acked summary. this also happens when the
* first submitSummary attempt fails for any reason and there's a 2nd summary attempt without an ack
*/
| "latestSummaryStateStale";

// @public
export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEvents> {
    constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, logger: ITelemetryLoggerExt);
    // (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>;
}

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

// @internal
export function unpackRuntimeMessage(message: ISequencedDocumentMessage): boolean;

// (No @packageDocumentation comment for this package)