@mastra/core
Version:
20 lines • 1.13 kB
TypeScript
import type { WorkflowRegistryIndex, WorkflowRegistrySchemas, WorkflowValidationIssue, WorkflowValidationIssueCode } from '../dynamic/validate/index.js';
import type { WorkflowBuilderDefinition } from './index.js';
export type WorkflowDefinitionPreflightIssueCode = WorkflowValidationIssueCode;
export type WorkflowDefinitionPreflightIssue = WorkflowValidationIssue;
export type WorkflowDefinitionDependencySchema = WorkflowRegistrySchemas;
export type WorkflowDefinitionPreflightContext = WorkflowRegistryIndex;
export type WorkflowDefinitionPreflightResult = {
ok: true;
} | {
ok: false;
issues: WorkflowDefinitionPreflightIssue[];
};
/**
* Collect-mode validation of an authoring definition. Context gates the
* context-dependent checks: reference checks only run for dependency kinds
* present in the context, and schema-flow compatibility only proves
* mismatches where schemas are known.
*/
export declare function preflightWorkflowDefinition(definition: WorkflowBuilderDefinition, context?: WorkflowDefinitionPreflightContext): WorkflowDefinitionPreflightResult;
//# sourceMappingURL=preflight.d.ts.map