feat(platform): 实现工作流工具(workflow_list/stats/charge/detail)
- platform_workflow_list: 列出指定自建应用下的工作流(EASO) - platform_workflow_stats: 获取工作流统计信息(EASO) - platform_workflow_charge: 查询企业工作流用量配额(EASO) - platform_workflow_detail: 获取工作流详情(Piper) - 简化 EASO 客户端签名,移除冗余的 corpId 返回 - 更新 tsconfig.json 添加 types: ["node"] - 更新 README.md 工具清单
This commit is contained in:
1 parent
f9eb6a4844
commit
b7bdb39f56
6 files changed
+58
-39
No files matched your search
+10
-14
@@ -57,6 +57,11 @@ async function main() {
|
||||
inputSchema: zodToJsonSchema(t.parameters as any),
|
||||
})),
|
||||
// Platform 工具
|
||||
{
|
||||
name: "platform_list",
|
||||
description: "列出企业下所有启用的自建应用",
|
||||
inputSchema: { type: "object", properties: {} },
|
||||
},
|
||||
...platformTools.map((t) => ({
|
||||
name: t.name,
|
||||
description: t.description,
|
||||
@@ -133,20 +138,11 @@ async function main() {
|
||||
};
|
||||
}
|
||||
|
||||
if (name === "platform_workflow_list") {
|
||||
const { platformId, page, pageSize } = args as {
|
||||
platformId: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
};
|
||||
const { client, corpId } = await getEasoClient(currentCorp);
|
||||
const result = await platformApi.listWorkflows(
|
||||
client,
|
||||
corpId,
|
||||
platformId,
|
||||
page,
|
||||
pageSize
|
||||
);
|
||||
// Platform 工作流工具(EASO)
|
||||
const easoTool = platformTools.find((t) => t.name === name);
|
||||
if (easoTool) {
|
||||
const { client } = await getEasoClient(currentCorp);
|
||||
const result = await easoTool.handler(client, args as never);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user