@timmy_hu/plugin-middleware 1.0.0 → 1.0.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "插件中间件",
3
3
  "code": "plugin-middleware",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "自动发现所有中间件类型插件,支持动态按需加载、卸载和状态查询,为智能体编排提供灵活的中间件管理能力。",
6
6
  "createdBy": "fpi",
7
7
  "platform": "http://10.161.48.53:3300",
@@ -1,113 +1,72 @@
1
1
  {
2
2
  "tools": [
3
+ {
4
+ "name": "check_login_status",
5
+ "description": "检查当前平台登录状态",
6
+ "input": {},
7
+ "expectedOutput": {
8
+ "success": true,
9
+ "loggedIn": true,
10
+ "email": "hu_cao@fpi-inc.com",
11
+ "platformUrl": "http://10.161.48.53:3300",
12
+ "tokenExpiry": "2026-07-07T11:00:00.000Z",
13
+ "message": "登录状态正常,token 有效"
14
+ }
15
+ },
3
16
  {
4
17
  "name": "list_middleware_plugins",
5
18
  "description": "列出所有已发现的中间件类型插件",
6
- "input": {
7
- "filter": "all"
8
- },
19
+ "input": { "filter": "all" },
9
20
  "expectedOutput": {
10
21
  "success": true,
11
22
  "total": 3,
12
23
  "plugins": [
13
- {
14
- "code": "weather-query",
15
- "name": "天气查询",
16
- "version": "1.0.0",
17
- "description": "查询城市天气信息",
18
- "status": "loaded",
19
- "loadedAt": "2026-07-07T10:00:00.000Z"
20
- },
21
- {
22
- "code": "pg-query-tool",
23
- "name": "PostgreSQL 查询工具",
24
- "version": "1.0.0",
25
- "description": "执行 PostgreSQL 数据库查询",
26
- "status": "available",
27
- "loadedAt": null
28
- }
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 }
29
26
  ]
30
27
  }
31
28
  },
32
29
  {
33
30
  "name": "load_middleware_plugin",
34
31
  "description": "动态加载指定的中间件插件",
35
- "input": {
36
- "pluginCode": "pg-query-tool"
37
- },
32
+ "input": { "pluginCode": "pg-query-tool" },
38
33
  "expectedOutput": {
39
34
  "success": true,
40
35
  "message": "插件 pg-query-tool 加载成功",
41
- "plugin": {
42
- "code": "pg-query-tool",
43
- "name": "PostgreSQL 查询工具",
44
- "version": "1.0.0",
45
- "loadedAt": "2026-07-07T10:05:00.000Z",
46
- "status": "loaded"
47
- }
36
+ "plugin": { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "version": "1.0.0", "loadedAt": "2026-07-07T10:05:00.000Z", "status": "loaded" }
48
37
  }
49
38
  },
50
39
  {
51
40
  "name": "unload_middleware_plugin",
52
41
  "description": "卸载已加载的中间件插件",
53
- "input": {
54
- "pluginCode": "pg-query-tool"
55
- },
42
+ "input": { "pluginCode": "pg-query-tool" },
56
43
  "expectedOutput": {
57
44
  "success": true,
58
45
  "message": "插件 pg-query-tool 已卸载",
59
- "plugin": {
60
- "code": "pg-query-tool",
61
- "name": "PostgreSQL 查询工具",
62
- "unloadedAt": "2026-07-07T10:10:00.000Z",
63
- "status": "unloaded"
64
- }
46
+ "plugin": { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "unloadedAt": "2026-07-07T10:10:00.000Z", "status": "unloaded" }
65
47
  }
66
48
  },
67
49
  {
68
50
  "name": "get_middleware_plugin_status",
69
51
  "description": "查询指定中间件插件的详细状态",
70
- "input": {
71
- "pluginCode": "weather-query"
72
- },
52
+ "input": { "pluginCode": "weather-query" },
73
53
  "expectedOutput": {
74
54
  "success": true,
75
- "plugin": {
76
- "code": "weather-query",
77
- "name": "天气查询",
78
- "version": "1.0.0",
79
- "description": "查询城市天气信息",
80
- "category": "middleware",
81
- "status": "loaded",
82
- "loadedAt": "2026-07-07T10:00:00.000Z",
83
- "tools": [],
84
- "configRequired": []
85
- }
55
+ "plugin": { "code": "weather-query", "name": "天气查询", "version": "1.0.0", "description": "查询城市天气信息", "category": "middleware", "status": "loaded", "loadedAt": "2026-07-07T10:00:00.000Z", "tools": [], "configRequired": [] }
86
56
  }
87
57
  },
88
58
  {
89
59
  "name": "refresh_plugin_cache",
90
60
  "description": "刷新插件发现缓存",
91
61
  "input": {},
92
- "expectedOutput": {
93
- "success": true,
94
- "message": "缓存已刷新,发现 5 个中间件插件",
95
- "total": 5,
96
- "refreshedAt": "2026-07-07T10:15:00.000Z"
97
- }
62
+ "expectedOutput": { "success": true, "message": "缓存已刷新,发现 5 个中间件插件", "total": 5, "refreshedAt": "2026-07-07T10:15:00.000Z" }
98
63
  },
99
64
  {
100
65
  "name": "batch_load_middleware_plugins",
101
66
  "description": "批量加载多个中间件插件",
102
- "input": {
103
- "pluginCodes": ["weather-query", "pg-query-tool", "email-sender"]
104
- },
67
+ "input": { "pluginCodes": ["weather-query", "pg-query-tool", "email-sender"] },
105
68
  "expectedOutput": {
106
- "success": true,
107
- "total": 3,
108
- "loaded": 2,
109
- "alreadyLoaded": 1,
110
- "failed": 0,
69
+ "success": true, "total": 3, "loaded": 2, "alreadyLoaded": 1, "failed": 0,
111
70
  "results": [
112
71
  { "code": "weather-query", "status": "already_loaded", "success": true },
113
72
  { "code": "pg-query-tool", "name": "PostgreSQL 查询工具", "version": "1.0.0", "status": "loaded", "success": true },