Add scheduled automations#830
Open
dohooo wants to merge 9 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📄 Knowledge review✏️ Suggested updates3 page suggestions need review.
📝 04 - Backend Overview@@ -22,10 +22,17 @@
│ ├── git/ # Branch, commit, diff, push
│ ├── forge/ # GitHub integration, PRs
│ ├── scripts/ # Setup script execution
-│ └── terminal/ # PTY management
+│ ├── terminal/ # PTY management
+│ └── automation_commands.rs # Automation CRUD, control
├── models/ # SQLite data models
├── workspace/ # Workspace lifecycle, file ops, PR sync
├── agents/ # Agent orchestration
+├── automations/ # Scheduled recurring prompts
+│ ├── mod.rs # Reliability model, module doc
+│ ├── dispatch.rs # Fire automation runs via streaming engine
+│ ├── ops.rs # High-level CRUD operations
+│ ├── schedule.rs # Schedule spec parsing, next-run calculation
+│ └── scheduler.rs# 30-second poll loop, claim-and-dispatch
├── pipeline/ # Message streaming pipeline
├── sidecar.rs # Sidecar process management
└── db/ # Connection pooling, migrations
@@ -38,7 +45,7 @@
- **Write pool** — 1 connection to serialize mutations.
- All connections: WAL mode, 20 MiB cache, 256 MiB mmap.
-Core tables: `repos`, `workspaces`, `sessions`, `session_messages`, `settings`.
+Core tables: `repos`, `workspaces`, `sessions`, `session_messages`, `settings`, `automations`.
**Per-workspace locks** serialize filesystem mutations with database updates to prevent corruption when multiple operations target the same workspace.
@@ -52,6 +59,7 @@
- **Workspace lifecycle** — two-phase creation (fast DB insert + async worktree materialization), state transitions, archiving.
- **Session orchestration** — message persistence, stream locking, heartbeat timeout (45s), provider session resumption.
+- **Automations** — scheduled recurring prompts that run agent tasks at specified intervals, dispatched by a 30-second background scheduler tick. Automations can append to existing chats or create fresh sessions per run. The `automations` table stores automation records with schedule information, status (active/paused), `next_run_at`, and execution history.
- **Git operations** — worktree management, branching, diffing, commit, push.
- **Sidecar supervision** — spawn on first request, health monitoring, three-step shutdown ladder.
|
…d-tasks # Conflicts: # src-tauri/src/agents.rs # src-tauri/src/agents/persistence.rs # src-tauri/src/agents/streaming/mod.rs # src-tauri/src/pipeline/adapter/mod.rs # src-tauri/tests/common/builders.rs # src/features/panel/message-components/user-message.tsx
…d-tasks # Conflicts: # src-tauri/src/companion/rpc.rs
…odex-scheduled-tasks
- adapter/mod.rs: kimi_message ThreadMessageLike literal was missing the new `source` field added by the automations feature (E0063, clippy break). - marketing.css: reformat radial-gradient block to satisfy biome 2.4.16.
…odex-scheduled-tasks
…odex-scheduled-tasks
…ading deletes - Resume validation: refuse to reactivate automations pointing to deleted sessions/workspaces - Cascade deletes: session/workspace deletion cleans up dependent automations - Skip active session: workspace-mode automations no longer steal the user's active session - Frontend UI: interval picker component, automation detail panel, schedule management
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
helmor automationCLI commands plus Tauri IPC commands for listing, creating, updating, pausing/resuming, deleting, and running automations.Why
Automations let users schedule recurring prompts into existing chats or workspace-created sessions, so recurring background work can run without manually re-sending the same request.
Test notes
biome check --write --error-on-warnings --no-errors-on-unmatched --files-ignore-unknown=true --config-path=./biome.json.cargo fmt --manifest-path src-tauri/Cargo.toml --all.cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings.