claude-memory-layer 1.0.21 → 1.0.23
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/dist/cli/index.js +5 -3
- package/dist/cli/index.js.map +2 -2
- package/dist/core/index.js +4 -2
- package/dist/core/index.js.map +2 -2
- package/dist/hooks/post-tool-use.js +4 -2
- package/dist/hooks/post-tool-use.js.map +2 -2
- package/dist/hooks/session-end.js +4 -2
- package/dist/hooks/session-end.js.map +2 -2
- package/dist/hooks/session-start.js +4 -2
- package/dist/hooks/session-start.js.map +2 -2
- package/dist/hooks/stop.js +4 -2
- package/dist/hooks/stop.js.map +2 -2
- package/dist/hooks/user-prompt-submit.js +4 -2
- package/dist/hooks/user-prompt-submit.js.map +2 -2
- package/dist/server/api/index.js +4 -2
- package/dist/server/api/index.js.map +2 -2
- package/dist/server/index.js +4 -2
- package/dist/server/index.js.map +2 -2
- package/dist/services/memory-service.js +4 -2
- package/dist/services/memory-service.js.map +2 -2
- package/memory/_index.md +3 -0
- package/memory/agent_response/uncategorized/2026-03-04.md +49 -0
- package/memory/tool_observation/uncategorized/2026-03-04.md +57 -0
- package/memory/user_prompt/uncategorized/2026-03-04.md +72 -0
- package/package.json +1 -1
- package/src/core/embedder.ts +4 -2
package/memory/_index.md
CHANGED
|
@@ -5,6 +5,7 @@ Generated automatically by MarkdownMirror.
|
|
|
5
5
|
- memory/.claude-plugin/commands/2026-02-25.md
|
|
6
6
|
- memory/agent_response/uncategorized/2026-02-26.md
|
|
7
7
|
- memory/agent_response/uncategorized/2026-03-03.md
|
|
8
|
+
- memory/agent_response/uncategorized/2026-03-04.md
|
|
8
9
|
- memory/default/uncategorized/2026-02-25.md
|
|
9
10
|
- memory/node_modules/abbrev/2026-02-25.md
|
|
10
11
|
- memory/node_modules/abort-controller/2026-02-25.md
|
|
@@ -409,4 +410,6 @@ Generated automatically by MarkdownMirror.
|
|
|
409
410
|
- memory/specs/web-viewer-ui/2026-02-25.md
|
|
410
411
|
- memory/tool_observation/uncategorized/2026-02-26.md
|
|
411
412
|
- memory/tool_observation/uncategorized/2026-03-03.md
|
|
413
|
+
- memory/tool_observation/uncategorized/2026-03-04.md
|
|
412
414
|
- memory/user_prompt/uncategorized/2026-02-26.md
|
|
415
|
+
- memory/user_prompt/uncategorized/2026-03-04.md
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
## 2026-03-04T06:28:06.090Z | 22424d25-2906-494c-8308-334081c07d2b
|
|
3
|
+
- type: agent_response
|
|
4
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
5
|
+
`@huggingface/transformers` is missing from local `node_modules` (only `jinja` is there). Run `npm install` in the workspace:
|
|
6
|
+
## 2026-03-04T06:28:06.118Z | 14ec2daf-64da-4d17-ab68-9d0f808ef2db
|
|
7
|
+
- type: agent_response
|
|
8
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
9
|
+
`npm install` completed successfully — `@huggingface/transformers` is now installed. Try `npx claude-memory-layer import` again.
|
|
10
|
+
## 2026-03-04T06:36:47.069Z | 58672b48-2a7a-401e-ab51-2116abaa5acf
|
|
11
|
+
- type: agent_response
|
|
12
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
13
|
+
변경사항은 `package.json`과 `package-lock.json`의 버전 bump (1.0.20 → 1.0.22)뿐입니다.
|
|
14
|
+
## 2026-03-04T06:36:47.080Z | ed63476b-dbe5-4f91-9700-706133fdec75
|
|
15
|
+
- type: agent_response
|
|
16
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
17
|
+
커밋 완료! `chore: bump version to 1.0.22` (3da2502)
|
|
18
|
+
## 2026-03-04T06:39:10.597Z | 5bcee020-0f05-4722-b5f1-0a73d258494d
|
|
19
|
+
- type: agent_response
|
|
20
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
21
|
+
ONNX Runtime가 `RotaryEmbedding` 업데이트를 지원하지 않는 문제입니다. 입력 토큰이 8389개로 모델의 max sequence length를 초과했을 가능성이 높습니다. 관련 코드를 확인해보겠습니다.
|
|
22
|
+
## 2026-03-04T06:39:10.634Z | 741b8a86-c7a7-470a-b9ab-d73a19e01ace
|
|
23
|
+
- type: agent_response
|
|
24
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
25
|
+
문제가 명확합니다. 입력 텍스트가 8389 토큰으로 모델의 max sequence length를 초과했고, ONNX Runtime이 RotaryEmbedding의 캐시 업데이트를 지원하지 않아 에러가 발생합니다.
|
|
26
|
+
|
|
27
|
+
`truncation: true` 옵션을 추가하면 해결됩니다.
|
|
28
|
+
## 2026-03-04T06:39:10.644Z | 72571d87-cfe7-4aed-83cc-20e1f27103c3
|
|
29
|
+
- type: agent_response
|
|
30
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
31
|
+
`embedBatch`도 동일하게 수정합니다.
|
|
32
|
+
## 2026-03-04T06:39:10.656Z | 628e80d5-6fb4-4b53-ad1d-281ee54d3144
|
|
33
|
+
- type: agent_response
|
|
34
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
35
|
+
이제 빌드하고 배포하면 됩니다.
|
|
36
|
+
## 2026-03-04T06:39:10.665Z | 339cafcb-46be-4ef9-90c2-8e9d4ed6177f
|
|
37
|
+
- type: agent_response
|
|
38
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
39
|
+
빌드 성공! 이제 버전 bump하고 배포하면 됩니다.
|
|
40
|
+
## 2026-03-04T06:39:10.673Z | 43348f80-aca8-4e3a-9ab8-d58787f039a8
|
|
41
|
+
- type: agent_response
|
|
42
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
43
|
+
빌드 완료 (v1.0.23). 이제 publish하세요:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm publish --otp=<OTP코드>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
OTP 코드 입력하면 배포됩니다.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
## 2026-03-04T06:28:03.883Z | 9916e2db-dcc8-4f2f-8725-b88526edea0d
|
|
3
|
+
- type: tool_observation
|
|
4
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
5
|
+
{"toolName":"TaskOutput","toolInput":{"task_id":"bdyjti9fh","block":true,"timeout":60000},"toolOutput":"{\"retrieval_status\":\"success\",\"task\":{\"task_id\":\"bdyjti9fh\",\"task_type\":\"local_bash\",\"status\":\"completed\",\"description\":\"Install missing dependencies\",\"output\":\"npm warn deprecated boolean@3.2.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.\\n\\nadded 46 packages, removed 43 packages, changed 22 packages, and audited 347 packages in 6s\\n\\n62 packages are looking for funding\\n run `npm fund` for details\\n\\n13 vulnerabilities (1 low, 4 moderate, 8 high)\\n\\nTo address issues that do not require attention, run:\\n npm audit fix\\n\\nTo address all issues possible (including breaking changes), run:\\n npm audit fix --force\\n\\nSome issues need review, and may require choosing\\na different dependency.\\n\\nRun `npm audit` for details.\\n\",\"exitCode\":0}}","durationMs":0,"success":true,"metadata":{}}
|
|
6
|
+
## 2026-03-04T06:36:04.098Z | 3ce71a7e-5f23-43f5-8c4f-9eb7f214b732
|
|
7
|
+
- type: tool_observation
|
|
8
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
9
|
+
{"toolName":"Skill","toolInput":{"skill":"commit"},"toolOutput":"{\"success\":true,\"commandName\":\"commit\"}","durationMs":0,"success":true,"metadata":{"turnId":"9f4160f4-51b2-4aaa-bc51-927e5e7bd0e7"}}
|
|
10
|
+
## 2026-03-04T06:36:07.375Z | c06c5f3d-8fd6-45c3-82e0-540ec34c7a14
|
|
11
|
+
- type: tool_observation
|
|
12
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
13
|
+
{"toolName":"Bash","toolInput":{"command":"git status && git diff && git log --oneline -5","description":"Check git status, diff, and recent commits"},"toolOutput":"On branch main\nYour branch is up to date with 'origin/main'.\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: package-lock.json\n\tmodified: package.json\n\nUntracked files:\n (use \"git add <file>...\" to include in what will be committed)\n\t.npm-cache/\n\tbootstrap-kb/\n\tclaude-memory-layer-1.0.14.tgz\n\td.sh\n\tdeploy.sh\n\tmemory/\n\tyarn.lock\n\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\ndiff --git package-lock.json package-lock.json\nindex 9055cf9..03dd54c 100644\n--- package-lock.json\n+++ package-lock.json\n@@ -1,12 +1,12 @@\n {\n \"name\": \"claude-memory-layer\",\n- \"version\": \"1.0.20\",\n+ \"version\": \"1.0.22\",\n \"lockfileVersion\": 3,\n \"requires\": true,\n \"packages\": {\n \"\": {\n \"name\": \"claude-memory-layer\",\n- \"version\": \"1.0.20\",\n+ \"version\": \"1.0.22\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@hono/node-server\": \"^1.13.0\",\ndiff --git package.json package.json\nindex 4502394..7f95b6a 100644\n--- package.json\n+++ package.json\n@@ -1,6 +1,6 @@\n {\n \"name\": \"claude-memory-layer\",\n- \"version\": \"1.0.20\",\n+ \"version\": \"1.0.22\",\n \"description\": \"Claude Code plugin that learns from conversations to provide personalized assistance\",\n \"main\": \"dist/index.js\",\n \"bin\": {\n0d2d460 chore(embedding): migrate to @huggingface/transformers and keep fallback path\nd5b7aa2 feat(embedding): default to jina text-matching with gemma300m fallback and env override\n8d622ad upgrade version\n150668a chore(embedding): set default model to jina v5 nano and env-selectable default\nd4f658d feat(embedding): switch default to jina v5 and auto-migrate on import","durationMs":0,"success":true,"metadata":{"command":"git status","turnId":"9f4160f4-51b2-4aaa-bc51-927e5e7bd0e7"}}
|
|
14
|
+
## 2026-03-04T06:36:42.625Z | 16ffdd76-1ab1-4c98-9f8f-8cffe5c211fb
|
|
15
|
+
- type: tool_observation
|
|
16
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
17
|
+
{"toolName":"Bash","toolInput":{"command":"git add package.json package-lock.json && git commit -m \"$(cat <<'EOF'\nchore: bump version to 1.0.22\n\nCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>\nEOF\n)\"","description":"Commit version bump to 1.0.22"},"toolOutput":"[main 3da2502] chore: bump version to 1.0.22\n 2 files changed, 3 insertions(+), 3 deletions(-)","durationMs":0,"success":true,"metadata":{"command":"git add","turnId":"9f4160f4-51b2-4aaa-bc51-927e5e7bd0e7"}}
|
|
18
|
+
## 2026-03-04T06:37:53.816Z | da83ea10-b297-4e76-a6d5-4c7d5d343aa2
|
|
19
|
+
- type: tool_observation
|
|
20
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
21
|
+
{"toolName":"Glob","toolInput":{"pattern":"src/**/*embed*"},"toolOutput":"{\"filenames\":[\"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts\"],\"durationMs\":35,\"numFiles\":1,\"truncated\":false}","durationMs":0,"success":true,"metadata":{"pattern":"src/**/*embed*","matchCount":1,"turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
22
|
+
## 2026-03-04T06:37:54.066Z | 1a82c94a-d52a-40fd-8063-0e4631f227ed
|
|
23
|
+
- type: tool_observation
|
|
24
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
25
|
+
{"toolName":"Glob","toolInput":{"pattern":"src/**/*model*"},"toolOutput":"{\"filenames\":[],\"durationMs\":31,\"numFiles\":0,\"truncated\":false}","durationMs":0,"success":true,"metadata":{"pattern":"src/**/*model*","matchCount":1,"turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
26
|
+
## 2026-03-04T06:37:56.839Z | 58be3ca3-fdbd-451d-a1e9-5f842a969d95
|
|
27
|
+
- type: tool_observation
|
|
28
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
29
|
+
{"toolName":"Read","toolInput":{"file_path":"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts"},"toolOutput":"{\"type\":\"text\",\"file\":{\"filePath\":\"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts\",\"content\":\"/**\\n * Local Embedding Generator using @xenova/transformers\\n * AXIOMMIND Principle 7: Standard JSON format for vectors\\n */\\n\\nimport { pipeline, Pipeline } from '@huggingface/transformers';\\n\\nexport interface EmbeddingResult {\\n vector: number[];\\n model: string;\\n dimensions: number;\\n}\\n\\nexport class Embedder {\\n private pipeline: Pipeline | null = null;\\n private readonly modelName: string;\\n private activeModelName: string;\\n private initialized = false;\\n\\n constructor(modelName: string = 'jinaai/jina-embeddings-v5-text-nano-text-matching') {\\n this.modelName = modelName;\\n this.activeModelName = modelName;\\n }\\n\\n /**\\n * Initialize the embedding pipeline\\n */\\n async initialize(): Promise<void> {\\n if (this.initialized) return;\\n\\n try {\\n this.pipeline = await pipeline('feature-extraction', this.modelName);\\n this.activeModelName = this.modelName;\\n this.initialized = true;\\n return;\\n } catch (primaryError) {\\n const fallbackModel = process.env.CLAUDE_MEMORY_EMBEDDING_FALLBACK_MODEL || 'onnx-community/embeddinggemma-300m-ONNX';\\n if (fallbackModel === this.modelName) {\\n throw primaryError;\\n }\\n\\n console.warn(`[Embedder] Primary model failed (${this.modelName}). Falling back to ${fallbackModel}`);\\n this.pipeline = await pipeline('feature-extraction', fallbackModel);\\n this.activeModelName = fallbackModel;\\n this.initialized = true;\\n }\\n }\\n\\n /**\\n * Generate embedding for a single text\\n */\\n async embed(text: string): Promise<EmbeddingResult> {\\n await this.initialize();\\n\\n if (!this.pipeline) {\\n throw new Error('Embedding pipeline not initialized');\\n }\\n\\n const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\\n\\n const vector = Array.from(output.data as Float32Array);\\n\\n return {\\n vector,\\n model: this.activeModelName,\\n dimensions: vector.length\\n };\\n }\\n\\n /**\\n * Generate embeddings for multiple texts in batch\\n */\\n async embedBatch(texts: string[]): Promise<EmbeddingResult[]> {\\n await this.initialize();\\n\\n if (!this.pipeline) {\\n throw new Error('Embedding pipeline not initialized');\\n }\\n\\n const results: EmbeddingResult[] = [];\\n\\n // Process in batches of 32 for memory efficiency\\n const batchSize = 32;\\n for (let i = 0; i < texts.length; i += batchSize) {\\n const batch = texts.slice(i, i + batchSize);\\n\\n for (const text of batch) {\\n const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\\n\\n const vector = Array.from(output.data as Float32Array);\\n\\n results.push({\\n vector,\\n model: this.activeModelName,\\n dimensions: vector.length\\n });\\n }\\n }\\n\\n return results;\\n }\\n\\n /**\\n * Get embedding dimensions for the current model\\n */\\n async getDimensions(): Promise<number> {\\n const result = await this.embed('test');\\n return result.dimensions;\\n }\\n\\n /**\\n * Check if embedder is ready\\n */\\n isReady(): boolean {\\n return this.initialized && this.pipeline !== null;\\n }\\n\\n /**\\n * Get model name\\n */\\n getModelName(): string {\\n return this.activeModelName;\\n }\\n}\\n\\n// Singleton instance for reuse\\nlet defaultEmbedder: Embedder | null = null;\\n\\nexport function getDefaultEmbedder(): Embedder {\\n const envModel = process.env.CLAUDE_MEMORY_EMBEDDING_MODEL;\\n if (!defaultEmbedder) {\\n defaultEmbedder = new Embedder(envModel || undefined);\\n }\\n return defaultEmbedder;\\n}\\n\",\"numLines\":142,\"startLine\":1,\"totalLines\":142}}","durationMs":0,"success":true,"metadata":{"filePath":"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts","fileType":"typescript","lineCount":1,"turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
30
|
+
## 2026-03-04T06:38:36.874Z | 73065280-29ae-4226-828e-810d1423881d
|
|
31
|
+
- type: tool_observation
|
|
32
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
33
|
+
{"toolName":"Edit","toolInput":{"file_path":"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts","old_string":" const output = await this.pipeline(text, {\n pooling: 'mean',\n normalize: true\n });","new_string":" const output = await this.pipeline(text, {\n pooling: 'mean',\n normalize: true,\n truncation: true\n });","replace_all":false},"toolOutput":"{\"filePath\":\"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts\",\"oldString\":\" const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\",\"newString\":\" const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true,\\n truncation: true\\n });\",\"originalFile\":\"/**\\n * Local Embedding Generator using @xenova/transformers\\n * AXIOMMIND Principle 7: Standard JSON format for vectors\\n */\\n\\nimport { pipeline, Pipeline } from '@huggingface/transformers';\\n\\nexport interface EmbeddingResult {\\n vector: number[];\\n model: string;\\n dimensions: number;\\n}\\n\\nexport class Embedder {\\n private pipeline: Pipeline | null = null;\\n private readonly modelName: string;\\n private activeModelName: string;\\n private initialized = false;\\n\\n constructor(modelName: string = 'jinaai/jina-embeddings-v5-text-nano-text-matching') {\\n this.modelName = modelName;\\n this.activeModelName = modelName;\\n }\\n\\n /**\\n * Initialize the embedding pipeline\\n */\\n async initialize(): Promise<void> {\\n if (this.initialized) return;\\n\\n try {\\n this.pipeline = await pipeline('feature-extraction', this.modelName);\\n this.activeModelName = this.modelName;\\n this.initialized = true;\\n return;\\n } catch (primaryError) {\\n const fallbackModel = process.env.CLAUDE_MEMORY_EMBEDDING_FALLBACK_MODEL || 'onnx-community/embeddinggemma-300m-ONNX';\\n if (fallbackModel === this.modelName) {\\n throw primaryError;\\n }\\n\\n console.warn(`[Embedder] Primary model failed (${this.modelName}). Falling back to ${fallbackModel}`);\\n this.pipeline = await pipeline('feature-extraction', fallbackModel);\\n this.activeModelName = fallbackModel;\\n this.initialized = true;\\n }\\n }\\n\\n /**\\n * Generate embedding for a single text\\n */\\n async embed(text: string): Promise<EmbeddingResult> {\\n await this.initialize();\\n\\n if (!this.pipeline) {\\n throw new Error('Embedding pipeline not initialized');\\n }\\n\\n const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\\n\\n const vector = Array.from(output.data as Float32Array);\\n\\n return {\\n vector,\\n model: this.activeModelName,\\n dimensions: vector.length\\n };\\n }\\n\\n /**\\n * Generate embeddings for multiple texts in batch\\n */\\n async embedBatch(texts: string[]): Promise<EmbeddingResult[]> {\\n await this.initialize();\\n\\n if (!this.pipeline) {\\n throw new Error('Embedding pipeline not initialized');\\n }\\n\\n const results: EmbeddingResult[] = [];\\n\\n // Process in batches of 32 for memory efficiency\\n const batchSize = 32;\\n for (let i = 0; i < texts.length; i += batchSize) {\\n const batch = texts.slice(i, i + batchSize);\\n\\n for (const text of batch) {\\n const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\\n\\n const vector = Array.from(output.data as Float32Array);\\n\\n results.push({\\n vector,\\n model: this.activeModelName,\\n dimensions: vector.length\\n });\\n }\\n }\\n\\n return results;\\n }\\n\\n /**\\n * Get embedding dimensions for the current model\\n */\\n async getDimensions(): Promise<number> {\\n const result = await this.embed('test');\\n return result.dimensions;\\n }\\n\\n /**\\n * Check if embedder is ready\\n */\\n isReady(): boolean {\\n return this.initialized && this.pipeline !== null;\\n }\\n\\n /**\\n * Get model name\\n */\\n getModelName(): string {\\n return this.activeModelName;\\n }\\n}\\n\\n// Singleton instance for reuse\\nlet defaultEmbedder: Embedder | null = null;\\n\\nexport function getDefaultEmbedder(): Embedder {\\n const envModel = process.env.CLAUDE_MEMORY_EMBEDDING_MODEL;\\n if (!defaultEmbedder) {\\n defaultEmbedder = new Embedder(envModel || undefined);\\n }\\n return defaultEmbedder;\\n}\\n\",\"structuredPatch\":[{\"oldStart\":58,\"oldLines\":7,\"newStart\":58,\"newLines\":8,\"lines\":[\" \",\" const output = await this.pipeline(text, {\",\" pooling: 'mean',\",\"- normalize: true\",\"+ normalize: true,\",\"+ truncation: true\",\" });\",\" \",\" const vector = Array.from(output.data as Float32Array);\"]}],\"userModified\":false,\"replaceAll\":false}","durationMs":0,"success":true,"metadata":{"filePath":"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts","fileType":"typescript","turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
34
|
+
## 2026-03-04T06:38:41.135Z | b9d5757e-41d6-4834-90f9-8ffad2ebddb9
|
|
35
|
+
- type: tool_observation
|
|
36
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
37
|
+
{"toolName":"Edit","toolInput":{"file_path":"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts","old_string":" const output = await this.pipeline(text, {\n pooling: 'mean',\n normalize: true\n });","new_string":" const output = await this.pipeline(text, {\n pooling: 'mean',\n normalize: true,\n truncation: true\n });","replace_all":false},"toolOutput":"{\"filePath\":\"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts\",\"oldString\":\" const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\",\"newString\":\" const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true,\\n truncation: true\\n });\",\"originalFile\":\"/**\\n * Local Embedding Generator using @xenova/transformers\\n * AXIOMMIND Principle 7: Standard JSON format for vectors\\n */\\n\\nimport { pipeline, Pipeline } from '@huggingface/transformers';\\n\\nexport interface EmbeddingResult {\\n vector: number[];\\n model: string;\\n dimensions: number;\\n}\\n\\nexport class Embedder {\\n private pipeline: Pipeline | null = null;\\n private readonly modelName: string;\\n private activeModelName: string;\\n private initialized = false;\\n\\n constructor(modelName: string = 'jinaai/jina-embeddings-v5-text-nano-text-matching') {\\n this.modelName = modelName;\\n this.activeModelName = modelName;\\n }\\n\\n /**\\n * Initialize the embedding pipeline\\n */\\n async initialize(): Promise<void> {\\n if (this.initialized) return;\\n\\n try {\\n this.pipeline = await pipeline('feature-extraction', this.modelName);\\n this.activeModelName = this.modelName;\\n this.initialized = true;\\n return;\\n } catch (primaryError) {\\n const fallbackModel = process.env.CLAUDE_MEMORY_EMBEDDING_FALLBACK_MODEL || 'onnx-community/embeddinggemma-300m-ONNX';\\n if (fallbackModel === this.modelName) {\\n throw primaryError;\\n }\\n\\n console.warn(`[Embedder] Primary model failed (${this.modelName}). Falling back to ${fallbackModel}`);\\n this.pipeline = await pipeline('feature-extraction', fallbackModel);\\n this.activeModelName = fallbackModel;\\n this.initialized = true;\\n }\\n }\\n\\n /**\\n * Generate embedding for a single text\\n */\\n async embed(text: string): Promise<EmbeddingResult> {\\n await this.initialize();\\n\\n if (!this.pipeline) {\\n throw new Error('Embedding pipeline not initialized');\\n }\\n\\n const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true,\\n truncation: true\\n });\\n\\n const vector = Array.from(output.data as Float32Array);\\n\\n return {\\n vector,\\n model: this.activeModelName,\\n dimensions: vector.length\\n };\\n }\\n\\n /**\\n * Generate embeddings for multiple texts in batch\\n */\\n async embedBatch(texts: string[]): Promise<EmbeddingResult[]> {\\n await this.initialize();\\n\\n if (!this.pipeline) {\\n throw new Error('Embedding pipeline not initialized');\\n }\\n\\n const results: EmbeddingResult[] = [];\\n\\n // Process in batches of 32 for memory efficiency\\n const batchSize = 32;\\n for (let i = 0; i < texts.length; i += batchSize) {\\n const batch = texts.slice(i, i + batchSize);\\n\\n for (const text of batch) {\\n const output = await this.pipeline(text, {\\n pooling: 'mean',\\n normalize: true\\n });\\n\\n const vector = Array.from(output.data as Float32Array);\\n\\n results.push({\\n vector,\\n model: this.activeModelName,\\n dimensions: vector.length\\n });\\n }\\n }\\n\\n return results;\\n }\\n\\n /**\\n * Get embedding dimensions for the current model\\n */\\n async getDimensions(): Promise<number> {\\n const result = await this.embed('test');\\n return result.dimensions;\\n }\\n\\n /**\\n * Check if embedder is ready\\n */\\n isReady(): boolean {\\n return this.initialized && this.pipeline !== null;\\n }\\n\\n /**\\n * Get model name\\n */\\n getModelName(): string {\\n return this.activeModelName;\\n }\\n}\\n\\n// Singleton instance for reuse\\nlet defaultEmbedder: Embedder | null = null;\\n\\nexport function getDefaultEmbedder(): Embedder {\\n const envModel = process.env.CLAUDE_MEMORY_EMBEDDING_MODEL;\\n if (!defaultEmbedder) {\\n defaultEmbedder = new Embedder(envModel || undefined);\\n }\\n return defaultEmbedder;\\n}\\n\",\"structuredPatch\":[{\"oldStart\":91,\"oldLines\":7,\"newStart\":91,\"newLines\":8,\"lines\":[\" for (const text of batch) {\",\" const output = await this.pipeline(text, {\",\" pooling: 'mean',\",\"- normalize: true\",\"+ normalize: true,\",\"+ truncation: true\",\" });\",\" \",\" const vector = Array.from(output.data as Float32Array);\"]}],\"userModified\":false,\"replaceAll\":false}","durationMs":0,"success":true,"metadata":{"filePath":"/home/walter/workspace/opensource/claude-memory-layer/src/core/embedder.ts","fileType":"typescript","turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
38
|
+
## 2026-03-04T06:38:50.797Z | e3fb5194-14e6-45d8-9ca5-bea172e8bd0b
|
|
39
|
+
- type: tool_observation
|
|
40
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
41
|
+
{"toolName":"Bash","toolInput":{"command":"npm run build 2>&1","description":"Build the project","run_in_background":true},"toolOutput":"","durationMs":0,"success":true,"metadata":{"command":"npm run","turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
42
|
+
## 2026-03-04T06:38:54.096Z | faa17588-c260-4a70-94c1-a0ab937fe95b
|
|
43
|
+
- type: tool_observation
|
|
44
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
45
|
+
{"toolName":"TaskOutput","toolInput":{"task_id":"but6ty6x6","block":true,"timeout":60000},"toolOutput":"{\"retrieval_status\":\"success\",\"task\":{\"task_id\":\"but6ty6x6\",\"task_type\":\"local_bash\",\"status\":\"completed\",\"description\":\"Build the project\",\"output\":\"\\n> claude-memory-layer@1.0.22 build\\n> tsx scripts/build.ts\\n\\n🔨 Building claude-memory-layer plugin...\\n\\n📦 Building CLI...\\n📦 Building hooks...\\n📦 Building core modules...\\n📦 Building services...\\n📦 Building server...\\n📋 Copying plugin files...\\n📋 Copying UI files...\\n\\n✅ Build complete!\\n\\nOutput: dist/\\n - cli/index.js\\n - hooks/*.js\\n - core/index.js\\n - services/memory-service.js\\n - server/index.js\\n - ui/index.html\\n - .claude-plugin/\\n\",\"exitCode\":0}}","durationMs":0,"success":true,"metadata":{"turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
46
|
+
## 2026-03-04T06:38:59.795Z | faca74a0-3692-48da-a7d4-ab32625b543c
|
|
47
|
+
- type: tool_observation
|
|
48
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
49
|
+
{"toolName":"Bash","toolInput":{"command":"bash scripts/bump-patch-version.sh","description":"Bump patch version"},"toolOutput":"Version bumped: 1.0.22 -> 1.0.23","durationMs":0,"success":true,"metadata":{"command":"bash","turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
50
|
+
## 2026-03-04T06:39:03.968Z | e63d566a-3c08-43fa-ba6c-c4bb1bc453db
|
|
51
|
+
- type: tool_observation
|
|
52
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
53
|
+
{"toolName":"Bash","toolInput":{"command":"npm run build 2>&1","description":"Rebuild with new version","run_in_background":true},"toolOutput":"","durationMs":0,"success":true,"metadata":{"command":"npm run","turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
54
|
+
## 2026-03-04T06:39:07.113Z | 285427bd-2ac2-476b-ae2f-2f9fd7429445
|
|
55
|
+
- type: tool_observation
|
|
56
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
57
|
+
{"toolName":"TaskOutput","toolInput":{"task_id":"bibvorob0","block":true,"timeout":60000},"toolOutput":"{\"retrieval_status\":\"success\",\"task\":{\"task_id\":\"bibvorob0\",\"task_type\":\"local_bash\",\"status\":\"completed\",\"description\":\"Rebuild with new version\",\"output\":\"\\n> claude-memory-layer@1.0.23 build\\n> tsx scripts/build.ts\\n\\n🔨 Building claude-memory-layer plugin...\\n\\n📦 Building CLI...\\n📦 Building hooks...\\n📦 Building core modules...\\n📦 Building services...\\n📦 Building server...\\n📋 Copying plugin files...\\n📋 Copying UI files...\\n\\n✅ Build complete!\\n\\nOutput: dist/\\n - cli/index.js\\n - hooks/*.js\\n - core/index.js\\n - services/memory-service.js\\n - server/index.js\\n - ui/index.html\\n - .claude-plugin/\\n\",\"exitCode\":0}}","durationMs":0,"success":true,"metadata":{"turnId":"77422abb-81d6-4e11-a063-1a73faebc701"}}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
## 2026-03-04T06:28:42.356Z | 2eaacf00-4cb0-4dc9-a638-d811a5b3b237
|
|
3
|
+
- type: user_prompt
|
|
4
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
5
|
+
./scripts/bump-patch-version.sh 이고 하고, 다시 num run build 하고, npm publish 하면 배포 해서, 다른곳에서 쓸 수 있는거야?
|
|
6
|
+
## 2026-03-04T06:37:45.748Z | 1f9b728d-262f-414d-bb25-495c923bb376
|
|
7
|
+
- type: user_prompt
|
|
8
|
+
- session: 49653e19-2797-42cb-b203-bb26aaa00738
|
|
9
|
+
<-- GET /api/stats/retrieval-traces?limit=20
|
|
10
|
+
Unknown model class "eurobert", attempting to construct from base class.
|
|
11
|
+
dtype not specified for "model". Using the default dtype (fp32) for this device (cpu).
|
|
12
|
+
Unknown model class "eurobert", attempting to construct from base class.
|
|
13
|
+
dtype not specified for "model". Using the default dtype (fp32) for this device (cpu).
|
|
14
|
+
Unknown model class "eurobert", attempting to construct from base class.
|
|
15
|
+
dtype not specified for "model". Using the default dtype (fp32) for this device (cpu).
|
|
16
|
+
Unknown model class "eurobert", attempting to construct from base class.
|
|
17
|
+
dtype not specified for "model". Using the default dtype (fp32) for this device (cpu).
|
|
18
|
+
Unknown model class "eurobert", attempting to construct from base class.
|
|
19
|
+
dtype not specified for "model". Using the default dtype (fp32) for this device (cpu).
|
|
20
|
+
|
|
21
|
+
===
|
|
22
|
+
🧠 Processing embeddings...
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
2026-03-04 15:36:11.615152855 [E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running RotaryEmbedding node. Name:'/model/layers.0/attn/k_rotary/RotaryEmbedding' Status Message: Updating cos_cache and sin_cache in RotaryEmbedding is not currently supported
|
|
26
|
+
An error occurred during model execution: "Error: Non-zero status code returned while running RotaryEmbedding node. Name:'/model/layers.0/attn/k_rotary/RotaryEmbedding' Status Message: Updating cos_cache and sin_cache in RotaryEmbedding is not currently supported".
|
|
27
|
+
Inputs given to model: {
|
|
28
|
+
input_ids: {
|
|
29
|
+
type: 'int64',
|
|
30
|
+
dims: [ 1, 8389 ],
|
|
31
|
+
location: 'cpu',
|
|
32
|
+
data: BigInt64Array(8389) [
|
|
33
|
+
5018n, 14506n, 678n, 3332n, 8144n, 2247n, 14506n,
|
|
34
|
+
2566n, 23118n, 1213n, 2703n, 59628n, 5227n, 6458n,
|
|
35
|
+
38377n, 94481n, 7682n, 3647n, 20103n, 41111n, 3797n,
|
|
36
|
+
7153n, 12354n, 11451n, 40706n, 15030n, 7153n, 12354n,
|
|
37
|
+
11451n, 10482n, 3616n, 964n, 11525n, 60853n, 75564n,
|
|
38
|
+
22030n, 2247n, 1834n, 3332n, 2n, 17896n, 9469n,
|
|
39
|
+
399n, 51930n, 18825n, 25n, 105519n, 101974n, 22035n,
|
|
40
|
+
109336n, 11651n, 109055n, 102668n, 102517n, 102888n, 35495n,
|
|
41
|
+
74959n, 1734n, 1734n, 567n, 18362n, 22241n, 1734n,
|
|
42
|
+
1734n, 791n, 1887n, 3146n, 20523n, 398n, 13777n,
|
|
43
|
+
7447n, 65051n, 10652n, 449n, 6369n, 3925n, 98319n,
|
|
44
|
+
719n, 279n, 2132n, 3488n, 14865n, 311n, 8346n,
|
|
45
|
+
2027n, 19440n, 7526n, 1606n, 7338n, 77n, 1734n,
|
|
46
|
+
16n, 13n, 3146n, 14924n, 220n, 17n, 374n,
|
|
47
|
+
21771n, 439n,
|
|
48
|
+
... 8289 more items
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
attention_mask: {
|
|
52
|
+
type: 'int64',
|
|
53
|
+
dims: [ 1, 8389 ],
|
|
54
|
+
location: 'cpu',
|
|
55
|
+
data: BigInt64Array(8389) [
|
|
56
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
57
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
58
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
59
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
60
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
61
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
62
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
63
|
+
1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n, 1n,
|
|
64
|
+
1n, 1n, 1n, 1n,
|
|
65
|
+
... 8289 more items
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
❌ Import failed: Error: Non-zero status code returned while running RotaryEmbedding node. Name:'/model/layers.0/attn/k_rotary/RotaryEmbedding' Status Message: Updating cos_cache and sin_cache in RotaryEmbedding is not currently supported
|
|
71
|
+
at Immediate.<anonymous> (/home/walter/workspace/opensource/claude-memory-layer/node_modules/@huggingface/transformers/node_modules/onnxruntime-node/dist/backend.js:48:108)
|
|
72
|
+
at process.processImmediate (node:internal/timers:483:21)
|
package/package.json
CHANGED
package/src/core/embedder.ts
CHANGED
|
@@ -58,7 +58,8 @@ export class Embedder {
|
|
|
58
58
|
|
|
59
59
|
const output = await this.pipeline(text, {
|
|
60
60
|
pooling: 'mean',
|
|
61
|
-
normalize: true
|
|
61
|
+
normalize: true,
|
|
62
|
+
truncation: true
|
|
62
63
|
});
|
|
63
64
|
|
|
64
65
|
const vector = Array.from(output.data as Float32Array);
|
|
@@ -90,7 +91,8 @@ export class Embedder {
|
|
|
90
91
|
for (const text of batch) {
|
|
91
92
|
const output = await this.pipeline(text, {
|
|
92
93
|
pooling: 'mean',
|
|
93
|
-
normalize: true
|
|
94
|
+
normalize: true,
|
|
95
|
+
truncation: true
|
|
94
96
|
});
|
|
95
97
|
|
|
96
98
|
const vector = Array.from(output.data as Float32Array);
|