Releases: aiperceivable/apflow
Release 0.18.2
Changed
- Rebrand: aipartnerup → aiperceivable
Release 0.18.1
Added
-
Docker Support
-
Docker Compose configuration (
docker-compose.yml) for easy deployment -
Docker image definition (
Dockerfile) for containerized apflow -
.dockerignorefile for optimized image builds -
Enhanced GraphQL Testing
-
New
test_loaders.pyfor GraphQL DataLoaders testing (task loading by ID and children) -
Additional test coverage in
test_mutations.pyfor execute_task mutation -
Expanded
test_queries.pywith task tree and running tasks queries -
Enhanced
test_schema.pyto verify TaskTreeType and TaskProgressEvent in schema -
Added task progress subscriptions tests in
test_subscriptions.py -
Improved tests for distributed configuration in
test_distributed_config.pyandtest_leader_election.py -
Enhanced lease management tests with concurrent acquisition and validation
Changed
pyproject.toml: Updatedapdev[dev]dependency to version 0.1.6 for improved compatibility- Documentation workflow: Updated GitHub Actions versions for consistency
- Shared
make_task_dict()helper function inconftest.pyfor consistent task dictionary creation in GraphQL tests
Fixed
-
PostgreSQL Driver Selection
-
Fixed
normalize_postgresql_url()function to correctly select async/sync driver based onasync_modeparameter -
Ensures proper database connection handling for both sync and async contexts
-
Configuration Management
-
Fixed
test_scheduler.pyto properly patchload_cli_configin fixtures, preventing local config loading during tests -
Enhanced runtime tests to handle cases when no task executor is configured
-
Documentation Workflow
-
Added
workflow_dispatchtrigger for manual documentation deployment -
Fixed GitHub Actions workflow compatibility for documentation site generation
Release 0.18.0
Added
-
Distributed cluster support (
apflow.core.distributed) -
Leader election with PostgreSQL advisory locks
-
Lease-based task ownership with automatic expiration and renewal
-
Node registry with heartbeat-based health monitoring
-
Task placement strategies: round-robin, least-loaded, random, affinity-based
-
Distributed worker with configurable concurrency and graceful shutdown
-
Distributed runtime orchestrating node lifecycle, leader election, and task distribution
-
Idempotency store for at-least-once delivery with deduplication
-
Event bus for inter-node communication (task assigned/completed/failed, node join/leave, leader change)
-
Database migration
003_add_distributed_supportadding node, lease, and idempotency tables -
Configuration via
DistributedConfigwith environment variable support (APFLOW_DISTRIBUTED_*) -
GraphQL API adapter (
apflow.api.graphql) -
Strawberry GraphQL schema with queries, mutations, and subscriptions
-
Task CRUD operations: create, get, list, cancel, retry
-
Real-time task status subscriptions via WebSocket
-
GraphQL server mountable as FastAPI sub-application
-
New
[graphql]optional dependency group (strawberry-graphql>=0.220.0) -
Protocol abstraction layer (
apflow.api.protocols) -
ProtocolAdapterbase class for multi-protocol support -
A2A protocol adapter (
apflow.api.a2a.protocol_adapter) -
MCP protocol adapter (
apflow.api.mcp.protocol_adapter) -
Unified protocol types (
apflow.api.protocol_types) -
Protocol discovery and capability reporting in
capabilities.py -
Refactored
app.pyto use protocol registry for dynamic protocol mounting -
Documentation
-
GraphQL API guide with schema reference and usage examples
-
Distributed cluster guide covering setup, configuration, and operation
-
Reorganized architecture docs:
exception-handling.mdandtask-manager.mdmoved todocs/architecture/ -
Consolidated documentation from
apflow-docsrepo intoapflowfor single-repo deployment -
Protocol specification (10 files): overview, core concepts, data model, execution lifecycle, examples, interfaces, conformance, errors, validation
-
Rich homepage (
docs/index.md) with Material grid cards, learning paths, and quick navigation -
Site assets: logo (
docs/assets/logo.svg) and favicon (docs/assets/favicon.ico) -
MkDocs configuration (
mkdocs.yml) with Material theme, mermaid2 diagrams, code highlighting, and explicit nav structure -
GitHub Actions workflow (
.github/workflows/docs.yml) for automatic GitHub Pages deployment on push tomain -
New
[docs]optional dependency group:mkdocs,mkdocs-material,mkdocs-mermaid2-plugin,mkdocs-minify-plugin,pymdown-extensions
Changed
pyproject.toml: Addedgraphqloptional dependency group, addedgreenlet>=3.0.0topostgresextras, addedapdev[dev]>=0.1.2to dev dependencies, includedgraphqlin[all]extras, added[docs]optional dependency groupdocs/README.md: Simplified to point to the live documentation site with local development instructions.gitignore: Addedsite/for MkDocs build outputapi/app.py: Refactored to protocol registry pattern for mounting A2A, MCP, and GraphQL adaptersapi/main.py: Updated startup to support distributed mode with--distributedflagcore/execution/task_executor.py: Added distributed-aware task execution with lease acquisitioncore/storage/sqlalchemy/models.py: Extended with distributed node, lease, and idempotency modelscore/config/registry.py: Added distributed configuration support
Fixed
- Test mocking in
test_multi_phase_crew.py: Added missingcrewai.Agentandcrewai.Taskpatches to preventOPENAI_API_KEYerrors in unit tests - Integration test
test_scrape_crewai_chain_schema_based: Addedapi_keys_availablefixture to skip when API keys are not set
Removed
scripts/directory: Removed legacy utility scripts (release.sh,check_allowed_chars.py,check_heavy_imports.py,check_import_performance.sh,detect_circular_imports.py,quick_import_check.py)docs/development/extending.md: Removed in favor of reorganized architecture docs
Release 0.17.0
Added
-
CLI monitoring commands (
apflow monitor) -
apflow monitor status- Display current task status with rich tables -
apflow monitor watch <task-id>- Real-time task monitoring with live updates -
apflow monitor trace <task-id>- Execution timeline with dependency tree visualization -
apflow monitor db- Database connection status and statistics -
Supports both API and local database modes
-
Rich terminal UI with tables, trees, panels, and live updates
-
Structured error handling with enhanced context
-
ApflowErrorbase class now supports structured format withwhat,why,how_to_fix, andcontextfields -
Error messages include emoji indicators and formatted troubleshooting guidance
-
Backward compatible with existing error handling code
-
NetworkErrorandAuthenticationErrorclasses with detailed context -
Memory leak testing infrastructure
-
Performance test suite in
tests/performance/test_memory_leaks.py -
Tests for memory stability over 1000+ task executions
-
Executor instance cleanup verification
-
Database file growth monitoring
-
Added
memory-profiler>=0.61.0andpsutil>=5.9.0to dev dependencies -
Comprehensive documentation and examples
-
Hello World Guide - 5-minute quick start tutorial
-
Executor Selection Guide - Decision tree, comparison matrix, and detailed scenarios for all 8 executor types
-
Example code files in
examples/hello_world/: -
simple.py- Basic custom executor example -
with_dependencies.py- Task dependencies example -
built_in_executors.py- REST executor examples -
Example code files in
examples/executor_examples/: -
rest_executor_example.py- HTTP API integration patterns -
ssh_executor_example.py- Remote command execution examples -
docker_executor_example.py- Container execution examples -
Updated documentation indexes to reference new guides and examples
-
Enhanced error handling in executors
-
REST executor: Improved exception handling for timeout, connection errors, SSL errors, and HTTP errors with structured context
-
SSH executor: Enhanced authentication error handling with key permission checks and troubleshooting guidance
Changed
- TaskRepository improvements
- Added
query_tasks_by_statuses()method for efficient multi-status queries using SQLAlchemy IN clause - Optimized status filtering in monitoring commands
Release 0.16.0
Fixed
-
CLI
tasks scheduled completepassing unsupportedresultparameter to repository -
complete_scheduled_run()does not accept aresultparameter; removed the incorrect kwarg from the CLI direct-path call -
CLI
tasks countinefficient in-memory counting -
Replaced
query_tasks()+len()per-status loop (which loaded all records into memory) with newTaskRepository.count_tasks_by_status()usingSELECT COUNT(*)SQL queries, matching the API's efficient implementation
Added
-
--error-message/-moption forapflow tasks cancel -
Allows specifying a custom cancellation error message, consistent with the API
error_messageparameter -
Defaults to
"Cancelled by user"/"Force cancelled by user"when not provided -
--calculate-next-run / --no-calculate-next-runoption forapflow tasks scheduled complete -
Controls whether
next_run_atis recalculated after completing a scheduled run (default:True), consistent with the APIcalculate_next_runparameter -
--before/-boption forapflow tasks scheduled due -
Allows specifying a custom cutoff time (ISO datetime) to query due tasks, consistent with the API
beforeparameter -
Defaults to current UTC time when not provided
-
TaskRepository.count_tasks_by_status()method -
Efficient SQL
COUNT(*)grouped-by-status query withuser_idandroot_onlyfilters
Removed
apflow tasks historyCLI command- Removed non-functional stub command; underlying
TaskRepository.get_task_history()andTaskModel.status_logwere never implemented - Task history is managed at the A2A Protocol TaskStore layer, not TaskModel
Changed
- Enhanced executor security and validation; added tests for JWT secret generation and TaskManager locking
- Updated token claims to use
rolesas a list; added tests for role-claim handling
Release 0.15.0
Fixed
-
Scheduler webhook trigger admin permission bypass
-
handle_webhook_triggernow checks_is_admin(request)and setsuser_id=Nonefor admin users, matching the pattern used by all other handlers (handle_tasks_list,handle_tasks_count, etc.) -
Previously, admin JWT tokens passed to the webhook trigger were treated as regular users, causing "Permission denied" when the scheduler triggered tasks owned by other users
-
Scheduled task re-execution not resetting child tasks
-
complete_scheduled_run()now clearsresult,progress, and resets all child tasks topendingbefore the next scheduled run viareset_task_tree_for_reexecution() -
Previously, a scheduled parent task would re-run but its children retained their
completedstatus and stale results from the previous cycle, causing incorrect or skipped execution -
ISO datetime 'Z' suffix parsing inconsistency
-
Added
parse_iso_datetime()helper incore/utils/helpers.pythat normalises theZsuffix before callingfromisoformat(), fixing compatibility with Python 3.10 and below -
Replaced scattered
datetime.fromisoformat(value.replace('Z', '+00:00'))calls acrossschedule_calculator.py,ical.py,tasks.pyroutes, and CLI commands with the centralised helper
Added
-
Scheduler auto-generates admin JWT for API access
-
InternalScheduler._get_auth_token()auto-generates an admin JWT using the localjwt_secretfromconfig.cli.yamlwhenadmin_auth_tokenis not explicitly configured -
Token is cached per scheduler session (generated once, reused for all API calls)
-
Falls back gracefully to unauthenticated access if JWT generation fails
-
Eliminates the need for manual token configuration when running
apflow scheduler startlocally -
Scheduler startup auth identity logging
-
_log_auth_identity()logs the auth source (configured token vs auto-generated) and JWT subject at startup for troubleshooting -
Webhook verify hook for custom authentication (
register_webhook_verify_hook) -
New
@register_webhook_verify_hookdecorator in public API (apflow.register_webhook_verify_hook) for tenant-level custom webhook verification -
Hook receives
WebhookVerifyContext(task_id, signature, timestamp, client_ip) and returnsWebhookVerifyResult(valid, user_id, error) -
Supports both sync and async hook functions
-
Added
WebhookVerifyContext,WebhookVerifyResultdataclasses, andWebhookVerifyHooktype alias incore/types.py -
apflow scheduler listCLI command -
List scheduled tasks with filters:
--enabled-only/--all,--user-id,--type,--status,--format -
Supports both API and direct DB modes via the standard API gateway helper
-
Example:
apflow scheduler list --status running,apflow scheduler list --type daily -f json -
apflow scheduler start --verboseoption -
New
--verbose/-vflag enables DEBUG-level logging for the scheduler process -
Works in both foreground and background modes
-
tasks.scheduled.export-icalAPI endpoint -
Export scheduled tasks as iCalendar format via JSON-RPC
-
Supports
user_id,schedule_type,enabled_only,limit,calendar_name, andbase_urlparameters -
Non-admin users can only export their own tasks; admin users can export all
-
Status filter for scheduled task queries
-
tasks.scheduled.listAPI endpoint and CLI command (apflow tasks scheduled list,apflow scheduler list) now accept--status/statusparameter to filter by task status (e.g.pending,running,completed,failed) -
TaskRepository.get_scheduled_tasks()updated with newstatusparameter -
reset_task_tree_for_reexecution()repository method -
Resets all child tasks in a tree to clean pending state (status, result, error, timestamps, progress) before scheduled re-execution
-
Called automatically by
complete_scheduled_run()for parent tasks with children -
Comprehensive test coverage for admin webhook permissions (
TestWebhookTriggerAdminPermission: 3 tests) -
Comprehensive test coverage for iCal export API endpoint (
TestScheduledTasksExportIcal: 4 tests) -
Additional scheduler tests for auto-generated auth token and auth identity logging
Changed
-
Webhook trigger authentication redesigned — three-layer priority chain
-
Authentication priority: (1) JWT via middleware → (2)
webhook_verify_hookfor tenant-level custom verification → (3)APFLOW_WEBHOOK_SECRETfor internal HMAC -
IP whitelist and rate limit are now applied as an additional protection layer after authentication, instead of being bundled with signature validation
-
Replaces the previous single-
WebhookGatewayapproach where all validation was handled in one pass -
Unified task tree execution model for scheduler
-
Scheduler (
internal.py) and webhook gateway (webhook.py) now always load the task tree from DB viaget_task_tree_for_api(), removing thehas_children-based auto-detection of single vs tree mode -
Dependency cascade is handled uniformly by
execute_after_taskregardless of task structure -
Scheduled tasks table now shows Status column
-
_print_scheduled_tasks_table()includes task status with color-coded display (yellow=pending, blue=running, green=completed, red=failed) -
Refined log levels across scheduler and API routes
-
Scheduler (
internal.py): Demoted per-poll-cycle and per-task-execution detail logs from INFO to DEBUG (Found N due tasks,Executing scheduled task,Loaded task tree,Task not completed (status=pending), etc.) -
Scheduler: Task failures without an explicit error (e.g.,
status=pending) are now logged at DEBUG instead of WARNING -
API routes (
tasks.py): Demoted per-request method/params/duration logs from INFO to DEBUG, reducing noise under default INFO level -
API routes: Demoted CRUD operation detail logs from INFO to DEBUG (
Updated task,Creating task tree from N tasks,Generated task copy preview) -
Removed emoji characters from API route log messages
-
Code formatting applied across codebase via Black formatter
Release 0.14.0
Changed
-
Executor Schema Mechanism — Pydantic BaseModel with ClassVar
-
All built-in executors now declare input/output schemas as Pydantic
BaseModelclasses assigned viainputs_schema: ClassVar[type[BaseModel]]andoutputs_schema: ClassVar[type[BaseModel]], replacing inlineget_input_schema()/get_output_schema()method overrides -
BaseTask.get_input_schema()andget_output_schema()are now implemented in the base class: they callmodel_json_schema()on the Pydantic model and resolve$refreferences inline viaresolve_schema_refs() -
Subclasses no longer need to override
get_input_schema()/get_output_schema()— just set theClassVar -
Both Pydantic
BaseModeland legacydictschemas are still supported (backward compatible) -
Added
resolve_schema_refs()helper incore/utils/helpers.pyto inline$defs/$reffrom Pydantic-generated JSON Schema -
Updated all 16 built-in executors:
AggregateResultsExecutor,ApiExecutor,BatchCrewaiExecutor,CrewaiExecutor,DockerExecutor,SendEmailExecutor,GenerateExecutor,GrpcExecutor,RestExecutor,LLMExecutor,McpExecutor,ScrapeExecutor,SshExecutor,CommandExecutor,SystemInfoExecutor,WebSocketExecutor -
Updated documentation across 8 files:
extending.md,custom-tasks.md,quick-reference.md,python.md,basic_task.md,quick-start.md,faq.md,best-practices.md -
API Architecture Refactoring — Three-Layer Design
-
Introduced unified capabilities registry (
api/capabilities.py) as single source of truth for all 15 task operations, replacing separate inline definitions in A2A and MCP modules -
A2A
POST /now only handles agent-level actions (tasks.execute,tasks.generate,tasks.cancel); CRUD operations return an error directing clients toPOST /tasks -
MCP adapter auto-generates all 15 tools from the capabilities registry via
call_by_tool_namerouting -
Simplified A2A adapter: removed ~300 lines of CRUD bridging code from
agent_executor.pyandtask_routes_adapter.py
Added
-
Email Executor (
send_email_executor) -
Send emails via Resend HTTP API or SMTP protocol
-
Provider dispatch:
inputs["provider"]selects"resend"or"smtp" -
Resend provider: POST to
https://api.resend.com/emailsviahttpx.AsyncClient, returns message ID and status code -
SMTP provider: Uses
aiosmtplib.send()(optional dependency, guarded import) -
Supports plain text and HTML emails, cc/bcc recipients, reply-to address
-
Input validation for required fields (provider, to, subject, from_email, body/html)
-
Schema methods (
get_input_schema,get_output_schema) and demo mode support -
Added
[email]optional dependency withaiosmtplib>=3.0.0 -
Added
emailto[all]installation extra -
Comprehensive test coverage: 26 tests for validation, Resend, SMTP, schemas, and demo results
-
Method Discovery Endpoint (
GET /tasks/methods) -
Returns all available task methods grouped by category (
agent_action,crud,query,monitoring) with input schemas, descriptions, and examples -
Driven by the capabilities registry for automatic consistency
-
Task Scheduling System
-
Added
ScheduleTypeenum supporting six schedule types:once,interval,cron,daily,weekly,monthly -
Added 9 scheduling fields to
TaskModel:schedule_type,schedule_expression,schedule_enabled,schedule_start_at,schedule_end_at,next_run_at,last_run_at,max_runs,run_count -
Created
ScheduleCalculatormodule for next execution time calculation across all schedule types -
Database migration
002_add_scheduling_fields.pyfor adding scheduling columns and indexes -
Automatic execution mode detection: tasks with children execute in tree mode, tasks without children execute in single mode
-
Internal Scheduler
-
Built-in asyncio-based scheduler (
InternalScheduler) for standalone deployment -
Configurable poll interval, max concurrent tasks, task timeout, and user filtering
-
Scheduler lifecycle management: start, stop, pause, resume
-
Task completion callbacks for monitoring and integration
-
External Scheduler Gateway
-
WebhookGatewayfor HTTP webhook integration with external schedulers -
HMAC signature validation, IP filtering, and rate limiting
-
Helper functions for generating cron entries and Kubernetes CronJob manifests
-
Support for cron, Kubernetes CronJob, APScheduler, Temporal integration
-
Calendar Integration
-
ICalExporterfor exporting scheduled tasks in iCalendar format -
RRULE support for recurring events (daily, weekly, monthly, interval)
-
Calendar feed URL generation for subscription in Google Calendar, Outlook, etc.
-
Scheduler CLI Commands
-
apflow scheduler start- Start internal scheduler (foreground or background) -
apflow scheduler stop- Stop running scheduler -
apflow scheduler status- Show scheduler status -
apflow scheduler trigger- Manually trigger a task -
apflow scheduler export-ical- Export tasks to iCal format -
apflow scheduler webhook-url- Generate webhook URL for external schedulers -
Scheduling API Endpoints
-
tasks.scheduled.list- List all scheduled tasks -
tasks.scheduled.due- Get tasks due for execution -
tasks.scheduled.init- Initialize/recalculate next_run_at -
tasks.scheduled.complete- Complete scheduled run and calculate next execution -
tasks.webhook.trigger- Trigger task execution via webhook (JSON-RPC) -
POST /webhook/trigger/{task_id}- REST endpoint for external schedulers -
Repository Methods for Scheduling
-
get_due_scheduled_tasks()- Query tasks ready for execution -
get_scheduled_tasks()- List scheduled tasks with filters -
mark_scheduled_task_running()- Mark task as in-progress -
complete_scheduled_run()- Complete run and update scheduling state -
initialize_schedule()- Calculate initial next_run_at -
Added
schedulingoptional dependency withcroniter>=1.0.0 -
Added scheduling to
standardandallinstallation extras -
Comprehensive test coverage: 118 tests for scheduling functionality
Release 0.13.0
Added
-
GenerateExecutor Enhancements - Advanced Task Tree Generation System
-
Dual-mode generation system:
single_shot(fast) andmulti_phase(high-quality) modes -
Multi-phase CrewAI-based task generation with 4-phase specialization:
-
Phase 1: Requirement analysis - understand goals and constraints
-
Phase 2: Structure design - design correct task hierarchies with proper parent-child relationships
-
Phase 3: Input generation - fill task inputs matching executor schemas exactly
-
Phase 4: Review and validation - validate and auto-fix common issues
-
Schema formatter module (
schema_formatter.py) - provides accurate runtime executor schemas instead of outdated static documentation -
Principles extractor module (
principles_extractor.py) - extracts framework principles without code examples to guide LLM generation -
Enhanced validation system addressing three critical issues:
-
Schema compliance: validates all task inputs match executor schema definitions (required fields, types, constraints)
-
Root task patterns: enforces correct task hierarchy (multi-executor trees must have aggregator root)
-
Auto-fix mechanisms: automatically corrects multiple roots, invalid parent IDs, and schema mismatches
-
Comprehensive test coverage: 359 tests for GenerateExecutor features, multi-phase crew, schema formatting, and principles extraction
-
Documentation: detailed development guide (
docs/development/generate-executor-improvements.md) and enhanced examples -
Integration tests for schema-based task tree execution and generation, covering scrape_executor + llm_executor, scrape_executor + crewai_executor, and generate_executor flows (tests/integration/test_schema_based_execution.py).
-
Improved demo mode test coverage, including custom demo results, sleep scaling, and fallback logic (tests/core/test_demo_mode.py).
-
Enhanced TaskBuilder tests for input/output schema handling and multi-level dependencies (tests/core/test_task_builder.py).
-
More comprehensive failure handling tests for TaskManager, including all error types and re-execution (tests/core/execution/test_task_failure_handling.py).
-
Tests for hook context modification and persistence in pre_hook and post_hook scenarios (tests/core/storage/test_hook_modify_task_with_context.py).
-
Integration tests for TaskExecutor with custom and built-in tools (tests/core/execution/test_task_executor_tools_integration.py).
-
New
ScrapeExecutor(scrape_executor) for web content extraction and data scraping capabilities -
Extension scanner module (
src/apflow/core/extensions/scanner.py) for AST-based scanning of extension files -
Test coverage for extension scanner functionality (tests/core/test_extension_scanner.py)
-
New
APFLOW_EXTENSIONS_IDSenvironment variable for fine-grained control over extension ID-based access restrictions -
Documentation section on task data fields to clarify distinction between inputs, params, and result fields
-
CrewAI Dependency Data Injection Improvements
-
CrewaiExecutornow injects dependency outputs directly into CrewAI task templates and input variables, preventing missing-template-variable errors in complex workflows -
TaskManager executor instantiation path has been extended to pass structured dependency data into CrewAI-based executors for more reliable multi-phase generation
Changed
-
GenerateExecutor Improvements
-
Refactored task tree generation to use runtime executor schemas instead of static documentation, ensuring schema accuracy
-
Moved from single-shot generation to intelligent prompt building with principle extraction and schema formatting
-
Enhanced post-processing to ensure correct user_id handling and UUID validation
-
Improved error handling and validation with detailed logging for debugging
-
Added
generation_modeparameter to executor inputs for selecting between fast (single_shot) and high-quality (multi_phase) generation -
Refactored WebSocketExecutor to provide full input/output schema, error handling, and cancellation support (src/apflow/extensions/websocket/websocket_executor.py).
-
Refactored and cleaned up JSON-RPC API tests for clarity, conciseness, and modern style (tests/api/a2a/test_http_json_rpc.py).
-
Improved dummy executor and related test coverage for TaskBuilder (tests/core/test_task_builder.py).
-
Enhanced FailingExecutor and related tests for more robust error simulation (tests/core/execution/test_task_failure_handling.py).
-
Improved hook context usage and persistence in hook modification tests (tests/core/storage/test_hook_modify_task_with_context.py).
-
Expanded demo mode tests to cover more edge cases and sleep scaling (tests/core/test_demo_mode.py).
-
Improved schema-based execution tests for dependency mapping and fallback logic (tests/integration/test_schema_based_execution.py).
-
Enhanced extension management system with AST-based scanning and detailed configuration options
-
Improved extension loading control with executor ID-based restrictions for enhanced security
-
Enhanced documentation for CLI command extensions, overrides, and library usage patterns
-
Improved CrewAI-based generation dependency handling in TaskManager and
CrewaiExecutor, ensuring dependency data is consistently available for CrewAI tasks and multi-phase generation flows -
Enhanced
GenerateExecutorandSchemaFormatterwith executor exclusion support and lazy loading of multi-phase CrewAI components, reducing overhead when advanced generation features are not used
Fixed
- Fixed LLM-generated task trees not respecting executor schemas - now validates all inputs match schema definitions
- Fixed poor task tree structure issues - ensures correct root task patterns for multi-executor scenarios
- Fixed outdated documentation in prompts - now uses runtime schemas instead of static markdown docs
- Fixed single-shot LLM quality inconsistencies - added multi-phase mode with specialized crews for complex requirements
- Task failure handling and demo mode functionality improvements with enhanced error tracking and recovery mechanisms
- Improved
ExtensionScannerpath handling for nested project layouts and ensured multi-phase CrewAI tests are skipped cleanly when CrewAI is not installed, including corrected import paths forMultiPhaseGenerationCrew
Release 0.12.1
Added
- Implemented dependency validation and resolution utilities with corresponding unit tests
- Implemented user ownership validation for task linking and copying
- Added assertions for task_tree_id in TaskCreator tests
- Add project URLs for homepage and source in pyproject.toml
Changed
- Standardized parameter names in dependency validation functions and enhanced tests for task inclusion validation
- Updated circular dependency detection function signature and tests for consistency
- Refactored dependency validation and resolution logic for clarity and maintainability
- Remove unused imports from test files
- Update directory structure documentation for clarity and organization
- Simplified 'apflow serve' command usage in documentation
Fixed
- Improved dependency cycle and edge case handling in task linking/copying
Release 0.12.0
Added
-
Task Model Enhancements
-
Added
task_tree_idfield to TaskModel for managing task hierarchy and relationships -
Introduced
origin_typefield to track task origin (own, link, copy, reference, archive) -
Implemented
SchemaMigrationmodel to track migration history for schema evolution -
Added
has_referencesflag validation in task creation tests -
Executor Access Control System
-
Implemented executor access control via
APFLOW_EXTENSIONSenvironment variable -
Added functions to retrieve allowed executor IDs and filter available executors
-
Created new API endpoint (
/system/executors) to list available executors with restriction support -
Introduced CLI commands to list executors with various output formats (table, json, yaml)
-
Added permission checks in TaskManager to enforce executor access control during task execution
-
Comprehensive test coverage for executor permissions and API functionality
-
CLI Extension System Enhancements
-
Automatic Root Command Detection: All single functions registered via
@cli_registerare now automatically treated as root commands (e.g.,apflow version,apflow server --port 8000) -
Removed
root_commandparameter - no longer needed -
Functions are always root commands, classes are always groups
-
Simplified API:
@cli_register(name="hello")creates a root command automatically -
Group Extension Support: Added
groupparameter to@cli_registerdecorator for extending existing CLI groups -
Extend custom groups:
@cli_register(group="my-group", name="new-command") -
Extend built-in groups:
@cli_register(group="tasks", name="custom-action") -
Override subcommands:
@cli_register(group="my-group", name="existing", override=True) -
New
get_cli_group()Function: Convenient API for accessing and extending CLI groups -
Supports both registered extensions and built-in groups (tasks, config, etc.)
-
Usage:
group = get_cli_group("my-group"); @group.command() def new_cmd(): ... -
Clear error messages when group doesn't exist
-
Improved Override Behavior: Clear distinction between different override scenarios
-
name="my-group", override=True- Override entire group -
group="my-group", name="cmd", override=True- Override subcommand in group -
name="my-cmd", override=True- Override root command -
Comprehensive test coverage (8 tests) for all extension scenarios
-
CLI Documentation
-
Added comprehensive CLI documentation with configuration management guide (
cli/configuration.md) -
Created practical usage examples (
cli/examples.md) -
Developed detailed CLI usage guide covering installation, modes, and best practices (
cli.md) -
Introduced CLI documentation index for improved navigation
-
TaskCreator hanldeing different origin types
-
Added comprehensive tests for
TaskCreatormethods handling different origin types:
from_link,from_copy,from_archive, andfrom_mixedmethods. -
Removed create_task_copy* moethods
-
Includes test cases for single tasks, recursive trees, field overrides, dependency handling, and edge cases (error conditions, immutability).
Changed
-
TaskCreator Logic Refactoring
-
Refactored and clarified the logic for
from_link,from_copy,from_archive, andfrom_mixedmethods inTaskCreator. -
Improved type annotations, docstrings, and error handling for all task creation methods.
-
Enhanced dependency and subtree validation logic for recursive copy/link/archive operations.
-
Improved handling of parent/child relationships and task tree construction.
-
Updated internal helper methods for better maintainability and testability.
-
Extension Management Refactoring
-
Moved executor-related functions from
apflow.api.extensionstoapflow.core.extensions.managerfor better code organization -
Updated import paths across the entire codebase to reflect new structure
-
Enhanced TaskManager to load executors dynamically with permission checks
-
Improved on-demand extension loading for better performance and security
-
Decorator Override Logic
-
All
decorators.pyoverridelogic has been changed toforcelogic for consistency and clarity across the codebase. -
Task Execution Improvements
-
Enhanced task execution logic with improved error handling
-
Implemented priority grouping for better task scheduling
-
Optimized task tree retrieval using
task_tree_idwith fallback mechanism -
TaskRepository Refactored
-
Refactored task update methods in
TaskRepositoryfor improved maintainability and clarity. -
Use the method
task_update(self, task_id: str, **kwargs)instead of allupdate_task_*series functions. -
Refactored
TaskModeltoTaskModelTypeand enhanced task creation methods for better type safety and extensibility.
Fixed
- Database Schema Management
- Simplified TaskRepository initialization by removing custom column checks
- Added migration tests to ensure proper schema evolution and idempotent execution
- Improved database schema handling for more reliable operations
- Fixed edge cases in recursive copy/link/archive logic where tasks with external dependencies or disconnected subtrees could cause errors.
- Improved error messages for invalid task trees and dependency cycles.