squish-memory 0.9.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/{.env.mcp → .env.mcp.example} +23 -0
  2. package/CHANGELOG.md +102 -0
  3. package/QUICK-START.md +10 -4
  4. package/README.md +73 -4
  5. package/config/plugin-manifest.json +152 -0
  6. package/config/plugin-manifest.schema.json +244 -0
  7. package/dist/algorithms/{merge/analytics → analytics}/token-estimator.d.ts +1 -1
  8. package/dist/algorithms/analytics/token-estimator.d.ts.map +1 -0
  9. package/dist/algorithms/{merge/analytics → analytics}/token-estimator.js +3 -3
  10. package/dist/algorithms/analytics/token-estimator.js.map +1 -0
  11. package/dist/algorithms/detection/hash-filters.d.ts.map +1 -0
  12. package/dist/algorithms/detection/hash-filters.js.map +1 -0
  13. package/dist/algorithms/{merge/detection → detection}/semantic-ranker.d.ts +1 -1
  14. package/dist/algorithms/detection/semantic-ranker.d.ts.map +1 -0
  15. package/dist/algorithms/{merge/detection → detection}/semantic-ranker.js +1 -1
  16. package/dist/algorithms/detection/semantic-ranker.js.map +1 -0
  17. package/dist/algorithms/{merge/detection → detection}/two-stage-detector.d.ts +1 -1
  18. package/dist/algorithms/detection/two-stage-detector.d.ts.map +1 -0
  19. package/dist/algorithms/{merge/detection → detection}/two-stage-detector.js +4 -4
  20. package/dist/algorithms/detection/two-stage-detector.js.map +1 -0
  21. package/dist/algorithms/handlers/approve-merge.d.ts.map +1 -0
  22. package/dist/algorithms/{merge/handlers → handlers}/approve-merge.js +4 -4
  23. package/dist/algorithms/handlers/approve-merge.js.map +1 -0
  24. package/dist/algorithms/{merge/handlers → handlers}/detect-duplicates.d.ts +1 -1
  25. package/dist/algorithms/handlers/detect-duplicates.d.ts.map +1 -0
  26. package/dist/algorithms/{merge/handlers → handlers}/detect-duplicates.js +55 -75
  27. package/dist/algorithms/handlers/detect-duplicates.js.map +1 -0
  28. package/dist/algorithms/handlers/get-stats.d.ts.map +1 -0
  29. package/dist/algorithms/{merge/handlers → handlers}/get-stats.js +3 -3
  30. package/dist/algorithms/handlers/get-stats.js.map +1 -0
  31. package/dist/algorithms/handlers/list-proposals.d.ts.map +1 -0
  32. package/dist/algorithms/{merge/handlers → handlers}/list-proposals.js +3 -3
  33. package/dist/algorithms/handlers/list-proposals.js.map +1 -0
  34. package/dist/algorithms/handlers/preview-merge.d.ts.map +1 -0
  35. package/dist/algorithms/{merge/handlers → handlers}/preview-merge.js +3 -3
  36. package/dist/algorithms/handlers/preview-merge.js.map +1 -0
  37. package/dist/algorithms/handlers/reject-merge.d.ts.map +1 -0
  38. package/dist/algorithms/{merge/handlers → handlers}/reject-merge.js +3 -3
  39. package/dist/algorithms/handlers/reject-merge.js.map +1 -0
  40. package/dist/algorithms/handlers/reverse-merge.d.ts.map +1 -0
  41. package/dist/algorithms/{merge/handlers → handlers}/reverse-merge.js +3 -3
  42. package/dist/algorithms/handlers/reverse-merge.js.map +1 -0
  43. package/dist/algorithms/{merge/safety → safety}/safety-checks.d.ts +1 -1
  44. package/dist/algorithms/safety/safety-checks.d.ts.map +1 -0
  45. package/dist/algorithms/safety/safety-checks.js +179 -0
  46. package/dist/algorithms/safety/safety-checks.js.map +1 -0
  47. package/dist/algorithms/{merge/strategies → strategies}/merge-strategies.d.ts +1 -1
  48. package/dist/algorithms/strategies/merge-strategies.d.ts.map +1 -0
  49. package/dist/algorithms/strategies/merge-strategies.js.map +1 -0
  50. package/dist/algorithms/utils/response-builder.d.ts +28 -0
  51. package/dist/algorithms/utils/response-builder.d.ts.map +1 -0
  52. package/dist/algorithms/utils/response-builder.js +37 -0
  53. package/dist/algorithms/utils/response-builder.js.map +1 -0
  54. package/dist/api/web/web.d.ts.map +1 -1
  55. package/dist/api/web/web.js +0 -21
  56. package/dist/api/web/web.js.map +1 -1
  57. package/dist/commands/mcp-server.js +1 -1
  58. package/dist/config.d.ts +9 -1
  59. package/dist/config.d.ts.map +1 -1
  60. package/dist/config.js +35 -32
  61. package/dist/config.js.map +1 -1
  62. package/dist/core/associations.js +2 -2
  63. package/dist/core/associations.js.map +1 -1
  64. package/dist/core/core-memory.d.ts +5 -0
  65. package/dist/core/core-memory.d.ts.map +1 -1
  66. package/dist/core/core-memory.js +17 -5
  67. package/dist/core/core-memory.js.map +1 -1
  68. package/dist/core/embeddings.d.ts +9 -0
  69. package/dist/core/embeddings.d.ts.map +1 -1
  70. package/dist/core/embeddings.js +153 -16
  71. package/dist/core/embeddings.js.map +1 -1
  72. package/dist/core/layers/generator.d.ts +25 -0
  73. package/dist/core/layers/generator.d.ts.map +1 -0
  74. package/dist/core/layers/generator.js +76 -0
  75. package/dist/core/layers/generator.js.map +1 -0
  76. package/dist/core/mcp/tools.d.ts.map +1 -1
  77. package/dist/core/mcp/tools.js +71 -0
  78. package/dist/core/mcp/tools.js.map +1 -1
  79. package/dist/core/memory/hybrid-retrieval.d.ts.map +1 -1
  80. package/dist/core/memory/hybrid-retrieval.js +49 -1
  81. package/dist/core/memory/hybrid-retrieval.js.map +1 -1
  82. package/dist/core/memory/hybrid-search.d.ts.map +1 -1
  83. package/dist/core/memory/hybrid-search.js +0 -7
  84. package/dist/core/memory/hybrid-search.js.map +1 -1
  85. package/dist/core/memory/memories.d.ts.map +1 -1
  86. package/dist/core/memory/memories.js +47 -53
  87. package/dist/core/memory/memories.js.map +1 -1
  88. package/dist/core/memory/progressive-disclosure.d.ts.map +1 -1
  89. package/dist/core/memory/progressive-disclosure.js.map +1 -1
  90. package/dist/core/namespaces/index.d.ts +71 -0
  91. package/dist/core/namespaces/index.d.ts.map +1 -0
  92. package/dist/core/namespaces/index.js +296 -0
  93. package/dist/core/namespaces/index.js.map +1 -0
  94. package/dist/core/namespaces/uri-parser.d.ts +31 -0
  95. package/dist/core/namespaces/uri-parser.d.ts.map +1 -0
  96. package/dist/core/namespaces/uri-parser.js +74 -0
  97. package/dist/core/namespaces/uri-parser.js.map +1 -0
  98. package/dist/core/observations.d.ts.map +1 -1
  99. package/dist/core/observations.js +3 -12
  100. package/dist/core/observations.js.map +1 -1
  101. package/dist/core/projects.d.ts.map +1 -1
  102. package/dist/core/projects.js +0 -12
  103. package/dist/core/projects.js.map +1 -1
  104. package/dist/core/scheduler/cron-scheduler.d.ts.map +1 -1
  105. package/dist/core/scheduler/cron-scheduler.js +14 -0
  106. package/dist/core/scheduler/cron-scheduler.js.map +1 -1
  107. package/dist/core/session-hooks/self-iteration-job.d.ts +20 -0
  108. package/dist/core/session-hooks/self-iteration-job.d.ts.map +1 -0
  109. package/dist/core/session-hooks/self-iteration-job.js +278 -0
  110. package/dist/core/session-hooks/self-iteration-job.js.map +1 -0
  111. package/dist/core/session-hooks/session-hooks.d.ts +18 -0
  112. package/dist/core/session-hooks/session-hooks.d.ts.map +1 -0
  113. package/dist/core/session-hooks/session-hooks.js +55 -0
  114. package/dist/core/session-hooks/session-hooks.js.map +1 -0
  115. package/dist/core/tracing/collector.d.ts +111 -0
  116. package/dist/core/tracing/collector.d.ts.map +1 -0
  117. package/dist/core/tracing/collector.js +338 -0
  118. package/dist/core/tracing/collector.js.map +1 -0
  119. package/dist/core/tracing/visualizer.d.ts +32 -0
  120. package/dist/core/tracing/visualizer.d.ts.map +1 -0
  121. package/dist/core/tracing/visualizer.js +165 -0
  122. package/dist/core/tracing/visualizer.js.map +1 -0
  123. package/dist/db/bootstrap.d.ts.map +1 -1
  124. package/dist/db/bootstrap.js +33 -6
  125. package/dist/db/bootstrap.js.map +1 -1
  126. package/dist/drizzle/schema-sqlite.d.ts +401 -0
  127. package/dist/drizzle/schema-sqlite.d.ts.map +1 -1
  128. package/dist/drizzle/schema-sqlite.js +66 -0
  129. package/dist/drizzle/schema-sqlite.js.map +1 -1
  130. package/dist/drizzle/schema.d.ts +385 -0
  131. package/dist/drizzle/schema.d.ts.map +1 -1
  132. package/dist/drizzle/schema.js +64 -0
  133. package/dist/drizzle/schema.js.map +1 -1
  134. package/dist/index.d.ts +4 -4
  135. package/dist/index.js +101 -62
  136. package/dist/index.js.map +1 -1
  137. package/generated/mcp/manifest.json +23 -0
  138. package/generated/mcp/mcp-servers.json +25 -0
  139. package/generated/mcp/mcporter.json +34 -0
  140. package/generated/mcp/openclaw-memory-qmd.json +17 -0
  141. package/generated/mcp/runtime.json +12 -0
  142. package/package.json +68 -26
  143. package/packages/plugin-claude-code/README.md +73 -0
  144. package/packages/plugin-claude-code/dist/plugin-wrapper.d.ts +35 -0
  145. package/packages/plugin-claude-code/dist/plugin-wrapper.d.ts.map +1 -0
  146. package/packages/plugin-claude-code/dist/plugin-wrapper.js +191 -0
  147. package/packages/plugin-claude-code/dist/plugin-wrapper.js.map +1 -0
  148. package/packages/plugin-claude-code/package.json +31 -0
  149. package/packages/plugin-openclaw/README.md +70 -0
  150. package/packages/plugin-openclaw/dist/index.d.ts +49 -0
  151. package/packages/plugin-openclaw/dist/index.d.ts.map +1 -0
  152. package/packages/plugin-openclaw/dist/index.js +262 -0
  153. package/packages/plugin-openclaw/dist/index.js.map +1 -0
  154. package/packages/plugin-openclaw/openclaw.plugin.json +94 -0
  155. package/packages/plugin-openclaw/package.json +31 -0
  156. package/packages/plugin-opencode/install.mjs +217 -0
  157. package/packages/plugin-opencode/package.json +21 -0
  158. package/scripts/build-release.sh +20 -17
  159. package/scripts/check-secrets.js +132 -0
  160. package/scripts/dependency-manager.mjs +217 -0
  161. package/scripts/detect-clients.mjs +78 -0
  162. package/scripts/github-release.sh +43 -27
  163. package/scripts/install-interactive.mjs +674 -0
  164. package/scripts/install-plugin.mjs +415 -0
  165. package/scripts/test-interactive.mjs +131 -0
  166. package/commands/managed-sync.ts +0 -69
  167. package/commands/mcp-server.ts +0 -519
  168. package/dist/algorithms/merge/analytics/token-estimator.d.ts.map +0 -1
  169. package/dist/algorithms/merge/analytics/token-estimator.js.map +0 -1
  170. package/dist/algorithms/merge/detection/hash-filters.d.ts.map +0 -1
  171. package/dist/algorithms/merge/detection/hash-filters.js.map +0 -1
  172. package/dist/algorithms/merge/detection/semantic-ranker.d.ts.map +0 -1
  173. package/dist/algorithms/merge/detection/semantic-ranker.js.map +0 -1
  174. package/dist/algorithms/merge/detection/two-stage-detector.d.ts.map +0 -1
  175. package/dist/algorithms/merge/detection/two-stage-detector.js.map +0 -1
  176. package/dist/algorithms/merge/handlers/approve-merge.d.ts.map +0 -1
  177. package/dist/algorithms/merge/handlers/approve-merge.js.map +0 -1
  178. package/dist/algorithms/merge/handlers/detect-duplicates.d.ts.map +0 -1
  179. package/dist/algorithms/merge/handlers/detect-duplicates.js.map +0 -1
  180. package/dist/algorithms/merge/handlers/get-stats.d.ts.map +0 -1
  181. package/dist/algorithms/merge/handlers/get-stats.js.map +0 -1
  182. package/dist/algorithms/merge/handlers/list-proposals.d.ts.map +0 -1
  183. package/dist/algorithms/merge/handlers/list-proposals.js.map +0 -1
  184. package/dist/algorithms/merge/handlers/preview-merge.d.ts.map +0 -1
  185. package/dist/algorithms/merge/handlers/preview-merge.js.map +0 -1
  186. package/dist/algorithms/merge/handlers/reject-merge.d.ts.map +0 -1
  187. package/dist/algorithms/merge/handlers/reject-merge.js.map +0 -1
  188. package/dist/algorithms/merge/handlers/reverse-merge.d.ts.map +0 -1
  189. package/dist/algorithms/merge/handlers/reverse-merge.js.map +0 -1
  190. package/dist/algorithms/merge/safety/safety-checks.d.ts.map +0 -1
  191. package/dist/algorithms/merge/safety/safety-checks.js +0 -215
  192. package/dist/algorithms/merge/safety/safety-checks.js.map +0 -1
  193. package/dist/algorithms/merge/strategies/merge-strategies.d.ts.map +0 -1
  194. package/dist/algorithms/merge/strategies/merge-strategies.js.map +0 -1
  195. package/dist/core/embeddings/qmd-provider.d.ts +0 -65
  196. package/dist/core/embeddings/qmd-provider.d.ts.map +0 -1
  197. package/dist/core/embeddings/qmd-provider.js +0 -133
  198. package/dist/core/embeddings/qmd-provider.js.map +0 -1
  199. package/scripts/init-dirs.ts +0 -15
  200. /package/dist/algorithms/{merge/detection → detection}/hash-filters.d.ts +0 -0
  201. /package/dist/algorithms/{merge/detection → detection}/hash-filters.js +0 -0
  202. /package/dist/algorithms/{merge/handlers → handlers}/approve-merge.d.ts +0 -0
  203. /package/dist/algorithms/{merge/handlers → handlers}/get-stats.d.ts +0 -0
  204. /package/dist/algorithms/{merge/handlers → handlers}/list-proposals.d.ts +0 -0
  205. /package/dist/algorithms/{merge/handlers → handlers}/preview-merge.d.ts +0 -0
  206. /package/dist/algorithms/{merge/handlers → handlers}/reject-merge.d.ts +0 -0
  207. /package/dist/algorithms/{merge/handlers → handlers}/reverse-merge.d.ts +0 -0
  208. /package/dist/algorithms/{merge/strategies → strategies}/merge-strategies.js +0 -0
