bc-code-intelligence-mcp 1.4.0 → 1.4.2
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -43
- package/dist/index.js.map +1 -1
- package/dist/layers/base-layer.d.ts +26 -0
- package/dist/layers/base-layer.d.ts.map +1 -1
- package/dist/layers/base-layer.js +54 -0
- package/dist/layers/base-layer.js.map +1 -1
- package/dist/layers/embedded-layer.d.ts.map +1 -1
- package/dist/layers/embedded-layer.js.map +1 -1
- package/dist/services/multi-content-layer-service.d.ts.map +1 -1
- package/dist/services/multi-content-layer-service.js +36 -15
- package/dist/services/multi-content-layer-service.js.map +1 -1
- package/dist/tools/core-tools.d.ts +26 -0
- package/dist/tools/core-tools.d.ts.map +1 -0
- package/dist/{streamlined-tools.js → tools/core-tools.js} +30 -13
- package/dist/tools/core-tools.js.map +1 -0
- package/dist/tools/handoff-tools.d.ts +37 -0
- package/dist/tools/handoff-tools.d.ts.map +1 -0
- package/dist/tools/handoff-tools.js +265 -0
- package/dist/tools/handoff-tools.js.map +1 -0
- package/dist/tools/index.d.ts +61 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +75 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/onboarding-tools.d.ts +35 -0
- package/dist/tools/onboarding-tools.d.ts.map +1 -0
- package/dist/tools/onboarding-tools.js +243 -0
- package/dist/tools/onboarding-tools.js.map +1 -0
- package/dist/tools/specialist-tools.d.ts.map +1 -1
- package/dist/tools/specialist-tools.js +6 -1
- package/dist/tools/specialist-tools.js.map +1 -1
- package/dist/types/bc-knowledge.d.ts +8 -8
- package/dist/types/config-types.d.ts +4 -4
- package/dist/types/config-types.d.ts.map +1 -1
- package/dist/types/config-types.js +1 -1
- package/dist/types/config-types.js.map +1 -1
- package/embedded-knowledge/domains/chris-config/knowledge-content-creation.md +437 -0
- package/embedded-knowledge/domains/chris-config/multi-team-layer-configuration.md +302 -0
- package/package.json +8 -11
- package/dist/services/agent-onboarding-service.d.ts +0 -45
- package/dist/services/agent-onboarding-service.d.ts.map +0 -1
- package/dist/services/agent-onboarding-service.js +0 -372
- package/dist/services/agent-onboarding-service.js.map +0 -1
- package/dist/services/specialist-handoff-service.d.ts +0 -85
- package/dist/services/specialist-handoff-service.d.ts.map +0 -1
- package/dist/services/specialist-handoff-service.js +0 -492
- package/dist/services/specialist-handoff-service.js.map +0 -1
- package/dist/streamlined-tools.d.ts +0 -328
- package/dist/streamlined-tools.d.ts.map +0 -1
- package/dist/streamlined-tools.js.map +0 -1
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specialist Handoff Service
|
|
3
|
-
*
|
|
4
|
-
* Enables seamless transitions between specialists while preserving context,
|
|
5
|
-
* conversation history, and ensuring natural collaboration flow.
|
|
6
|
-
*/
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
// Tool argument schemas
|
|
9
|
-
const HandoffToSpecialistArgsSchema = z.object({
|
|
10
|
-
target_specialist_id: z.string().describe('ID of the specialist to hand off to'),
|
|
11
|
-
handoff_type: z.enum(['transfer', 'consultation', 'collaboration', 'escalation']).describe('Type of handoff - transfer (complete), consultation (temporary), collaboration (joint), escalation (senior expert)'),
|
|
12
|
-
handoff_reason: z.string().describe('Clear reason why this handoff is needed'),
|
|
13
|
-
problem_summary: z.string().describe('Current problem/challenge being worked on'),
|
|
14
|
-
work_completed: z.array(z.string()).describe('List of work completed so far'),
|
|
15
|
-
current_challenges: z.array(z.string()).optional().default([]).describe('Current challenges or blockers'),
|
|
16
|
-
continuation_points: z.array(z.string()).optional().default([]).describe('Specific points for the next specialist to focus on'),
|
|
17
|
-
preserve_session: z.boolean().optional().default(true).describe('Whether to preserve current session context')
|
|
18
|
-
});
|
|
19
|
-
const BringInSpecialistArgsSchema = z.object({
|
|
20
|
-
specialist_id: z.string().describe('ID of the specialist to bring in for consultation'),
|
|
21
|
-
consultation_reason: z.string().describe('Why this specialist\'s expertise is needed'),
|
|
22
|
-
specific_question: z.string().describe('Specific question or challenge for the specialist'),
|
|
23
|
-
current_context: z.string().describe('Brief context of current work and situation'),
|
|
24
|
-
collaboration_type: z.enum(['advice', 'review', 'joint-work']).optional().default('advice').describe('Type of collaboration needed')
|
|
25
|
-
});
|
|
26
|
-
const GetHandoffSummaryArgsSchema = z.object({
|
|
27
|
-
session_id: z.string().optional().describe('Session ID to get handoff summary for (current session if omitted)'),
|
|
28
|
-
include_recommendations: z.boolean().optional().default(true).describe('Include previous recommendations in summary')
|
|
29
|
-
});
|
|
30
|
-
export const HANDOFF_TOOLS = [
|
|
31
|
-
{
|
|
32
|
-
name: 'handoff_to_specialist',
|
|
33
|
-
description: `Transfer or collaborate with another BC specialist while preserving full context. Use when:
|
|
34
|
-
• Current problem requires different expertise domain
|
|
35
|
-
• User asks for specific specialist or different perspective
|
|
36
|
-
• Problem complexity requires architectural, security, testing, or other specialized input
|
|
37
|
-
• You've completed your analysis and next steps need different skills
|
|
38
|
-
|
|
39
|
-
Creates seamless transition with full context transfer so user doesn't repeat information.
|
|
40
|
-
|
|
41
|
-
🔧 **AL/BC Platform Constraints**: Specialists follow Business Central and AL Language limitations:
|
|
42
|
-
• Security: AL permissions, BC security framework only
|
|
43
|
-
• UX: AL page/report constraints, not custom rendering
|
|
44
|
-
• Performance: AL optimization patterns, BC server constraints
|
|
45
|
-
• API: BC web services, AL integration patterns only`,
|
|
46
|
-
inputSchema: {
|
|
47
|
-
type: 'object',
|
|
48
|
-
properties: {
|
|
49
|
-
target_specialist_id: {
|
|
50
|
-
type: 'string',
|
|
51
|
-
description: 'ID of the specialist to hand off to'
|
|
52
|
-
},
|
|
53
|
-
handoff_type: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
enum: ['transfer', 'consultation', 'collaboration', 'escalation'],
|
|
56
|
-
description: 'Type of handoff - transfer (complete), consultation (temporary), collaboration (joint), escalation (senior expert)'
|
|
57
|
-
},
|
|
58
|
-
handoff_reason: {
|
|
59
|
-
type: 'string',
|
|
60
|
-
description: 'Clear reason why this handoff is needed'
|
|
61
|
-
},
|
|
62
|
-
problem_summary: {
|
|
63
|
-
type: 'string',
|
|
64
|
-
description: 'Current problem/challenge being worked on'
|
|
65
|
-
},
|
|
66
|
-
work_completed: {
|
|
67
|
-
type: 'array',
|
|
68
|
-
items: { type: 'string' },
|
|
69
|
-
description: 'List of work completed so far'
|
|
70
|
-
},
|
|
71
|
-
current_challenges: {
|
|
72
|
-
type: 'array',
|
|
73
|
-
items: { type: 'string' },
|
|
74
|
-
description: 'Current challenges or blockers'
|
|
75
|
-
},
|
|
76
|
-
continuation_points: {
|
|
77
|
-
type: 'array',
|
|
78
|
-
items: { type: 'string' },
|
|
79
|
-
description: 'Specific points for the next specialist to focus on'
|
|
80
|
-
},
|
|
81
|
-
preserve_session: {
|
|
82
|
-
type: 'boolean',
|
|
83
|
-
description: 'Whether to preserve current session context',
|
|
84
|
-
default: true
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
required: ['target_specialist_id', 'handoff_type', 'handoff_reason', 'problem_summary', 'work_completed']
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: 'bring_in_specialist',
|
|
92
|
-
description: `Bring in another specialist for consultation or collaboration while maintaining current session. Use for quick expert input, code reviews, or joint problem-solving without full handoff.
|
|
93
|
-
|
|
94
|
-
🔧 **AL/BC Platform Constraints**: Specialists follow Business Central limitations:
|
|
95
|
-
• Security: AL permissions, BC security framework only
|
|
96
|
-
• UX: AL page/report constraints, not custom rendering
|
|
97
|
-
• Performance: AL optimization patterns, BC server constraints
|
|
98
|
-
• API: BC web services, AL integration patterns only`,
|
|
99
|
-
inputSchema: {
|
|
100
|
-
type: 'object',
|
|
101
|
-
properties: {
|
|
102
|
-
specialist_id: {
|
|
103
|
-
type: 'string',
|
|
104
|
-
description: 'ID of the specialist to bring in for consultation'
|
|
105
|
-
},
|
|
106
|
-
consultation_reason: {
|
|
107
|
-
type: 'string',
|
|
108
|
-
description: 'Why this specialist\'s expertise is needed'
|
|
109
|
-
},
|
|
110
|
-
specific_question: {
|
|
111
|
-
type: 'string',
|
|
112
|
-
description: 'Specific question or challenge for the specialist'
|
|
113
|
-
},
|
|
114
|
-
current_context: {
|
|
115
|
-
type: 'string',
|
|
116
|
-
description: 'Brief context of current work and situation'
|
|
117
|
-
},
|
|
118
|
-
collaboration_type: {
|
|
119
|
-
type: 'string',
|
|
120
|
-
enum: ['advice', 'review', 'joint-work'],
|
|
121
|
-
description: 'Type of collaboration needed'
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
required: ['specialist_id', 'consultation_reason', 'specific_question', 'current_context']
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: 'get_handoff_summary',
|
|
129
|
-
description: `Get summary of previous specialist handoffs and context for current session. Useful when you need to understand what other specialists have already worked on.`,
|
|
130
|
-
inputSchema: {
|
|
131
|
-
type: 'object',
|
|
132
|
-
properties: {
|
|
133
|
-
session_id: {
|
|
134
|
-
type: 'string',
|
|
135
|
-
description: 'Session ID to get handoff summary for (current session if omitted)'
|
|
136
|
-
},
|
|
137
|
-
include_recommendations: {
|
|
138
|
-
type: 'boolean',
|
|
139
|
-
description: 'Include previous recommendations in summary',
|
|
140
|
-
default: true
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
required: []
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
];
|
|
147
|
-
export class SpecialistHandoffService {
|
|
148
|
-
sessionManager;
|
|
149
|
-
discoveryService;
|
|
150
|
-
layerService;
|
|
151
|
-
handoffHistory = new Map();
|
|
152
|
-
currentSessionId; // Track current session
|
|
153
|
-
constructor(sessionManager, discoveryService, layerService) {
|
|
154
|
-
this.sessionManager = sessionManager;
|
|
155
|
-
this.discoveryService = discoveryService;
|
|
156
|
-
this.layerService = layerService;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Set current session ID for handoff operations
|
|
160
|
-
*/
|
|
161
|
-
setCurrentSession(sessionId) {
|
|
162
|
-
this.currentSessionId = sessionId;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Get current session
|
|
166
|
-
*/
|
|
167
|
-
async getCurrentSession() {
|
|
168
|
-
if (!this.currentSessionId) {
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
return await this.sessionManager.getSession(this.currentSessionId);
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Create an emergency session when handoff is attempted without existing session
|
|
175
|
-
*/
|
|
176
|
-
async createEmergencySession(args) {
|
|
177
|
-
// Create a session with generic context from handoff arguments
|
|
178
|
-
const emergencySession = await this.sessionManager.startSession('casey-copilot', // Default to Casey for emergency sessions
|
|
179
|
-
'default-user', `Emergency session created for handoff to ${args.target_specialist_id}. Context: ${args.problem_summary || 'No context provided'}`);
|
|
180
|
-
// Set this as the current session
|
|
181
|
-
this.currentSessionId = emergencySession.sessionId;
|
|
182
|
-
return emergencySession;
|
|
183
|
-
}
|
|
184
|
-
async handleToolCall(request) {
|
|
185
|
-
try {
|
|
186
|
-
switch (request.params.name) {
|
|
187
|
-
case 'handoff_to_specialist':
|
|
188
|
-
return await this.handoffToSpecialist(request);
|
|
189
|
-
case 'bring_in_specialist':
|
|
190
|
-
return await this.bringInSpecialist(request);
|
|
191
|
-
case 'get_handoff_summary':
|
|
192
|
-
return await this.getHandoffSummary(request);
|
|
193
|
-
default:
|
|
194
|
-
throw new Error(`Unknown tool: ${request.params.name}`);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
catch (error) {
|
|
198
|
-
return {
|
|
199
|
-
content: [
|
|
200
|
-
{
|
|
201
|
-
type: 'text',
|
|
202
|
-
text: `Error in handoff service: ${error instanceof Error ? error.message : String(error)}`
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
isError: true
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Execute handoff to another specialist with full context transfer
|
|
211
|
-
*/
|
|
212
|
-
async handoffToSpecialist(request) {
|
|
213
|
-
const args = HandoffToSpecialistArgsSchema.parse(request.params.arguments);
|
|
214
|
-
// Get current session context or create emergency session
|
|
215
|
-
let currentSession = await this.getCurrentSession();
|
|
216
|
-
if (!currentSession) {
|
|
217
|
-
// Auto-create emergency session to enable handoff
|
|
218
|
-
currentSession = await this.createEmergencySession(args);
|
|
219
|
-
}
|
|
220
|
-
// Get target specialist info with fuzzy matching
|
|
221
|
-
let targetSpecialist = await this.discoveryService.getSpecialistById(args.target_specialist_id);
|
|
222
|
-
if (!targetSpecialist) {
|
|
223
|
-
// Try fuzzy name matching if exact ID fails
|
|
224
|
-
targetSpecialist = await this.discoveryService.findSpecialistByName(args.target_specialist_id);
|
|
225
|
-
}
|
|
226
|
-
if (!targetSpecialist) {
|
|
227
|
-
return {
|
|
228
|
-
content: [
|
|
229
|
-
{
|
|
230
|
-
type: 'text',
|
|
231
|
-
text: `Specialist "${args.target_specialist_id}" not found. Tried exact ID match and fuzzy name matching. Use 'browse_specialists' to see available specialists.`
|
|
232
|
-
}
|
|
233
|
-
],
|
|
234
|
-
isError: true
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
// Create handoff context
|
|
238
|
-
const handoffContext = {
|
|
239
|
-
session_id: currentSession.sessionId,
|
|
240
|
-
from_specialist: currentSession.specialistId,
|
|
241
|
-
to_specialist: args.target_specialist_id,
|
|
242
|
-
handoff_type: args.handoff_type,
|
|
243
|
-
problem_summary: args.problem_summary,
|
|
244
|
-
work_completed: args.work_completed,
|
|
245
|
-
recommendations_made: currentSession.context.recommendations || [],
|
|
246
|
-
current_challenges: args.current_challenges,
|
|
247
|
-
user_context: {
|
|
248
|
-
expertise_level: currentSession.context.userPreferences?.expertiseLevel,
|
|
249
|
-
bc_version: undefined, // Not available in current session structure
|
|
250
|
-
project_type: currentSession.context.codebaseContext?.project,
|
|
251
|
-
preferences: currentSession.context.userPreferences?.preferredTopics
|
|
252
|
-
},
|
|
253
|
-
conversation_summary: this.summarizeConversation(currentSession),
|
|
254
|
-
handoff_reason: args.handoff_reason,
|
|
255
|
-
continuation_points: args.continuation_points
|
|
256
|
-
};
|
|
257
|
-
// Store handoff history
|
|
258
|
-
const sessionHandoffs = this.handoffHistory.get(currentSession.sessionId) || [];
|
|
259
|
-
sessionHandoffs.push(handoffContext);
|
|
260
|
-
this.handoffHistory.set(currentSession.sessionId, sessionHandoffs);
|
|
261
|
-
// Create handoff message
|
|
262
|
-
let response = this.createHandoffMessage(handoffContext, targetSpecialist);
|
|
263
|
-
// Handle session transition based on handoff type
|
|
264
|
-
if (args.handoff_type === 'transfer' && args.preserve_session) {
|
|
265
|
-
// Transfer session to new specialist
|
|
266
|
-
await this.sessionManager.transferSession(currentSession.sessionId, args.target_specialist_id);
|
|
267
|
-
response += `\n\n🔄 **Session transferred to ${targetSpecialist.title}**\n`;
|
|
268
|
-
response += `Use \`suggest_specialist ${args.target_specialist_id}\` to continue with full context.`;
|
|
269
|
-
}
|
|
270
|
-
else if (args.handoff_type === 'collaboration') {
|
|
271
|
-
response += `\n\n🤝 **Collaboration Mode**\n`;
|
|
272
|
-
response += `Both specialists are now available for this session. Use \`suggest_specialist ${args.target_specialist_id}\` to engage.`;
|
|
273
|
-
}
|
|
274
|
-
return {
|
|
275
|
-
content: [
|
|
276
|
-
{
|
|
277
|
-
type: 'text',
|
|
278
|
-
text: response
|
|
279
|
-
}
|
|
280
|
-
]
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Bring in specialist for consultation without full handoff
|
|
285
|
-
*/
|
|
286
|
-
async bringInSpecialist(request) {
|
|
287
|
-
const args = BringInSpecialistArgsSchema.parse(request.params.arguments);
|
|
288
|
-
// Try exact ID match first, then fuzzy matching
|
|
289
|
-
let specialist = await this.discoveryService.getSpecialistById(args.specialist_id);
|
|
290
|
-
if (!specialist) {
|
|
291
|
-
specialist = await this.discoveryService.findSpecialistByName(args.specialist_id);
|
|
292
|
-
}
|
|
293
|
-
if (!specialist) {
|
|
294
|
-
return {
|
|
295
|
-
content: [
|
|
296
|
-
{
|
|
297
|
-
type: 'text',
|
|
298
|
-
text: `Specialist "${args.specialist_id}" not found. Tried exact ID match and fuzzy name matching. Use 'browse_specialists' to see available specialists.`
|
|
299
|
-
}
|
|
300
|
-
],
|
|
301
|
-
isError: true
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
const emoji = this.getSpecialistEmoji(args.specialist_id);
|
|
305
|
-
let response = `🤝 **Bringing in ${emoji} ${specialist.title}**\n\n`;
|
|
306
|
-
response += `**Consultation Reason:** ${args.consultation_reason}\n\n`;
|
|
307
|
-
response += `**Current Context:** ${args.current_context}\n\n`;
|
|
308
|
-
response += `**Specific Question:** "${args.specific_question}"\n\n`;
|
|
309
|
-
if (args.collaboration_type === 'advice') {
|
|
310
|
-
response += `💡 **Quick Expert Input Needed**\n`;
|
|
311
|
-
response += `${specialist.title.split(' - ')[0]} can provide immediate guidance on this specific question.`;
|
|
312
|
-
}
|
|
313
|
-
else if (args.collaboration_type === 'review') {
|
|
314
|
-
response += `🔍 **Expert Review Requested**\n`;
|
|
315
|
-
response += `${specialist.title.split(' - ')[0]} will review the current approach and provide feedback.`;
|
|
316
|
-
}
|
|
317
|
-
else if (args.collaboration_type === 'joint-work') {
|
|
318
|
-
response += `🤝 **Joint Problem-Solving**\n`;
|
|
319
|
-
response += `${specialist.title.split(' - ')[0]} will work alongside on this challenge.`;
|
|
320
|
-
}
|
|
321
|
-
response += `\n\n🎯 **To engage:** Use \`suggest_specialist ${args.specialist_id}\` with this context.`;
|
|
322
|
-
return {
|
|
323
|
-
content: [
|
|
324
|
-
{
|
|
325
|
-
type: 'text',
|
|
326
|
-
text: response
|
|
327
|
-
}
|
|
328
|
-
]
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Get handoff summary for current session
|
|
333
|
-
*/
|
|
334
|
-
async getHandoffSummary(request) {
|
|
335
|
-
const args = GetHandoffSummaryArgsSchema.parse(request.params.arguments);
|
|
336
|
-
const currentSession = await this.getCurrentSession();
|
|
337
|
-
const sessionId = args.session_id || currentSession?.sessionId;
|
|
338
|
-
if (!sessionId) {
|
|
339
|
-
return {
|
|
340
|
-
content: [
|
|
341
|
-
{
|
|
342
|
-
type: 'text',
|
|
343
|
-
text: 'No active session found.'
|
|
344
|
-
}
|
|
345
|
-
],
|
|
346
|
-
isError: true
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
const handoffs = this.handoffHistory.get(sessionId) || [];
|
|
350
|
-
if (handoffs.length === 0) {
|
|
351
|
-
return {
|
|
352
|
-
content: [
|
|
353
|
-
{
|
|
354
|
-
type: 'text',
|
|
355
|
-
text: 'No handoffs have occurred in this session.'
|
|
356
|
-
}
|
|
357
|
-
]
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
let response = `📋 **Session Handoff Summary**\n\n`;
|
|
361
|
-
handoffs.forEach((handoff, index) => {
|
|
362
|
-
const fromEmoji = this.getSpecialistEmoji(handoff.from_specialist);
|
|
363
|
-
const toEmoji = this.getSpecialistEmoji(handoff.to_specialist);
|
|
364
|
-
response += `**${index + 1}. ${fromEmoji} → ${toEmoji} (${handoff.handoff_type})**\n`;
|
|
365
|
-
response += ` Reason: ${handoff.handoff_reason}\n`;
|
|
366
|
-
response += ` Problem: ${handoff.problem_summary}\n`;
|
|
367
|
-
if (handoff.work_completed.length > 0) {
|
|
368
|
-
response += ` Completed: ${handoff.work_completed.slice(0, 2).join(', ')}${handoff.work_completed.length > 2 ? '...' : ''}\n`;
|
|
369
|
-
}
|
|
370
|
-
if (handoff.continuation_points.length > 0) {
|
|
371
|
-
response += ` Focus: ${handoff.continuation_points.slice(0, 2).join(', ')}\n`;
|
|
372
|
-
}
|
|
373
|
-
response += '\n';
|
|
374
|
-
});
|
|
375
|
-
if (args.include_recommendations && currentSession?.context.recommendations) {
|
|
376
|
-
response += `\n💡 **Current Recommendations:**\n`;
|
|
377
|
-
currentSession.context.recommendations.slice(0, 3).forEach((rec, index) => {
|
|
378
|
-
response += `${index + 1}. ${rec}\n`;
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
return {
|
|
382
|
-
content: [
|
|
383
|
-
{
|
|
384
|
-
type: 'text',
|
|
385
|
-
text: response
|
|
386
|
-
}
|
|
387
|
-
]
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Create handoff message with full context
|
|
392
|
-
*/
|
|
393
|
-
createHandoffMessage(context, targetSpecialist) {
|
|
394
|
-
const fromEmoji = this.getSpecialistEmoji(context.from_specialist);
|
|
395
|
-
const toEmoji = this.getSpecialistEmoji(context.to_specialist);
|
|
396
|
-
let message = `🔄 **Specialist ${context.handoff_type === 'transfer' ? 'Handoff' : 'Collaboration'}**\n\n`;
|
|
397
|
-
message += `${fromEmoji} **From:** ${this.getSpecialistName(context.from_specialist)}\n`;
|
|
398
|
-
message += `${toEmoji} **To:** ${targetSpecialist.title}\n`;
|
|
399
|
-
message += `🎯 **Type:** ${context.handoff_type}\n\n`;
|
|
400
|
-
message += `**Handoff Reason:** ${context.handoff_reason}\n\n`;
|
|
401
|
-
message += `📋 **Context Summary:**\n`;
|
|
402
|
-
message += `• **Problem:** ${context.problem_summary}\n`;
|
|
403
|
-
if (context.work_completed.length > 0) {
|
|
404
|
-
message += `• **Work Completed:**\n`;
|
|
405
|
-
context.work_completed.forEach((work, index) => {
|
|
406
|
-
message += ` ${index + 1}. ${work}\n`;
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
if (context.current_challenges.length > 0) {
|
|
410
|
-
message += `• **Current Challenges:**\n`;
|
|
411
|
-
context.current_challenges.forEach((challenge, index) => {
|
|
412
|
-
message += ` ${index + 1}. ${challenge}\n`;
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
if (context.continuation_points.length > 0) {
|
|
416
|
-
message += `• **Focus Areas for ${targetSpecialist.title.split(' - ')[0]}:**\n`;
|
|
417
|
-
context.continuation_points.forEach((point, index) => {
|
|
418
|
-
message += ` ${index + 1}. ${point}\n`;
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
if (context.recommendations_made.length > 0) {
|
|
422
|
-
message += `• **Previous Recommendations:**\n`;
|
|
423
|
-
context.recommendations_made.slice(0, 3).forEach((rec, index) => {
|
|
424
|
-
message += ` ${index + 1}. ${rec}\n`;
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
message += `\n💬 **Ready for ${targetSpecialist.title.split(' - ')[0]}:** All context has been preserved for seamless continuation.`;
|
|
428
|
-
return message;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Summarize conversation for handoff context
|
|
432
|
-
*/
|
|
433
|
-
summarizeConversation(session) {
|
|
434
|
-
// Simple conversation summary - could be enhanced with more sophisticated analysis
|
|
435
|
-
const messages = session.messages || [];
|
|
436
|
-
if (messages.length === 0)
|
|
437
|
-
return 'No conversation history';
|
|
438
|
-
const recentMessages = messages.slice(-5); // Last 5 messages
|
|
439
|
-
return `Recent discussion: ${recentMessages.map(m => m.content).join(' | ')}`;
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* Get specialist name by ID
|
|
443
|
-
*/
|
|
444
|
-
getSpecialistName(specialistId) {
|
|
445
|
-
const nameMap = {
|
|
446
|
-
'dean-debug': 'Dean Debug',
|
|
447
|
-
'eva-errors': 'Eva Errors',
|
|
448
|
-
'alex-architect': 'Alex Architect',
|
|
449
|
-
'sam-coder': 'Sam Coder',
|
|
450
|
-
'quinn-tester': 'Quinn Tester',
|
|
451
|
-
'seth-security': 'Seth Security',
|
|
452
|
-
'uma-ux': 'Uma UX',
|
|
453
|
-
'jordan-bridge': 'Jordan Bridge',
|
|
454
|
-
'logan-legacy': 'Logan Legacy',
|
|
455
|
-
'roger-reviewer': 'Roger Reviewer',
|
|
456
|
-
'maya-mentor': 'Maya Mentor',
|
|
457
|
-
'taylor-docs': 'Taylor Docs',
|
|
458
|
-
'casey-copilot': 'Casey Copilot',
|
|
459
|
-
'morgan-market': 'Morgan Market'
|
|
460
|
-
};
|
|
461
|
-
return nameMap[specialistId] || specialistId;
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Get emoji for specialist
|
|
465
|
-
*/
|
|
466
|
-
getSpecialistEmoji(specialistId) {
|
|
467
|
-
const emojiMap = {
|
|
468
|
-
'dean-debug': '🔍',
|
|
469
|
-
'eva-errors': '⚠️',
|
|
470
|
-
'alex-architect': '🏗️',
|
|
471
|
-
'sam-coder': '💻',
|
|
472
|
-
'quinn-tester': '🧪',
|
|
473
|
-
'seth-security': '🔒',
|
|
474
|
-
'uma-ux': '🎨',
|
|
475
|
-
'jordan-bridge': '🌉',
|
|
476
|
-
'logan-legacy': '🏛️',
|
|
477
|
-
'roger-reviewer': '📝',
|
|
478
|
-
'maya-mentor': '👩🏫',
|
|
479
|
-
'taylor-docs': '📚',
|
|
480
|
-
'casey-copilot': '🤖',
|
|
481
|
-
'morgan-market': '🏪'
|
|
482
|
-
};
|
|
483
|
-
return emojiMap[specialistId] || '👤';
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Get tool definitions for MCP registration
|
|
487
|
-
*/
|
|
488
|
-
getToolDefinitions() {
|
|
489
|
-
return HANDOFF_TOOLS;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
//# sourceMappingURL=specialist-handoff-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"specialist-handoff-service.js","sourceRoot":"","sources":["../../src/services/specialist-handoff-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8BxB,wBAAwB;AACxB,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,oBAAoB,EA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