import type { EffectDef, EffectMode } from "./effect"; import type { IntentContext } from "./types"; export type IntentExecutionFrame = { context: IntentContext; effects: EffectDef[]; effectMode: EffectMode; }; export type IntentMiddleware = (next: (frame: IntentExecutionFrame) => Promise) => (frame: IntentExecutionFrame) => Promise; export declare function applyMiddleware(middlewares: IntentMiddleware[], final: (frame: IntentExecutionFrame) => Promise): (frame: IntentExecutionFrame) => Promise;