@@ -14,6 +14,24 @@ GOOGLE_CLOUD_LOCATION=us-central1
14
14
  # Or use service account:
15
15
  # GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
16
16
 
17
+ # OpenAI Embeddings (optional, 1536-dim)
18
+ # SQUISH_OPENAI_API_KEY=sk-...
19
+ # SQUISH_OPENAI_API_URL=https://api.openai.com/v1/embeddings
20
+ # SQUISH_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
21
+
22
+ # Ollama Embeddings (optional, model-dependent dims)
23
+ # SQUISH_OLLAMA_URL=http://localhost:11434
24
+ # SQUISH_OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
25
+
26
+ # Embedding performance & reliability
27
+ SQUISH_EMBEDDINGS_TIMEOUT_MS=30000
28
+ SQUISH_EMBEDDINGS_MAX_RETRIES=3
29
+ SQUISH_EMBEDDINGS_RETRY_DELAY_MS=1000
30
+ # Per-provider overrides (optional)
31
+ # SQUISH_OPENAI_TIMEOUT_MS=30000
32
+ # SQUISH_OLLAMA_TIMEOUT_MS=30000
33
+ # SQUISH_GOOGLE_MULTIMODAL_TIMEOUT_MS=30000
34
+
17
35
  # QMD for local markdown search
