story-kit: merge 208_bug_project_scaffold_does_not_write_mcp_json_to_project_root

This commit is contained in:
Dave
2026-02-26 14:57:14 +00:00
parent 0be7bcd8ae
commit 17fd3b2dc2
4 changed files with 45 additions and 5 deletions

View File

@@ -37,12 +37,15 @@ async fn main() -> Result<(), std::io::Error> {
JsonFileStore::from_path(PathBuf::from("store.json")).map_err(std::io::Error::other)?,
);
let port = resolve_port();
// Auto-detect a .story_kit/ project in cwd or parent directories.
if let Some(project_root) = find_story_kit_root(&cwd) {
io::fs::open_project(
project_root.to_string_lossy().to_string(),
&app_state,
store.as_ref(),
port,
)
.await
.unwrap_or_else(|e| {
@@ -59,7 +62,6 @@ async fn main() -> Result<(), std::io::Error> {
}
let workflow = Arc::new(std::sync::Mutex::new(WorkflowState::default()));
let port = resolve_port();
// Filesystem watcher: broadcast channel for work/ pipeline changes.
// Created before AgentPool so the pool can emit AgentStateChanged events.