- Add GET /v2/sessions/active - returns only active sessions
- Add GET /v2/sessions - cursor-based pagination with changedSince filter
- Use consistent ID-based sorting (desc) for predictable pagination
- changedSince is just a filter, doesn't affect pagination mechanics
- Remove lastMessage field from all v2 endpoints for smaller payloads
- Simple opaque cursor format: cursor_v1_{sessionId}
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Improve content type parser to handle HTTP methods correctly:
- DELETE and GET requests with empty bodies return undefined (no parsing)
- Other HTTP methods with empty bodies return empty object
- Add method and URL to error logging for better debugging
- Prevents JSON parsing errors on legitimate empty DELETE requests
Fixes the GitHub disconnect endpoint which uses DELETE without body.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix "Unexpected end of JSON input" error by:
- Check for empty/whitespace-only body before parsing
- Return empty object for empty bodies instead of failing
- Add detailed error logging for debugging JSON parse failures
- Prevent crashes on malformed or empty request bodies
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Update GitHub disconnect endpoint to also remove user avatar:
- Clear avatar field in database (set to Prisma.JsonNull)
- Include avatar removal in account update broadcast
- Update logging to reflect avatar removal
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add DELETE /v1/connect/github endpoint to disconnect GitHub accounts by:
- Deleting GitHub user token from database
- Removing account link (githubUserId = null)
- Broadcasting disconnect event to connected clients
- Using database transaction for atomicity
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Clean up machine API endpoints formatting
- Update machine-alive to use ephemeral events instead of updates
- Prepare types for separated metadata and daemonState
- Fix activeAt field name consistency in machine responses
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Machine-alive handler now properly emits update events to all user connections
- Ensures mobile clients receive real-time machine status updates
- Fixed null handling when machine doesn't exist in database
Note: Last test was not able to spawn new session - webhook callback timing issue
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>