18
36
  SQUISH_QMD_ENABLED=true
19
37
  SQUISH_QMD_COLLECTIONS=./qmd-collections
@@ -28,3 +46,8 @@ SQUISH_QMD_FALLBACK=hybrid
28
46
  SQUISH_LIFECYCLE_ENABLED=true
29
47
  SQUISH_SUMMARIZATION_ENABLED=true
30
48
  SQUISH_GOVERNANCE_ENABLED=true
49
+
50
+ # Core Memory Configuration (v0.9.2+)
51
+ # Increase limits for daily agent usage (default: 16KB total, 4KB per section)
52
+ # SQUISH_CORE_MEMORY_TOTAL_BYTES=16384
53
+ # SQUISH_CORE_MEMORY_SECTION_BYTES=4096
package/CHANGELOG.md CHANGED
@@ -2,6 +2,108 @@
2
2
 
3
3
  All notable changes to Squish will be documented in this file.
4
4
 
5
+ ## [1.0.0] - 2026-03-17
6
+
7
+ ### 🚀 Major Release - Universal Plugin Architecture
8
+
9
+ #### Added - Interactive Multi-Step Wizard Installer
10
+ - **Beautiful CLI Wizard** with 5-step installation flow using `@clack/prompts`
11
+ - Step 1: Component Selection (CLI, MCP Server, AI Agent Plugins)
12
+ - Step 2: Plugin Selection (Claude Code, OpenClaw, Cursor, etc.)
13
+ - Step 3: Configuration (Local/Remote mode, Embeddings provider)
14
+ - Step 4: Review Summary with visual confirmation
15
+ - Step 5: Automated installation with progress spinners
16
+ - **Quick Install Mode**: `bun run install:interactive --quick` for CLI + all plugins
17
+ - **Dry-run support**: Preview installations without making changes
18
+ - **Configuration persistence**: Saves settings to `~/.squish/config.json`
19
+
20
+ #### Added - Universal Plugin Architecture
21
+ - **Multi-client support**: Works with Claude Code, OpenClaw, OpenCode, Codex, Cursor, VS Code, Windsurf
22
+ - **Plugin types**: Hooks (Claude Code), Plugin-slot (OpenClaw), MCP (all others)
23
+ - **Auto-detection**: Detects which AI agents are already installed
24
+ - **Source indicators**: Shows which plugins have source code available (📦)
25
+
26
+ #### Added - Core Infrastructure
27
+ - **Search Tracing System**: Debug and performance analysis for searches
28
+ - `core/tracing/collector.ts` - Collects search traces
29
+ - `core/tracing/visualizer.ts` - Visualizes trace data
30
+ - New MCP tools: `squish_get_search_traces`, `squish_get_trace_by_id`
31
+ - **Namespace Support**: Hierarchical memory organization
32
+ - `core/namespaces/index.ts` - Namespace management
33
+ - `core/namespaces/uri-parser.ts` - URI parsing for namespaces
34
+ - **Memory Layers (L0/L1/L2)**: Token-efficient retrieval
35
+ - `core/layers/generator.ts` - Generates memory layers
36
+ - **Self-Iteration Job**: Conversation memory extraction
37
+ - `core/session-hooks/self-iteration-job.ts` - Extracts memories from conversations
38
+ - `core/session-hooks/session-hooks.ts` - Session lifecycle hooks
39
+ - **Database Schema Updates**:
40
+ - Added `namespaces` table
41
+ - Added `memory_layers` table
42
+ - Added `search_traces` table
43
+
44
+ #### Fixed - Dependencies
45
+ - **qmd package**: Fixed from non-existent `qmd@0.15.1` to `@tobilu/qmd@2.0.1`
46
+ - **mcporter version**: Updated from `1.2.0` to `0.7.3` (matches installed version)
47
+ - **Scoped package support**: Dependency manager now handles `@scope/package` names
48
+ - **Binary detection**: Properly maps scoped packages to their binary names
49
+
50
+ #### Changed - Code Organization
51
+ - **Refactored CLI**: Improved imports and removed duplicates in `index.ts`
52
+ - **Safety Checks**: Better helper functions for algorithm validation
53
+ - **Response Builder**: Unified response builder for algorithm handlers
54
+ - **Config Validation**: Fixed provider validation logic
55
+ - **Association SQL**: Fixed placeholder issues in SQL queries
56
+ - **Directory Reorganization**: Renamed `core/sessions/` to `core/session-hooks/` for clarity
57
+ - Session lifecycle hooks now in dedicated directory
58
+ - Separates session auto-load (`core/session/`) from hooks/jobs (`core/session-hooks/`)
59
+
60
+ #### Documentation
61
+ - **Interactive Installer Guide**: Complete docs for wizard usage
62
+ - **Plugin Architecture**: Documentation for universal plugin system
63
+ - **Installation Guide**: Quick-start for all supported AI agents
64
+
65
+ ### Breaking Changes
66
+ None - fully backward compatible with 0.9.x
67
+
68
+ ### Migration Notes
69
+ - Run `bun run install:interactive` to use the new wizard
70
+ - Existing installations continue to work without changes
71
+ - Configuration automatically migrated on first run
72
+
73
+ ## [0.9.3] - 2026-03-14
74
+
75
+ ### Added - Core Memory & Embeddings Improvements (v0.9.2+)
76
+
77
+ #### Expanded Core Memory
78
+ - Increased default core memory limit from 2KB to 16KB total (4KB per section)
79
+ - Configurable limits via `SQUISH_CORE_MEMORY_TOTAL_BYTES` and `SQUISH_CORE_MEMORY_SECTION_BYTES`
80
+ - Added token estimation for better LLM context budgeting
81
+ - Core memory stats now show both byte and token usage
82
+
83
+ #### Robust Embeddings System
84
+ - Fixed hybrid fallback order: Google Multimodal → OpenAI → Ollama → Local (removed QMD from embedding chain)
85
+ - Added retry logic with exponential backoff (3 retries default)
86
+ - Added configurable timeouts (default 30s) with per-provider overrides
87
+ - New `checkEmbeddingProviderHealth()` function for monitoring
88
+ - Improved error handling and graceful degradation
89
+
90
+ #### Enhanced Configuration
91
+ - New environment variables for fine-tuning:
92
+ - `SQUISH_EMBEDDINGS_TIMEOUT_MS`, `SQUISH_EMBEDDINGS_MAX_RETRIES`, `SQUISH_EMBEDDINGS_RETRY_DELAY_MS`
93
+ - `SQUISH_OPENAI_TIMEOUT_MS`, `SQUISH_OLLAMA_TIMEOUT_MS`, `SQUISH_GOOGLE_MULTIMODAL_TIMEOUT_MS`
94
+ - Better connection handling for all embedding providers
95
+
96
+ ### Changed - Infrastructure
97
+ - Updated CI/CD workflows (`.github/workflows/ci.yml`, `release.yml`)
98
+ - Removed old `mcp-launch-checks.yml` workflow
99
+ - Updated release scripts (auto-detect version, better binary packaging)
100
+ - Database schema: added `tokens_estimate` column to `core_memory` table (auto-migrated)
101
+
102
+ ### Security & developer experience
103
+ - Renamed `.env.mcp` to `.env.mcp.example` (template) - added to `.gitignore`
104
+ - Updated all documentation with new configuration options
105
+ - Improved TypeScript type safety across codebase
106
+
5
107
  ## [0.9.1] - 2026-03-14
