squish-memory 1.0.0 → 1.0.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/.env.mcp.example +14 -11
- package/README.md +24 -7
- package/bin/squish-add.mjs +32 -0
- package/bin/squish-rm.mjs +21 -0
- package/config/settings.json +51 -0
- package/dist/api/web/web.d.ts.map +1 -1
- package/dist/api/web/web.js +452 -451
- package/dist/api/web/web.js.map +1 -1
- package/dist/commands/mcp-server.js +7 -3
- package/dist/commands/mcp-server.js.map +1 -1
- package/dist/config.d.ts +10 -10
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +78 -23
- package/dist/config.js.map +1 -1
- package/dist/core/embeddings.d.ts +1 -1
- package/dist/core/embeddings.d.ts.map +1 -1
- package/dist/core/embeddings.js +10 -67
- package/dist/core/embeddings.js.map +1 -1
- package/dist/core/local-embeddings.d.ts +3 -11
- package/dist/core/local-embeddings.d.ts.map +1 -1
- package/dist/core/local-embeddings.js +2 -76
- package/dist/core/local-embeddings.js.map +1 -1
- package/dist/core/memory/context-collector.d.ts.map +1 -1
- package/dist/core/memory/context-collector.js +3 -2
- package/dist/core/memory/context-collector.js.map +1 -1
- package/dist/core/memory/feedback-tracker.d.ts.map +1 -1
- package/dist/core/memory/feedback-tracker.js +10 -6
- package/dist/core/memory/feedback-tracker.js.map +1 -1
- package/dist/core/memory/hybrid-search.js +32 -32
- package/dist/core/memory/memories.js +46 -46
- package/dist/core/memory/query-rewriter.js +9 -9
- package/dist/core/memory/stats.js +5 -5
- package/dist/core/namespaces/index.d.ts.map +1 -1
- package/dist/core/namespaces/index.js +20 -11
- package/dist/core/namespaces/index.js.map +1 -1
- package/dist/core/scheduler/cron-scheduler.d.ts.map +1 -1
- package/dist/core/scheduler/cron-scheduler.js +12 -7
- package/dist/core/scheduler/cron-scheduler.js.map +1 -1
- package/dist/core/scheduler/job-runner.js +8 -5
- package/dist/core/scheduler/job-runner.js.map +1 -1
- package/dist/core/search/conversations.js +33 -33
- package/dist/core/session-hooks/self-iteration-job.d.ts.map +1 -1
- package/dist/core/session-hooks/self-iteration-job.js +43 -39
- package/dist/core/session-hooks/self-iteration-job.js.map +1 -1
- package/dist/core/session-hooks/session-hooks.d.ts.map +1 -1
- package/dist/core/session-hooks/session-hooks.js +6 -3
- package/dist/core/session-hooks/session-hooks.js.map +1 -1
- package/dist/core/tracing/collector.d.ts.map +1 -1
- package/dist/core/tracing/collector.js +25 -13
- package/dist/core/tracing/collector.js.map +1 -1
- package/dist/db/adapter.d.ts +6 -1
- package/dist/db/adapter.d.ts.map +1 -1
- package/dist/db/adapter.js +54 -126
- package/dist/db/adapter.js.map +1 -1
- package/dist/db/bootstrap.js +477 -477
- package/dist/db/index.d.ts +5 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +46 -45
package/.env.mcp.example
CHANGED
|
@@ -2,26 +2,29 @@
|
|
|
2
2
|
SQUISH_MCP_PORT=8767
|
|
3
3
|
SQUISH_MCP_SERVER_ENABLED=true
|
|
4
4
|
|
|
5
|
-
# Embeddings
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
# Embeddings Provider: local | openai | ollama | google | none | auto
|
|
6
|
+
# Default: local (TF-IDF, no API needed)
|
|
7
|
+
SQUISH_EMBEDDINGS_PROVIDER=local
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# Model Selection (optional - uses defaults if not set)
|
|
10
|
+
# SQUISH_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
|
|
11
|
+
# SQUISH_GOOGLE_EMBEDDING_MODEL=gemini-embedding-001
|
|
12
|
+
# SQUISH_OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
|
|
13
|
+
|
|
14
|
+
# Google Cloud (for google provider)
|
|
10
15
|
# Get API key from: https://console.cloud.google.com/apis/credentials
|
|
11
|
-
GOOGLE_CLOUD_PROJECT=your-project-id
|
|
12
|
-
GOOGLE_CLOUD_LOCATION=us-central1
|
|
16
|
+
# GOOGLE_CLOUD_PROJECT=your-project-id
|
|
17
|
+
# GOOGLE_CLOUD_LOCATION=us-central1
|
|
13
18
|
# GOOGLE_CLOUD_API_KEY=your-api-key
|
|
14
19
|
# Or use service account:
|
|
15
20
|
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
|
|
16
21
|
|
|
17
|
-
# OpenAI
|
|
22
|
+
# OpenAI (for openai provider or auto mode)
|
|
18
23
|
# SQUISH_OPENAI_API_KEY=sk-...
|
|
19
24
|
# SQUISH_OPENAI_API_URL=https://api.openai.com/v1/embeddings
|
|
20
|
-
# SQUISH_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
|
|
21
25
|
|
|
22
|
-
# Ollama
|
|
26
|
+
# Ollama (for ollama provider or auto mode)
|
|
23
27
|
# SQUISH_OLLAMA_URL=http://localhost:11434
|
|
24
|
-
# SQUISH_OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
|
|
25
28
|
|
|
26
29
|
# Embedding performance & reliability
|
|
27
30
|
SQUISH_EMBEDDINGS_TIMEOUT_MS=30000
|
|
@@ -30,7 +33,7 @@ SQUISH_EMBEDDINGS_RETRY_DELAY_MS=1000
|
|
|
30
33
|
# Per-provider overrides (optional)
|
|
31
34
|
# SQUISH_OPENAI_TIMEOUT_MS=30000
|
|
32
35
|
# SQUISH_OLLAMA_TIMEOUT_MS=30000
|
|
33
|
-
#
|
|
36
|
+
# SQUISH_GOOGLE_TIMEOUT_MS=30000
|
|
34
37
|
|
|
35
38
|
# QMD for local markdown search
|
|
36
39
|
SQUISH_QMD_ENABLED=true
|
package/README.md
CHANGED
|
@@ -241,18 +241,35 @@ REDIS_URL=redis://localhost:6379 # Optional for caching
|
|
|
241
241
|
PORT=3000 # API server port
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
**
|
|
244
|
+
**Configuration File (config/settings.json):**
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"embeddings": {
|
|
248
|
+
"provider": "local",
|
|
249
|
+
"models": {
|
|
250
|
+
"openai": { "model": "text-embedding-3-small" },
|
|
251
|
+
"google": { "model": "gemini-embedding-001" },
|
|
252
|
+
"ollama": { "model": "nomic-embed-text:v1.5" }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Environment Variables (override settings.json):**
|
|
245
259
|
```bash
|
|
246
260
|
SQUISH_DATA_DIR=./.squish # Custom data directory
|
|
247
|
-
SQUISH_EMBEDDINGS_PROVIDER=local # local, openai, ollama, google
|
|
261
|
+
SQUISH_EMBEDDINGS_PROVIDER=local # local, openai, ollama, google, none, auto
|
|
248
262
|
|
|
249
|
-
#
|
|
250
|
-
SQUISH_OPENAI_API_KEY=sk-...
|
|
263
|
+
# Model selection (optional, uses defaults if not set)
|
|
251
264
|
SQUISH_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
|
|
252
|
-
|
|
265
|
+
SQUISH_GOOGLE_EMBEDDING_MODEL=gemini-embedding-001
|
|
253
266
|
SQUISH_OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
|
|
254
|
-
|
|
255
|
-
|
|
267
|
+
|
|
268
|
+
# API credentials (for cloud providers)
|
|
269
|
+
SQUISH_OPENAI_API_KEY=sk-...
|
|
270
|
+
SQUISH_OLLAMA_URL=http://localhost:11434
|
|
271
|
+
GOOGLE_CLOUD_PROJECT=your-project
|
|
272
|
+
GOOGLE_CLOUD_API_KEY=your-key
|
|
256
273
|
|
|
257
274
|
# Embedding performance & reliability
|
|
258
275
|
SQUISH_EMBEDDINGS_TIMEOUT_MS=30000
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Wrapper for squish commands - launches interactive mode when no args
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
|
|
12
|
+
// If no args, launch interactive installer
|
|
13
|
+
if (args.length === 0) {
|
|
14
|
+
const interactivePath = join(__dirname, '..', 'scripts', 'install-interactive.mjs');
|
|
15
|
+
const child = spawn('node', [interactivePath], {
|
|
16
|
+
stdio: 'inherit',
|
|
17
|
+
shell: false
|
|
18
|
+
});
|
|
19
|
+
child.on('exit', (code) => {
|
|
20
|
+
process.exit(code ?? 0);
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
// Pass through to install-plugin.mjs
|
|
24
|
+
const scriptPath = join(__dirname, '..', 'scripts', 'install-plugin.mjs');
|
|
25
|
+
const child = spawn('node', [scriptPath, ...args], {
|
|
26
|
+
stdio: 'inherit',
|
|
27
|
+
shell: false
|
|
28
|
+
});
|
|
29
|
+
child.on('exit', (code) => {
|
|
30
|
+
process.exit(code ?? 0);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Wrapper for squish remove command
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
const scriptPath = join(__dirname, 'scripts', 'install-plugin.mjs');
|
|
12
|
+
|
|
13
|
+
// Add --uninstall flag
|
|
14
|
+
const child = spawn('node', [scriptPath, '--uninstall', ...args], {
|
|
15
|
+
stdio: 'inherit',
|
|
16
|
+
shell: false
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
child.on('exit', (code) => {
|
|
20
|
+
process.exit(code ?? 0);
|
|
21
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./settings.schema.json",
|
|
3
|
+
"embeddings": {
|
|
4
|
+
"provider": "local",
|
|
5
|
+
"models": {
|
|
6
|
+
"openai": {
|
|
7
|
+
"model": "text-embedding-3-small",
|
|
8
|
+
"availableModels": [
|
|
9
|
+
"text-embedding-3-small",
|
|
10
|
+
"text-embedding-3-large"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"google": {
|
|
14
|
+
"model": "gemini-embedding-001",
|
|
15
|
+
"availableModels": [
|
|
16
|
+
"gemini-embedding-001",
|
|
17
|
+
"gemini-embedding-2"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"ollama": {
|
|
21
|
+
"model": "nomic-embed-text:v1.5",
|
|
22
|
+
"availableModels": [
|
|
23
|
+
"nomic-embed-text:v1.5",
|
|
24
|
+
"mxbai-embed-large"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"api": {
|
|
30
|
+
"openai": {
|
|
31
|
+
"apiKey": null,
|
|
32
|
+
"apiUrl": "https://api.openai.com/v1/embeddings"
|
|
33
|
+
},
|
|
34
|
+
"google": {
|
|
35
|
+
"apiKey": null,
|
|
36
|
+
"projectId": null
|
|
37
|
+
},
|
|
38
|
+
"ollama": {
|
|
39
|
+
"url": "http://localhost:11434"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"mcp": {
|
|
43
|
+
"serverPort": 8767,
|
|
44
|
+
"serverEnabled": true
|
|
45
|
+
},
|
|
46
|
+
"features": {
|
|
47
|
+
"lifecycleEnabled": true,
|
|
48
|
+
"summarizationEnabled": true,
|
|
49
|
+
"agentIsolation": true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../api/web/web.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,GAAG,6CAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../api/web/web.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,GAAG,6CAAY,CAAC;AAymBtB,wBAAgB,cAAc,SAI7B;AAED,eAAe,GAAG,CAAC"}
|