@pcircle/memesh 4.4.0 → 4.5.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.
Files changed (198) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.mcp.json +1 -1
  4. package/README.de.md +32 -12
  5. package/README.es.md +13 -12
  6. package/README.fr.md +31 -11
  7. package/README.ja.md +13 -12
  8. package/README.ko.md +14 -13
  9. package/README.md +41 -16
  10. package/README.pt.md +30 -10
  11. package/README.th.md +16 -9
  12. package/README.vi.md +32 -12
  13. package/README.zh-CN.md +14 -13
  14. package/README.zh-TW.md +14 -13
  15. package/dashboard/dist/index.html +10 -10
  16. package/dist/cli/view-live.js +1 -1
  17. package/dist/cli/view.d.ts.map +1 -1
  18. package/dist/cli/view.js +2 -2
  19. package/dist/cli/view.js.map +1 -1
  20. package/dist/core/analytics.d.ts +7 -3
  21. package/dist/core/analytics.d.ts.map +1 -1
  22. package/dist/core/analytics.js +8 -8
  23. package/dist/core/analytics.js.map +1 -1
  24. package/dist/core/auto-tagger.d.ts.map +1 -1
  25. package/dist/core/auto-tagger.js.map +1 -1
  26. package/dist/core/config.d.ts +5 -3
  27. package/dist/core/config.d.ts.map +1 -1
  28. package/dist/core/config.js +30 -14
  29. package/dist/core/config.js.map +1 -1
  30. package/dist/core/demo.d.ts +2 -2
  31. package/dist/core/demo.d.ts.map +1 -1
  32. package/dist/core/demo.js.map +1 -1
  33. package/dist/core/digest-validator.d.ts.map +1 -1
  34. package/dist/core/digest-validator.js +3 -1
  35. package/dist/core/digest-validator.js.map +1 -1
  36. package/dist/core/doctor.d.ts +3 -0
  37. package/dist/core/doctor.d.ts.map +1 -1
  38. package/dist/core/doctor.js +255 -101
  39. package/dist/core/doctor.js.map +1 -1
  40. package/dist/core/dreamer.d.ts +35 -7
  41. package/dist/core/dreamer.d.ts.map +1 -1
  42. package/dist/core/dreamer.js +394 -41
  43. package/dist/core/dreamer.js.map +1 -1
  44. package/dist/core/embedder.d.ts +3 -5
  45. package/dist/core/embedder.d.ts.map +1 -1
  46. package/dist/core/embedder.js +26 -95
  47. package/dist/core/embedder.js.map +1 -1
  48. package/dist/core/extractor.d.ts.map +1 -1
  49. package/dist/core/extractor.js +2 -1
  50. package/dist/core/extractor.js.map +1 -1
  51. package/dist/core/failure-analyzer.d.ts.map +1 -1
  52. package/dist/core/failure-analyzer.js +2 -1
  53. package/dist/core/failure-analyzer.js.map +1 -1
  54. package/dist/core/graph.d.ts +4 -4
  55. package/dist/core/graph.d.ts.map +1 -1
  56. package/dist/core/graph.js.map +1 -1
  57. package/dist/core/install-hooks.d.ts +1 -0
  58. package/dist/core/install-hooks.d.ts.map +1 -1
  59. package/dist/core/install-hooks.js +0 -0
  60. package/dist/core/install-hooks.js.map +1 -1
  61. package/dist/core/kg-backfill.d.ts +4 -4
  62. package/dist/core/kg-backfill.d.ts.map +1 -1
  63. package/dist/core/kg-backfill.js +1 -1
  64. package/dist/core/kg-backfill.js.map +1 -1
  65. package/dist/core/lesson-engine.d.ts +1 -0
  66. package/dist/core/lesson-engine.d.ts.map +1 -1
  67. package/dist/core/lesson-engine.js +1 -0
  68. package/dist/core/lesson-engine.js.map +1 -1
  69. package/dist/core/lifecycle.d.ts +4 -4
  70. package/dist/core/lifecycle.d.ts.map +1 -1
  71. package/dist/core/lifecycle.js +1 -1
  72. package/dist/core/lifecycle.js.map +1 -1
  73. package/dist/core/llm-client.d.ts.map +1 -1
  74. package/dist/core/llm-client.js +3 -6
  75. package/dist/core/llm-client.js.map +1 -1
  76. package/dist/core/llm-telemetry.d.ts +4 -4
  77. package/dist/core/llm-telemetry.d.ts.map +1 -1
  78. package/dist/core/llm-telemetry.js +1 -1
  79. package/dist/core/llm-telemetry.js.map +1 -1
  80. package/dist/core/llm-validator.d.ts +1 -0
  81. package/dist/core/llm-validator.d.ts.map +1 -1
  82. package/dist/core/llm-validator.js +33 -10
  83. package/dist/core/llm-validator.js.map +1 -1
  84. package/dist/core/memory-tool.d.ts.map +1 -1
  85. package/dist/core/memory-tool.js +4 -0
  86. package/dist/core/memory-tool.js.map +1 -1
  87. package/dist/core/operations.d.ts.map +1 -1
  88. package/dist/core/operations.js +23 -8
  89. package/dist/core/operations.js.map +1 -1
  90. package/dist/core/output-language.d.ts +6 -0
  91. package/dist/core/output-language.d.ts.map +1 -0
  92. package/dist/core/output-language.js +25 -0
  93. package/dist/core/output-language.js.map +1 -0
  94. package/dist/core/paths.d.ts +3 -0
  95. package/dist/core/paths.d.ts.map +1 -1
  96. package/dist/core/paths.js +67 -1
  97. package/dist/core/paths.js.map +1 -1
  98. package/dist/core/patterns.d.ts +2 -3
  99. package/dist/core/patterns.d.ts.map +1 -1
  100. package/dist/core/patterns.js +1 -5
  101. package/dist/core/patterns.js.map +1 -1
  102. package/dist/core/project-tags.d.ts +3 -3
  103. package/dist/core/project-tags.d.ts.map +1 -1
  104. package/dist/core/project-tags.js.map +1 -1
  105. package/dist/core/projects.d.ts +2 -2
  106. package/dist/core/projects.d.ts.map +1 -1
  107. package/dist/core/projects.js.map +1 -1
  108. package/dist/core/schema-export.d.ts.map +1 -1
  109. package/dist/core/schema-export.js +0 -34
  110. package/dist/core/schema-export.js.map +1 -1
  111. package/dist/core/serializer.d.ts.map +1 -1
  112. package/dist/core/serializer.js +45 -4
  113. package/dist/core/serializer.js.map +1 -1
  114. package/dist/core/stats.d.ts +2 -2
  115. package/dist/core/stats.d.ts.map +1 -1
  116. package/dist/core/stats.js.map +1 -1
  117. package/dist/core/transcript-extractor.d.ts +88 -0
  118. package/dist/core/transcript-extractor.d.ts.map +1 -0
  119. package/dist/core/transcript-extractor.js +417 -0
  120. package/dist/core/transcript-extractor.js.map +1 -0
  121. package/dist/core/transcript-source.d.ts +21 -0
  122. package/dist/core/transcript-source.d.ts.map +1 -0
  123. package/dist/core/transcript-source.js +142 -0
  124. package/dist/core/transcript-source.js.map +1 -0
  125. package/dist/core/types.d.ts +17 -7
  126. package/dist/core/types.d.ts.map +1 -1
  127. package/dist/core/types.js +2 -0
  128. package/dist/core/types.js.map +1 -1
  129. package/dist/db.d.ts +5 -5
  130. package/dist/db.d.ts.map +1 -1
  131. package/dist/db.js +165 -17
  132. package/dist/db.js.map +1 -1
  133. package/dist/knowledge-graph.d.ts +3 -2
  134. package/dist/knowledge-graph.d.ts.map +1 -1
  135. package/dist/knowledge-graph.js +19 -10
  136. package/dist/knowledge-graph.js.map +1 -1
  137. package/dist/mcp/server.js +2 -1
  138. package/dist/mcp/server.js.map +1 -1
  139. package/dist/skills-manifest.json +28 -33
  140. package/dist/storage/conflicts.d.ts +3 -3
  141. package/dist/storage/conflicts.d.ts.map +1 -1
  142. package/dist/storage/conflicts.js.map +1 -1
  143. package/dist/storage/fts-index.d.ts +4 -4
  144. package/dist/storage/fts-index.d.ts.map +1 -1
  145. package/dist/storage/fts-index.js.map +1 -1
  146. package/dist/storage/sqlite.d.ts +20 -0
  147. package/dist/storage/sqlite.d.ts.map +1 -0
  148. package/dist/storage/sqlite.js +64 -0
  149. package/dist/storage/sqlite.js.map +1 -0
  150. package/dist/storage/vector-index.d.ts +3 -0
  151. package/dist/storage/vector-index.d.ts.map +1 -0
  152. package/dist/storage/vector-index.js +7 -0
  153. package/dist/storage/vector-index.js.map +1 -0
  154. package/dist/transports/cli/cli.d.ts.map +1 -1
  155. package/dist/transports/cli/cli.js +278 -91
  156. package/dist/transports/cli/cli.js.map +1 -1
  157. package/dist/transports/http/retired-routes.d.ts.map +1 -1
  158. package/dist/transports/http/retired-routes.js +1 -0
  159. package/dist/transports/http/retired-routes.js.map +1 -1
  160. package/dist/transports/http/server.d.ts +7 -0
  161. package/dist/transports/http/server.d.ts.map +1 -1
  162. package/dist/transports/http/server.js +165 -79
  163. package/dist/transports/http/server.js.map +1 -1
  164. package/dist/transports/mcp/handlers.d.ts +4 -96
  165. package/dist/transports/mcp/handlers.d.ts.map +1 -1
  166. package/dist/transports/mcp/handlers.js +26 -59
  167. package/dist/transports/mcp/handlers.js.map +1 -1
  168. package/dist/transports/schemas.d.ts +10 -30
  169. package/dist/transports/schemas.d.ts.map +1 -1
  170. package/dist/transports/schemas.js +5 -29
  171. package/dist/transports/schemas.js.map +1 -1
  172. package/hooks/hooks.json +0 -10
  173. package/package.json +6 -19
  174. package/scripts/hooks/_generated/core-paths.js +67 -1
  175. package/scripts/hooks/_generated/sqlite.js +71 -0
  176. package/scripts/hooks/_shared.js +286 -195
  177. package/scripts/hooks/post-commit.js +52 -10
  178. package/scripts/hooks/pre-compact.js +10 -7
  179. package/scripts/hooks/pre-edit-recall.js +4 -8
  180. package/scripts/hooks/session-start.js +95 -47
  181. package/scripts/hooks/session-summary.js +120 -52
  182. package/scripts/hooks/user-prompt-intent.js +3 -2
  183. package/skills/memesh/SKILL.md +3 -2
  184. package/dist/core/skill-usage-log.d.ts +0 -11
  185. package/dist/core/skill-usage-log.d.ts.map +0 -1
  186. package/dist/core/skill-usage-log.js +0 -125
  187. package/dist/core/skill-usage-log.js.map +0 -1
  188. package/dist/core/verifier.d.ts +0 -40
  189. package/dist/core/verifier.d.ts.map +0 -1
  190. package/dist/core/verifier.js +0 -206
  191. package/dist/core/verifier.js.map +0 -1
  192. package/dist/mcp/launcher.d.ts +0 -3
  193. package/dist/mcp/launcher.d.ts.map +0 -1
  194. package/dist/mcp/launcher.js +0 -37
  195. package/dist/mcp/launcher.js.map +0 -1
  196. package/scripts/hooks/pre-bash-orchestration-nudge.js +0 -155
  197. package/scripts/postinstall-rebuild.mjs +0 -41
  198. package/skills/agentic-orchestration/SKILL.md +0 -399
