feat(mcp): Phase 2 - Cloud-Only Fallback Mode#79
Merged
kevintseng merged 6 commits intomainfrom Feb 16, 2026
Merged
Conversation
Implements Phase 2: Graceful degradation when better-sqlite3 unavailable but MEMESH_API_KEY is set. Provides cloud-only mode as fallback. Changes: - ServerInitializer: Detect better-sqlite3 availability and choose initialization mode - Add cloudOnlyMode flag to ServerComponents interface - Make memory systems optional (undefined in cloud-only mode) - ToolHandlers/BuddyHandlers: Return helpful error messages in cloud-only mode - SessionBootstrapper: Skip memory recap when projectMemoryManager unavailable - Add comprehensive cloud-only mode tests (4/4 passing) Server now supports three modes: 1. Standard mode: better-sqlite3 available → use local SQLite 2. Cloud-only mode: SQLite unavailable + MEMESH_API_KEY set → disable local memory tools 3. Error mode: Both unavailable → clear error with setup instructions Test Results: ✅ 4/4 cloud-only mode tests passing ✅ 1782/1790 total tests passing (99.6%) ❌ 8 pre-existing failures in MeMeshCloudClient tests (credentials file handling) Issue: Partially resolves #73 (Cowork environment support) Related: #74 (Phase 1: Lazy loading - merged in PR #78) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add comprehensive integration tests for cloud-only mode (9 tests) - Fix handleHookToolUse to check for cloud-only mode - Verify memory-dependent tools return appropriate errors - Verify non-memory tools continue to work in cloud-only mode - Test error message quality and consistency All Phase 2 tests passing (13/13). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add "Claude Desktop (Cowork)" option to bug report template - Create comprehensive COWORK_SUPPORT.md guide - Update README.md with Cowork compatibility section - Document current limitations and future roadmap - Explain cloud-only mode behavior and workarounds This documentation clarifies: - Current status: partial support (server works, memory tools disabled) - Why limitations exist: Cowork sandbox constraints (read-only fs, blocked node-gyp) - Future direction: cloud-first memory architecture - Recommendations: use CLI for full functionality Closes #75 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Closed
3 tasks
Updated 15 packages (minor/patch versions): - @types/form-data: 2.5.2 → 2.2.1 - @types/node: 25.2.0 → 25.2.3 - @types/react: 19.2.10 → 19.2.14 - @typescript-eslint/eslint-plugin: 8.54.0 → 8.55.0 - @typescript-eslint/parser: 8.54.0 → 8.55.0 - ajv: 8.17.1 → 8.18.0 - dotenv: 17.2.3 → 17.3.1 - glob: 13.0.0 → 13.0.3 - ink: 6.6.0 → 6.7.0 - inquirer: 13.2.2 → 13.2.4 - log-update: 7.0.2 → 7.1.0 - minimatch: 10.1.2 → 10.2.0 - onnxruntime-node: 1.23.2 → 1.24.1 - ora: 9.1.0 → 9.3.0 - typedoc: 0.28.16 → 0.28.17 Not updated (blocked): - eslint: 9.39.2 (cannot upgrade to 10.0.0 - typescript-eslint incompatible) - @types/uuid: 11.0.0 (already latest, npm outdated misreport) Testing: - ✅ npm test: 1791/1799 passing (8 pre-existing failures) - ✅ npm run build: successful - ✅ npm run typecheck: no errors - ✅ npm run lint: clean (fixed 2 unused disable directives) - ✅ 0 vulnerabilities Partially addresses #68 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This was referenced Feb 15, 2026
Added 9 test cases covering: - buddy-help: general help, specific command, invalid command, cloud-only mode - buddy-do: cloud-only mode error handling - buddy-remember: cloud-only mode error handling - Input validation: missing/invalid parameters Test Results: ✅ 9/9 tests passing ✅ Covers all buddy commands ✅ Validates cloud-only mode behavior ✅ Tests error handling paths Closes #19 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3 tasks
Enhanced .gitignore with better organization and additional patterns: OS Files: - ✅ macOS: Added .AppleDouble, .LSOverride - ✅ Windows: Added Desktop.ini, Thumbs.db:encryptable, ehthumbs_vista.db - ✅ Linux: Added .directory, .fuse_hidden*, .nfs* IDE & Editors: - ✅ Sublime Text: Added *.sublime-project, *.sublime-workspace - ✅ Emacs: Added #*#, .#* - ✅ Better organization with comments per IDE Build/Test: - ✅ Test databases: *.test.db, *.test.sqlite, *.spec.db - ✅ Coverage formats: *.lcov, htmlcov/, .coverage* - ✅ Benchmark outputs: benchmarks/results/, *.benchmark Improvements: - Clear section headers with comments - Organized by category (macOS, Windows, Linux, IDE) - More comprehensive patterns - Better documentation Closes #21 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
13 tasks
kevintseng
added a commit
that referenced
this pull request
Feb 16, 2026
Updated version across all files and documentation. Changes: - package.json, plugin.json: 2.8.10 → 2.8.11 - Updated 9 documentation files with new version and date - CHANGELOG.md: Added [Unreleased] section with PR #79 changes - README.zh-TW.md: Added Compatibility section - docs/ARCHITECTURE.md: Added Deployment Modes section - docs/COMMANDS.md: Added Cloud-Only Mode Limitations section Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements graceful degradation when better-sqlite3 is unavailable but MEMESH_API_KEY is configured. Enables MCP server to run in Cowork environments without local SQLite support.
Changes
Three-Mode Architecture
Implementation Details
Modified Files (5):
src/mcp/ServerInitializer.ts(+122 lines) - Mode detection and initializationsrc/mcp/handlers/ToolHandlers.ts(+93 lines) - Cloud-only mode checks for memory toolssrc/mcp/handlers/BuddyHandlers.ts(+36 lines) - Buddy command cloud-only handlingsrc/mcp/SessionBootstrapper.ts(+6 lines) - Skip memory preload in cloud-only modesrc/mcp/server.ts(+4 lines) - Conditional pipeline startNew Test Files (2):
tests/unit/mcp/ServerInitializer.cloud-only.test.ts(141 lines, 4 tests)tests/integration/cloud-only-mode.integration.test.ts(172 lines, 9 tests)Error Message Quality
Memory-dependent tools in cloud-only mode return clear, actionable error messages:
Testing
Test Results
Test Coverage
Code Review
Comprehensive 10-dimension review completed:
Closes
Commits
eac2699: feat(mcp): add cloud-only fallback mode for Cowork environmentsfafd382: test(mcp): add cloud-only mode integration tests and fix hook-tool-use🤖 Generated with Claude Code