From 438be196c95763129525d68d19127b477a4ebdeb Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 24 Mar 2026 18:13:32 +0000 Subject: [PATCH] feat: scaffold creates per-transport bot.toml example files New projects now get bot.toml.matrix.example, bot.toml.whatsapp-meta.example, bot.toml.whatsapp-twilio.example, and bot.toml.slack.example in .storkit/ during scaffolding. Co-Authored-By: Claude Opus 4.6 (1M context) --- server/src/io/fs.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/server/src/io/fs.rs b/server/src/io/fs.rs index b55d237..d98a5f4 100644 --- a/server/src/io/fs.rs +++ b/server/src/io/fs.rs @@ -11,6 +11,13 @@ const KEY_KNOWN_PROJECTS: &str = "known_projects"; const STORY_KIT_README: &str = include_str!("../../../.storkit/README.md"); +const BOT_TOML_MATRIX_EXAMPLE: &str = include_str!("../../../.storkit/bot.toml.matrix.example"); +const BOT_TOML_WHATSAPP_META_EXAMPLE: &str = + include_str!("../../../.storkit/bot.toml.whatsapp-meta.example"); +const BOT_TOML_WHATSAPP_TWILIO_EXAMPLE: &str = + include_str!("../../../.storkit/bot.toml.whatsapp-twilio.example"); +const BOT_TOML_SLACK_EXAMPLE: &str = include_str!("../../../.storkit/bot.toml.slack.example"); + const STORY_KIT_CONTEXT: &str = "\n\ # Project Context\n\ \n\ @@ -467,6 +474,24 @@ fn scaffold_story_kit(root: &Path, port: u16) -> Result<(), String> { write_script_if_missing(&script_root.join("test"), &script_test_content)?; write_file_if_missing(&root.join("CLAUDE.md"), STORY_KIT_CLAUDE_MD)?; + // Write per-transport bot.toml example files so users can see all options. + write_file_if_missing( + &story_kit_root.join("bot.toml.matrix.example"), + BOT_TOML_MATRIX_EXAMPLE, + )?; + write_file_if_missing( + &story_kit_root.join("bot.toml.whatsapp-meta.example"), + BOT_TOML_WHATSAPP_META_EXAMPLE, + )?; + write_file_if_missing( + &story_kit_root.join("bot.toml.whatsapp-twilio.example"), + BOT_TOML_WHATSAPP_TWILIO_EXAMPLE, + )?; + write_file_if_missing( + &story_kit_root.join("bot.toml.slack.example"), + BOT_TOML_SLACK_EXAMPLE, + )?; + // Write .mcp.json at the project root so agents can find the MCP server. // Only written when missing — never overwrites an existing file, because // the port is environment-specific and must not clobber a running instance.