amalfa 1.0.17 → 1.0.19
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/README.md +1 -1
- package/amalfa.config.example.ts +11 -0
- package/bun.lock +2 -2
- package/package.json +3 -2
- package/src/cli.ts +2 -1
- package/src/config/defaults.ts +2 -0
- package/src/daemon/index.ts +14 -9
- package/src/resonance/services/embedder.ts +1 -1
- package/src/resonance/services/vector-daemon.ts +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ MCP server that gives AI agents semantic access to project knowledge graphs.
|
|
|
8
8
|
|
|
9
9
|
## Status
|
|
10
10
|
|
|
11
|
-
✅ **v1.0 published** - Available on npm
|
|
11
|
+
✅ **v1.0.18 published** - Available on npm
|
|
12
12
|
|
|
13
13
|
[](https://www.npmjs.com/package/amalfa)
|
|
14
14
|
[](https://www.npmjs.com/package/amalfa)
|
package/amalfa.config.example.ts
CHANGED
|
@@ -82,6 +82,17 @@ export default {
|
|
|
82
82
|
* - 2000ms - Less responsive, lower CPU
|
|
83
83
|
*/
|
|
84
84
|
debounce: 1000,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Show desktop notifications
|
|
88
|
+
*
|
|
89
|
+
* When enabled, the daemon sends native OS notifications
|
|
90
|
+
* when the knowledge graph is updated.
|
|
91
|
+
*
|
|
92
|
+
* Default: true
|
|
93
|
+
* Set to false for silent operation
|
|
94
|
+
*/
|
|
95
|
+
notifications: true,
|
|
85
96
|
},
|
|
86
97
|
|
|
87
98
|
/**
|
package/bun.lock
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "polyvis",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@modelcontextprotocol/sdk": "1.25.0",
|
|
8
|
-
"amalfa": "^1.0.
|
|
8
|
+
"amalfa": "^1.0.17",
|
|
9
9
|
"fastembed": "2.0.0",
|
|
10
10
|
"pino": "^10.1.0",
|
|
11
11
|
},
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
"ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="],
|
|
64
64
|
|
|
65
|
-
"amalfa": ["amalfa@1.0.
|
|
65
|
+
"amalfa": ["amalfa@1.0.17", "", { "dependencies": { "@modelcontextprotocol/sdk": "1.25.0", "amalfa": "^1.0.17", "fastembed": "2.0.0", "pino": "^10.1.0" }, "bin": { "amalfa": "src/cli.ts" } }, "sha512-TJJPlq49/uEalwJIuNWsM30U5GqjV02ycQoUlk0qsHLWD3tWiwD5clfY62QFTPGFBsDxoGwUzb3hGUkDaAzHoQ=="],
|
|
66
66
|
|
|
67
67
|
"atomic-sleep": ["atomic-sleep@1.0.0", "", {}, "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="],
|
|
68
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amalfa",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "Local-first knowledge graph engine for AI agents. Transforms markdown into searchable memory with MCP protocol.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/pjsvis/amalfa#readme",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"precommit": "bun run scripts/maintenance/pre-commit.ts",
|
|
45
45
|
"check": "biome check .",
|
|
46
46
|
"format": "biome format --write .",
|
|
47
|
+
"validate-config": "bun run scripts/validate-config.ts",
|
|
47
48
|
"amalfa": "bun run src/cli.ts",
|
|
48
49
|
"servers": "bun run src/cli.ts servers",
|
|
49
50
|
"servers:dot": "bun run src/cli.ts servers --dot",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
57
|
"@modelcontextprotocol/sdk": "1.25.0",
|
|
57
|
-
"amalfa": "^1.0.
|
|
58
|
+
"amalfa": "^1.0.18",
|
|
58
59
|
"fastembed": "2.0.0",
|
|
59
60
|
"pino": "^10.1.0"
|
|
60
61
|
}
|
package/src/cli.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { existsSync, statSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
|
+
import pkg from "../package.json" with { type: "json" };
|
|
5
6
|
|
|
6
|
-
const VERSION =
|
|
7
|
+
const VERSION = pkg.version;
|
|
7
8
|
|
|
8
9
|
// Database path loaded from config (lazy loaded per command)
|
|
9
10
|
let DB_PATH: string | null = null;
|
package/src/config/defaults.ts
CHANGED
|
@@ -35,6 +35,7 @@ export interface AmalfaConfig {
|
|
|
35
35
|
watch: {
|
|
36
36
|
enabled: boolean;
|
|
37
37
|
debounce: number;
|
|
38
|
+
notifications?: boolean;
|
|
38
39
|
};
|
|
39
40
|
excludePatterns: string[];
|
|
40
41
|
/** Graph analysis tuning parameters (optional) */
|
|
@@ -63,6 +64,7 @@ export const DEFAULT_CONFIG: AmalfaConfig = {
|
|
|
63
64
|
watch: {
|
|
64
65
|
enabled: true,
|
|
65
66
|
debounce: 1000,
|
|
67
|
+
notifications: true,
|
|
66
68
|
},
|
|
67
69
|
excludePatterns: ["node_modules", ".git", ".amalfa"],
|
|
68
70
|
// Optional graph tuning (for advanced use)
|
package/src/daemon/index.ts
CHANGED
|
@@ -155,11 +155,13 @@ function triggerIngestion(debounceMs: number) {
|
|
|
155
155
|
retryQueue.delete(file);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
// Send notification
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
// Send notification (if enabled in config)
|
|
159
|
+
if (config.watch?.notifications !== false) {
|
|
160
|
+
await sendNotification(
|
|
161
|
+
"AMALFA",
|
|
162
|
+
`Knowledge graph updated (${batchSize} file${batchSize > 1 ? "s" : ""})`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
163
165
|
} catch (e) {
|
|
164
166
|
const errorMsg = e instanceof Error ? e.message : String(e);
|
|
165
167
|
log.error({ err: e }, "❌ Update failed");
|
|
@@ -202,10 +204,13 @@ function triggerIngestion(debounceMs: number) {
|
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
206
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
// Send error notification (if enabled in config)
|
|
208
|
+
if (config.watch?.notifications !== false) {
|
|
209
|
+
await sendNotification(
|
|
210
|
+
"AMALFA",
|
|
211
|
+
`Update failed (${batch.length} file${batch.length > 1 ? "s" : ""} will retry)`,
|
|
212
|
+
);
|
|
213
|
+
}
|
|
209
214
|
}
|
|
210
215
|
}, debounceMs);
|
|
211
216
|
}
|
|
@@ -71,7 +71,7 @@ export class Embedder {
|
|
|
71
71
|
|
|
72
72
|
private async init() {
|
|
73
73
|
if (!this.nativeEmbedder) {
|
|
74
|
-
const cacheDir = join(process.cwd(), ".
|
|
74
|
+
const cacheDir = join(process.cwd(), ".amalfa/cache");
|
|
75
75
|
console.log(
|
|
76
76
|
`[Embedder] Initializing local embedding model: ${this.currentModel}`,
|
|
77
77
|
);
|
|
@@ -35,7 +35,7 @@ async function initEmbedder() {
|
|
|
35
35
|
log.info({ model: currentModel }, "🔄 Initializing embedding model...");
|
|
36
36
|
|
|
37
37
|
// Ensure cache directory exists
|
|
38
|
-
const cacheDir = ".
|
|
38
|
+
const cacheDir = ".amalfa/cache";
|
|
39
39
|
const { mkdir } = await import("node:fs/promises");
|
|
40
40
|
try {
|
|
41
41
|
await mkdir(cacheDir, { recursive: true });
|