cloudcc-cli 2.2.6 → 2.2.7
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.
- package/.cloudcc-cache.json +24 -20
- package/README.md +12 -0
- package/bin/cc.js +7 -0
- package/java/com/cloudcc/core/BaseException.java +100 -0
- package/java/com/cloudcc/core/BusiException.java +43 -0
- package/java/com/cloudcc/core/CCService.java +3 -1
- package/java/com/cloudcc/core/StringUtils.java +7 -0
- package/java/com/cloudcc/core/TimeUtil.java +33 -0
- package/java/com/cloudcc/core/UserInfo.java +9 -0
- package/package.json +7 -1
- package/pom.xml +1 -1
- package/skill/BACKEND_CODE.md +114 -0
- package/skill/CLI_CHEATSHEET.md +90 -0
- package/skill/INSTALL_AND_BOOTSTRAP.md +59 -0
- package/skill/OBJECTS_AND_FIELDS.md +120 -0
- package/skill/REQUIREMENTS_BREAKDOWN.md +98 -0
- package/skill/SKILL.md +33 -0
- package/skill/VUE_CUSTOM_COMPONENT.md +50 -0
- package/src/api/backend-sdk-java.md +427 -0
- package/src/api/ccdk-sdk.md +1039 -0
- package/src/classes/doc.js +486 -0
- package/src/classes/index.js +1 -0
- package/src/mcp/cliRunner.js +61 -0
- package/src/mcp/index.js +41 -3
- package/src/mcp/tools/Application Creator/handler.js +7 -9
- package/src/mcp/tools/Approval/handler.js +34 -151
- package/src/mcp/tools/Class Creator/handler.js +18 -15
- package/src/mcp/tools/Class Detail Retriever/handler.js +8 -9
- package/src/mcp/tools/Class Editor Guide/handler.js +5 -19
- package/src/mcp/tools/Class List Retriever/handler.js +8 -3
- package/src/mcp/tools/Class Publisher/handler.js +7 -9
- package/src/mcp/tools/Class Puller/handler.js +6 -65
- package/src/mcp/tools/Client Script Detail Retriever/handler.js +12 -18
- package/src/mcp/tools/Client Script Editor Guide/handler.js +9 -605
- package/src/mcp/tools/Client Script List Retriever/handler.js +30 -33
- package/src/mcp/tools/Client Script Publisher/handler.js +12 -11
- package/src/mcp/tools/Client Script Puller/handler.js +23 -30
- package/src/mcp/tools/CloudCC Development Overview/handler.js +11 -5
- package/src/mcp/tools/Component Creator/handler.js +12 -11
- package/src/mcp/tools/Component Detail Retriever/handler.js +12 -9
- package/src/mcp/tools/Component Editor Guide/handler.js +5 -22
- package/src/mcp/tools/Component List Retriever/handler.js +21 -18
- package/src/mcp/tools/Component Publisher/handler.js +25 -3
- package/src/mcp/tools/Component Puller/handler.js +13 -16
- package/src/mcp/tools/Dev Environment Creator/handler.js +5 -72
- package/src/mcp/tools/Dev Environment Validator/handler.js +5 -66
- package/src/mcp/tools/Developer Key Setup Guide/handler.js +11 -20
- package/src/mcp/tools/JSP Migrator/handler.js +842 -0
- package/src/mcp/tools/Menu Creator/handler.js +7 -30
- package/src/mcp/tools/Object Creator/handler.js +14 -6
- package/src/mcp/tools/Object Fields Creator/handler.js +9 -10
- package/src/mcp/tools/Object Fields Retriever/handler.js +6 -3
- package/src/mcp/tools/Object List Retriever/handler.js +10 -7
- package/src/mcp/tools/Scheduled Class Creator/handler.js +12 -16
- package/src/mcp/tools/Scheduled Class Detail Retriever/handler.js +7 -9
- package/src/mcp/tools/Scheduled Class List Retriever/handler.js +21 -23
- package/src/mcp/tools/Scheduled Class Publisher/handler.js +7 -9
- package/src/mcp/tools/Scheduled Class Puller/handler.js +6 -70
- package/src/mcp/tools/Trigger Creator/handler.js +12 -20
- package/src/mcp/tools/Trigger Detail Retriever/handler.js +7 -9
- package/src/mcp/tools/Trigger Editor Guide/handler.js +10 -35
- package/src/mcp/tools/Trigger List Retriever/handler.js +12 -4
- package/src/mcp/tools/Trigger Publisher/handler.js +8 -11
- package/src/mcp/tools/Trigger Puller/handler.js +12 -17
- package/src/plugin/doc.js +801 -0
- package/src/plugin/index.js +1 -0
- package/src/project/doc.js +378 -0
- package/src/project/index.js +1 -0
- package/src/script/doc.js +259 -0
- package/src/script/index.js +1 -0
- package/src/timer/index.js +1 -0
- package/src/triggers/doc.js +342 -0
- package/src/triggers/index.js +5 -0
- package/target/classes/com/cloudcc/core/BaseException.class +0 -0
- package/target/classes/com/cloudcc/core/BusiException.class +0 -0
- package/target/classes/com/cloudcc/core/CCService.class +0 -0
- package/target/classes/com/cloudcc/core/StringUtils.class +0 -0
- package/target/classes/com/cloudcc/core/TimeUtil.class +0 -0
- package/target/classes/com/cloudcc/core/UserInfo.class +0 -0
- package/template/lib/ccopenapi-0.0.4.jar +0 -0
- package/test/application.cli.test.js +30 -0
- package/test/classes.cli.test.js +121 -0
- package/test/fields.cli.test.js +69 -0
- package/test/mcp.cli.test.js +21 -0
- package/test/menu.cli.test.js +41 -0
- package/test/object.cli.test.js +64 -0
- package/test/plugin.cli.test.js +109 -0
- package/test/script.cli.test.js +101 -0
- package/test/timer.cli.test.js +107 -0
- package/test/trigger.cli.test.js +146 -0
- package/.vscode/settings.json +0 -3
- package/bin/mcp-svc.js +0 -13
- package/src/mcp/MCP/345/234/272/346/231/257/346/250/241/346/213/237.md +0 -8
- package/src/mcp/index-sse-svc.js +0 -126
- package/src/mcp/index-streamable-svc.js +0 -180
- package/src/mcp/tools/Class Detail Retriever/prompt.js +0 -37
- package/src/mcp/tools/Class Editor Guide/prompt.js +0 -468
- package/src/mcp/tools/Class Publisher/prompt.js +0 -40
- package/src/mcp/tools/Class Puller/prompt.js +0 -49
- package/src/mcp/tools/Client Script Creator/handler.js +0 -179
- package/src/mcp/tools/CloudCC Development Overview/prompt.js +0 -871
- package/src/mcp/tools/Component Editor Guide/prompt.js +0 -519
- package/src/mcp/tools/Component Publisher/prompt.js +0 -659
- package/src/mcp/tools/Dev Environment Creator/prompt.js +0 -273
- package/src/mcp/tools/Dev Environment Validator/prompt.js +0 -193
- package/src/mcp/tools/Developer Key Setup Guide/prompt.js +0 -71
- package/src/mcp/tools/Object Fields Retriever/prompt.js +0 -10
- package/src/mcp/tools/Object List Retriever/prompt.js +0 -10
- package/src/mcp/tools/ccdk/fetcher.js +0 -18
- package/src/mcp/tools/ccdk/handler.js +0 -98
- package/src/mcp/tools/ccdk/prompt.js +0 -453
- package/target/ccopenapi-0.0.3-classes.jar +0 -0
- package/target/ccopenapi-0.0.3.jar +0 -0
- package/target/maven-archiver/pom.properties +0 -3
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +0 -18
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +0 -19
- package/template/lib/ccopenapi-0.0.3.jar +0 -0
package/src/mcp/index-sse-svc.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SSE 版本的 MCP 服务器实现
|
|
3
|
-
* 基于 MCP 协议版本 2024-11-05 (已弃用,主要用于向后兼容测试)
|
|
4
|
-
*
|
|
5
|
-
* 服务器暴露两个端点:
|
|
6
|
-
* - GET /mcp: 用于建立 SSE 流
|
|
7
|
-
* - POST /messages: 用于接收客户端消息
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const { McpServer } = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
11
|
-
const { SSEServerTransport } = require("@modelcontextprotocol/sdk/server/sse.js");
|
|
12
|
-
const { createMcpExpressApp } = require("@modelcontextprotocol/sdk/server/express.js");
|
|
13
|
-
const { registerAllTools } = require('./tools/index.js');
|
|
14
|
-
const MCP_PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 8018;
|
|
15
|
-
|
|
16
|
-
// 获取服务器实例(单例模式)
|
|
17
|
-
let mcpServerInstance = null;
|
|
18
|
-
function getServer() {
|
|
19
|
-
if (!mcpServerInstance) {
|
|
20
|
-
mcpServerInstance = new McpServer({
|
|
21
|
-
name: 'cctool',
|
|
22
|
-
version: '1.0.0'
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// 注册所有工具
|
|
26
|
-
registerAllTools(mcpServerInstance);
|
|
27
|
-
}
|
|
28
|
-
return mcpServerInstance;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const app = createMcpExpressApp();
|
|
32
|
-
|
|
33
|
-
// 按 session ID 存储 transports
|
|
34
|
-
const transports = {};
|
|
35
|
-
|
|
36
|
-
// SSE 端点:用于建立 SSE 流
|
|
37
|
-
app.get('/mcp', async (req, res) => {
|
|
38
|
-
console.log('Received GET request to /mcp (establishing SSE stream)');
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
// 为客户端创建新的 SSE transport
|
|
42
|
-
// POST 消息的端点是 '/messages'
|
|
43
|
-
const transport = new SSEServerTransport('/messages', res);
|
|
44
|
-
|
|
45
|
-
// 按 session ID 存储 transport
|
|
46
|
-
const sessionId = transport.sessionId;
|
|
47
|
-
transports[sessionId] = transport;
|
|
48
|
-
|
|
49
|
-
// 设置 onclose 处理器,在关闭时清理 transport
|
|
50
|
-
transport.onclose = () => {
|
|
51
|
-
console.log(`SSE transport closed for session ${sessionId}`);
|
|
52
|
-
delete transports[sessionId];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// 将 transport 连接到 MCP 服务器
|
|
56
|
-
const server = getServer();
|
|
57
|
-
await server.connect(transport);
|
|
58
|
-
|
|
59
|
-
console.log(`Established SSE stream with session ID: ${sessionId}`);
|
|
60
|
-
} catch (error) {
|
|
61
|
-
console.error('Error establishing SSE stream:', error);
|
|
62
|
-
if (!res.headersSent) {
|
|
63
|
-
res.status(500).send('Error establishing SSE stream');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// 消息端点:用于接收客户端 JSON-RPC 请求
|
|
69
|
-
app.post('/messages', async (req, res) => {
|
|
70
|
-
console.log('Received POST request to /messages');
|
|
71
|
-
|
|
72
|
-
// 从 URL query 参数中提取 session ID
|
|
73
|
-
// 在 SSE 协议中,这是客户端根据端点事件添加的
|
|
74
|
-
const sessionId = req.query.sessionId;
|
|
75
|
-
|
|
76
|
-
if (!sessionId) {
|
|
77
|
-
console.error('No session ID provided in request URL');
|
|
78
|
-
res.status(400).send('Missing sessionId parameter');
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const transport = transports[sessionId];
|
|
83
|
-
if (!transport) {
|
|
84
|
-
console.error(`No active transport found for session ID: ${sessionId}`);
|
|
85
|
-
res.status(404).send('Session not found');
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
// 使用 transport 处理 POST 消息
|
|
91
|
-
await transport.handlePostMessage(req, res, req.body);
|
|
92
|
-
} catch (error) {
|
|
93
|
-
console.error('Error handling request:', error);
|
|
94
|
-
if (!res.headersSent) {
|
|
95
|
-
res.status(500).send('Error handling request');
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
// 启动服务器
|
|
101
|
-
app.listen(MCP_PORT, error => {
|
|
102
|
-
if (error) {
|
|
103
|
-
console.error('Failed to start server:', error);
|
|
104
|
-
process.exit(1);
|
|
105
|
-
}
|
|
106
|
-
console.log(`Simple SSE Server (deprecated protocol version 2024-11-05) listening on port ${MCP_PORT}`);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// Handle server shutdown
|
|
110
|
-
process.on('SIGINT', async () => {
|
|
111
|
-
console.log('Shutting down server...');
|
|
112
|
-
|
|
113
|
-
// Close all active transports to properly clean up resources
|
|
114
|
-
for (const sessionId in transports) {
|
|
115
|
-
try {
|
|
116
|
-
console.log(`Closing transport for session ${sessionId}`);
|
|
117
|
-
await transports[sessionId].close();
|
|
118
|
-
delete transports[sessionId];
|
|
119
|
-
} catch (error) {
|
|
120
|
-
console.error(`Error closing transport for session ${sessionId}:`, error);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
console.log('Server shutdown complete');
|
|
124
|
-
process.exit(0);
|
|
125
|
-
});
|
|
126
|
-
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
const { randomUUID } = require('node:crypto');
|
|
2
|
-
const { McpServer } = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
3
|
-
const { StreamableHTTPServerTransport } = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
4
|
-
const { createMcpExpressApp } = require("@modelcontextprotocol/sdk/server/express.js");
|
|
5
|
-
const { isInitializeRequest } = require("@modelcontextprotocol/sdk/types.js");
|
|
6
|
-
const { InMemoryEventStore } = require("@modelcontextprotocol/sdk/examples/shared/inMemoryEventStore.js");
|
|
7
|
-
const { registerAllTools } = require('./tools/index.js');
|
|
8
|
-
const MCP_PORT = process.env.MCP_PORT ? parseInt(process.env.MCP_PORT, 10) : 8018;
|
|
9
|
-
|
|
10
|
-
// 获取服务器实例(单例模式)
|
|
11
|
-
|
|
12
|
-
let mcpServerInstance = null;
|
|
13
|
-
function getServer() {
|
|
14
|
-
if (!mcpServerInstance) {
|
|
15
|
-
mcpServerInstance = new McpServer({
|
|
16
|
-
name: 'cctool',
|
|
17
|
-
version: '1.0.0'
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// 注册所有工具
|
|
21
|
-
registerAllTools(mcpServerInstance);
|
|
22
|
-
}
|
|
23
|
-
return mcpServerInstance;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const app = createMcpExpressApp();
|
|
27
|
-
|
|
28
|
-
// Map to store transports by session ID
|
|
29
|
-
const transports = {};
|
|
30
|
-
|
|
31
|
-
// MCP POST endpoint
|
|
32
|
-
const mcpPostHandler = async (req, res) => {
|
|
33
|
-
const sessionId = req.headers['mcp-session-id'];
|
|
34
|
-
if (sessionId) {
|
|
35
|
-
console.log(`Received MCP request for session: ${sessionId}`);
|
|
36
|
-
} else {
|
|
37
|
-
console.log('Request body:', req.body);
|
|
38
|
-
}
|
|
39
|
-
try {
|
|
40
|
-
let transport;
|
|
41
|
-
if (sessionId && transports[sessionId]) {
|
|
42
|
-
// Reuse existing transport
|
|
43
|
-
transport = transports[sessionId];
|
|
44
|
-
} else if (!sessionId && isInitializeRequest(req.body)) {
|
|
45
|
-
// New initialization request
|
|
46
|
-
const eventStore = new InMemoryEventStore();
|
|
47
|
-
transport = new StreamableHTTPServerTransport({
|
|
48
|
-
sessionIdGenerator: () => randomUUID(),
|
|
49
|
-
eventStore, // Enable resumability
|
|
50
|
-
onsessioninitialized: sessionId => {
|
|
51
|
-
// Store the transport by session ID when session is initialized
|
|
52
|
-
// This avoids race conditions where requests might come in before the session is stored
|
|
53
|
-
console.log(`Session initialized with ID: ${sessionId}`);
|
|
54
|
-
transports[sessionId] = transport;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// Set up onclose handler to clean up transport when closed
|
|
59
|
-
transport.onclose = () => {
|
|
60
|
-
const sid = transport.sessionId;
|
|
61
|
-
if (sid && transports[sid]) {
|
|
62
|
-
console.log(`Transport closed for session ${sid}, removing from transports map`);
|
|
63
|
-
delete transports[sid];
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// Connect the transport to the MCP server BEFORE handling the request
|
|
68
|
-
// so responses can flow back through the same transport
|
|
69
|
-
const server = getServer();
|
|
70
|
-
await server.connect(transport);
|
|
71
|
-
|
|
72
|
-
await transport.handleRequest(req, res, req.body);
|
|
73
|
-
return; // Already handled
|
|
74
|
-
} else {
|
|
75
|
-
// Invalid request - no session ID or not initialization request
|
|
76
|
-
res.status(400).json({
|
|
77
|
-
jsonrpc: '2.0',
|
|
78
|
-
error: {
|
|
79
|
-
code: -32000,
|
|
80
|
-
message: 'Bad Request: No valid session ID provided'
|
|
81
|
-
},
|
|
82
|
-
id: null
|
|
83
|
-
});
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Handle the request with existing transport - no need to reconnect
|
|
88
|
-
// The existing transport is already connected to the server
|
|
89
|
-
await transport.handleRequest(req, res, req.body);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
console.error('Error handling MCP request:', error);
|
|
92
|
-
if (!res.headersSent) {
|
|
93
|
-
res.status(500).json({
|
|
94
|
-
jsonrpc: '2.0',
|
|
95
|
-
error: {
|
|
96
|
-
code: -32603,
|
|
97
|
-
message: 'Internal server error'
|
|
98
|
-
},
|
|
99
|
-
id: null
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
// Set up POST route
|
|
106
|
-
app.post('/mcp', mcpPostHandler);
|
|
107
|
-
|
|
108
|
-
// Handle GET requests for SSE streams (using built-in support from StreamableHTTP)
|
|
109
|
-
const mcpGetHandler = async (req, res) => {
|
|
110
|
-
const sessionId = req.headers['mcp-session-id'];
|
|
111
|
-
if (!sessionId || !transports[sessionId]) {
|
|
112
|
-
res.status(400).send('Invalid or missing session ID');
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Check for Last-Event-ID header for resumability
|
|
117
|
-
const lastEventId = req.headers['last-event-id'];
|
|
118
|
-
if (lastEventId) {
|
|
119
|
-
console.log(`Client reconnecting with Last-Event-ID: ${lastEventId}`);
|
|
120
|
-
} else {
|
|
121
|
-
console.log(`Establishing new SSE stream for session ${sessionId}`);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const transport = transports[sessionId];
|
|
125
|
-
await transport.handleRequest(req, res);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
// Set up GET route
|
|
129
|
-
app.get('/mcp', mcpGetHandler);
|
|
130
|
-
|
|
131
|
-
// Handle DELETE requests for session termination (according to MCP spec)
|
|
132
|
-
const mcpDeleteHandler = async (req, res) => {
|
|
133
|
-
const sessionId = req.headers['mcp-session-id'];
|
|
134
|
-
if (!sessionId || !transports[sessionId]) {
|
|
135
|
-
res.status(400).send('Invalid or missing session ID');
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
console.log(`Received session termination request for session ${sessionId}`);
|
|
140
|
-
|
|
141
|
-
try {
|
|
142
|
-
const transport = transports[sessionId];
|
|
143
|
-
await transport.handleRequest(req, res);
|
|
144
|
-
} catch (error) {
|
|
145
|
-
console.error('Error handling session termination:', error);
|
|
146
|
-
if (!res.headersSent) {
|
|
147
|
-
res.status(500).send('Error processing session termination');
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
// Set up DELETE route
|
|
153
|
-
app.delete('/mcp', mcpDeleteHandler);
|
|
154
|
-
|
|
155
|
-
app.listen(MCP_PORT, error => {
|
|
156
|
-
if (error) {
|
|
157
|
-
console.error('Failed to start server:', error);
|
|
158
|
-
process.exit(1);
|
|
159
|
-
}
|
|
160
|
-
console.log(`MCP Streamable HTTP Server listening on port ${MCP_PORT}`);
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
// Handle server shutdown
|
|
164
|
-
process.on('SIGINT', async () => {
|
|
165
|
-
console.log('Shutting down server...');
|
|
166
|
-
|
|
167
|
-
// Close all active transports to properly clean up resources
|
|
168
|
-
for (const sessionId in transports) {
|
|
169
|
-
try {
|
|
170
|
-
console.log(`Closing transport for session ${sessionId}`);
|
|
171
|
-
await transports[sessionId].close();
|
|
172
|
-
delete transports[sessionId];
|
|
173
|
-
} catch (error) {
|
|
174
|
-
console.error(`Error closing transport for session ${sessionId}:`, error);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
console.log('Server shutdown complete');
|
|
178
|
-
process.exit(0);
|
|
179
|
-
});
|
|
180
|
-
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class Detail Getter 工具知识库
|
|
3
|
-
* 提供类详细信息查看指南
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
description: '查看自定义类的详细信息',
|
|
8
|
-
parameters: {
|
|
9
|
-
className: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
required: false,
|
|
12
|
-
description: '类名(可选,优先使用本地查询)'
|
|
13
|
-
},
|
|
14
|
-
classId: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
required: false,
|
|
17
|
-
description: '类ID(可选,当没有className时使用服务器查询)'
|
|
18
|
-
},
|
|
19
|
-
projectPath: {
|
|
20
|
-
type: 'string',
|
|
21
|
-
required: false,
|
|
22
|
-
description: '项目路径,默认为当前工作目录'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
notes: [
|
|
26
|
-
'至少需要提供 className 或 classId 其中之一',
|
|
27
|
-
'如果提供了 className,优先从本地文件获取(更快)',
|
|
28
|
-
'如果只提供 classId,从服务器查询',
|
|
29
|
-
'返回信息包括:基本配置、发布状态、服务器信息(如有)和源码预览'
|
|
30
|
-
],
|
|
31
|
-
displayedInfo: [
|
|
32
|
-
'基本信息:包括类名、版本号、服务器ID、数据来源',
|
|
33
|
-
'发布状态:是否已发布到服务器',
|
|
34
|
-
'服务器信息:API名称、状态、创建/更新时间(如有)',
|
|
35
|
-
'源码预览:显示前50行源码内容'
|
|
36
|
-
]
|
|
37
|
-
};
|