6
108
 
7
109
  ### Fixed - CLI & Database
package/QUICK-START.md CHANGED
@@ -27,7 +27,7 @@ curl http://localhost:8767/health
27
27
  {
28
28
  "status": "ok",
29
29
  "server": "squish-mcp",
30
- "version": "0.9.0",
30
+ "version": "0.9.2",
31
31
  "tools": 6
32
32
  }
33
33
  ```
@@ -48,17 +48,23 @@ curl -X POST http://localhost:8767/tools/call \
48
48
 
49
49
  ## Configure
50
50
 
51
- Copy `.env.mcp` to `.env` and customize:
51
+ Copy `.env.mcp.example` to `.env` and customize:
52
52
 
53
53
  ```bash
54
- cp .env.mcp .env
54
+ cp .env.mcp.example .env
55
55
  ```
56
56
 
57
57
  Key settings:
58
58
 
59
59
  - **SQUISH_MCP_PORT**: Server port (default: 8767)
60
- - **SQUISH_EMBEDDINGS_PROVIDER**: local|google-multimodal|hybrid
60
+ - **SQUISH_MCP_SERVER_ENABLED**: Enable/disable MCP server (default: true)
61
+ - **SQUISH_EMBEDDINGS_PROVIDER**: local|openai|ollama|google-multimodal|hybrid (default: local)
62
+ - **SQUISH_MULTIMODAL_EMBEDDINGS_ENABLED**: Enable Google multimodal (default: false)
61
63
  - **SQUISH_QMD_ENABLED**: Enable markdown search (true/false)
64
+ - **SQUISH_CORE_MEMORY_TOTAL_BYTES**: Total core memory limit in bytes (default: 16384)
65
+ - **SQUISH_CORE_MEMORY_SECTION_BYTES**: Per-section limit in bytes (default: 4096)
66
+ - **SQUISH_EMBEDDINGS_TIMEOUT_MS**: Timeout for embedding API calls (default: 30000)
67
+ - **SQUISH_EMBEDDINGS_MAX_RETRIES**: Max retries for failed embedding calls (default: 3)
62
68
 
63
69
  ## Full Docs
64
70
 
package/README.md CHANGED
@@ -73,14 +73,26 @@ Agent Action -----> [Squish Memory Layer]
73
73
 
74
74
  ## Quick Start
75
75
 
76
- ### For Claude Code (Plugin)
76
+ ### Universal Plugin Installer (Recommended)
77
+ ```bash
78
+ # Install for your AI assistant(s)
79
+ npx squish-memory install-plugin --client=claude-code # Claude Code
80
+ npx squish-memory install-plugin --client=openclaw # OpenClaw
81
+ npx squish-memory install-plugin --client=opencode # OpenCode
82
+ npx squish-memory install-plugin --client=all # All supported clients
83
+
84
+ # Verify installation
85
+ npx squish-memory install-plugin --client=claude-code --verify
86
+ ```
87
+
88
+ ### For Claude Code (Plugin) - Legacy Method
77
89
  ```bash
