refactor(mcp): extract order services into independent project

Remove Kingdee sync, business CLI/MCP tools, and internal order-query routing
now owned by the separate kingdee-orders-mcp project. Keep Wiki retrieval,
file assets and ingest available in code while its deployed service is off.
Retain legacy response fields with business access disabled, and document
migration ownership and rollback without exposing credentials or data.

Validation: 174 Wiki tests pass. Independent order service verified with
36 template parity checks, authenticated HTTP queries, and a real sync.
This commit is contained in:
Codex
2026-10-31 07:41:18 +00:00
parent 6c451c3eb6
commit 2396bd2d3e
25 changed files with 47 additions and 5793 deletions
+2 -20
View File
@@ -21,25 +21,7 @@ def load_user_ops():
class UserOpsTests(unittest.TestCase):
def test_kingdee_sync_forwards_to_business_cli(self):
user_ops = load_user_ops()
with patch.object(user_ops, "obsidian_cli_main", return_value=0) as cli_main:
status = user_ops.main(["kingdee", "sync", "--vault", "/data/vault", "--incremental"])
self.assertEqual(status, 0)
cli_main.assert_called_once_with(
["business", "sync", "kingdee", "--vault", "/data/vault", "--incremental"]
)
def test_timer_install_alias_installs_and_starts_business_timer(self):
user_ops = load_user_ops()
with patch.object(user_ops.manage_business_sync, "main", return_value=0) as timer_main:
status = user_ops.main(["timer", "install", "--vault", "/data/vault"])
self.assertEqual(status, 0)
timer_main.assert_called_once_with(["start", "--vault", "/data/vault"])
def test_mcp_commands_forward_to_mcp_service_manager(self):
user_ops = load_user_ops()
@@ -59,8 +41,8 @@ class UserOpsTests(unittest.TestCase):
self.assertEqual(status, 0)
text = output.getvalue()
self.assertIn("kingdee sync", text)
self.assertIn("timer install", text)
self.assertNotIn("kingdee sync", text)
self.assertNotIn("timer install", text)
self.assertIn("mcp start", text)