hawkeye-mcp-server 1.5.2 → 2.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 +69 -0
- package/README.md +107 -6
- package/build/index.js +4 -0
- package/build/index.js.map +1 -1
- package/build/services/streaming.service.d.ts +41 -0
- package/build/services/streaming.service.js +124 -0
- package/build/services/streaming.service.js.map +1 -0
- package/build/tools/add-connection-to-project.d.ts +6 -0
- package/build/tools/add-connection-to-project.js +26 -4
- package/build/tools/add-connection-to-project.js.map +1 -1
- package/build/tools/apply-session-instruction.d.ts +2 -2
- package/build/tools/create-manual-investigation.d.ts +3 -0
- package/build/tools/create-manual-investigation.js +101 -15
- package/build/tools/create-manual-investigation.js.map +1 -1
- package/build/tools/create-project-instruction.d.ts +2 -2
- package/build/tools/index.d.ts +2 -0
- package/build/tools/index.js +41 -0
- package/build/tools/index.js.map +1 -1
- package/build/tools/investigate-alert.js +94 -5
- package/build/tools/investigate-alert.js.map +1 -1
- package/build/tools/list-sessions.js +31 -0
- package/build/tools/list-sessions.js.map +1 -1
- package/build/tools/validate-instruction.d.ts +2 -2
- package/build/tools/wait-for-project-ready.d.ts +28 -0
- package/build/tools/wait-for-project-ready.js +103 -0
- package/build/tools/wait-for-project-ready.js.map +1 -0
- package/build/utils/http-client.d.ts +4 -4
- package/build/utils/http-client.js +6 -6
- package/build/utils/http-client.js.map +1 -1
- package/build/utils/progress-tracker.d.ts +64 -0
- package/build/utils/progress-tracker.js +228 -0
- package/build/utils/progress-tracker.js.map +1 -0
- package/build/utils/validation.d.ts +3 -0
- package/build/utils/validation.js +1 -0
- package/build/utils/validation.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,75 @@ 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
|
+
## [2.0.0] - 2025-11-23
|
|
9
|
+
|
|
10
|
+
### 🎉 Major Feature: Real-Time Streaming Investigation Progress
|
|
11
|
+
|
|
12
|
+
This is a **major** release that fundamentally improves the investigation user experience by providing real-time progress updates during investigations.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **🌊 NEW: Streaming Investigation Service** (`src/services/streaming.service.ts`)
|
|
17
|
+
- Real-time Server-Sent Events (SSE) streaming from Hawkeye API
|
|
18
|
+
- Parses progress updates, interim analysis, and completion messages
|
|
19
|
+
- Async generator for clean iteration over progress updates
|
|
20
|
+
|
|
21
|
+
- **📊 NEW: Progress Tracker Utility** (`src/utils/progress-tracker.ts`)
|
|
22
|
+
- Humanizes technical progress messages into user-friendly updates
|
|
23
|
+
- Maps component actions to emojis and clear descriptions
|
|
24
|
+
- Tracks elapsed time, phase progression, and query/analysis counts
|
|
25
|
+
- Examples:
|
|
26
|
+
- `PromptGate (Preparing Telemetry Sources)` → `🔧 Preparing telemetry sources [2s]`
|
|
27
|
+
- `SQLSplitExecute (Consulting Telemetry)` → `🔎 Consulting telemetry (Query 7) [1m 30s]`
|
|
28
|
+
|
|
29
|
+
- **Enhanced `hawkeye_create_manual_investigation`**
|
|
30
|
+
- New `stream_progress` parameter (default: `true`)
|
|
31
|
+
- Returns progress log, elapsed time, and investigation summary when streaming
|
|
32
|
+
- Provides phase-by-phase visibility into investigation workflow
|
|
33
|
+
|
|
34
|
+
- **Enhanced `hawkeye_investigate_alert`**
|
|
35
|
+
- New `stream_progress` parameter (default: `true`)
|
|
36
|
+
- Streams progress for new alert investigations
|
|
37
|
+
- Same real-time feedback as manual investigations
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **Better User Experience** - Users no longer wait 5-10 minutes with no feedback
|
|
42
|
+
- **Progress Visibility** - See exactly what Hawkeye is doing in real-time:
|
|
43
|
+
- 🔧 Preparing telemetry sources
|
|
44
|
+
- 📚 Loading investigation context
|
|
45
|
+
- 🔍 Classifying datasources
|
|
46
|
+
- ⚡ Generating investigation queries
|
|
47
|
+
- 🔎 Consulting telemetry (with query counts)
|
|
48
|
+
- 🧠 Analyzing telemetry data (with analysis counts)
|
|
49
|
+
- 📝 Summarizing results
|
|
50
|
+
- **Progress Estimates** - Estimated progress percentage (0-100%) based on current phase
|
|
51
|
+
- **Detailed Summaries** - Get counts of steps, queries executed, and analyses performed
|
|
52
|
+
|
|
53
|
+
### Technical Details
|
|
54
|
+
|
|
55
|
+
- New service: `StreamingService` - handles SSE parsing and async iteration
|
|
56
|
+
- New utility: `ProgressTracker` - humanizes progress messages with emojis and timing
|
|
57
|
+
- Updated `ToolServices` interface to include `streamingService`
|
|
58
|
+
- Updated `HttpClient` with `getAxiosInstance()` method for streaming support
|
|
59
|
+
- Updated both investigation tools to support streaming by default
|
|
60
|
+
- Added comprehensive streaming test: `test-streaming-manual-investigation.mjs`
|
|
61
|
+
|
|
62
|
+
### Benefits
|
|
63
|
+
|
|
64
|
+
- 🚀 **Better UX** - Real-time feedback eliminates anxiety during long investigations
|
|
65
|
+
- 📊 **Transparency** - Users see exactly what Hawkeye is doing and how long it takes
|
|
66
|
+
- 🎯 **Progress Tracking** - Estimated completion percentage and phase information
|
|
67
|
+
- 📝 **Detailed Logs** - Complete progress log for debugging and analysis
|
|
68
|
+
- ⚡ **Default On** - Streaming is enabled by default, users can opt-out if needed
|
|
69
|
+
|
|
70
|
+
### Migration Notes
|
|
71
|
+
|
|
72
|
+
- No breaking changes to existing tool signatures
|
|
73
|
+
- `stream_progress` parameter is optional and defaults to `true`
|
|
74
|
+
- Users can set `stream_progress: false` to use original polling behavior
|
|
75
|
+
- All existing code continues to work without modification
|
|
76
|
+
|
|
8
77
|
## [1.5.0] - 2025-11-23
|
|
9
78
|
|
|
10
79
|
### Added
|
package/README.md
CHANGED
|
@@ -14,8 +14,9 @@ Hawkeye MCP Server enables AI assistants (like Claude) to interact with [NeuBird
|
|
|
14
14
|
|
|
15
15
|
## ✨ Key Features
|
|
16
16
|
|
|
17
|
+
- 🌊 **Real-Time Progress** ✨ **NEW in v2.0** - Stream live investigation progress with emojis and timing
|
|
17
18
|
- 🔍 **AI-Powered RCA** - Automated root cause analysis with corrective actions (including bash scripts)
|
|
18
|
-
- 🎯 **
|
|
19
|
+
- 🎯 **42 Tools** - Complete API for projects, connections, investigations, instructions, and analytics
|
|
19
20
|
- 📊 **Time Savings** - Track MTTR and time saved vs manual investigation
|
|
20
21
|
- 🧪 **Test Instructions** - Unique workflow to test investigation instructions before deployment
|
|
21
22
|
- 🔌 **Multi-Cloud** - Connect AWS, Azure, GCP, Datadog, PagerDuty, and more
|
|
@@ -108,6 +109,37 @@ You: "Why did this happen? Has it happened before?"
|
|
|
108
109
|
Claude: *Uses follow-up investigation to provide deeper analysis*
|
|
109
110
|
```
|
|
110
111
|
|
|
112
|
+
## 🌊 Real-Time Streaming Progress (NEW in v2.0)
|
|
113
|
+
|
|
114
|
+
No more waiting 5-10 minutes with no feedback! Hawkeye MCP now streams real-time investigation progress:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
You: "Investigate high CPU usage in production"
|
|
118
|
+
|
|
119
|
+
Claude:
|
|
120
|
+
🔧 Preparing telemetry sources [2s]
|
|
121
|
+
📚 Loading investigation context [3s]
|
|
122
|
+
🔍 Classifying datasources (Step 1) [18s]
|
|
123
|
+
🎯 Fine-tuning datasources [26s]
|
|
124
|
+
🔎 Consulting telemetry (Query 7) [1m 6s]
|
|
125
|
+
🧠 Analyzing telemetry data (Analysis 12) [1m 13s]
|
|
126
|
+
📝 Summarizing results [1m 29s]
|
|
127
|
+
|
|
128
|
+
Investigation completed! Here's what I found...
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Benefits:**
|
|
132
|
+
- ✅ See exactly what Hawkeye is doing in real-time
|
|
133
|
+
- ✅ Know how long each phase takes
|
|
134
|
+
- ✅ Track query and analysis counts
|
|
135
|
+
- ✅ Estimated progress percentage (0-100%)
|
|
136
|
+
- ✅ Complete progress log for debugging
|
|
137
|
+
- ✅ Enabled by default (can opt-out with `stream_progress: false`)
|
|
138
|
+
|
|
139
|
+
**Supported Tools:**
|
|
140
|
+
- `hawkeye_create_manual_investigation` - Stream progress for custom investigations
|
|
141
|
+
- `hawkeye_investigate_alert` - Stream progress when investigating alerts
|
|
142
|
+
|
|
111
143
|
## 🛠️ Tool Categories
|
|
112
144
|
|
|
113
145
|
| Category | Tools | Description |
|
|
@@ -120,7 +152,7 @@ Claude: *Uses follow-up investigation to provide deeper analysis*
|
|
|
120
152
|
| **Discovery** | 2 | Explore available resources and data sources |
|
|
121
153
|
| **Help** | 1 | Interactive guidance system |
|
|
122
154
|
|
|
123
|
-
**Total:
|
|
155
|
+
**Total: 42 tools**
|
|
124
156
|
|
|
125
157
|
See the [Tool Reference](https://neubirdai.github.io/hawkeye-mcp-docs/reference/overview/) for complete documentation.
|
|
126
158
|
|
|
@@ -268,17 +300,86 @@ hawkeye-mcp/
|
|
|
268
300
|
|
|
269
301
|
### Testing
|
|
270
302
|
|
|
303
|
+
Hawkeye MCP includes comprehensive testing for unit, integration, and end-to-end validation.
|
|
304
|
+
|
|
305
|
+
#### Test Organization
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
tests/
|
|
309
|
+
├── README.md # Complete testing guide
|
|
310
|
+
├── unit/ # Unit tests for individual tools
|
|
311
|
+
├── integration/ # Integration tests (planned)
|
|
312
|
+
└── e2e/ # End-to-end testing workflows
|
|
313
|
+
├── test-connections.md # Test credentials and setup
|
|
314
|
+
└── test-prompt.md # Complete onboarding workflow
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
#### Running Tests
|
|
318
|
+
|
|
319
|
+
**Unit Tests:**
|
|
271
320
|
```bash
|
|
272
|
-
#
|
|
273
|
-
npm
|
|
321
|
+
# Build first
|
|
322
|
+
npm run build
|
|
323
|
+
|
|
324
|
+
# Run authentication test
|
|
325
|
+
node tests/unit/test-auth.js
|
|
274
326
|
|
|
275
|
-
#
|
|
276
|
-
node tests/test-
|
|
327
|
+
# Run connection tools test
|
|
328
|
+
node tests/unit/test-connection-tools.mjs
|
|
329
|
+
|
|
330
|
+
# Run manual investigation test (requires prompt argument)
|
|
331
|
+
./tests/unit/test-manual-investigation.mjs "Investigate high CPU in api-gateway"
|
|
277
332
|
|
|
278
333
|
# Test with MCP Inspector (interactive)
|
|
279
334
|
npx @modelcontextprotocol/inspector node build/index.js
|
|
280
335
|
```
|
|
281
336
|
|
|
337
|
+
**End-to-End Tests:**
|
|
338
|
+
|
|
339
|
+
E2E tests are designed for AI coding agents (Claude Desktop/Code):
|
|
340
|
+
|
|
341
|
+
1. Open your AI coding agent
|
|
342
|
+
2. Navigate to `tests/e2e/test-prompt.md`
|
|
343
|
+
3. Copy the test workflow
|
|
344
|
+
4. Paste into your AI agent
|
|
345
|
+
5. Let it execute each phase
|
|
346
|
+
6. Verify outcomes match expectations
|
|
347
|
+
|
|
348
|
+
**Test Resources:**
|
|
349
|
+
|
|
350
|
+
- **[tests/README.md](./tests/README.md)** - Complete testing guide with best practices
|
|
351
|
+
- **[tests/e2e/test-connections.md](./tests/e2e/test-connections.md)** - Test environment credentials
|
|
352
|
+
- **[tests/e2e/test-prompt.md](./tests/e2e/test-prompt.md)** - Complete E2E onboarding workflow
|
|
353
|
+
|
|
354
|
+
#### Test Types
|
|
355
|
+
|
|
356
|
+
| Type | Location | Purpose | Duration |
|
|
357
|
+
|------|----------|---------|----------|
|
|
358
|
+
| **Unit** | `tests/unit/` | Test individual tools in isolation | Seconds |
|
|
359
|
+
| **Integration** | `tests/integration/` | Test tools working together | Minutes |
|
|
360
|
+
| **E2E** | `tests/e2e/` | Test complete user workflows with AI agent | 45-90 min |
|
|
361
|
+
|
|
362
|
+
#### Quick Validation
|
|
363
|
+
|
|
364
|
+
Before submitting a PR, run these quick tests:
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
# 1. Build
|
|
368
|
+
npm run build
|
|
369
|
+
|
|
370
|
+
# 2. Test authentication
|
|
371
|
+
node tests/unit/test-auth.js
|
|
372
|
+
|
|
373
|
+
# 3. Test a few core tools
|
|
374
|
+
node tests/unit/test-connection-tools.mjs
|
|
375
|
+
./tests/unit/test-manual-investigation.mjs "Test investigation"
|
|
376
|
+
|
|
377
|
+
# 4. Verify tools load in MCP Inspector
|
|
378
|
+
npx @modelcontextprotocol/inspector node build/index.js
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
For comprehensive testing documentation, see **[tests/README.md](./tests/README.md)**.
|
|
382
|
+
|
|
282
383
|
### Building and Publishing
|
|
283
384
|
|
|
284
385
|
**Building:**
|
package/build/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { ProjectService } from './services/project.service.js';
|
|
|
17
17
|
import { SessionService } from './services/session.service.js';
|
|
18
18
|
import { ConnectionService } from './services/connection.service.js';
|
|
19
19
|
import { GuidanceService } from './services/guidance.service.js';
|
|
20
|
+
import { StreamingService } from './services/streaming.service.js';
|
|
20
21
|
// Tools
|
|
21
22
|
import { getToolDefinitions } from './tools/index.js';
|
|
22
23
|
/**
|
|
@@ -30,6 +31,7 @@ function initializeServices() {
|
|
|
30
31
|
const sessionService = new SessionService(httpClient, authService);
|
|
31
32
|
const connectionService = new ConnectionService(httpClient, authService);
|
|
32
33
|
const guidanceService = new GuidanceService();
|
|
34
|
+
const streamingService = new StreamingService(httpClient.getAxiosInstance());
|
|
33
35
|
return {
|
|
34
36
|
httpClient,
|
|
35
37
|
authService,
|
|
@@ -37,6 +39,7 @@ function initializeServices() {
|
|
|
37
39
|
sessionService,
|
|
38
40
|
connectionService,
|
|
39
41
|
guidanceService,
|
|
42
|
+
streamingService,
|
|
40
43
|
};
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
@@ -96,6 +99,7 @@ async function main() {
|
|
|
96
99
|
sessionService: services.sessionService,
|
|
97
100
|
connectionService: services.connectionService,
|
|
98
101
|
guidanceService: services.guidanceService,
|
|
102
|
+
streamingService: services.streamingService,
|
|
99
103
|
};
|
|
100
104
|
const result = await handler(toolServices, toolArgs);
|
|
101
105
|
// Return the result
|
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,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;
|
|
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,E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,CAAC;QAEhC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,aAAa,uBAAuB,CAAC,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,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming Service
|
|
3
|
+
* Handles Server-Sent Events (SSE) streaming from Hawkeye API
|
|
4
|
+
*/
|
|
5
|
+
import { AxiosInstance } from 'axios';
|
|
6
|
+
export interface StreamMessage {
|
|
7
|
+
session_uuid?: string;
|
|
8
|
+
message?: {
|
|
9
|
+
id: string;
|
|
10
|
+
create_time: string;
|
|
11
|
+
content: {
|
|
12
|
+
content_type: string;
|
|
13
|
+
parts: string[];
|
|
14
|
+
};
|
|
15
|
+
status?: string;
|
|
16
|
+
};
|
|
17
|
+
response?: any;
|
|
18
|
+
}
|
|
19
|
+
export interface ProgressUpdate {
|
|
20
|
+
timestamp: Date;
|
|
21
|
+
message: string;
|
|
22
|
+
type: 'progress' | 'analysis' | 'completion';
|
|
23
|
+
}
|
|
24
|
+
export declare class StreamingService {
|
|
25
|
+
private httpClient;
|
|
26
|
+
constructor(httpClient: AxiosInstance);
|
|
27
|
+
/**
|
|
28
|
+
* Stream investigation progress from Hawkeye API
|
|
29
|
+
* Returns an async generator that yields progress updates
|
|
30
|
+
*/
|
|
31
|
+
streamInvestigation(projectUuid: string, prompt: string, sessionUuid?: string): AsyncGenerator<ProgressUpdate, void, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Stream investigation and collect all progress updates
|
|
34
|
+
* Returns when investigation completes with full progress log
|
|
35
|
+
*/
|
|
36
|
+
streamInvestigationWithProgress(projectUuid: string, prompt: string, sessionUuid?: string, onProgress?: (update: ProgressUpdate) => void): Promise<{
|
|
37
|
+
completion: string;
|
|
38
|
+
progressLog: ProgressUpdate[];
|
|
39
|
+
duration: number;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming Service
|
|
3
|
+
* Handles Server-Sent Events (SSE) streaming from Hawkeye API
|
|
4
|
+
*/
|
|
5
|
+
import { logger } from '../utils/logger.js';
|
|
6
|
+
export class StreamingService {
|
|
7
|
+
httpClient;
|
|
8
|
+
constructor(httpClient) {
|
|
9
|
+
this.httpClient = httpClient;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Stream investigation progress from Hawkeye API
|
|
13
|
+
* Returns an async generator that yields progress updates
|
|
14
|
+
*/
|
|
15
|
+
async *streamInvestigation(projectUuid, prompt, sessionUuid) {
|
|
16
|
+
logger.info('Starting investigation stream', { projectUuid, sessionUuid });
|
|
17
|
+
const payload = {
|
|
18
|
+
project_uuid: projectUuid,
|
|
19
|
+
messages: [
|
|
20
|
+
{
|
|
21
|
+
content: {
|
|
22
|
+
content_type: 'CONTENT_TYPE_CHAT_PROMPT',
|
|
23
|
+
parts: [prompt],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
action: 'ACTION_NEXT',
|
|
28
|
+
...(sessionUuid && { session_uuid: sessionUuid }),
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
const response = await this.httpClient.post('/v1/inference/session', payload, {
|
|
32
|
+
responseType: 'stream',
|
|
33
|
+
headers: {
|
|
34
|
+
'x-client-identifier': 'mcp-server',
|
|
35
|
+
},
|
|
36
|
+
timeout: 600000, // 10 minutes
|
|
37
|
+
});
|
|
38
|
+
let buffer = '';
|
|
39
|
+
let messageCount = 0;
|
|
40
|
+
// Process SSE stream
|
|
41
|
+
for await (const chunk of response.data) {
|
|
42
|
+
const chunkStr = chunk.toString();
|
|
43
|
+
buffer += chunkStr;
|
|
44
|
+
// Split by newlines
|
|
45
|
+
const lines = buffer.split('\n');
|
|
46
|
+
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
47
|
+
for (let line of lines) {
|
|
48
|
+
if (!line.trim())
|
|
49
|
+
continue;
|
|
50
|
+
// Handle SSE format: "data: {...}"
|
|
51
|
+
if (line.startsWith('data: ')) {
|
|
52
|
+
line = line.substring(6);
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
const data = JSON.parse(line);
|
|
56
|
+
messageCount++;
|
|
57
|
+
// Parse message content
|
|
58
|
+
if (data.message?.content) {
|
|
59
|
+
const contentType = data.message.content.content_type;
|
|
60
|
+
const parts = data.message.content.parts || [];
|
|
61
|
+
if (contentType === 'CONTENT_TYPE_PROGRESS_STATUS' && parts.length > 0) {
|
|
62
|
+
yield {
|
|
63
|
+
timestamp: new Date(),
|
|
64
|
+
message: parts[0],
|
|
65
|
+
type: 'progress',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
else if (contentType === 'CONTENT_TYPE_INTERIM_ANALYSIS' && parts.length > 0) {
|
|
69
|
+
yield {
|
|
70
|
+
timestamp: new Date(),
|
|
71
|
+
message: parts[0],
|
|
72
|
+
type: 'analysis',
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
else if (contentType === 'CONTENT_TYPE_CHAT_COMPLETION' && parts.length > 0) {
|
|
76
|
+
yield {
|
|
77
|
+
timestamp: new Date(),
|
|
78
|
+
message: parts[0],
|
|
79
|
+
type: 'completion',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
// Skip invalid JSON
|
|
86
|
+
logger.debug('Skipping invalid JSON line', { line: line.substring(0, 100) });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
logger.info('Investigation stream completed', { messageCount });
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
logger.error('Investigation stream error', { error: error.message });
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Stream investigation and collect all progress updates
|
|
99
|
+
* Returns when investigation completes with full progress log
|
|
100
|
+
*/
|
|
101
|
+
async streamInvestigationWithProgress(projectUuid, prompt, sessionUuid, onProgress) {
|
|
102
|
+
const startTime = Date.now();
|
|
103
|
+
const progressLog = [];
|
|
104
|
+
let completion = '';
|
|
105
|
+
for await (const update of this.streamInvestigation(projectUuid, prompt, sessionUuid)) {
|
|
106
|
+
progressLog.push(update);
|
|
107
|
+
// Call progress callback if provided
|
|
108
|
+
if (onProgress) {
|
|
109
|
+
onProgress(update);
|
|
110
|
+
}
|
|
111
|
+
// Store completion message
|
|
112
|
+
if (update.type === 'completion') {
|
|
113
|
+
completion = update.message;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const duration = Date.now() - startTime;
|
|
117
|
+
return {
|
|
118
|
+
completion,
|
|
119
|
+
progressLog,
|
|
120
|
+
duration,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=streaming.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.service.js","sourceRoot":"","sources":["../../src/services/streaming.service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAsB5C,MAAM,OAAO,gBAAgB;IACnB,UAAU,CAAgB;IAElC,YAAY,UAAyB;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,CAAC,mBAAmB,CACxB,WAAmB,EACnB,MAAc,EACd,WAAoB;QAEpB,MAAM,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;QAE3E,MAAM,OAAO,GAAG;YACd,YAAY,EAAE,WAAW;YACzB,QAAQ,EAAE;gBACR;oBACE,OAAO,EAAE;wBACP,YAAY,EAAE,0BAA0B;wBACxC,KAAK,EAAE,CAAC,MAAM,CAAC;qBAChB;iBACF;aACF;YACD,MAAM,EAAE,aAAa;YACrB,GAAG,CAAC,WAAW,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;SAClD,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACzC,uBAAuB,EACvB,OAAO,EACP;gBACE,YAAY,EAAE,QAAQ;gBACtB,OAAO,EAAE;oBACP,qBAAqB,EAAE,YAAY;iBACpC;gBACD,OAAO,EAAE,MAAM,EAAE,aAAa;aAC/B,CACF,CAAC;YAEF,IAAI,MAAM,GAAG,EAAE,CAAC;YAChB,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,qBAAqB;YACrB,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,QA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;YACrB,CAAC;YAED,2BAA2B;YAC3B,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBACjC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;YAC9B,CAAC;QACH,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QAExC,OAAO;YACL,UAAU;YACV,WAAW;YACX,QAAQ;SACT,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -10,12 +10,18 @@ import { z } from 'zod';
|
|
|
10
10
|
declare const AddConnectionToProjectInputSchema: z.ZodObject<{
|
|
11
11
|
project_uuid: z.ZodOptional<z.ZodString>;
|
|
12
12
|
connection_uuids: z.ZodArray<z.ZodString, "many">;
|
|
13
|
+
wait_for_ready: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
14
|
+
max_wait_seconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
13
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
max_wait_seconds: number;
|
|
14
17
|
connection_uuids: string[];
|
|
18
|
+
wait_for_ready: boolean;
|
|
15
19
|
project_uuid?: string | undefined;
|
|
16
20
|
}, {
|
|
17
21
|
connection_uuids: string[];
|
|
18
22
|
project_uuid?: string | undefined;
|
|
23
|
+
max_wait_seconds?: number | undefined;
|
|
24
|
+
wait_for_ready?: boolean | undefined;
|
|
19
25
|
}>;
|
|
20
26
|
export type AddConnectionToProjectInput = z.infer<typeof AddConnectionToProjectInputSchema>;
|
|
21
27
|
/**
|
|
@@ -11,6 +11,8 @@ import { z } from 'zod';
|
|
|
11
11
|
const AddConnectionToProjectInputSchema = z.object({
|
|
12
12
|
project_uuid: z.string().optional().describe('Project UUID (optional, uses default project if not provided)'),
|
|
13
13
|
connection_uuids: z.array(z.string()).min(1).describe('Array of connection UUIDs to add to the project'),
|
|
14
|
+
wait_for_ready: z.boolean().optional().default(true).describe('Wait for project to be ready after adding connections (default: true)'),
|
|
15
|
+
max_wait_seconds: z.number().optional().default(300).describe('Maximum time to wait for project readiness in seconds (default: 300)'),
|
|
14
16
|
});
|
|
15
17
|
/**
|
|
16
18
|
* Add connections to a project
|
|
@@ -65,6 +67,17 @@ export async function addConnectionToProject(services, args) {
|
|
|
65
67
|
// Add connections to project
|
|
66
68
|
await services.projectService.addConnectionsToProject(projectUuid, input.connection_uuids);
|
|
67
69
|
logger.info(`Added ${input.connection_uuids.length} connections to project ${projectName}`);
|
|
70
|
+
// Wait for project to be ready if requested
|
|
71
|
+
let readyStatus = null;
|
|
72
|
+
if (input.wait_for_ready) {
|
|
73
|
+
logger.info(`Waiting for project ${projectName} to be ready...`);
|
|
74
|
+
const { waitForProjectReady } = await import('./wait-for-project-ready.js');
|
|
75
|
+
readyStatus = await waitForProjectReady(services, {
|
|
76
|
+
project_uuid: projectUuid,
|
|
77
|
+
max_wait_seconds: input.max_wait_seconds,
|
|
78
|
+
poll_interval_seconds: 5,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
68
81
|
return {
|
|
69
82
|
success: true,
|
|
70
83
|
project_uuid: projectUuid,
|
|
@@ -76,10 +89,19 @@ export async function addConnectionToProject(services, args) {
|
|
|
76
89
|
telemetry_types: c.telemetry_type_sync_states ? Object.keys(c.telemetry_type_sync_states) : [],
|
|
77
90
|
})),
|
|
78
91
|
total_added: input.connection_uuids.length,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
ready: readyStatus?.ready ?? null,
|
|
93
|
+
ready_time_seconds: readyStatus?.time_elapsed_seconds ?? null,
|
|
94
|
+
next_steps: readyStatus?.ready
|
|
95
|
+
? [
|
|
96
|
+
'Project is ready for investigations',
|
|
97
|
+
'Configure project instructions using: hawkeye_create_project_instruction',
|
|
98
|
+
'Start investigating incidents with these connections',
|
|
99
|
+
]
|
|
100
|
+
: [
|
|
101
|
+
'Use hawkeye_wait_for_project_ready to check project readiness',
|
|
102
|
+
'Configure project instructions using: hawkeye_create_project_instruction',
|
|
103
|
+
'Start investigating incidents once project is ready',
|
|
104
|
+
],
|
|
83
105
|
};
|
|
84
106
|
}
|
|
85
107
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-connection-to-project.js","sourceRoot":"","sources":["../../src/tools/add-connection-to-project.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;IAC7G,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"add-connection-to-project.js","sourceRoot":"","sources":["../../src/tools/add-connection-to-project.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;IAC7G,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IACxG,cAA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DAA+D;oBAC/D,0EAA0E;oBAC1E,qDAAqD;iBACtD;SACN,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;QAE5D,gCAAgC;QAChC,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -14,13 +14,13 @@ declare const ApplySessionInstructionInputSchema: z.ZodObject<{
|
|
|
14
14
|
validate_first: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
session_uuid: string;
|
|
17
|
-
type: "INSTRUCTION_TYPE_FILTER" | "INSTRUCTION_TYPE_SYSTEM" | "INSTRUCTION_TYPE_GROUPING" | "INSTRUCTION_TYPE_RCA";
|
|
18
17
|
content: string;
|
|
18
|
+
type: "INSTRUCTION_TYPE_FILTER" | "INSTRUCTION_TYPE_SYSTEM" | "INSTRUCTION_TYPE_GROUPING" | "INSTRUCTION_TYPE_RCA";
|
|
19
19
|
validate_first: boolean;
|
|
20
20
|
}, {
|
|
21
21
|
session_uuid: string;
|
|
22
|
-
type: "INSTRUCTION_TYPE_FILTER" | "INSTRUCTION_TYPE_SYSTEM" | "INSTRUCTION_TYPE_GROUPING" | "INSTRUCTION_TYPE_RCA";
|
|
23
22
|
content: string;
|
|
23
|
+
type: "INSTRUCTION_TYPE_FILTER" | "INSTRUCTION_TYPE_SYSTEM" | "INSTRUCTION_TYPE_GROUPING" | "INSTRUCTION_TYPE_RCA";
|
|
24
24
|
validate_first?: boolean | undefined;
|
|
25
25
|
}>;
|
|
26
26
|
export type ApplySessionInstructionInput = z.infer<typeof ApplySessionInstructionInputSchema>;
|
|
@@ -8,9 +8,11 @@ export declare const CreateManualInvestigationInputSchema: z.ZodObject<{
|
|
|
8
8
|
prompt: z.ZodString;
|
|
9
9
|
project_uuid: z.ZodOptional<z.ZodString>;
|
|
10
10
|
wait_for_completion: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
stream_progress: z.ZodDefault<z.ZodBoolean>;
|
|
11
12
|
max_wait_seconds: z.ZodDefault<z.ZodNumber>;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
13
14
|
wait_for_completion: boolean;
|
|
15
|
+
stream_progress: boolean;
|
|
14
16
|
max_wait_seconds: number;
|
|
15
17
|
prompt: string;
|
|
16
18
|
project_uuid?: string | undefined;
|
|
@@ -18,6 +20,7 @@ export declare const CreateManualInvestigationInputSchema: z.ZodObject<{
|
|
|
18
20
|
prompt: string;
|
|
19
21
|
project_uuid?: string | undefined;
|
|
20
22
|
wait_for_completion?: boolean | undefined;
|
|
23
|
+
stream_progress?: boolean | undefined;
|
|
21
24
|
max_wait_seconds?: number | undefined;
|
|
22
25
|
}>;
|
|
23
26
|
export type CreateManualInvestigationInput = z.infer<typeof CreateManualInvestigationInputSchema>;
|