78
90
  # Install from marketplace
79
91
  /plugin marketplace add https://github.com/michielhdoteth/squish.git
80
92
  /plugin install squish@michielhdoteth-squish
81
93
  ```
82
94
 
83
- ### For OpenClaw (npm)
95
+ ### For OpenClaw (npm) - Legacy Method
84
96
  ```bash
85
97
  npm install -g squish-memory
86
98
  ```
@@ -128,6 +140,50 @@ curl "http://localhost:3000/api/memories/search?q=TypeScript"
128
140
  - **Transport Agnostic**: MCP (stdio/SSE), CLI, or HTTP/WebSocket - choose your preference
129
141
  - **Storage Flexible**: SQLite for local, PostgreSQL for team deployments
130
142
 
143
+ ## Universal Plugin Architecture
144
+
145
+ Squish now provides a **universal plugin system** that works as a plugin across all major AI assistant frameworks through a single manifest-driven installer.
146
+
147
+ ### How It Works
148
+ 1. Single `plugin-manifest.json` defines the plugin for all clients
149
+ 2. `npx squish-memory install-plugin --client=<target>` handles installation
150
+ 3. Auto-installs dependencies (mcporter, qmd) with pinned versions
151
+ 4. Generates client-specific configurations automatically
152
+ 5. Provides unified verification and troubleshooting
153
+
154
+ ### Supported Clients
155
+ | Client | Installation Method | Status |
156
+ |--------|-------------------|---------|
157
+ | Claude Code | Plugin hooks (.claude-plugin/) | ✅ Stable |
158
+ | OpenClaw | Memory slot via MCP bridge | ✅ Stable |
159
+ | OpenCode | MCP server config | ✅ Stable |
160
+ | Codex | MCP server config | ✅ Stable |
161
+ | Cursor | MCP server config | ✅ Beta |
162
+ | VS Code | MCP server config | ✅ Beta |
163
+ | Windsurf | MCP server config | ✅ Beta |
164
+
165
+ ### Quick Installation Examples
166
+ ```bash
167
+ # Install for Claude Code (recommended for Claude users)
168
+ npx squish-memory install-plugin --client=claude-code --verify
169
+
170
+ # Install for OpenClaw (recommended for OpenClaw users)
171
+ npx squish-memory install-plugin --client=openclaw --verify
172
+
173
+ # Install for all supported clients
174
+ npx squish-memory install-plugin --client=all --verify
175
+
176
+ # Install for multiple specific clients
177
+ npx squish-memory install-plugin --client=claude-code,openclaw,opencode --verify
178
+ ```
179
+
180
+ ### Benefits
181
+ - **One manifest to rule them all**: Single source of truth
182
+ - **Zero manual configuration**: Automatic dependency installation
183
+ - **Version pinned dependencies**: Stable, reproducible builds
184
+ - **Unified verification**: One command to check all clients
185
+ - **Backward compatible**: Existing integrations still work
186
+
131
187
  ## Universal API
132
188
 
133
189
  Squish now provides a universal HTTP API that works with any AI agent:
@@ -188,11 +244,24 @@ PORT=3000 # API server port
188
244
  **Optional:**
189
245
  ```bash
