hawkeye-mcp-server 1.0.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/CHANGELOG.md +123 -0
- package/INSTALLATION.md +734 -0
- package/LICENSE +21 -0
- package/README.md +289 -0
- package/SPECIFICATION.md +1073 -0
- package/USAGE.md +849 -0
- package/build/config/config.d.ts +58 -0
- package/build/config/config.js +100 -0
- package/build/config/config.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +138 -0
- package/build/index.js.map +1 -0
- package/build/services/auth.service.d.ts +34 -0
- package/build/services/auth.service.js +96 -0
- package/build/services/auth.service.js.map +1 -0
- package/build/services/project.service.d.ts +50 -0
- package/build/services/project.service.js +136 -0
- package/build/services/project.service.js.map +1 -0
- package/build/services/session.service.d.ts +68 -0
- package/build/services/session.service.js +357 -0
- package/build/services/session.service.js.map +1 -0
- package/build/tools/continue-investigation.d.ts +10 -0
- package/build/tools/continue-investigation.js +84 -0
- package/build/tools/continue-investigation.js.map +1 -0
- package/build/tools/get-incident-report.d.ts +10 -0
- package/build/tools/get-incident-report.js +62 -0
- package/build/tools/get-incident-report.js.map +1 -0
- package/build/tools/get-session-report.d.ts +25 -0
- package/build/tools/get-session-report.js +46 -0
- package/build/tools/get-session-report.js.map +1 -0
- package/build/tools/get-session-summary.d.ts +22 -0
- package/build/tools/get-session-summary.js +41 -0
- package/build/tools/get-session-summary.js.map +1 -0
- package/build/tools/get-status.d.ts +10 -0
- package/build/tools/get-status.js +129 -0
- package/build/tools/get-status.js.map +1 -0
- package/build/tools/index.d.ts +29 -0
- package/build/tools/index.js +349 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/inspect-session.d.ts +28 -0
- package/build/tools/inspect-session.js +51 -0
- package/build/tools/inspect-session.js.map +1 -0
- package/build/tools/investigate-alert.d.ts +10 -0
- package/build/tools/investigate-alert.js +122 -0
- package/build/tools/investigate-alert.js.map +1 -0
- package/build/tools/list-sessions.d.ts +49 -0
- package/build/tools/list-sessions.js +79 -0
- package/build/tools/list-sessions.js.map +1 -0
- package/build/types/errors.d.ts +61 -0
- package/build/types/errors.js +76 -0
- package/build/types/errors.js.map +1 -0
- package/build/types/hawkeye.d.ts +238 -0
- package/build/types/hawkeye.js +8 -0
- package/build/types/hawkeye.js.map +1 -0
- package/build/types/mcp.d.ts +125 -0
- package/build/types/mcp.js +6 -0
- package/build/types/mcp.js.map +1 -0
- package/build/utils/errors.d.ts +20 -0
- package/build/utils/errors.js +125 -0
- package/build/utils/errors.js.map +1 -0
- package/build/utils/http-client.d.ts +51 -0
- package/build/utils/http-client.js +133 -0
- package/build/utils/http-client.js.map +1 -0
- package/build/utils/logger.d.ts +35 -0
- package/build/utils/logger.js +77 -0
- package/build/utils/logger.js.map +1 -0
- package/build/utils/validation.d.ts +134 -0
- package/build/utils/validation.js +68 -0
- package/build/utils/validation.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session management service for Hawkeye API
|
|
3
|
+
* Handles session creation, prompt sending, polling, and inspection
|
|
4
|
+
*/
|
|
5
|
+
import { HttpClient } from '../utils/http-client.js';
|
|
6
|
+
import { AuthenticationService } from './auth.service.js';
|
|
7
|
+
import { Session, InspectSessionResponse, SendPromptResponse } from '../types/hawkeye.js';
|
|
8
|
+
/**
|
|
9
|
+
* Session management service
|
|
10
|
+
*/
|
|
11
|
+
export declare class SessionService {
|
|
12
|
+
private httpClient;
|
|
13
|
+
private authService;
|
|
14
|
+
private config;
|
|
15
|
+
constructor(httpClient: HttpClient, authService: AuthenticationService);
|
|
16
|
+
/**
|
|
17
|
+
* Create a new investigation session
|
|
18
|
+
*/
|
|
19
|
+
createSession(projectUuid: string, organizationUuid: string, gendbUuid?: string): Promise<Session>;
|
|
20
|
+
/**
|
|
21
|
+
* Send a prompt to an existing session
|
|
22
|
+
*/
|
|
23
|
+
sendPrompt(sessionUuid: string, projectUuid: string, prompt: string, disableReplay?: boolean): Promise<SendPromptResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Inspect a session to get its details and results
|
|
26
|
+
*/
|
|
27
|
+
inspectSession(sessionUuid: string, projectUuid: string, organizationUuid: string): Promise<InspectSessionResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* List sessions with optional filters (legacy method for backward compatibility)
|
|
30
|
+
*/
|
|
31
|
+
listSessions(projectUuid: string, organizationUuid: string, filterByAlertId?: string): Promise<Session[]>;
|
|
32
|
+
/**
|
|
33
|
+
* List sessions with pagination and date filtering
|
|
34
|
+
*/
|
|
35
|
+
listSessionsWithPagination(projectUuid: string, organizationUuid: string, options?: {
|
|
36
|
+
page?: number;
|
|
37
|
+
limit?: number;
|
|
38
|
+
dateFrom?: string;
|
|
39
|
+
dateTo?: string;
|
|
40
|
+
investigationStatus?: string;
|
|
41
|
+
sessionType?: string;
|
|
42
|
+
hideGroupedIncidents?: boolean;
|
|
43
|
+
}): Promise<Session[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Find sessions by alert ID
|
|
46
|
+
*/
|
|
47
|
+
findSessionsByAlertId(alertId: string, projectUuid: string, organizationUuid: string): Promise<Session[]>;
|
|
48
|
+
/**
|
|
49
|
+
* Poll for session completion
|
|
50
|
+
*/
|
|
51
|
+
pollForCompletion(sessionUuid: string, projectUuid: string, organizationUuid: string, maxAttempts?: number, intervalMs?: number): Promise<InspectSessionResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Get session report with summary and time-saved metrics
|
|
54
|
+
*/
|
|
55
|
+
getSessionReport(sessionUuids: string[], projectUuid: string): Promise<import('../types/hawkeye.js').SessionReport[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Get session summary with quality scores
|
|
58
|
+
*/
|
|
59
|
+
getSessionSummary(sessionUuid: string): Promise<import('../types/hawkeye.js').SessionSummary>;
|
|
60
|
+
/**
|
|
61
|
+
* Get incident report with organization-wide analytics
|
|
62
|
+
*/
|
|
63
|
+
getIncidentReport(): Promise<import('../types/hawkeye.js').IncidentReport>;
|
|
64
|
+
/**
|
|
65
|
+
* Check if a session is complete based on its state
|
|
66
|
+
*/
|
|
67
|
+
private isSessionComplete;
|
|
68
|
+
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session management service for Hawkeye API
|
|
3
|
+
* Handles session creation, prompt sending, polling, and inspection
|
|
4
|
+
*/
|
|
5
|
+
import { InvestigationError } from '../types/errors.js';
|
|
6
|
+
import { generateRequestId, } from '../types/hawkeye.js';
|
|
7
|
+
import { getConfig, CONSTANTS } from '../config/config.js';
|
|
8
|
+
import { logger } from '../utils/logger.js';
|
|
9
|
+
/**
|
|
10
|
+
* Session management service
|
|
11
|
+
*/
|
|
12
|
+
export class SessionService {
|
|
13
|
+
httpClient;
|
|
14
|
+
authService;
|
|
15
|
+
config = getConfig();
|
|
16
|
+
constructor(httpClient, authService) {
|
|
17
|
+
this.httpClient = httpClient;
|
|
18
|
+
this.authService = authService;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create a new investigation session
|
|
22
|
+
*/
|
|
23
|
+
async createSession(projectUuid, organizationUuid, gendbUuid) {
|
|
24
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
25
|
+
try {
|
|
26
|
+
logger.info('Creating new investigation session', { projectUuid });
|
|
27
|
+
// Get gendb_spec UUID from project if not provided
|
|
28
|
+
const gendbSpecUuid = gendbUuid || projectUuid;
|
|
29
|
+
const request = {
|
|
30
|
+
filter_chain: null,
|
|
31
|
+
gendb_spec: {
|
|
32
|
+
uuid: gendbSpecUuid,
|
|
33
|
+
},
|
|
34
|
+
organization_uuid: organizationUuid,
|
|
35
|
+
project_uuid: projectUuid,
|
|
36
|
+
request: {
|
|
37
|
+
request_id: generateRequestId(),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const response = await this.httpClient.post(CONSTANTS.ENDPOINTS.SESSION_CREATE, request, {
|
|
41
|
+
timeout: CONSTANTS.TIMEOUTS.LONG_REQUEST,
|
|
42
|
+
});
|
|
43
|
+
logger.info(`Session created: ${response.data.uuid}`);
|
|
44
|
+
return {
|
|
45
|
+
name: '',
|
|
46
|
+
created_at: new Date().toISOString(),
|
|
47
|
+
updated_at: new Date().toISOString(),
|
|
48
|
+
project_uuid: projectUuid,
|
|
49
|
+
organization_uuid: organizationUuid,
|
|
50
|
+
prompt_cycle_count: 0,
|
|
51
|
+
...response.data,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
logger.error('Failed to create session', error);
|
|
56
|
+
throw new InvestigationError('Failed to create investigation session', { projectUuid, organizationUuid, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
57
|
+
'Verify the project UUID is correct and active',
|
|
58
|
+
'Check if you have permission to create sessions in this project',
|
|
59
|
+
'Ensure the Hawkeye API is responding correctly',
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Send a prompt to an existing session
|
|
65
|
+
*/
|
|
66
|
+
async sendPrompt(sessionUuid, projectUuid, prompt, disableReplay = false) {
|
|
67
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
68
|
+
try {
|
|
69
|
+
logger.info('Sending prompt to session', { sessionUuid, promptLength: prompt.length });
|
|
70
|
+
const request = {
|
|
71
|
+
action: 'ACTION_NEXT',
|
|
72
|
+
session_uuid: sessionUuid,
|
|
73
|
+
project_uuid: projectUuid,
|
|
74
|
+
messages: [
|
|
75
|
+
{
|
|
76
|
+
content: {
|
|
77
|
+
content_type: 'CONTENT_TYPE_CHAT_PROMPT',
|
|
78
|
+
parts: [prompt],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
request: {
|
|
83
|
+
request_id: generateRequestId(),
|
|
84
|
+
},
|
|
85
|
+
prompt_options: {
|
|
86
|
+
disable_replay: disableReplay,
|
|
87
|
+
source_focus_categories: [],
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
const response = await this.httpClient.post(CONSTANTS.ENDPOINTS.SESSION_PROMPT, request, {
|
|
91
|
+
timeout: CONSTANTS.TIMEOUTS.LONG_REQUEST,
|
|
92
|
+
});
|
|
93
|
+
logger.info('Prompt sent successfully');
|
|
94
|
+
return response.data;
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
logger.error('Failed to send prompt', error);
|
|
98
|
+
throw new InvestigationError('Failed to send prompt to session', { sessionUuid, projectUuid, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
99
|
+
'Verify the session UUID is correct',
|
|
100
|
+
'Check if the session is still active',
|
|
101
|
+
'Ensure the prompt is properly formatted',
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Inspect a session to get its details and results
|
|
107
|
+
*/
|
|
108
|
+
async inspectSession(sessionUuid, projectUuid, organizationUuid) {
|
|
109
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
110
|
+
try {
|
|
111
|
+
logger.debug('Inspecting session', { sessionUuid });
|
|
112
|
+
const request = {
|
|
113
|
+
request: {
|
|
114
|
+
id: generateRequestId(),
|
|
115
|
+
},
|
|
116
|
+
session_uuid: sessionUuid,
|
|
117
|
+
project_uuid: projectUuid,
|
|
118
|
+
organization_uuid: organizationUuid,
|
|
119
|
+
};
|
|
120
|
+
const response = await this.httpClient.post(CONSTANTS.ENDPOINTS.SESSION_INSPECT, request);
|
|
121
|
+
return response.data;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
logger.error('Failed to inspect session', error);
|
|
125
|
+
throw new InvestigationError('Failed to inspect session', { sessionUuid, projectUuid, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
126
|
+
'Verify the session UUID is correct',
|
|
127
|
+
'Check if you have access to this session',
|
|
128
|
+
]);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* List sessions with optional filters (legacy method for backward compatibility)
|
|
133
|
+
*/
|
|
134
|
+
async listSessions(projectUuid, organizationUuid, filterByAlertId) {
|
|
135
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
136
|
+
try {
|
|
137
|
+
logger.debug('Listing sessions', { projectUuid, filterByAlertId });
|
|
138
|
+
const request = {
|
|
139
|
+
request: {
|
|
140
|
+
id: generateRequestId(),
|
|
141
|
+
},
|
|
142
|
+
project_uuid: projectUuid,
|
|
143
|
+
organization_uuid: organizationUuid,
|
|
144
|
+
};
|
|
145
|
+
// Add alert ID filter if provided
|
|
146
|
+
if (filterByAlertId) {
|
|
147
|
+
request.pagination = {
|
|
148
|
+
filters: [
|
|
149
|
+
{
|
|
150
|
+
key: 'incident_info.id',
|
|
151
|
+
value: filterByAlertId,
|
|
152
|
+
operator: 'in',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
const response = await this.httpClient.post(CONSTANTS.ENDPOINTS.SESSION_LIST, request);
|
|
158
|
+
return response.data.sessions || [];
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
logger.error('Failed to list sessions', error);
|
|
162
|
+
throw new InvestigationError('Failed to list sessions', { projectUuid, organizationUuid, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
163
|
+
'Verify the project UUID is correct',
|
|
164
|
+
'Check if you have access to this project',
|
|
165
|
+
]);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* List sessions with pagination and date filtering
|
|
170
|
+
*/
|
|
171
|
+
async listSessionsWithPagination(projectUuid, organizationUuid, options = {}) {
|
|
172
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
173
|
+
try {
|
|
174
|
+
logger.debug('Listing sessions with pagination', { projectUuid, options });
|
|
175
|
+
// Build pagination object
|
|
176
|
+
const pagination = {
|
|
177
|
+
limit: options.limit || 50,
|
|
178
|
+
sort: [{ field: 'create_time', ascending: false }],
|
|
179
|
+
start: options.page ? (options.page - 1) * (options.limit || 50) : 0,
|
|
180
|
+
};
|
|
181
|
+
// Add filters
|
|
182
|
+
const filters = [];
|
|
183
|
+
if (options.dateFrom) {
|
|
184
|
+
const fromDate = options.dateFrom.includes('T')
|
|
185
|
+
? options.dateFrom
|
|
186
|
+
: `${options.dateFrom}T00:00:00Z`;
|
|
187
|
+
filters.push({
|
|
188
|
+
key: 'create_time',
|
|
189
|
+
value: fromDate,
|
|
190
|
+
operator: 'gte',
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (options.dateTo) {
|
|
194
|
+
const toDate = options.dateTo.includes('T')
|
|
195
|
+
? options.dateTo
|
|
196
|
+
: `${options.dateTo}T23:59:59Z`;
|
|
197
|
+
filters.push({
|
|
198
|
+
key: 'create_time',
|
|
199
|
+
value: toDate,
|
|
200
|
+
operator: 'lte',
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
// Add investigation status filter if provided
|
|
204
|
+
if (options.investigationStatus) {
|
|
205
|
+
filters.push({
|
|
206
|
+
key: 'investigation_status',
|
|
207
|
+
value: options.investigationStatus,
|
|
208
|
+
operator: '==',
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
// Add session type filter if provided
|
|
212
|
+
if (options.sessionType) {
|
|
213
|
+
filters.push({
|
|
214
|
+
key: 'session_type',
|
|
215
|
+
value: options.sessionType,
|
|
216
|
+
operator: '==',
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
if (filters.length > 0) {
|
|
220
|
+
pagination.filters = filters;
|
|
221
|
+
}
|
|
222
|
+
const request = {
|
|
223
|
+
request: {
|
|
224
|
+
request_id: generateRequestId(),
|
|
225
|
+
client_identifier: 'mcp-server',
|
|
226
|
+
},
|
|
227
|
+
project_uuid: projectUuid,
|
|
228
|
+
organization_uuid: organizationUuid,
|
|
229
|
+
pagination,
|
|
230
|
+
hide_grouped_incidents: options.hideGroupedIncidents ?? false,
|
|
231
|
+
};
|
|
232
|
+
const response = await this.httpClient.post(CONSTANTS.ENDPOINTS.SESSION_LIST, request);
|
|
233
|
+
return response.data.sessions || [];
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
logger.error('Failed to list sessions with pagination', error);
|
|
237
|
+
throw new InvestigationError('Failed to list sessions', { projectUuid, organizationUuid, options, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
238
|
+
'Verify the project UUID is correct',
|
|
239
|
+
'Check the date format (ISO 8601 expected)',
|
|
240
|
+
'Ensure pagination parameters are valid',
|
|
241
|
+
]);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Find sessions by alert ID
|
|
246
|
+
*/
|
|
247
|
+
async findSessionsByAlertId(alertId, projectUuid, organizationUuid) {
|
|
248
|
+
logger.info('Finding sessions for alert', { alertId });
|
|
249
|
+
return this.listSessions(projectUuid, organizationUuid, alertId);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Poll for session completion
|
|
253
|
+
*/
|
|
254
|
+
async pollForCompletion(sessionUuid, projectUuid, organizationUuid, maxAttempts, intervalMs) {
|
|
255
|
+
const attempts = maxAttempts || this.config.maxPollAttempts;
|
|
256
|
+
const interval = intervalMs || this.config.pollIntervalMs;
|
|
257
|
+
logger.info('Polling for session completion', { sessionUuid, maxAttempts: attempts, intervalMs: interval });
|
|
258
|
+
for (let attempt = 1; attempt <= attempts; attempt++) {
|
|
259
|
+
const sessionDetails = await this.inspectSession(sessionUuid, projectUuid, organizationUuid);
|
|
260
|
+
// Check if session is complete
|
|
261
|
+
const isComplete = this.isSessionComplete(sessionDetails);
|
|
262
|
+
if (isComplete) {
|
|
263
|
+
logger.info(`Session completed after ${attempt} attempts`);
|
|
264
|
+
return sessionDetails;
|
|
265
|
+
}
|
|
266
|
+
// Not complete yet
|
|
267
|
+
if (attempt < attempts) {
|
|
268
|
+
logger.debug(`Session still in progress (attempt ${attempt}/${attempts}), waiting ${interval}ms...`);
|
|
269
|
+
await new Promise(resolve => setTimeout(resolve, interval));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// Timeout
|
|
273
|
+
logger.warn(`Session polling timed out after ${attempts} attempts`);
|
|
274
|
+
throw new InvestigationError('Investigation timed out', { sessionUuid, attempts }, [
|
|
275
|
+
'The investigation is taking longer than expected',
|
|
276
|
+
'You can check the status later using get_investigation_status',
|
|
277
|
+
'Consider increasing max_wait_seconds for complex investigations',
|
|
278
|
+
]);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Get session report with summary and time-saved metrics
|
|
282
|
+
*/
|
|
283
|
+
async getSessionReport(sessionUuids, projectUuid) {
|
|
284
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
285
|
+
try {
|
|
286
|
+
logger.debug('Getting session report', { sessionUuids, projectUuid });
|
|
287
|
+
const url = `${CONSTANTS.ENDPOINTS.SESSION_REPORT}?session_uuids=${sessionUuids.join(',')}&project_uuid=${projectUuid}`;
|
|
288
|
+
const response = await this.httpClient.get(url);
|
|
289
|
+
return response.data;
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
logger.error('Failed to get session report', error);
|
|
293
|
+
throw new InvestigationError('Failed to get session report', { sessionUuids, projectUuid, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
294
|
+
'Verify the session UUIDs are correct',
|
|
295
|
+
'Check if you have access to these sessions',
|
|
296
|
+
]);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Get session summary with quality scores
|
|
301
|
+
*/
|
|
302
|
+
async getSessionSummary(sessionUuid) {
|
|
303
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
304
|
+
try {
|
|
305
|
+
logger.debug('Getting session summary', { sessionUuid });
|
|
306
|
+
const url = `${CONSTANTS.ENDPOINTS.SESSION_SUMMARY}/${sessionUuid}`;
|
|
307
|
+
const response = await this.httpClient.get(url);
|
|
308
|
+
return response.data;
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
logger.error('Failed to get session summary', error);
|
|
312
|
+
throw new InvestigationError('Failed to get session summary', { sessionUuid, originalError: error instanceof Error ? error.message : String(error) }, [
|
|
313
|
+
'Verify the session UUID is correct',
|
|
314
|
+
'Check if the session has been scored',
|
|
315
|
+
]);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Get incident report with organization-wide analytics
|
|
320
|
+
*/
|
|
321
|
+
async getIncidentReport() {
|
|
322
|
+
await this.authService.getAccessToken(); // Ensure authenticated
|
|
323
|
+
try {
|
|
324
|
+
logger.debug('Getting incident report');
|
|
325
|
+
const response = await this.httpClient.get(CONSTANTS.ENDPOINTS.INCIDENT_REPORT);
|
|
326
|
+
return response.data;
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
logger.error('Failed to get incident report', error);
|
|
330
|
+
throw new InvestigationError('Failed to get incident report', { originalError: error instanceof Error ? error.message : String(error) }, [
|
|
331
|
+
'Check if you have permission to view incident reports',
|
|
332
|
+
'Ensure the Hawkeye API is responding correctly',
|
|
333
|
+
]);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Check if a session is complete based on its state
|
|
338
|
+
*/
|
|
339
|
+
isSessionComplete(session) {
|
|
340
|
+
// Check if final_answer is present (investigation complete)
|
|
341
|
+
if (session.final_answer) {
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
// Check state field if available
|
|
345
|
+
if (session.state) {
|
|
346
|
+
const completeStates = ['COMPLETED', 'completed', 'DONE', 'done', 'FINISHED', 'finished'];
|
|
347
|
+
return completeStates.includes(session.state);
|
|
348
|
+
}
|
|
349
|
+
// Check if chain_of_thoughts is present and final_answer exists
|
|
350
|
+
if (session.chain_of_thoughts && session.chain_of_thoughts.length > 0) {
|
|
351
|
+
// Sometimes final_answer is in the last chain of thought
|
|
352
|
+
return session.final_answer !== undefined;
|
|
353
|
+
}
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=session.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.service.js","sourceRoot":"","sources":["../../src/services/session.service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAUL,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,UAAU,CAAa;IACvB,WAAW,CAAwB;IACnC,MAAM,GAAG,SAAS,EAAE,CAAC;IAE7B,YAAY,UAAsB,EAAE,WAAkC;QACpE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CAAC,WAAmB,EAAE,gBAAwB,EAAE,SAAkB;QACnF,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,uBAAuB;QAEhE,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;YAEnE,mDAAmD;YACnD,MAAM,aAAa,GAAG,SAAS,IAAI,WAAW,CAAC;YAE/C,MAAM,OAAO,GAAyB;gBACpC,YAAY,EAAE,IAAI;gBAClB,UAAU,EAAE;oBACV,IAAI,EAAE,aAAa;iBACpB;gBACD,iBAAiB,EAAE,gBAAgB;gBACnC,YAAY,EAAE,WAAW;gBACzB,OAAO,EAAE;oBACP,UAAU,EAAE,iBAAiB,EAAE;iBAChC;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACzC,SAAS,C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C;YAClB,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YAC1F,OAAO,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;QAED,gEAAgE;QAChE,IAAI,OAAO,CAAC,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtE,yDAAyD;YACzD,OAAO,OAAO,CAAC,YAAY,KAAK,SAAS,CAAC;QAC5C,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_continue_investigation
|
|
3
|
+
* Asks follow-up questions in an existing investigation
|
|
4
|
+
*/
|
|
5
|
+
import { ToolServices } from './index.js';
|
|
6
|
+
import { ContinueInvestigationOutput } from '../types/mcp.js';
|
|
7
|
+
/**
|
|
8
|
+
* Continue an existing investigation
|
|
9
|
+
*/
|
|
10
|
+
export declare function continueInvestigation(services: ToolServices, args: unknown): Promise<ContinueInvestigationOutput>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_continue_investigation
|
|
3
|
+
* Asks follow-up questions in an existing investigation
|
|
4
|
+
*/
|
|
5
|
+
import { ContinueInvestigationInputSchema } from '../utils/validation.js';
|
|
6
|
+
import { getConfig } from '../config/config.js';
|
|
7
|
+
import { logger } from '../utils/logger.js';
|
|
8
|
+
/**
|
|
9
|
+
* Continue an existing investigation
|
|
10
|
+
*/
|
|
11
|
+
export async function continueInvestigation(services, args) {
|
|
12
|
+
const config = getConfig();
|
|
13
|
+
const input = ContinueInvestigationInputSchema.parse(args);
|
|
14
|
+
logger.info('Continuing investigation', {
|
|
15
|
+
sessionUuid: input.session_uuid,
|
|
16
|
+
promptLength: input.follow_up_prompt.length,
|
|
17
|
+
});
|
|
18
|
+
// Get project UUID (use default if not provided)
|
|
19
|
+
const projectUuid = input.project_uuid || (await services.projectService.getDefaultProject()).uuid;
|
|
20
|
+
const organizationUuid = config.defaultOrganizationUuid;
|
|
21
|
+
// Send the follow-up prompt
|
|
22
|
+
await services.sessionService.sendPrompt(input.session_uuid, projectUuid, input.follow_up_prompt);
|
|
23
|
+
logger.info('Follow-up prompt sent');
|
|
24
|
+
// If wait_for_completion is true, poll for results
|
|
25
|
+
if (input.wait_for_completion) {
|
|
26
|
+
logger.info('Waiting for follow-up to complete', {
|
|
27
|
+
maxWaitSeconds: input.max_wait_seconds,
|
|
28
|
+
});
|
|
29
|
+
const maxAttempts = Math.ceil(input.max_wait_seconds / (config.pollIntervalMs / 1000));
|
|
30
|
+
try {
|
|
31
|
+
const completedSession = await services.sessionService.pollForCompletion(input.session_uuid, projectUuid, organizationUuid, maxAttempts, config.pollIntervalMs);
|
|
32
|
+
return {
|
|
33
|
+
session_uuid: input.session_uuid,
|
|
34
|
+
status: 'completed',
|
|
35
|
+
investigation_results: formatInvestigationResults(completedSession),
|
|
36
|
+
message: 'Follow-up investigation completed',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
// Timeout or error during polling
|
|
41
|
+
return {
|
|
42
|
+
session_uuid: input.session_uuid,
|
|
43
|
+
status: 'in_progress',
|
|
44
|
+
message: `Follow-up prompt sent, but investigation not yet complete. Use hawkeye_get_investigation_status with session_uuid: ${input.session_uuid} to check progress.`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Return immediately without waiting
|
|
49
|
+
return {
|
|
50
|
+
session_uuid: input.session_uuid,
|
|
51
|
+
status: 'created',
|
|
52
|
+
message: `Follow-up prompt sent. Use hawkeye_get_investigation_status with session_uuid: ${input.session_uuid} to check progress.`,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Format investigation results from session details
|
|
57
|
+
*/
|
|
58
|
+
function formatInvestigationResults(session) {
|
|
59
|
+
return {
|
|
60
|
+
final_answer: session.final_answer,
|
|
61
|
+
chain_of_thoughts: session.chain_of_thoughts || [],
|
|
62
|
+
sources: session.sources || [],
|
|
63
|
+
follow_up_suggestions: generateFollowUpSuggestions(session),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Generate follow-up suggestions
|
|
68
|
+
*/
|
|
69
|
+
function generateFollowUpSuggestions(session) {
|
|
70
|
+
const suggestions = [];
|
|
71
|
+
if (session.final_answer) {
|
|
72
|
+
suggestions.push('Can you provide more details about the root cause?');
|
|
73
|
+
suggestions.push('What are the exact steps to remediate this issue?');
|
|
74
|
+
suggestions.push('How can we prevent this from happening again?');
|
|
75
|
+
}
|
|
76
|
+
if (session.chain_of_thoughts && session.chain_of_thoughts.length > 0) {
|
|
77
|
+
suggestions.push('Can you explain the investigation process in more detail?');
|
|
78
|
+
}
|
|
79
|
+
if (session.sources && session.sources.length > 0) {
|
|
80
|
+
suggestions.push('Which logs or metrics were most relevant to this investigation?');
|
|
81
|
+
}
|
|
82
|
+
return suggestions;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=continue-investigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continue-investigation.js","sourceRoot":"","sources":["../../src/tools/continue-investigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAG1E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,QAAsB,EACtB,IAAa;IAEb,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,CA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@@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_get_incident_report
|
|
3
|
+
* Gets comprehensive incident statistics and analytics across all investigations
|
|
4
|
+
*/
|
|
5
|
+
import { ToolServices } from './index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Get organization-wide incident report
|
|
8
|
+
* No input parameters required
|
|
9
|
+
*/
|
|
10
|
+
export declare function getIncidentReport(services: ToolServices, args: unknown): Promise<any>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_get_incident_report
|
|
3
|
+
* Gets comprehensive incident statistics and analytics across all investigations
|
|
4
|
+
*/
|
|
5
|
+
import { logger } from '../utils/logger.js';
|
|
6
|
+
/**
|
|
7
|
+
* Get organization-wide incident report
|
|
8
|
+
* No input parameters required
|
|
9
|
+
*/
|
|
10
|
+
export async function getIncidentReport(services, args) {
|
|
11
|
+
logger.info('Getting incident report');
|
|
12
|
+
// Get incident report
|
|
13
|
+
const report = await services.sessionService.getIncidentReport();
|
|
14
|
+
logger.info('Incident report retrieved');
|
|
15
|
+
// Format the response with additional calculated fields
|
|
16
|
+
return {
|
|
17
|
+
summary: {
|
|
18
|
+
total_incidents: report.total_incidents,
|
|
19
|
+
total_investigations: report.total_investigations,
|
|
20
|
+
noise_reduction_percent: report.noise_reduction,
|
|
21
|
+
avg_mttr: report.avg_mttr,
|
|
22
|
+
avg_investigation_time_saved_minutes: report.avg_investigation_time_saved_minutes,
|
|
23
|
+
total_investigation_time_saved_hours: report.total_investigation_time_saved_hours,
|
|
24
|
+
},
|
|
25
|
+
time_period: {
|
|
26
|
+
start_time: report.start_time,
|
|
27
|
+
end_time: report.end_time,
|
|
28
|
+
},
|
|
29
|
+
incident_type_reports: report.incident_type_reports.map((typeReport) => ({
|
|
30
|
+
incident_type: typeReport.incident_type,
|
|
31
|
+
priority_breakdown: typeReport.priority_reports.map((priorityReport) => ({
|
|
32
|
+
priority: priorityReport.priority,
|
|
33
|
+
total_incidents: priorityReport.total_incidents,
|
|
34
|
+
investigated_incidents: priorityReport.investigated_incidents,
|
|
35
|
+
investigation_coverage_percent: priorityReport.total_incidents > 0
|
|
36
|
+
? Math.round((priorityReport.investigated_incidents / priorityReport.total_incidents) * 100)
|
|
37
|
+
: 0,
|
|
38
|
+
percent_grouped: priorityReport.percent_grouped,
|
|
39
|
+
avg_mttr: priorityReport.avg_mttr,
|
|
40
|
+
avg_investigation_time_minutes: priorityReport.avg_investigation_time_minutes,
|
|
41
|
+
avg_time_saved_minutes: priorityReport.avg_time_saved_minutes,
|
|
42
|
+
})),
|
|
43
|
+
})),
|
|
44
|
+
key_insights: generateKeyInsights(report),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Generate key insights from the incident report
|
|
49
|
+
*/
|
|
50
|
+
function generateKeyInsights(report) {
|
|
51
|
+
const insights = [];
|
|
52
|
+
insights.push(`Total time saved: ${report.total_investigation_time_saved_hours} hours across ${report.total_investigations} investigations`);
|
|
53
|
+
insights.push(`Noise reduction: ${report.noise_reduction}% of incidents were automatically grouped or filtered`);
|
|
54
|
+
insights.push(`Average investigation time saved: ${report.avg_investigation_time_saved_minutes} minutes per incident`);
|
|
55
|
+
// Find highest priority incidents
|
|
56
|
+
const highPriorityTypes = report.incident_type_reports.filter((t) => t.priority_reports.some((p) => p.priority === 'P1' || p.priority === 'P0'));
|
|
57
|
+
if (highPriorityTypes.length > 0) {
|
|
58
|
+
insights.push(`High priority incidents detected across ${highPriorityTypes.length} incident types`);
|
|
59
|
+
}
|
|
60
|
+
return insights;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=get-incident-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-incident-report.js","sourceRoot":"","sources":["../../src/tools/get-incident-report.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;GAGG;AACH,MA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E,cAAc,CAAC,QAAQ;gBACjC,8BAA8B,EAAE,cAAc,CAAC,8BAA8B;gBAC7E,sBAAsB,EAAE,cAAc,CAAC,sBAAsB;aAC9D,CAAC,CAAC;SACJ,CAAC,CAAC;QACH,YAAY,EAAE,mBAAmB,CAAC,MAAM,CAAC;KAC1C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,MAAW;IACtC,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,QAAQ,CAAC,IAAI,CACX,qBAAqB,MAAM,CAAC,oCAAoC,iBAAiB,MAAM,CAAC,oBAAoB,iBAAiB,CAC9H,CAAC;IAEF,QAAQ,CAAC,IAAI,CACX,oBAAoB,MAAM,CAAC,eAAe,uDAAuD,CAClG,CAAC;IAEF,QAAQ,CAAC,IAAI,CACX,qCAAqC,MAAM,CAAC,oCAAoC,uBAAuB,CACxG,CAAC;IAEF,kCAAkC;IAClC,MAAM,iBAAiB,GAAG,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CACvE,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAChF,CAAC;IAEF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,QAAQ,CAAC,IAAI,CACX,2CAA2C,iBAAiB,CAAC,MAAM,iBAAiB,CACrF,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_get_session_report
|
|
3
|
+
* Gets summary reports for one or more sessions with time-saved metrics
|
|
4
|
+
*/
|
|
5
|
+
import { ToolServices } from './index.js';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Input validation schema
|
|
9
|
+
*/
|
|
10
|
+
declare const GetSessionReportInputSchema: z.ZodObject<{
|
|
11
|
+
session_uuids: z.ZodArray<z.ZodString, "many">;
|
|
12
|
+
project_uuid: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
project_uuid: string;
|
|
15
|
+
session_uuids: string[];
|
|
16
|
+
}, {
|
|
17
|
+
project_uuid: string;
|
|
18
|
+
session_uuids: string[];
|
|
19
|
+
}>;
|
|
20
|
+
export type GetSessionReportInput = z.infer<typeof GetSessionReportInputSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* Get session reports with summaries and metrics
|
|
23
|
+
*/
|
|
24
|
+
export declare function getSessionReport(services: ToolServices, args: unknown): Promise<any>;
|
|
25
|
+
export {};
|