@mumulinya167/cc-web 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.
- package/bin/ccm.js +25 -4
- package/bin/server.js +105 -0
- package/bin/server.ts +4533 -0
- package/dist/server.d.ts +186 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +4479 -0
- package/dist/server.js.map +1 -0
- package/package.json +21 -5
- package/public/assets/index-Bc9Qzbsh.css +1 -0
- package/public/assets/index-Cp4uGXX0.js +55 -0
- package/public/favicon.svg +1 -0
- package/public/icons.svg +24 -0
- package/public/index.html +13 -6603
- package/mcp-feishu/.env.example +0 -2
- package/mcp-feishu/package-lock.json +0 -1194
- package/mcp-feishu/package.json +0 -23
- package/mcp-feishu/src/cli.ts +0 -239
- package/mcp-feishu/src/feishu-client.ts +0 -209
- package/mcp-feishu/src/index.ts +0 -55
- package/mcp-feishu/src/tools.ts +0 -222
- package/mcp-feishu/tsconfig.json +0 -18
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
declare const http: any;
|
|
3
|
+
declare const fs: any;
|
|
4
|
+
declare const path: any;
|
|
5
|
+
declare const execSync: any, spawn: any;
|
|
6
|
+
declare const os: any;
|
|
7
|
+
declare const url: any;
|
|
8
|
+
declare const CCM_DIR: any;
|
|
9
|
+
declare const CONFIGS_DIR: any;
|
|
10
|
+
declare const PID_DIR: any;
|
|
11
|
+
declare const LOG_DIR: any;
|
|
12
|
+
declare const SESSIONS_DIR: any;
|
|
13
|
+
declare const SHARED_DIR: any;
|
|
14
|
+
declare const TASKS_FILE: any;
|
|
15
|
+
declare const CRON_FILE: any;
|
|
16
|
+
declare const UPLOAD_DIR: any;
|
|
17
|
+
declare const GROUPS_FILE: any;
|
|
18
|
+
declare const GROUP_MESSAGES_DIR: any;
|
|
19
|
+
declare const PUBLIC_DIR: any;
|
|
20
|
+
declare function loadGroups(): any;
|
|
21
|
+
declare function saveGroups(groups: any): void;
|
|
22
|
+
declare function getGroupMessages(groupId: any): any;
|
|
23
|
+
declare function appendGroupMessage(groupId: any, msg: any): void;
|
|
24
|
+
declare function callAgent(projectName: any, message: any, workDir: any, agentType: any, timeoutMs: any): any;
|
|
25
|
+
declare function callAgentStream(projectName: any, message: any, workDir: any, agentType: any, res: any): void;
|
|
26
|
+
declare function processCrossAgents(groupId: any, group: any, sourceProject: any, output: any, atMentions: any, configs: any): void;
|
|
27
|
+
declare function parseMultipart(buffer: any, boundary: any): {
|
|
28
|
+
files: any[];
|
|
29
|
+
fields: {};
|
|
30
|
+
};
|
|
31
|
+
declare const AGENTS: {
|
|
32
|
+
type: string;
|
|
33
|
+
name: string;
|
|
34
|
+
}[];
|
|
35
|
+
declare function getConfigs(): any;
|
|
36
|
+
declare function getConfigInfo(configPath: any): any[];
|
|
37
|
+
declare function isRunning(name: any): boolean;
|
|
38
|
+
declare function getPid(name: any): any;
|
|
39
|
+
declare const WEB_SESSIONS_DIR: any;
|
|
40
|
+
declare function getProjectSessionDir(projectName: string): string;
|
|
41
|
+
declare function ensureWebSessionDir(projectName: any): any;
|
|
42
|
+
declare function findCcSessionFile(projectName: any): any;
|
|
43
|
+
declare function syncFromCcToFilesystem(projectName: any): void;
|
|
44
|
+
declare function syncToFilesystemToCc(projectName: any): void;
|
|
45
|
+
declare function syncSessions(projectName: any): void;
|
|
46
|
+
declare function getSessions(projectName: any): any;
|
|
47
|
+
declare function getSessionDetail(projectName: any, sessionId: any): any;
|
|
48
|
+
declare function getLogs(projectName: any, lines?: number): any;
|
|
49
|
+
declare function startProject(projectName: any, agentType: any): {
|
|
50
|
+
success: boolean;
|
|
51
|
+
error: string;
|
|
52
|
+
pid?: undefined;
|
|
53
|
+
} | {
|
|
54
|
+
success: boolean;
|
|
55
|
+
pid: any;
|
|
56
|
+
error?: undefined;
|
|
57
|
+
};
|
|
58
|
+
declare function stopProject(projectName: any): {
|
|
59
|
+
success: boolean;
|
|
60
|
+
error: string;
|
|
61
|
+
} | {
|
|
62
|
+
success: boolean;
|
|
63
|
+
error?: undefined;
|
|
64
|
+
};
|
|
65
|
+
declare function sendJson(res: any, data: any, status?: number): void;
|
|
66
|
+
declare function sendFile(res: any, filePath: any): void;
|
|
67
|
+
declare function ensureSharedDir(): void;
|
|
68
|
+
declare function listSharedFiles(): any;
|
|
69
|
+
declare function readSharedFile(name: any): {
|
|
70
|
+
type: string;
|
|
71
|
+
content: any;
|
|
72
|
+
size?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
type: string;
|
|
75
|
+
size: any;
|
|
76
|
+
content?: undefined;
|
|
77
|
+
};
|
|
78
|
+
declare function writeSharedFile(name: any, content: any): void;
|
|
79
|
+
declare function saveSharedUpload(filename: any, buffer: any): any;
|
|
80
|
+
declare function deleteSharedFile(name: any): void;
|
|
81
|
+
declare function loadTasks(): any;
|
|
82
|
+
declare function saveTasks(tasks: any): void;
|
|
83
|
+
declare function createTask(task: any): {
|
|
84
|
+
id: string;
|
|
85
|
+
title: any;
|
|
86
|
+
description: any;
|
|
87
|
+
target_project: any;
|
|
88
|
+
group_id: any;
|
|
89
|
+
assign_type: any;
|
|
90
|
+
status: string;
|
|
91
|
+
priority: any;
|
|
92
|
+
created_at: string;
|
|
93
|
+
updated_at: string;
|
|
94
|
+
};
|
|
95
|
+
declare function updateTask(id: any, updates: any): any;
|
|
96
|
+
declare function deleteTask(id: any): void;
|
|
97
|
+
declare const taskQueues: Map<any, any>;
|
|
98
|
+
declare const runningTasks: Map<any, any>;
|
|
99
|
+
declare function getTaskTargetKey(task: any): string;
|
|
100
|
+
declare const PRIORITY_WEIGHT: {
|
|
101
|
+
high: number;
|
|
102
|
+
normal: number;
|
|
103
|
+
low: number;
|
|
104
|
+
};
|
|
105
|
+
declare function enqueueTask(taskId: any): void;
|
|
106
|
+
declare function processTargetQueue(targetKey: any): Promise<void>;
|
|
107
|
+
declare function getQueueStatus(): {
|
|
108
|
+
total_queued: number;
|
|
109
|
+
running_targets: number;
|
|
110
|
+
target_status: any;
|
|
111
|
+
pending_tasks: any;
|
|
112
|
+
in_progress_tasks: any;
|
|
113
|
+
};
|
|
114
|
+
declare const TASK_LOGS_FILE: any;
|
|
115
|
+
declare const taskLogsCache: Map<any, any>;
|
|
116
|
+
declare function loadTaskLogs(): any;
|
|
117
|
+
declare function saveTaskLogs(logs: any): void;
|
|
118
|
+
declare function addTaskLog(taskId: string, level: string, message: string): void;
|
|
119
|
+
declare function getTaskLogs(taskId: any, limit?: number): any;
|
|
120
|
+
declare function clearTaskLogs(taskId: any): void;
|
|
121
|
+
declare const MCP_DIR: any;
|
|
122
|
+
declare const SKILLS_DIR: any;
|
|
123
|
+
declare function loadMcpTools(): any;
|
|
124
|
+
declare function saveMcpTool(tool: any): void;
|
|
125
|
+
declare function deleteMcpTool(name: any): void;
|
|
126
|
+
declare function loadSkills(): any;
|
|
127
|
+
declare function saveSkill(skill: any): void;
|
|
128
|
+
declare function deleteSkill(name: any): void;
|
|
129
|
+
declare const FEISHU_CONFIG_FILE: any;
|
|
130
|
+
declare const FEISHU_SCOPES: string[];
|
|
131
|
+
declare function loadFeishuConfig(): any;
|
|
132
|
+
declare function saveFeishuConfig(config: any): void;
|
|
133
|
+
declare function getFeishuTenantToken(appId: string, appSecret: string): Promise<string | null>;
|
|
134
|
+
declare function getFeishuUserToken(appId: string, appSecret: string, code: string): Promise<any>;
|
|
135
|
+
declare function refreshFeishuUserToken(appId: string, appSecret: string, refreshToken: string): Promise<any>;
|
|
136
|
+
declare function getValidFeishuToken(): Promise<any>;
|
|
137
|
+
declare function getFeishuUserInfo(accessToken: string): Promise<any>;
|
|
138
|
+
declare function getFeishuChatList(accessToken: string): Promise<any[]>;
|
|
139
|
+
declare function sendFeishuWebhook(content: string, msgType?: string): Promise<boolean>;
|
|
140
|
+
declare function sendFeishuMessageToUser(userId: string, content: string, msgType?: string): Promise<boolean>;
|
|
141
|
+
declare function sendFeishuMessage(chatId: any, content: any, msgType?: string): Promise<boolean>;
|
|
142
|
+
declare function sendTaskCompletionNotification(task: any, result: any): Promise<void>;
|
|
143
|
+
declare function sendTaskFailureNotification(task: any, errorMsg: any): Promise<void>;
|
|
144
|
+
declare function executeTask(task: any): Promise<any>;
|
|
145
|
+
declare function checkTaskCompletion(response: any): boolean;
|
|
146
|
+
declare const TEMPLATES_FILE: any;
|
|
147
|
+
declare function loadTemplates(): any;
|
|
148
|
+
declare function saveTemplates(templates: any): void;
|
|
149
|
+
declare function getDefaultTemplates(): {
|
|
150
|
+
id: string;
|
|
151
|
+
name: string;
|
|
152
|
+
category: string;
|
|
153
|
+
description: string;
|
|
154
|
+
icon: string;
|
|
155
|
+
prompt: string;
|
|
156
|
+
tags: string[];
|
|
157
|
+
created_at: string;
|
|
158
|
+
}[];
|
|
159
|
+
declare function createTemplate(template: any): {
|
|
160
|
+
id: string;
|
|
161
|
+
name: any;
|
|
162
|
+
category: any;
|
|
163
|
+
description: any;
|
|
164
|
+
icon: any;
|
|
165
|
+
prompt: any;
|
|
166
|
+
tags: any;
|
|
167
|
+
created_at: string;
|
|
168
|
+
};
|
|
169
|
+
declare function updateTemplate(id: any, updates: any): any;
|
|
170
|
+
declare function deleteTemplate(id: any): void;
|
|
171
|
+
declare function loadCronJobs(): any;
|
|
172
|
+
declare function saveCronJobs(jobs: any): void;
|
|
173
|
+
declare function createCronJob(job: any): {
|
|
174
|
+
id: string;
|
|
175
|
+
name: any;
|
|
176
|
+
project: any;
|
|
177
|
+
schedule: any;
|
|
178
|
+
prompt: any;
|
|
179
|
+
enabled: boolean;
|
|
180
|
+
created_at: string;
|
|
181
|
+
last_run: any;
|
|
182
|
+
};
|
|
183
|
+
declare function updateCronJob(id: any, updates: any): any;
|
|
184
|
+
declare function deleteCronJob(id: any): void;
|
|
185
|
+
declare function handleRequest(req: any, res: any): any;
|
|
186
|
+
declare function startServer(port: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../bin/server.ts"],"names":[],"mappings":""}
|