Skip to content

Conversation

@phrocker
Copy link
Contributor

@phrocker phrocker commented Jan 7, 2025

No description provided.

@phrocker phrocker merged commit 38ff745 into main Jan 7, 2025
1 check passed
@phrocker phrocker deleted the Issue17 branch January 7, 2025 23:59
phrocker added a commit that referenced this pull request Oct 24, 2025
…and SSH Terminal Log Analysis (#21)

* Initial plan

* Add RDP session screenshot capture and summarization infrastructure

Co-authored-by: phrocker <[email protected]>

* Fix build errors and add documentation for RDP session summarization

Co-authored-by: phrocker <[email protected]>

* Add RDP session summarization documentation

* Add implementation summary documentation

Co-authored-by: phrocker <[email protected]>

* Capture real RDP screenshots from Guacamole protocol and store in database

- Remove mock screenshot implementation
- Intercept PNG/IMG instructions from Guacamole WebSocket stream
- Extract base64-encoded image data from protocol instructions
- Store image bytes directly in PostgreSQL BLOB (no filesystem)
- Sample every N instructions to avoid overwhelming system
- Update analytics agent to read from database
- Update documentation with real implementation details

Co-authored-by: phrocker <[email protected]>

* Add Flyway migration for RDP session screenshot tables

- Created V27__create_rdp_session_screenshot_tables.sql
- Adds rdp_session_screenshots table with BYTEA column for image data
- Adds rdp_session_summaries table for AI-generated summaries
- Includes appropriate indexes for performance
- Follows existing migration file naming and structure

Co-authored-by: phrocker <[email protected]>

* Add SSH session summarization for complete general solution

- Created SshSessionSummary entity for SSH/terminal session summaries
- Created SshSessionSummaryRepository with query for unsummarized sessions
- Created SshSessionSummarizationAgent to process terminal logs
- Added V28 migration for ssh_session_summaries table
- Created comprehensive SESSION_SUMMARIZATION.md documentation
- Analytics agent extracts commands and activities from terminal logs
- Generates structured summaries with timeline and command history
- Runs every 2 minutes alongside RDP summarization agent
- Configurable via agents.ssh-session-analytics.enabled property
- Complete general solution for both RDP and SSH session summarization

Co-authored-by: phrocker <[email protected]>

* add charts as exclusion

* Fix test failure by adding RdpScreenshotCaptureService mock

- Added RdpScreenshotCaptureService import to test
- Added @mock annotation for screenshotCaptureService
- Updated GuacamoleTunnelWebSocketHandler constructor call in test
- All tests now pass (30 tests, 0 failures, 0 errors)

Co-authored-by: phrocker <[email protected]>

* Fix Hibernate query error in SshSessionSummaryRepository

- Changed query to use s.id instead of s.sessionId
- SessionLog entity only has 'id' field, not 'sessionId'
- Fixes "Could not resolve attribute 'sessionId'" error
- All tests pass (0 failures, 0 errors)

Co-authored-by: phrocker <[email protected]>

* add charts as exclusion

* Fix RDP screenshot capture entity and service logic

- Changed @JdbcTypeCode to @lob with columnDefinition for PostgreSQL BYTEA
- Fixed "column image_data is of type bytea but expression is of type bigint" error
- Improved multi-phase screenshot capture logic (img/blob/end instructions)
- Added sampling to avoid overwhelming system (captures every N instructions)
- Enhanced helper methods for extracting stream ID, MIME type, and blob chunks
- Added cleanup of active streams on session stop
- Removed unused captureImageFromInstruction method
- Better error handling and logging throughout
- All tests pass

Co-authored-by: phrocker <[email protected]>

* add charts as exclusion

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: phrocker <[email protected]>
Co-authored-by: Marc Parisi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants