feat(mcp): separate direct order queries from wiki tools
Add an opt-in business group with schema, template, guarded SQL, and status tools. Reuse existing order statistics through read-only SQLite connections without OpenCode or wiki retrieval. Add tools set for switching enabled groups with one restart. Gate file diagnostics with file-assets and document business-only operation while retaining the independent Kingdee sync task. Validation: 217 unit tests passed; business tool tests rerun after read-only annotations. Live authenticated MCP schema/status/template/SQL calls passed, ask_wiki was unavailable, uploads returned 404, and unauthenticated requests returned 401.
This commit is contained in:
@@ -1081,9 +1081,9 @@ class RemoteMcpServerTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(capabilities["server_name"], "wiki-file-assets")
|
||||
self.assertIn("server_version", capabilities)
|
||||
self.assertEqual(capabilities["schema_version"], 3)
|
||||
self.assertEqual(capabilities["capabilities_schema_version"], 3)
|
||||
self.assertEqual(capabilities["tools_version"], 3)
|
||||
self.assertEqual(capabilities["schema_version"], 4)
|
||||
self.assertEqual(capabilities["capabilities_schema_version"], 4)
|
||||
self.assertEqual(capabilities["tools_version"], 4)
|
||||
self.assertEqual(capabilities["enabled_tools"], ["file-assets", "ingest", "query"])
|
||||
self.assertIn("file_index", capabilities)
|
||||
self.assertIn("record_count", capabilities["file_index"])
|
||||
@@ -1755,7 +1755,7 @@ class RemoteMcpServerTests(unittest.TestCase):
|
||||
server = mcp_server.create_server(vault_path=Path(tmp), enable_file_assets=False)
|
||||
|
||||
self.assertIsInstance(server, FakeMCP)
|
||||
self.assertIn("file_index_status", FakeMCP.tool_names)
|
||||
self.assertNotIn("file_index_status", FakeMCP.tool_names)
|
||||
self.assertNotIn("search_file_assets", FakeMCP.tool_names)
|
||||
self.assertNotIn("list_file_assets", FakeMCP.tool_names)
|
||||
self.assertNotIn("get_file_asset_metadata", FakeMCP.tool_names)
|
||||
|
||||
Reference in New Issue
Block a user