API Reference Overview
This section provides detailed technical documentation for the Flowcraft API. It is intended for developers who are familiar with the Core Concepts and are looking for specific details on classes, interfaces, and functions.
Key Modules
The Flowcraft API is organized into several key modules, each responsible for a specific aspect of the framework.
- Flow (
createFlow): The fluent builder API for programmatically constructing aWorkflowBlueprint. - Runtime (
FlowRuntime): The engine responsible for executing workflows. - Nodes: The interfaces and base classes for defining node implementations (
BaseNode,NodeFunction). - Context: The interfaces and classes for managing workflow state (
ISyncContext,IAsyncContext). - Analysis: Utilities for validating and visualizing blueprints (
analyzeBlueprint,generateMermaid). - Linter: Tools for static analysis to find common errors before runtime.
- Extensibility Interfaces:
- Middleware: The
Middlewareinterface for adding cross-cutting concerns like tracing and transactions. - Serializer: The
ISerializerinterface for custom data serialization. - Evaluator: The
IEvaluatorinterface for custom expression evaluation. - Logger: The
ILoggerinterface for plugging in custom logging providers.
- Middleware: The
- Errors: Custom error classes thrown by the runtime.
- Distributed Adapter: The base classes and interfaces for building distributed execution adapters.