Commit Graph
4 Commits
Author SHA1 Message Date
Alessandro 9048880222 Catch up recurring scheduler tasks after downtime
Persist the schedule anchor and run overdue idle tasks once on the next tick, coalescing missed occurrences instead of relying on a one-minute lookback. Preserve pending work across ordinary edits, reset timing when schedules or states change, and carry the anchor through JSON, YAML and public serializers.

Recheck eligibility when claiming a run and keep one worker per task to prevent stale selections and repeated ticks from launching duplicates. Calculate cron delays in the task timezone across daylight-saving changes. Document disabled, failed and interrupted-task behavior in the scheduler and its skill.

Validate with 195 focused regression tests. In the live Docker stop/start test, the enabled marker-only task ran exactly once 93 seconds after its missed slot; the disabled task remained untouched, two extra ticks caused no replay, and existing tasks were unchanged.
2026-11-13 12:07:03 +01:00
Alessandro dbf6849c84 fix(scheduler): use Scheduled Tasks in modal and navigation
Align the scheduler modal title and sidebar dropdown label with the welcome screen Scheduled Tasks card. Update the scheduler documentation and plugin index to match.

Validation: 97 focused scheduler, timezone, tool contract, and WebUI extension tests passed. Confirmed the live instance serves the updated labels.
2026-11-01 20:13:55 +01:00
linkliti 6f079d8817 feat(plugins): move the tasks interface and scheduler task endpoints into the scheduler plugin
Move the scheduler CRUD endpoints, modals, styles, sidebar tasks list, and task row into the _scheduler plugin and drop the core tasks components. The sidebar hosts plugin sections through a neutral sidebar-extensions point inside the extensions-section container instead of a tasks-specific one, so other plugins can contribute sections there too. The scheduler and datepicker styles load through the plugin page-head extension instead of core index.html preloads, and the shared flatpickr preload stays in core. Repoint the header scheduler entry at the plugin modal path and update the api and plugins DOX indexes. Pin indicators follow the relocated task row and the pin test reads it from the plugin. The chats store and core chat behavior adopt the plugin task store idiom, and the ws client surface test expects the plugin store accessor. The modals and css DOX drop their core scheduler ownership and the scheduler plugin DOX indexes its sidebar and page-head extensions. The plugin manifest becomes always enabled with a broader description so the Tasks UI stays core behavior, and the scheduler editor test follows the moved endpoint and store paths.

Validation: pytest plugins/_pin_to_top/tests/test_pins.py tests/test_sidebar_row_actions.py tests/test_webui_extension_surfaces.py tests/test_ws_client_api_surface.py tests/test_webui_startup_assets.py::test_only_the_icon_guard_stylesheet_blocks_application_paint tests/test_chat_working_animation.py tests/test_scheduler_editor.py
2026-10-21 23:37:31 +03:00
linkliti 6f345d4ec6 feat(plugins): extract scheduler tool into _scheduler plugin
Move the scheduler tool, prompts, and DOX into a _scheduler plugin so agent-side scheduling ships as a standard plugin. Invalid task states and dedicated context values return repairable messages rendered from plugin prompt files, and a regression test covers the state response. Cron validation accepts range steps such as `1-5/2` alongside the existing patterns. The tool logs its message as its own `scheduler` type with an `icon://calendar_month Schedule: <action>` headline rendered through an SCH badge handler with slate accent styles from the waiting family shared with the hold badge. The Tasks UI and CRUD endpoints stay in core for now.

Validation: pytest tests/test_tool_action_contracts.py tests/test_scheduler_tool_ui.py
2026-10-21 19:04:33 +03:00