mempalace-code 1.10.0__tar.gz → 1.10.2__tar.gz

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 (219) hide show
  1. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.github/workflows/publish.yml +7 -0
  2. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/CHANGELOG.md +91 -2
  3. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/CONTRIBUTING.md +6 -4
  4. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/PKG-INFO +60 -24
  5. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/README.md +59 -23
  6. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/AGENT_INSTALL.md +8 -8
  7. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/BACKLOG-archived.yaml +125 -0
  8. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/BACKLOG.yaml +11 -1
  9. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/BACKUP_RESTORE.md +241 -3
  10. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/COMPARISON_GRAPHIFY.md +6 -6
  11. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/HOW_SEARCH_WORKS.md +1 -1
  12. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/LLM_USAGE_RULES.md +1 -1
  13. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/OFFLINE_USAGE.md +16 -11
  14. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/UPSTREAM_HARDENING.md +3 -3
  15. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/README.md +2 -2
  16. mempalace_code-1.10.2/mempalace_code/__init__.py +20 -0
  17. mempalace_code-1.10.2/mempalace_code/_stdio.py +46 -0
  18. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/backup.py +11 -8
  19. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli.py +79 -7
  20. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/backup_restore.py +12 -1
  21. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/export_import.py +6 -3
  22. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/ingest.py +3 -3
  23. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/maintenance.py +2 -2
  24. mempalace_code-1.10.2/mempalace_code/cli_commands/model.py +108 -0
  25. mempalace_code-1.10.2/mempalace_code/cli_commands/preflight.py +53 -0
  26. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/query.py +51 -7
  27. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/config.py +6 -2
  28. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/entity_registry.py +22 -1
  29. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/knowledge_graph.py +158 -26
  30. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/layers.py +3 -3
  31. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/dispatch.py +10 -2
  32. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/architecture.py +8 -1
  33. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/kg.py +18 -2
  34. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/search.py +59 -1
  35. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/write.py +3 -3
  36. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp_server.py +1 -0
  37. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp_tool_profiles.py +1 -1
  38. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/orchestrator.py +122 -11
  39. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/projects.py +48 -9
  40. mempalace_code-1.10.2/mempalace_code/mirror_preflight.py +342 -0
  41. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/palace_graph.py +1 -1
  42. mempalace_code-1.10.2/mempalace_code/reader.py +215 -0
  43. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/searcher.py +7 -3
  44. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/spellcheck.py +2 -1
  45. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/storage.py +206 -31
  46. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/watcher.py +245 -34
  47. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/pyproject.toml +1 -1
  48. mempalace_code-1.10.2/scripts/migrate_storage_smoke.py +260 -0
  49. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/scripts/nuke_wing.py +1 -0
  50. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_backup.py +139 -1
  51. mempalace_code-1.10.2/tests/test_backup_cli.py +372 -0
  52. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_cli.py +957 -0
  53. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_cli_command_modules.py +150 -0
  54. mempalace_code-1.10.2/tests/test_entity_registry.py +110 -0
  55. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_export.py +56 -0
  56. mempalace_code-1.10.2/tests/test_knowledge_graph.py +279 -0
  57. mempalace_code-1.10.2/tests/test_layers.py +276 -0
  58. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_mcp_registry.py +5 -4
  59. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_mcp_server.py +895 -6
  60. mempalace_code-1.10.2/tests/test_migrate_storage_smoke.py +232 -0
  61. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_miner.py +463 -0
  62. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_palace_graph.py +201 -0
  63. mempalace_code-1.10.2/tests/test_reader.py +507 -0
  64. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_searcher.py +118 -0
  65. mempalace_code-1.10.2/tests/test_stdio.py +238 -0
  66. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_storage.py +403 -8
  67. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_storage_lance.py +96 -0
  68. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_watcher.py +451 -0
  69. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/uv.lock +1 -1
  70. mempalace_code-1.10.0/mempalace_code/__init__.py +0 -6
  71. mempalace_code-1.10.0/mempalace_code/cli_commands/model.py +0 -53
  72. mempalace_code-1.10.0/tests/test_backup_cli.py +0 -172
  73. mempalace_code-1.10.0/tests/test_knowledge_graph.py +0 -139
  74. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/prompts/codex-hardening-review.md +0 -0
  75. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/prompts/codex-plan-review.md +0 -0
  76. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/settings.json +0 -0
  77. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/_shared/commit-checkpoint.md +0 -0
  78. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/_shared/mode-classification.md +0 -0
  79. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/_shared/task-state.md +0 -0
  80. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/bench/SKILL.md +0 -0
  81. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/doc-refresh/INSTRUCTIONS.md +0 -0
  82. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/doc-refresh/SKILL.md +0 -0
  83. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/entropy-gc/INSTRUCTIONS.md +0 -0
  84. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/entropy-gc/SKILL.md +0 -0
  85. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/mine/SKILL.md +0 -0
  86. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/palace-health/SKILL.md +0 -0
  87. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/release/SKILL.md +0 -0
  88. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/release-prep/SKILL.md +0 -0
  89. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/ship/INSTRUCTIONS.md +0 -0
  90. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/ship/SKILL.md +0 -0
  91. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/start/INSTRUCTIONS.md +0 -0
  92. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/start/SKILL.md +0 -0
  93. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/status/SKILL.md +0 -0
  94. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/task-hardening/INSTRUCTIONS.md +0 -0
  95. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/task-hardening/SKILL.md +0 -0
  96. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/task-plan/INSTRUCTIONS.md +0 -0
  97. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/task-plan/SKILL.md +0 -0
  98. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/verify/INSTRUCTIONS.md +0 -0
  99. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.claude/skills/verify/SKILL.md +0 -0
  100. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  101. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  102. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  103. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.github/workflows/ci.yml +0 -0
  104. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.github/workflows/dotnet-bench.yml +0 -0
  105. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.gitignore +0 -0
  106. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.pre-commit-config.yaml +0 -0
  107. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/.verify-state +0 -0
  108. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/AGENTS.md +0 -0
  109. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/CLAUDE.md +0 -0
  110. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/LICENSE +0 -0
  111. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/NOTICE +0 -0
  112. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/assets/mempalace_banner.jpg +0 -0
  113. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/BENCHMARKS.md +0 -0
  114. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/HYBRID_MODE.md +0 -0
  115. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/README.md +0 -0
  116. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/code_retrieval_bench.py +0 -0
  117. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/convomem_bench.py +0 -0
  118. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/data/code_retrieval_queries.json +0 -0
  119. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/dotnet_bench.py +0 -0
  120. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/embed_ab_bench.py +0 -0
  121. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/locomo_bench.py +0 -0
  122. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/longmemeval_bench.py +0 -0
  123. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/membench_bench.py +0 -0
  124. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/results_embed_ab_2026-04-09.json +0 -0
  125. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/results_token_delta_mempalace.json +0 -0
  126. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/results_token_delta_wh40k.json +0 -0
  127. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/benchmarks/token_delta_bench.py +0 -0
  128. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/BENCH_TOKEN_DELTA.md +0 -0
  129. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/WHY_THIS_FORK.md +0 -0
  130. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/docs/refactoring/REFAC-MINER-MODULES/progress.md +0 -0
  131. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/examples/HOOKS_TUTORIAL.md +0 -0
  132. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/examples/basic_mining.py +0 -0
  133. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/examples/convo_import.py +0 -0
  134. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/examples/gemini_cli_setup.md +0 -0
  135. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/examples/mcp_setup.md +0 -0
  136. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/hooks/README.md +0 -0
  137. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/hooks/mempal_precompact_hook.sh +0 -0
  138. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/hooks/mempal_save_hook.sh +0 -0
  139. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace/__init__.py +0 -0
  140. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace/mcp_server.py +0 -0
  141. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/__main__.py +0 -0
  142. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/_chroma_store.py +0 -0
  143. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/architecture.py +0 -0
  144. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/__init__.py +0 -0
  145. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/alias.py +0 -0
  146. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/common.py +0 -0
  147. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/diary.py +0 -0
  148. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/version_check.py +0 -0
  149. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/cli_commands/watch.py +0 -0
  150. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/convo_miner.py +0 -0
  151. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/dialect.py +0 -0
  152. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/disk_budget.py +0 -0
  153. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/entity_detector.py +0 -0
  154. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/export.py +0 -0
  155. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/general_extractor.py +0 -0
  156. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/language_catalog.py +0 -0
  157. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/__init__.py +0 -0
  158. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/protocol_text.py +0 -0
  159. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/registry.py +0 -0
  160. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/runtime.py +0 -0
  161. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/__init__.py +0 -0
  162. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/diary.py +0 -0
  163. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/graph.py +0 -0
  164. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mcp/tools/read.py +0 -0
  165. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/migrate.py +0 -0
  166. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/miner.py +0 -0
  167. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/__init__.py +0 -0
  168. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/batching.py +0 -0
  169. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/chunkers.py +0 -0
  170. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/kg_extract.py +0 -0
  171. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/languages.py +0 -0
  172. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/scanner.py +0 -0
  173. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/mining/symbols.py +0 -0
  174. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/normalize.py +0 -0
  175. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/onboarding.py +0 -0
  176. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/py.typed +0 -0
  177. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/retrieval_rerank.py +0 -0
  178. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/room_detector_local.py +0 -0
  179. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/search_reranker.py +0 -0
  180. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/split_mega_files.py +0 -0
  181. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/treesitter.py +0 -0
  182. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/version.py +0 -0
  183. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/mempalace_code/version_check.py +0 -0
  184. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/scripts/bootstrap.sh +0 -0
  185. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/scripts/codex-review.sh +0 -0
  186. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/conftest.py +0 -0
  187. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/fixtures/unreasoned_suppression.py +0 -0
  188. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_architecture_extraction.py +0 -0
  189. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_chroma_compat.py +0 -0
  190. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_chroma_import_errors.py +0 -0
  191. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_chunking.py +0 -0
  192. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_code_retrieval_bench.py +0 -0
  193. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_config.py +0 -0
  194. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_convo_miner.py +0 -0
  195. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_dialect.py +0 -0
  196. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_disk_budget.py +0 -0
  197. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_dotnet_bench.py +0 -0
  198. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_dotnet_config.py +0 -0
  199. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_e2e.py +0 -0
  200. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_embed_ab_bench.py +0 -0
  201. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_entity_detector.py +0 -0
  202. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_general_extractor.py +0 -0
  203. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_kg_extract.py +0 -0
  204. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_lang_detect.py +0 -0
  205. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_language_catalog.py +0 -0
  206. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_mcp_tool_profiles.py +0 -0
  207. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_migrate.py +0 -0
  208. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_miner_modules.py +0 -0
  209. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_normalize.py +0 -0
  210. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_offline.py +0 -0
  211. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_packaging_namespace.py +0 -0
  212. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_retrieval_rerank.py +0 -0
  213. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_search_reranker.py +0 -0
  214. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_split_mega_files.py +0 -0
  215. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_symbol_extract.py +0 -0
  216. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_treesitter.py +0 -0
  217. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_type_suppressions.py +0 -0
  218. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_version_check.py +0 -0
  219. {mempalace_code-1.10.0 → mempalace_code-1.10.2}/tests/test_version_consistency.py +0 -0
