Skip to content

Releases: aiperceivable/apflow

Release 0.18.2

28 Mar 01:11

Choose a tag to compare

Changed

  • Rebrand: aipartnerup → aiperceivable

Release 0.18.1

18 Feb 10:22

Choose a tag to compare

Added

  • Docker Support

  • Docker Compose configuration (docker-compose.yml) for easy deployment

  • Docker image definition (Dockerfile) for containerized apflow

  • .dockerignore file for optimized image builds

  • Enhanced GraphQL Testing

  • New test_loaders.py for GraphQL DataLoaders testing (task loading by ID and children)

  • Additional test coverage in test_mutations.py for execute_task mutation

  • Expanded test_queries.py with task tree and running tasks queries

  • Enhanced test_schema.py to verify TaskTreeType and TaskProgressEvent in schema

  • Added task progress subscriptions tests in test_subscriptions.py

  • Improved tests for distributed configuration in test_distributed_config.py and test_leader_election.py

  • Enhanced lease management tests with concurrent acquisition and validation

Changed

  • pyproject.toml: Updated apdev[dev] dependency to version 0.1.6 for improved compatibility
  • Documentation workflow: Updated GitHub Actions versions for consistency
  • Shared make_task_dict() helper function in conftest.py for consistent task dictionary creation in GraphQL tests

Fixed

  • PostgreSQL Driver Selection

  • Fixed normalize_postgresql_url() function to correctly select async/sync driver based on async_mode parameter

  • Ensures proper database connection handling for both sync and async contexts

  • Configuration Management

  • Fixed test_scheduler.py to properly patch load_cli_config in fixtures, preventing local config loading during tests

  • Enhanced runtime tests to handle cases when no task executor is configured

  • Documentation Workflow

  • Added workflow_dispatch trigger for manual documentation deployment

  • Fixed GitHub Actions workflow compatibility for documentation site generation

Release 0.18.0

16 Feb 13:41

Choose a tag to compare

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_support adding node, lease, and idempotency tables

  • Configuration via DistributedConfig with 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)

  • ProtocolAdapter base 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.py to 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.md and task-manager.md moved to docs/architecture/

  • Consolidated documentation from apflow-docs repo into apflow for 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 to main

  • New [docs] optional dependency group: mkdocs, mkdocs-material, mkdocs-mermaid2-plugin, mkdocs-minify-plugin, pymdown-extensions

Changed

  • pyproject.toml: Added graphql optional dependency group, added greenlet>=3.0.0 to postgres extras, added apdev[dev]>=0.1.2 to dev dependencies, included graphql in [all] extras, added [docs] optional dependency group
  • docs/README.md: Simplified to point to the live documentation site with local development instructions
  • .gitignore: Added site/ for MkDocs build output
  • api/app.py: Refactored to protocol registry pattern for mounting A2A, MCP, and GraphQL adapters
  • api/main.py: Updated startup to support distributed mode with --distributed flag
  • core/execution/task_executor.py: Added distributed-aware task execution with lease acquisition
  • core/storage/sqlalchemy/models.py: Extended with distributed node, lease, and idempotency models
  • core/config/registry.py: Added distributed configuration support

Fixed

  • Test mocking in test_multi_phase_crew.py: Added missing crewai.Agent and crewai.Task patches to prevent OPENAI_API_KEY errors in unit tests
  • Integration test test_scrape_crewai_chain_schema_based: Added api_keys_available fixture 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

13 Feb 01:25

Choose a tag to compare

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

  • ApflowError base class now supports structured format with what, why, how_to_fix, and context fields

  • Error messages include emoji indicators and formatted troubleshooting guidance

  • Backward compatible with existing error handling code

  • NetworkError and AuthenticationError classes 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.0 and psutil>=5.9.0 to 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

10 Feb 12:39

Choose a tag to compare

Fixed

  • CLI tasks scheduled complete passing unsupported result parameter to repository

  • complete_scheduled_run() does not accept a result parameter; removed the incorrect kwarg from the CLI direct-path call

  • CLI tasks count inefficient in-memory counting

  • Replaced query_tasks() + len() per-status loop (which loaded all records into memory) with new TaskRepository.count_tasks_by_status() using SELECT COUNT(*) SQL queries, matching the API's efficient implementation

Added

  • --error-message / -m option for apflow tasks cancel

  • Allows specifying a custom cancellation error message, consistent with the API error_message parameter

  • Defaults to "Cancelled by user" / "Force cancelled by user" when not provided

  • --calculate-next-run / --no-calculate-next-run option for apflow tasks scheduled complete

  • Controls whether next_run_at is recalculated after completing a scheduled run (default: True), consistent with the API calculate_next_run parameter

  • --before / -b option for apflow tasks scheduled due

  • Allows specifying a custom cutoff time (ISO datetime) to query due tasks, consistent with the API before parameter

  • Defaults to current UTC time when not provided

  • TaskRepository.count_tasks_by_status() method

  • Efficient SQL COUNT(*) grouped-by-status query with user_id and root_only filters

Removed

  • apflow tasks history CLI command
  • Removed non-functional stub command; underlying TaskRepository.get_task_history() and TaskModel.status_log were 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 roles as a list; added tests for role-claim handling

Release 0.15.0

08 Feb 09:07

Choose a tag to compare

