hawkeye-mcp-server 1.2.1 → 1.3.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 +54 -0
- package/README.md +50 -13
- package/USAGE.md +196 -41
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/tools/get-chain-of-thought.d.ts +35 -0
- package/build/tools/get-chain-of-thought.js +83 -0
- package/build/tools/get-chain-of-thought.js.map +1 -0
- package/build/tools/get-follow-up-suggestions.d.ts +32 -0
- package/build/tools/get-follow-up-suggestions.js +67 -0
- package/build/tools/get-follow-up-suggestions.js.map +1 -0
- package/build/tools/get-investigation-queries.d.ts +32 -0
- package/build/tools/get-investigation-queries.js +81 -0
- package/build/tools/get-investigation-queries.js.map +1 -0
- package/build/tools/get-investigation-sources.d.ts +32 -0
- package/build/tools/get-investigation-sources.js +109 -0
- package/build/tools/get-investigation-sources.js.map +1 -0
- package/build/tools/get-rca.d.ts +32 -0
- package/build/tools/get-rca.js +76 -0
- package/build/tools/get-rca.js.map +1 -0
- package/build/tools/index.d.ts +2 -0
- package/build/tools/index.js +196 -1
- package/build/tools/index.js.map +1 -1
- package/build/tools/inspect-session.d.ts +7 -1
- package/build/tools/inspect-session.js +16 -7
- package/build/tools/inspect-session.js.map +1 -1
- package/build/tools/switch-instance.js +2 -0
- package/build/tools/switch-instance.js.map +1 -1
- package/build/utils/http-client.d.ts +9 -0
- package/build/utils/http-client.js +14 -0
- package/build/utils/http-client.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,60 @@ All notable changes to the Hawkeye MCP Server will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.3.0] - 2025-11-21
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **NEW TOOLS: Investigation Data Breakdown** - Redesigned `hawkeye_inspect_session` into 6 focused tools for better performance and UX:
|
|
12
|
+
- `hawkeye_get_rca` ⭐ **NEW** - Get RCA summary only (2-5k tokens, ~10x faster)
|
|
13
|
+
- `hawkeye_get_chain_of_thought` **NEW** - Get investigation reasoning steps
|
|
14
|
+
- `hawkeye_get_investigation_queries` **NEW** - Get query execution logs
|
|
15
|
+
- `hawkeye_get_investigation_sources` **NEW** - Get data sources consulted
|
|
16
|
+
- `hawkeye_get_follow_up_suggestions` **NEW** - Get suggested follow-up questions
|
|
17
|
+
- `hawkeye_inspect_session` **MODIFIED** - Now returns metadata only (1k tokens vs 48k)
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- **10x Performance Improvement** - Initial investigation summary retrieval now uses ~2-5k tokens instead of ~48k
|
|
21
|
+
- **Progressive Disclosure Workflow** - Users can now fetch exactly what they need: summary → reasoning → queries → sources
|
|
22
|
+
- **Updated Documentation** - README, USAGE, and examples updated to showcase new workflow
|
|
23
|
+
- **Better Tool Descriptions** - Each tool now has clear purpose and usage guidance
|
|
24
|
+
|
|
25
|
+
### Benefits
|
|
26
|
+
- ⚡ **10x faster** response times for common use cases
|
|
27
|
+
- 🎯 **Get exactly what you need** - no more overwhelming data dumps
|
|
28
|
+
- 💰 **Token efficient** - significantly reduced API costs
|
|
29
|
+
- 🔍 **Better UX** - natural progressive investigation flow
|
|
30
|
+
|
|
31
|
+
### Technical Details
|
|
32
|
+
- All new tools share the same `inspectSession` service call for consistency
|
|
33
|
+
- Backward compatible - existing `inspect_session` calls still work (now return metadata only)
|
|
34
|
+
- New tool files:
|
|
35
|
+
- `src/tools/get-rca.ts`
|
|
36
|
+
- `src/tools/get-chain-of-thought.ts`
|
|
37
|
+
- `src/tools/get-investigation-queries.ts`
|
|
38
|
+
- `src/tools/get-investigation-sources.ts`
|
|
39
|
+
- `src/tools/get-follow-up-suggestions.ts`
|
|
40
|
+
- Comprehensive test suite included (`test-new-tools.mjs`)
|
|
41
|
+
- Complete documentation in `TOOL_REDESIGN_SUMMARY.md`
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [1.2.2] - 2025-11-20
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
- **Critical Bug: Instance Switching Now Works Correctly** - Fixed bug where switching instances updated the config but not the HttpClient's axios instance, causing all API calls to still go to the previous instance
|
|
49
|
+
- Added `setBaseUrl()` method to HttpClient to update the axios baseURL at runtime
|
|
50
|
+
- Added `getBaseUrl()` method to HttpClient for debugging
|
|
51
|
+
- Updated `switchInstance` tool to call `httpClient.setBaseUrl()` when switching instances
|
|
52
|
+
- Updated ToolServices interface to include httpClient reference
|
|
53
|
+
- Instance switching now properly routes all subsequent API calls to the new instance
|
|
54
|
+
|
|
55
|
+
### Technical Details
|
|
56
|
+
- The bug occurred because HttpClient was initialized once at server startup with a base URL
|
|
57
|
+
- When switching instances, the config was updated but the HttpClient's internal axios instance retained the old URL
|
|
58
|
+
- The fix ensures both config and HttpClient are updated atomically during instance switching
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
8
62
|
## [1.2.1] - 2025-11-20
|
|
9
63
|
|
|
10
64
|
### Enhanced
|
package/README.md
CHANGED
|
@@ -190,14 +190,16 @@ Analyze a specific alert by ID:
|
|
|
190
190
|
|
|
191
191
|
The server automatically finds existing investigations or creates a new one.
|
|
192
192
|
|
|
193
|
-
### 4. Get Investigation
|
|
193
|
+
### 4. Get Investigation RCA
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
View the Root Cause Analysis summary (recommended first step):
|
|
196
196
|
|
|
197
197
|
```
|
|
198
|
-
"Show me the
|
|
198
|
+
"Show me the RCA for session abc-123-def-456"
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
+
The server will use `hawkeye_get_rca` to return just the summary (~10x faster than full details).
|
|
202
|
+
|
|
201
203
|
### 5. View Analytics
|
|
202
204
|
|
|
203
205
|
Get organization-wide incident statistics:
|
|
@@ -248,18 +250,36 @@ Useful for users managing multiple environments (dev, staging, production) or mu
|
|
|
248
250
|
|
|
249
251
|
The Hawkeye MCP Server provides the following tools to AI agents:
|
|
250
252
|
|
|
253
|
+
### Investigation Tools
|
|
251
254
|
| Tool | Description |
|
|
252
255
|
|------|-------------|
|
|
253
|
-
| `hawkeye_list_projects` | List all available Hawkeye projects |
|
|
254
256
|
| `hawkeye_investigate_alert` | Investigate a specific alert/incident by ID |
|
|
255
257
|
| `hawkeye_get_investigation_status` | Check the status of an ongoing investigation |
|
|
256
258
|
| `hawkeye_continue_investigation` | Ask follow-up questions on an investigation |
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
|
|
260
|
+
### Session Management & Analysis
|
|
261
|
+
| Tool | Description |
|
|
262
|
+
|------|-------------|
|
|
263
|
+
| `hawkeye_list_sessions` | List sessions with filtering (uninvestigated, date range, search, etc.) |
|
|
264
|
+
| `hawkeye_inspect_session` | Get session metadata and prompt cycle IDs |
|
|
265
|
+
| `hawkeye_get_rca` | **⭐ NEW** Get the RCA summary (use this first!) |
|
|
266
|
+
| `hawkeye_get_chain_of_thought` | **NEW** Get investigation reasoning steps |
|
|
267
|
+
| `hawkeye_get_investigation_queries` | **NEW** Get query execution logs |
|
|
268
|
+
| `hawkeye_get_investigation_sources` | **NEW** Get data sources consulted |
|
|
269
|
+
| `hawkeye_get_follow_up_suggestions` | **NEW** Get suggested follow-up questions |
|
|
270
|
+
|
|
271
|
+
### Analytics & Reporting
|
|
272
|
+
| Tool | Description |
|
|
273
|
+
|------|-------------|
|
|
259
274
|
| `hawkeye_get_session_report` | Get summary reports with time-saved metrics |
|
|
260
275
|
| `hawkeye_get_session_summary` | Get quality scores and analysis metrics |
|
|
261
276
|
| `hawkeye_get_incident_report` | Get organization-wide incident analytics |
|
|
262
|
-
|
|
277
|
+
|
|
278
|
+
### Configuration
|
|
279
|
+
| Tool | Description |
|
|
280
|
+
|------|-------------|
|
|
281
|
+
| `hawkeye_list_projects` | List all available Hawkeye projects |
|
|
282
|
+
| `hawkeye_switch_instance` | Switch to a different Hawkeye instance (dev/staging/prod) |
|
|
263
283
|
|
|
264
284
|
See the [API Reference](./SPECIFICATION.md) for detailed documentation on each tool.
|
|
265
285
|
|
|
@@ -376,15 +396,32 @@ Result:
|
|
|
376
396
|
|
|
377
397
|
### Example 3: Deep Dive into an Investigation
|
|
378
398
|
|
|
399
|
+
**New Workflow (Recommended):**
|
|
400
|
+
```
|
|
401
|
+
You: "Show me the RCA for session abc-123"
|
|
402
|
+
|
|
403
|
+
Agent: *Uses hawkeye_get_rca - Returns summary in ~1 second*
|
|
404
|
+
|
|
405
|
+
You: "How did you arrive at that conclusion?"
|
|
406
|
+
|
|
407
|
+
Agent: *Uses hawkeye_get_chain_of_thought - Returns reasoning steps*
|
|
408
|
+
|
|
409
|
+
You: "What data sources did you check?"
|
|
410
|
+
|
|
411
|
+
Agent: *Uses hawkeye_get_investigation_sources - Returns 24 sources*
|
|
379
412
|
```
|
|
380
|
-
You: "Show me session abc-123 with all sources and chain of thought"
|
|
381
413
|
|
|
382
|
-
|
|
383
|
-
- All prompt cycles
|
|
384
|
-
- Chain of thoughts (reasoning steps)
|
|
385
|
-
- Data sources consulted
|
|
386
|
-
- Follow-up suggestions
|
|
414
|
+
**Old Workflow (Still Supported):**
|
|
387
415
|
```
|
|
416
|
+
You: "Show me full details for session abc-123"
|
|
417
|
+
|
|
418
|
+
Agent: *Uses hawkeye_inspect_session - Returns metadata only*
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Benefits of New Workflow:**
|
|
422
|
+
- ⚡ 10x faster (smaller responses)
|
|
423
|
+
- 🎯 Get exactly what you need
|
|
424
|
+
- 📊 Progressive disclosure (summary → details)
|
|
388
425
|
|
|
389
426
|
For more examples, see the [Usage Guide](./USAGE.md).
|
|
390
427
|
|
package/USAGE.md
CHANGED
|
@@ -79,14 +79,24 @@ Response:
|
|
|
79
79
|
...
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
**Step 3:
|
|
82
|
+
**Step 3: Get RCA Summary (Recommended)**
|
|
83
83
|
|
|
84
84
|
```
|
|
85
|
-
You: "Show me the
|
|
85
|
+
You: "Show me the RCA for session 68c3663ff7afd98ca1b1ebe2"
|
|
86
86
|
|
|
87
|
-
Agent: *Calls
|
|
87
|
+
Agent: *Calls hawkeye_get_rca*
|
|
88
88
|
|
|
89
|
-
Response:
|
|
89
|
+
Response: Root Cause Analysis summary (fast, focused response)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Step 4: Dig Deeper (Optional)**
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
You: "How did you arrive at that conclusion?"
|
|
96
|
+
|
|
97
|
+
Agent: *Calls hawkeye_get_chain_of_thought*
|
|
98
|
+
|
|
99
|
+
Response: Investigation reasoning steps with data sources
|
|
90
100
|
```
|
|
91
101
|
|
|
92
102
|
---
|
|
@@ -185,50 +195,99 @@ Response: Investigation 85% complete, currently analyzing logs...
|
|
|
185
195
|
|
|
186
196
|
---
|
|
187
197
|
|
|
188
|
-
### Workflow 3: Deep Diving into an Investigation
|
|
198
|
+
### Workflow 3: Deep Diving into an Investigation (New Improved Workflow)
|
|
189
199
|
|
|
190
|
-
When you want to understand how Hawkeye reached its conclusions:
|
|
200
|
+
When you want to understand how Hawkeye reached its conclusions, use the progressive disclosure approach:
|
|
191
201
|
|
|
192
|
-
**Get
|
|
202
|
+
**Step 1: Get RCA Summary (Start Here)**
|
|
193
203
|
|
|
194
204
|
```
|
|
195
|
-
You: "Show me
|
|
205
|
+
You: "Show me the RCA for session 68c3663ff7afd98ca1b1ebe2"
|
|
196
206
|
|
|
197
|
-
Agent: *Calls
|
|
207
|
+
Agent: *Calls hawkeye_get_rca*
|
|
198
208
|
|
|
199
|
-
Response
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
209
|
+
Response:
|
|
210
|
+
Root Cause Analysis:
|
|
211
|
+
The ImagePullBackOff error is caused by an invalid image registry
|
|
212
|
+
configuration. The deployment references a private registry that
|
|
213
|
+
requires authentication, but the image pull secret is missing
|
|
214
|
+
from the namespace...
|
|
215
|
+
|
|
216
|
+
[4,334 characters - fast response]
|
|
205
217
|
```
|
|
206
218
|
|
|
207
|
-
**
|
|
219
|
+
**Step 2: Understand the Reasoning (If Needed)**
|
|
208
220
|
|
|
209
221
|
```
|
|
210
|
-
|
|
211
|
-
Name: Incident: 217
|
|
212
|
-
Created: 2025-09-12T00:15:59Z
|
|
222
|
+
You: "How did you figure that out?"
|
|
213
223
|
|
|
214
|
-
|
|
215
|
-
Status: COMPLETED
|
|
216
|
-
Final Answer: "The ImagePullBackOff error is caused by..."
|
|
224
|
+
Agent: *Calls hawkeye_get_chain_of_thought*
|
|
217
225
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
Response:
|
|
227
|
+
Chain of Thought Steps:
|
|
228
|
+
1. [discovery] Database Connection Metrics Analysis
|
|
229
|
+
- Description: What are the database connection metrics...
|
|
230
|
+
- Investigation: During the analysis window, connection count was...
|
|
231
|
+
- Sources: 8 sources consulted
|
|
232
|
+
|
|
233
|
+
2. [analysis] Root Cause Identification
|
|
234
|
+
- Description: Identifying the primary cause...
|
|
235
|
+
- Investigation: Based on error patterns and timeline...
|
|
236
|
+
- Sources: 5 sources consulted
|
|
237
|
+
```
|
|
222
238
|
|
|
223
|
-
|
|
224
|
-
- Kubernetes Events (234 events analyzed)
|
|
225
|
-
- Pod Logs (15 pods checked)
|
|
226
|
-
- Deployment History (last 5 deployments)
|
|
239
|
+
**Step 3: Check Data Sources (If Needed)**
|
|
227
240
|
|
|
228
|
-
Follow-up Suggestions:
|
|
229
|
-
- "Would you like me to check if this affects other namespaces?"
|
|
230
|
-
- "Should I analyze the image registry configuration?"
|
|
231
241
|
```
|
|
242
|
+
You: "What data did you look at?"
|
|
243
|
+
|
|
244
|
+
Agent: *Calls hawkeye_get_investigation_sources*
|
|
245
|
+
|
|
246
|
+
Response:
|
|
247
|
+
Data Sources Consulted (24 total):
|
|
248
|
+
Logs (6):
|
|
249
|
+
- log_aws_poc_sandbox.log_aws_cloudtrail_logs_cloud_events
|
|
250
|
+
- log_aws_poc_sandbox.log_rdsosmetrics
|
|
251
|
+
Metrics (1):
|
|
252
|
+
- metric_aws_rds_poc_sandbox.databaseconnections
|
|
253
|
+
Config (3):
|
|
254
|
+
- config_aws_poc_sandbox.aws_rds_instances
|
|
255
|
+
- config_aws_poc_sandbox.aws_rds_clusters
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Step 4: View Query Details (For Debugging)**
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
You: "What queries did you run?"
|
|
262
|
+
|
|
263
|
+
Agent: *Calls hawkeye_get_investigation_queries*
|
|
264
|
+
|
|
265
|
+
Response:
|
|
266
|
+
Query Execution Log (59 queries):
|
|
267
|
+
1. Chain of Thought: Database Connection Metrics
|
|
268
|
+
Query: SELECT MIN(minimum), AVG(average)...
|
|
269
|
+
Result: Min: 0.0, Avg: 0.491892
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Step 5: Get Follow-up Suggestions**
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
You: "What else should I investigate?"
|
|
276
|
+
|
|
277
|
+
Agent: *Calls hawkeye_get_follow_up_suggestions*
|
|
278
|
+
|
|
279
|
+
Response:
|
|
280
|
+
Suggested Follow-up Questions:
|
|
281
|
+
1. What application is running on host IP 172.31.64.56?
|
|
282
|
+
2. When was the 'ghosts' table last used?
|
|
283
|
+
3. Are there other instances experiencing similar errors?
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Benefits of New Workflow:**
|
|
287
|
+
- ⚡ **10x faster**: Get RCA summary first (2-5k tokens vs 48k)
|
|
288
|
+
- 🎯 **Progressive disclosure**: Start simple, drill down as needed
|
|
289
|
+
- 💰 **Token efficient**: Only fetch what you need
|
|
290
|
+
- 🔍 **Better UX**: Natural investigation flow
|
|
232
291
|
|
|
233
292
|
---
|
|
234
293
|
|
|
@@ -418,19 +477,115 @@ The `search_term` parameter performs case-insensitive partial matching on incide
|
|
|
418
477
|
|
|
419
478
|
### 4. hawkeye_inspect_session
|
|
420
479
|
|
|
421
|
-
**Purpose:** Get
|
|
480
|
+
**Purpose:** Get session metadata and prompt cycle IDs (lightweight overview)
|
|
481
|
+
|
|
482
|
+
**When to use:**
|
|
483
|
+
- Getting session overview
|
|
484
|
+
- Checking available prompt cycles
|
|
485
|
+
- Quick session status check
|
|
486
|
+
|
|
487
|
+
**Example:**
|
|
488
|
+
```
|
|
489
|
+
"Show me session abc-123 metadata"
|
|
490
|
+
"What prompt cycles are available for session XYZ?"
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Note:** For detailed investigation data, use the focused tools below instead.
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
### 4a. hawkeye_get_rca ⭐ (NEW - Recommended First Step)
|
|
498
|
+
|
|
499
|
+
**Purpose:** Get the Root Cause Analysis summary only
|
|
500
|
+
|
|
501
|
+
**When to use:**
|
|
502
|
+
- **90% of use cases - start here!**
|
|
503
|
+
- Quick incident summary
|
|
504
|
+
- Understanding what happened
|
|
505
|
+
- Fast RCA retrieval (~10x faster than full inspect)
|
|
506
|
+
|
|
507
|
+
**Example:**
|
|
508
|
+
```
|
|
509
|
+
"Show me the RCA for session abc-123"
|
|
510
|
+
"What was the root cause of that investigation?"
|
|
511
|
+
"Get me the incident summary for session XYZ"
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
**Benefits:**
|
|
515
|
+
- Fast response (2-5k tokens vs 48k)
|
|
516
|
+
- Focused on the answer
|
|
517
|
+
- No unnecessary details
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
### 4b. hawkeye_get_chain_of_thought (NEW)
|
|
522
|
+
|
|
523
|
+
**Purpose:** Get investigation reasoning steps
|
|
524
|
+
|
|
525
|
+
**When to use:**
|
|
526
|
+
- Understanding HOW Hawkeye reached conclusions
|
|
527
|
+
- Reviewing investigation methodology
|
|
528
|
+
- Validating the analysis approach
|
|
529
|
+
|
|
530
|
+
**Example:**
|
|
531
|
+
```
|
|
532
|
+
"How did you figure that out?"
|
|
533
|
+
"Show me the reasoning steps for session abc-123"
|
|
534
|
+
"Explain your investigation methodology"
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
### 4c. hawkeye_get_investigation_queries (NEW)
|
|
540
|
+
|
|
541
|
+
**Purpose:** Get query execution logs
|
|
542
|
+
|
|
543
|
+
**When to use:**
|
|
544
|
+
- Debugging missing data
|
|
545
|
+
- Understanding what queries were run
|
|
546
|
+
- Validating data collection
|
|
547
|
+
|
|
548
|
+
**Example:**
|
|
549
|
+
```
|
|
550
|
+
"What queries did you run?"
|
|
551
|
+
"Show me the query execution logs"
|
|
552
|
+
"Why didn't you find the application logs?"
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
### 4d. hawkeye_get_investigation_sources (NEW)
|
|
558
|
+
|
|
559
|
+
**Purpose:** Get data sources consulted during investigation
|
|
560
|
+
|
|
561
|
+
**When to use:**
|
|
562
|
+
- Verifying which data was examined
|
|
563
|
+
- Checking if specific logs were consulted
|
|
564
|
+
- Understanding investigation scope
|
|
565
|
+
|
|
566
|
+
**Example:**
|
|
567
|
+
```
|
|
568
|
+
"What data sources did you check?"
|
|
569
|
+
"Did you look at the application logs?"
|
|
570
|
+
"Show me all sources consulted"
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
### 4e. hawkeye_get_follow_up_suggestions (NEW)
|
|
576
|
+
|
|
577
|
+
**Purpose:** Get suggested follow-up questions
|
|
422
578
|
|
|
423
579
|
**When to use:**
|
|
424
|
-
-
|
|
425
|
-
-
|
|
426
|
-
-
|
|
427
|
-
- Getting follow-up suggestions
|
|
580
|
+
- Discovering what to investigate next
|
|
581
|
+
- Getting investigation suggestions
|
|
582
|
+
- Continuing analysis
|
|
428
583
|
|
|
429
584
|
**Example:**
|
|
430
585
|
```
|
|
431
|
-
"
|
|
432
|
-
"What
|
|
433
|
-
"
|
|
586
|
+
"What else should I investigate?"
|
|
587
|
+
"What are the suggested next steps?"
|
|
588
|
+
"Give me follow-up questions"
|
|
434
589
|
```
|
|
435
590
|
|
|
436
591
|
---
|
package/build/index.js
CHANGED
|
@@ -27,6 +27,7 @@ function initializeServices() {
|
|
|
27
27
|
const projectService = new ProjectService(httpClient, authService);
|
|
28
28
|
const sessionService = new SessionService(httpClient, authService);
|
|
29
29
|
return {
|
|
30
|
+
httpClient,
|
|
30
31
|
authService,
|
|
31
32
|
projectService,
|
|
32
33
|
sessionService,
|
|
@@ -83,6 +84,7 @@ async function main() {
|
|
|
83
84
|
}
|
|
84
85
|
// Execute the tool
|
|
85
86
|
const toolServices = {
|
|
87
|
+
httpClient: services.httpClient,
|
|
86
88
|
authService: services.authService,
|
|
87
89
|
projectService: services.projectService,
|
|
88
90
|
sessionService: services.sessionService,
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAE5C,8BAA8B;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,WAAW;AACX,O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C,CAAC;QAClF,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,MAAM,mBAAmB,CAAC,CAAC;IAC5D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,OAAO;IACpB,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,kBAAkB;AAClB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAE/B,mBAAmB;AACnB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_get_chain_of_thought
|
|
3
|
+
* Gets the investigation reasoning steps (chain of thoughts) for a session
|
|
4
|
+
* Use this after viewing the RCA to understand HOW the investigation arrived at its conclusions
|
|
5
|
+
*/
|
|
6
|
+
import { ToolServices } from './index.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Input validation schema
|
|
10
|
+
*/
|
|
11
|
+
declare const GetChainOfThoughtInputSchema: z.ZodObject<{
|
|
12
|
+
session_uuid: z.ZodString;
|
|
13
|
+
prompt_cycle_id: z.ZodOptional<z.ZodString>;
|
|
14
|
+
category_filter: z.ZodOptional<z.ZodString>;
|
|
15
|
+
project_uuid: z.ZodOptional<z.ZodString>;
|
|
16
|
+
organization_uuid: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
session_uuid: string;
|
|
19
|
+
project_uuid?: string | undefined;
|
|
20
|
+
organization_uuid?: string | undefined;
|
|
21
|
+
prompt_cycle_id?: string | undefined;
|
|
22
|
+
category_filter?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
session_uuid: string;
|
|
25
|
+
project_uuid?: string | undefined;
|
|
26
|
+
organization_uuid?: string | undefined;
|
|
27
|
+
prompt_cycle_id?: string | undefined;
|
|
28
|
+
category_filter?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export type GetChainOfThoughtInput = z.infer<typeof GetChainOfThoughtInputSchema>;
|
|
31
|
+
/**
|
|
32
|
+
* Get chain of thought for a session
|
|
33
|
+
*/
|
|
34
|
+
export declare function getChainOfThought(services: ToolServices, args: unknown): Promise<any>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_get_chain_of_thought
|
|
3
|
+
* Gets the investigation reasoning steps (chain of thoughts) for a session
|
|
4
|
+
* Use this after viewing the RCA to understand HOW the investigation arrived at its conclusions
|
|
5
|
+
*/
|
|
6
|
+
import { getConfig } from '../config/config.js';
|
|
7
|
+
import { logger } from '../utils/logger.js';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* Input validation schema
|
|
11
|
+
*/
|
|
12
|
+
const GetChainOfThoughtInputSchema = z.object({
|
|
13
|
+
session_uuid: z.string(),
|
|
14
|
+
prompt_cycle_id: z.string().optional(),
|
|
15
|
+
category_filter: z.string().optional(),
|
|
16
|
+
project_uuid: z.string().optional(),
|
|
17
|
+
organization_uuid: z.string().optional(),
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Get chain of thought for a session
|
|
21
|
+
*/
|
|
22
|
+
export async function getChainOfThought(services, args) {
|
|
23
|
+
const config = getConfig();
|
|
24
|
+
const input = GetChainOfThoughtInputSchema.parse(args);
|
|
25
|
+
logger.info('Getting chain of thought for session', { sessionUuid: input.session_uuid });
|
|
26
|
+
// Get project UUID (use default if not provided)
|
|
27
|
+
const projectUuid = input.project_uuid || (await services.projectService.getDefaultProject()).uuid;
|
|
28
|
+
const organizationUuid = input.organization_uuid || config.defaultOrganizationUuid;
|
|
29
|
+
// Inspect the session
|
|
30
|
+
const sessionDetails = await services.sessionService.inspectSession(input.session_uuid, projectUuid, organizationUuid);
|
|
31
|
+
const prompt_cycles = sessionDetails.prompt_cycle || [];
|
|
32
|
+
if (prompt_cycles.length === 0) {
|
|
33
|
+
return {
|
|
34
|
+
session_uuid: input.session_uuid,
|
|
35
|
+
chain_of_thoughts: [],
|
|
36
|
+
message: 'No prompt cycles found for this session. The investigation may not have completed yet.',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
// Find the requested prompt cycle or use the first one
|
|
40
|
+
let targetCycle;
|
|
41
|
+
if (input.prompt_cycle_id) {
|
|
42
|
+
targetCycle = prompt_cycles.find((cycle) => cycle.id === input.prompt_cycle_id);
|
|
43
|
+
if (!targetCycle) {
|
|
44
|
+
return {
|
|
45
|
+
session_uuid: input.session_uuid,
|
|
46
|
+
prompt_cycle_id: input.prompt_cycle_id,
|
|
47
|
+
chain_of_thoughts: [],
|
|
48
|
+
message: `Prompt cycle with ID ${input.prompt_cycle_id} not found.`,
|
|
49
|
+
available_prompt_cycle_ids: prompt_cycles.map((c) => c.id),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
targetCycle = prompt_cycles[0];
|
|
55
|
+
}
|
|
56
|
+
let chain_of_thoughts = targetCycle.chain_of_thoughts || [];
|
|
57
|
+
// Apply category filter if provided
|
|
58
|
+
if (input.category_filter) {
|
|
59
|
+
chain_of_thoughts = chain_of_thoughts.filter((cot) => cot.category === input.category_filter);
|
|
60
|
+
}
|
|
61
|
+
// Format the chain of thoughts for better readability
|
|
62
|
+
const formatted_cots = chain_of_thoughts.map((cot) => ({
|
|
63
|
+
id: cot.id,
|
|
64
|
+
category: cot.category,
|
|
65
|
+
description: cot.description,
|
|
66
|
+
explanation: cot.explanation,
|
|
67
|
+
investigation: cot.investigation,
|
|
68
|
+
status: cot.status,
|
|
69
|
+
sources_involved: cot.sources_involved || [],
|
|
70
|
+
}));
|
|
71
|
+
logger.info('Chain of thought retrieved successfully', { count: formatted_cots.length });
|
|
72
|
+
return {
|
|
73
|
+
session_uuid: input.session_uuid,
|
|
74
|
+
prompt_cycle_id: targetCycle.id,
|
|
75
|
+
chain_of_thoughts: formatted_cots,
|
|
76
|
+
total_steps: formatted_cots.length,
|
|
77
|
+
categories: [...new Set(chain_of_thoughts.map((cot) => cot.category))],
|
|
78
|
+
hint: input.category_filter
|
|
79
|
+
? undefined
|
|
80
|
+
: 'Use category_filter parameter to filter by specific categories (e.g., "discovery", "analysis")',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=get-chain-of-thought.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-chain-of-thought.js","sourceRoot":"","sources":["../../src/tools/get-chain-of-thought.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,CAAC,CAAC,MAAM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/B,iBAAiB,EAAE,cAAc;QACjC,WAAW,EAAE,cAAc,CAAC,MAAM;QAClC,UAAU,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3E,IAAI,EAAE,KAAK,CAAC,eAAe;YACzB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,gGAAgG;KACrG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool: hawkeye_get_follow_up_suggestions
|
|
3
|
+
* Gets suggested follow-up questions from the investigation
|
|
4
|
+
* Use this to discover what additional questions you might want to ask
|
|
5
|
+
*/
|
|
6
|
+
import { ToolServices } from './index.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Input validation schema
|
|
10
|
+
*/
|
|
11
|
+
declare const GetFollowUpSuggestionsInputSchema: z.ZodObject<{
|
|
12
|
+
session_uuid: z.ZodString;
|
|
13
|
+
prompt_cycle_id: z.ZodOptional<z.ZodString>;
|
|
14
|
+
project_uuid: z.ZodOptional<z.ZodString>;
|
|
15
|
+
organization_uuid: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
session_uuid: string;
|
|
18
|
+
project_uuid?: string | undefined;
|
|
19
|
+
organization_uuid?: string | undefined;
|
|
20
|
+
prompt_cycle_id?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
session_uuid: string;
|
|
23
|
+
project_uuid?: string | undefined;
|
|
24
|
+
organization_uuid?: string | undefined;
|
|
25
|
+
prompt_cycle_id?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export type GetFollowUpSuggestionsInput = z.infer<typeof GetFollowUpSuggestionsInputSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Get follow-up suggestions for a session
|
|
30
|
+
*/
|
|
31
|
+
export declare function getFollowUpSuggestions(services: ToolServices, args: unknown): Promise<any>;
|
|
32
|
+
export {};
|