refactor: 移除 SealAI 相关业务域、认证与文档
This commit is contained in:
1 parent
31c2a112de
commit
2085a97e34
13 files changed
-785
No files matched your search
@@ -9,9 +9,7 @@ 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 { createSealaiClient } from "./core/auth/sealai.js";
|
||||
import { AuthenticationError, EkbError, NotLoggedInError } from "./core/errors.js";
|
||||
import { sealaiTools } from "./domains/sealai/tools.js";
|
||||
import { platformTools } from "./domains/platform/tools.js";
|
||||
|
||||
const SwitchCorpSchema = z.object({
|
||||
@@ -84,12 +82,6 @@ async function main() {
|
||||
description: "切换到指定企业",
|
||||
inputSchema: (SwitchCorpSchema as any).toJSONSchema(),
|
||||
},
|
||||
// SealAI 工具
|
||||
...sealaiTools.map((t) => ({
|
||||
name: t.name,
|
||||
description: t.description,
|
||||
inputSchema: (t.parameters as any).toJSONSchema(),
|
||||
})),
|
||||
// Platform 工具
|
||||
...platformTools.map((t) => ({
|
||||
name: t.name,
|
||||
@@ -147,27 +139,6 @@ async function main() {
|
||||
}
|
||||
|
||||
try {
|
||||
// SealAI 工具
|
||||
const sealaiTool = sealaiTools.find((t) => t.name === name);
|
||||
if (sealaiTool) {
|
||||
const parsed = sealaiTool.parameters.safeParse(args);
|
||||
if (!parsed.success) {
|
||||
return {
|
||||
content: [{ type: "text", text: `参数错误: ${parsed.error.message}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
const client = await createSealaiClient(currentCorp);
|
||||
const result = await sealaiTool.handler(client, parsed.data as never);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: JSON.stringify(result, null, 2),
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
// Platform 工具
|
||||
const platformTool = platformTools.find((t) => t.name === name);
|
||||
|
||||
Reference in new issue
Block a user