Implements CT-TERM-001: WebSocket-based terminal service that spawns real
shell sessions via node-pty and streams I/O to connected clients.
- Add node-pty dependency and configure pnpm build permissions
- Create TerminalModule with Gateway, Service, and DTOs
- TerminalGateway: /terminal namespace, auth via handshake token,
workspace-scoped rooms, handles terminal:create/input/resize/close events
- TerminalService: manages IPty sessions per workspace with max 10 session
limit, cleanup on disconnect
- DTOs: CreateTerminalDto, TerminalInputDto, TerminalResizeDto, CloseTerminalDto
with class-validator decorators
- Unit tests: 25 gateway tests + 23 service tests (all passing)
- Register TerminalModule in AppModule
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added EntryVersion model with author relation
- Implemented automatic versioning on entry create/update
- Added API endpoints for version history:
- GET /api/knowledge/entries/:slug/versions - list versions
- GET /api/knowledge/entries/:slug/versions/:version - get specific
- POST /api/knowledge/entries/:slug/restore/:version - restore version
- Created VersionHistory.tsx component with timeline view
- Added History tab to entry detail page
- Supports version viewing and restoring
- Includes comprehensive tests for version operations
- All TypeScript types are explicit and type-safe