import { Handler, WorkflowContext, WorkflowEvent, WorkflowEventData, WorkflowStream } from "@llama-flow/core"; //#region src/core/event.d.ts declare const opaqueSymbol: unique symbol; type WorkflowEventData$1 = { get data(): Data; } & { readonly [opaqueSymbol]: DebugLabel; }; type WorkflowEvent$1 = { /** * This is the label used for debugging purposes. */ debugLabel?: DebugLabel; /** * This is the unique identifier for the event, which is used for sharing cross the network boundaries. */ readonly uniqueId: string; with(data: Data): WorkflowEventData$1; include(event: unknown): event is WorkflowEventData$1; } & { readonly [opaqueSymbol]: DebugLabel; }; //#endregion //#region src/core/context.d.ts type Handler$1[], Result extends WorkflowEventData | void> = (...event: { [K in keyof AcceptEvents]: ReturnType }) => Result | Promise; type BaseHandlerContext = { abortController: AbortController; handler: Handler$1[], any>; inputEvents: WorkflowEvent[]; inputs: WorkflowEventData[]; outputs: WorkflowEventData[]; prev: HandlerContext; next: Set; root: HandlerContext; }; type SyncHandlerContext = BaseHandlerContext & { async: false; pending: null; }; type AsyncHandlerContext = BaseHandlerContext & { async: true; pending: Promise | void> | null; }; type HandlerContext = AsyncHandlerContext | SyncHandlerContext; //#endregion //#region src/middleware/trace-events/create-handler-decorator.d.ts declare function createHandlerDecorator(config: { debugLabel?: string; getInitialValue: () => Metadata; onBeforeHandler: (handler: Handler[], WorkflowEventData | void>, handlerContext: HandlerContext, metadata: Metadata) => Handler[], WorkflowEventData | void>; onAfterHandler: (metadata: Metadata) => Metadata; }): [], Result extends ReturnType["with"]> | void, Fn extends Handler>(handler: Fn) => Fn; //#endregion //#region src/middleware/trace-events/run-once.d.ts declare const runOnce: [], Result extends ReturnType["with"]> | void, Fn extends Handler$1>(handler: Fn) => Fn; //#endregion //#region src/middleware/trace-events.d.ts declare function getEventOrigins(eventData: WorkflowEventData, context?: WorkflowContext): [WorkflowEventData, ...WorkflowEventData[]]; type HandlerRef[], Result extends ReturnType["with"]> | void, Fn extends Handler> = { get handler(): Fn; }; declare function withTraceEvents[], Result extends ReturnType["with"]> | void>(accept: AcceptEvents, handler: Handler): void; createContext(): WorkflowContext; }>(workflow: WorkflowLike): Omit & { handle[], Result extends ReturnType["with"]> | void, Fn extends Handler>(accept: AcceptEvents, handler: Fn): HandlerRef; substream>(eventData: WorkflowEventData, stream: WorkflowStream): WorkflowStream; }; //#endregion export { HandlerRef, createHandlerDecorator, getEventOrigins, runOnce, withTraceEvents }; //# sourceMappingURL=trace-events.d.ts.map