@@ -3,12 +3,18 @@ name: Publish to PyPI
3
3
  on:
4
4
  push:
5
5
  tags: ["v*"]
6
+ workflow_dispatch:
7
+ repository_dispatch:
8
+ types: [publish]
9
+ release:
10
+ types: [published]
6
11
 
7
12
  permissions:
8
13
  id-token: write
9
14
 
10
15
  jobs:
11
16
  build:
17
+ if: github.repository == 'rergards/mempalace-code'
12
18
  runs-on: ubuntu-latest
13
19
  steps:
14
20
  - uses: actions/checkout@v5
@@ -23,6 +29,7 @@ jobs:
23
29
  path: dist/
24
30
 
25
31
  publish:
32
+ if: github.repository == 'rergards/mempalace-code'
26
33
  needs: build
27
34
  runs-on: ubuntu-latest
28
35
  environment: release
@@ -1,5 +1,94 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ No changes yet.
6
+
7
+ ## v1.10.2 — 2026-06-04
8
+
9
+ Patch release for the local-first embedding path.
10
+
11
+ ### Fixed
12
+
13
+ - `restore` now scopes KG writes to the `--palace` path instead of the global
14
+ default.
15
+ - `watch` now mines and watches an initialized root directory directly, and
16
+ emits a clear diagnostic when no projects are found.
17
+ - Cached `search`, `mine`, and MCP search paths now load the sentence-transformers
18
+ model with local-only resolution first, avoiding Hugging Face metadata requests
19
+ after the setup download has already populated the cache.
20
+ - Re-running `mempalace-code fetch-model` on an already cached model now verifies
21
+ the local cache instead of performing an online-capable Hub lookup.
22
+ - Suppressed third-party Hugging Face token warnings and weight-loading progress
23
+ during cached model resolution; MemPalace keeps only its own concise status
24
+ output.
25
+ - LanceDB optimize and cleanup now re-open the table and verify a fresh handle
26
+ after maintenance. This catches missing-fragment failures that only appear for
27
+ the next process instead of trusting a stale in-memory table handle.
28
+ - LanceDB upserts now retry once with a freshly opened table when Lance reports
29
+ a missing fragment from a stale handle during merge-insert.
30
+
31
+ ### Added
32
+
33
+ - `preflight mirror` CLI command and docs warning that delete-mode rsync against
34
+ palace state can silently remove remote-owned data.
35
+ - Regression tests for cached local model resolution, explicit offline mode,
36
+ local filesystem model paths, idempotent `fetch-model`, and forced re-download.
37
+ - Backlog item `STORE-HF-CACHED-SEARCH-SUBPROCESS-GUARD` for a future
38
+ socket-blocked subprocess guard covering CLI stdout/stderr and network calls.
39
+
40
+ ### Verified
41
+
42
+ - Real CLI smokes for cached `fetch-model`, normal search, explicit-offline
43
+ search, and palace health.
44
+ - Focused storage and CLI command suites plus the network-marked offline gate.
45
+
46
+ ## v1.10.1 — 2026-05-24
47
+
48
+ Patch release after the v1.10.0 publish. Focus: real CLI/MCP smoke fixes,
49
+ read-only no-embedder paths, and release-check tooling.
50
+
51
+ ### Added
52
+
53
+ - Disposable `scripts/migrate_storage_smoke.py` release smoke for Chroma -> Lance
54
+ migration. It generates a tiny legacy Chroma source, runs the real
55
+ `migrate-storage` CLI, verifies source/destination counts, checks searchable
56
+ migrated content, and exercises the non-empty destination guard.
57
+ - `mempalace_kg_query`, `mempalace_kg_timeline`, and architecture/KG relationship
58
+ outputs now expose `source_file` provenance when it is present.
59
+
60
+ ### Fixed
61
+
62
+ - MCP `delete_drawer` and `delete_wing` now work after read-only MCP calls in a
63
+ fresh offline home without starting the embedding model or returning a false
64
+ "No palace found".
65
+ - Read-only CLI/MCP paths (`status`, `health`, `read`, `export`, backup metadata,
66
+ graph/layer traversal, dry-run maintenance) avoid unnecessary embedder startup.
67
+ - `python -m mempalace_code.cli ...` no longer emits the `runpy` warning caused by
68
+ eager package-level CLI imports; the `mempalace-code` console entrypoint remains
69
+ compatible.
70
+ - `export --out -` now routes progress and summary text to stderr, keeping stdout
71
+ as pure JSONL so it can be piped directly into `import -`.
72
+ - `backup --out FILE create` now writes to the requested archive path instead of
73
+ falling back to the default backups directory.
74
+ - `search` now prints the full stored source path so it can be copied into `read`.
75
+ `read` also resolves unique basename and path-suffix matches within a wing.
76
+ - Tiny non-empty source files that produce no chunks are reported separately from
77
+ already-filed skips, and unchanged tiny files are skipped on later incremental
78
+ mines via a small per-wing hash sidecar.
79
+
80
+ ### Verified
81
+
82
+ - Real MCP stdio smoke for delete-after-read and KG provenance.
83
+ - Real CLI smoke for export-to-import piping, backup `--out`, source-path read
84
+ discovery, tiny-file mining, migrate-storage happy path/boundary/guard, and
85
+ `python -m mempalace_code.cli` warning removal.
86
+ - Full release gate: 2229 tests passed, 4 deselected.
87
+
88
+ ## 2026-05-23 · UPSTREAM-KG-TEMPORAL-VALIDATION
89
+
90
+ Validate KG temporal inputs (reject inverted validity windows, enforce ISO-8601 dates) and expose `valid_to` and `source_file` on `mempalace_kg_add`.
91
+
3
92
  Current command/package names: the CLI is `mempalace-code`, the import package is
