squish-memory 0.8.1 → 0.9.1
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -2
- package/.env.mcp +30 -0
- package/.mcp.json +2 -5
- package/CHANGELOG.md +111 -0
- package/QUICK-START.md +65 -0
- package/README.md +188 -530
- package/commands/managed-sync.ts +69 -0
- package/commands/mcp-server.ts +519 -0
- package/config/mcp-cli-fallback-policy.json +22 -0
- package/config/mcp-migration-map.json +22 -0
- package/config/mcp-mode-semantics.json +21 -0
- package/config/mcp-remote-auth.json +36 -0
- package/config/mcp-universal.schema.json +48 -0
- package/config/mcp.json +38 -0
- package/config/remote-memory-policy.json +32 -0
- package/dist/algorithms/merge/detection/hash-filters.js +2 -2
- package/dist/algorithms/merge/detection/hash-filters.js.map +1 -1
- package/dist/algorithms/merge/detection/two-stage-detector.d.ts +5 -2
- package/dist/algorithms/merge/detection/two-stage-detector.d.ts.map +1 -1
- package/dist/algorithms/merge/detection/two-stage-detector.js +139 -22
- package/dist/algorithms/merge/detection/two-stage-detector.js.map +1 -1
- package/dist/commands/managed-sync.d.ts +10 -0
- package/dist/commands/managed-sync.d.ts.map +1 -0
- package/dist/commands/managed-sync.js +64 -0
- package/dist/commands/managed-sync.js.map +1 -0
- package/dist/commands/mcp-server.d.ts +3 -0
- package/dist/commands/mcp-server.d.ts.map +1 -0
- package/dist/commands/mcp-server.js +389 -0
- package/dist/commands/mcp-server.js.map +1 -0
- package/dist/config.d.ts +24 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +32 -1
- package/dist/config.js.map +1 -1
- package/dist/core/associations.d.ts +1 -1
- package/dist/core/associations.d.ts.map +1 -1
- package/dist/core/consolidation.d.ts +31 -0
- package/dist/core/consolidation.d.ts.map +1 -1
- package/dist/core/consolidation.js +237 -29
- package/dist/core/consolidation.js.map +1 -1
- package/dist/core/embeddings/google-multimodal.d.ts +14 -0
- package/dist/core/embeddings/google-multimodal.d.ts.map +1 -0
- package/dist/core/embeddings/google-multimodal.js +142 -0
- package/dist/core/embeddings/google-multimodal.js.map +1 -0
- package/dist/core/embeddings.d.ts +3 -2
- package/dist/core/embeddings.d.ts.map +1 -1
- package/dist/core/embeddings.js +61 -39
- package/dist/core/embeddings.js.map +1 -1
- package/dist/core/mcp/client.d.ts +17 -0
- package/dist/core/mcp/client.d.ts.map +1 -0
- package/dist/core/mcp/client.js +101 -0
- package/dist/core/mcp/client.js.map +1 -0
- package/dist/core/mcp/index.d.ts +6 -0
- package/dist/core/mcp/index.d.ts.map +1 -0
- package/dist/core/mcp/index.js +6 -0
- package/dist/core/mcp/index.js.map +1 -0
- package/dist/core/mcp/server.d.ts +18 -0
- package/dist/core/mcp/server.d.ts.map +1 -0
- package/dist/core/mcp/server.js +131 -0
- package/dist/core/mcp/server.js.map +1 -0
- package/dist/core/mcp/standalone-server.d.ts +13 -0
- package/dist/core/mcp/standalone-server.d.ts.map +1 -0
- package/dist/core/mcp/standalone-server.js +46 -0
- package/dist/core/mcp/standalone-server.js.map +1 -0
- package/dist/core/mcp/tools.d.ts +9 -0
- package/dist/core/mcp/tools.d.ts.map +1 -0
- package/dist/core/mcp/tools.js +262 -0
- package/dist/core/mcp/tools.js.map +1 -0
- package/dist/core/mcp/types.d.ts +315 -0
- package/dist/core/mcp/types.d.ts.map +1 -0
- package/dist/core/mcp/types.js +48 -0
- package/dist/core/mcp/types.js.map +1 -0
- package/dist/core/memory/categorizer.d.ts +27 -0
- package/dist/core/memory/categorizer.d.ts.map +1 -0
- package/dist/core/memory/categorizer.js +304 -0
- package/dist/core/memory/categorizer.js.map +1 -0
- package/dist/core/memory/conflict-detector.d.ts +7 -0
- package/dist/core/memory/conflict-detector.d.ts.map +1 -0
- package/dist/core/memory/conflict-detector.js +43 -0
- package/dist/core/memory/conflict-detector.js.map +1 -0
- package/dist/core/memory/context-collector.d.ts +10 -0
- package/dist/core/memory/context-collector.d.ts.map +1 -0
- package/dist/core/memory/context-collector.js +55 -0
- package/dist/core/memory/context-collector.js.map +1 -0
- package/dist/core/memory/contradiction-resolver.d.ts +40 -0
- package/dist/core/memory/contradiction-resolver.d.ts.map +1 -0
- package/dist/core/memory/contradiction-resolver.js +368 -0
- package/dist/core/memory/contradiction-resolver.js.map +1 -0
- package/dist/core/memory/edit-workflow.d.ts +19 -0
- package/dist/core/memory/edit-workflow.d.ts.map +1 -0
- package/dist/core/memory/edit-workflow.js +120 -0
- package/dist/core/memory/edit-workflow.js.map +1 -0
- package/dist/core/memory/feedback-tracker.d.ts +12 -0
- package/dist/core/memory/feedback-tracker.d.ts.map +1 -0
- package/dist/core/memory/feedback-tracker.js +151 -0
- package/dist/core/memory/feedback-tracker.js.map +1 -0
- package/dist/core/memory/hybrid-retrieval.d.ts +11 -12
- package/dist/core/memory/hybrid-retrieval.d.ts.map +1 -1
- package/dist/core/memory/hybrid-retrieval.js +56 -28
- package/dist/core/memory/hybrid-retrieval.js.map +1 -1
- package/dist/core/memory/hybrid-scorer.d.ts +5 -16
- package/dist/core/memory/hybrid-scorer.d.ts.map +1 -1
- package/dist/core/memory/hybrid-scorer.js +161 -125
- package/dist/core/memory/hybrid-scorer.js.map +1 -1
- package/dist/core/memory/hybrid-search.js +56 -20
- package/dist/core/memory/hybrid-search.js.map +1 -1
- package/dist/core/memory/memories.d.ts +4 -0
- package/dist/core/memory/memories.d.ts.map +1 -1
- package/dist/core/memory/memories.js +133 -60
- package/dist/core/memory/memories.js.map +1 -1
- package/dist/core/memory/progressive-disclosure.d.ts +43 -0
- package/dist/core/memory/progressive-disclosure.d.ts.map +1 -0
- package/dist/core/memory/progressive-disclosure.js +280 -0
- package/dist/core/memory/progressive-disclosure.js.map +1 -0
- package/dist/core/memory/query-rewriter.d.ts +13 -0
- package/dist/core/memory/query-rewriter.d.ts.map +1 -0
- package/dist/core/memory/query-rewriter.js +118 -0
- package/dist/core/memory/query-rewriter.js.map +1 -0
- package/dist/core/memory/response-analyzer.d.ts +9 -0
- package/dist/core/memory/response-analyzer.d.ts.map +1 -0
- package/dist/core/memory/response-analyzer.js +61 -0
- package/dist/core/memory/response-analyzer.js.map +1 -0
- package/dist/core/memory/stats.d.ts +17 -0
- package/dist/core/memory/stats.d.ts.map +1 -0
- package/dist/core/memory/stats.js +87 -0
- package/dist/core/memory/stats.js.map +1 -0
- package/dist/core/memory/telemetry.d.ts +69 -0
- package/dist/core/memory/telemetry.d.ts.map +1 -0
- package/dist/core/memory/telemetry.js +313 -0
- package/dist/core/memory/telemetry.js.map +1 -0
- package/dist/core/memory/temporal-facts.d.ts +41 -0
- package/dist/core/memory/temporal-facts.d.ts.map +1 -0
- package/dist/core/memory/temporal-facts.js +262 -0
- package/dist/core/memory/temporal-facts.js.map +1 -0
- package/dist/core/memory/trigger-detector.d.ts +14 -0
- package/dist/core/memory/trigger-detector.d.ts.map +1 -0
- package/dist/core/memory/trigger-detector.js +42 -0
- package/dist/core/memory/trigger-detector.js.map +1 -0
- package/dist/core/memory/write-gate.d.ts +54 -0
- package/dist/core/memory/write-gate.d.ts.map +1 -0
- package/dist/core/memory/write-gate.js +210 -0
- package/dist/core/memory/write-gate.js.map +1 -0
- package/dist/core/projects.d.ts +2 -0
- package/dist/core/projects.d.ts.map +1 -1
- package/dist/core/projects.js +33 -0
- package/dist/core/projects.js.map +1 -1
- package/dist/core/scheduler/cron-scheduler.d.ts +32 -0
- package/dist/core/scheduler/cron-scheduler.d.ts.map +1 -0
- package/dist/core/scheduler/cron-scheduler.js +238 -0
- package/dist/core/scheduler/cron-scheduler.js.map +1 -0
- package/dist/core/scheduler/heartbeat.d.ts +11 -0
- package/dist/core/scheduler/heartbeat.d.ts.map +1 -0
- package/dist/core/scheduler/heartbeat.js +73 -0
- package/dist/core/scheduler/heartbeat.js.map +1 -0
- package/dist/core/scheduler/index.d.ts +8 -0
- package/dist/core/scheduler/index.d.ts.map +1 -0
- package/dist/core/scheduler/index.js +8 -0
- package/dist/core/scheduler/index.js.map +1 -0
- package/dist/core/scheduler/job-runner.d.ts +11 -0
- package/dist/core/scheduler/job-runner.d.ts.map +1 -0
- package/dist/core/scheduler/job-runner.js +161 -0
- package/dist/core/scheduler/job-runner.js.map +1 -0
- package/dist/core/session/auto-load.d.ts +6 -0
- package/dist/core/session/auto-load.d.ts.map +1 -0
- package/dist/core/session/auto-load.js +119 -0
- package/dist/core/session/auto-load.js.map +1 -0
- package/dist/core/session/index.d.ts +7 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +7 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/types.d.ts +26 -0
- package/dist/core/session/types.d.ts.map +1 -0
- package/dist/core/session/types.js +10 -0
- package/dist/core/session/types.js.map +1 -0
- package/dist/core/snapshots/comparison.d.ts.map +1 -1
- package/dist/core/snapshots/comparison.js +8 -2
- package/dist/core/snapshots/comparison.js.map +1 -1
- package/dist/core/utils/content-extraction.d.ts.map +1 -1
- package/dist/core/utils/content-extraction.js +11 -1
- package/dist/core/utils/content-extraction.js.map +1 -1
- package/dist/core/utils/summarization-helpers.d.ts.map +1 -1
- package/dist/core/utils/summarization-helpers.js +4 -1
- package/dist/core/utils/summarization-helpers.js.map +1 -1
- package/dist/core/utils.d.ts.map +1 -1
- package/dist/core/utils.js +26 -3
- package/dist/core/utils.js.map +1 -1
- package/dist/core/worker.d.ts +20 -0
- package/dist/core/worker.d.ts.map +1 -1
- package/dist/core/worker.js +86 -0
- package/dist/core/worker.js.map +1 -1
- package/dist/db/adapter.d.ts +1 -5
- package/dist/db/adapter.d.ts.map +1 -1
- package/dist/db/adapter.js +125 -12
- package/dist/db/adapter.js.map +1 -1
- package/dist/db/bootstrap.d.ts.map +1 -1
- package/dist/db/bootstrap.js +178 -3
- package/dist/db/bootstrap.js.map +1 -1
- package/dist/db/index.d.ts +1 -5
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +7 -4
- package/dist/db/index.js.map +1 -1
- package/dist/drizzle/schema-sqlite.d.ts +1953 -612
- package/dist/drizzle/schema-sqlite.d.ts.map +1 -1
- package/dist/drizzle/schema-sqlite.js +134 -0
- package/dist/drizzle/schema-sqlite.js.map +1 -1
- package/dist/drizzle/schema.d.ts +684 -3
- package/dist/drizzle/schema.d.ts.map +1 -1
- package/dist/drizzle/schema.js +81 -1
- package/dist/drizzle/schema.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +152 -13
- package/dist/index.js.map +1 -1
- package/package.json +125 -103
- package/scripts/build-release.sh +33 -0
- package/scripts/db/check-db.mjs +88 -0
- package/scripts/db/fix-all-columns.mjs +52 -0
- package/scripts/db/fix-schema-all.mjs +55 -0
- package/scripts/db/fix-schema-full.mjs +46 -0
- package/scripts/db/fix-schema.mjs +38 -0
- package/scripts/db/init-db.mjs +13 -0
- package/scripts/db/recreate-db.mjs +14 -0
- package/scripts/generate-mcp.mjs +264 -0
- package/scripts/github-release.sh +61 -0
- package/scripts/init-dirs.mjs +13 -0
- package/scripts/init-dirs.ts +15 -0
- package/scripts/install-mcp.mjs +116 -0
- package/scripts/install-web.sh +120 -0
- package/scripts/install.mjs +340 -0
- package/scripts/openclaw-bootstrap.mjs +127 -0
- package/scripts/package-release.sh +71 -0
- package/scripts/remote-preflight.mjs +62 -0
- package/scripts/squish-fallback.mjs +132 -0
- package/scripts/test/test-all-systems.mjs +139 -0
- package/scripts/test/test-memory-system.mjs +139 -0
- package/scripts/test/test-v0.5.0.mjs +210 -0
- package/scripts/verify-mcp.mjs +214 -0
- package/skills/memory-guide/SKILL.md +181 -123
- package/skills/squish-cli/SKILL.md +200 -0
- package/skills/squish-mcp/SKILL.md +311 -0
- package/skills/squish-memory/SKILL.md +100 -62
- package/skills/squish-memory/claude-desktop.json +12 -0
- package/skills/squish-memory/install.mjs +335 -0
- package/skills/squish-memory/install.sh +94 -62
- package/skills/squish-memory/openclaw.json +13 -0
- package/skills/squish-memory/opencode.json +14 -0
- package/skills/squish-memory/skill.json +32 -0
- package/dist/adapters/claude-code/capture.d.ts +0 -11
- package/dist/adapters/claude-code/capture.d.ts.map +0 -1
- package/dist/adapters/claude-code/capture.js +0 -100
- package/dist/adapters/claude-code/capture.js.map +0 -1
- package/dist/adapters/claude-code/index.d.ts +0 -5
- package/dist/adapters/claude-code/index.d.ts.map +0 -1
- package/dist/adapters/claude-code/index.js +0 -6
- package/dist/adapters/claude-code/index.js.map +0 -1
- package/dist/adapters/claude-code/injection.d.ts +0 -34
- package/dist/adapters/claude-code/injection.d.ts.map +0 -1
- package/dist/adapters/claude-code/injection.js +0 -127
- package/dist/adapters/claude-code/injection.js.map +0 -1
- package/dist/adapters/claude-code/plugin-wrapper.d.ts +0 -21
- package/dist/adapters/claude-code/plugin-wrapper.d.ts.map +0 -1
- package/dist/adapters/claude-code/plugin-wrapper.js +0 -239
- package/dist/adapters/claude-code/plugin-wrapper.js.map +0 -1
- package/dist/adapters/claude-code/types.d.ts +0 -46
- package/dist/adapters/claude-code/types.d.ts.map +0 -1
- package/dist/adapters/claude-code/types.js +0 -6
- package/dist/adapters/claude-code/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,606 +1,264 @@
|
|
|
1
|
-
# Squish - Two-Tier Memory
|
|
1
|
+
# Squish - Universal Two-Tier Memory for AI Agents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Squish gives any AI agent persistent, intelligent memory through a two-tier architecture.** Without memory, agents forget everything between sessions. With Squish, they learn, adapt, and get smarter over time - regardless of which agent framework you use.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
**What's New in v0.7.2:**
|
|
10
|
-
- **CLI Mode**: Execute `squish remember`, `search`, `recall` directly from terminal
|
|
11
|
-
- **Local Embeddings**: Zero-dependency TF-IDF embeddings (works offline, no Ollama needed)
|
|
12
|
-
- **OpenClaw Ready**: Install via npm, use via bash commands
|
|
13
|
-
|
|
14
|
-
## Features
|
|
15
|
-
|
|
16
|
-
### Memory Architecture
|
|
17
|
-
|
|
18
|
-
- **Core Memory (Tier 1)**: 2KB always-visible persistent memory divided into 4 sections
|
|
19
|
-
- `persona`: AI assistant personality and role definition
|
|
20
|
-
- `user_info`: Information about the user and their preferences
|
|
21
|
-
- `project_context`: Current project architecture and patterns
|
|
22
|
-
- `working_notes`: Transient notes during active work sessions
|
|
23
|
-
|
|
24
|
-
- **Context Paging (Tier 2)**: Agent-controlled memory loading with token budgeting
|
|
25
|
-
- Dynamically load/evict memories based on relevance
|
|
26
|
-
- Token-aware context management (8KB default budget)
|
|
27
|
-
- Automatic memory decay and lifecycle management
|
|
28
|
-
|
|
29
|
-
### MCP Tools
|
|
30
|
-
|
|
31
|
-
**Core Memory Management:**
|
|
32
|
-
- `/core_memory` - View, edit, or append to always-in-context memory sections
|
|
33
|
-
|
|
34
|
-
**Context & Search:**
|
|
35
|
-
- `/context_paging` - Load/evict/view loaded memories in current session
|
|
36
|
-
- `/context` - Get project context with semantically relevant memories
|
|
37
|
-
- `/search` - Full-text + semantic search across memories
|
|
38
|
-
- `/context_status` - Check context window usage and loaded memories
|
|
39
|
-
|
|
40
|
-
**Memory Operations:**
|
|
41
|
-
- `/remember` - Store new observations, facts, decisions, and preferences
|
|
42
|
-
- `/recall` - Retrieve specific memories by ID with metadata
|
|
43
|
-
- `/observe` - Record tool usage and patterns observed during execution
|
|
44
|
-
|
|
45
|
-
**Memory Management:**
|
|
46
|
-
- `/merge` - Detect duplicates, preview/approve/reject merges
|
|
47
|
-
|
|
48
|
-
**System:**
|
|
49
|
-
- `/health` - Check MCP server and database connectivity
|
|
50
|
-
|
|
51
|
-
### Storage
|
|
52
|
-
|
|
53
|
-
- **SQLite** (local mode): Local-first, zero setup required
|
|
54
|
-
- **PostgreSQL** (team mode): Shared memory across users
|
|
55
|
-
- Smart embeddings: Local TF-IDF (offline) for SQLite, OpenAI/Ollama for PostgreSQL
|
|
56
|
-
|
|
57
|
-
### OpenClaw Gateway (v0.7.0)
|
|
5
|
+
```bash
|
|
6
|
+
npm install squish-memory
|
|
7
|
+
```
|
|
58
8
|
|
|
59
|
-
|
|
9
|
+
## Why Agents Need Memory
|
|
60
10
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
11
|
+
| Without Squish | With Squish |
|
|
12
|
+
|----------------|-------------|
|
|
13
|
+
| Forgets after every session | Remembers across sessions |
|
|
14
|
+
| Repeats the same mistakes | Learns from past decisions |
|
|
15
|
+
| No context awareness | Builds project understanding |
|
|
16
|
+
| Can't track preferences | Adapts to user style |
|
|
65
17
|
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
export OPENCLAW_GATEWAY_ENABLED=true
|
|
69
|
-
```
|
|
18
|
+
## How It Works
|
|
70
19
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"type": "search",
|
|
75
|
-
"id": "unique-request-id",
|
|
76
|
-
"payload": {
|
|
77
|
-
"query": "authentication flow",
|
|
78
|
-
"limit": 10
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
20
|
+
Squish uses a two-tier memory architecture for optimal performance:
|
|
21
|
+
- **Fast Search Tier**: QMD (Quick Markdown Search) provides lightning-fast hybrid BM25 + vector search
|
|
22
|
+
- **Persistent Storage Tier**: SQLite (local) or PostgreSQL (team) ensures durable, reliable memory storage
|
|
82
23
|
|
|
83
|
-
**Response Format:**
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"type": "search",
|
|
87
|
-
"id": "unique-request-id",
|
|
88
|
-
"success": true,
|
|
89
|
-
"data": {
|
|
90
|
-
"results": [...],
|
|
91
|
-
"count": 10
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
24
|
```
|
|
25
|
+
Agent Action -----> [Squish Memory Layer]
|
|
26
|
+
|
|
|
27
|
+
v
|
|
28
|
+
┌──────────────┐
|
|
29
|
+
│ Trigger │ <-- "remember this", "important"
|
|
30
|
+
│ Detection │
|
|
31
|
+
└──────────────┘
|
|
32
|
+
|
|
|
33
|
+
v
|
|
34
|
+
┌──────────────┐
|
|
35
|
+
│ Write Gate │ <-- Validate, sanitize, score
|
|
36
|
+
└──────────────┘
|
|
37
|
+
|
|
|
38
|
+
v
|
|
39
|
+
┌─────────────────────┐
|
|
40
|
+
│ Dual Storage Write │
|
|
41
|
+
│ ──→ QMD Index │ (fast search)
|
|
42
|
+
│ ──→ SQLite/Postgres│ (durable storage)
|
|
43
|
+
└─────────────────────┘
|
|
44
|
+
|
|
|
45
|
+
v
|
|
46
|
+
┌─────────────────────┐
|
|
47
|
+
│ Hybrid Retrieval │
|
|
48
|
+
│ QMD Search + │
|
|
49
|
+
│ Vector Ranking │
|
|
50
|
+
└─────────────────────┘
|
|
51
|
+
|
|
|
52
|
+
v
|
|
53
|
+
Agent Context
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Key Features
|
|
57
|
+
|
|
58
|
+
### Memory Intelligence
|
|
59
|
+
- **Trigger Detection**: Auto-detects "remember", "important", corrections
|
|
60
|
+
- **Contradiction Resolution**: Auto-updates when facts change
|
|
61
|
+
- **Temporal Facts**: Handles time-bound information ("until January")
|
|
62
|
+
- **Confidence Scoring**: Knows how reliable each memory is
|
|
63
|
+
|
|
64
|
+
### Retrieval Quality
|
|
65
|
+
- **Hybrid Search**: Vector + keyword (BM25) with fusion
|
|
66
|
+
- **Multi-factor Ranking**: Semantic, recency, importance, confidence
|
|
67
|
+
- **Telemetry**: Tracks which memories are actually useful
|
|
68
|
+
|
|
69
|
+
### Agent Safety
|
|
70
|
+
- **Write Gate**: Validates content before storage
|
|
71
|
+
- **Secret Detection**: Auto-redacts API keys, passwords
|
|
72
|
+
- **Graceful Degradation**: Works even when database fails
|
|
95
73
|
|
|
96
|
-
##
|
|
97
|
-
|
|
98
|
-
### Install via Claude Code Marketplace (Recommended)
|
|
74
|
+
## Quick Start
|
|
99
75
|
|
|
76
|
+
### For Claude Code (Plugin)
|
|
100
77
|
```bash
|
|
101
|
-
#
|
|
78
|
+
# Install from marketplace
|
|
102
79
|
/plugin marketplace add https://github.com/michielhdoteth/squish.git
|
|
103
|
-
|
|
104
|
-
# Step 2: Install Squish
|
|
105
80
|
/plugin install squish@michielhdoteth-squish
|
|
106
81
|
```
|
|
107
82
|
|
|
108
|
-
### For
|
|
109
|
-
|
|
110
|
-
Load the plugin directly without installation:
|
|
111
|
-
|
|
83
|
+
### For OpenClaw (npm)
|
|
112
84
|
```bash
|
|
113
|
-
|
|
85
|
+
npm install -g squish-memory
|
|
114
86
|
```
|
|
115
87
|
|
|
116
|
-
|
|
88
|
+
Add to your OpenClaw MCP config - done.
|
|
117
89
|
|
|
90
|
+
### Universal CLI
|
|
118
91
|
```bash
|
|
119
|
-
|
|
92
|
+
# Works with any agent framework
|
|
93
|
+
squish remember "User prefers TypeScript"
|
|
94
|
+
squish search "preferences"
|
|
95
|
+
squish health
|
|
120
96
|
```
|
|
121
97
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
### For Production Installation
|
|
125
|
-
|
|
126
|
-
1. Build the plugin:
|
|
98
|
+
### Universal API
|
|
127
99
|
```bash
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```
|
|
100
|
+
# Start the universal HTTP server
|
|
101
|
+
bun run universal:server
|
|
131
102
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
103
|
+
# Add memory via HTTP (stored in both QMD index and SQLite)
|
|
104
|
+
curl -X POST http://localhost:3000/api/memories \
|
|
105
|
+
-H "Content-Type: application/json" \
|
|
106
|
+
-d '{"content": "User prefers TypeScript", "type": "preference", "container": "my-project"}'
|
|
136
107
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
npm install -g squish-memory-0.7.0.tgz
|
|
108
|
+
# Search memories via HTTP (uses QMD for fast hybrid search)
|
|
109
|
+
curl "http://localhost:3000/api/memories/search?q=TypeScript"
|
|
140
110
|
```
|
|
141
111
|
|
|
142
|
-
|
|
112
|
+
**That's it.** One install, persistent memory for any AI agent.
|
|
143
113
|
|
|
144
|
-
|
|
114
|
+
## MCP Tools for Agents
|
|
145
115
|
|
|
146
|
-
|
|
147
|
-
|
|
116
|
+
| Tool | What It Does |
|
|
117
|
+
|------|--------------|
|
|
118
|
+
| `remember` | Store a memory |
|
|
119
|
+
| `search` | Find relevant memories |
|
|
120
|
+
| `recall` | Get specific memory by ID |
|
|
121
|
+
| `core_memory` | Always-visible context (persona, user info) |
|
|
122
|
+
| `context` | Get project-relevant memories |
|
|
123
|
+
| `observe` | Record patterns from tool usage |
|
|
148
124
|
|
|
149
|
-
|
|
150
|
-
- `SQUISH_DATA_DIR`: Custom data directory (default: `./.squish` in project root)
|
|
151
|
-
- `SQUISH_EMBEDDINGS_PROVIDER`: Force embedding provider (`none`, `local`, `openai`, `ollama`)
|
|
125
|
+
## Execution Model
|
|
152
126
|
|
|
153
|
-
**
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
- `SQUISH_OLLAMA_URL`: Ollama server URL for local LLM embeddings
|
|
127
|
+
- **Universal First**: Works with any AI agent via MCP, CLI, or HTTP API
|
|
128
|
+
- **Transport Agnostic**: MCP (stdio/SSE), CLI, or HTTP/WebSocket - choose your preference
|
|
129
|
+
- **Storage Flexible**: SQLite for local, PostgreSQL for team deployments
|
|
157
130
|
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
# Enable OpenClaw WebSocket gateway
|
|
161
|
-
OPENCLAW_GATEWAY_ENABLED=true
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**Advanced Options:**
|
|
165
|
-
```bash
|
|
166
|
-
# Lifecycle management
|
|
167
|
-
SQUISH_LIFECYCLE_ENABLED=true
|
|
168
|
-
SQUISH_LIFECYCLE_INTERVAL=3600000 # ms
|
|
169
|
-
|
|
170
|
-
# Session summarization
|
|
171
|
-
SQUISH_SUMMARIZATION_ENABLED=true
|
|
172
|
-
SQUISH_INCREMENTAL_THRESHOLD=10
|
|
173
|
-
SQUISH_ROLLING_WINDOW_SIZE=50
|
|
174
|
-
|
|
175
|
-
# Agent isolation
|
|
176
|
-
SQUISH_AGENT_ISOLATION_ENABLED=true
|
|
177
|
-
SQUISH_DEFAULT_VISIBILITY=private # private|project|team|global
|
|
178
|
-
```
|
|
131
|
+
## Universal API
|
|
179
132
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
### CLI Usage (OpenClaw/Bash)
|
|
183
|
-
|
|
184
|
-
Install and use directly from terminal:
|
|
133
|
+
Squish now provides a universal HTTP API that works with any AI agent:
|
|
185
134
|
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
squish search "TypeScript" --type fact
|
|
196
|
-
|
|
197
|
-
# View core memory
|
|
198
|
-
squish core_memory view
|
|
135
|
+
```typescript
|
|
136
|
+
// Add memory via HTTP
|
|
137
|
+
POST /api/memories
|
|
138
|
+
{
|
|
139
|
+
"content": "User prefers TypeScript",
|
|
140
|
+
"type": "preference",
|
|
141
|
+
"container": "my-project",
|
|
142
|
+
"tags": ["preferences", "coding-style"]
|
|
143
|
+
}
|
|
199
144
|
|
|
200
|
-
|
|
201
|
-
|
|
145
|
+
// Search memories via HTTP
|
|
146
|
+
GET /api/memories/search?query=TypeScript&limit=10
|
|
202
147
|
```
|
|
203
148
|
|
|
204
|
-
**
|
|
149
|
+
**Universal Benefits:**
|
|
150
|
+
- Works with any AI agent (Claude, OpenAI, Anthropic, custom)
|
|
151
|
+
- HTTP RESTful API + WebSocket for real-time sync
|
|
152
|
+
- PostgreSQL + pgvector for scalable memory
|
|
153
|
+
- Docker-ready for easy deployment
|
|
205
154
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
By default, Squish uses local TF-IDF embeddings (zero dependencies, works offline).
|
|
209
|
-
|
|
210
|
-
For better semantic search, configure an embedding provider:
|
|
155
|
+
### Docker Deployment
|
|
211
156
|
|
|
212
157
|
```bash
|
|
213
|
-
#
|
|
214
|
-
|
|
215
|
-
export SQUISH_EMBEDDINGS_PROVIDER=openai
|
|
158
|
+
# Quick start with Docker Compose
|
|
159
|
+
docker-compose -f docker-compose.universal.yml up
|
|
216
160
|
|
|
217
|
-
#
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
# Or set in your shell profile (~/.bashrc or ~/.zshrc)
|
|
222
|
-
echo "export SQUISH_OPENAI_API_KEY=sk-..." >> ~/.bashrc
|
|
223
|
-
echo "export SQUISH_EMBEDDINGS_PROVIDER=openai" >> ~/.bashrc
|
|
161
|
+
# Or deploy to cloud
|
|
162
|
+
docker build -t squish-universal .
|
|
163
|
+
docker run -p 3000:3000 squish-universal
|
|
224
164
|
```
|
|
225
165
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
### 1. Initialize Core Memory
|
|
166
|
+
## Open-Core Model
|
|
229
167
|
|
|
230
|
-
|
|
168
|
+
- **OSS Core (MIT)**: local mode, self-hosted workflows, MCP/CLI tooling
|
|
169
|
+
- **Commercial Remote**: managed remote control plane, enterprise ops, support
|
|
170
|
+
- **Universal API**: HTTP REST + WebSocket for any AI agent
|
|
171
|
+
- **Sponsor development**: https://github.com/sponsors/michielhdoteth
|
|
231
172
|
|
|
232
|
-
|
|
233
|
-
/core_memory action=edit projectId=my-project section=persona content="I am a helpful assistant specialized in cloud infrastructure and DevOps."
|
|
234
|
-
```
|
|
173
|
+
## Configuration
|
|
235
174
|
|
|
236
|
-
###
|
|
175
|
+
### Environment Variables
|
|
237
176
|
|
|
238
|
-
|
|
177
|
+
**Required (local mode - default):**
|
|
178
|
+
- None! Works out-of-the-box with local TF-IDF embeddings
|
|
239
179
|
|
|
180
|
+
**Universal API:**
|
|
240
181
|
```bash
|
|
241
|
-
|
|
182
|
+
# For universal HTTP API mode
|
|
183
|
+
DATABASE_URL=postgresql://user:pass@host/db # Required for universal mode
|
|
184
|
+
REDIS_URL=redis://localhost:6379 # Optional for caching
|
|
185
|
+
PORT=3000 # API server port
|
|
242
186
|
```
|
|
243
187
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
Find relevant past learnings:
|
|
247
|
-
|
|
188
|
+
**Optional:**
|
|
248
189
|
```bash
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
### 4. Load Context for an Agent
|
|
190
|
+
SQUISH_DATA_DIR=./.squish # Custom data directory
|
|
191
|
+
SQUISH_EMBEDDINGS_PROVIDER=local # local, openai, or ollama
|
|
253
192
|
|
|
254
|
-
|
|
193
|
+
# For better embeddings (optional)
|
|
194
|
+
SQUISH_OPENAI_API_KEY=sk-...
|
|
195
|
+
SQUISH_OLLAMA_URL=http://localhost:11434
|
|
255
196
|
|
|
256
|
-
|
|
257
|
-
/
|
|
197
|
+
# For team mode
|
|
198
|
+
DATABASE_URL=postgresql://user:pass@host/db
|
|
258
199
|
```
|
|
259
200
|
|
|
260
201
|
## Architecture
|
|
261
202
|
|
|
262
|
-
###
|
|
263
|
-
|
|
264
|
-
**
|
|
265
|
-
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
|
|
271
|
-
**
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
|
|
283
|
-
###
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
- **
|
|
287
|
-
- **
|
|
288
|
-
- **Status**: active, merged, superseded, expired
|
|
289
|
-
- **Visibility**: private (user), project, team, global
|
|
290
|
-
|
|
291
|
-
### Hooks
|
|
292
|
-
|
|
293
|
-
4 lifecycle hooks automatically trigger:
|
|
294
|
-
|
|
295
|
-
| Hook | Trigger | Purpose |
|
|
296
|
-
|------|---------|---------|
|
|
297
|
-
| `SessionStart` | Session begins | Initialize session memory, load core memory |
|
|
298
|
-
| `UserPromptSubmit` | User sends message | Enhance prompt with relevant memories |
|
|
299
|
-
| `PostToolUse` | Tool completes | Record tool usage observations |
|
|
300
|
-
| `SessionEnd` | Session closes | Persist discoveries, summarize session |
|
|
301
|
-
|
|
302
|
-
## API Reference
|
|
303
|
-
|
|
304
|
-
### Core Memory Operations
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
# View all sections
|
|
308
|
-
/core_memory action=view projectId=PROJECT_ID
|
|
309
|
-
|
|
310
|
-
# Edit a section
|
|
311
|
-
/core_memory action=edit projectId=PROJECT_ID section=persona content="..."
|
|
312
|
-
|
|
313
|
-
# Append to a section
|
|
314
|
-
/core_memory action=append projectId=PROJECT_ID section=working_notes content="New observation"
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
### Memory Management
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
# Store a memory
|
|
321
|
-
/remember projectId=PROJECT_ID type=fact content="..." tags=["tag1","tag2"]
|
|
322
|
-
|
|
323
|
-
# Search memories
|
|
324
|
-
/search projectId=PROJECT_ID query="search term" type=fact limit=10
|
|
325
|
-
|
|
326
|
-
# Retrieve by ID
|
|
327
|
-
/recall memoryId=MEMORY_ID
|
|
328
|
-
|
|
329
|
-
# Get merged view
|
|
330
|
-
/context projectId=PROJECT_ID include=memories include=observations limit=20
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### Context Paging
|
|
334
|
-
|
|
335
|
-
```bash
|
|
336
|
-
# Load memory into session context
|
|
337
|
-
/context_paging action=load sessionId=SESSION_ID projectId=PROJECT_ID memoryId=MEMORY_ID
|
|
338
|
-
|
|
339
|
-
# Unload memory from session
|
|
340
|
-
/context_paging action=evict sessionId=SESSION_ID memoryId=MEMORY_ID
|
|
341
|
-
|
|
342
|
-
# View loaded memories
|
|
343
|
-
/context_paging action=view sessionId=SESSION_ID
|
|
344
|
-
|
|
345
|
-
# Check context usage
|
|
346
|
-
/context_status projectId=PROJECT_ID sessionId=SESSION_ID
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Memory Merging
|
|
350
|
-
|
|
351
|
-
```bash
|
|
352
|
-
# Detect duplicate memories
|
|
353
|
-
/merge projectId=PROJECT_ID action=detect
|
|
354
|
-
|
|
355
|
-
# List merge proposals
|
|
356
|
-
/merge projectId=PROJECT_ID action=list status=pending
|
|
357
|
-
|
|
358
|
-
# Preview a merge
|
|
359
|
-
/merge projectId=PROJECT_ID action=preview proposalId=PROPOSAL_ID
|
|
360
|
-
|
|
361
|
-
# Approve merge
|
|
362
|
-
/merge projectId=PROJECT_ID action=approve proposalId=PROPOSAL_ID reviewNotes="Approved because..."
|
|
363
|
-
|
|
364
|
-
# Reject merge
|
|
365
|
-
/merge projectId=PROJECT_ID action=reject proposalId=PROPOSAL_ID reviewNotes="Keep separate because..."
|
|
366
|
-
|
|
367
|
-
# Get merge statistics
|
|
368
|
-
/merge projectId=PROJECT_ID action=stats
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
## Database Modes
|
|
372
|
-
|
|
373
|
-
### SQLite Mode (Default - Local Development)
|
|
374
|
-
|
|
375
|
-
- **Storage**: `~/.squish/squish.db` (local SQLite database)
|
|
376
|
-
- **Embeddings**: Local TF-IDF (no API calls, works offline)
|
|
377
|
-
- **Performance**: Fast, suitable for single-user development
|
|
378
|
-
- **Setup**: Zero configuration required
|
|
379
|
-
- **Data**: Stored locally on machine
|
|
380
|
-
|
|
381
|
-
### PostgreSQL Mode (Team - Enterprise)
|
|
382
|
-
|
|
383
|
-
- **Storage**: Shared PostgreSQL database
|
|
384
|
-
- **Embeddings**: Optional OpenAI or Ollama for better semantic search
|
|
385
|
-
- **Performance**: Optimized for multi-user teams
|
|
386
|
-
- **Setup**: Requires DATABASE_URL configuration
|
|
387
|
-
- **Data**: Shared across team members with access control
|
|
388
|
-
|
|
389
|
-
```bash
|
|
390
|
-
# Enable PostgreSQL mode
|
|
391
|
-
DATABASE_URL=postgresql://user:password@host/dbname
|
|
392
|
-
SQUISH_OPENAI_API_KEY=sk-... # optional
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
## Benchmarks
|
|
396
|
-
|
|
397
|
-
Squish has been tested against industry-standard datasets for memory systems.
|
|
398
|
-
|
|
399
|
-
### LongMemEval Dataset
|
|
400
|
-
|
|
401
|
-
| Metric | Value |
|
|
402
|
-
|--------|-------|
|
|
403
|
-
| **Accuracy** | 80% (16/20 correct) |
|
|
404
|
-
| **Embeddings** | Nomic (nomic-embed-text) |
|
|
405
|
-
| **Generation** | Claude Haiku |
|
|
406
|
-
| **Judge** | Claude Haiku |
|
|
407
|
-
| **Avg Latency** | ~1.2s per question |
|
|
408
|
-
|
|
409
|
-
### Key Strengths
|
|
410
|
-
|
|
411
|
-
- **Strong accuracy**: 80% on LongMemEval benchmark
|
|
412
|
-
- **Flexible deployment**: Local embeddings with quality generation
|
|
413
|
-
- **Privacy-first**: Local embeddings option available
|
|
414
|
-
- **Consistent retrieval**: Successfully finds entities like names, locations, and relationships
|
|
415
|
-
|
|
416
|
-
### Test Coverage
|
|
417
|
-
|
|
418
|
-
The benchmark tests memory retrieval across:
|
|
419
|
-
- Long-term conversational memory
|
|
420
|
-
- Entity resolution (people, places, organizations)
|
|
421
|
-
- Temporal reasoning (events, dates, timelines)
|
|
422
|
-
- Relationship tracking (family, professional, social)
|
|
423
|
-
|
|
424
|
-
### Running Benchmarks
|
|
425
|
-
|
|
426
|
-
```bash
|
|
427
|
-
cd ../squish-benchmarks
|
|
428
|
-
|
|
429
|
-
# Pull Nomic embeddings
|
|
430
|
-
ollama pull nomic-embed-text
|
|
431
|
-
|
|
432
|
-
# Run LongMemEval benchmark
|
|
433
|
-
bun run src/index.ts run -e nomic-embed-text -b longmemeval
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
For detailed benchmark results and methodology, see [squish-benchmarks](../squish-benchmarks/).
|
|
203
|
+
### Two-Tier Memory System
|
|
204
|
+
Squish employs a two-tier architecture for optimal performance and reliability:
|
|
205
|
+
- **Fast Search Tier**: QMD (Quick Markdown Search) provides hybrid BM25 + vector search with sub-second response times
|
|
206
|
+
- **Persistent Storage Tier**: SQLite (local mode) or PostgreSQL (team mode) ensures durable, ACID-compliant memory storage
|
|
207
|
+
|
|
208
|
+
### Universal Interfaces
|
|
209
|
+
- **MCP Server**: Native integration for Claude Code, OpenClaw, and any MCP-compatible agent
|
|
210
|
+
- **HTTP REST API**: Universal JSON API works with any AI agent capable of HTTP requests
|
|
211
|
+
- **WebSocket**: Real-time memory sync and notifications for collaborative agents
|
|
212
|
+
- **CLI**: Standalone command-line tool for shell-based agents and debugging
|
|
213
|
+
|
|
214
|
+
### Memory Organization
|
|
215
|
+
- **Core Memory (2KB)**: Always-visible sections for persona, user info, project context, and working notes
|
|
216
|
+
- **Context Paging**: Agent-controlled retrieval with token budgeting (8KB default)
|
|
217
|
+
- **Background Jobs**: Automatic memory maintenance including decay, deduplication, and consolidation
|
|
218
|
+
|
|
219
|
+
### Memory Lifecycle
|
|
220
|
+
- **Sectors**: episodic, semantic, procedural, autobiographical, working memory
|
|
221
|
+
- **Tiers**: hot (recently accessed), warm (accessible), cold (archived but searchable)
|
|
222
|
+
- **Status**: active, merged, superseded, expired (with automatic handling)
|
|
223
|
+
|
|
224
|
+
### Deployment Flexibility
|
|
225
|
+
- **Local SQLite**: Zero-configuration, perfect for individual agents and edge deployment
|
|
226
|
+
- **PostgreSQL**: Horizontal scaling for teams and enterprise deployments
|
|
227
|
+
- **Docker**: Single-command deployment with docker-compose.universal.yml
|
|
228
|
+
- **Cloud**: Ready for AWS/GCP/Azure with standard PostgreSQL compatibility
|
|
437
229
|
|
|
438
230
|
## Development
|
|
439
231
|
|
|
440
|
-
### Project Structure
|
|
441
|
-
|
|
442
|
-
```
|
|
443
|
-
squish/
|
|
444
|
-
├── .claude-plugin/
|
|
445
|
-
│ ├── plugin.json # Plugin manifest
|
|
446
|
-
│ └── marketplace.json # Marketplace metadata
|
|
447
|
-
├── .mcp.json # MCP server configuration
|
|
448
|
-
├── api/
|
|
449
|
-
│ └── openclaw/
|
|
450
|
-
│ └── gateway.ts # OpenClaw WebSocket gateway (v0.7.0)
|
|
451
|
-
├── core/
|
|
452
|
-
│ ├── core-memory.ts # Core memory operations
|
|
453
|
-
│ ├── context-paging.ts # Memory loading system
|
|
454
|
-
│ ├── local-embeddings.ts # TF-IDF embeddings
|
|
455
|
-
│ ├── embeddings.ts # Embedding providers
|
|
456
|
-
│ └── logger.ts
|
|
457
|
-
├── db/
|
|
458
|
-
│ ├── index.ts # Database adapter
|
|
459
|
-
│ ├── bootstrap.ts # Schema initialization
|
|
460
|
-
│ └── adapter.ts # SQLite/PostgreSQL abstraction
|
|
461
|
-
├── drizzle/
|
|
462
|
-
│ ├── schema.ts # PostgreSQL schema
|
|
463
|
-
│ └── schema-sqlite.ts # SQLite schema
|
|
464
|
-
├── skills/
|
|
465
|
-
│ └── squish-memory/
|
|
466
|
-
│ └── SKILL.md # OpenClaw skill definition (v0.7.0)
|
|
467
|
-
├── commands/ # Slash commands
|
|
468
|
-
├── hooks/ # Lifecycle hooks
|
|
469
|
-
├── index.ts # MCP server entry point
|
|
470
|
-
├── config.ts # Configuration management
|
|
471
|
-
├── package.json
|
|
472
|
-
├── tsconfig.json
|
|
473
|
-
└── README.md
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
### Building
|
|
477
|
-
|
|
478
232
|
```bash
|
|
479
233
|
# Install dependencies
|
|
480
|
-
|
|
234
|
+
bun install
|
|
481
235
|
|
|
482
|
-
# Build
|
|
483
|
-
|
|
236
|
+
# Build
|
|
237
|
+
bun run build
|
|
484
238
|
|
|
485
|
-
#
|
|
486
|
-
|
|
239
|
+
# Test
|
|
240
|
+
bun test
|
|
487
241
|
|
|
488
|
-
#
|
|
489
|
-
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
### Testing
|
|
493
|
-
|
|
494
|
-
```bash
|
|
495
|
-
# Run comprehensive system test
|
|
496
|
-
node test-v0.5.0.mjs
|
|
497
|
-
|
|
498
|
-
# Start development with watch mode
|
|
499
|
-
npm run dev
|
|
242
|
+
# Verify MCP
|
|
243
|
+
bun run verify:mcp
|
|
500
244
|
```
|
|
501
245
|
|
|
502
246
|
## Troubleshooting
|
|
503
247
|
|
|
504
248
|
### Database Issues
|
|
249
|
+
- **SQLite corrupted**: Delete `.squish/squish.db` and restart
|
|
250
|
+
- **PostgreSQL connection**: Verify DATABASE_URL format
|
|
505
251
|
|
|
506
|
-
|
|
507
|
-
-
|
|
508
|
-
|
|
509
|
-
**Error: "Connection refused"** (PostgreSQL mode)
|
|
510
|
-
- Verify DATABASE_URL is correct: `postgresql://user:pass@host:5432/dbname`
|
|
511
|
-
- Ensure PostgreSQL server is running
|
|
512
|
-
|
|
513
|
-
### MCP Server Issues
|
|
252
|
+
### MCP Issues
|
|
253
|
+
- **Hooks not working**: Run `bun run build` first
|
|
254
|
+
- **API prompts**: Set `SQUISH_EMBEDDINGS_PROVIDER=local`
|
|
514
255
|
|
|
515
|
-
|
|
516
|
-
- Use relative paths in hooks.json instead of absolute Windows paths
|
|
517
|
-
- Use `./hooks/file.js` instead of `C:\path\to\hooks.js`
|
|
518
|
-
|
|
519
|
-
**Error: "Plugin not found in marketplace"**
|
|
520
|
-
- Using `--plugin-dir` flag? This is expected - not installed from marketplace
|
|
521
|
-
- For local development, this is normal behavior
|
|
522
|
-
|
|
523
|
-
### Performance Issues
|
|
524
|
-
|
|
525
|
-
**Memory is growing unbounded**
|
|
526
|
-
- Enable lifecycle management: `SQUISH_LIFECYCLE_ENABLED=true`
|
|
527
|
-
- Review memory decay rates in configuration
|
|
528
|
-
|
|
529
|
-
### OpenClaw Gateway Issues (v0.7.0)
|
|
530
|
-
|
|
531
|
-
**Gateway not starting on port 18789**
|
|
532
|
-
- Check if port is already in use: `lsof -i :18789` (macOS/Linux) or `netstat -ano | findstr :18789` (Windows)
|
|
533
|
-
- Verify gateway is enabled: `echo $OPENCLAW_GATEWAY_ENABLED`
|
|
534
|
-
- Check logs for connection errors
|
|
535
|
-
|
|
536
|
-
**OpenClaw client cannot connect**
|
|
537
|
-
- Ensure gateway is running: Check Squish logs for "OpenClaw gateway listening on port 18789"
|
|
538
|
-
- Verify firewall allows connections on port 18789
|
|
539
|
-
- Check WebSocket client is using correct protocol (ws:// or wss://)
|
|
540
|
-
|
|
541
|
-
## Contributing
|
|
256
|
+
## License
|
|
542
257
|
|
|
543
|
-
|
|
544
|
-
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
545
|
-
3. Commit changes: `git commit -am 'Add feature'`
|
|
546
|
-
4. Push to branch: `git push origin feature/my-feature`
|
|
547
|
-
5. Submit a pull request
|
|
258
|
+
MIT for OSS core. See `LICENSE` for details.
|
|
548
259
|
|
|
549
|
-
##
|
|
260
|
+
## Links
|
|
550
261
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
- GitHub Issues: https://github.com/michielhdoteth/squish/issues
|
|
556
|
-
- Documentation: https://github.com/michielhdoteth/squish#readme
|
|
557
|
-
- OpenClaw: https://github.com/openclaw/openclaw - Personal AI assistant platform
|
|
558
|
-
|
|
559
|
-
## Changelog
|
|
560
|
-
|
|
561
|
-
### v0.7.0 (Latest)
|
|
562
|
-
- **OpenClaw Gateway**: WebSocket API for OpenClaw AI assistant integration
|
|
563
|
-
- **Enhanced Search**: Improved semantic search with better ranking
|
|
564
|
-
- **Memory Tools**: Expanded toolkit for memory management
|
|
565
|
-
- **OpenClaw Skill**: Ready-to-use skill for OpenClaw installation
|
|
566
|
-
|
|
567
|
-
### v0.6.0
|
|
568
|
-
- Implemented hybrid memory retrieval with multi-factor scoring (semantic, recency, coactivation, importance)
|
|
569
|
-
- Added fact extraction for structured knowledge discovery
|
|
570
|
-
- Added entity resolver for tracking and deduplicating entities across sessions
|
|
571
|
-
- Refactored capture.ts for better type safety
|
|
572
|
-
- Updated plugin-wrapper to use smart search config (50 candidates → top 3)
|
|
573
|
-
- Added utility functions for hook error handling
|
|
574
|
-
- Reorganized test scripts into scripts/db/ and scripts/test/
|
|
575
|
-
- Updated .gitignore to exclude references/ and opencode/
|
|
576
|
-
- Cleaned up project for distribution
|
|
577
|
-
|
|
578
|
-
### v0.5.0
|
|
579
|
-
- Implemented smart embeddings strategy (local TF-IDF for SQLite, OpenAI/Ollama for PostgreSQL)
|
|
580
|
-
- Added missing core_memory and context_sessions tables to bootstrap
|
|
581
|
-
- Fixed plugin manifest validation for Claude Code compatibility
|
|
582
|
-
- Fixed hooks path resolution for Windows compatibility
|
|
583
|
-
- Consolidated 18 MCP tools to 11 with action-based API
|
|
584
|
-
- Core memory fully functional with 4-section architecture
|
|
585
|
-
|
|
586
|
-
### v0.4.1
|
|
587
|
-
- Consolidated 25 command files to 15
|
|
588
|
-
- Removed 4 phantom commands
|
|
589
|
-
- Fixed validation order in MCP request handlers
|
|
590
|
-
|
|
591
|
-
### v0.3.0
|
|
592
|
-
- Lifecycle management with memory decay
|
|
593
|
-
- Session summarization (incremental and rolling)
|
|
594
|
-
- Agent-aware memory isolation
|
|
595
|
-
- Memory governance and protection
|
|
596
|
-
- Memory associations and graph traversal
|
|
597
|
-
|
|
598
|
-
### v0.2.0
|
|
599
|
-
- Vector embeddings for semantic search
|
|
600
|
-
- Memory snapshots for auditability
|
|
601
|
-
- Folder-scoped observations
|
|
602
|
-
|
|
603
|
-
### v0.1.0
|
|
604
|
-
- Initial release with core memory and context paging
|
|
605
|
-
- Full-text search (FTS5)
|
|
606
|
-
- Two-tier architecture
|
|
262
|
+
- GitHub: https://github.com/michielhdoteth/squish
|
|
263
|
+
- Issues: https://github.com/michielhdoteth/squish/issues
|
|
264
|
+
- Sponsors: https://github.com/sponsors/michielhdoteth
|