feat(cross-project): découverte et contact inter-projets — tools MCP idea_project_{list,read_context,list_agents,ask_agent,cancel_agent}, permission contactable par agent + default_contactable persistée dans les templates, routage orchestrator par projectId+agentId — #260 (tests ciblés verts, QA en attente)
This commit is contained in:
@ -109,6 +109,7 @@ impl FakeContexts {
|
||||
synced_template_version: None,
|
||||
skills: Vec::new(),
|
||||
effort: None,
|
||||
contactable: false,
|
||||
});
|
||||
id
|
||||
}
|
||||
@ -725,6 +726,12 @@ async fn tools_list_advertises_the_idea_tools_with_schemas() {
|
||||
let names: Vec<&str> = tools.iter().map(|t| t["name"].as_str().unwrap()).collect();
|
||||
|
||||
for expected in [
|
||||
// Cross-project agent control tools (#263).
|
||||
"idea_project_list",
|
||||
"idea_project_read_context",
|
||||
"idea_project_list_agents",
|
||||
"idea_project_ask_agent",
|
||||
"idea_project_cancel_agent",
|
||||
"idea_list_agents",
|
||||
"idea_ask_agent",
|
||||
"idea_ask_agents",
|
||||
@ -776,8 +783,8 @@ async fn tools_list_advertises_the_idea_tools_with_schemas() {
|
||||
assert!(!names.contains(&"idea_reply"));
|
||||
assert_eq!(
|
||||
tools.len(),
|
||||
37,
|
||||
"exactly the thirty-seven exposed idea_* tools; got {names:?}"
|
||||
47,
|
||||
"exactly the forty-seven exposed idea_* tools; got {names:?}"
|
||||
);
|
||||
|
||||
// Every tool advertises an object input schema.
|
||||
|
||||
@ -98,6 +98,7 @@ impl FakeContexts {
|
||||
synced_template_version: None,
|
||||
skills: Vec::new(),
|
||||
effort: None,
|
||||
contactable: false,
|
||||
});
|
||||
id
|
||||
}
|
||||
|
||||
@ -70,6 +70,7 @@ async fn save_then_get_and_list_roundtrip() {
|
||||
Some(McpToolPolicy {
|
||||
allowed_tools: vec!["idea_template_read".to_owned()],
|
||||
}),
|
||||
true,
|
||||
)
|
||||
.unwrap();
|
||||
store.save(&t).await.unwrap();
|
||||
@ -137,6 +138,7 @@ async fn index_is_camelcase_with_content_hash() {
|
||||
Some(McpToolPolicy {
|
||||
allowed_tools: vec!["idea_template_read".to_owned()],
|
||||
}),
|
||||
true,
|
||||
)
|
||||
.unwrap();
|
||||
store.save(&template).await.unwrap();
|
||||
@ -171,6 +173,10 @@ async fn index_is_camelcase_with_content_hash() {
|
||||
.and_then(|v| v.as_str()),
|
||||
Some("idea_template_read")
|
||||
);
|
||||
assert_eq!(
|
||||
entry.get("defaultContactable").and_then(|v| v.as_bool()),
|
||||
Some(true)
|
||||
);
|
||||
assert!(entry.get("content_hash").is_none(), "no snake_case leak");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user