storkit: merge 363_story_mcp_tool_for_whatsup_story_triage

This commit is contained in:
dave
2026-03-22 17:44:09 +00:00
parent 628b60ad15
commit 4262af7faa
2 changed files with 383 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ pub mod merge_tools;
pub mod qa_tools;
pub mod shell_tools;
pub mod story_tools;
pub mod whatsup_tools;
/// Returns true when the Accept header includes text/event-stream.
fn wants_sse(req: &Request) -> bool {
@@ -1121,6 +1122,20 @@ fn handle_tools_list(id: Option<Value>) -> JsonRpcResponse {
},
"required": ["worktree_path"]
}
},
{
"name": "whatsup",
"description": "Get a full triage dump for an in-progress story: front matter, AC checklist, active worktree/branch, git diff --stat since master, last 5 commits, and last 20 lines of the most recent agent log. Returns a clear error if the story is not in work/2_current/.",
"inputSchema": {
"type": "object",
"properties": {
"story_id": {
"type": "string",
"description": "Story identifier (filename stem, e.g. '42_story_my_feature')"
}
},
"required": ["story_id"]
}
}
]
}),
@@ -1209,6 +1224,8 @@ async fn handle_tools_call(
"git_add" => git_tools::tool_git_add(&args, ctx).await,
"git_commit" => git_tools::tool_git_commit(&args, ctx).await,
"git_log" => git_tools::tool_git_log(&args, ctx).await,
// Story triage
"whatsup" => whatsup_tools::tool_whatsup(&args, ctx).await,
_ => Err(format!("Unknown tool: {tool_name}")),
};
@@ -1324,7 +1341,8 @@ mod tests {
assert!(names.contains(&"git_add"));
assert!(names.contains(&"git_commit"));
assert!(names.contains(&"git_log"));
assert_eq!(tools.len(), 48);
assert!(names.contains(&"whatsup"));
assert_eq!(tools.len(), 49);
}
#[test]