fix(scheduler): initialize scheduler in ACP mode#1602
Merged
Conversation
Wire bootstrap_scheduler into the ACP code path so that the tick loop starts and the scheduler tool is available in ACP sessions (Zed, Helix, VS Code). - Extract init_scheduler() from bootstrap_scheduler in src/scheduler.rs: constructs JobStore, Scheduler, tick loop, and SchedulerExecutor without touching Agent<C>; bootstrap_scheduler remains a thin wrapper for runner.rs. - Add DynSchedulerExecutor(pub(crate) Arc<SchedulerExecutor>) in src/scheduler_executor.rs to allow Arc-wrapped sharing across ACP sessions. - Extend SharedAgentDeps with scheduler_executor / scheduler_update_tx / scheduler_custom_tx fields (all cfg(feature = "scheduler")). - Call init_scheduler() in build_acp_deps(); per-session receivers are distributed via broadcast_to_mpsc, matching the skill/config-reload pattern. - spawn_acp_agent() wires DynSchedulerExecutor into the tool executor chain and applies update/custom receivers to each session's agent. Closes #1599
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.
Summary
bootstrap_schedulerinto the ACP code path so that the scheduler tick loop starts and theschedulertool is available in ACP sessions (Zed, Helix, VS Code)init_scheduler()frombootstrap_schedulerto separate tick-loop/executor startup from Agent wiring;runner.rsis unchangedDynSchedulerExecutorwrapper forArc-based sharing across ACP sessionsbroadcast_to_mpscpattern (same as skill/config reload)Closes #1599
Test plan
cargo +nightly fmt --checkpassescargo clippy --workspace --features full -- -D warningspasses (0 warnings)cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 5136 passedschedulertool present in tool listschedulerskill fires on schedule