190
246
  SQUISH_DATA_DIR=./.squish # Custom data directory
191
- SQUISH_EMBEDDINGS_PROVIDER=local # local, openai, or ollama
247
+ SQUISH_EMBEDDINGS_PROVIDER=local # local, openai, ollama, google-multimodal, hybrid
192
248
 
193
249
  # For better embeddings (optional)
194
250
  SQUISH_OPENAI_API_KEY=sk-...
251
+ SQUISH_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
195
252
  SQUISH_OLLAMA_URL=http://localhost:11434
253
+ SQUISH_OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
254
+ SQUISH_GOOGLE_CLOUD_PROJECT=your-project
255
+ SQUISH_GOOGLE_CLOUD_API_KEY=your-key
256
+
257
+ # Embedding performance & reliability
258
+ SQUISH_EMBEDDINGS_TIMEOUT_MS=30000
259
+ SQUISH_EMBEDDINGS_MAX_RETRIES=3
260
+ SQUISH_EMBEDDINGS_RETRY_DELAY_MS=1000
261
+
262
+ # Core memory size (default: 16KB total, 4KB per section)
263
+ SQUISH_CORE_MEMORY_TOTAL_BYTES=16384
264
+ SQUISH_CORE_MEMORY_SECTION_BYTES=4096
196
265
 
197
266
  # For team mode
198
267
  DATABASE_URL=postgresql://user:pass@host/db
@@ -212,7 +281,7 @@ Squish employs a two-tier architecture for optimal performance and reliability:
212
281
  - **CLI**: Standalone command-line tool for shell-based agents and debugging
213
282
 
214
283
  ### Memory Organization
215
- - **Core Memory (2KB)**: Always-visible sections for persona, user info, project context, and working notes
284
+ - **Core Memory (configurable, default 16KB total)**: Always-visible sections for persona, user info, project context, and working notes. Each section limited to 4KB by default. Token estimation helps track LLM context usage.
216
285
  - **Context Paging**: Agent-controlled retrieval with token budgeting (8KB default)
217
286
  - **Background Jobs**: Automatic memory maintenance including decay, deduplication, and consolidation
218
287
 
