import { type Token } from '@frontmcp/di'; import { z } from '@frontmcp/lazy-zod'; import { type ScopeEntry } from '../entries'; import { type HttpMethod, type ServerRequest } from '../interfaces'; declare module '@frontmcp/sdk' { interface ExtendFlows { } } export type FlowName = keyof ExtendFlows; export type CanActivateFlow = (request: ServerRequest, scope: ScopeEntry) => Promise; export interface FlowMiddlewareOptions { path?: RegExp | string; method?: HttpMethod; canActivate?: CanActivateFlow[]; } export type FlowRunOptions, Input, Output extends z.ZodObject | z.ZodUnion | z.ZodDiscriminatedUnion, State extends z.ZodObject> = { ctx: Ctx; plan: Plan; input: Input; output: Output; state: State; stage: StagesFromPlan; executeStage: ExecuteStagesFromPlan; }; /** * Declarative metadata describing what a FrontMcpFlow contributes at app scope. */ export interface FlowMetadata { name: Name; description?: string; plan: FlowPlan; inputSchema: ExtendFlows[Name]['input']; outputSchema: ExtendFlows[Name]['output']; access: 'public' | 'authorized'; dependsOn?: Token[]; middleware?: FlowMiddlewareOptions; } export type StepInfo = string | { title?: string; description?: string; }; export type FlowPhase = 'pre' | 'execute' | 'post' | 'finalize' | 'error'; type Values = T[keyof T]; type ArrayElem = T extends ReadonlyArray ? U : never; export type StagesFromPlan

> = ArrayElem>>; export type ExecuteStagesFromPlan

> = ArrayElem>; export type FlowPlan = { steps?: Record; } & Partial>; export declare const frontMcpFlowMetadataSchema: import("@frontmcp/lazy-zod").ZodObject<{ name: import("@frontmcp/lazy-zod").ZodString; description: import("@frontmcp/lazy-zod").ZodOptional; access: import("@frontmcp/lazy-zod").ZodDefault>>; inputSchema: import("zod").ZodCustom; outputSchema: import("@frontmcp/lazy-zod").ZodOptional>; plan: import("zod").ZodCustom; dependsOn: import("@frontmcp/lazy-zod").ZodOptional>; middleware: import("@frontmcp/lazy-zod").ZodOptional>; }, import("zod/v4/core").$loose>; export {}; //# sourceMappingURL=flow.metadata.d.ts.map