squish-memory 0.9.1 → 0.9.3
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 → .env.mcp.example} +23 -0
- package/CHANGELOG.md +34 -0
- package/QUICK-START.md +10 -4
- package/README.md +15 -2
- package/dist/api/web/index.d.ts +3 -0
- package/dist/api/web/index.d.ts.map +1 -0
- package/dist/api/web/index.js +4 -0
- package/dist/api/web/index.js.map +1 -0
- package/dist/api/web/web-server.d.ts +3 -0
- package/dist/api/web/web-server.d.ts.map +1 -0
- package/dist/api/web/web-server.js +6 -0
- package/dist/api/web/web-server.js.map +1 -0
- package/dist/api/web/web.d.ts.map +1 -1
- package/dist/api/web/web.js +227 -78
- package/dist/api/web/web.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -1
- package/dist/core/core-memory.d.ts +5 -0
- package/dist/core/core-memory.d.ts.map +1 -1
- package/dist/core/core-memory.js +17 -5
- package/dist/core/core-memory.js.map +1 -1
- package/dist/core/embeddings.d.ts +9 -0
- package/dist/core/embeddings.d.ts.map +1 -1
- package/dist/core/embeddings.js +153 -16
- package/dist/core/embeddings.js.map +1 -1
- package/dist/core/memory/hybrid-search.js +12 -4
- package/dist/core/memory/hybrid-search.js.map +1 -1
- package/dist/core/memory/memories.d.ts.map +1 -1
- package/dist/core/memory/memories.js +14 -9
- package/dist/core/memory/memories.js.map +1 -1
- package/dist/core/observations.d.ts.map +1 -1
- package/dist/core/observations.js +1 -0
- package/dist/core/observations.js.map +1 -1
- package/dist/core/utils/memory-operations.d.ts.map +1 -1
- package/dist/core/utils/memory-operations.js +3 -1
- package/dist/core/utils/memory-operations.js.map +1 -1
- package/dist/db/adapter.js +13 -1
- package/dist/db/adapter.js.map +1 -1
- package/dist/db/bootstrap.d.ts.map +1 -1
- package/dist/db/bootstrap.js +33 -6
- package/dist/db/bootstrap.js.map +1 -1
- package/dist/drizzle/schema-sqlite.d.ts +17 -0
- package/dist/drizzle/schema-sqlite.d.ts.map +1 -1
- package/dist/drizzle/schema-sqlite.js +1 -0
- package/dist/drizzle/schema-sqlite.js.map +1 -1
- package/dist/drizzle/schema.d.ts +17 -0
- package/dist/drizzle/schema.d.ts.map +1 -1
- package/dist/drizzle/schema.js +1 -0
- package/dist/drizzle/schema.js.map +1 -1
- package/package.json +23 -21
- package/scripts/build-release.sh +20 -17
- package/scripts/check-secrets.js +132 -0
- package/scripts/github-release.sh +43 -27
|
@@ -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,40 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Squish will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.9.3] - 2026-03-14
|
|
6
|
+
|
|
7
|
+
### Added - Core Memory & Embeddings Improvements (v0.9.2+)
|
|
8
|
+
|
|
9
|
+
#### Expanded Core Memory
|
|
10
|
+
- Increased default core memory limit from 2KB to 16KB total (4KB per section)
|
|
11
|
+
- Configurable limits via `SQUISH_CORE_MEMORY_TOTAL_BYTES` and `SQUISH_CORE_MEMORY_SECTION_BYTES`
|
|
12
|
+
- Added token estimation for better LLM context budgeting
|
|
13
|
+
- Core memory stats now show both byte and token usage
|
|
14
|
+
|
|
15
|
+
#### Robust Embeddings System
|
|
16
|
+
- Fixed hybrid fallback order: Google Multimodal → OpenAI → Ollama → Local (removed QMD from embedding chain)
|
|
17
|
+
- Added retry logic with exponential backoff (3 retries default)
|
|
18
|
+
- Added configurable timeouts (default 30s) with per-provider overrides
|
|
19
|
+
- New `checkEmbeddingProviderHealth()` function for monitoring
|
|
20
|
+
- Improved error handling and graceful degradation
|
|
21
|
+
|
|
22
|
+
#### Enhanced Configuration
|
|
23
|
+
- New environment variables for fine-tuning:
|
|
24
|
+
- `SQUISH_EMBEDDINGS_TIMEOUT_MS`, `SQUISH_EMBEDDINGS_MAX_RETRIES`, `SQUISH_EMBEDDINGS_RETRY_DELAY_MS`
|
|
25
|
+
- `SQUISH_OPENAI_TIMEOUT_MS`, `SQUISH_OLLAMA_TIMEOUT_MS`, `SQUISH_GOOGLE_MULTIMODAL_TIMEOUT_MS`
|
|
26
|
+
- Better connection handling for all embedding providers
|
|
27
|
+
|
|
28
|
+
### Changed - Infrastructure
|
|
29
|
+
- Updated CI/CD workflows (`.github/workflows/ci.yml`, `release.yml`)
|
|
30
|
+
- Removed old `mcp-launch-checks.yml` workflow
|
|
31
|
+
- Updated release scripts (auto-detect version, better binary packaging)
|
|
32
|
+
- Database schema: added `tokens_estimate` column to `core_memory` table (auto-migrated)
|
|
33
|
+
|
|
34
|
+
### Security & developer experience
|
|
35
|
+
- Renamed `.env.mcp` to `.env.mcp.example` (template) - added to `.gitignore`
|
|
36
|
+
- Updated all documentation with new configuration options
|
|
37
|
+
- Improved TypeScript type safety across codebase
|
|
38
|
+
|
|
5
39
|
## [0.9.1] - 2026-03-14
|
|
6
40
|
|
|
7
41
|
### 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
|
-
|
|
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
|
-
- **
|
|
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
|
@@ -188,11 +188,24 @@ PORT=3000 # API server port
|
|
|
188
188
|
**Optional:**
|
|
189
189
|
```bash
|
|
190
190
|
SQUISH_DATA_DIR=./.squish # Custom data directory
|
|
191
|
-
SQUISH_EMBEDDINGS_PROVIDER=local # local, openai,
|
|
191
|
+
SQUISH_EMBEDDINGS_PROVIDER=local # local, openai, ollama, google-multimodal, hybrid
|
|
192
192
|
|
|
193
193
|
# For better embeddings (optional)
|
|
194
194
|
SQUISH_OPENAI_API_KEY=sk-...
|
|
195
|
+
SQUISH_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
|
|
195
196
|
SQUISH_OLLAMA_URL=http://localhost:11434
|
|
197
|
+
SQUISH_OLLAMA_EMBEDDING_MODEL=nomic-embed-text:v1.5
|
|
198
|
+
SQUISH_GOOGLE_CLOUD_PROJECT=your-project
|
|
199
|
+
SQUISH_GOOGLE_CLOUD_API_KEY=your-key
|
|
200
|
+
|
|
201
|
+
# Embedding performance & reliability
|
|
202
|
+
SQUISH_EMBEDDINGS_TIMEOUT_MS=30000
|
|
203
|
+
SQUISH_EMBEDDINGS_MAX_RETRIES=3
|
|
204
|
+
SQUISH_EMBEDDINGS_RETRY_DELAY_MS=1000
|
|
205
|
+
|
|
206
|
+
# Core memory size (default: 16KB total, 4KB per section)
|
|
207
|
+
SQUISH_CORE_MEMORY_TOTAL_BYTES=16384
|
|
208
|
+
SQUISH_CORE_MEMORY_SECTION_BYTES=4096
|
|
196
209
|
|
|
197
210
|
# For team mode
|
|
198
211
|
DATABASE_URL=postgresql://user:pass@host/db
|
|
@@ -212,7 +225,7 @@ Squish employs a two-tier architecture for optimal performance and reliability:
|
|
|
212
225
|
- **CLI**: Standalone command-line tool for shell-based agents and debugging
|
|
213
226
|
|
|
214
227
|
### Memory Organization
|
|
215
|
-
- **Core Memory (
|
|
228
|
+
- **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
229
|
- **Context Paging**: Agent-controlled retrieval with token budgeting (8KB default)
|
|
217
230
|
- **Background Jobs**: Automatic memory maintenance including decay, deduplication, and consolidation
|
|
218
231
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../api/web/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/web/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-server.d.ts","sourceRoot":"","sources":["../../../api/web/web-server.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-server.js","sourceRoot":"","sources":["../../../api/web/web-server.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;AACzC,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../api/web/web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../api/web/web.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,GAAG,6CAAY,CAAC;AA4nBtB,wBAAgB,cAAc,SAI7B;AAED,eAAe,GAAG,CAAC"}
|
package/dist/api/web/web.js
CHANGED
|
@@ -1,85 +1,172 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import cors from 'cors';
|
|
3
3
|
import { logger } from '../../core/logger.js';
|
|
4
|
+
import { getRecentMemories } from '../../core/memory/memories.js';
|
|
5
|
+
import { getObservationsForProject } from '../../core/observations.js';
|
|
6
|
+
import { getAllProjects, getProjectByPath } from '../../core/projects.js';
|
|
7
|
+
import { getDb } from '../../db/index.js';
|
|
8
|
+
import { isDatabaseUnavailableError } from '../../core/utils.js';
|
|
4
9
|
const app = express();
|
|
5
10
|
const PORT = process.env.SQUISH_WEB_PORT || 37777;
|
|
6
11
|
app.use(cors());
|
|
7
12
|
app.use(express.json());
|
|
8
13
|
// Health check endpoint
|
|
9
14
|
app.get('/api/health', async (req, res) => {
|
|
15
|
+
let dbStatus = 'ok';
|
|
16
|
+
let projectInfo = null;
|
|
17
|
+
let allProjects = [];
|
|
18
|
+
try {
|
|
19
|
+
const db = await getDb();
|
|
20
|
+
if (db && typeof db.prepare === 'function') {
|
|
21
|
+
db.prepare('SELECT 1').get();
|
|
22
|
+
}
|
|
23
|
+
// Get all projects from database
|
|
24
|
+
allProjects = await getAllProjects();
|
|
25
|
+
// If there are projects, use the first one as default (most recent)
|
|
26
|
+
if (allProjects.length > 0) {
|
|
27
|
+
projectInfo = { id: allProjects[0].id, name: allProjects[0].name, path: allProjects[0].path };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
dbStatus = 'error';
|
|
32
|
+
logger.error('Health check failed:', error.message);
|
|
33
|
+
}
|
|
10
34
|
res.json({
|
|
11
|
-
status: 'ok',
|
|
12
|
-
version: '0.1
|
|
13
|
-
database:
|
|
14
|
-
project: { id: '
|
|
35
|
+
status: dbStatus === 'ok' ? 'ok' : 'error',
|
|
36
|
+
version: '0.9.1',
|
|
37
|
+
database: dbStatus,
|
|
38
|
+
project: projectInfo || { id: 'unknown', name: 'No Project', path: '' },
|
|
39
|
+
projects: allProjects,
|
|
15
40
|
timestamp: new Date().toISOString()
|
|
16
41
|
});
|
|
17
42
|
});
|
|
18
43
|
// Get recent memories
|
|
19
44
|
app.get('/api/memories', async (req, res) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
projectId: 'demo',
|
|
27
|
-
createdAt: new Date().toISOString()
|
|
45
|
+
try {
|
|
46
|
+
const projectPath = req.query.projectPath || process.cwd();
|
|
47
|
+
const limit = Math.min(Math.max(parseInt(req.query.limit) || 20, 1), 100);
|
|
48
|
+
const project = await getProjectByPath(projectPath);
|
|
49
|
+
if (!project) {
|
|
50
|
+
return res.json({ status: 'ok', data: [], count: 0, message: 'Project not found' });
|
|
28
51
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
52
|
+
const memories = await getRecentMemories(projectPath, limit);
|
|
53
|
+
res.json({
|
|
54
|
+
status: 'ok',
|
|
55
|
+
data: memories,
|
|
56
|
+
count: memories.length,
|
|
57
|
+
project: { id: project.id, name: project.name, path: project.path }
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
if (isDatabaseUnavailableError(error)) {
|
|
62
|
+
return res.json({ status: 'ok', data: [], count: 0, message: 'Database unavailable' });
|
|
63
|
+
}
|
|
64
|
+
logger.error('Failed to get memories:', error.message);
|
|
65
|
+
res.status(500).json({ status: 'error', message: error.message });
|
|
66
|
+
}
|
|
35
67
|
});
|
|
36
68
|
// Get observations for project
|
|
37
69
|
app.get('/api/observations', async (req, res) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
target: 'project',
|
|
45
|
-
createdAt: new Date().toISOString()
|
|
70
|
+
try {
|
|
71
|
+
const projectPath = req.query.projectPath || process.cwd();
|
|
72
|
+
const limit = Math.min(Math.max(parseInt(req.query.limit) || 20, 1), 100);
|
|
73
|
+
const project = await getProjectByPath(projectPath);
|
|
74
|
+
if (!project) {
|
|
75
|
+
return res.json({ status: 'ok', data: [], count: 0, message: 'Project not found' });
|
|
46
76
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
77
|
+
const observations = await getObservationsForProject(projectPath, limit);
|
|
78
|
+
res.json({
|
|
79
|
+
status: 'ok',
|
|
80
|
+
data: observations,
|
|
81
|
+
count: observations.length,
|
|
82
|
+
project: { id: project.id, name: project.name, path: project.path }
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
if (isDatabaseUnavailableError(error)) {
|
|
87
|
+
return res.json({ status: 'ok', data: [], count: 0, message: 'Database unavailable' });
|
|
88
|
+
}
|
|
89
|
+
logger.error('Failed to get observations:', error.message);
|
|
90
|
+
res.status(500).json({ status: 'error', message: error.message });
|
|
91
|
+
}
|
|
53
92
|
});
|
|
54
93
|
// Get project context
|
|
55
94
|
app.get('/api/context', async (req, res) => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
createdAt: new Date().toISOString()
|
|
95
|
+
try {
|
|
96
|
+
// Get all projects and use first one as default if no projectPath specified
|
|
97
|
+
const allProjects = await getAllProjects();
|
|
98
|
+
let projectPath = req.query.projectPath;
|
|
99
|
+
// If no projectPath provided, use the first project from database
|
|
100
|
+
if (!projectPath && allProjects.length > 0) {
|
|
101
|
+
projectPath = allProjects[0].path;
|
|
64
102
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
103
|
+
if (!projectPath) {
|
|
104
|
+
return res.json({
|
|
105
|
+
status: 'ok',
|
|
106
|
+
project: { id: 'unknown', name: 'No Project', path: '' },
|
|
107
|
+
projects: allProjects,
|
|
108
|
+
memories: [],
|
|
109
|
+
observations: [],
|
|
110
|
+
totalCount: 0,
|
|
111
|
+
message: 'No projects found in database'
|
|
112
|
+
});
|
|
74
113
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
114
|
+
const project = await getProjectByPath(projectPath);
|
|
115
|
+
if (!project) {
|
|
116
|
+
return res.json({
|
|
117
|
+
status: 'ok',
|
|
118
|
+
project: { id: 'unknown', name: 'Project Not Found', path: projectPath },
|
|
119
|
+
projects: allProjects,
|
|
120
|
+
memories: [],
|
|
121
|
+
observations: [],
|
|
122
|
+
totalCount: 0,
|
|
123
|
+
message: 'Project not found in database'
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
const memories = await getRecentMemories(projectPath, 20);
|
|
127
|
+
const observations = await getObservationsForProject(projectPath, 20);
|
|
128
|
+
res.json({
|
|
129
|
+
status: 'ok',
|
|
130
|
+
project: { id: project.id, name: project.name, path: project.path },
|
|
131
|
+
projects: allProjects,
|
|
132
|
+
memories: memories,
|
|
133
|
+
observations: observations,
|
|
134
|
+
totalCount: memories.length + observations.length
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (isDatabaseUnavailableError(error)) {
|
|
139
|
+
return res.json({
|
|
140
|
+
status: 'ok',
|
|
141
|
+
project: { id: 'unknown', name: 'Error', path: '' },
|
|
142
|
+
projects: [],
|
|
143
|
+
memories: [],
|
|
144
|
+
observations: [],
|
|
145
|
+
totalCount: 0,
|
|
146
|
+
message: 'Database unavailable'
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
logger.error('Failed to get context:', error.message);
|
|
150
|
+
res.status(500).json({ status: 'error', message: error.message });
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
// Get all projects
|
|
154
|
+
app.get('/api/projects', async (req, res) => {
|
|
155
|
+
try {
|
|
156
|
+
const projects = await getAllProjects();
|
|
157
|
+
res.json({
|
|
158
|
+
status: 'ok',
|
|
159
|
+
data: projects,
|
|
160
|
+
count: projects.length
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
if (isDatabaseUnavailableError(error)) {
|
|
165
|
+
return res.json({ status: 'ok', data: [], count: 0, message: 'Database unavailable' });
|
|
166
|
+
}
|
|
167
|
+
logger.error('Failed to get projects:', error.message);
|
|
168
|
+
res.status(500).json({ status: 'error', message: error.message });
|
|
169
|
+
}
|
|
83
170
|
});
|
|
84
171
|
// Web UI
|
|
85
172
|
app.get('/', (req, res) => {
|
|
@@ -158,6 +245,9 @@ app.get('/', (req, res) => {
|
|
|
158
245
|
</h1>
|
|
159
246
|
</div>
|
|
160
247
|
<div class="flex items-center gap-4">
|
|
248
|
+
<select id="project-select" onchange="changeProject(this.value)" class="bg-card-bg px-4 py-2 rounded-full border-2 border-slate-700/50 text-text-main text-sm font-medium focus:outline-none focus:border-primary">
|
|
249
|
+
<option value="">Loading projects...</option>
|
|
250
|
+
</select>
|
|
161
251
|
<div class="bg-card-bg px-4 py-2 rounded-full border-2 border-slate-700/50 flex items-center gap-2">
|
|
162
252
|
<div class="size-2 rounded-full bg-primary animate-pulse"></div>
|
|
163
253
|
<span class="text-xs font-bold uppercase tracking-widest text-text-muted">Local Server: Online</span>
|
|
@@ -250,23 +340,75 @@ app.get('/', (req, res) => {
|
|
|
250
340
|
</div>
|
|
251
341
|
</footer>
|
|
252
342
|
<script>
|
|
343
|
+
let currentProjectPath = null;
|
|
344
|
+
|
|
345
|
+
async function loadProjects() {
|
|
346
|
+
try {
|
|
347
|
+
const response = await fetch('/api/projects');
|
|
348
|
+
const data = await response.json();
|
|
349
|
+
|
|
350
|
+
if (data.status === 'ok' && data.data && data.data.length > 0) {
|
|
351
|
+
const select = document.getElementById('project-select');
|
|
352
|
+
if (select) {
|
|
353
|
+
select.innerHTML = data.data.map(function(p) {
|
|
354
|
+
return '<option value="' + escapeHtml(p.path) + '">' + escapeHtml(p.name || p.path) + '</option>';
|
|
355
|
+
}).join('');
|
|
356
|
+
|
|
357
|
+
// Try to select current directory
|
|
358
|
+
const cwd = window.location.pathname === '/' ? '' : window.location.pathname;
|
|
359
|
+
const defaultProject = data.data.find(function(p) { return p.path === cwd; }) || data.data[0];
|
|
360
|
+
if (defaultProject) {
|
|
361
|
+
currentProjectPath = defaultProject.path;
|
|
362
|
+
select.value = defaultProject.path;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
} else {
|
|
366
|
+
// No projects yet, use current directory
|
|
367
|
+
currentProjectPath = window.location.pathname === '/' ? '' : window.location.pathname;
|
|
368
|
+
}
|
|
369
|
+
} catch (error) {
|
|
370
|
+
console.error('Failed to load projects:', error);
|
|
371
|
+
currentProjectPath = '';
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
253
375
|
async function loadData() {
|
|
254
376
|
try {
|
|
255
|
-
const
|
|
377
|
+
const url = currentProjectPath ? '/api/context?projectPath=' + encodeURIComponent(currentProjectPath) : '/api/context';
|
|
378
|
+
const response = await fetch(url);
|
|
256
379
|
const data = await response.json();
|
|
257
380
|
|
|
258
381
|
if (data.status === 'ok') {
|
|
259
|
-
document.getElementById('memories-count').textContent = data.memories.length;
|
|
260
|
-
document.getElementById('observations-count').textContent = data.observations.length;
|
|
261
|
-
document.getElementById('total-count').textContent = data.totalCount;
|
|
262
|
-
updateStatus('ok');
|
|
382
|
+
document.getElementById('memories-count').textContent = data.memories ? data.memories.length : 0;
|
|
383
|
+
document.getElementById('observations-count').textContent = data.observations ? data.observations.length : 0;
|
|
384
|
+
document.getElementById('total-count').textContent = data.totalCount || 0;
|
|
385
|
+
updateStatus(data.memories && data.observations ? 'ok' : 'error');
|
|
386
|
+
|
|
387
|
+
renderMemories(data.memories || []);
|
|
388
|
+
renderObservations(data.observations || []);
|
|
263
389
|
|
|
264
|
-
|
|
265
|
-
|
|
390
|
+
// Update project info
|
|
391
|
+
if (data.project) {
|
|
392
|
+
const projectInfo = document.getElementById('project-info');
|
|
393
|
+
if (projectInfo) {
|
|
394
|
+
projectInfo.textContent = data.project.name || data.project.path || 'Unknown';
|
|
395
|
+
}
|
|
396
|
+
}
|
|
266
397
|
|
|
267
|
-
// Hide error alert
|
|
398
|
+
// Hide error alert if data loaded
|
|
268
399
|
const errorAlert = document.querySelector('.blob-alert');
|
|
269
|
-
if (errorAlert
|
|
400
|
+
if (errorAlert && (data.memories && data.memories.length > 0 || data.observations && data.observations.length > 0)) {
|
|
401
|
+
errorAlert.style.display = 'none';
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Show error alert if message present
|
|
405
|
+
if (data.message) {
|
|
406
|
+
const errorAlert = document.querySelector('.blob-alert');
|
|
407
|
+
if (errorAlert) {
|
|
408
|
+
errorAlert.querySelector('p').textContent = data.message;
|
|
409
|
+
errorAlert.style.display = 'flex';
|
|
410
|
+
}
|
|
411
|
+
}
|
|
270
412
|
} else {
|
|
271
413
|
throw new Error('API returned error status');
|
|
272
414
|
}
|
|
@@ -281,7 +423,7 @@ app.get('/', (req, res) => {
|
|
|
281
423
|
|
|
282
424
|
function renderMemories(memories) {
|
|
283
425
|
const container = document.getElementById('memories');
|
|
284
|
-
if (memories.length === 0) {
|
|
426
|
+
if (!memories || memories.length === 0) {
|
|
285
427
|
container.innerHTML = '<div class="bg-card-bg/50 p-6 rounded-3xl border-2 border-slate-700/20 flex flex-col items-center justify-center py-16 opacity-60"><p class="font-black italic text-text-muted">No memories found</p></div>';
|
|
286
428
|
return;
|
|
287
429
|
}
|
|
@@ -289,13 +431,12 @@ app.get('/', (req, res) => {
|
|
|
289
431
|
container.innerHTML = memories.map(function(memory) {
|
|
290
432
|
return '<div class="bg-card-bg p-6 rounded-3xl border-2 border-slate-700/20 squishy-hover">' +
|
|
291
433
|
'<div class="flex items-start justify-between mb-4">' +
|
|
292
|
-
'<span class="bg-primary text-black px-3 py-1 rounded-full text-xs font-bold uppercase">' + memory.type + '</span>' +
|
|
434
|
+
'<span class="bg-primary text-black px-3 py-1 rounded-full text-xs font-bold uppercase">' + (memory.type || 'memory') + '</span>' +
|
|
293
435
|
'<span class="text-text-muted text-sm">' + formatTime(memory.createdAt) + '</span>' +
|
|
294
436
|
'</div>' +
|
|
295
|
-
'<div class="text-text-main mb-4">' + escapeHtml(memory.content) + '</div>' +
|
|
437
|
+
'<div class="text-text-main mb-4">' + escapeHtml(memory.content || memory.text || '') + '</div>' +
|
|
296
438
|
'<div class="text-text-muted text-sm">' +
|
|
297
|
-
'Tags: ' + (memory.tags ? memory.tags.join(', ') : 'none') +
|
|
298
|
-
'Project: ' + (memory.projectId || 'unknown') +
|
|
439
|
+
'Tags: ' + (memory.tags ? memory.tags.join(', ') : 'none') +
|
|
299
440
|
'</div>' +
|
|
300
441
|
'</div>';
|
|
301
442
|
}).join('');
|
|
@@ -303,7 +444,7 @@ app.get('/', (req, res) => {
|
|
|
303
444
|
|
|
304
445
|
function renderObservations(observations) {
|
|
305
446
|
const container = document.getElementById('observations');
|
|
306
|
-
if (observations.length === 0) {
|
|
447
|
+
if (!observations || observations.length === 0) {
|
|
307
448
|
container.innerHTML = '<div class="bg-card-bg/50 p-6 rounded-3xl border-2 border-slate-700/20 flex flex-col items-center justify-center py-16 opacity-60"><p class="font-black italic text-text-muted">No observations found</p></div>';
|
|
308
449
|
return;
|
|
309
450
|
}
|
|
@@ -311,19 +452,19 @@ app.get('/', (req, res) => {
|
|
|
311
452
|
container.innerHTML = observations.map(function(obs) {
|
|
312
453
|
return '<div class="bg-card-bg p-6 rounded-3xl border-2 border-slate-700/20 squishy-hover">' +
|
|
313
454
|
'<div class="flex items-start justify-between mb-4">' +
|
|
314
|
-
'<span class="bg-secondary text-black px-3 py-1 rounded-full text-xs font-bold uppercase">' + obs.type + '</span>' +
|
|
455
|
+
'<span class="bg-secondary text-black px-3 py-1 rounded-full text-xs font-bold uppercase">' + (obs.type || 'observation') + '</span>' +
|
|
315
456
|
'<span class="text-text-muted text-sm">' + formatTime(obs.createdAt) + '</span>' +
|
|
316
457
|
'</div>' +
|
|
317
|
-
'<div class="text-text-main mb-4">' + escapeHtml(obs.summary) + '</div>' +
|
|
458
|
+
'<div class="text-text-main mb-4">' + escapeHtml(obs.summary || obs.content || '') + '</div>' +
|
|
318
459
|
'<div class="text-text-muted text-sm">' +
|
|
319
|
-
'Action: ' + obs.action + ' | ' +
|
|
460
|
+
'Action: ' + (obs.action || 'none') + ' | ' +
|
|
320
461
|
'Target: ' + (obs.target || 'none') +
|
|
321
462
|
'</div>' +
|
|
322
463
|
'</div>';
|
|
323
464
|
}).join('');
|
|
324
465
|
}
|
|
325
466
|
|
|
326
|
-
function updateStatus(status) {
|
|
467
|
+
function updateStatus(status) {
|
|
327
468
|
const statusCard = document.querySelector('.squishy-hover.flex-col');
|
|
328
469
|
if (!statusCard) return;
|
|
329
470
|
|
|
@@ -467,9 +608,17 @@ app.get('/', (req, res) => {
|
|
|
467
608
|
modal.remove();
|
|
468
609
|
}
|
|
469
610
|
}
|
|
611
|
+
|
|
612
|
+
function changeProject(path) {
|
|
613
|
+
currentProjectPath = path;
|
|
614
|
+
loadData();
|
|
615
|
+
}
|
|
470
616
|
|
|
471
|
-
|
|
472
|
-
|
|
617
|
+
// Initialize: load projects first, then data
|
|
618
|
+
loadProjects().then(function() {
|
|
619
|
+
loadData();
|
|
620
|
+
window.refreshInterval = setInterval(loadData, 30000);
|
|
621
|
+
});
|
|
473
622
|
</script>
|
|
474
623
|
</body></html>`;
|
|
475
624
|
res.send(html);
|
package/dist/api/web/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../api/web/web.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../../api/web/web.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;AACtB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,KAAK,CAAC;AAElD,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;AAChB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAA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AAC;AACH,CAAC,CAAC,CAAC;AAEH,SAAS;AACT,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACxB,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAkcA,CAAC;IACd,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC;AAEH,eAAe;AACf,MAAM,UAAU,cAAc;IAC5B,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;QACpB,MAAM,CAAC,IAAI,CAAC,uCAAuC,GAAG,IAAI,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,GAAG,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -46,6 +46,14 @@ export declare const config: {
|
|
|
46
46
|
cronEnabled: boolean;
|
|
47
47
|
heartbeatInterval: number;
|
|
48
48
|
jobRetentionDays: number;
|
|
49
|
+
coreMemoryTotalBytes: number;
|
|
50
|
+
coreMemorySectionBytes: number;
|
|
51
|
+
embeddingsTimeoutMs: number;
|
|
52
|
+
embeddingsMaxRetries: number;
|
|
53
|
+
embeddingsRetryDelayMs: number;
|
|
54
|
+
openAiTimeoutMs: number;
|
|
55
|
+
ollamaTimeoutMs: number;
|
|
56
|
+
googleMultimodalTimeoutMs: number;
|
|
49
57
|
};
|
|
50
58
|
export default config;
|
|
51
59
|
//# sourceMappingURL=config.d.ts.map
|