@@ -0,0 +1,152 @@
1
+ {
2
+ "id": "squish-memory",
3
+ "name": "Squish Memory",
4
+ "version": "1.0.0",
5
+ "description": "Universal two-tier memory system for AI agents with hybrid search, core memory, and MCP-first architecture",
6
+ "capabilities": ["mcp", "cli", "web"],
7
+ "targets": {
8
+ "claude-code": {
9
+ "type": "hooks",
10
+ "hooks": ["SessionStart", "UserPromptSubmit", "PostToolUse", "SessionEnd"],
11
+ "install": {
12
+ "copy": [
13
+ { "from": ".claude-plugin/plugin.json", "to": "~/.claude/plugin.json" }
14
+ ]
15
+ },
16
+ "verify": {
17
+ "fileExists": "~/.claude/plugin.json",
18
+ "toolCheck": "squish_health"
19
+ }
20
+ },
21
+ "openclaw": {
22
+ "type": "plugin-slot",
23
+ "slot": "memory",
24
+ "tools": ["memory_search", "memory_get"],
25
+ "install": {
26
+ "command": "node scripts/openclaw-bootstrap.mjs --skip-tool-check"
27
+ },
28
+ "verify": {
29
+ "fileExists": "~/.openclaw/openclaw-memory.json",
30
+ "toolCheck": "memory_search"
31
+ }
32
+ },
33
+ "opencode": {
34
+ "type": "mcp",
35
+ "tools": ["squish_remember", "squish_search", "squish_recall", "squish_context", "squish_health"],
36
+ "install": {
37
+ "copy": [
38
+ { "from": "generated/mcp/mcp-servers.json", "to": "~/.config/opencode/mcp-servers.json" }
39
+ ]
40
+ },
41
+ "verify": {
42
+ "fileExists": "~/.config/opencode/mcp-servers.json",
43
+ "toolCheck": "squish_health"
44
+ }
45
+ },
46
+ "codex": {
47
+ "type": "mcp",
48
+ "tools": ["squish_remember", "squish_search", "squish_recall", "squish_context", "squish_health"],
49
+ "install": {
50
+ "copy": [
51
+ { "from": "generated/mcp/mcp-servers.json", "to": "~/.codex/mcp-servers.json" }
52
+ ]
53
+ },
54
+ "verify": {
55
+ "fileExists": "~/.codex/mcp-servers.json",
56
+ "toolCheck": "squish_health"
57
+ }
58
+ },
59
+ "cursor": {
60
+ "type": "mcp",
61
+ "tools": ["squish_remember", "squish_search", "squish_recall", "squish_context", "squish_health"],
62
+ "install": {
63
+ "copy": [
64
+ { "from": "generated/mcp/mcp-servers.json", "to": "~/.cursor/mcp.json" }
65
+ ]
66
+ },
67
+ "verify": {
68
+ "fileExists": "~/.cursor/mcp.json",
69
+ "toolCheck": "squish_health"
70
+ }
71
+ },
72
+ "vscode": {
73
+ "type": "mcp",
74
+ "tools": ["squish_remember", "squish_search", "squish_recall", "squish_context", "squish_health"],
75
+ "install": {
76
+ "copy": [
77
+ { "from": "generated/mcp/mcp-servers.json", "to": "~/.vscode/mcp/servers.json" }
78
+ ]
79
+ },
80
+ "verify": {
81
+ "fileExists": "~/.vscode/mcp/servers.json",
82
+ "toolCheck": "squish_health"
83
+ }
84
+ },
85
+ "windsurf": {
86
+ "type": "mcp",
87
+ "tools": ["squish_remember", "squish_search", "squish_recall", "squish_context", "squish_health"],
88
+ "install": {
89
+ "copy": [
90
+ { "from": "generated/mcp/mcp-servers.json", "to": "~/.windsurf/mcp-servers.json" }
91
+ ]
92
+ },
93
+ "verify": {
94
+ "fileExists": "~/.windsurf/mcp-servers.json",
95
+ "toolCheck": "squish_health"
96
+ }
97
+ }
98
+ },
99
+ "dependencies": {
100
+ "mcporter": {
101
+ "version": "0.7.3",
102
+ "autoInstall": true,
103
+ "optional": false,
104
+ "provides": ["mcp-bridge", "openclaw-memory"]
105
+ },
106
+ "@tobilu/qmd": {
107
+ "version": "2.0.1",
108
+ "autoInstall": true,
109
+ "optional": false,
110
+ "provides": ["fast-search", "bm25", "vector-search"]
111
+ }
112
+ },
113
+ "auth": {
114
+ "modes": ["none", "token"],
115
+ "default": "none",
116
+ "token": {
117
+ "envVar": "SQUISH_REMOTE_TOKEN",
118
+ "help": "Set SQUISH_REMOTE_TOKEN for remote mode authentication"
119
+ }
120
+ },
121
+ "pinning": {
122
+ "mcporter": "0.7.3",
123
+ "@tobilu/qmd": "2.0.1",
124
+ "@modelcontextprotocol/sdk": "1.27.1"
125
+ },
126
+ "entry": {
127
+ "mcp": "dist/commands/mcp-server.cjs",
128
+ "cli": "dist/index.js",
129
+ "plugin": "packages/plugin-openclaw/dist/index.js"
130
+ },
131
+ "compatibility": {
132
+ "minNodeVersion": "18.0.0",
133
+ "clients": [
134
+ { "id": "claude-code", "minVersion": "0.62.0" },
135
+ { "id": "openclaw", "minVersion": "2026.2.15" },
136
+ { "id": "opencode", "minVersion": "0.1.0" },
137
+ { "id": "codex", "minVersion": "0.1.0" },
138
+ { "id": "cursor", "minVersion": "0.45.0" },
139
+ { "id": "vscode-mcp", "minVersion": "1.0.0" },
140
+ { "id": "windsurf", "minVersion": "0.1.0" }
141
+ ]
142
+ },
143
+ "healthCheck": {
144
+ "mcpTool": "squish_health",
145
+ "httpEndpoint": "/health"
146
+ },
147
+ "generated": {
148
+ "from": "config/plugin-manifest.json",
149
+ "generator": "squish-memory@1.0.0",
150
+ "timestamp": "2026-01-17T00:00:00.000Z"
151
+ }
152
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Squish Universal Plugin Manifest",
4
+ "description": "Universal plugin manifest for Squish memory system across all AI assistant clients",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "id",
9
+ "name",
10
+ "version",
11
+ "description",
12
+ "capabilities",
13
+ "targets",
14
+ "dependencies",
15
+ "auth"
16
+ ],
17
+ "properties": {
18
+ "id": {
19
+ "type": "string",
20
+ "pattern": "^@squish/(memory|plugin)-[a-z0-9-]+$",
21
+ "description": "Unique plugin identifier in @squish/ scope"
22
+ },
23
+ "name": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "description": "Human-readable plugin name"
27
+ },
28
+ "version": {
29
+ "type": "string",
30
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
31
+ "description": "Semantic version (major.minor.patch)"
32
+ },
33
+ "description": {
34
+ "type": "string",
35
+ "minLength": 10,
36
+ "description": "Short description of the plugin"
37
+ },
38
+ "capabilities": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string",
42
+ "enum": ["mcp", "cli", "web", "hooks"]
43
+ },
44
+ "minItems": 1,
45
+ "description": "What capabilities this plugin provides"
46
+ },
47
+ "targets": {
48
+ "type": "object",
49
+ "additionalProperties": {
50
+ "type": "object",
51
+ "required": ["type"],
52
+ "properties": {
53
+ "type": {
54
+ "type": "string",
55
+ "enum": ["mcp", "hooks", "plugin-slot"]
56
+ },
57
+ "slot": {
58
+ "type": "string",
59
+ "description": "Plugin slot name (for plugin-slot type)"
60
+ },
61
+ "tools": {
62
+ "type": "array",
63
+ "items": { "type": "string" },
64
+ "description": "List of tools this plugin exposes (for mcp type)"
65
+ },
66
+ "hooks": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string",
70
+ "enum": [
71
+ "SessionStart",
72
+ "UserPromptSubmit",
73
+ "PostToolUse",
74
+ "SessionEnd",
75
+ "onInstall"
76
+ ]
77
+ },
78
+ "description": "List of hooks to register (for hooks type)"
79
+ },
80
+ "configPath": {
81
+ "type": "string",
82
+ "description": "Relative path to client config file"
83
+ },
84
+ "install": {
85
+ "type": "object",
86
+ "properties": {
87
+ "copy": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "required": ["from", "to"],
92
+ "properties": {
93
+ "from": { "type": "string" },
94
+ "to": { "type": "string" }
95
+ }
96
+ }
97
+ },
98
+ "merge": {
99
+ "type": "object",
100
+ "properties": {
101
+ "file": { "type": "string" },
102
+ "strategy": { "type": "string", "enum": ["deep-merge", "replace"] }
103
+ }
104
+ },
105
+ "command": {
106
+ "type": "string",
107
+ "description": "Custom install command to run"
108
+ }
109
+ }
110
+ },
111
+ "verify": {
112
+ "type": "object",
113
+ "properties": {
114
+ "command": { "type": "string" },
115
+ "fileExists": { "type": "string" },
116
+ "toolCheck": { "type": "string" }
117
+ }
118
+ }
119
+ }
120
+ },
121
+ "minProperties": 1,
122
+ "description": "Client-specific configurations"
123
+ },
124
+ "dependencies": {
125
+ "type": "object",
126
+ "additionalProperties": {
127
+ "type": "object",
128
+ "required": ["version", "autoInstall"],
129
+ "properties": {
130
+ "version": {
131
+ "type": "string",
132
+ "description": "Pinned version (e.g., '1.2.0')"
133
+ },
134
+ "autoInstall": {
135
+ "type": "boolean",
136
+ "description": "Whether to auto-install if missing"
137
+ },
138
+ "optional": {
139
+ "type": "boolean",
140
+ "default": false,
141
+ "description": "Whether this dependency is optional"
142
+ },
143
+ "provides": {
144
+ "type": "array",
145
+ "items": { "type": "string" },
146
+ "description": "List of capabilities this dependency provides"
147
+ }
148
+ }
149
+ },
150
+ "description": "Runtime dependencies with version pinning"
151
+ },
152
+ "auth": {
153
+ "type": "object",
154
+ "required": ["modes", "default"],
155
+ "properties": {
156
+ "modes": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "string",
160
+ "enum": ["none", "token", "oauth"]
161
+ },
162
+ "minItems": 1,
163
+ "description": "Supported authentication modes"
164
+ },
165
+ "default": {
166
+ "type": "string",
167
+ "enum": ["none", "token", "oauth"],
168
+ "description": "Default auth mode"
169
+ },
170
+ "token": {
171
+ "type": "object",
172
+ "properties": {
173
+ "envVar": { "type": "string" },
174
+ "help": { "type": "string" }
175
+ }
176
+ },
177
+ "oauth": {
178
+ "type": "object",
179
+ "properties": {
180
+ "providers": {
181
+ "type": "array",
182
+ "items": { "type": "string", "enum": ["github", "google", "anthropic"] }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "pinning": {
189
+ "type": "object",
190
+ "additionalProperties": {
191
+ "type": "string"
192
+ },
193
+ "description": "Compatibility matrix for all dependencies"
194
+ },
195
+ "entry": {
196
+ "type": "object",
197
+ "properties": {
198
+ "mcp": {
199
+ "type": "string",
200
+ "description": "Path to MCP server entry point (for mcp capability)"
201
+ },
202
+ "plugin": {
203
+ "type": "string",
204
+ "description": "Path to plugin entry point (for plugin-slot type)"
205
+ },
206
+ "cli": {
207
+ "type": "string",
208
+ "description": "Path to CLI binary (for cli capability)"
209
+ }
210
+ }
211
+ },
212
+ "compatibility": {
213
+ "type": "object",
214
+ "properties": {
215
+ "minNodeVersion": { "type": "string" },
216
+ "maxNodeVersion": { "type": "string" },
217
+ "clients": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "object",
221
+ "properties": {
222
+ "id": { "type": "string" },
223
+ "minVersion": { "type": "string" },
224
+ "maxVersion": { "type": "string" }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ },
230
+ "healthCheck": {
231
+ "type": "object",
232
+ "properties": {
233
+ "mcpTool": {
234
+ "type": "string",
235
+ "description": "Tool name to call for health check"
236
+ },
237
+ "httpEndpoint": {
238
+ "type": "string",
239
+ "description": "HTTP endpoint for health check"
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }