Skip to content

feat(scheduler): add list_tasks tool and /scheduler list slash command#1648

Merged
bug-ops merged 4 commits intomainfrom
scheduler-list-command
Mar 13, 2026
Merged

feat(scheduler): add list_tasks tool and /scheduler list slash command#1648
bug-ops merged 4 commits intomainfrom
scheduler-list-command

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 13, 2026

Summary

  • Adds list_tasks LLM tool to SchedulerExecutor — returns a formatted table of scheduled tasks (name, mode, kind, cron expression, next run time). Fenced block dispatch, feature-gated on scheduler.
  • Adds /scheduler list slash command in zeph-core that dispatches through the existing tool_executor — no new cross-crate dependency, no new Agent fields.
  • Adds list_jobs_full() to JobStore and a new ScheduledTaskInfo struct in zeph-scheduler.
  • /scheduler with no subcommand also lists tasks; unknown subcommands show help text.
  • TUI scheduler:list command was already present in the command palette; this PR wires up the backing tool it relies on.

Closes #1423.

Changes

File Change
crates/zeph-scheduler/src/store.rs ScheduledTaskInfo struct + list_jobs_full() + 2 tests
crates/zeph-scheduler/src/lib.rs re-export ScheduledTaskInfo
src/scheduler_executor.rs list_tasks tool (fenced block dispatch, tool_definitions 3→4, 3 tests)
crates/zeph-core/src/agent/scheduler_commands.rs new — /scheduler dispatch via tool_executor
crates/zeph-core/src/agent/mod.rs mod scheduler_commands + dispatch block (feature-gated)
crates/zeph-core/src/agent/slash_commands.rs /scheduler help entry (feature-gated)
crates/zeph-core/Cargo.toml scheduler = [] feature
Cargo.toml zeph-core/scheduler in scheduler feature

Test plan

  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 5193 tests pass (+161 vs v0.14.3)
  • cargo clippy --workspace --features full -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • Type /scheduler list in CLI — see formatted task table
  • Type /scheduler with no args — same table shown
  • Type /scheduler unknown — see help text
  • Type /scheduler list when scheduler not configured — graceful "Scheduler is not enabled" response

bug-ops added 3 commits March 13, 2026 17:37
Closes #1423.

Add a `list_tasks` tool to SchedulerExecutor that queries the scheduler
database and returns a formatted table of scheduled tasks (name, mode,
kind, cron expression, next run time). Add a `/scheduler list` slash
command that dispatches through the tool executor using the same
formatting path. Both are feature-gated behind `scheduler`.

- crates/zeph-scheduler: add ScheduledTaskInfo struct and list_jobs_full()
  to JobStore; re-export from lib.rs
- src/scheduler_executor.rs: add list_tasks tool (fenced block dispatch,
  tool_definitions count 3→4, 3 new tests)
- crates/zeph-core: add scheduler_commands.rs with /scheduler dispatch;
  wire into agent mod.rs and slash_commands.rs; declare scheduler feature
- Cargo.toml: propagate zeph-core/scheduler in scheduler feature
@github-actions github-actions Bot added enhancement New feature or request size/L Large PR (201-500 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate dependencies Dependency updates and removed size/L Large PR (201-500 lines) labels Mar 13, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 13, 2026 16:40
@bug-ops bug-ops merged commit 824c772 into main Mar 13, 2026
15 checks passed
@bug-ops bug-ops deleted the scheduler-list-command branch March 13, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing /scheduler list built-in command

1 participant