package/README.ko.md CHANGED
@@ -117,7 +117,7 @@ Claude Code를 사용한다면 CLI 안에서 MeMesh를 플러그인으로 설치
117
117
  /plugin install memesh@pcircle-memesh
118
118
  ```
119
119
 
120
- Claude Code가 훅, 스킬, MCP 서버를 자동으로 연결합니다. 세션 내 자동 캡처, 능동적 회상, Claude Code 대화 내 `/memesh` 스킬(remember / recall / learn / forget), 그리고 에이전트가 사용할 수 있는 MCP 도구 `remember` / `recall` / `forget` / `learn`을 모두 얻을 수 있습니다. CLI와 로컬 대시보드도 추가 글로벌 설치 없이 완전히 접근 가능합니다 — `npx @pcircle/memesh <command>`로 모든 CLI 명령을 실행하고, `npx @pcircle/memesh`로 `localhost:3737`의 대시보드를 시작합니다. MCP 서버는 플러그인에 번들된 컴파일 결과물에서 직접 실행됩니다 — `npx` 조회, `npm install -g`, 빌드 단계가 모두 필요 없습니다. 시작 `better-sqlite3` 네이티브 바인딩이 없는 경우(예: Node 메이저 버전 업그레이드 이후), 런처가 프로세스 내에서 자동으로 재빌드한 뒤 실행을 이어갑니다.
120
+ Claude Code가 훅, 스킬, MCP 서버를 자동으로 연결합니다. 세션 내 자동 캡처, 능동적 회상, Claude Code 대화 내 `/memesh` 스킬(remember / recall / learn / forget), 그리고 에이전트가 사용할 수 있는 MCP 도구 `remember` / `recall` / `forget` / `learn`을 모두 얻을 수 있습니다. CLI와 로컬 대시보드도 추가 글로벌 설치 없이 완전히 접근 가능합니다 — `npx @pcircle/memesh <command>`로 모든 CLI 명령을 실행하고, `npx @pcircle/memesh`로 `localhost:3737`의 대시보드를 시작합니다. MCP 서버는 플러그인에 번들된 컴파일 결과물에서 직접 실행됩니다 — `npx` 조회, `npm install -g`, 빌드 단계가 모두 필요 없습니다. memesh는 Node에 내장된 `node:sqlite`(22.13+)에 데이터를 저장하므로, Node 업그레이드해도 잘못된 런타임용으로 빌드된 바이너리가 남지 않습니다.
121
121
 
122
122
  ### 옵션 B — npm 글로벌 (선택적 최적화)
123
123
 
@@ -128,8 +128,8 @@ npm install -g @pcircle/memesh
128
128
  ```
129
129
 
130
130
  > **첫 설치 안내(일회성):**
