import { BlueNode } from '@blue-labs/language'; import { ContractBundle } from './contract-bundle.js'; import { ChannelRunner } from './channel-runner.js'; import { ContractLoader } from './contract-loader.js'; import { JsonPatch } from '../model/shared/json-patch.js'; import { DocumentUpdateData, DocumentProcessingRuntime } from '../runtime/document-processing-runtime.js'; export interface ProcessorContext { resolvePointer(relativePointer: string): string; applyPatch(patch: JsonPatch): Promise; } export interface ScopeExecutionHooks { isScopeInactive(scopePath: string): boolean; createContext(scopePath: string, bundle: ContractBundle, event: BlueNode, allowTerminatedWork: boolean, lifecycle?: boolean): ProcessorContext; recordLifecycleForBridging(scopePath: string, event: BlueNode): Promise; enterFatalTermination(scopePath: string, bundle: ContractBundle | null, reason: string): Promise; fatalReason(error: unknown, label: string): string; markCutOff(scopePath: string): Promise; } export interface ScopeExecutorOptions { runtime: DocumentProcessingRuntime; contractLoader: ContractLoader; channelRunner: ChannelRunner; bundles: Map; hooks: ScopeExecutionHooks; blueId: (node: BlueNode) => string; nodeAt(scopePath: string): BlueNode | null; createDocumentUpdateEvent(data: DocumentUpdateData, scopePath: string): BlueNode; matchesDocumentUpdate(scopePath: string, watchPath: string | null | undefined, changedPath: string): boolean; } export declare class ScopeExecutor { private readonly runtime; private readonly contractLoader; private readonly channelRunner; private readonly bundles; private readonly hooks; private readonly blueId; private readonly nodeAt; private readonly createDocumentUpdateEvent; private readonly matchesDocumentUpdate; constructor(options: ScopeExecutorOptions); initializeScope(scopePath: string, chargeScopeEntry: boolean): Promise; loadBundles(scopePath: string): void; processExternalEvent(scopePath: string, event: BlueNode): Promise; private processPreparedExternalEvent; handlePatch(scopePath: string, bundle: ContractBundle, patch: JsonPatch, allowReservedMutation: boolean): Promise; deliverLifecycle(scopePath: string, bundle: ContractBundle | null, event: BlueNode, finalizeAfter: boolean): Promise; private processEmbeddedChildren; private refreshBundle; private nextEmbeddedPath; private loadBundle; private addInitializationMarker; private finalizeScope; private bridgeEmbeddedEmissions; private drainTriggeredQueue; private channelsMatching; private isProcessorManagedChannel; private validatePatchBoundary; private enforceReservedKeyWriteProtection; private markCutOffChildrenIfNeeded; private hasInitializationMarker; private createLifecycleEvent; } //# sourceMappingURL=scope-executor.d.ts.map