Skip to content

feat(triggers): event triggers Phase 1 — file watcher support#212

Merged
Shooksie merged 1 commit intomainfrom
feat/event-triggers-phase1
Apr 1, 2026
Merged

feat(triggers): event triggers Phase 1 — file watcher support#212
Shooksie merged 1 commit intomainfrom
feat/event-triggers-phase1

Conversation

@Shooksie
Copy link
Copy Markdown
Contributor

@Shooksie Shooksie commented Apr 1, 2026

Summary

  • Implements event triggers as a new event source alongside cron schedules (Issue Event triggers: GitHub webhooks, file watchers, Slack events #211)
  • Phase 1: file watcher triggers using notify crate with configurable debounce
  • Adds WorkflowTrigger/TriggerType config types, YAML parsing, validation
  • Integrates trigger dispatch into the daemon tick loop via TriggerState service
  • CLI scaffolding for ao trigger list/enable/disable
  • 668 lines across 26 files, zero test regressions, 6 new passing tests

Competitive Context

Cursor Automations, Claude Code /loop, and Devin self-scheduling all shipped event-driven triggers in March 2026. This restores AO's lead in the "persistent daemon" category.

Config Example

triggers:
  - id: on-file-change
    type: file_watcher
    workflow_ref: auto-test
    enabled: true
    config:
      paths: ["src/**/*.rs", "tests/**/*.rs"]
      debounce_secs: 5

Test plan

  • cargo check passes (full workspace)
  • cargo test -p orchestrator-config — 225 pass, 16 fail (all pre-existing on main)
  • cargo test -p orchestrator-daemon-runtime — 62 pass (+3 new), 1 fail (pre-existing)
  • cargo test -p orchestrator-core — 218 pass (+3 new, 1 pre-existing fixed), 1 fail (pre-existing)
  • CI checks

Next: Phase 2

Generic webhook triggers (HTTP) for GitHub, Slack, and custom integrations.

Closes #211 (Phase 1)

🤖 Generated with Claude Code

…rt (#211)

Add triggers as a new event source alongside cron schedules. Phase 1 implements:

- WorkflowTrigger and TriggerType config types with YAML parsing and validation
- File watcher trigger using notify crate with debounce support
- TriggerState service for pending event queue and deduplication
- Trigger dispatch engine integrated into daemon tick loop
- CLI trigger subcommand scaffolding (list, enable, disable)
- 6 new passing tests, zero regressions

Triggers are configured in .ao/workflows/*.yaml alongside schedules:
  triggers:
    - id: on-file-change
      type: file_watcher
      workflow_ref: auto-test
      config:
        paths: ["src/**/*.rs"]
        debounce_secs: 5

Phase 2 will add generic webhook (HTTP) triggers for GitHub/Slack integration.

Refs: #211

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Shooksie Shooksie merged commit 3a0d8c6 into main Apr 1, 2026
24 checks passed
@Shooksie Shooksie deleted the feat/event-triggers-phase1 branch April 1, 2026 10:01
This was referenced Apr 8, 2026
Shooksie added a commit that referenced this pull request Apr 8, 2026
…rt (#211) (#212)

Add triggers as a new event source alongside cron schedules. Phase 1 implements:

- WorkflowTrigger and TriggerType config types with YAML parsing and validation
- File watcher trigger using notify crate with debounce support
- TriggerState service for pending event queue and deduplication
- Trigger dispatch engine integrated into daemon tick loop
- CLI trigger subcommand scaffolding (list, enable, disable)
- 6 new passing tests, zero regressions

Triggers are configured in .ao/workflows/*.yaml alongside schedules:
  triggers:
    - id: on-file-change
      type: file_watcher
      workflow_ref: auto-test
      config:
        paths: ["src/**/*.rs"]
        debounce_secs: 5

Phase 2 will add generic webhook (HTTP) triggers for GitHub/Slack integration.

Refs: #211

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event triggers: GitHub webhooks, file watchers, Slack events

1 participant