feat(mcp): enforce spec-compliant tool registry
- Reject dotted tool identifiers during registration and remove alias-backed lookups. - Drop web.search compatibility, normalize all code/tests around the canonical web_search name, and update consent/session logic. - Harden CLI toggles to manage the spec-compliant identifier and ensure MCP configs shed non-compliant entries automatically. Acceptance Criteria: - Tool registry denies invalid identifiers by default and no alias codepaths remain. Test Notes: - cargo check -p owlen-core (tests unavailable in sandbox).
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
use owlen_cli::agent::{AgentConfig, AgentExecutor, LlmResponse};
|
||||
use owlen_core::mcp::remote_client::RemoteMcpClient;
|
||||
use owlen_core::tools::WEB_SEARCH_TOOL_NAME;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[tokio::test]
|
||||
@@ -27,7 +28,7 @@ async fn test_react_parsing_tool_call() {
|
||||
arguments,
|
||||
}) => {
|
||||
assert_eq!(thought, "I should search for information");
|
||||
assert_eq!(tool_name, "web_search");
|
||||
assert_eq!(tool_name.as_str(), WEB_SEARCH_TOOL_NAME);
|
||||
assert_eq!(arguments["query"], "rust async programming");
|
||||
}
|
||||
other => panic!("Expected ToolCall, got: {:?}", other),
|
||||
|
||||
Reference in New Issue
Block a user