Skip to content

Release 0.14.0

Choose a tag to compare

@tercel tercel released this 07 Feb 01:19
· 83 commits to main since this release

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