4
93
  `mempalace_code`, and the MCP module is `python -m mempalace_code.mcp_server`.
5
94
  Older historical entries may mention legacy `mempalace` names that were valid
@@ -66,7 +155,7 @@ when those changes landed.
66
155
  - Pre-optimize backups are bounded by default to the newest 5 managed archives
67
156
  unless `backup_retain_count` is explicitly set; manual and scheduled backups
68
157
  remain keep-all by default.
69
- - The collected test suite is now 2025 tests.
158
+ - The release gate collected 2025 tests.
70
159
 
71
160
  ### Fixed
72
161
 
@@ -108,7 +197,7 @@ when those changes landed.
108
197
  project mining by default, unless explicitly force-included.
109
198
  - `MEMPALACE_BACKUP_MIN_FREE_BYTES` and `backup_min_free_bytes` remain supported
110
199
  as compatibility aliases for the newer `backup_disk_min_free_bytes` floor.
111
- - The collected test suite is now 1769 tests.
200
+ - The release gate collected 1769 tests.
112
201
 
113
202
  ### Fixed
114
203
 
@@ -13,12 +13,14 @@ pip install -e ".[dev]" # pytest, pyright, ruff, watchfiles
13
13
  ## Running Tests
14
14
 
15
15
  ```bash
16
- pytest tests/ -v
16
+ python -m pytest tests/ -v
17
+ python -m pyright --pythonpath "$(python -c 'import sys; print(sys.executable)')"
18
+ ruff check mempalace_code/ tests/ scripts/
19
+ ruff format --check mempalace_code/ tests/ scripts/
17
20
  ```
18
21
 
19
- All tests must pass before submitting a PR. Tests should run without API keys or network
20
- access. `pyright` is installed with the dev extra for advisory type-checking; the current
21
- zero-error target is tracked in the backlog.
22
+ All tests and checks must pass before submitting a PR. Tests should run without
23
+ API keys or network access unless they are explicitly marked `needs_network`.
22
24
 
23
25
  ## Running Benchmarks
24
26
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mempalace-code
3
- Version: 1.10.0
3
+ Version: 1.10.2
4
4
  Summary: Developer memory tool — mine codebases and conversations into a LanceDB-backed searchable palace. No API key required.
5
5
  Project-URL: Homepage, https://github.com/rergards/mempalace-code
6
6
  Project-URL: Repository, https://github.com/rergards/mempalace-code
@@ -72,13 +72,13 @@ No cloud service, no API keys, no subscription. After the one-time embedding mod
72
72
  <table>
