#305: nouvel agrégat durable ScheduledProjectTask dans domain (scheduled_task.rs, ids, ports ScheduledProjectTaskStore), source de vérité <app_data_dir>/scheduled-project-tasks/<projectId>.json, schedules bornés V1 interval/daily/weekly avec fuseau, cycle À approuver/Active/Suspendue avec approbation obligatoire des tâches demandées par agent; use cases application/scheduled_task (list/create/update/delete/run_now/reconcile/fire) réutilisant BackgroundTask pour les runs avec distinction planifié/manuel; store infrastructure dédié + scheduler reconcile au boot sans rattrapage en rafale, cwd confiné au projet; 7 tools MCP idea_scheduled_task_* (list/read lecture seule, create/update/delete/run_now/set_enabled write-actions soumises aux permissions natives); commandes Tauri + routes HTTP aux contrats DTO identiques (camelCase nextRunAtMs/lastRunAtMs/lastTaskId/createdBy/updatedBy); frontend: gateways Tauri/HTTP/mock + types ports/domain, surface projet 'Tâches planifiées' (liste utilisateur+agent unifiée, création/édition avec récapitulatif avant activation, approbation/refus, exécuter maintenant, suspendre/reprendre, suppression), catalogage surface web (webSurfaceCatalog/viewPlacement/ViewPanelBody/WebWorkspace); docs/scheduled-project-tasks.md et sdk docs/services.md (047c38b: pas un service plugin V1, pas d'émulation via cron système). #314: correction de 'Conversation liée — transcript indisponible' après reboot: restauration du transcript lié côté application (orchestrator service, lifecycle, session_limit, background sink, terminal registry) et côté frontend (adapters agent/http frames/stream/requestResponse, workStateNormalization, CustomAgentChatView avec état et action utile), tests dto_chat/agent_lifecycle/structured_registry_d1/background_completion_sink étendus. QA verte rapportée par QA sur feature/305-scheduled-project-tasks-mcp, sans bloquant, pour #305 et #314. Hors périmètre worktree: tickets non liés, attachments/, scripts/; aucun push.
32 lines
1.6 KiB
Markdown
32 lines
1.6 KiB
Markdown
# Scheduled project tasks
|
|
|
|
IdeA owns recurring project maintenance. Agents and users should use scheduled
|
|
project tasks instead of installing `cron`, `systemd` timers, or executable files
|
|
inside a repository.
|
|
|
|
Definitions are machine-local and persist in
|
|
`<app_data_dir>/scheduled-project-tasks/<projectId>.json`. They are distinct from
|
|
`BackgroundTask`: every manual or scheduled occurrence creates a new background
|
|
task carrying an `origin` (`manual` or `scheduled` with the definition id and
|
|
planned timestamp).
|
|
|
|
Scheduled runs use `RecordOnly`: their terminal state and output remain durable,
|
|
but a successful completion does not wake an agent or enqueue a completion
|
|
message.
|
|
|
|
V1 accepts only intervals of at least five minutes, daily `HH:mm`, and weekly
|
|
day/`HH:mm` schedules with an IANA timezone. Missed occurrences are skipped at
|
|
startup; only the next future occurrence is armed, and only while the project is
|
|
open. IdeA must be running to trigger tasks.
|
|
|
|
The MCP surface is `idea_scheduled_task_list`, `read`, `create`, `update`,
|
|
`delete`, `run_now`, and `set_enabled`. Read operations are allowed by the native
|
|
read policy; mutations are write actions. An agent-created or agent-modified
|
|
definition is always disabled and `pending` human approval. MCP enable cannot
|
|
grant that approval.
|
|
|
|
Commands persist no free-form environment. Their working directory is relative
|
|
to the project, checked lexically on write and canonically before every run to
|
|
reject symlink escapes. Runs use a deny-by-default OS sandbox: the project is the
|
|
only writable root and system toolchain paths are read/execute-only.
|