131
- > - **네이티브 모듈** — `better-sqlite3`와 `sqlite-vec`는 macOS(arm64/x64), Linux(x64/arm64), Windows x64에서 사전 빌드 바이너리로 설치됩니다. 흔치 않은 플랫폼이거나 사전 빌드가 실패하는 경우 작동하는 C/C++ 툴체인이 필요합니다.
132
- > - **임베딩 모델**로컬 임베딩을 트리거하는 호출(예: 시맨틱 모드의 `recall`)이 `Xenova/all-MiniLM-L6-v2`(~80 MB)를 `~/.memesh/models/`에 다운로드합니다. 이후 호출은 즉시 실행됩니다. 기본 검색 경로(FTS5)는 다운로드가 필요하지 않습니다.
131
+ > - **컴파일러가 필요 없습니다** 데이터베이스 엔진은 Node 자체의 `node:sqlite`입니다. 의미 기반 검색을 담당하는 `sqlite-vec`는 macOS(arm64/x64), Linux(x64/arm64), Windows x64 사전 빌드 파일로 제공됩니다. 플랫폼에서는 그냥 없으며, 회상은 키워드 검색으로 유지됩니다. 여기에는 설치 스크립트를 실행하는 것이 전혀 없으므로 `npm install --ignore-scripts`로도 완전히 동작하는 memesh가 설치됩니다.
132
+ > - **시맨틱 검색은 선택 사항** 기본 검색 경로는 키워드 검색(FTS5)으로, 모델도 다운로드도 필요 없습니다. 의미 기반 검색에는 임베더가 필요합니다: 로컬에서 [Ollama](https://ollama.com)를 실행하거나 클라우드 임베더를 구성하세요(아래 "임베딩" 참조). 없으면 memesh키워드 검색만 사용합니다.
133
133
 
134
134
  ### 1.5단계: MeMesh를 Claude Code에 연결 (npm 경로만)
135
135
 
@@ -261,13 +261,12 @@ memesh export-schema \
261
261
 
262
262
  ## Claude Code에서 자동으로 일어나는 일
263
263
 
264
- 모든 것을 수동으로 기억할 필요는 없습니다. MeMesh는 작업 중에 지식을 캡처하고 주입하는 **7가지 훅**이 있습니다:
264
+ 모든 것을 수동으로 기억할 필요는 없습니다. MeMesh는 작업 중에 지식을 캡처하고 주입하는 **6가지 훅**이 있습니다:
265
265
 
266
266
  | 시점 | MeMesh가 수행하는 작업 |
267
267
  |------|---|
268
268
  | **매 세션 시작** | 가장 관련 있는 메모리 + 과거 교훈의 사전 경고 로드 |
269
269
  | **파일 편집 전** | Claude가 코드를 작성하기 전에 파일 또는 프로젝트와 연결된 메모리 회상 |
270
- | **Bash 명령 전** | (옵트인) Claude가 높은 검증 가능성의 명령어(테스트, 빌드, 린트, 마이그레이션, 배포, 벤치마크)를 백그라운드 에이전트로 실행하도록 유도 |
271
270
  | **기억 요청 시** | "remember this" / "guardar en memesh" / "sauvegarder dans memesh" / "記下來" 의도(5개 언어)를 감지하고 Claude가 memesh를 사용하도록 알림 |
272
271
  | **모든 `git commit` 후** | 변경 사항을 diff 통계와 함께 기록 |
273
272
  | **Claude가 멈출 때** | 편집된 파일, 수정된 에러, 실패로부터 자동 생성된 구조화된 교훈 캡처 |
@@ -285,8 +284,7 @@ memesh export-schema \
285
284
  |---|---|---|
286
285
  | `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | SQLite 데이터베이스 위치를 재정의합니다. |
287
286
  | `MEMESH_AUTO_CAPTURE` | `true` | 자동 캡처 훅(`Stop`, `PreCompact`)을 완전히 비활성화합니다. |
288
- | `MEMESH_AUTO_DETECT_LLM` | 미설정(자동 감지 **켜짐**) | `0`으로 설정하면 memesh가 셸 환경에서 발견한 API 키를 사용하지 않습니다. 기본적으로 `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST`가 설정되어 있고 `~/.memesh/config.json`에 프로바이더를 구성하지 않았다면, memesh는 쓰기 측 LLM 기능(통합, 교훈 추출, 자동 태깅, dream)에 이를 사용합니다. 임베딩은 영향을 받지 않습니다 — `embedder.provider`를 명시적으로 설정하지 않는 한 로컬 ONNX(384차원) 유지됩니다. |
289
- | `MEMESH_ENABLE_AGENTIC_ORCHESTRATION` | unset | `1`로 설정하면 실험적 작업 모델 프로토콜(CTO / Orchestrator / Agents 프레이밍)을 활성화합니다. 세션 시작 배너, Bash 명령 nudge, `verify_agent_work` 텔레메트리를 추가합니다. 이 프로토콜의 효과는 측정 중이며 아직 입증되지 않았습니다 — 참여하려면 옵트인하세요. **기본값은 OFF**: 코어 메모리 기능은 이 플래그 없이도 작동합니다. |
287
+ | `MEMESH_AUTO_DETECT_LLM` | 미설정(자동 감지 **켜짐**) | `0`으로 설정하면 memesh가 셸 환경에서 발견한 API 키를 사용하지 않습니다. 기본적으로 `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST`가 설정되어 있고 `~/.memesh/config.json`에 프로바이더를 구성하지 않았다면, memesh는 쓰기 측 LLM 기능(통합, 교훈 추출, 자동 태깅, dream)에 이를 사용합니다. 임베딩은 영향을 받지 않습니다 — `embedder.provider`를 `ollama` 또는 `openai`로 명시하지 않는 한 키워드 전용(FTS5)으로 유지됩니다. |
290
288
  | `MEMESH_AUTO_UPDATE` | `off` | 자동 업데이트 정책. `off`(기본값)는 자동 업데이트하지 않습니다; `patch`는 `X.Y.Z → X.Y.Z+N`을 허용합니다; `minor`는 `X.Y.Z → X.Y+1.0`을 추가합니다; `major`는 모든 bump를 허용합니다. 허용된 경우, 분리된 `npm install -g`가 세션 종료 시(Stop 훅) 실행되어 작업을 차단하지 않습니다 — 결과는 `~/.memesh/auto-update.log`에 기록됩니다. `~/.memesh/config.json`에서도 `autoUpdate`로 설정 가능합니다(env가 우선). 설치된 버전이 메인테이너에 의해 deprecated된 경우(보안 권고), `off`에서도 `patch`가 강제 허용됩니다 — minor / major bump는 조용한 동작 변화를 피하기 위해 수동으로 유지됩니다. |
291
289
  | `OPENAI_API_KEY` | 미설정 | OpenAI 키. `MEMESH_AUTO_DETECT_LLM=0`을 설정하거나 프로바이더를 명시적으로 구성하지 않는 한 LLM 기능에 자동으로 사용됩니다. |
292
290
  | `OLLAMA_HOST` | `http://localhost:11434` | 로컬 Ollama 프로바이더를 사용할 때 Ollama 엔드포인트를 재정의합니다. |
@@ -295,6 +293,8 @@ memesh export-schema \
295
293
 
296
294
  npm이 설치된 버전을 deprecated로 플래그하면(일반적으로 보안 권고), 다음 세션 시작 시 강력한 `⚠️ MeMesh <ver> is DEPRECATED` 배너가 앞에 추가되고, 업그레이드할 때까지 `memesh update-status`가 동일한 라인을 표시합니다. 일시적인 네트워크 실패가 경고를 흐리지 않도록 검사가 `~/.memesh/update-check.<version>.json`에 캐시됩니다.
297
295
 
296
+ **폴백 LLM 제공자(Smart Mode).** dashboard의 **Settings → “Fallback providers”**에서 순서가 있는 페일오버 체인을 설정할 수 있습니다 — 기본 제공자가 다운되면 memesh가 목록의 다음 것을 차례로 시도합니다. 로컬 [Ollama](https://ollama.com) 폴백이나 클라우드(OpenAI / Anthropic, API 키 필요)를 추가하세요. 프라이버시 트레이드오프: 클라우드 폴백이 사용되면 메모리 텍스트(비공개일 수 있음)가 해당 제공자로 전송되므로, 프라이버시를 위해 로컬 전용으로 운영한다면 유의하세요.
297
+
298
298
  ---
299
299
 
300
300
  ## 대시보드
@@ -316,7 +316,7 @@ npm이 설치된 버전을 deprecated로 플래그하면(일반적으로 보안
316
316
 
317
317
  ## 스마트 기능
318
318
 
319
- **🧠 스마트 검색** — FTS5 + sqlite-vec사용해 모든 메모리에서 즉시 검색.패스에 LLM이 없어 LongMemEval-S에서 R@5 95.60% 달성.
319
+ **🧠 스마트 검색** — "login security"검색하면 "OAuth PKCE"에 대한 메모리를 찾습니다. MeMesh는 패스에서 FTS5 + sqlite-vec를 사용하며(LLM-free), 벡터 보완이 관련된 표현까지 도달합니다.
320
320
 
321
321
  **🌏 띄어쓰기를 하지 않는 문자 검색** — 중국어, 일본어, 한국어, 태국어, 라오어, 크메르어, 반각 가타카나는 인접한 두 글자 묶음으로 색인됩니다. 따라서 「資料庫遷移前一定要先備份」으로 저장한 기억은 전체 문장을 그대로 입력하지 않아도 「備份」으로 찾을 수 있습니다. 저장할 때와 검색할 때 모두 NFC 정규화를 거치므로, macOS나 한국어·베트남어 IME로 입력한 기억도 어느 쪽 표기로든 찾을 수 있습니다.
322
322
 
@@ -361,16 +361,18 @@ memesh config set llm.api-key sk-ant-...
361
361
  memesh serve # 대시보드 열기 → Settings 탭
362
362
  ```
363
363
 
364
+ **과거 세션을 메모리로 캐내기.** `memesh dream run --from-transcripts`는 이 프로젝트의 Claude Code 세션 기록을 읽고, 대화에 묻힌 결정과 교훈을 LLM에게 물어 제안으로 스테이징합니다 — 지식 그래프에는 자동으로 들어가지 않습니다. `memesh dream show <id>`로 하나씩 검토하고 남길 가치가 있는 것을 accept하세요.
365
+
364
366
  ### 자체 임베딩 사용 (선택)
365
367
 
366
- 임베딩은 기본적으로 로컬 ONNX 모델(`Xenova/all-MiniLM-L6-v2`, 384차원)을 사용합니다 — API 키 불필요, 데이터가 기기를 벗어나지 않으며, 기본 FTS5 리콜은 아예 필요하지 않습니다. 호스팅형 또는 로컬 서버 임베더를 쓰려면:
368
+ 기본적으로 MeMesh는 **키워드 전용** 리콜(FTS5)을 수행합니다 — API 키 불필요, 모델 다운로드 불필요, 데이터가 기기를 벗어나지 않습니다. 시맨틱(의미 기반) 검색은 선택 사항이며 임베더가 필요합니다. 하나를 구성하세요:
367
369
 
368
370
  ```bash
369
371
  memesh config set embedder.provider openai # or: ollama
370
372
  memesh config set embedder.model text-embedding-3-small
371
373
  ```
372
374
 
373
- 임베더는 **채팅 LLM과 독립적으로** 구성됩니다 — `llm.provider`를 바꿔도 임베딩이 조용히 바뀌지 않습니다. 다른 차원(예: 384 → 1536)으로 전환하면 MeMesh가 다음 쓰기 시 벡터 인덱스를 자동으로 재구축합니다. 지원되는 `embedder.provider`: `onnx`(기본, 로컬), `openai`, `ollama`.
375
+ 임베더는 **채팅 LLM과 독립적으로** 구성됩니다 — `llm.provider`를 바꿔도 임베딩이 조용히 바뀌지 않습니다. 다른 차원(예: 768 → 1536)으로 전환하면 MeMesh가 다음 쓰기 시 벡터 인덱스를 자동으로 재구축합니다. 지원되는 `embedder.provider`: `ollama`(로컬), `openai`(호스팅형). 둘 다 없으면 리콜은 키워드 검색으로 유지됩니다.
374
376
 
375
377
  | | Level 0 (기본) | Level 1 (스마트 모드) |
376
378
  |---|---|---|
@@ -383,7 +385,7 @@ memesh config set embedder.model text-embedding-3-small
383
385
 
384
386
  ---
385
387
 
386
- ## 9가지 메모리 도구 전체
388
+ ## 7가지 메모리 도구 전체
387
389
 
388
390
  | 도구 | 역할 |
389
391
  |---|---|
@@ -394,7 +396,6 @@ memesh config set embedder.model text-embedding-3-small
394
396
  | `import` | 병합 전략(스킵/덮어쓰기/추가)이 있는 메모리 임포트 |
395
397
  | `learn` | 실수로부터 구조화된 교훈 기록(에러, 근본 원인, 수정, 예방) |
396
398
  | `user_patterns` | 작업 패턴 분석 — 일정, 도구, 강점, 학습 영역 |
397
- | `verify_agent_work` | 백그라운드 에이전트 작업에 대한 검증 보고서 유지; 청구된 파일 변경사항을 `git diff`와 현실 확인 |
398
399
 
399
400
  ---
400
401
 
@@ -403,7 +404,7 @@ memesh config set embedder.model text-embedding-3-small
403
404
  ```
404
405
  ┌─────────────────┐
405
406
  │ Core Engine │
406
- │ (8 operations) │
407
+ │ (7 operations) │
407
408
  └────────┬────────┘
408
409
  ┌─────────────────┼─────────────────┐
409
410
  │ │ │
package/README.md CHANGED
@@ -84,7 +84,7 @@ flowchart TB
84
84
  | Get auto-capture (sessions → lessons → recall) in Claude Code | Path A (plugin) |
85
85
  | Run `memesh remember` / `memesh recall` / `memesh doctor` in any terminal | Path B (npm-global) |
86
86
  | Open the local dashboard via `memesh serve` (no `npx` lookup delay) | Path B (npm-global) |
87
- | Plug `memesh-mcp` into Cursor, Cline, or another MCP client | Path B (npm-global) |
87
+ | Plug `memesh-mcp` into Codex CLI, Gemini CLI, Cursor, or another MCP client | Path B (npm-global) |
88
88
  | All of the above | **Install both** — they don't conflict |
89
89
 
90
90
  ### ⚠️ Installing the plugin does NOT install the CLI
@@ -117,21 +117,21 @@ If you use Claude Code, install MeMesh as a plugin from inside the CLI:
117
117
 
118
118
  Claude Code wires hooks, skills, and the MCP server automatically. You get in-session auto-capture, proactive recall, the `/memesh` skill (remember / recall / learn / forget) inside the Claude Code conversation, and `remember` / `recall` / `forget` / `learn` available as MCP tools to the agent.
119
119
 
120
- The MCP server runs directly from the plugin's bundled compiled output — no `npx` lookup, no build step needed. If the native `better-sqlite3` binding is missing on first start (e.g. after a Node major upgrade), the launcher self-heals by rebuilding it in-process.
120
+ The MCP server runs directly from the plugin's bundled compiled output — no `npx` lookup, no build step, and nothing to compile. memesh stores its data through `node:sqlite`, which is part of Node itself (22.13+), so a Node upgrade cannot leave it with a binary built for the wrong runtime.
121
121
 
122
122
  > **This installs the plugin only.** You can run CLI commands via `npx @pcircle/memesh <command>` if you absolutely don't want a global install, but typing plain `memesh` in a terminal will report `command not found`. To get a real shell `memesh` command, also run **Option B** below — both paths coexist and share the same memory database. The "Install paths at a glance" diagram above covers this.
123
123
 
124
124
  ### Option B — npm global (optional optimisation)
125
125
 
126
- If you want the binary directly on your shell `PATH` (so plain `memesh`, `memesh-mcp`, etc. work in any terminal without the per-call `npx` lookup), or you want to expose `memesh-mcp` as a fixed-path stdio command to **non-Claude-Code MCP clients** (Cursor, Cline, terminal-only flows):
126
+ If you want the binary directly on your shell `PATH` (so plain `memesh`, `memesh-mcp`, etc. work in any terminal without the per-call `npx` lookup), or you want to expose `memesh-mcp` as a fixed-path stdio command to **non-Claude-Code MCP clients** (Codex CLI, Gemini CLI, Cursor, Cline, terminal-only flows):
127
127
 
128
128
  ```bash
129
129
  npm install -g @pcircle/memesh
130
130
  ```
131
131
 
132
132
  > **First-install notes (one-time):**
133
- > - **Native modules** — `better-sqlite3` and `sqlite-vec` install via prebuilt binaries on macOS (arm64/x64), Linux (x64/arm64), and Windows x64. On uncommon platforms or when prebuilds fail, you'll need a working C/C++ toolchain.
134
- > - **Embedding model** — the first call that triggers a local embedding (e.g. `recall` with semantic mode) downloads `Xenova/all-MiniLM-L6-v2` (~80 MB) into `~/.memesh/models/`. Subsequent calls are instant. The default retrieval path (FTS5) does not require this download.
133
+ > - **No compiler needed** — the database engine is Node's own `node:sqlite`. `sqlite-vec`, which adds meaning-based search, ships as a prebuilt file for macOS (arm64/x64), Linux (x64/arm64) and Windows x64; on any other platform it is simply absent and recall stays on keyword search. Nothing here runs an install script, so `npm install --ignore-scripts` installs a fully working memesh.
134
+ > - **Semantic (meaning-based) search is optional** — the default recall path is FTS5 keyword search, which needs no model and no download. Meaning-based search needs an embedder: run [Ollama](https://ollama.com) locally, or configure a cloud embedder (see "Bring-your-own embeddings" below). Without one, memesh uses keyword search only.
135
135
 
136
136
  ### Step 1.5: Wire MeMesh into Claude Code (npm path only)
137
137
 
@@ -146,6 +146,27 @@ memesh doctor # verifies "Hooks wired into Claude Code" passes
146
146
 
147
147
  The hooks coexist with any custom hooks you already have under `~/.claude/hooks/` — `install-hooks` writes additive entries and never overwrites yours. To remove later: `memesh uninstall-hooks`.
148
148
 
149
+ ### Same memory from Codex CLI and Gemini CLI
150
+
151
+ `memesh-mcp` is a plain stdio MCP server, so any MCP-capable host can talk to it — not just Claude Code. With Option B installed (`memesh-mcp` on your `PATH`), register it once per host:
152
+
153
+ ```bash
154
+ # OpenAI Codex CLI — writes [mcp_servers.memesh] into ~/.codex/config.toml
155
+ codex mcp add memesh -- memesh-mcp
156
+
157
+ # Google Gemini CLI — user scope, so it works in every folder
158
+ gemini mcp add -s user memesh memesh-mcp
159
+ ```
160
+
161
+ Every host reads and writes the same `~/.memesh/knowledge-graph.db`, so a memory stored from a Claude Code session is recallable from Codex or Gemini, and the other way around. Verify from either host by asking it to call the `recall` tool, or from a terminal:
162
+
163
+ ```bash
164
+ codex mcp list # memesh should be listed as enabled
165
+ gemini mcp list # memesh should show "Connected"
166
+ ```
167
+
168
+ > **Use `memesh-mcp`, not `npx -p @pcircle/memesh`, as the configured command.** `npx -p` resolves to the *local* package whenever the host's working directory is inside a checkout of this repository, silently running whatever state that working tree is in instead of the installed release.
169
+
149
170
  ### Step 2: Store a decision
150
171
 
151
172
  > The bash examples below assume `memesh` is on your `PATH` (Option B). Option A (plugin-only) users have two equivalent paths: ask in the Claude Code conversation (the `/memesh` skill + MCP tools cover the same flows), or replace `memesh` with `npx @pcircle/memesh` in any shell — same flags, no global install needed.
@@ -263,13 +284,12 @@ Paste tools into any API call
263
284
 
264
285
  ## What Happens Automatically In Claude Code
265
286
 
266
- You don't need to manually remember everything. MeMesh has **7 hooks** that capture and inject knowledge while you work:
287
+ You don't need to manually remember everything. MeMesh has **6 hooks** that capture and inject knowledge while you work:
267
288
 
268
289
  | When | What MeMesh does |
269
290
  |------|------------------|
270
291
  | **Every session start** | Loads your most relevant memories + proactive warnings from past lessons |
271
292
  | **Before editing files** | Recalls memories tied to the file or project before Claude writes code |
272
- | **Before bash commands** | (Opt-in) Nudges Claude to dispatch high-verifiability commands (test, build, lint, migrate, deploy, benchmark) as background agents |
273
293
  | **When you ask to remember** | Detects "remember this" / "guardar en memesh" / "sauvegarder dans memesh" / "記下來" intent (5 languages) and reminds Claude to use memesh |
274
294
  | **After every `git commit`** | Records what you changed, with diff stats |
275
295
  | **When Claude stops** | Captures files edited, errors fixed, and auto-generates structured lessons from failures |
@@ -287,14 +307,15 @@ All configuration is via environment variables. Defaults are local-only and zero
287
307
  |---|---|---|
288
308
  | `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | Override the SQLite database location. |
289
309
  | `MEMESH_AUTO_CAPTURE` | `true` | Disable the auto-capture hooks (`Stop`, `PreCompact`) entirely. |
290
- | `MEMESH_AUTO_DETECT_LLM` | unset (auto-detect **on**) | Set to `0` to stop memesh using an API key it finds in your shell env. By default, if `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` is set and you have not configured a provider in `~/.memesh/config.json`, memesh uses it for write-side LLM features (lesson extraction, auto-tagging, dream). Embeddings are unaffected — they stay local ONNX (384-dim) unless you explicitly set `embedder.provider`. |
291
- | `MEMESH_ENABLE_AGENTIC_ORCHESTRATION` | unset | Set to `1` to enable an experimental working-model protocol (CTO / Orchestrator / Agents framing). Adds a session-start banner, a Bash command nudge, and `verify_agent_work` telemetry. The protocol's effectiveness is being instrumented, not yet proven — opt in if you want to participate. **Default is OFF**: the core memory features work without this flag. |
310
+ | `MEMESH_AUTO_DETECT_LLM` | unset (auto-detect **on**) | Set to `0` to stop memesh using an API key it finds in your shell env. By default, if `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` is set and you have not configured a provider in `~/.memesh/config.json`, memesh uses it for write-side LLM features (lesson extraction, auto-tagging, dream). Embeddings are unaffected — they stay keyword-only (FTS5) unless you explicitly set `embedder.provider` to `ollama` or `openai`. |
292
311
  | `MEMESH_AUTO_UPDATE` | `off` | Auto-update policy. `off` (default) never auto-updates; `patch` allows `X.Y.Z → X.Y.Z+N`; `minor` adds `X.Y.Z → X.Y+1.0`; `major` allows any bump. When permitted, a detached `npm install -g` fires at session end (Stop hook) so it never blocks your work — outcomes land in `~/.memesh/auto-update.log`. Also settable as `autoUpdate` in `~/.memesh/config.json` (env wins). When the installed version is deprecated by maintainers (security advisory), `patch` is force-allowed even on `off` — minor / major bumps still stay manual to avoid silent behaviour drift. |
293
312
  | `OPENAI_API_KEY` | unset | Your OpenAI key. Used automatically for LLM features unless you set `MEMESH_AUTO_DETECT_LLM=0` or configure a provider explicitly. |
294
313
  | `OLLAMA_HOST` | `http://localhost:11434` | Override the Ollama endpoint when using a local Ollama provider. |
295
314
 
296
315
  `memesh doctor` prints the resolved configuration so you can see what's active.
297
316
 
317
+ **Fallback LLM providers (Smart Mode).** In the dashboard **Settings → "Fallback providers"** you can set an ordered failover chain — memesh tries each provider in turn when your primary is down. Add a local [Ollama](https://ollama.com) fallback, or a cloud one (OpenAI / Anthropic, with an API key). Privacy tradeoff: when a cloud fallback is used, memory text — which can be private — is sent to that provider, so it matters if you run local-only for privacy.
318
+
298
319
  When npm flags an installed version as deprecated (typically a security advisory), the next session-start prepends a strong `⚠️ MeMesh <ver> is DEPRECATED` banner and `memesh update-status` surfaces the same line until you upgrade. The check is cached at `~/.memesh/update-check.<version>.json` so a transient network failure can't dim the warning.
299
320
 
300
321
  ---
@@ -363,16 +384,21 @@ Or use the dashboard Settings tab (visual setup):
363
384
  memesh serve # opens dashboard → Settings tab
364
385
  ```
365
386
 
366
- ### Bring-your-own embeddings (optional)
387
+ **Mine your past sessions into memory.** `memesh dream run --from-transcripts` reads this project's Claude Code session transcripts, asks the LLM for the decisions and lessons buried in the conversation, and stages them as proposals — nothing enters your graph automatically. Review each with `memesh dream show <id>` and accept the ones worth keeping. To run it on a schedule, enable `memesh config set transcriptMining true` and point a cron/launchd entry at `memesh dream run --from-transcripts --if-due` — it self-throttles (default once every 24h per project) and stays staging-only. See [API_REFERENCE](docs/api/API_REFERENCE.md#memesh-dream).
388
+
389
+ ### Semantic search / embeddings (optional)
367
390
 
368
- Embeddings default to a local ONNX model (`Xenova/all-MiniLM-L6-v2`, 384-dim) — no API key, nothing leaves your machine, and the default FTS5 recall path doesn't need them at all. To use a hosted or local-server embedder instead:
391
+ By default MeMesh does **keyword-only** recall (FTS5) — no API key, no model download, nothing leaves your machine. Semantic (meaning-based) search is opt-in and needs an embedder. Point one of these at it:
369
392
 
370
393
  ```bash
371
- memesh config set embedder.provider openai # or: ollama
394
+ memesh config set embedder.provider ollama # local, needs `ollama serve`
395
+ memesh config set embedder.model nomic-embed-text
396
+ # or, for a hosted embedder:
397
+ memesh config set embedder.provider openai
372
398
  memesh config set embedder.model text-embedding-3-small
373
399
  ```
374
400
 
375
- The embedder is configured **independently of the chat LLM** — changing `llm.provider` never silently changes your embeddings. If you switch to an embedder with a different dimension (e.g. 384 → 1536), MeMesh rebuilds the vector index automatically on the next write. Supported `embedder.provider` values: `onnx` (default, local), `openai`, `ollama`.
401
+ The embedder is configured **independently of the chat LLM** — changing `llm.provider` never silently changes your embeddings. If you switch to an embedder with a different dimension (e.g. 768 → 1536), MeMesh rebuilds the vector index automatically on the next write. Supported `embedder.provider` values: `ollama` (local), `openai` (hosted). With none set, recall stays on keyword search.
376
402
 
377
403
  | | Level 0 (default) | Level 1 (Smart Mode) |
378
404
  |---|---|---|
@@ -385,7 +411,7 @@ The embedder is configured **independently of the chat LLM** — changing `llm.p
385
411
 
386
412
  ---
387
413
 
388
- ## All 9 Memory Tools
414
+ ## All 7 Memory Tools
389
415
 
390
416
  | Tool | What it does |
391
417
  |------|-------------|
@@ -396,7 +422,6 @@ The embedder is configured **independently of the chat LLM** — changing `llm.p
396
422
  | `import` | Import memories with merge strategies (skip / overwrite / append) |
397
423
  | `learn` | Record structured lessons from mistakes (error, root cause, fix, prevention) |
398
424
  | `user_patterns` | Analyze your work patterns — schedule, tools, strengths, learning areas |
399
- | `verify_agent_work` | Persist a verification report for background-agent work; reality-checks claimed file changes against `git diff` |
400
425
 
401
426
  ---
402
427
 
@@ -405,7 +430,7 @@ The embedder is configured **independently of the chat LLM** — changing `llm.p
405
430
  ```
406
431
  ┌─────────────────┐
407
432
  │ Core Engine │
408
- │ (8 operations) │
433
+ │ (7 operations) │
409
434
  └────────┬────────┘
410
435
  ┌─────────────────┼─────────────────┐
411
436
  │ │ │
package/README.pt.md CHANGED
@@ -108,7 +108,20 @@ Se você só usa memesh pelo chat do Claude Code (nunca digita `memesh` num term
108
108
 
109
109
  ## Comece em 60 Segundos
110
110
 
111
- ### Passo 1: Instale
111
+ ### Opção A — Plugin do Claude Code (instalação em uma linha)
112
+
113
+ Se você usa o Claude Code, instale o MeMesh como plugin de dentro da CLI:
114
+
115
+ ```
116
+ /plugin marketplace add PCIRCLE-AI/memesh-llm-memory
117
+ /plugin install memesh@pcircle-memesh
118
+ ```
119
+
120
+ O Claude Code conecta hooks, skills e o servidor MCP automaticamente. Você ganha auto-captura em sessão, recall proativo, o skill `/memesh` na conversa e `remember` / `recall` / `forget` / `learn` como ferramentas MCP para o agente.
121
+
122
+ ### Opção B — npm global (otimização opcional)
123
+
124
+ Se quiser o binário direto no seu `PATH` (para que `memesh` funcione em qualquer terminal sem o atraso do `npx`), ou expor `memesh-mcp` como comando stdio de caminho fixo para clientes MCP fora do Claude Code (Cursor, Cline):
112
125
 
113
126
  ```bash
114
127
  npm install -g @pcircle/memesh
@@ -127,6 +140,12 @@ Os hooks coexistem com qualquer hook customizado em `~/.claude/hooks/` — `inst
127
140
 
128
141
  ### Passo 2: Armazene uma decisão
129
142
 
143
+ ```bash
144
+ memesh remember "Use OAuth 2.0 with PKCE for the new auth"
145
+ ```
146
+
147
+ Ou use a forma explícita quando quiser um nome e um tipo estáveis para filtrar depois:
148
+
130
149
  ```bash
131
150
  memesh remember --name "auth-decision" --type "decision" --obs "Use OAuth 2.0 with PKCE"
132
151
  ```
@@ -234,13 +253,12 @@ Cole as ferramentas em qualquer chamada de API
234
253
 
235
254
  ## O Que Acontece Automaticamente no Claude Code
236
255
 
237
- Você não precisa lembrar tudo manualmente. MeMesh tem **7 hooks** que capturam e injetam conhecimento enquanto você trabalha:
256
+ Você não precisa lembrar tudo manualmente. MeMesh tem **6 hooks** que capturam e injetam conhecimento enquanto você trabalha:
238
257
 
239
258
  | Quando | O que MeMesh faz |
240
259
  |------|------------------|
241
260
  | **Início de cada sessão** | Carrega suas memórias mais relevantes + alertas proativos de lições passadas + banner de orquestração de agentes |
242
261
  | **Antes de editar arquivos** | Recupera memórias vinculadas ao arquivo ou projeto antes de Claude escrever código |
243
- | **Antes de comandos bash** | Incentiva Claude a despachar comandos de alta verificabilidade (test, build, lint, migrate, deploy, benchmark) como agentes de background |
244
262
  | **Quando você pede para lembrar** | Detecta intenção "remember this" / "記下來" e lembra Claude de escrever dual (memesh + MEMORY.md) |
245
263
  | **Depois de cada `git commit`** | Registra o que você mudou, com estatísticas de diff |
246
264
  | **Quando Claude para** | Captura arquivos editados, erros corrigidos e gera automaticamente lições estruturadas de falhas |
@@ -258,14 +276,15 @@ Toda a configuração é feita por variáveis de ambiente. Os padrões são loca
258
276
  |---|---|---|
259
277
  | `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | Sobrescreve a localização do banco SQLite. |
260
278
  | `MEMESH_AUTO_CAPTURE` | `true` | Desativa completamente os hooks de auto-captura (`Stop`, `PreCompact`). |
261
- | `MEMESH_AUTO_DETECT_LLM` | não definido (autodetecção **ligada**) | Defina como `0` para que o memesh NÃO use uma chave de API encontrada no ambiente do shell. Por padrão, se `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` estiver definida e você não tiver configurado um provedor em `~/.memesh/config.json`, o memesh a usa para as funções LLM de escrita (consolidação, extração de lições, autotagging, dream). Os embeddings não são afetados — permanecem em ONNX local (384-dim) a menos que você defina `embedder.provider` explicitamente. |
262
- | `MEMESH_ENABLE_AGENTIC_ORCHESTRATION` | unset | Defina como `1` para habilitar um protocolo experimental de modelo de trabalho (enquadramento CTO / Orchestrator / Agents). Adiciona um banner de início de sessão, um nudge para comandos Bash e telemetria `verify_agent_work`. A eficácia do protocolo está sendo instrumentada, ainda não comprovada — opte se quiser participar. **Padrão é OFF**: as funcionalidades de memória core funcionam sem essa flag. |
279
+ | `MEMESH_AUTO_DETECT_LLM` | não definido (autodetecção **ligada**) | Defina como `0` para que o memesh NÃO use uma chave de API encontrada no ambiente do shell. Por padrão, se `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` estiver definida e você não tiver configurado um provedor em `~/.memesh/config.json`, o memesh a usa para as funções LLM de escrita (consolidação, extração de lições, autotagging, dream). Os embeddings não são afetados — permanecem apenas por palavras-chave (FTS5) a menos que você defina `embedder.provider` como `ollama` ou `openai`. |
263
280
  | `MEMESH_AUTO_UPDATE` | `off` | Política de auto-update. `off` (padrão) nunca faz auto-update; `patch` permite `X.Y.Z → X.Y.Z+N`; `minor` adiciona `X.Y.Z → X.Y+1.0`; `major` permite qualquer bump. Quando permitido, um `npm install -g` desanexado dispara no fim da sessão (hook Stop) para nunca bloquear seu trabalho — os resultados aparecem em `~/.memesh/auto-update.log`. Também configurável como `autoUpdate` em `~/.memesh/config.json` (env vence). Quando a versão instalada é depreciada pelos mantenedores (advisory de segurança), `patch` é forçado mesmo em `off` — bumps minor / major continuam manuais para evitar drift silencioso de comportamento. |
264
281
  | `OPENAI_API_KEY` | não definido | Sua chave da OpenAI. Usada automaticamente para as funções LLM a menos que você defina `MEMESH_AUTO_DETECT_LLM=0` ou configure um provedor explicitamente. |
265
282
  | `OLLAMA_HOST` | `http://localhost:11434` | Sobrescreve o endpoint do Ollama ao usar um provedor Ollama local. |
266
283
 
267
284
  `memesh doctor` imprime a configuração resolvida para você ver o que está ativo.
268
285
 
286
+ **Provedores LLM de fallback (Smart Mode).** No dashboard, em **Settings → “Fallback providers”**, você pode definir uma cadeia de failover ordenada — o memesh tenta cada provedor por vez quando o principal está fora do ar. Adicione um fallback local [Ollama](https://ollama.com), ou um na nuvem (OpenAI / Anthropic, com uma API key). Compromisso de privacidade: quando um fallback na nuvem é usado, o texto da memória — que pode ser privado — é enviado a esse provedor, o que importa se você roda só local por privacidade.
287
+
269
288
  Quando o npm sinaliza uma versão instalada como depreciada (tipicamente um advisory de segurança), o próximo início de sessão antepõe um banner forte `⚠️ MeMesh <ver> is DEPRECATED` e `memesh update-status` mostra a mesma linha até você atualizar. A verificação fica em cache em `~/.memesh/update-check.<version>.json` para que uma falha de rede transitória não atenue o aviso.
270
289
 
271
290
  ---
@@ -334,16 +353,18 @@ Ou use a aba Settings do dashboard (setup visual):
334
353
  memesh serve # abre dashboard → aba Settings
335
354
  ```
336
355
 
356
+ **Minere memória das suas sessões passadas.** `memesh dream run --from-transcripts` lê as transcrições de sessão do Claude Code deste projeto, pede ao LLM as decisões e lições escondidas na conversa e as prepara como propostas — nada entra no seu grafo automaticamente. Revise cada uma com `memesh dream show <id>` e aceite as que valerem a pena.
357
+
337
358
  ### Use seus próprios embeddings (opcional)
338
359
 
339
- Os embeddings usam por padrão um modelo ONNX local (`Xenova/all-MiniLM-L6-v2`, 384-dim) — sem chave de API, nada sai da sua máquina, e o recall FTS5 padrão nem precisa deles. Para usar um embedder hospedado ou de servidor local:
360
+ Por padrão o MeMesh faz recall **apenas por palavras-chave** (FTS5) — sem chave de API, sem download de modelo, nada sai da sua máquina. A busca semântica (por significado) é opcional e precisa de um embedder. Configure um:
340
361
 
341
362
  ```bash
342
363
  memesh config set embedder.provider openai # or: ollama
343
364
  memesh config set embedder.model text-embedding-3-small
344
365
  ```
345
366
 
346
- O embedder é configurado **independentemente do LLM de chat** — mudar `llm.provider` nunca muda seus embeddings silenciosamente. Se você trocar para uma dimensão diferente (ex.: 384 → 1536), o MeMesh reconstrói o índice vetorial automaticamente na próxima escrita. Valores de `embedder.provider` suportados: `onnx` (padrão, local), `openai`, `ollama`.
367
+ O embedder é configurado **independentemente do LLM de chat** — mudar `llm.provider` nunca muda seus embeddings silenciosamente. Se você trocar para uma dimensão diferente (ex.: 768 → 1536), o MeMesh reconstrói o índice vetorial automaticamente na próxima escrita. Valores de `embedder.provider` suportados: `ollama` (local), `openai` (hospedado). Sem nenhum, o recall permanece na busca por palavras-chave.
347
368
 
348
369
  | | Level 0 (padrão) | Level 1 (Smart Mode) |
349
370
  |---|---|---|
@@ -356,7 +377,7 @@ O embedder é configurado **independentemente do LLM de chat** — mudar `llm.pr
356
377
 
357
378
  ---
358
379
 
359
- ## Todas as 9 Ferramentas de Memória
380
+ ## Todas as 7 Ferramentas de Memória
360
381
 
361
382
  | Ferramenta | O que faz |
362
383
  |------|-------------|
@@ -367,7 +388,6 @@ O embedder é configurado **independentemente do LLM de chat** — mudar `llm.pr
367
388
  | `import` | Importa memórias com estratégias de merge (skip / overwrite / append) |
368
389
  | `learn` | Registra lições estruturadas de erros (erro, causa raiz, fix, prevenção) |
369
390
  | `user_patterns` | Analisa seus padrões de trabalho — schedule, ferramentas, pontos fortes, áreas de aprendizado |
370
- | `verify_agent_work` | Persiste um relatório de verificação para trabalho de background-agent; reality-checks mudanças de arquivo declaradas contra `git diff` |
371
391
 
372
392
  ---
373
393
 
@@ -376,7 +396,7 @@ O embedder é configurado **independentemente do LLM de chat** — mudar `llm.pr
376
396
  ```
377
397
  ┌─────────────────┐
378
398
  │ Core Engine │
379
- │ (8 operations) │
399
+ │ (7 operations) │
380
400
  └────────┬────────┘
381
401
  ┌─────────────────┼─────────────────┐
382
402
  │ │ │
package/README.th.md CHANGED
@@ -142,6 +142,12 @@ Hooks เหล่านี้อยู่ร่วมกับ custom hooks ท
142
142
 
143
143
  ### ขั้นตอนที่ 2: เก็บการตัดสินใจ
144
144
 
145
+ ```bash
146
+ memesh remember "Use OAuth 2.0 with PKCE for the new auth"
147
+ ```
148
+
149
+ หรือใช้รูปแบบชัดเจนเมื่อต้องการชื่อและชนิดที่คงที่สำหรับกรองภายหลัง:
150
+
145
151
  ```bash
146
152
  memesh remember --name "auth-decision" --type "decision" --obs "Use OAuth 2.0 with PKCE"
147
153
  ```
@@ -249,13 +255,12 @@ memesh export-schema \
249
255
 
250
256
  ## สิ่งที่เกิดขึ้นโดยอัตโนมัติใน Claude Code
251
257
 
252
- ไม่ต้องจำข้อมูลทุกอย่างด้วยตนเอง MeMesh มี **7 hook** ที่บันทึกและแทรกความรู้ขณะทำงาน:
258
+ ไม่ต้องจำข้อมูลทุกอย่างด้วยตนเอง MeMesh มี **6 hook** ที่บันทึกและแทรกความรู้ขณะทำงาน:
253
259
 
254
260
  | เมื่อ | MeMesh ทำอะไร |
255
261
  |---|---|
256
262
  | **เริ่มเซสชันทุกครั้ง** | โหลดหน่วยความจำที่เกี่ยวข้องมากที่สุด + คำเตือนจากบทเรียนที่ผ่านมา + แบนเนอร์การ orchestrate เอเจนต์ |
257
263
  | **ก่อนแก้ไขไฟล์** | เรียกคืนหน่วยความจำที่เชื่อมโยงกับไฟล์หรือโครงการก่อนที่ Claude เขียนโค้ด |
258
- | **ก่อนคำสั่ง bash** | แนะนำให้ Claude สั่งคำสั่งที่ยืนยันได้สูง (test build lint migrate deploy benchmark) เป็นเอเจนต์พื้นหลัง |
259
264
  | **เมื่อคุณขอให้จำ** | ตรวจจับความตั้งใจ "remember this" / "記下來" และเตือน Claude ให้เขียนแบบสองทาง (memesh + MEMORY.md) |
260
265
  | **หลังทุก `git commit`** | บันทึกสิ่งที่เปลี่ยนแปลง พร้อมสถิติ diff |
261
266
  | **เมื่อ Claude หยุด** | บันทึกไฟล์ที่แก้ไข บั๊กที่แก้ไข และสร้างบทเรียนโครงสร้างจากความล้มเหลวโดยอัตโนมัติ |
@@ -273,14 +278,15 @@ memesh export-schema \
273
278
  |---|---|---|
274
279
  | `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | เปลี่ยนตำแหน่งฐานข้อมูล SQLite |
275
280
  | `MEMESH_AUTO_CAPTURE` | `true` | ปิดการใช้ hook จับข้อมูลอัตโนมัติทั้งหมด (`Stop`, `PreCompact`) |
276
- | `MEMESH_AUTO_DETECT_LLM` | ไม่ได้ตั้งค่า (ตรวจจับอัตโนมัติ **เปิด**) | ตั้งเป็น `0` เพื่อไม่ให้ memesh ใช้คีย์ API ที่พบในสภาพแวดล้อมของเชลล์ โดยค่าเริ่มต้น หากตั้ง `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` ไว้ และคุณยังไม่ได้กำหนดผู้ให้บริการใน `~/.memesh/config.json` memesh จะใช้คีย์นั้นสำหรับฟีเจอร์ LLM ฝั่งเขียน (การสกัดบทเรียน, auto-tagging, dream) ส่วน embeddings ไม่ได้รับผลกระทบ — ยังคงเป็น ONNX ในเครื่อง (384 มิติ) เว้นแต่คุณจะตั้ง `embedder.provider` อย่างชัดเจน |
277
- | `MEMESH_ENABLE_AGENTIC_ORCHESTRATION` | ไม่ตั้ง | ตั้งเป็น `1` เพื่อเปิดใช้โปรโตคอล working-model เชิงทดลอง (กรอบ CTO / Orchestrator / Agents) เพิ่มแบนเนอร์ตอนเริ่มเซสชัน การเตือนคำสั่ง Bash และเทเลเมตรี `verify_agent_work` ประสิทธิผลของโปรโตคอลกำลังถูกเก็บข้อมูล ยังไม่ได้พิสูจน์ — opt-in ถ้าต้องการเข้าร่วม **ค่าเริ่มต้นปิด**: ฟีเจอร์หน่วยความจำหลักทำงานได้โดยไม่ต้องเปิดธงนี้ |
281
+ | `MEMESH_AUTO_DETECT_LLM` | ไม่ได้ตั้งค่า (ตรวจจับอัตโนมัติ **เปิด**) | ตั้งเป็น `0` เพื่อไม่ให้ memesh ใช้คีย์ API ที่พบในสภาพแวดล้อมของเชลล์ โดยค่าเริ่มต้น หากตั้ง `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` ไว้ และคุณยังไม่ได้กำหนดผู้ให้บริการใน `~/.memesh/config.json` memesh จะใช้คีย์นั้นสำหรับฟีเจอร์ LLM ฝั่งเขียน (การสกัดบทเรียน, auto-tagging, dream) ส่วน embeddings ไม่ได้รับผลกระทบ — ยังคงเป็นการค้นหาด้วยคีย์เวิร์ดอย่างเดียว (FTS5) เว้นแต่คุณจะตั้ง `embedder.provider` เป็น `ollama` หรือ `openai` |
278
282
  | `MEMESH_AUTO_UPDATE` | `off` | นโยบายอัปเดตอัตโนมัติ `off` (ค่าเริ่มต้น) ไม่อัปเดตเลย; `patch` อนุญาต `X.Y.Z → X.Y.Z+N`; `minor` เพิ่ม `X.Y.Z → X.Y+1.0`; `major` อนุญาตทุกการเพิ่มเวอร์ชัน เมื่ออนุญาต `npm install -g` แบบ detached จะทำงานเมื่อจบเซสชัน (Stop hook) เพื่อไม่บล็อกงานของคุณ — ผลลัพธ์ลงใน `~/.memesh/auto-update.log` ตั้งใน `~/.memesh/config.json` ผ่านคีย์ `autoUpdate` ก็ได้ (env ชนะ) เมื่อเวอร์ชันที่ติดตั้งถูก deprecate (security advisory) `patch` จะถูกบังคับเปิดแม้ตั้งเป็น `off` — minor / major ยังต้องทำมือเพื่อหลีกเลี่ยงการเปลี่ยนพฤติกรรมเงียบ ๆ |
279
283
  | `OPENAI_API_KEY` | ไม่ได้ตั้งค่า | คีย์ OpenAI ของคุณ ใช้โดยอัตโนมัติสำหรับฟีเจอร์ LLM เว้นแต่คุณจะตั้ง `MEMESH_AUTO_DETECT_LLM=0` หรือกำหนดผู้ให้บริการอย่างชัดเจน |
280
284
  | `OLLAMA_HOST` | `http://localhost:11434` | เปลี่ยนปลายทาง Ollama เมื่อใช้ผู้ให้บริการ Ollama ภายในเครื่อง |
281
285
 
282
286
  `memesh doctor` พิมพ์การตั้งค่าที่ resolve แล้วเพื่อให้คุณเห็นว่าอะไรทำงานอยู่
283
287
 
288
+ **ผู้ให้บริการ LLM สำรอง (Smart Mode)** ใน **Settings → “Fallback providers”** ของ dashboard คุณตั้งลูกโซ่ failover ตามลำดับได้ — เมื่อผู้ให้บริการหลักล่ม memesh จะลองตัวถัดไปในรายการตามลำดับ เพิ่มตัวสำรองแบบโลคัล [Ollama](https://ollama.com) หรือแบบคลาวด์ (OpenAI / Anthropic ต้องมี API key) ก็ได้ ข้อแลกเปลี่ยนด้านความเป็นส่วนตัว: เมื่อใช้ตัวสำรองแบบคลาวด์ ข้อความในหน่วยความจำ (ซึ่งอาจเป็นข้อมูลส่วนตัว) จะถูกส่งไปยังผู้ให้บริการนั้น จึงสำคัญถ้าคุณรันแบบโลคัลล้วนเพื่อความเป็นส่วนตัว
289
+
284
290
  เมื่อ npm ระบุว่าเวอร์ชันที่ติดตั้งถูก deprecate (โดยทั่วไปคือ security advisory) เซสชันถัดไปจะแสดงแบนเนอร์ `⚠️ MeMesh <ver> is DEPRECATED` แบบหนักนำหน้า และ `memesh update-status` จะแสดงบรรทัดเดียวกันจนกว่าคุณจะอัปเกรด การตรวจสอบถูก cache ที่ `~/.memesh/update-check.<version>.json` เพื่อไม่ให้ความล้มเหลวเครือข่ายชั่วคราวลดความสว่างของคำเตือน
285
291
 
286
292
  ---
@@ -349,16 +355,18 @@ memesh config set llm.api-key sk-ant-...
349
355
  memesh serve # opens dashboard → Settings tab
350
356
  ```
351
357
 
358
+ **ขุดเซสชันที่ผ่านมาให้เป็นหน่วยความจำ** `memesh dream run --from-transcripts` จะอ่านบันทึกเซสชัน Claude Code ของโปรเจกต์นี้ ถาม LLM หาการตัดสินใจและบทเรียนที่ซ่อนอยู่ในบทสนทนา แล้วพักไว้เป็นข้อเสนอ — ไม่มีอะไรเข้าสู่กราฟความรู้โดยอัตโนมัติ ตรวจดูทีละรายการด้วย `memesh dream show <id>` แล้ว accept เฉพาะอันที่ควรเก็บ
359
+
352
360
  ### ใช้ embeddings ของคุณเอง (ไม่บังคับ)
353
361
 
354
- โดยค่าเริ่มต้น embeddings ใช้โมเดล ONNX ในเครื่อง (`Xenova/all-MiniLM-L6-v2`, 384 มิติ) — ไม่ต้องใช้คีย์ API ไม่มีข้อมูลออกจากเครื่อง และการ recall แบบ FTS5 เริ่มต้นก็ไม่ต้องใช้เลย หากต้องการใช้ embedder แบบโฮสต์หรือเซิร์ฟเวอร์ในเครื่อง:
362
+ โดยค่าเริ่มต้น MeMesh ทำ recall **ด้วยคีย์เวิร์ดอย่างเดียว** (FTS5) — ไม่ต้องใช้คีย์ API ไม่ต้องดาวน์โหลดโมเดล ไม่มีข้อมูลออกจากเครื่อง การค้นหาเชิงความหมาย (semantic) เป็นตัวเลือกเสริมและต้องใช้ embedder ตั้งค่าอย่างใดอย่างหนึ่ง:
355
363
 
356
364
  ```bash
357
365
  memesh config set embedder.provider openai # or: ollama
358
366
  memesh config set embedder.model text-embedding-3-small
359
367
  ```
360
368
 
361
- embedder ถูกตั้งค่า**แยกจาก LLM แชท** — การเปลี่ยน `llm.provider` จะไม่เปลี่ยน embeddings ของคุณอย่างเงียบ ๆ หากเปลี่ยนไปใช้มิติที่ต่างกัน (เช่น 384 → 1536) MeMesh จะสร้างดัชนีเวกเตอร์ใหม่โดยอัตโนมัติในการเขียนครั้งถัดไป ค่า `embedder.provider` ที่รองรับ: `onnx` (ค่าเริ่มต้น ในเครื่อง), `openai`, `ollama`
369
+ embedder ถูกตั้งค่า**แยกจาก LLM แชท** — การเปลี่ยน `llm.provider` จะไม่เปลี่ยน embeddings ของคุณอย่างเงียบ ๆ หากเปลี่ยนไปใช้มิติที่ต่างกัน (เช่น 768 → 1536) MeMesh จะสร้างดัชนีเวกเตอร์ใหม่โดยอัตโนมัติในการเขียนครั้งถัดไป ค่า `embedder.provider` ที่รองรับ: `ollama` (ในเครื่อง), `openai` (โฮสต์) หากไม่ตั้งค่าใดเลย recall จะยังคงเป็นการค้นหาด้วยคีย์เวิร์ด
362
370
 
363
371
  | | ระดับ 0 (ค่าเริ่มต้น) | ระดับ 1 (Smart Mode) |
364
372
  |---|---|---|
@@ -371,7 +379,7 @@ embedder ถูกตั้งค่า**แยกจาก LLM แชท** —
371
379
 
372
380
  ---
373
381
 
374
- ## เครื่องมือหน่วยความจำทั้ง 9 ตัว
382
+ ## เครื่องมือหน่วยความจำทั้ง 7 ตัว
375
383
 
376
384
  | เครื่องมือ | ทำอะไร |
377
385
  |---|---|
@@ -382,7 +390,6 @@ embedder ถูกตั้งค่า**แยกจาก LLM แชท** —
382
390
  | `import` | นำเข้าหน่วยความจำพร้อมกลยุทธ์ผสาน (ข้าม / เขียนทับ / ผนวก) |
383
391
  | `learn` | บันทึกบทเรียนโครงสร้างจากข้อผิดพลาด (ข้อผิดพลาด สาเหตุ การแก้ไข การป้องกัน) |
384
392
  | `user_patterns` | วิเคราะห์รูปแบบการทำงาน — ตารางเวลา เครื่องมือ จุดแข็ง พื้นที่เรียนรู้ |
385
- | `verify_agent_work` | คงรายงานการยืนยันสำหรับงานเอเจนต์พื้นหลัง ตรวจสอบความเป็นจริงการเปลี่ยนแปลงไฟล์ที่อ้างสิทธิ์เทียบกับ `git diff` |
386
393
 
387
394
  ---
388
395
 
@@ -391,7 +398,7 @@ embedder ถูกตั้งค่า**แยกจาก LLM แชท** —
391
398
  ```
392
399
  ┌─────────────────┐
393
400
  │ Core Engine │
394
- │ (8 operations) │
401
+ │ (7 operations) │
395
402
  └────────┬────────┘
396
403
  ┌─────────────────┼─────────────────┐
397
404
  │ │ │