Fixed

  • Scheduler webhook trigger admin permission bypass

  • handle_webhook_trigger now checks _is_admin(request) and sets user_id=None for 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 clears result, progress, and resets all child tasks to pending before the next scheduled run via reset_task_tree_for_reexecution()

  • Previously, a scheduled parent task would re-run but its children retained their completed status and stale results from the previous cycle, causing incorrect or skipped execution

  • ISO datetime 'Z' suffix parsing inconsistency

  • Added parse_iso_datetime() helper in core/utils/helpers.py that normalises the Z suffix before calling fromisoformat(), fixing compatibility with Python 3.10 and below

  • Replaced scattered datetime.fromisoformat(value.replace('Z', '+00:00')) calls across schedule_calculator.py, ical.py, tasks.py routes, 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 local jwt_secret from config.cli.yaml when admin_auth_token is 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 start locally

  • 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_hook decorator in public API (apflow.register_webhook_verify_hook) for tenant-level custom webhook verification

  • Hook receives WebhookVerifyContext (task_id, signature, timestamp, client_ip) and returns WebhookVerifyResult (valid, user_id, error)

  • Supports both sync and async hook functions

  • Added WebhookVerifyContext, WebhookVerifyResult dataclasses, and WebhookVerifyHook type alias in core/types.py

  • apflow scheduler list CLI 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 --verbose option

  • New --verbose / -v flag enables DEBUG-level logging for the scheduler process

  • Works in both foreground and background modes

  • tasks.scheduled.export-ical API endpoint

  • Export scheduled tasks as iCalendar format via JSON-RPC

  • Supports user_id, schedule_type, enabled_only, limit, calendar_name, and base_url parameters

  • Non-admin users can only export their own tasks; admin users can export all

  • Status filter for scheduled task queries

  • tasks.scheduled.list API endpoint and CLI command (apflow tasks scheduled list, apflow scheduler list) now accept --status / status parameter to filter by task status (e.g. pending, running, completed, failed)

  • TaskRepository.get_scheduled_tasks() updated with new status parameter

  • 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_hook for tenant-level custom verification → (3) APFLOW_WEBHOOK_SECRET for 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-WebhookGateway approach 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 via get_task_tree_for_api(), removing the has_children-based auto-detection of single vs tree mode

  • Dependency cascade is handled uniformly by execute_after_task regardless 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

07 Feb 01:19

Choose a tag to compare

Changed

  • Executor Schema Mechanism — Pydantic BaseModel with ClassVar

  • All built-in executors now declare input/output schemas as Pydantic BaseModel classes assigned via inputs_schema: ClassVar[type[BaseModel]] and outputs_schema: ClassVar[type[BaseModel]], replacing inline get_input_schema() / get_output_schema() method overrides

  • BaseTask.get_input_schema() and get_output_schema() are now implemented in the base class: they call model_json_schema() on the Pydantic model and resolve $ref references inline via resolve_schema_refs()

  • Subclasses no longer need to override get_input_schema() / get_output_schema() — just set the ClassVar

  • Both Pydantic BaseModel and legacy dict schemas are still supported (backward compatible)

  • Added resolve_schema_refs() helper in core/utils/helpers.py to inline $defs/$ref from 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 to POST /tasks

  • MCP adapter auto-generates all 15 tools from the capabilities registry via call_by_tool_name routing

  • Simplified A2A adapter: removed ~300 lines of CRUD bridging code from agent_executor.py and task_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/emails via httpx.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 with aiosmtplib>=3.0.0

  • Added email to [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 ScheduleType enum 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 ScheduleCalculator module for next execution time calculation across all schedule types

  • Database migration 002_add_scheduling_fields.py for 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

  • WebhookGateway for 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

  • ICalExporter for 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 scheduling optional dependency with croniter>=1.0.0

  • Added scheduling to standard and all installation extras

  • Comprehensive test coverage: 118 tests for scheduling functionality

Release 0.13.0

31 Jan 13:01

Choose a tag to compare

Added

  • GenerateExecutor Enhancements - Advanced Task Tree Generation System

  • Dual-mode generation system: single_shot (fast) and multi_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_IDS environment 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

  • CrewaiExecutor now 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_mode parameter 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 GenerateExecutor and SchemaFormatter with 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 ExtensionScanner path handling for nested project layouts and ensured multi-phase CrewAI tests are skipped cleanly when CrewAI is not installed, including corrected import paths for MultiPhaseGenerationCrew

Release 0.12.1

25 Jan 02:24

Choose a tag to compare

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

18 Jan 12:47

Choose a tag to compare

Added

  • Task Model Enhancements

  • Added task_tree_id field to TaskModel for managing task hierarchy and relationships

  • Introduced origin_type field to track task origin (own, link, copy, reference, archive)

  • Implemented SchemaMigration model to track migration history for schema evolution

  • Added has_references flag validation in task creation tests

  • Executor Access Control System

  • Implemented executor access control via APFLOW_EXTENSIONS environment 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_register are now automatically treated as root commands (e.g., apflow version, apflow server --port 8000)

  • Removed root_command parameter - 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 group parameter to @cli_register decorator 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 TaskCreator methods handling different origin types:
    from_link, from_copy, from_archive, and from_mixed methods.

  • 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, and from_mixed methods in TaskCreator.

  • 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.extensions to apflow.core.extensions.manager for 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.py override logic has been changed to force logic 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_id with fallback mechanism

  • TaskRepository Refactored

  • Refactored task update methods in TaskRepository for improved maintainability and clarity.

  • Use the method task_update(self, task_id: str, **kwargs) instead of all update_task_* series functions.

  • Refactored TaskModel to TaskModelType and 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.