@timmy_hu/plugin-middleware 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "插件中间件",
3
3
  "code": "plugin-middleware",
4
- "version": "1.0.1",
5
- "description": "自动发现所有中间件类型插件,支持动态按需加载、卸载和状态查询,为智能体编排提供灵活的中间件管理能力。",
4
+ "version": "1.0.3",
5
+ "description": "自动发现 XpertAI 平台上所有已安装的中间件类型插件,展示加载状态,提供插件绑定指导和诊断工具。注意:插件需要在 XpertAI 平台 UI 中手动绑定到智能体。",
6
6
  "createdBy": "fpi",
7
7
  "platform": "http://10.161.48.53:3300",
8
8
  "category": "middleware",
@@ -9,69 +9,129 @@
9
9
  "loggedIn": true,
10
10
  "email": "hu_cao@fpi-inc.com",
11
11
  "platformUrl": "http://10.161.48.53:3300",
12
+ "organizationId": "a8313602-e2e2-4597-bf6d-f9b5e39b3b15",
12
13
  "tokenExpiry": "2026-07-07T11:00:00.000Z",
14
+ "cachedPlugins": 36,
15
+ "cachedMiddleware": 14,
13
16
  "message": "登录状态正常,token 有效"
14
17
  }
15
18
  },
16
19
  {
17
20
  "name": "list_middleware_plugins",
18
- "description": "列出所有已发现的中间件类型插件",
21
+ "description": "列出所有已安装的中间件类型插件",
19
22
  "input": { "filter": "all" },
20
23
  "expectedOutput": {
21
24
  "success": true,
22
- "total": 3,
25
+ "total": 14,
26
+ "totalAllPlugins": 36,
27
+ "totalMiddleware": 14,
28
+ "filter": "all",
23
29
  "plugins": [
24
- { "code": "weather-query", "name": "天气查询", "version": "1.0.0", "description": "查询城市天气信息", "status": "loaded", "loadedAt": "2026-07-07T10:00:00.000Z" },
25
- { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "version": "1.0.0", "description": "执行 PostgreSQL 数据库查询", "status": "available", "loadedAt": null }
30
+ {
31
+ "name": "echarts-generator",
32
+ "packageName": "@timmy_hu/echarts-generator",
33
+ "displayName": "ECharts图表生成器",
34
+ "version": "1.0.0",
35
+ "description": "根据输入的一组或多组数据生成ECharts图表配置",
36
+ "category": "middleware",
37
+ "loadStatus": "loaded",
38
+ "loadError": null,
39
+ "configurationStatus": "valid",
40
+ "canUninstall": true,
41
+ "effectiveInCurrentScope": true
42
+ },
43
+ {
44
+ "name": "@xpert-ai/plugin-web-tools",
45
+ "packageName": "@xpert-ai/plugin-web-tools",
46
+ "displayName": "@xpert-ai/plugin-web-tools",
47
+ "version": "0.0.3",
48
+ "description": "A middleware that provides web fetch and web search tools for agents.",
49
+ "category": "middleware",
50
+ "loadStatus": "loaded",
51
+ "loadError": null
52
+ }
26
53
  ]
27
54
  }
28
55
  },
29
56
  {
30
- "name": "load_middleware_plugin",
31
- "description": "动态加载指定的中间件插件",
32
- "input": { "pluginCode": "pg-query-tool" },
57
+ "name": "get_middleware_plugin_detail",
58
+ "description": "查询指定中间件插件的详细信息",
59
+ "input": { "pluginNameOrPackage": "echarts-generator" },
33
60
  "expectedOutput": {
34
61
  "success": true,
35
- "message": "插件 pg-query-tool 加载成功",
36
- "plugin": { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "version": "1.0.0", "loadedAt": "2026-07-07T10:05:00.000Z", "status": "loaded" }
62
+ "plugin": {
63
+ "name": "echarts-generator",
64
+ "packageName": "@timmy_hu/echarts-generator",
65
+ "displayName": "ECharts图表生成器",
66
+ "version": "1.0.0",
67
+ "description": "根据输入的一组或多组数据生成ECharts图表配置",
68
+ "loadStatus": "loaded",
69
+ "configurationStatus": "valid",
70
+ "components": []
71
+ }
37
72
  }
38
73
  },