73
73
  <tr>
74
74
  <td align="center"><strong>Language-Aware Mining</strong><br><sub>AST, regex, and adaptive chunking<br>matched to each file type</sub></td>
75
- <td align="center"><strong>28 MCP Tools</strong><br><sub>Any MCP-capable agent<br>search, store, traverse · static profiles</sub></td>
75
+ <td align="center"><strong>29 MCP Tools</strong><br><sub>Any MCP-capable agent<br>search, store, traverse · static profiles</sub></td>
76
76
  <td align="center"><strong>Temporal Knowledge Graph</strong><br><sub>Facts that change over time<br>with validity windows</sub></td>
77
77
  </tr>
78
78
  <tr>
79
79
  <td align="center"><strong>595x Token Savings</strong><br><sub>measured peak · median 80x<br><a href="docs/BENCH_TOKEN_DELTA.md">scales with project size</a></sub></td>
80
80
  <td align="center"><strong>Cross-Project Tunnels</strong><br><sub>Search <code>auth</code> in one project<br>find it everywhere</sub></td>
81
- <td align="center"><strong>2025 Tests · $0 Cost</strong><br><sub>Every feature acceptance-gated<br>offline after model setup</sub></td>
81
+ <td align="center"><strong>2200+ Tests · $0 Cost</strong><br><sub>Every feature acceptance-gated<br>offline after model setup</sub></td>
82
82
  </tr>
83
83
  </table>
84
84
 
@@ -112,7 +112,7 @@ Then ask your AI to read [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) — it
112
112
  <summary>Or do it manually</summary>
113
113
 
114
114
  ```bash
115
- mempalace-code init ~/projects/myapp # detect rooms, download embedding model (~80 MB)
115
+ mempalace-code init ~/projects/myapp # detect rooms, cache embedding model (~80 MB)
116
116
  mempalace-code init ~/projects/myapp --detect-entities # optional people/project detection for notes/convos
117
117
  mempalace-code mine ~/projects/myapp # index your codebase
118
118
  claude mcp add mempalace-code -- python -m mempalace_code.mcp_server # connect Claude Code
@@ -124,7 +124,7 @@ codex mcp add mempalace-code -- python -m mempalace_code.mcp_server # connect
124
124
  mempalace-code watch ~/projects/ # re-mines on every commit, zero noise
125
125
  ```
126
126
 
