storkit: merge 345_story_gemini_agent_backend_via_google_ai_api

This commit is contained in:
Dave
2026-03-20 22:51:16 +00:00
parent c930c537bc
commit 79ee6eb0dc
4 changed files with 849 additions and 4 deletions
+7
View File
@@ -1,6 +1,8 @@
mod claude_code;
mod gemini;
pub use claude_code::ClaudeCodeRuntime;
pub use gemini::GeminiRuntime;
use std::sync::{Arc, Mutex};
use tokio::sync::broadcast;
@@ -18,6 +20,9 @@ pub struct RuntimeContext {
pub prompt: String,
pub cwd: String,
pub inactivity_timeout_secs: u64,
/// Port of the storkit MCP server, used by API-based runtimes (Gemini, OpenAI)
/// to call back for tool execution.
pub mcp_port: u16,
}
/// Result returned by a runtime after the agent session completes.
@@ -85,6 +90,7 @@ mod tests {
prompt: "Do the thing".to_string(),
cwd: "/tmp/wt".to_string(),
inactivity_timeout_secs: 300,
mcp_port: 3001,
};
assert_eq!(ctx.story_id, "42_story_foo");
assert_eq!(ctx.agent_name, "coder-1");
@@ -93,6 +99,7 @@ mod tests {
assert_eq!(ctx.prompt, "Do the thing");
assert_eq!(ctx.cwd, "/tmp/wt");
assert_eq!(ctx.inactivity_timeout_secs, 300);
assert_eq!(ctx.mcp_port, 3001);
}
#[test]