Skip to content

Commit f7c120d

Browse files
Feat/streamable http transport (#6)
* docs: add Redis session store implementation plan Ultraworked with Sisyphus (oh-my-opencode). * feat: add Redis module and session repository Add @global RedisModule with ioredis provider (retry strategy, graceful disconnect), Redis constants (REDIS_CLIENT token, key prefixes), and RedisSessionRepository for session CRUD with TTL and stale SET member pruning. Add RedisSessionData interface to session DTO. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat: integrate Redis session store into MCP module Rewrite SessionManagerService to use Redis-backed metadata with local McpServer cache. Add await to async session calls in McpController. Wire RedisSessionRepository into McpModule. Import RedisModule in AppModule. Update .env.example with required Redis vars. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat: add Redis services to Docker Compose Add Redis 7-alpine service to production (docker-compose.yml) and staging (docker-compose.staging.yml) with persistent volumes, Redis env vars, depends_on, and MCP_SESSION_TTL configuration. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * test: add Redis session repository and session manager unit tests Add unit tests for RedisSessionRepository (mock ioredis, CRUD, stale pruning, stats) and SessionManagerService (mock repository + factory, session lifecycle, cache miss recovery). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * docs: add deployment scripts and comprehensive codebase knowledge files Add deploy.sh (unified VPS deploy with backup/rollback for prod+staging). Rewrite AGENT.md with full architecture, module map, data flow, and conventions. Create AGENTS.md (hierarchical subagent knowledge). Create docs/DEPLOYMENT.md (ops runbook). Move redis-plan.md to docs/feature-plan/. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * chore: normalize line endings to LF Convert all CRLF line endings to LF across the codebase for consistency. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * refactor: update auth passthrough to use SDK authInfo pattern Update tool-registry to extract Bearer token from extra.authInfo instead of extra.sessionId. Add optional existingSessionId parameter to session-manager for SDK-managed session IDs. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat: replace custom JSON-RPC handler with SDK StreamableHTTPServerTransport Replace hand-rolled JSON-RPC dispatch with official @modelcontextprotocol/sdk StreamableHTTPServerTransport. Adds POST/GET/DELETE handlers for full MCP Streamable HTTP spec compliance, enabling n8n and other SDK-compliant clients to connect. Remove McpProtocolHandlerService from module (superseded by SDK transport). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix: update CORS headers for MCP Streamable HTTP and staging port Add DELETE to CORS methods, mcp-session-id to allowed/exposed headers for SDK transport. Fix staging docker-compose PORT default from 3001 to 3002 to match host mapping. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * chore: remove outdated documentation files Remove TESTING_RESOURCES.md and docs/IMPLEMENTATION-SUMMARY.md that are no longer relevant after the StreamableHTTPServerTransport refactor. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent ffc6d66 commit f7c120d

File tree

8 files changed

+332
-751
lines changed

8 files changed

+332
-751
lines changed

TESTING_RESOURCES.md

Lines changed: 0 additions & 173 deletions
This file was deleted.

docker-compose.staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
# Server
1111
NODE_ENV: ${NODE_ENV:-staging}
12-
PORT: ${PORT:-3001}
12+
PORT: ${PORT:-3002}
1313
HOST: ${HOST:-0.0.0.0}
1414

1515
# IoT Cloud API

0 commit comments

Comments
 (0)