claude-cortex 1.6.0 → 1.6.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/embeddings/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/embeddings/generator.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAgB3E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,GAAG,MAAM,CAmBzE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAElD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { pipeline, env } from '@
|
|
2
|
-
// Configure for
|
|
1
|
+
import { pipeline, env } from '@huggingface/transformers';
|
|
2
|
+
// Configure for operation
|
|
3
3
|
env.allowRemoteModels = true;
|
|
4
4
|
env.allowLocalModels = true;
|
|
5
5
|
let embeddingPipeline = null;
|
|
@@ -8,6 +8,8 @@ let loadPromise = null;
|
|
|
8
8
|
/**
|
|
9
9
|
* Lazy-load the embedding model
|
|
10
10
|
* Model: all-MiniLM-L6-v2 (22MB, 384 dimensions)
|
|
11
|
+
* Uses @huggingface/transformers (successor to @xenova/transformers)
|
|
12
|
+
* with better ARM64 Linux support
|
|
11
13
|
*/
|
|
12
14
|
async function getEmbeddingPipeline() {
|
|
13
15
|
if (embeddingPipeline)
|
|
@@ -16,7 +18,6 @@ async function getEmbeddingPipeline() {
|
|
|
16
18
|
return loadPromise;
|
|
17
19
|
}
|
|
18
20
|
isLoading = true;
|
|
19
|
-
// Cast the pipeline to our typed interface
|
|
20
21
|
loadPromise = pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2');
|
|
21
22
|
try {
|
|
22
23
|
embeddingPipeline = await loadPromise;
|
|
@@ -40,7 +41,11 @@ export async function generateEmbedding(text) {
|
|
|
40
41
|
pooling: 'mean',
|
|
41
42
|
normalize: true,
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
+
// Handle both Tensor objects (new @huggingface/transformers) and plain objects
|
|
45
|
+
const data = typeof output.tolist === 'function'
|
|
46
|
+
? new Float32Array(output.tolist().flat(Infinity))
|
|
47
|
+
: new Float32Array(output.data);
|
|
48
|
+
return data;
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
51
|
* Calculate cosine similarity between two embeddings
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/embeddings/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/embeddings/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAG1D,0BAA0B;AAC1B,GAAG,CAAC,iBAAiB,GAAG,IAAI,CAAC;AAC7B,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAE5B,IAAI,iBAAiB,GAAqC,IAAI,CAAC;AAC/D,IAAI,SAAS,GAAG,KAAK,CAAC;AACtB,IAAI,WAAW,GAA8C,IAAI,CAAC;AAElE;;;;;GAKG;AACH,KAAK,UAAU,oBAAoB;IACjC,IAAI,iBAAiB;QAAE,OAAO,iBAAiB,CAAC;IAEhD,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,SAAS,GAAG,IAAI,CAAC;IACjB,WAAW,GAAG,QAAQ,CAAC,oBAAoB,EAAE,yBAAy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M,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtD,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAE9B,OAAO,UAAU,GAAG,SAAS,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,iBAAiB,KAAK,IAAI,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,oBAAoB,EAAE,CAAC;AAC/B,CAAC"}
|
package/dist/tools/recall.d.ts
CHANGED
|
@@ -21,16 +21,16 @@ export declare const recallSchema: z.ZodObject<{
|
|
|
21
21
|
includeGlobal: boolean;
|
|
22
22
|
mode: "search" | "important" | "recent";
|
|
23
23
|
project?: string | undefined;
|
|
24
|
-
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
25
24
|
category?: "architecture" | "pattern" | "preference" | "error" | "context" | "learning" | "todo" | "note" | "relationship" | "custom" | undefined;
|
|
26
25
|
tags?: string[] | undefined;
|
|
26
|
+
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
27
27
|
query?: string | undefined;
|
|
28
28
|
}, {
|
|
29
29
|
project?: string | undefined;
|
|
30
|
-
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
31
30
|
category?: "architecture" | "pattern" | "preference" | "error" | "context" | "learning" | "todo" | "note" | "relationship" | "custom" | undefined;
|
|
32
31
|
limit?: number | undefined;
|
|
33
32
|
tags?: string[] | undefined;
|
|
33
|
+
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
34
34
|
query?: string | undefined;
|
|
35
35
|
includeDecayed?: boolean | undefined;
|
|
36
36
|
includeGlobal?: boolean | undefined;
|
package/dist/tools/remember.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ export declare const rememberSchema: z.ZodObject<{
|
|
|
21
21
|
scope?: "project" | "global" | undefined;
|
|
22
22
|
transferable?: boolean | undefined;
|
|
23
23
|
project?: string | undefined;
|
|
24
|
-
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
25
24
|
category?: "architecture" | "pattern" | "preference" | "error" | "context" | "learning" | "todo" | "note" | "relationship" | "custom" | undefined;
|
|
26
25
|
tags?: string[] | undefined;
|
|
26
|
+
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
27
27
|
importance?: "critical" | "low" | "normal" | "high" | undefined;
|
|
28
28
|
}, {
|
|
29
29
|
content: string;
|
|
@@ -31,9 +31,9 @@ export declare const rememberSchema: z.ZodObject<{
|
|
|
31
31
|
scope?: "project" | "global" | undefined;
|
|
32
32
|
transferable?: boolean | undefined;
|
|
33
33
|
project?: string | undefined;
|
|
34
|
-
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
35
34
|
category?: "architecture" | "pattern" | "preference" | "error" | "context" | "learning" | "todo" | "note" | "relationship" | "custom" | undefined;
|
|
36
35
|
tags?: string[] | undefined;
|
|
36
|
+
type?: "short_term" | "long_term" | "episodic" | undefined;
|
|
37
37
|
importance?: "critical" | "low" | "normal" | "high" | undefined;
|
|
38
38
|
}>;
|
|
39
39
|
export type RememberInput = z.infer<typeof rememberSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-cortex",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Brain-like memory system for Claude Code - solves context compaction and memory persistence",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"node": ">=18.0.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@huggingface/transformers": "^3.7.2",
|
|
43
44
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
44
|
-
"@xenova/transformers": "^2.17.2",
|
|
45
45
|
"better-sqlite3": "^11.0.0",
|
|
46
46
|
"cors": "^2.8.5",
|
|
47
47
|
"express": "^4.21.0",
|