Create an orchestrator with an explicit watcher (for testing). This allows injecting a mock or custom watcher instead of using the auto-detected one.
(
repo_root: impl Into<PathBuf>,
session_store: SessionStore,
watcher: Box<dyn FileWatcher>,
)
| 510 | /// This allows injecting a mock or custom watcher instead of using |
| 511 | /// the auto-detected one. |
| 512 | pub fn with_watcher( |
| 513 | repo_root: impl Into<PathBuf>, |
| 514 | session_store: SessionStore, |
| 515 | watcher: Box<dyn FileWatcher>, |
| 516 | ) -> Self { |
| 517 | Self { |
| 518 | repo_root: repo_root.into(), |
| 519 | session_store, |
| 520 | watcher, |
| 521 | agent_name: "unknown".to_string(), |
| 522 | agent_display_name: "Unknown Agent".to_string(), |
| 523 | agent_identity: None, |
| 524 | managed_run: None, |
| 525 | boundary_refusal: None, |
| 526 | journal_sink: None, |
| 527 | publication_lock_held: false, |
| 528 | session_view_coordinator: None, |
| 529 | } |
| 530 | } |
| 531 | |
| 532 | /// Set the agent identity for sessions created by this orchestrator. |
| 533 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected