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.