2.7 KiB
2.7 KiB
Room Code Image Upload - Implementation Status
Phase 1: Research (IN PROGRESS)
1.1 Enhanced WebSocket Monitor ✅ COMPLETE
- Added binary WebSocket frame detection
- Added HTTP request/response logging
- Added file chooser event handling
- Added automatic file upload triggering (with manual fallback)
- Logs to both console and
image-upload-capture.log
1.2 Capture Real Upload ⏳ WAITING FOR USER
Action Required: Run the monitor and upload an image
cd /Users/erikfredericks/dev-ai/HSO/irc-kosmi-relay
./monitor-ws
Then manually upload blurt.jpg in the Kosmi chat interface.
What We're Looking For:
- HTTP endpoint for image upload (POST/PUT request)
- Request format (multipart/form-data, JSON, binary)
- Required headers (Authorization, Content-Type, etc.)
- Response format (JSON with URL?)
- OR: GraphQL mutation for file upload via WebSocket
1.3 Document Findings ⏳ PENDING
Once upload is captured, create KOSMI_IMAGE_UPLOAD.md with:
- Upload method (HTTP vs WebSocket)
- Endpoint URL
- Authentication requirements
- Request/response format
- Go implementation strategy
Phase 2: Image Generation (READY TO IMPLEMENT)
Can proceed independently of Phase 1 research.
2.1 Room Code Image Generator
Create bridge/jackbox/roomcode_image.go:
- Black background (RGB 0,0,0)
- White monospace text
- 200x100 pixels
- Best-fit font size with padding
- Centered text
- Returns PNG bytes
2.2 Configuration
Add to matterbridge.toml:
EnableRoomCodeImage=false
Phase 3: Kosmi Upload Client (BLOCKED)
Waiting for Phase 1.2 findings.
Phase 4: IRC Formatting (READY TO IMPLEMENT)
Can proceed independently.
4.1 IRC Formatting Helper
Create bridge/irc/formatting.go:
FormatRoomCode(code string) string- Returns
"\x02\x11" + code + "\x0F" - IRC codes: 0x02=bold, 0x11=monospace, 0x0F=reset
Phase 5: Integration (BLOCKED)
Waiting for Phases 2, 3, and 4.
Phase 6: Testing (BLOCKED)
Waiting for Phase 5.
Current Blockers
- Phase 1.2 - Need user to run monitor and capture image upload
- Phase 1.3 - Need to analyze captured traffic and document findings
- Phase 3 - Need Phase 1 findings to implement upload client
Can Proceed Now
- Phase 2 (Image Generation) - Independent task
- Phase 4 (IRC Formatting) - Independent task
Next Steps
Immediate (User Action):
- Run
./monitor-ws - Upload
blurt.jpgin Kosmi chat - Press Ctrl+C when done
- Share
image-upload-capture.logcontents
After Capture:
- Analyze log file
- Document upload protocol
- Implement upload client
- Continue with integration
Meanwhile (Can Start Now):
- Implement image generation (Phase 2)
- Implement IRC formatting (Phase 4)