multimodemind 0.2.2 → 0.2.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.
|
@@ -7,5 +7,17 @@ export type { EmbeddingProvider } from './base.js';
|
|
|
7
7
|
export { OpenAIEmbeddingProvider } from './openai.js';
|
|
8
8
|
export { LocalEmbeddingProvider } from './local.js';
|
|
9
9
|
import type { EmbeddingProvider } from './base.js';
|
|
10
|
+
/**
|
|
11
|
+
* Keyword-only mode — no embeddings at all. Returns empty vectors so the router
|
|
12
|
+
* and stores fall back to keyword scoring. Useful for privacy, zero API cost,
|
|
13
|
+
* fully offline operation, and fast deterministic tests (no model download).
|
|
14
|
+
* Enabled with MMIND_EMBEDDINGS=none.
|
|
15
|
+
*/
|
|
16
|
+
export declare class NullEmbeddingProvider implements EmbeddingProvider {
|
|
17
|
+
readonly name = "none";
|
|
18
|
+
readonly dimensions = 0;
|
|
19
|
+
embed(): Promise<number[]>;
|
|
20
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
21
|
+
}
|
|
10
22
|
export declare function createEmbeddingProvider(apiKey?: string): EmbeddingProvider;
|
|
11
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/embeddings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAInD,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/embeddings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAInD;;;;;GAKG;AACH,qBAAa,qBAAsB,YAAW,iBAAiB;IAC7D,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,UAAU,KAAK;IAClB,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE/B;IACK,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAErD;CACF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAa1E"}
|
package/dist/embeddings/index.js
CHANGED
|
@@ -7,12 +7,32 @@ export { OpenAIEmbeddingProvider } from './openai.js';
|
|
|
7
7
|
export { LocalEmbeddingProvider } from './local.js';
|
|
8
8
|
import { OpenAIEmbeddingProvider } from './openai.js';
|
|
9
9
|
import { LocalEmbeddingProvider } from './local.js';
|
|
10
|
+
/**
|
|
11
|
+
* Keyword-only mode — no embeddings at all. Returns empty vectors so the router
|
|
12
|
+
* and stores fall back to keyword scoring. Useful for privacy, zero API cost,
|
|
13
|
+
* fully offline operation, and fast deterministic tests (no model download).
|
|
14
|
+
* Enabled with MMIND_EMBEDDINGS=none.
|
|
15
|
+
*/
|
|
16
|
+
export class NullEmbeddingProvider {
|
|
17
|
+
name = 'none';
|
|
18
|
+
dimensions = 0;
|
|
19
|
+
async embed() {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
async embedBatch(texts) {
|
|
23
|
+
return texts.map(() => []);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
10
26
|
export function createEmbeddingProvider(apiKey) {
|
|
27
|
+
if ((process.env['MMIND_EMBEDDINGS'] ?? '').toLowerCase() === 'none') {
|
|
28
|
+
console.error('[mmind] MMIND_EMBEDDINGS=none — keyword-only mode (no embeddings)');
|
|
29
|
+
return new NullEmbeddingProvider();
|
|
30
|
+
}
|
|
11
31
|
const key = apiKey ?? process.env['OPENAI_API_KEY'];
|
|
12
32
|
if (key) {
|
|
13
33
|
return new OpenAIEmbeddingProvider(key);
|
|
14
34
|
}
|
|
15
|
-
console.
|
|
35
|
+
console.error('[mmind] OPENAI_API_KEY not set — using local embedding model (first run downloads ~23MB)');
|
|
16
36
|
return new LocalEmbeddingProvider();
|
|
17
37
|
}
|
|
18
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/embeddings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,UAAU,uBAAuB,CAAC,MAAe;IACrD,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACpD,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,IAAI,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/embeddings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IACvB,IAAI,GAAG,MAAM,CAAC;IACd,UAAU,GAAG,CAAC,CAAC;IACxB,KAAK,CAAC,KAAK;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,KAAe;QAC9B,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,UAAU,uBAAuB,CAAC,MAAe;IACrD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QACrE,OAAO,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;QACnF,OAAO,IAAI,qBAAqB,EAAE,CAAC;IACrC,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACpD,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,IAAI,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,CAAC,KAAK,CACX,0FAA0F,CAC3F,CAAC;IACF,OAAO,IAAI,sBAAsB,EAAE,CAAC;AACtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "multimodemind",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Multi-store memory layer for AI agents, exposed over MCP",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"lint": "tsc --noEmit",
|
|
26
26
|
"dashboard": "tsx src/cli/dashboard.ts",
|
|
27
27
|
"test:mcp": "npm run build && node tests/mcp-smoke.mjs",
|
|
28
|
-
"prepublishOnly": "npm run build"
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"test:audit": "npm run build && node tests/audit-selftest.mjs"
|
|
29
30
|
},
|
|
30
31
|
"keywords": [
|
|
31
32
|
"mcp",
|