refactor(core): 全量语义化客户端迁移并移除历史兼容桥接层

This commit is contained in:
gitea committed 2026-09-17 15:44:25 +08:00
1 parent 29ac24248e
commit d0f3d2738a
34 files changed
+89 -141

No files matched your search

+6 -7
View File
@@ -5,8 +5,7 @@ import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { loadCorpConfigs } from "./core/config/loader.js";
import { CorpContext } from "./core/config/manager.js";
import { createEkbClient } from "./core/auth/ekb.js";
import { getEasoClient } from "./core/auth/easo.js";
import { createSessionClient, getUnityClient } from "./core/http/index.js";
import { AuthenticationError, EkbError, NotLoggedInError } from "./core/errors.js";
import { authTools } from "./core/auth/tools.js";
import { platformTools } from "./domains/platform/tools.js";
@@ -344,10 +343,10 @@ export function createServer(options: { mode?: HoseMcpMode; enabled?: boolean }
isError: true,
};
}
const ekbClient = await createEkbClient(currentCorp);
const { client: easoClient } = await getEasoClient(currentCorp);
const sessionClient = await createSessionClient(currentCorp);
const { client: unityClient } = await getUnityClient(currentCorp);
const result = await platformTool.handler(
{ corp: currentCorp, ekbClient, easoClient },
{ corp: currentCorp, ekbClient: sessionClient, easoClient: unityClient },
parsed.data as never
);
return {
@@ -370,9 +369,9 @@ export function createServer(options: { mode?: HoseMcpMode; enabled?: boolean }
isError: true,
};
}
const ekbClient = await createEkbClient(currentCorp);
const sessionClient = await createSessionClient(currentCorp);
const result = await datalinkTool.handler(
{ corp: currentCorp, ekbClient },
{ corp: currentCorp, ekbClient: sessionClient },
parsed.data as never
);
return {