mcp-paike 1.0.8 → 1.1.0
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/dist/tools/{achievements.d.ts → growthRecords.d.ts} +26 -59
- package/dist/tools/growthRecords.d.ts.map +1 -0
- package/dist/tools/growthRecords.js +224 -0
- package/dist/tools/growthRecords.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/leads.d.ts +295 -0
- package/dist/tools/leads.d.ts.map +1 -0
- package/dist/tools/leads.js +596 -0
- package/dist/tools/leads.js.map +1 -0
- package/dist/tools/students.d.ts +0 -12
- package/dist/tools/students.d.ts.map +1 -1
- package/dist/tools/students.js +4 -11
- package/dist/tools/students.js.map +1 -1
- package/package.json +1 -1
- package/dist/tools/achievements.d.ts.map +0 -1
- package/dist/tools/achievements.js +0 -302
- package/dist/tools/achievements.js.map +0 -1
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
import { apiClient } from '../api/client.js';
|
|
2
|
+
import { logger } from '../utils/logger.js';
|
|
3
|
+
// Status mappings
|
|
4
|
+
const leadStatusMap = {
|
|
5
|
+
NEW: '新线索',
|
|
6
|
+
CONTACTED: '已联系',
|
|
7
|
+
INTERESTED: '有意向',
|
|
8
|
+
TRIAL_ARRANGED: '已安排试听',
|
|
9
|
+
TRIAL_COMPLETED: '试听完成',
|
|
10
|
+
NEGOTIATING: '洽谈中',
|
|
11
|
+
CONVERTED: '已转化',
|
|
12
|
+
ABANDONED: '已放弃',
|
|
13
|
+
};
|
|
14
|
+
const leadSourceMap = {
|
|
15
|
+
TRIAL_CLASS: '试听课',
|
|
16
|
+
REFERRAL: '转介绍',
|
|
17
|
+
ONLINE_AD: '线上广告',
|
|
18
|
+
OFFLINE_AD: '线下广告',
|
|
19
|
+
PHONE_INQUIRY: '电话咨询',
|
|
20
|
+
WALK_IN: '上门咨询',
|
|
21
|
+
WECHAT: '微信',
|
|
22
|
+
SCHOOL_COOPERATION: '学校合作',
|
|
23
|
+
COMMUNITY_EVENT: '社区活动',
|
|
24
|
+
OTHER: '其他',
|
|
25
|
+
};
|
|
26
|
+
const priorityMap = {
|
|
27
|
+
LOW: '低',
|
|
28
|
+
MEDIUM: '中',
|
|
29
|
+
HIGH: '高',
|
|
30
|
+
URGENT: '紧急',
|
|
31
|
+
};
|
|
32
|
+
const followupTypeMap = {
|
|
33
|
+
PHONE: '电话',
|
|
34
|
+
WECHAT: '微信',
|
|
35
|
+
SMS: '短信',
|
|
36
|
+
VISIT: '上门',
|
|
37
|
+
MEETING: '会面',
|
|
38
|
+
VIDEO_CALL: '视频通话',
|
|
39
|
+
EMAIL: '邮件',
|
|
40
|
+
OTHER: '其他',
|
|
41
|
+
};
|
|
42
|
+
const trialStatusMap = {
|
|
43
|
+
SCHEDULED: '已安排',
|
|
44
|
+
CONFIRMED: '已确认',
|
|
45
|
+
COMPLETED: '已完成',
|
|
46
|
+
NO_SHOW: '未到场',
|
|
47
|
+
CANCELLED: '已取消',
|
|
48
|
+
};
|
|
49
|
+
// Helper functions
|
|
50
|
+
function formatDate(dateStr) {
|
|
51
|
+
if (!dateStr)
|
|
52
|
+
return '-';
|
|
53
|
+
return new Date(dateStr).toLocaleDateString('zh-CN');
|
|
54
|
+
}
|
|
55
|
+
function formatDateTime(dateStr) {
|
|
56
|
+
if (!dateStr)
|
|
57
|
+
return '-';
|
|
58
|
+
return new Date(dateStr).toLocaleString('zh-CN', {
|
|
59
|
+
year: 'numeric',
|
|
60
|
+
month: '2-digit',
|
|
61
|
+
day: '2-digit',
|
|
62
|
+
hour: '2-digit',
|
|
63
|
+
minute: '2-digit',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Tool 1: List leads
|
|
67
|
+
export const listLeadsTool = {
|
|
68
|
+
name: 'list_leads',
|
|
69
|
+
description: '查询线索列表,支持按状态、来源、优先级、分配人筛选',
|
|
70
|
+
inputSchema: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
properties: {
|
|
73
|
+
search: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
description: '按学员/家长姓名、电话、微信号搜索',
|
|
76
|
+
},
|
|
77
|
+
status: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: [
|
|
80
|
+
'NEW',
|
|
81
|
+
'CONTACTED',
|
|
82
|
+
'INTERESTED',
|
|
83
|
+
'TRIAL_ARRANGED',
|
|
84
|
+
'TRIAL_COMPLETED',
|
|
85
|
+
'NEGOTIATING',
|
|
86
|
+
'CONVERTED',
|
|
87
|
+
'ABANDONED',
|
|
88
|
+
],
|
|
89
|
+
description: '状态筛选',
|
|
90
|
+
},
|
|
91
|
+
source: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
enum: [
|
|
94
|
+
'TRIAL_CLASS',
|
|
95
|
+
'REFERRAL',
|
|
96
|
+
'ONLINE_AD',
|
|
97
|
+
'OFFLINE_AD',
|
|
98
|
+
'PHONE_INQUIRY',
|
|
99
|
+
'WALK_IN',
|
|
100
|
+
'WECHAT',
|
|
101
|
+
'SCHOOL_COOPERATION',
|
|
102
|
+
'COMMUNITY_EVENT',
|
|
103
|
+
'OTHER',
|
|
104
|
+
],
|
|
105
|
+
description: '来源筛选',
|
|
106
|
+
},
|
|
107
|
+
priority: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
enum: ['LOW', 'MEDIUM', 'HIGH', 'URGENT'],
|
|
110
|
+
description: '优先级筛选',
|
|
111
|
+
},
|
|
112
|
+
assignedToId: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: '分配员工ID',
|
|
115
|
+
},
|
|
116
|
+
page: {
|
|
117
|
+
type: 'number',
|
|
118
|
+
description: '页码,默认1',
|
|
119
|
+
},
|
|
120
|
+
pageSize: {
|
|
121
|
+
type: 'number',
|
|
122
|
+
description: '每页数量,默认20',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
required: [],
|
|
126
|
+
},
|
|
127
|
+
handler: async (args) => {
|
|
128
|
+
try {
|
|
129
|
+
logger.debug('查询线索列表', args);
|
|
130
|
+
const params = {
|
|
131
|
+
page: Math.max(1, args.page || 1),
|
|
132
|
+
pageSize: Math.min(100, Math.max(1, args.pageSize || 20)),
|
|
133
|
+
};
|
|
134
|
+
if (args.search)
|
|
135
|
+
params.search = args.search;
|
|
136
|
+
if (args.status)
|
|
137
|
+
params.status = args.status;
|
|
138
|
+
if (args.source)
|
|
139
|
+
params.source = args.source;
|
|
140
|
+
if (args.priority)
|
|
141
|
+
params.priority = args.priority;
|
|
142
|
+
if (args.assignedToId)
|
|
143
|
+
params.assignedToId = args.assignedToId;
|
|
144
|
+
const result = await apiClient.get('/api/leads', params);
|
|
145
|
+
const leads = result.leads.map((lead) => ({
|
|
146
|
+
id: lead.id,
|
|
147
|
+
studentName: lead.studentName,
|
|
148
|
+
parentName: lead.parentName,
|
|
149
|
+
parentPhone: lead.parentPhone,
|
|
150
|
+
status: leadStatusMap[lead.status] || lead.status,
|
|
151
|
+
source: leadSourceMap[lead.source] || lead.source,
|
|
152
|
+
priority: priorityMap[lead.priority] || lead.priority,
|
|
153
|
+
assignedTo: lead.assignedTo?.realName || '未分配',
|
|
154
|
+
nextFollowupAt: formatDateTime(lead.nextFollowupAt),
|
|
155
|
+
createdAt: formatDate(lead.createdAt),
|
|
156
|
+
}));
|
|
157
|
+
const formatted = leads
|
|
158
|
+
.map((lead, index) => `${index + 1}. ${lead.studentName} [ID: ${lead.id}]\n` +
|
|
159
|
+
` 状态: ${lead.status} | 优先级: ${lead.priority}\n` +
|
|
160
|
+
` 来源: ${lead.source}\n` +
|
|
161
|
+
` 家长: ${lead.parentName} | 电话: ${lead.parentPhone}\n` +
|
|
162
|
+
` 负责人: ${lead.assignedTo}\n` +
|
|
163
|
+
` 下次跟进: ${lead.nextFollowupAt}\n` +
|
|
164
|
+
` 创建时间: ${lead.createdAt}`)
|
|
165
|
+
.join('\n\n');
|
|
166
|
+
return {
|
|
167
|
+
content: [
|
|
168
|
+
{
|
|
169
|
+
type: 'text',
|
|
170
|
+
text: `查询结果: 共 ${result.pagination.total} 条线索 (第 ${result.pagination.page}/${result.pagination.totalPages} 页)\n\n` +
|
|
171
|
+
formatted,
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
logger.error('查询线索列表失败:', error.message);
|
|
178
|
+
return {
|
|
179
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
180
|
+
isError: true,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
// Tool 2: Get lead detail
|
|
186
|
+
export const getLeadTool = {
|
|
187
|
+
name: 'get_lead',
|
|
188
|
+
description: '获取线索详细信息,包含跟进记录和试听记录',
|
|
189
|
+
inputSchema: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
properties: {
|
|
192
|
+
leadId: {
|
|
193
|
+
type: 'string',
|
|
194
|
+
description: '线索ID',
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
required: ['leadId'],
|
|
198
|
+
},
|
|
199
|
+
handler: async (args) => {
|
|
200
|
+
try {
|
|
201
|
+
logger.debug('获取线索详情', args);
|
|
202
|
+
const lead = await apiClient.get(`/api/leads/${args.leadId}`);
|
|
203
|
+
const followups = (lead.followups || [])
|
|
204
|
+
.slice(0, 5)
|
|
205
|
+
.map((f) => ` - [${formatDateTime(f.followupAt)}] ${followupTypeMap[f.followupType] || f.followupType}: ${f.content?.substring(0, 50) || '-'}${f.content?.length > 50 ? '...' : ''}`)
|
|
206
|
+
.join('\n');
|
|
207
|
+
const trials = (lead.trialSessions || [])
|
|
208
|
+
.map((t) => ` - [${formatDateTime(t.scheduledAt)}] ${trialStatusMap[t.status] || t.status} - ${t.session?.class?.name || '未知班级'}`)
|
|
209
|
+
.join('\n');
|
|
210
|
+
return {
|
|
211
|
+
content: [
|
|
212
|
+
{
|
|
213
|
+
type: 'text',
|
|
214
|
+
text: `线索详情:\n\n` +
|
|
215
|
+
`ID: ${lead.id}\n` +
|
|
216
|
+
`学员姓名: ${lead.studentName}\n` +
|
|
217
|
+
`学员年龄: ${lead.studentAge || '-'}\n` +
|
|
218
|
+
`学员年级: ${lead.studentGrade || '-'}\n\n` +
|
|
219
|
+
`家长姓名: ${lead.parentName}\n` +
|
|
220
|
+
`家长电话: ${lead.parentPhone}\n` +
|
|
221
|
+
`家长微信: ${lead.parentWechat || '-'}\n` +
|
|
222
|
+
`家长邮箱: ${lead.parentEmail || '-'}\n\n` +
|
|
223
|
+
`状态: ${leadStatusMap[lead.status] || lead.status}\n` +
|
|
224
|
+
`优先级: ${priorityMap[lead.priority] || lead.priority}\n` +
|
|
225
|
+
`来源: ${leadSourceMap[lead.source] || lead.source}\n` +
|
|
226
|
+
`来源详情: ${lead.sourceDetail || '-'}\n` +
|
|
227
|
+
(lead.referrerName
|
|
228
|
+
? `转介绍人: ${lead.referrerName} (${lead.referrerPhone || '-'})\n`
|
|
229
|
+
: '') +
|
|
230
|
+
`\n负责人: ${lead.assignedTo?.realName || '未分配'}\n` +
|
|
231
|
+
`分配时间: ${formatDateTime(lead.assignedAt)}\n` +
|
|
232
|
+
`最后联系: ${formatDateTime(lead.lastContactedAt)}\n` +
|
|
233
|
+
`下次跟进: ${formatDateTime(lead.nextFollowupAt)}\n\n` +
|
|
234
|
+
`意向课程: ${lead.interestedCourses || '-'}\n` +
|
|
235
|
+
`预期报名: ${formatDate(lead.expectedEnrollDate)}\n` +
|
|
236
|
+
`预算: ${lead.budget ? `¥${lead.budget}` : '-'}\n` +
|
|
237
|
+
`备注: ${lead.notes || '-'}\n\n` +
|
|
238
|
+
`创建时间: ${formatDateTime(lead.createdAt)}\n` +
|
|
239
|
+
(lead.status === 'CONVERTED'
|
|
240
|
+
? `转化时间: ${formatDateTime(lead.convertedAt)}\n`
|
|
241
|
+
: '') +
|
|
242
|
+
(lead.status === 'ABANDONED'
|
|
243
|
+
? `放弃时间: ${formatDateTime(lead.abandonedAt)}\n放弃原因: ${lead.abandonReason || '-'}\n`
|
|
244
|
+
: '') +
|
|
245
|
+
`\n最近跟进记录 (最多5条):\n${followups || ' 无跟进记录'}\n\n` +
|
|
246
|
+
`试听记录:\n${trials || ' 无试听记录'}`,
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
logger.error('获取线索详情失败:', error.message);
|
|
253
|
+
return {
|
|
254
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
255
|
+
isError: true,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
// Tool 3: Get lead stats
|
|
261
|
+
export const getLeadStatsTool = {
|
|
262
|
+
name: 'get_lead_stats',
|
|
263
|
+
description: '获取线索统计数据(按状态、来源、优先级统计)',
|
|
264
|
+
inputSchema: {
|
|
265
|
+
type: 'object',
|
|
266
|
+
properties: {},
|
|
267
|
+
required: [],
|
|
268
|
+
},
|
|
269
|
+
handler: async () => {
|
|
270
|
+
try {
|
|
271
|
+
logger.debug('获取线索统计');
|
|
272
|
+
const stats = await apiClient.get('/api/leads/stats');
|
|
273
|
+
const statusStats = (stats.byStatus || [])
|
|
274
|
+
.map((s) => ` ${leadStatusMap[s.status] || s.status}: ${s._count}`)
|
|
275
|
+
.join('\n');
|
|
276
|
+
const sourceStats = (stats.bySource || [])
|
|
277
|
+
.map((s) => ` ${leadSourceMap[s.source] || s.source}: ${s._count}`)
|
|
278
|
+
.join('\n');
|
|
279
|
+
const priorityStats = (stats.byPriority || [])
|
|
280
|
+
.map((s) => ` ${priorityMap[s.priority] || s.priority}: ${s._count}`)
|
|
281
|
+
.join('\n');
|
|
282
|
+
return {
|
|
283
|
+
content: [
|
|
284
|
+
{
|
|
285
|
+
type: 'text',
|
|
286
|
+
text: `线索统计:\n\n` +
|
|
287
|
+
`总数: ${stats.total || 0}\n\n` +
|
|
288
|
+
`按状态:\n${statusStats || ' 无数据'}\n\n` +
|
|
289
|
+
`按来源:\n${sourceStats || ' 无数据'}\n\n` +
|
|
290
|
+
`按优先级:\n${priorityStats || ' 无数据'}`,
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
logger.error('获取线索统计失败:', error.message);
|
|
297
|
+
return {
|
|
298
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
299
|
+
isError: true,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
// Tool 4: Get lead analytics
|
|
305
|
+
export const getLeadAnalyticsTool = {
|
|
306
|
+
name: 'get_lead_analytics',
|
|
307
|
+
description: '获取详细分析数据(漏斗、来源效率、员工表现、趋势)',
|
|
308
|
+
inputSchema: {
|
|
309
|
+
type: 'object',
|
|
310
|
+
properties: {
|
|
311
|
+
startDate: {
|
|
312
|
+
type: 'string',
|
|
313
|
+
description: '开始日期 (YYYY-MM-DD)',
|
|
314
|
+
},
|
|
315
|
+
endDate: {
|
|
316
|
+
type: 'string',
|
|
317
|
+
description: '结束日期 (YYYY-MM-DD)',
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
required: [],
|
|
321
|
+
},
|
|
322
|
+
handler: async (args) => {
|
|
323
|
+
try {
|
|
324
|
+
logger.debug('获取线索分析', args);
|
|
325
|
+
const params = {};
|
|
326
|
+
if (args.startDate)
|
|
327
|
+
params.startDate = args.startDate;
|
|
328
|
+
if (args.endDate)
|
|
329
|
+
params.endDate = args.endDate;
|
|
330
|
+
const analytics = await apiClient.get('/api/leads/analytics', params);
|
|
331
|
+
// Funnel data
|
|
332
|
+
const funnel = analytics.funnel || {};
|
|
333
|
+
const funnelText = `新线索: ${funnel.NEW || 0}\n` +
|
|
334
|
+
` ↓ 已联系: ${funnel.CONTACTED || 0}\n` +
|
|
335
|
+
` ↓ 有意向: ${funnel.INTERESTED || 0}\n` +
|
|
336
|
+
` ↓ 已安排试听: ${funnel.TRIAL_ARRANGED || 0}\n` +
|
|
337
|
+
` ↓ 试听完成: ${funnel.TRIAL_COMPLETED || 0}\n` +
|
|
338
|
+
` ↓ 洽谈中: ${funnel.NEGOTIATING || 0}\n` +
|
|
339
|
+
` ↓ 已转化: ${funnel.CONVERTED || 0}\n` +
|
|
340
|
+
` ✕ 已放弃: ${funnel.ABANDONED || 0}`;
|
|
341
|
+
// Source efficiency
|
|
342
|
+
const sourceEfficiency = (analytics.sourceEfficiency || [])
|
|
343
|
+
.map((s) => ` ${leadSourceMap[s.source] || s.source}: ${s.total}条, 转化${s.converted}条 (${s.conversionRate}%)`)
|
|
344
|
+
.join('\n');
|
|
345
|
+
// Staff performance (may not be available for STAFF role)
|
|
346
|
+
const staffPerformance = (analytics.staffPerformance || [])
|
|
347
|
+
.map((s) => ` ${s.staffName}: ${s.total}条, 转化${s.converted}条 (${s.conversionRate}%)`)
|
|
348
|
+
.join('\n');
|
|
349
|
+
// Trend data
|
|
350
|
+
const trend = (analytics.trend || [])
|
|
351
|
+
.slice(-7) // Last 7 days
|
|
352
|
+
.map((t) => ` ${t.date}: 新增${t.created}条, 转化${t.converted}条`)
|
|
353
|
+
.join('\n');
|
|
354
|
+
return {
|
|
355
|
+
content: [
|
|
356
|
+
{
|
|
357
|
+
type: 'text',
|
|
358
|
+
text: `线索分析报告:\n\n` +
|
|
359
|
+
`=== 转化漏斗 ===\n${funnelText}\n\n` +
|
|
360
|
+
`=== 来源效率 ===\n${sourceEfficiency || ' 无数据'}\n\n` +
|
|
361
|
+
(staffPerformance
|
|
362
|
+
? `=== 员工表现 ===\n${staffPerformance}\n\n`
|
|
363
|
+
: '') +
|
|
364
|
+
`=== 近期趋势 ===\n${trend || ' 无数据'}`,
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
catch (error) {
|
|
370
|
+
logger.error('获取线索分析失败:', error.message);
|
|
371
|
+
return {
|
|
372
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
373
|
+
isError: true,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
// Tool 5: Get pending followups
|
|
379
|
+
export const getPendingFollowupsTool = {
|
|
380
|
+
name: 'get_pending_followups',
|
|
381
|
+
description: '获取待跟进线索列表(超期、今天、即将到期)',
|
|
382
|
+
inputSchema: {
|
|
383
|
+
type: 'object',
|
|
384
|
+
properties: {},
|
|
385
|
+
required: [],
|
|
386
|
+
},
|
|
387
|
+
handler: async () => {
|
|
388
|
+
try {
|
|
389
|
+
logger.debug('获取待跟进线索');
|
|
390
|
+
const result = await apiClient.get('/api/leads/pending-followups');
|
|
391
|
+
const formatLeads = (leads) => leads
|
|
392
|
+
.map((lead) => ` - ${lead.studentName} [${leadStatusMap[lead.status] || lead.status}]\n` +
|
|
393
|
+
` 电话: ${lead.parentPhone} | 负责人: ${lead.assignedTo?.realName || '未分配'}\n` +
|
|
394
|
+
` 计划跟进: ${formatDateTime(lead.nextFollowupAt)}`)
|
|
395
|
+
.join('\n\n');
|
|
396
|
+
const overdue = result.overdue || [];
|
|
397
|
+
const today = result.today || [];
|
|
398
|
+
const upcoming = result.upcoming || [];
|
|
399
|
+
return {
|
|
400
|
+
content: [
|
|
401
|
+
{
|
|
402
|
+
type: 'text',
|
|
403
|
+
text: `待跟进线索:\n\n` +
|
|
404
|
+
`=== 已超期 (${overdue.length}条) ===\n${formatLeads(overdue) || ' 无'}\n\n` +
|
|
405
|
+
`=== 今天 (${today.length}条) ===\n${formatLeads(today) || ' 无'}\n\n` +
|
|
406
|
+
`=== 即将到期 (${upcoming.length}条) ===\n${formatLeads(upcoming) || ' 无'}`,
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
catch (error) {
|
|
412
|
+
logger.error('获取待跟进线索失败:', error.message);
|
|
413
|
+
return {
|
|
414
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
415
|
+
isError: true,
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
};
|
|
420
|
+
// Tool 6: List lead followups
|
|
421
|
+
export const listLeadFollowupsTool = {
|
|
422
|
+
name: 'list_lead_followups',
|
|
423
|
+
description: '获取指定线索的跟进记录列表',
|
|
424
|
+
inputSchema: {
|
|
425
|
+
type: 'object',
|
|
426
|
+
properties: {
|
|
427
|
+
leadId: {
|
|
428
|
+
type: 'string',
|
|
429
|
+
description: '线索ID',
|
|
430
|
+
},
|
|
431
|
+
page: {
|
|
432
|
+
type: 'number',
|
|
433
|
+
description: '页码,默认1',
|
|
434
|
+
},
|
|
435
|
+
pageSize: {
|
|
436
|
+
type: 'number',
|
|
437
|
+
description: '每页数量,默认20',
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
required: ['leadId'],
|
|
441
|
+
},
|
|
442
|
+
handler: async (args) => {
|
|
443
|
+
try {
|
|
444
|
+
logger.debug('获取线索跟进记录', args);
|
|
445
|
+
const params = {
|
|
446
|
+
page: Math.max(1, args.page || 1),
|
|
447
|
+
pageSize: Math.min(100, Math.max(1, args.pageSize || 20)),
|
|
448
|
+
};
|
|
449
|
+
const result = await apiClient.get(`/api/leads/${args.leadId}/followups`, params);
|
|
450
|
+
const formatted = (result.followups || [])
|
|
451
|
+
.map((f, index) => `${index + 1}. [${formatDateTime(f.followupAt)}] ${followupTypeMap[f.followupType] || f.followupType}\n` +
|
|
452
|
+
` 操作人: ${f.operator?.realName || '-'}\n` +
|
|
453
|
+
` 内容: ${f.content || '-'}\n` +
|
|
454
|
+
` 结果: ${f.outcome || '-'}` +
|
|
455
|
+
(f.statusBefore && f.statusAfter
|
|
456
|
+
? `\n 状态变更: ${leadStatusMap[f.statusBefore] || f.statusBefore} → ${leadStatusMap[f.statusAfter] || f.statusAfter}`
|
|
457
|
+
: '') +
|
|
458
|
+
(f.nextFollowupAt
|
|
459
|
+
? `\n 下次跟进: ${formatDateTime(f.nextFollowupAt)}`
|
|
460
|
+
: ''))
|
|
461
|
+
.join('\n\n');
|
|
462
|
+
return {
|
|
463
|
+
content: [
|
|
464
|
+
{
|
|
465
|
+
type: 'text',
|
|
466
|
+
text: `跟进记录 (共 ${result.pagination?.total || 0} 条):\n\n` +
|
|
467
|
+
(formatted || '无跟进记录'),
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
catch (error) {
|
|
473
|
+
logger.error('获取线索跟进记录失败:', error.message);
|
|
474
|
+
return {
|
|
475
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
476
|
+
isError: true,
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
// Tool 7: List lead trials
|
|
482
|
+
export const listLeadTrialsTool = {
|
|
483
|
+
name: 'list_lead_trials',
|
|
484
|
+
description: '获取指定线索的试听记录列表',
|
|
485
|
+
inputSchema: {
|
|
486
|
+
type: 'object',
|
|
487
|
+
properties: {
|
|
488
|
+
leadId: {
|
|
489
|
+
type: 'string',
|
|
490
|
+
description: '线索ID',
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
required: ['leadId'],
|
|
494
|
+
},
|
|
495
|
+
handler: async (args) => {
|
|
496
|
+
try {
|
|
497
|
+
logger.debug('获取线索试听记录', args);
|
|
498
|
+
const trials = await apiClient.get(`/api/leads/${args.leadId}/trials`);
|
|
499
|
+
if (!trials || trials.length === 0) {
|
|
500
|
+
return {
|
|
501
|
+
content: [{ type: 'text', text: '该线索没有试听记录' }],
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
const formatted = trials
|
|
505
|
+
.map((t, index) => `${index + 1}. [${formatDateTime(t.scheduledAt)}] ${trialStatusMap[t.status] || t.status}\n` +
|
|
506
|
+
` 班级: ${t.session?.class?.name || '-'}\n` +
|
|
507
|
+
` 课程: ${t.session?.title || '-'}\n` +
|
|
508
|
+
` 教师: ${t.session?.teacher?.realName || '-'}\n` +
|
|
509
|
+
` 调度人: ${t.scheduledBy?.realName || '-'}` +
|
|
510
|
+
(t.confirmedAt ? `\n 确认时间: ${formatDateTime(t.confirmedAt)}` : '') +
|
|
511
|
+
(t.completedAt ? `\n 完成时间: ${formatDateTime(t.completedAt)}` : '') +
|
|
512
|
+
(t.cancelledAt
|
|
513
|
+
? `\n 取消时间: ${formatDateTime(t.cancelledAt)}\n 取消原因: ${t.cancelReason || '-'}`
|
|
514
|
+
: '') +
|
|
515
|
+
(t.teacherFeedback ? `\n 教师反馈: ${t.teacherFeedback}` : '') +
|
|
516
|
+
(t.parentFeedback ? `\n 家长反馈: ${t.parentFeedback}` : ''))
|
|
517
|
+
.join('\n\n');
|
|
518
|
+
return {
|
|
519
|
+
content: [
|
|
520
|
+
{
|
|
521
|
+
type: 'text',
|
|
522
|
+
text: `试听记录 (共 ${trials.length} 条):\n\n${formatted}`,
|
|
523
|
+
},
|
|
524
|
+
],
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
catch (error) {
|
|
528
|
+
logger.error('获取线索试听记录失败:', error.message);
|
|
529
|
+
return {
|
|
530
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
531
|
+
isError: true,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
};
|
|
536
|
+
// Tool 8: List assignment rules (Admin only)
|
|
537
|
+
export const listAssignmentRulesTool = {
|
|
538
|
+
name: 'list_assignment_rules',
|
|
539
|
+
description: '获取线索自动分配规则列表(仅管理员可用)',
|
|
540
|
+
inputSchema: {
|
|
541
|
+
type: 'object',
|
|
542
|
+
properties: {},
|
|
543
|
+
required: [],
|
|
544
|
+
},
|
|
545
|
+
requiredRole: 'ADMIN',
|
|
546
|
+
handler: async () => {
|
|
547
|
+
try {
|
|
548
|
+
logger.debug('获取线索分配规则');
|
|
549
|
+
const rules = await apiClient.get('/api/leads/assignment-rules');
|
|
550
|
+
if (!rules || rules.length === 0) {
|
|
551
|
+
return {
|
|
552
|
+
content: [{ type: 'text', text: '没有配置分配规则' }],
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
const ruleTypeMap = {
|
|
556
|
+
ROUND_ROBIN: '轮询分配',
|
|
557
|
+
SOURCE_BASED: '按来源分配',
|
|
558
|
+
};
|
|
559
|
+
const formatted = rules
|
|
560
|
+
.map((r, index) => `${index + 1}. ${r.ruleName} [${r.isActive ? '启用' : '禁用'}]\n` +
|
|
561
|
+
` 类型: ${ruleTypeMap[r.ruleType] || r.ruleType}\n` +
|
|
562
|
+
` 优先级: ${r.priority}\n` +
|
|
563
|
+
(r.ruleType === 'SOURCE_BASED'
|
|
564
|
+
? ` 来源: ${leadSourceMap[r.source] || r.source}\n` +
|
|
565
|
+
` 分配给: ${r.assignedTo?.realName || '-'}`
|
|
566
|
+
: ` 员工池: ${(r.staffPool || []).map((s) => s.realName).join(', ') || '-'}`))
|
|
567
|
+
.join('\n\n');
|
|
568
|
+
return {
|
|
569
|
+
content: [
|
|
570
|
+
{
|
|
571
|
+
type: 'text',
|
|
572
|
+
text: `分配规则列表 (共 ${rules.length} 条):\n\n${formatted}`,
|
|
573
|
+
},
|
|
574
|
+
],
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
catch (error) {
|
|
578
|
+
logger.error('获取线索分配规则失败:', error.message);
|
|
579
|
+
return {
|
|
580
|
+
content: [{ type: 'text', text: `查询失败: ${error.message}` }],
|
|
581
|
+
isError: true,
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
export const leadTools = [
|
|
587
|
+
listLeadsTool,
|
|
588
|
+
getLeadTool,
|
|
589
|
+
getLeadStatsTool,
|
|
590
|
+
getLeadAnalyticsTool,
|
|
591
|
+
getPendingFollowupsTool,
|
|
592
|
+
listLeadFollowupsTool,
|
|
593
|
+
listLeadTrialsTool,
|
|
594
|
+
listAssignmentRulesTool,
|
|
595
|
+
];
|
|
596
|
+
//# sourceMappingURL=leads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leads.js","sourceRoot":"","sources":["../../src/tools/leads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAO5C,kBAAkB;AAClB,MAAM,aAAa,GAA2B;IAC5C,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,OAAO;IACvB,eAAe,EAAE,MAAM;IACvB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,aAAa,GAA2B;IAC5C,WAAW,EAAE,KAAK;IAClB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,IAAI;IACZ,kBAAkB,EAAE,MAAM;IAC1B,eAAe,EAAE,MAAM;IACvB,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,MAAM,WAAW,GAA2B;IAC1C,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,MAAM,EAAE,IAAI;CACb,CAAC;AAEF,MAAM,eAAe,GAA2B;IAC9C,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,MAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,KAAK;IAChB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AAC,CAAC,UAAU,EAAE,QAAQ,IAAI,GAAG,EAAE;oBAC5C,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CACtF;iBACA,IAAI,CAAC,MAAM,CAAC,CAAC;YAEhB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,aAAa,KAAK,CAAC,MAAM,WAAW,SAAS,EAAE;qBACtD;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YAC3C,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;gBAC3D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,oBAAoB;IACpB,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,uBAAuB;CACxB,CAAC"}
|
package/dist/tools/students.d.ts
CHANGED
|
@@ -20,11 +20,6 @@ export declare const listStudentsTool: {
|
|
|
20
20
|
enum: string[];
|
|
21
21
|
description: string;
|
|
22
22
|
};
|
|
23
|
-
studentType: {
|
|
24
|
-
type: string;
|
|
25
|
-
enum: string[];
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
23
|
page: {
|
|
29
24
|
type: string;
|
|
30
25
|
description: string;
|
|
@@ -39,7 +34,6 @@ export declare const listStudentsTool: {
|
|
|
39
34
|
handler: (args: {
|
|
40
35
|
search?: string;
|
|
41
36
|
status?: string;
|
|
42
|
-
studentType?: string;
|
|
43
37
|
page?: number;
|
|
44
38
|
pageSize?: number;
|
|
45
39
|
}) => Promise<ToolResult>;
|
|
@@ -127,11 +121,6 @@ export declare const studentTools: ({
|
|
|
127
121
|
enum: string[];
|
|
128
122
|
description: string;
|
|
129
123
|
};
|
|
130
|
-
studentType: {
|
|
131
|
-
type: string;
|
|
132
|
-
enum: string[];
|
|
133
|
-
description: string;
|
|
134
|
-
};
|
|
135
124
|
page: {
|
|
136
125
|
type: string;
|
|
137
126
|
description: string;
|
|
@@ -146,7 +135,6 @@ export declare const studentTools: ({
|
|
|
146
135
|
handler: (args: {
|
|
147
136
|
search?: string;
|
|
148
137
|
status?: string;
|
|
149
|
-
studentType?: string;
|
|
150
138
|
page?: number;
|
|
151
139
|
pageSize?: number;
|
|
152
140
|
}) => Promise<ToolResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"students.d.ts","sourceRoot":"","sources":["../../src/tools/students.ts"],"names":[],"mappings":"AAGA,UAAU,UAAU;IAClB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAGD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"students.d.ts","sourceRoot":"","sources":["../../src/tools/students.ts"],"names":[],"mappings":"AAGA,UAAU,UAAU;IAClB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAGD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;oBA0BL;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM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