127
- This makes all 28 tools available to your AI. To expose a reduced subset, add a `--profile` flag (e.g. `-- python -m mempalace_code.mcp_server --profile=minimal`). For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` (or equivalent agent-instruction file) — copy from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md), or let [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7 inject them for you.
127
+ This makes all 29 tools available to your AI. To expose a reduced subset, add a `--profile` flag (e.g. `-- python -m mempalace_code.mcp_server --profile=minimal`). For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` (or equivalent agent-instruction file) — copy from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md), or let [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7 inject them for you.
128
128
 
129
129
  </details>
130
130
 
@@ -142,7 +142,7 @@ Evaluate mempalace-code for this repo specifically, not generic memory tooling.
142
142
  2. Highest-ROI surfaces: rank code, docs/prose, design notes, conversation/log exports, manual decisions, KG facts, architecture relationships.
143
143
  3. Stack support: list supported languages/file types actually indexed; name unsupported extensions that are skipped by default. Distinguish tree-sitter AST, regex structural, Markdown/prose, Kubernetes YAML, and adaptive chunking.
144
144
  4. Agent workflow fit: which MCP tools should you use proactively (`mempalace_search`, `mempalace_code_search`, `mempalace_file_context`, KG, tunnels, diary, manual drawers)?
145
- 5. Ops fit: recommend global MCP, project-scoped MCP, or no MCP; cover 28-tool prompt surface and profile subsetting options (`--profile`, `--tools`, `--exclude`), `mine` vs `mine-all`, `watch` cadence, backup/repair, and offline/model constraints.
145
+ 5. Ops fit: recommend global MCP, project-scoped MCP, or no MCP; cover 29-tool prompt surface and profile subsetting options (`--profile`, `--tools`, `--exclude`), `mine` vs `mine-all`, `watch` cadence, backup/repair, and offline/model constraints.
146
146
  6. Decision: install now, try scoped for a week, wait for a named feature, or skip. Give the first 3 commands you would run.
147
147
  7. If waiting: ask me whether to draft a GitHub feature request.
148
148
  ```
@@ -156,7 +156,7 @@ as a complement, not a replacement. A good trial order is:
156
156
  3. **Code mining last** — start with one high-value subproject, then expand if
157
157
  agents actually use the results.
158
158
 
159
- Cost caveat: the MCP server defaults to all 28 tools. Use `--profile=minimal` or
159
+ Cost caveat: the MCP server defaults to all 29 tools. Use `--profile=minimal` or
160
160
  `--tools=search,add_drawer` at startup to reduce the prompt/tool-surface cost.
161
161
  Proactive use also depends on adding the usage-rules block to agent instructions.
162
162
  Prefer project-scoped MCP for trials, and keep it only if searches, KG lookups,
@@ -305,11 +305,14 @@ uv tool inject mempalace-code watchfiles # or: pipx inject mempalace-code watch
305
305
  ```
306
306
 
307
307
  ```bash
308
- mempalace-code watch ~/projects/ # watch all projects (on commit, default)
308
+ mempalace-code watch ~/projects/my-app # watch an initialized project (on commit)
309
+ mempalace-code watch ~/projects/ # watch all initialized projects in a parent directory
309
310
  mempalace-code watch ~/projects/ --on-save # watch all file saves instead (noisier)
310
311
  mempalace-code watch ~/projects/ schedule # print launchd/cron snippet for daemon
311
312
  ```
312
313
 
314
+ `watch` accepts either an **initialized project directory** (has `mempalace.yaml`) or a **parent directory** containing immediate initialized project subdirectories. Pointing it at a project root that has project files but no `mempalace.yaml` exits with the correct `mempalace-code init <dir>` command.
315
+
313
316
  **Install as persistent daemon (macOS):**
314
317
 
315
318
  ```bash
@@ -385,7 +388,7 @@ mempalace-code organizes memories into a navigable structure — the same mental
385
388
 
386
389
  ---
387
390
 
388
- ### MCP Server — 28 Tools {#mcp-tool-profiles}
391
+ ### MCP Server — 29 Tools {#mcp-tool-profiles}
389
392
 
390
393
  ```bash
391
394
  claude mcp add mempalace-code -- python -m mempalace_code.mcp_server
@@ -395,7 +398,7 @@ The MCP server registration name defaults to `mempalace-code`. The MCP tool
395
398
  identifiers remain `mempalace_*` for compatibility with existing agents and
396
399
  usage rules.
397
400
 
398
- By default all 28 tools are exposed. Use startup flags to reduce the tool surface
401
+ By default all 29 tools are exposed. Use startup flags to reduce the tool surface
399
402
  (GitHub issue #6 — static profiles lower prompt cost while preserving stable
400
403
  named-tool trigger patterns in usage rules):
401
404
 
@@ -416,7 +419,7 @@ claude mcp add mempalace-code -- python -m mempalace_code.mcp_server --profile=f
416
419
 
417
420
  | Profile | Tools | Best for |
418
421
  |---------|-------|----------|
419
- | `full` _(default)_ | all 28 | Full capability; no surface reduction |
422
+ | `full` _(default)_ | all 29 | Full capability; no surface reduction |
420
423
  | `minimal` | 4 | Search + store only |
421
424
  | `kg` | 8 | Minimal + temporal knowledge graph |
422
425
  | `code` | 10 | Code archaeology; no drawer-write/diary tools (`mine` included) |
@@ -632,6 +635,8 @@ Or in `~/.mempalace/config.json`: `{"backup_retain_count": 5}`. Retention only a
632
635
  After a successful optimize and readability check, MemPalace also runs
633
636
  best-effort verified Lance cleanup (`cleanup_stale_fragments` with
634
637
  `unsafe_now=false`) so future backups do not keep archiving stale table versions.
638
+ Optimize and cleanup verification re-opens the Lance table, so it checks the
639
+ same fresh-handle path the next CLI, MCP server, or watcher process will use.
635
640
  Use the manual `cleanup` command for older installations that already
636
641
  accumulated stale versions or for emergency recovery.
637
642
 
@@ -676,6 +681,36 @@ Skips compaction entirely. Storage will grow with more fragments but avoids any
676
681
 
677
682
  Also available: `mempalace-code export --only-manual` for JSONL export of manually-stored drawers.
678
683
 
684
+ **Remote mirror risk — backups vs file mirroring:**
685
+
686
+ Managed backups and Lance cleanup protect **local** palace state. They do not protect against
687
+ delete-mode rsync between independent hosts. `rsync --delete` syncing a whole MemPalace state
688
+ directory removes remote-owned drawers, diary entries, and KG triples that were never synced
689
+ back to the source — even when local backups are healthy.
690
+
691
+ Use these recommended excludes for any delete-mode state-directory mirror:
692
+
693
+ ```bash
694
+ rsync -a --delete \
695
+ --exclude=palace/ \
696
+ --exclude=knowledge_graph.sqlite3 \
697
+ --exclude=config.json \
698
+ --exclude=backups/ \
699
+ ~/.mempalace/ user@host:.mempalace/
700
+ ```
701
+
702
+ Run a preflight check before installing a mirror job (the command is never executed):
703
+
704
+ ```bash
705
+ mempalace-code preflight mirror --command \
706
+ "rsync -a --delete --exclude=palace/ --exclude=knowledge_graph.sqlite3 \
707
+ --exclude=config.json --exclude=backups/ ~/.mempalace/ user@host:.mempalace/"
708
+ # OK
709
+ ```
710
+
711
+ See [docs/BACKUP_RESTORE.md](docs/BACKUP_RESTORE.md) for the full mirror-risk guidance and
712
+ the safer export/import alternative for cross-host transfer of non-regenerable content.
713
+
679
714
  ---
680
715
 
681
716
  ### Scan Excludes
@@ -730,7 +765,7 @@ exclusion rule.
730
765
  mempalace-code health # probe palace for fragment corruption
731
766
  mempalace-code health --json # machine-readable report
732
767
  mempalace-code cleanup --older-than-days 7 # reclaim stale Lance versions
733
- mempalace-code cleanup --unsafe-now # emergency cleanup; only with no writers active
768
+ mempalace-code cleanup --unsafe-now # emergency only; stop MemPalace processes first
734
769
 
735
770
  mempalace-code repair --dry-run # show what would be recovered
736
771
  mempalace-code repair --rollback # roll back to last working version
@@ -749,9 +784,9 @@ mempalace-code repair --rollback # roll back to last working version
749
784
  Use `--dry-run` first to see how many rows would be lost.
750
785
 
751
786
  Normal optimize runs already prune verified stale Lance versions after a
752
- successful compaction. Manual `cleanup` is still useful after older installs,
753
- large historical accumulations, or emergency disk recovery when no writer is
754
- active.
787
+ successful compaction and fresh-handle verification. Manual `cleanup` is still
788
+ useful after older installs, large historical accumulations, or emergency disk
789
+ recovery after stopping watchers, miners, maintenance commands, and MCP servers.
755
790
 
756
791
  ---
757
792
 
@@ -800,9 +835,9 @@ This is a code-first fork of [milla-jovovich/mempalace](https://github.com/milla
800
835
  | Upstream | This fork |
801
836
  |---|---|
802
837
  | ChromaDB — [silently deletes data on version bump](https://github.com/milla-jovovich/mempalace/issues/469) | LanceDB — crash-safe Arrow storage, no version-cliff |
803
- | "No internet after install" — [false](https://github.com/milla-jovovich/mempalace/issues/524) | `mempalace-code init` downloads model explicitly; offline after model setup |
838
+ | "No internet after install" — [false](https://github.com/milla-jovovich/mempalace/issues/524) | `mempalace-code init` downloads the model explicitly once; cached mining/search use local-only model resolution first |
804
839
  | "100% R@5" — [unverifiable](https://github.com/milla-jovovich/mempalace/issues/27) | Number removed. Methodology caveats documented |
805
- | ~30% test coverage | 2025 tests, every feature acceptance-gated |
840
+ | ~30% test coverage | 2200+ tests, every feature acceptance-gated |
806
841
  | No backup, no recovery | `backup` / `restore` / `export` / `import` |
807
842
  | No incremental mining | Content-hash incremental: only changed files re-chunked |
808
843
  | No code-search | `code_search` — filter by language, symbol, glob |
@@ -860,7 +895,7 @@ pip install "mempalace-code[spellcheck]" # autocorrect for room/wing names
860
895
  pip install "mempalace-code[dev]" # pytest + ruff + pyright
861
896
  ```
862
897
 
863
- **Requirements:** Python 3.11+. ~80 MB embedding model downloaded once during `mempalace-code init`.
898
+ **Requirements:** Python 3.11+. ~80 MB embedding model cached once during `mempalace-code init` or `mempalace-code fetch-model`; repeated cached runs resolve the model locally.
864
899
 
865
900
  </details>
866
901
 
@@ -881,8 +916,9 @@ mempalace-code mine <dir> --watch # auto-incremental on fil
881
916
  mempalace-code mine-all <parent-dir> # sync all projects incrementally (one wing per project)
882
917
  mempalace-code mine-all <parent-dir> --new-only # only mine projects not yet in the palace
883
918
 
884
- # Watch (multi-project auto-sync)
885
- mempalace-code watch <parent-dir> # watch all initialized projects
919
+ # Watch (project auto-sync)
920
+ mempalace-code watch <initialized-project> # watch a single initialized project
921
+ mempalace-code watch <parent-dir> # watch all initialized projects in a parent directory
886
922
  mempalace-code watch <parent-dir> schedule # print launchd/cron daemon snippet
887
923
  mempalace-code watch <parent-dir> status # disk-budget + launchd state
888
924
 
@@ -908,7 +944,7 @@ mempalace-code wake-up --wing myapp # project-scoped
908
944
  mempalace-code status # palace overview
909
945
 
910
946
  # Model
911
- mempalace-code fetch-model # pre-download for offline use
947
+ mempalace-code fetch-model # cache or verify model for offline use
912
948
  ```
913
949
 
914
950
  </details>
@@ -933,7 +969,7 @@ Code mining is automatic via `mempalace-code watch`. For conversation context (d
933
969
  mempalace/
934
970
  ├── mempalace_code/
935
971
  │ ├── cli.py ← CLI entry point
936
- │ ├── mcp_server.py ← MCP server (28 tools, profiled at startup)
972
+ │ ├── mcp_server.py ← MCP server (29 tools, profiled at startup)
937
973
  │ ├── storage.py ← LanceDB vector storage
938
974
  │ ├── miner.py ← language-aware code chunking
939
975
  │ ├── convo_miner.py ← conversation ingest
@@ -945,7 +981,7 @@ mempalace/
945
981
  ├── benchmarks/ ← reproducible benchmark runners
946
982
  ├── hooks/ ← Claude Code auto-save hooks (legacy, optional)
947
983
  ├── examples/ ← usage examples
948
- └── tests/ ← 2025 tests
984
+ └── tests/ ← 2200+ tests
949
985
  ```
950
986
 
951
987
  </details>
@@ -966,7 +1002,7 @@ python -m pyright --pythonpath "$(python -c 'import sys; print(sys.executable)')
966
1002
  Apache 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
967
1003
 
968
1004
  <!-- Link Definitions -->
969
- [version-shield]: https://img.shields.io/badge/version-1.10.0-4dc9f6?style=flat-square&labelColor=0a0e14
1005
+ [version-shield]: https://img.shields.io/badge/version-1.10.2-4dc9f6?style=flat-square&labelColor=0a0e14
970
1006
  [release-link]: https://github.com/rergards/mempalace-code/releases
971
1007
  [python-shield]: https://img.shields.io/badge/python-3.11+-7dd8f8?style=flat-square&labelColor=0a0e14&logo=python&logoColor=7dd8f8
972
1008
  [python-link]: https://www.python.org/
@@ -23,13 +23,13 @@ No cloud service, no API keys, no subscription. After the one-time embedding mod
23
23
  <table>
24
24
  <tr>
25
25
  <td align="center"><strong>Language-Aware Mining</strong><br><sub>AST, regex, and adaptive chunking<br>matched to each file type</sub></td>
26
- <td align="center"><strong>28 MCP Tools</strong><br><sub>Any MCP-capable agent<br>search, store, traverse · static profiles</sub></td>
26
+ <td align="center"><strong>29 MCP Tools</strong><br><sub>Any MCP-capable agent<br>search, store, traverse · static profiles</sub></td>
27
27
  <td align="center"><strong>Temporal Knowledge Graph</strong><br><sub>Facts that change over time<br>with validity windows</sub></td>
28
28
  </tr>
29
29
  <tr>
30
30
  <td align="center"><strong>595x Token Savings</strong><br><sub>measured peak · median 80x<br><a href="docs/BENCH_TOKEN_DELTA.md">scales with project size</a></sub></td>
31
31
  <td align="center"><strong>Cross-Project Tunnels</strong><br><sub>Search <code>auth</code> in one project<br>find it everywhere</sub></td>
32
- <td align="center"><strong>2025 Tests · $0 Cost</strong><br><sub>Every feature acceptance-gated<br>offline after model setup</sub></td>
32
+ <td align="center"><strong>2200+ Tests · $0 Cost</strong><br><sub>Every feature acceptance-gated<br>offline after model setup</sub></td>
33
33
  </tr>
34
34
  </table>
35
35
 
@@ -63,7 +63,7 @@ Then ask your AI to read [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) — it
63
63
  <summary>Or do it manually</summary>
64
64
 
65
65
  ```bash
66
- mempalace-code init ~/projects/myapp # detect rooms, download embedding model (~80 MB)
66
+ mempalace-code init ~/projects/myapp # detect rooms, cache embedding model (~80 MB)
67
67
  mempalace-code init ~/projects/myapp --detect-entities # optional people/project detection for notes/convos
68
68
  mempalace-code mine ~/projects/myapp # index your codebase
69
69
  claude mcp add mempalace-code -- python -m mempalace_code.mcp_server # connect Claude Code
@@ -75,7 +75,7 @@ codex mcp add mempalace-code -- python -m mempalace_code.mcp_server # connect
75
75
  mempalace-code watch ~/projects/ # re-mines on every commit, zero noise
76
76
  ```
77
77
 
78
- This makes all 28 tools available to your AI. To expose a reduced subset, add a `--profile` flag (e.g. `-- python -m mempalace_code.mcp_server --profile=minimal`). For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` (or equivalent agent-instruction file) — copy from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md), or let [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7 inject them for you.
78
+ This makes all 29 tools available to your AI. To expose a reduced subset, add a `--profile` flag (e.g. `-- python -m mempalace_code.mcp_server --profile=minimal`). For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` (or equivalent agent-instruction file) — copy from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md), or let [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7 inject them for you.
79
79
 
80
80
  </details>
81
81
 
@@ -93,7 +93,7 @@ Evaluate mempalace-code for this repo specifically, not generic memory tooling.
93
93
  2. Highest-ROI surfaces: rank code, docs/prose, design notes, conversation/log exports, manual decisions, KG facts, architecture relationships.
94
94
  3. Stack support: list supported languages/file types actually indexed; name unsupported extensions that are skipped by default. Distinguish tree-sitter AST, regex structural, Markdown/prose, Kubernetes YAML, and adaptive chunking.
95
95
  4. Agent workflow fit: which MCP tools should you use proactively (`mempalace_search`, `mempalace_code_search`, `mempalace_file_context`, KG, tunnels, diary, manual drawers)?
96
- 5. Ops fit: recommend global MCP, project-scoped MCP, or no MCP; cover 28-tool prompt surface and profile subsetting options (`--profile`, `--tools`, `--exclude`), `mine` vs `mine-all`, `watch` cadence, backup/repair, and offline/model constraints.
96
+ 5. Ops fit: recommend global MCP, project-scoped MCP, or no MCP; cover 29-tool prompt surface and profile subsetting options (`--profile`, `--tools`, `--exclude`), `mine` vs `mine-all`, `watch` cadence, backup/repair, and offline/model constraints.
97
97
  6. Decision: install now, try scoped for a week, wait for a named feature, or skip. Give the first 3 commands you would run.
98
98
  7. If waiting: ask me whether to draft a GitHub feature request.
99
99
  ```
@@ -107,7 +107,7 @@ as a complement, not a replacement. A good trial order is:
107
107
  3. **Code mining last** — start with one high-value subproject, then expand if
108
108
  agents actually use the results.
109
109
 
110
- Cost caveat: the MCP server defaults to all 28 tools. Use `--profile=minimal` or
110
+ Cost caveat: the MCP server defaults to all 29 tools. Use `--profile=minimal` or
111
111
  `--tools=search,add_drawer` at startup to reduce the prompt/tool-surface cost.
112
112
  Proactive use also depends on adding the usage-rules block to agent instructions.
113
113
  Prefer project-scoped MCP for trials, and keep it only if searches, KG lookups,
@@ -256,11 +256,14 @@ uv tool inject mempalace-code watchfiles # or: pipx inject mempalace-code watch
256
256
  ```
257
257
 
258
258
  ```bash
259
- mempalace-code watch ~/projects/ # watch all projects (on commit, default)
259
+ mempalace-code watch ~/projects/my-app # watch an initialized project (on commit)
260
+ mempalace-code watch ~/projects/ # watch all initialized projects in a parent directory
260
261
  mempalace-code watch ~/projects/ --on-save # watch all file saves instead (noisier)
261
262
  mempalace-code watch ~/projects/ schedule # print launchd/cron snippet for daemon
262
263
  ```
263
264
 
265
+ `watch` accepts either an **initialized project directory** (has `mempalace.yaml`) or a **parent directory** containing immediate initialized project subdirectories. Pointing it at a project root that has project files but no `mempalace.yaml` exits with the correct `mempalace-code init <dir>` command.
266
+
264
267
  **Install as persistent daemon (macOS):**
265
268
 
266
269
  ```bash
@@ -336,7 +339,7 @@ mempalace-code organizes memories into a navigable structure — the same mental
336
339
 
337
340
  ---
338
341
 
339
- ### MCP Server — 28 Tools {#mcp-tool-profiles}
342
+ ### MCP Server — 29 Tools {#mcp-tool-profiles}
340
343
 
341
344
  ```bash
342
345
  claude mcp add mempalace-code -- python -m mempalace_code.mcp_server
@@ -346,7 +349,7 @@ The MCP server registration name defaults to `mempalace-code`. The MCP tool
346
349
  identifiers remain `mempalace_*` for compatibility with existing agents and
347
350
  usage rules.
348
351
 
349
- By default all 28 tools are exposed. Use startup flags to reduce the tool surface
352
+ By default all 29 tools are exposed. Use startup flags to reduce the tool surface
350
353
  (GitHub issue #6 — static profiles lower prompt cost while preserving stable
351
354
  named-tool trigger patterns in usage rules):
352
355
 
@@ -367,7 +370,7 @@ claude mcp add mempalace-code -- python -m mempalace_code.mcp_server --profile=f
367
370
 
368
371
  | Profile | Tools | Best for |
369
372
  |---------|-------|----------|
370
- | `full` _(default)_ | all 28 | Full capability; no surface reduction |
373
+ | `full` _(default)_ | all 29 | Full capability; no surface reduction |
371
374
  | `minimal` | 4 | Search + store only |
372
375
  | `kg` | 8 | Minimal + temporal knowledge graph |
373
376
  | `code` | 10 | Code archaeology; no drawer-write/diary tools (`mine` included) |
@@ -583,6 +586,8 @@ Or in `~/.mempalace/config.json`: `{"backup_retain_count": 5}`. Retention only a
583
586
  After a successful optimize and readability check, MemPalace also runs
584
587
  best-effort verified Lance cleanup (`cleanup_stale_fragments` with
585
588
  `unsafe_now=false`) so future backups do not keep archiving stale table versions.
589
+ Optimize and cleanup verification re-opens the Lance table, so it checks the
590
+ same fresh-handle path the next CLI, MCP server, or watcher process will use.
586
591
  Use the manual `cleanup` command for older installations that already
587
592
  accumulated stale versions or for emergency recovery.
588
593
 
@@ -627,6 +632,36 @@ Skips compaction entirely. Storage will grow with more fragments but avoids any
627
632
 
628
633
  Also available: `mempalace-code export --only-manual` for JSONL export of manually-stored drawers.
629
634
 
635
+ **Remote mirror risk — backups vs file mirroring:**
636
+
637
+ Managed backups and Lance cleanup protect **local** palace state. They do not protect against
638
+ delete-mode rsync between independent hosts. `rsync --delete` syncing a whole MemPalace state
639
+ directory removes remote-owned drawers, diary entries, and KG triples that were never synced
640
+ back to the source — even when local backups are healthy.
641
+
642
+ Use these recommended excludes for any delete-mode state-directory mirror:
643
+
644
+ ```bash
645
+ rsync -a --delete \
646
+ --exclude=palace/ \
647
+ --exclude=knowledge_graph.sqlite3 \
648
+ --exclude=config.json \
649
+ --exclude=backups/ \
650
+ ~/.mempalace/ user@host:.mempalace/
651
+ ```
652
+
653
+ Run a preflight check before installing a mirror job (the command is never executed):
654
+
655
+ ```bash
656
+ mempalace-code preflight mirror --command \
657
+ "rsync -a --delete --exclude=palace/ --exclude=knowledge_graph.sqlite3 \
658
+ --exclude=config.json --exclude=backups/ ~/.mempalace/ user@host:.mempalace/"
659
+ # OK
660
+ ```
661
+
662
+ See [docs/BACKUP_RESTORE.md](docs/BACKUP_RESTORE.md) for the full mirror-risk guidance and
663
+ the safer export/import alternative for cross-host transfer of non-regenerable content.
664
+
630
665
  ---
631
666
 
632
667
  ### Scan Excludes
@@ -681,7 +716,7 @@ exclusion rule.
681
716
  mempalace-code health # probe palace for fragment corruption
682
717
  mempalace-code health --json # machine-readable report
683
718
  mempalace-code cleanup --older-than-days 7 # reclaim stale Lance versions
684
- mempalace-code cleanup --unsafe-now # emergency cleanup; only with no writers active
719
+ mempalace-code cleanup --unsafe-now # emergency only; stop MemPalace processes first
685
720
 
686
721
  mempalace-code repair --dry-run # show what would be recovered
687
722
  mempalace-code repair --rollback # roll back to last working version
@@ -700,9 +735,9 @@ mempalace-code repair --rollback # roll back to last working version
700
735
  Use `--dry-run` first to see how many rows would be lost.
701
736
 
702
737
  Normal optimize runs already prune verified stale Lance versions after a
703
- successful compaction. Manual `cleanup` is still useful after older installs,
704
- large historical accumulations, or emergency disk recovery when no writer is
705
- active.
738
+ successful compaction and fresh-handle verification. Manual `cleanup` is still
739
+ useful after older installs, large historical accumulations, or emergency disk
740
+ recovery after stopping watchers, miners, maintenance commands, and MCP servers.
706
741
 
707
742
  ---
708
743
 
@@ -751,9 +786,9 @@ This is a code-first fork of [milla-jovovich/mempalace](https://github.com/milla
751
786
  | Upstream | This fork |
752
787
  |---|---|
753
788
  | ChromaDB — [silently deletes data on version bump](https://github.com/milla-jovovich/mempalace/issues/469) | LanceDB — crash-safe Arrow storage, no version-cliff |
754
- | "No internet after install" — [false](https://github.com/milla-jovovich/mempalace/issues/524) | `mempalace-code init` downloads model explicitly; offline after model setup |
789
+ | "No internet after install" — [false](https://github.com/milla-jovovich/mempalace/issues/524) | `mempalace-code init` downloads the model explicitly once; cached mining/search use local-only model resolution first |
755
790
  | "100% R@5" — [unverifiable](https://github.com/milla-jovovich/mempalace/issues/27) | Number removed. Methodology caveats documented |
756
- | ~30% test coverage | 2025 tests, every feature acceptance-gated |
791
+ | ~30% test coverage | 2200+ tests, every feature acceptance-gated |
757
792
  | No backup, no recovery | `backup` / `restore` / `export` / `import` |
758
793
  | No incremental mining | Content-hash incremental: only changed files re-chunked |
759
794
  | No code-search | `code_search` — filter by language, symbol, glob |
@@ -811,7 +846,7 @@ pip install "mempalace-code[spellcheck]" # autocorrect for room/wing names
811
846
  pip install "mempalace-code[dev]" # pytest + ruff + pyright
812
847
  ```
813
848
 
814
- **Requirements:** Python 3.11+. ~80 MB embedding model downloaded once during `mempalace-code init`.
849
+ **Requirements:** Python 3.11+. ~80 MB embedding model cached once during `mempalace-code init` or `mempalace-code fetch-model`; repeated cached runs resolve the model locally.
815
850
 
816
851
  </details>
817
852
 
@@ -832,8 +867,9 @@ mempalace-code mine <dir> --watch # auto-incremental on fil
832
867
  mempalace-code mine-all <parent-dir> # sync all projects incrementally (one wing per project)
833
868
  mempalace-code mine-all <parent-dir> --new-only # only mine projects not yet in the palace
834
869
 
835
- # Watch (multi-project auto-sync)
836
- mempalace-code watch <parent-dir> # watch all initialized projects
870
+ # Watch (project auto-sync)
871
+ mempalace-code watch <initialized-project> # watch a single initialized project
872
+ mempalace-code watch <parent-dir> # watch all initialized projects in a parent directory
837
873
  mempalace-code watch <parent-dir> schedule # print launchd/cron daemon snippet
838
874
  mempalace-code watch <parent-dir> status # disk-budget + launchd state
839
875
 
@@ -859,7 +895,7 @@ mempalace-code wake-up --wing myapp # project-scoped
859
895
  mempalace-code status # palace overview
860
896
 
861
897
  # Model
862
- mempalace-code fetch-model # pre-download for offline use
898
+ mempalace-code fetch-model # cache or verify model for offline use
863
899
  ```
864
900
 
865
901
  </details>
@@ -884,7 +920,7 @@ Code mining is automatic via `mempalace-code watch`. For conversation context (d
884
920
  mempalace/
885
921
  ├── mempalace_code/
886
922
  │ ├── cli.py ← CLI entry point
887
- │ ├── mcp_server.py ← MCP server (28 tools, profiled at startup)
923
+ │ ├── mcp_server.py ← MCP server (29 tools, profiled at startup)
888
924
  │ ├── storage.py ← LanceDB vector storage
889
925
  │ ├── miner.py ← language-aware code chunking
890
926
  │ ├── convo_miner.py ← conversation ingest
@@ -896,7 +932,7 @@ mempalace/
896
932
  ├── benchmarks/ ← reproducible benchmark runners
897
933
  ├── hooks/ ← Claude Code auto-save hooks (legacy, optional)
898
934
  ├── examples/ ← usage examples
899
- └── tests/ ← 2025 tests
935
+ └── tests/ ← 2200+ tests
900
936
  ```
901
937
 
902
938
  </details>
@@ -917,7 +953,7 @@ python -m pyright --pythonpath "$(python -c 'import sys; print(sys.executable)')
917
953
  Apache 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).
918
954
 
919
955
  <!-- Link Definitions -->
920
- [version-shield]: https://img.shields.io/badge/version-1.10.0-4dc9f6?style=flat-square&labelColor=0a0e14
956
+ [version-shield]: https://img.shields.io/badge/version-1.10.2-4dc9f6?style=flat-square&labelColor=0a0e14
921
957
  [release-link]: https://github.com/rergards/mempalace-code/releases
922
958
  [python-shield]: https://img.shields.io/badge/python-3.11+-7dd8f8?style=flat-square&labelColor=0a0e14&logo=python&logoColor=7dd8f8
923
959
  [python-link]: https://www.python.org/