39
74
  {
40
- "name": "unload_middleware_plugin",
41
- "description": "卸载已加载的中间件插件",
42
- "input": { "pluginCode": "pg-query-tool" },
75
+ "name": "install_middleware_plugin",
76
+ "description": "从 npm 安装新的中间件插件",
77
+ "input": { "packageName": "@timmy_hu/bulk-email-sender", "version": "1.0.1" },
43
78
  "expectedOutput": {
44
79
  "success": true,
45
- "message": "插件 pg-query-tool 已卸载",
46
- "plugin": { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "unloadedAt": "2026-07-07T10:10:00.000Z", "status": "unloaded" }
80
+ "message": "插件 @timmy_hu/bulk-email-sender 安装成功",
81
+ "installed": {
82
+ "name": "@timmy_hu/bulk-email-sender",
83
+ "packageName": "@timmy_hu/bulk-email-sender",
84
+ "version": "1.0.1",
85
+ "organizationId": "a8313602-e2e2-4597-bf6d-f9b5e39b3b15"
86
+ }
47
87
  }
48
88
  },
49
89
  {
50
- "name": "get_middleware_plugin_status",
51
- "description": "查询指定中间件插件的详细状态",
52
- "input": { "pluginCode": "weather-query" },
90
+ "name": "search_middleware_plugins",
91
+ "description": "按关键词搜索中间件插件",
92
+ "input": { "keyword": "email" },
53
93
  "expectedOutput": {
54
94
  "success": true,
55
- "plugin": { "code": "weather-query", "name": "天气查询", "version": "1.0.0", "description": "查询城市天气信息", "category": "middleware", "status": "loaded", "loadedAt": "2026-07-07T10:00:00.000Z", "tools": [], "configRequired": [] }
95
+ "keyword": "email",
96
+ "total": 1,
97
+ "plugins": [
98
+ {
99
+ "name": "@timmy_hu/bulk-email-sender",
100
+ "displayName": "批量邮件发送",
101
+ "version": "1.0.1",
102
+ "description": "为 XpertAI 智能体提供基于 SMTP 协议的批量邮件发送能力",
103
+ "loadStatus": "loaded"
104
+ }
105
+ ]
56
106
  }
57
107
  },
58
108
  {
59
- "name": "refresh_plugin_cache",
60
- "description": "刷新插件发现缓存",
109
+ "name": "get_plugin_statistics",
110
+ "description": "获取插件统计信息",
61
111
  "input": {},
62
- "expectedOutput": { "success": true, "message": "缓存已刷新,发现 5 个中间件插件", "total": 5, "refreshedAt": "2026-07-07T10:15:00.000Z" }
112
+ "expectedOutput": {
113
+ "success": true,
114
+ "statistics": {
115
+ "totalPlugins": 36,
116
+ "totalMiddleware": 14,
117
+ "byCategory": { "middleware": 14, "model": 10, "integration": 4, "database": 2, "tools": 2, "set": 3, "vector-store": 1 },
118
+ "middlewareByLoadStatus": { "loaded": 14 },
119
+ "updatableCount": 0,
120
+ "configErrorCount": 0,
121
+ "loadErrorCount": 0
122
+ }
123
+ }
63
124
  },
64
125
  {
65
- "name": "batch_load_middleware_plugins",
66
- "description": "批量加载多个中间件插件",
67
- "input": { "pluginCodes": ["weather-query", "pg-query-tool", "email-sender"] },
126
+ "name": "refresh_plugin_list",
127
+ "description": "刷新插件列表缓存",
128
+ "input": {},
68
129
  "expectedOutput": {
69
- "success": true, "total": 3, "loaded": 2, "alreadyLoaded": 1, "failed": 0,
70
- "results": [
71
- { "code": "weather-query", "status": "already_loaded", "success": true },
72
- { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "version": "1.0.0", "status": "loaded", "success": true },
73
- { "code": "email-sender", "name": "邮件发送", "version": "1.0.0", "status": "loaded", "success": true }
74
- ]
130
+ "success": true,
131
+ "message": "插件列表已刷新,共发现 36 个插件,其中 14 个中间件类型",
132
+ "totalPlugins": 36,
133
+ "totalMiddleware": 14,
134
+ "refreshedAt": "2026-07-07T10:15:00.000Z"
75
135
  }
76
136
  }
77
137
  ]