memleaf 0.2.42__tar.gz → 0.2.43__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 (244) hide show
  1. {memleaf-0.2.42 → memleaf-0.2.43}/CHANGELOG.md +5 -0
  2. {memleaf-0.2.42 → memleaf-0.2.43}/MANIFEST.in +2 -3
  3. {memleaf-0.2.42 → memleaf-0.2.43}/PKG-INFO +4 -12
  4. {memleaf-0.2.42 → memleaf-0.2.43}/README.en.md +3 -11
  5. {memleaf-0.2.42 → memleaf-0.2.43}/README.md +3 -11
  6. {memleaf-0.2.42 → memleaf-0.2.43}/docs/general-processing.md +25 -18
  7. {memleaf-0.2.42 → memleaf-0.2.43}/docs/processing-quality-acceptance.md +10 -2
  8. memleaf-0.2.43/examples/README.md +19 -0
  9. {memleaf-0.2.42 → memleaf-0.2.43}/pyproject.toml +1 -1
  10. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/__init__.py +1 -1
  11. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/plugin.yaml +1 -1
  12. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf.egg-info/PKG-INFO +4 -12
  13. memleaf-0.2.43/src/memleaf.egg-info/SOURCES.txt +109 -0
  14. memleaf-0.2.42/IMPLEMENTATION_PLAN.md +0 -143
  15. memleaf-0.2.42/RELEASE_CHECKLIST.md +0 -97
  16. memleaf-0.2.42/examples/README.md +0 -35
  17. memleaf-0.2.42/examples/live_core_lifecycle_acceptance.py +0 -156
  18. memleaf-0.2.42/examples/live_processing_acceptance.py +0 -126
  19. memleaf-0.2.42/src/memleaf.egg-info/SOURCES.txt +0 -240
  20. memleaf-0.2.42/tests/__init__.py +0 -0
  21. memleaf-0.2.42/tests/hermes_provider_support.py +0 -189
  22. memleaf-0.2.42/tests/semantic_fixtures.py +0 -115
  23. memleaf-0.2.42/tests/stage_b1_support.py +0 -110
  24. memleaf-0.2.42/tests/stage_b2a_support.py +0 -139
  25. memleaf-0.2.42/tests/test_admission_noise.py +0 -1169
  26. memleaf-0.2.42/tests/test_audit_followup_v041.py +0 -496
  27. memleaf-0.2.42/tests/test_automatic_duplicate_noop_collision.py +0 -126
  28. memleaf-0.2.42/tests/test_b3_activation.py +0 -131
  29. memleaf-0.2.42/tests/test_b3_closeout.py +0 -302
  30. memleaf-0.2.42/tests/test_b3_planning_context.py +0 -74
  31. memleaf-0.2.42/tests/test_b3_scope_provenance.py +0 -187
  32. memleaf-0.2.42/tests/test_b3_single_pass_memory_planner.py +0 -315
  33. memleaf-0.2.42/tests/test_b3_single_pass_plan.py +0 -461
  34. memleaf-0.2.42/tests/test_backlog_bound_v2.py +0 -81
  35. memleaf-0.2.42/tests/test_batch_review.py +0 -215
  36. memleaf-0.2.42/tests/test_batch_review_integration.py +0 -146
  37. memleaf-0.2.42/tests/test_candidate_polarity.py +0 -220
  38. memleaf-0.2.42/tests/test_codex_install.py +0 -339
  39. memleaf-0.2.42/tests/test_codex_native_cli.py +0 -90
  40. memleaf-0.2.42/tests/test_config_migrations_v028.py +0 -60
  41. memleaf-0.2.42/tests/test_context_budget.py +0 -259
  42. memleaf-0.2.42/tests/test_conversation_only.py +0 -111
  43. memleaf-0.2.42/tests/test_credential_safety.py +0 -98
  44. memleaf-0.2.42/tests/test_cross_host_acceptance.py +0 -143
  45. memleaf-0.2.42/tests/test_cross_turn_dedupe_regressions.py +0 -194
  46. memleaf-0.2.42/tests/test_due_date_grounding.py +0 -123
  47. memleaf-0.2.42/tests/test_due_date_grounding_retry.py +0 -136
  48. memleaf-0.2.42/tests/test_email_actionable_coverage.py +0 -407
  49. memleaf-0.2.42/tests/test_evidence_budget.py +0 -192
  50. memleaf-0.2.42/tests/test_evidence_retention_policy.py +0 -450
  51. memleaf-0.2.42/tests/test_explicit_remember_budget_v2.py +0 -91
  52. memleaf-0.2.42/tests/test_external_source_dates.py +0 -259
  53. memleaf-0.2.42/tests/test_extraction_quality_regressions.py +0 -752
  54. memleaf-0.2.42/tests/test_extraction_unified_v2.py +0 -244
  55. memleaf-0.2.42/tests/test_gate_capacity.py +0 -588
  56. memleaf-0.2.42/tests/test_gate_output_protocol_v041.py +0 -222
  57. memleaf-0.2.42/tests/test_gate_output_references_v041.py +0 -49
  58. memleaf-0.2.42/tests/test_gate_protocol_matrix_v041.py +0 -112
  59. memleaf-0.2.42/tests/test_gate_schema_repair.py +0 -200
  60. memleaf-0.2.42/tests/test_gate_scope_latency_v038.py +0 -204
  61. memleaf-0.2.42/tests/test_general_evidence_admission.py +0 -874
  62. memleaf-0.2.42/tests/test_general_tool_provenance.py +0 -62
  63. memleaf-0.2.42/tests/test_global_todo_acceptance.py +0 -291
  64. memleaf-0.2.42/tests/test_global_todo_query_no_write.py +0 -459
  65. memleaf-0.2.42/tests/test_global_todo_retrieval.py +0 -112
  66. memleaf-0.2.42/tests/test_hermes_native_registration.py +0 -144
  67. memleaf-0.2.42/tests/test_hermes_provider.py +0 -9
  68. memleaf-0.2.42/tests/test_hermes_provider_01.py +0 -624
  69. memleaf-0.2.42/tests/test_hermes_provider_02.py +0 -705
  70. memleaf-0.2.42/tests/test_hermes_provider_03.py +0 -663
  71. memleaf-0.2.42/tests/test_hermes_provider_04.py +0 -331
  72. memleaf-0.2.42/tests/test_hermes_runtime_install.py +0 -674
  73. memleaf-0.2.42/tests/test_hermes_stdio_transport.py +0 -129
  74. memleaf-0.2.42/tests/test_hermes_transport_evidence.py +0 -92
  75. memleaf-0.2.42/tests/test_hermes_windows_subprocess.py +0 -43
  76. memleaf-0.2.42/tests/test_host_events.py +0 -839
  77. memleaf-0.2.42/tests/test_host_runtime_contract.py +0 -111
  78. memleaf-0.2.42/tests/test_inspection_state_v028.py +0 -33
  79. memleaf-0.2.42/tests/test_install.py +0 -431
  80. memleaf-0.2.42/tests/test_long_run_hygiene.py +0 -179
  81. memleaf-0.2.42/tests/test_maintenance_v2.py +0 -1414
  82. memleaf-0.2.42/tests/test_model_discovery.py +0 -296
  83. memleaf-0.2.42/tests/test_model_invalid_response_metrics_v041.py +0 -87
  84. memleaf-0.2.42/tests/test_model_owned_fields.py +0 -255
  85. memleaf-0.2.42/tests/test_new_scope_source_grounding.py +0 -234
  86. memleaf-0.2.42/tests/test_p3_summary_batch.py +0 -233
  87. memleaf-0.2.42/tests/test_partial_retry_idempotency.py +0 -330
  88. memleaf-0.2.42/tests/test_phase2_model_decisions.py +0 -337
  89. memleaf-0.2.42/tests/test_process_jobs.py +0 -151
  90. memleaf-0.2.42/tests/test_process_jobs_backlog_v2.py +0 -51
  91. memleaf-0.2.42/tests/test_process_jobs_state_corruption_v2.py +0 -107
  92. memleaf-0.2.42/tests/test_process_owner_locking.py +0 -96
  93. memleaf-0.2.42/tests/test_processing_contract_v026.py +0 -329
  94. memleaf-0.2.42/tests/test_processing_observability_concurrency.py +0 -362
  95. memleaf-0.2.42/tests/test_prompt_role_slim_v040.py +0 -106
  96. memleaf-0.2.42/tests/test_provider_neutral_thinking_v039.py +0 -246
  97. memleaf-0.2.42/tests/test_pypi_install.py +0 -284
  98. memleaf-0.2.42/tests/test_read_only_deferred_isolation.py +0 -194
  99. memleaf-0.2.42/tests/test_read_only_zero_call_v2.py +0 -116
  100. memleaf-0.2.42/tests/test_retrieval_gate.py +0 -183
  101. memleaf-0.2.42/tests/test_retrieval_v2.py +0 -203
  102. memleaf-0.2.42/tests/test_review_source_context.py +0 -46
  103. memleaf-0.2.42/tests/test_revision_digest.py +0 -49
  104. memleaf-0.2.42/tests/test_session_lineage.py +0 -421
  105. memleaf-0.2.42/tests/test_shared_memory_refactor.py +0 -257
  106. memleaf-0.2.42/tests/test_single_pass_prompt_slim_v2.py +0 -73
  107. memleaf-0.2.42/tests/test_single_pass_protocol_capability_v2.py +0 -186
  108. memleaf-0.2.42/tests/test_source_neutral_todos_v028.py +0 -49
  109. memleaf-0.2.42/tests/test_stage_a.py +0 -430
  110. memleaf-0.2.42/tests/test_stage_b1.py +0 -1151
  111. memleaf-0.2.42/tests/test_stage_b1_01.py +0 -497
  112. memleaf-0.2.42/tests/test_stage_b2a.py +0 -9
  113. memleaf-0.2.42/tests/test_stage_b2a_01.py +0 -530
  114. memleaf-0.2.42/tests/test_stage_b2a_02.py +0 -674
  115. memleaf-0.2.42/tests/test_stage_b2a_03.py +0 -641
  116. memleaf-0.2.42/tests/test_stage_b2a_04.py +0 -629
  117. memleaf-0.2.42/tests/test_stage_b2a_05.py +0 -317
  118. memleaf-0.2.42/tests/test_stage_b2b.py +0 -609
  119. memleaf-0.2.42/tests/test_stage_b3a_commit.py +0 -443
  120. memleaf-0.2.42/tests/test_stage_b3a_contract.py +0 -283
  121. memleaf-0.2.42/tests/test_stage_b3b_native_context.py +0 -299
  122. memleaf-0.2.42/tests/test_stage_b3b_native_index.py +0 -268
  123. memleaf-0.2.42/tests/test_stage_b3b_scope.py +0 -369
  124. memleaf-0.2.42/tests/test_stage_b3c_retrieval.py +0 -308
  125. memleaf-0.2.42/tests/test_stage_b3d_scope_maintenance.py +0 -594
  126. memleaf-0.2.42/tests/test_stage_c1_mcp.py +0 -808
  127. memleaf-0.2.42/tests/test_stage_c2_init.py +0 -802
  128. memleaf-0.2.42/tests/test_stage_c3_packaging.py +0 -165
  129. memleaf-0.2.42/tests/test_state_layout_v028.py +0 -200
  130. memleaf-0.2.42/tests/test_summary_date_grounding_integration.py +0 -39
  131. memleaf-0.2.42/tests/test_target_reconciliation.py +0 -345
  132. memleaf-0.2.42/tests/test_target_reconciliation_integration.py +0 -50
  133. memleaf-0.2.42/tests/test_todo_state_recovery.py +0 -312
  134. memleaf-0.2.42/tests/test_update_review.py +0 -779
  135. memleaf-0.2.42/tests/test_update_target_recovery.py +0 -1057
  136. memleaf-0.2.42/tests/test_upgrade_preserves_vault.py +0 -108
  137. memleaf-0.2.42/tests/test_v023_scope_correction.py +0 -185
  138. memleaf-0.2.42/tests/test_v2_gate_limits.py +0 -111
  139. memleaf-0.2.42/tests/test_v2_host_flow.py +0 -240
  140. memleaf-0.2.42/tests/test_v2_mcp_flow.py +0 -481
  141. memleaf-0.2.42/tests/test_v2_nomatch_semantics.py +0 -106
  142. memleaf-0.2.42/tests/test_v2_search_gate_acceptance.py +0 -147
  143. memleaf-0.2.42/tests/test_whole_unit_bindings.py +0 -361
  144. memleaf-0.2.42/tests/test_windows_public_mcp_launcher.py +0 -75
  145. memleaf-0.2.42/tests/test_worker_owner_state_v2.py +0 -87
  146. memleaf-0.2.42/tests/test_worker_restart_budget_v2.py +0 -259
  147. {memleaf-0.2.42 → memleaf-0.2.43}/LICENSE +0 -0
  148. {memleaf-0.2.42 → memleaf-0.2.43}/docs/capture-budget-design.md +0 -0
  149. {memleaf-0.2.42 → memleaf-0.2.43}/docs/config-migrations.md +0 -0
  150. {memleaf-0.2.42 → memleaf-0.2.43}/docs/core-refactor.md +0 -0
  151. {memleaf-0.2.42 → memleaf-0.2.43}/docs/evidence-retention.md +0 -0
  152. {memleaf-0.2.42 → memleaf-0.2.43}/docs/gate-evidence-boundary.md +0 -0
  153. {memleaf-0.2.42 → memleaf-0.2.43}/docs/hermes-mcp-runtime.md +0 -0
  154. {memleaf-0.2.42 → memleaf-0.2.43}/docs/v0.2.26-processing-status.md +0 -0
  155. {memleaf-0.2.42 → memleaf-0.2.43}/examples/basic_usage.py +0 -0
  156. {memleaf-0.2.42 → memleaf-0.2.43}/examples/mcp_stdio.ndjson +0 -0
  157. {memleaf-0.2.42 → memleaf-0.2.43}/install.ps1 +0 -0
  158. {memleaf-0.2.42 → memleaf-0.2.43}/install.sh +0 -0
  159. {memleaf-0.2.42 → memleaf-0.2.43}/setup.cfg +0 -0
  160. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/__main__.py +0 -0
  161. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/adapters/__init__.py +0 -0
  162. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/adapters/antigravity.py +0 -0
  163. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/adapters/base.py +0 -0
  164. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/adapters/codex.py +0 -0
  165. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/adapters/hermes.py +0 -0
  166. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/admission.py +0 -0
  167. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/batch_review.py +0 -0
  168. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/budget.py +0 -0
  169. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/capture.py +0 -0
  170. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/cli.py +0 -0
  171. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/compaction.py +0 -0
  172. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/config.py +0 -0
  173. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/create_coordinator.py +0 -0
  174. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/credentials.py +0 -0
  175. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/evidence_budget.py +0 -0
  176. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/evidence_policy.py +0 -0
  177. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/evidence_structure.py +0 -0
  178. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/evidence_syntax.py +0 -0
  179. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/extraction_budget.py +0 -0
  180. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/extraction_capability.py +0 -0
  181. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/extraction_work_state.py +0 -0
  182. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/frontmatter.py +0 -0
  183. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/README.md +0 -0
  184. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/__init__.py +0 -0
  185. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/_mcp_client.py +0 -0
  186. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/_provider.py +0 -0
  187. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/_shared.py +0 -0
  188. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_provider/evidence_budget.py +0 -0
  189. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/hermes_runtime.py +0 -0
  190. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/host_events.py +0 -0
  191. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/host_runtime.py +0 -0
  192. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/inbox.py +0 -0
  193. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/index.py +0 -0
  194. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/inspection.py +0 -0
  195. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/installer.py +0 -0
  196. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/__init__.py +0 -0
  197. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/base.py +0 -0
  198. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/claude_compatible.py +0 -0
  199. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/gemini.py +0 -0
  200. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/openai_compatible.py +0 -0
  201. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/router.py +0 -0
  202. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/llm/thinking.py +0 -0
  203. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/locking.py +0 -0
  204. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/mcp_server.py +0 -0
  205. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/memory_commit.py +0 -0
  206. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/memory_planner.py +0 -0
  207. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/memory_writer.py +0 -0
  208. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/model_discovery.py +0 -0
  209. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/model_execution.py +0 -0
  210. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/models.py +0 -0
  211. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/native_index.py +0 -0
  212. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/native_registration.py +0 -0
  213. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/parallel_model.py +0 -0
  214. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/planning_context.py +0 -0
  215. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/process_common.py +0 -0
  216. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/process_jobs.py +0 -0
  217. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/process_journal.py +0 -0
  218. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/process_owner.py +0 -0
  219. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/processing.py +0 -0
  220. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/prompts.py +0 -0
  221. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/provenance.py +0 -0
  222. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/recording_policy.py +0 -0
  223. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/redaction.py +0 -0
  224. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/retention.py +0 -0
  225. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/retrieval.py +0 -0
  226. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/retrieval_gate.py +0 -0
  227. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/scope_maintenance.py +0 -0
  228. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/scope_state.py +0 -0
  229. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/service.py +0 -0
  230. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/single_pass_memory_planner.py +0 -0
  231. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/single_pass_plan.py +0 -0
  232. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/source_policy.py +0 -0
  233. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/state_layout.py +0 -0
  234. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/summary_batch.py +0 -0
  235. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/target_reconciliation.py +0 -0
  236. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/turn_audit.py +0 -0
  237. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/turn_plan.py +0 -0
  238. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/update_coordinator.py +0 -0
  239. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/update_review.py +0 -0
  240. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/validation.py +0 -0
  241. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf/vault.py +0 -0
  242. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf.egg-info/dependency_links.txt +0 -0
  243. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf.egg-info/entry_points.txt +0 -0
  244. {memleaf-0.2.42 → memleaf-0.2.43}/src/memleaf.egg-info/top_level.txt +0 -0
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to memleaf are documented here.
4
4
 
5
+ ## 0.2.43 — 2026-09-12
6
+
7
+ - Keep regression tests, live-acceptance helpers, and implementation/release plans in local checkouts rather than the Git tree or source distribution.
8
+ - Narrow hosted CI to package build and installed-command smoke checks while retaining the existing release metadata checks and GitHub/PyPI publication workflow.
9
+
5
10
  ## 0.2.42 — 2026-09-12
6
11
 
7
12
  - Rework ordinary automatic extraction around the unified `b3-single-pass-v1` planner. The current visible user/assistant turn is the only new-fact evidence; existing local/native memories remain comparison context. One structured model stage decides CREATE / UPDATE / NO_CHANGE / DEFERRED, with deterministic Core validation and at most one bounded format/structure repair.
@@ -4,9 +4,8 @@ include install.sh
4
4
  include install.ps1
5
5
  include README.md
6
6
  include README.en.md
7
- include RELEASE_CHECKLIST.md
8
- include IMPLEMENTATION_PLAN.md
9
- recursive-include tests *.py
10
7
  recursive-include examples *.md *.ndjson *.py
8
+ recursive-exclude examples *_acceptance.py
9
+ prune tests
11
10
 
12
11
  include docs/*.md
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memleaf
3
- Version: 0.2.42
3
+ Version: 0.2.43
4
4
  Summary: A local-first Markdown memory core for AI agents
5
5
  Author: memleaf contributors
6
6
  License-Expression: MIT
@@ -23,7 +23,7 @@ Dynamic: license-file
23
23
 
24
24
  [English](README.en.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
25
25
 
26
- > **版本:0.2.42。**
26
+ > **版本:0.2.43。**
27
27
  > 记忆只从用户与 Agent 的可见对话提炼。Agent 已在回复中整理的事实、项目进展和明确待办可作为来源;邮件、附件、网页和终端等工具原文不进入记忆提炼。模型负责保留原话中的不确定性,现有记忆仅用于比较、去重和更新。Markdown 仍是唯一事实源。
28
28
  > **当前版本支持 Hermes 和 Codex。** Antigravity(反重力)不检测、不安装、不配置。
29
29
 
@@ -451,17 +451,9 @@ history:
451
451
  - 选择 API/云端模型后,模型处理输入会离开本机并发送给该提供方;
452
452
  - `context()` 或无宿主绑定的客户端只能获得单页边界,不能宣称具备跨轮硬预算。
453
453
 
454
- ## 开发与验证
454
+ ## 开发与构建
455
455
 
456
- 要求 Python 3.11+。本地运行测试:
457
-
458
- ```bash
459
- PYTHONPATH=src python3.11 -m unittest discover -s tests -p 'test_*.py' -v
460
- python3.11 -m compileall -q src tests examples
461
- git diff --check
462
- ```
463
-
464
- GitHub Actions 覆盖 Linux 与 Windows 的 Python 3.11、3.12、3.13 测试,并验证 wheel/source distribution 构建、源码包测试和 Windows PowerShell 安装器语法。构建发行包需要 `build`:
456
+ 要求 Python 3.11+。GitHub Actions 在 Python 3.12 上构建 wheel 和 source distribution,并对安装后的包、命令入口和版本信息做冒烟检查。构建发行包需要 `build`:
465
457
 
466
458
  ```bash
467
459
  python -m pip install build
@@ -4,7 +4,7 @@
4
4
 
5
5
  [中文](README.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
6
6
 
7
- > **Version: 0.2.42.**
7
+ > **Version: 0.2.43.**
8
8
  > Automatic extraction now uses only the current turn's visible user input and final assistant reply. Raw tool output, attachments, web/file/terminal payloads and legacy tool-evidence bodies are not new source evidence; existing or retrieved memory remains comparison context rather than source authority. Background processing is persisted as a local job and can be checked through the read-only `process_status` MCP tool; failed work remains retryable and fail closed. The release also tightens source/date grounding, target reconciliation, duplicate/no-op handling and semantic review before writes. Markdown remains the sole source of truth with no SQLite runtime dependency. Acceptance covers deterministic regression suites and synthetic inputs; it does not claim real-mail or customer-business acceptance.
9
9
  > **The current release supports Hermes and Codex.** Antigravity is not detected, installed, or configured.
10
10
 
@@ -434,17 +434,9 @@ Directories are normally created with mode `0700`, and files are stored as plain
434
434
  - If an API or cloud model is selected, model-processing input leaves the machine and is sent to that provider.
435
435
  - `context()` and clients without a host-bound retrieval turn only have per-page limits; they cannot claim cross-turn hard budgets.
436
436
 
437
- ## Development and verification
437
+ ## Development and builds
438
438
 
439
- Python 3.11+ is required. Run locally:
440
-
441
- ```bash
442
- PYTHONPATH=src python3.11 -m unittest discover -s tests -p 'test_*.py' -v
443
- python3.11 -m compileall -q src tests examples
444
- git diff --check
445
- ```
446
-
447
- GitHub Actions covers Python 3.11, 3.12, and 3.13 on Linux and Windows, plus wheel/source-distribution builds, source-archive tests, and PowerShell installer syntax validation. Build packages with:
439
+ Python 3.11+ is required. GitHub Actions builds the wheel and source distribution on Python 3.12, then smoke-checks the installed package, CLI entry points, and version commands. Build packages with:
448
440
 
449
441
  ```bash
450
442
  python -m pip install build
@@ -4,7 +4,7 @@
4
4
 
5
5
  [English](README.en.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
6
6
 
7
- > **版本:0.2.42。**
7
+ > **版本:0.2.43。**
8
8
  > 记忆只从用户与 Agent 的可见对话提炼。Agent 已在回复中整理的事实、项目进展和明确待办可作为来源;邮件、附件、网页和终端等工具原文不进入记忆提炼。模型负责保留原话中的不确定性,现有记忆仅用于比较、去重和更新。Markdown 仍是唯一事实源。
9
9
  > **当前版本支持 Hermes 和 Codex。** Antigravity(反重力)不检测、不安装、不配置。
10
10
 
@@ -432,17 +432,9 @@ history:
432
432
  - 选择 API/云端模型后,模型处理输入会离开本机并发送给该提供方;
433
433
  - `context()` 或无宿主绑定的客户端只能获得单页边界,不能宣称具备跨轮硬预算。
434
434
 
435
- ## 开发与验证
435
+ ## 开发与构建
436
436
 
437
- 要求 Python 3.11+。本地运行测试:
438
-
439
- ```bash
440
- PYTHONPATH=src python3.11 -m unittest discover -s tests -p 'test_*.py' -v
441
- python3.11 -m compileall -q src tests examples
442
- git diff --check
443
- ```
444
-
445
- GitHub Actions 覆盖 Linux 与 Windows 的 Python 3.11、3.12、3.13 测试,并验证 wheel/source distribution 构建、源码包测试和 Windows PowerShell 安装器语法。构建发行包需要 `build`:
437
+ 要求 Python 3.11+。GitHub Actions 在 Python 3.12 上构建 wheel 和 source distribution,并对安装后的包、命令入口和版本信息做冒烟检查。构建发行包需要 `build`:
446
438
 
447
439
  ```bash
448
440
  python -m pip install build
@@ -122,11 +122,15 @@ the preview. There is deliberately no apply-preview command.
122
122
 
123
123
  ## Verification boundaries
124
124
 
125
+ The regression suite and acceptance helpers referenced here are maintained
126
+ locally and are not included in this repository or its source distribution.
127
+ Remote CI validates package construction and installed command entry points only.
128
+
125
129
  Deterministic backends test schema and filesystem behavior, not hosted-model
126
- accuracy. tests/semantic_fixtures.py adapts prescribed old Gate judgments to the
127
- quote protocol for update/history/maintenance tests. It does not run in product
128
- code and is not proof those judgments are semantically sound. New adversarial
129
- protocol tests choose their quotations explicitly. No model score or absolute
130
+ accuracy. The local-only `tests/semantic_fixtures.py` adapts prescribed old Gate
131
+ judgments to the quote protocol for update/history/maintenance tests. It does
132
+ not run in product code and is not proof those judgments are semantically sound.
133
+ New adversarial protocol tests choose their quotations explicitly. No model score or absolute
130
134
  "all languages/all scenarios" accuracy claim is made.
131
135
 
132
136
  Before release, separately inspect live Model Route behavior on held-out real
@@ -142,20 +146,23 @@ that acceptance.
142
146
  Windows processing-owner liveness is queried through a process handle with
143
147
  SYNCHRONIZE access, never by sending a signal. Shared-Vault writes use a
144
148
  native byte-range lock between processes, not only a Python thread mutex.
145
- Native child-process tests run on Linux, macOS and Windows.
146
-
147
- The full Python suite runs on all three OS families. Only the `install.sh`
148
- shell-harness class is POSIX-only; Windows retains installation, upgrade,
149
- PowerShell syntax, host lifecycle and native Codex acceptance. Test launchers
150
- use native `.cmd` wrappers on Windows. Byte-preservation assertions compare
151
- actual before/after bytes, including CRLF. POSIX mode-bit checks are conditional:
152
- Windows file privacy follows the Vault directory's inherited ACLs, and Unix
153
- `0600` must not be interpreted as proof of a Windows owner-only DACL.
154
-
155
- Real-model acceptance requires an explicit model route in repository Actions:
156
- secret `MEMLEAF_LIVE_MODEL_TOKEN` and variables `MEMLEAF_LIVE_BASE_URL` and
157
- `MEMLEAF_LIVE_MODEL`. Missing configuration is a blocked acceptance result,
158
- not a passing semantic test. Never publish based only on deterministic mocks.
149
+ The local-only Python suite is intended to run on all three OS families; remote
150
+ CI does not exercise it. Native child-process tests cover Linux, macOS and
151
+ Windows when run locally.
152
+
153
+ Only the `install.sh` shell-harness class is POSIX-only; local Windows checks
154
+ cover installation, upgrade, PowerShell syntax, host lifecycle and native Codex
155
+ acceptance. Test launchers use native `.cmd` wrappers on Windows.
156
+ Byte-preservation assertions compare actual before/after bytes, including CRLF.
157
+ POSIX mode-bit checks are conditional: Windows file privacy follows the Vault
158
+ directory's inherited ACLs, and Unix `0600` must not be interpreted as proof of a
159
+ Windows owner-only DACL.
160
+
161
+ Real-model acceptance requires an explicitly configured model route using
162
+ `MEMLEAF_LIVE_MODEL_TOKEN`, `MEMLEAF_LIVE_BASE_URL`, and `MEMLEAF_LIVE_MODEL`.
163
+ Live acceptance tooling is maintained locally and is not run by remote CI.
164
+ Missing configuration is a blocked acceptance result, not a passing semantic
165
+ test. Never publish based only on deterministic mocks.
159
166
 
160
167
  ## Capture policy
161
168
 
@@ -2,6 +2,11 @@
2
2
 
3
3
  This document defines acceptance for automatic memory extraction without treating one validation layer as proof of another.
4
4
 
5
+ The deterministic suite and acceptance helpers described below are maintained
6
+ locally and are not committed or shipped. Remote CI currently validates package
7
+ construction and installed command entry points only; the layers below are not
8
+ automatically exercised by that workflow.
9
+
5
10
  ## Invariants
6
11
 
7
12
  - Markdown under `knowledge/` remains the active-memory source of truth; `history/` remains historical state.
@@ -45,9 +50,12 @@ Required checks include:
45
50
 
46
51
  Passing this layer proves only the deterministic contracts under test.
47
52
 
48
- ### 2. Cross-platform CI and MCP/background-runtime verification
53
+ ### 2. Cross-platform local regression and MCP/background-runtime verification
49
54
 
50
- Run the repository's supported OS matrix and the process-job/MCP tests. Verify that detached worker status exposes the bounded metrics, reruns aggregate metrics safely, and no model call is made while the Vault write lock is held.
55
+ Run the maintained local-only test suite on supported OSes and the
56
+ process-job/MCP tests. Verify that detached worker status exposes the bounded
57
+ metrics, reruns aggregate metrics safely, and no model call is made while the
58
+ Vault write lock is held.
51
59
 
52
60
  Passing this layer proves the tested runtime paths and platforms. It does not prove that a real model will always extract every business fact.
53
61
 
@@ -0,0 +1,19 @@
1
+ # Examples
2
+
3
+ `basic_usage.py` runs entirely offline. Without `--vault` it creates a
4
+ temporary vault; pass a directory explicitly when you want to inspect the
5
+ generated Markdown after the process exits.
6
+
7
+ The example shows a lightweight `context()` directory followed by an explicit
8
+ `read_page()` call for the selected entry. Directory results contain no body;
9
+ long bodies can be read in subsequent pages using `next_offset` and `version`.
10
+
11
+ The `mcp_stdio.ndjson` file contains one legacy initialization request and one
12
+ modern discovery request. Pipe it to the stdio adapter with an explicit vault:
13
+
14
+ ```sh
15
+ python -m memleaf.mcp_server --vault <your-vault> < examples/mcp_stdio.ndjson
16
+ ```
17
+
18
+ The NDJSON file is request-only and intentionally contains no tool call,
19
+ network endpoint, local path, or secret.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "memleaf"
7
- version = "0.2.42"
7
+ version = "0.2.43"
8
8
  description = "A local-first Markdown memory core for AI agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  """Local-first Markdown memory core for AI agents."""
2
2
 
3
- __version__ = "0.2.42"
3
+ __version__ = "0.2.43"
4
4
 
5
5
  from .config import DEFAULT_CONFIG, default_config, load_config, save_config
6
6
  from .frontmatter import FrontmatterError, dump_frontmatter, dump_yaml, load_yaml, parse_frontmatter
@@ -1,5 +1,5 @@
1
1
  name: memleaf
2
- version: 0.2.42
2
+ version: 0.2.43
3
3
  description: "Hermes-native external MemoryProvider for local-first Markdown memory shared with the memleaf MCP server."
4
4
  hooks:
5
5
  - prefetch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memleaf
3
- Version: 0.2.42
3
+ Version: 0.2.43
4
4
  Summary: A local-first Markdown memory core for AI agents
5
5
  Author: memleaf contributors
6
6
  License-Expression: MIT
@@ -23,7 +23,7 @@ Dynamic: license-file
23
23
 
24
24
  [English](README.en.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
25
25
 
26
- > **版本:0.2.42。**
26
+ > **版本:0.2.43。**
27
27
  > 记忆只从用户与 Agent 的可见对话提炼。Agent 已在回复中整理的事实、项目进展和明确待办可作为来源;邮件、附件、网页和终端等工具原文不进入记忆提炼。模型负责保留原话中的不确定性,现有记忆仅用于比较、去重和更新。Markdown 仍是唯一事实源。
28
28
  > **当前版本支持 Hermes 和 Codex。** Antigravity(反重力)不检测、不安装、不配置。
29
29
 
@@ -451,17 +451,9 @@ history:
451
451
  - 选择 API/云端模型后,模型处理输入会离开本机并发送给该提供方;
452
452
  - `context()` 或无宿主绑定的客户端只能获得单页边界,不能宣称具备跨轮硬预算。
453
453
 
454
- ## 开发与验证
454
+ ## 开发与构建
455
455
 
456
- 要求 Python 3.11+。本地运行测试:
457
-
458
- ```bash
459
- PYTHONPATH=src python3.11 -m unittest discover -s tests -p 'test_*.py' -v
460
- python3.11 -m compileall -q src tests examples
461
- git diff --check
462
- ```
463
-
464
- GitHub Actions 覆盖 Linux 与 Windows 的 Python 3.11、3.12、3.13 测试,并验证 wheel/source distribution 构建、源码包测试和 Windows PowerShell 安装器语法。构建发行包需要 `build`:
456
+ 要求 Python 3.11+。GitHub Actions 在 Python 3.12 上构建 wheel 和 source distribution,并对安装后的包、命令入口和版本信息做冒烟检查。构建发行包需要 `build`:
465
457
 
466
458
  ```bash
467
459
  python -m pip install build
@@ -0,0 +1,109 @@
1
+ CHANGELOG.md
2
+ LICENSE
3
+ MANIFEST.in
4
+ README.en.md
5
+ README.md
6
+ install.ps1
7
+ install.sh
8
+ pyproject.toml
9
+ docs/capture-budget-design.md
10
+ docs/config-migrations.md
11
+ docs/core-refactor.md
12
+ docs/evidence-retention.md
13
+ docs/gate-evidence-boundary.md
14
+ docs/general-processing.md
15
+ docs/hermes-mcp-runtime.md
16
+ docs/processing-quality-acceptance.md
17
+ docs/v0.2.26-processing-status.md
18
+ examples/README.md
19
+ examples/basic_usage.py
20
+ examples/mcp_stdio.ndjson
21
+ src/memleaf/__init__.py
22
+ src/memleaf/__main__.py
23
+ src/memleaf/admission.py
24
+ src/memleaf/batch_review.py
25
+ src/memleaf/budget.py
26
+ src/memleaf/capture.py
27
+ src/memleaf/cli.py
28
+ src/memleaf/compaction.py
29
+ src/memleaf/config.py
30
+ src/memleaf/create_coordinator.py
31
+ src/memleaf/credentials.py
32
+ src/memleaf/evidence_budget.py
33
+ src/memleaf/evidence_policy.py
34
+ src/memleaf/evidence_structure.py
35
+ src/memleaf/evidence_syntax.py
36
+ src/memleaf/extraction_budget.py
37
+ src/memleaf/extraction_capability.py
38
+ src/memleaf/extraction_work_state.py
39
+ src/memleaf/frontmatter.py
40
+ src/memleaf/hermes_runtime.py
41
+ src/memleaf/host_events.py
42
+ src/memleaf/host_runtime.py
43
+ src/memleaf/inbox.py
44
+ src/memleaf/index.py
45
+ src/memleaf/inspection.py
46
+ src/memleaf/installer.py
47
+ src/memleaf/locking.py
48
+ src/memleaf/mcp_server.py
49
+ src/memleaf/memory_commit.py
50
+ src/memleaf/memory_planner.py
51
+ src/memleaf/memory_writer.py
52
+ src/memleaf/model_discovery.py
53
+ src/memleaf/model_execution.py
54
+ src/memleaf/models.py
55
+ src/memleaf/native_index.py
56
+ src/memleaf/native_registration.py
57
+ src/memleaf/parallel_model.py
58
+ src/memleaf/planning_context.py
59
+ src/memleaf/process_common.py
60
+ src/memleaf/process_jobs.py
61
+ src/memleaf/process_journal.py
62
+ src/memleaf/process_owner.py
63
+ src/memleaf/processing.py
64
+ src/memleaf/prompts.py
65
+ src/memleaf/provenance.py
66
+ src/memleaf/recording_policy.py
67
+ src/memleaf/redaction.py
68
+ src/memleaf/retention.py
69
+ src/memleaf/retrieval.py
70
+ src/memleaf/retrieval_gate.py
71
+ src/memleaf/scope_maintenance.py
72
+ src/memleaf/scope_state.py
73
+ src/memleaf/service.py
74
+ src/memleaf/single_pass_memory_planner.py
75
+ src/memleaf/single_pass_plan.py
76
+ src/memleaf/source_policy.py
77
+ src/memleaf/state_layout.py
78
+ src/memleaf/summary_batch.py
79
+ src/memleaf/target_reconciliation.py
80
+ src/memleaf/turn_audit.py
81
+ src/memleaf/turn_plan.py
82
+ src/memleaf/update_coordinator.py
83
+ src/memleaf/update_review.py
84
+ src/memleaf/validation.py
85
+ src/memleaf/vault.py
86
+ src/memleaf.egg-info/PKG-INFO
87
+ src/memleaf.egg-info/SOURCES.txt
88
+ src/memleaf.egg-info/dependency_links.txt
89
+ src/memleaf.egg-info/entry_points.txt
90
+ src/memleaf.egg-info/top_level.txt
91
+ src/memleaf/adapters/__init__.py
92
+ src/memleaf/adapters/antigravity.py
93
+ src/memleaf/adapters/base.py
94
+ src/memleaf/adapters/codex.py
95
+ src/memleaf/adapters/hermes.py
96
+ src/memleaf/hermes_provider/README.md
97
+ src/memleaf/hermes_provider/__init__.py
98
+ src/memleaf/hermes_provider/_mcp_client.py
99
+ src/memleaf/hermes_provider/_provider.py
100
+ src/memleaf/hermes_provider/_shared.py
101
+ src/memleaf/hermes_provider/evidence_budget.py
102
+ src/memleaf/hermes_provider/plugin.yaml
103
+ src/memleaf/llm/__init__.py
104
+ src/memleaf/llm/base.py
105
+ src/memleaf/llm/claude_compatible.py
106
+ src/memleaf/llm/gemini.py
107
+ src/memleaf/llm/openai_compatible.py
108
+ src/memleaf/llm/router.py
109
+ src/memleaf/llm/thinking.py
@@ -1,143 +0,0 @@
1
- # memleaf v0.1 实施计划
2
-
3
- 基线:历史 v74 设计。`README.md` 与 `README.en.md` 作为对外行为契约;实现不得把 README 中尚未完成的目标描述成已发布能力。
4
-
5
- 发布范围更新(2026-08-28):v0.1 仅 Hermes。下文 Codex/反重力适配记录仅为历史,不属于本版安装或验收范围。
6
-
7
- 2026-08-28 已批准的新检索与维护方案见 [v2 实施计划](V2_IMPLEMENTATION_PLAN.md)。其 Scope-only 注入、每轮 search、按需 read 和候选级维护规则取代下文旧的 3 项目录自动注入方案;旧条目保留为历史验收记录,不代表运行目录已部署新版。
8
-
9
- ## 实施原则
10
-
11
- - Python 3.11+,核心运行时仅使用标准库。
12
- - `knowledge/` Markdown 是真实数据源;JSON 索引必须可重建。
13
- - MCP 为薄适配层,业务逻辑只存在于 core。
14
- - 所有写入采用同目录临时文件、`fsync`、原子替换;并发写通过 vault 锁串行化。
15
- - 处理成功前不推进轮次水位,不清理 inbox;模型失败必须可重试。
16
- - `memleaf init` 是一次性安装/配置入口,不引入常驻进程。
17
- - 保持 v74 计划文档骨架,仅在实现事实发生变化时做最小补充;README 同样只做必要更新。
18
- - 用户决策(2026-08-25):推荐源码和运行根固定为 `$HOME/memleaf`,不增加 `work` 层;从其他物理目录运行 `install.sh` 必须安全失败,只有显式设置 `MEMLEAF_INSTALL_ROOT` 才允许隔离测试/开发。
19
- - 用户决策(2026-08-25):只有可靠检测到 `hermes` 可执行文件时,才安装并激活官方外部 `MemoryProvider`;未检测到时不创建 Hermes provider 插件或配置,只输出诊断。
20
- - 用户决策(2026-08-28):v0.1 命令安装和 `memleaf init` 仅接入 Hermes;Codex、Antigravity 保留兼容代码但不检测、不配置、不扫描模型,`--all` 也不得绕过该边界。
21
- - 已审核方案(2026-08-27):自动 `context` 只返回记忆目录(ID、短标题、项目),最多 3 项,整个自动注入不超过 600 字符;不返回正文、来源或正文摘录。MCP `search` 默认返回目录,显式完整查询保留兼容;模型按需 `read`,长正文分段读取。目录曝光不计命中,正文实际读取才计命中;不改变 process 候选提炼、scope、状态更新/history 或 Markdown 存储语义。
22
- - 用户决策(2026-08-25):当前只做本地完整测试,不提交、不推送、不发布 Git/PyPI。
23
-
24
- ## 阶段 A:本地核心纵切
25
-
26
- 交付:可安装包、vault 初始化、受限 YAML/frontmatter、事件捕获与脱敏、Markdown 记忆 CRUD、索引重建、标签/全文/作用域检索、forget、统计。
27
-
28
- 建议模块:
29
-
30
- ```text
31
- src/memleaf/
32
- ├── __init__.py
33
- ├── config.py
34
- ├── models.py
35
- ├── vault.py
36
- ├── frontmatter.py
37
- ├── redaction.py
38
- ├── locking.py
39
- ├── capture.py
40
- ├── index.py
41
- ├── retrieval.py
42
- └── service.py
43
- ```
44
-
45
- 验收:
46
-
47
- - 相同 `event_id` 重复 capture 不产生重复事件;同 session 恢复后可追加新轮次。
48
- - 用户预先声明“不记录”的文本不进入 inbox;常见密钥、Cookie、私钥等在落盘前被脱敏。
49
- - 标签多命中采用并集,随后按 scope 继承/覆盖过滤;标签无命中时才全文回退。
50
- - `include_history=false` 不读取历史区;todo 默认仅返回 active。
51
- - `forget_memory` 精确目标直接删除且不进 history;`forget_about` 含糊时只返回候选,不误删。
52
- - 手工修改/删除 Markdown 后,`rebuild_index()` 只反映当前文件系统状态。
53
- - 并发 capture 不丢事件,损坏索引可重建。
54
-
55
- ## 阶段 B:记忆处理与模型路由
56
-
57
- 交付:候选提取、逐条 gate、summarize、remember、当前状态更新、history、处理水位、24 小时清理、压缩、Model Router。
58
-
59
- 建议模块:
60
-
61
- ```text
62
- src/memleaf/
63
- ├── prompts.py
64
- ├── processing.py
65
- ├── memory_writer.py
66
- ├── compaction.py
67
- └── llm/
68
- ├── base.py
69
- ├── router.py
70
- ├── openai_compatible.py
71
- ├── claude_compatible.py
72
- └── gemini.py
73
- ```
74
-
75
- 验收:
76
-
77
- - 一个完整轮次可生成 0~N 条原子记忆;assistant 未经用户确认的建议不能写成事实。
78
- - 显式 remember 跳过 worth gate,但仍执行整理、查重和 scope 归属。
79
- - 同一事实重复处理不重复写;状态变化时旧版本进入 history,新版本成为唯一活跃状态。
80
- - 任一模型调用、解析、knowledge 写入或索引更新失败时不推进水位、不删除 inbox。
81
- - 成功轮次经过 24 小时安全期后,仅在下一次自然触发时清理。
82
- - 达到阈值时只选低优先级约 30% 为候选;原始记忆移入 history,不做机械删除。
83
- - `api` 模式覆盖 OpenAI-compatible、Claude-compatible、Gemini;新安装按用户决策将密钥直接写入权限为 `0600` 的本地配置,旧 `api_key_env` 仅兼容读取。
84
- - `host` 使用显式注入的宿主回调;stdio MCP 无宿主回调时返回可诊断的不可用状态,`auto` 仅在已配置 API 时回退,禁止静默选择未知远程模型。
85
-
86
- ## 阶段 C:MCP、初始化与宿主适配
87
-
88
- 交付:按需 stdio MCP、一次性 init CLI、Codex/Hermes 探测与配置适配器、兼容保留的 Antigravity 适配器、示例、CI 与打包。
89
-
90
- 建议模块:
91
-
92
- ```text
93
- src/memleaf/
94
- ├── mcp_server.py
95
- ├── cli.py
96
- └── adapters/
97
- ├── base.py
98
- ├── codex.py
99
- ├── hermes.py
100
- └── antigravity.py
101
- ```
102
-
103
- MCP tools:`capture`、`context`、`search`、`read`、`process`、`remember`、`forget_memory`、`forget_about`、`rebuild_index`、`stats`。
104
-
105
- 验收:
106
-
107
- - `python -m memleaf.mcp_server` 可通过 stdio 完成 initialize、tools/list、tools/call;stdout 只输出协议消息,日志写 stderr/文件。
108
- - 每个 MCP tool 只是 core API 的参数校验和结果封装,不复制业务规则。
109
- - `memleaf init --all --defaults` 可重复执行且不重复写配置。
110
- - Codex 适配遵循官方当前配置:本地 STDIO server 通过命令启动,配置位于用户级或受信任项目级 `config.toml`;自动修改外部配置前先备份并采用原子写入。
111
- - Codex/Hermes 只在真机探测结果可靠时自动配置;Antigravity 在 v0.1 不检测、不配置(包括 `--all`),仅保留兼容适配器代码。
112
- - 构建 wheel/sdist、全量单元测试、MCP 端到端 smoke test 均通过。
113
-
114
- ## 待办与问题记录:Hermes 重连后自动捕获与提炼中断
115
-
116
- - 状态:Hermes 已验证连续多轮自动 capture→process→knowledge 写入;30 秒模型请求超时、gate/summarize 契约与白名单校验诊断、DeepSeek 结构抽取与空内容有限重试自动化修复完成。下一次真实 cron 禁用验收与干净 HOME 安装验收仍待执行;历史缺失轮次不会自动回填。
117
- - 真实验收曾覆盖首轮 gate+summarize 成功写入,以及后续模型空内容时保留 inbox 和处理水位;当前 `diagnostic_logging=false` 且不会默认创建诊断文件。
118
- - 现象:`auto_process=true`,首段对话捕获了 5 个完整轮次(10 个事件),但 Hermes 在 14:39、14:41、14:43 完成的后续轮次没有继续写入 inbox;`knowledge/` 和 `history/` 均未生成记忆。
119
- - 证据:目标 inbox 文件最后更新于 14:30:13;`_index/processed.json` 仍停留在第 1 轮 `processing`,没有成功处理水位;Hermes 日志记录 14:19:59 的 `auto-process failed`。Hermes 自身模型请求均成功,MCP `stats` 入口可用。
120
- - 初步根因:Hermes provider 的 MCP 超时配置为 5 秒,首轮处理在超时后留下未清理的 processing 标记;随后 UI/provider 重连后的完整可见轮次未恢复自动捕获/处理。当前 provider 对底层 MCP 异常只记录摘要,无法直接区分超时与重连生命周期故障。
121
- - [x] 修复 MCP 调用超时、失败重试和 processing 标记恢复,确保模型处理较慢时 inbox 与水位仍可安全重试。短请求默认仍为 5 秒,`process` 独立使用默认 300 秒(上限 900 秒);超时会关闭坏 MCP 子进程,下一次调用重建连接;processing marker 写入 `owner_pid`,死亡 owner 立即恢复,旧 marker 仅保留 10 分钟兼容窗口。
122
- - [x] 确保 Hermes UI/provider 重连或恢复同一 session 后,每个完整可见轮次仍会捕获并触发自动提炼。`on_turn_start` 的 turn number 与 user+assistant 可见文本短哈希共同组成 turn_id;provider 仅保留有界 user 指纹队列,重复完整轮次复用相同 ID 幂等;`on_session_switch` 只在 reset/rewound 时清理旧会话状态。
123
- - [x] 增加可诊断日志,记录 capture/process 的阶段、耗时和错误类型,但不得记录对话正文或密钥。覆盖 initialize/stats/capture_user/capture_assistant/process/context,并区分 TimeoutError、MCP tool error 与子进程退出。
124
- - [x] 修复自动提炼模型调用的内部 HTTP 30 秒超时与不安全错误透传:`llm.request_timeout` 默认 120 秒、范围 1~240 秒;失败按安全 code/stage 透传到 MCP、日志和 processing marker,失败后保留 inbox、不推进水位并可重试。
125
- - [x] 修复 DeepSeek/OpenAI JSON mode 与 gate/summarize 契约:受支持 provider 使用 JSON mode 和固定 `max_tokens`;DeepSeek gate/summarize 关闭 thinking 以避免结构抽取被推理预算占用,严格契约失败最多重试一次,空内容额外允许第 3 次;最终失败仅透传白名单 `validation_reason`、`attempt_count`,不记录模型原始输出。
126
- - [x] 对齐 gate/summarize 的类型、scope、todo、证据 event_key 与 reason 约束;失败增加白名单 `validation_detail`,并支持默认关闭、开启后有界 `logs/model-diagnostics.jsonl` 的结构统计诊断,不记录 prompt、正文、字段值、密钥、URL 或异常文本。
127
- - [x] 按 Hermes lifecycle 同时识别 `platform` 与 `agent_context`:`platform=cron` 以及 `agent_context=cron/flush/subagent` 不召回、不捕获、不执行 process;正常 primary 交互会话保持原行为。
128
- - [x] 保留已有 Hermes cron 历史数据;上述边界只阻断后续非用户会话污染,不删除或回填既有记录。
129
- - [x] 连续多轮 Hermes 交互自动 capture→process→knowledge 已由隔离真机会话验证。
130
- - [ ] 在干净 HOME 完成安装验收,确认上述自动链路无需手工调用 `process`/`remember`。
131
- - [ ] 用下一次真实 Hermes cron 运行验证其不再触发 context、capture 或 process,且不影响正常交互会话。
132
-
133
- 阶段自动化曾覆盖完整 unittest、compileall 与 diff 检查,包括慢 process 超时边界、结构化输出重试、模型错误分类、重连、进程恢复、白名单诊断、敏感日志和宿主 Hook 状态。最终发布结论以当前 CI 和发布审计为准。
134
-
135
- ## 本任务状态:Codex 自动宿主 Hook;Antigravity 兼容代码暂不启用
136
-
137
- - [x] 保持 v74 Core API、MCP 与 vault 数据骨架不变;新增共用 host-event 入口,复用 capture/context/process。
138
- - [x] 可靠检测到 Codex 时由 `init` 默认配置 Hook;配置合并可重复、先备份、原子写入,命令使用安装解释器绝对路径。Hermes 使用其原生 provider/MCP 接入。
139
- - [x] 保留 Codex/Antigravity 可见内容 host-event 兼容代码;v0.1 `init`/安装不检测、不配置 Antigravity,过滤与幂等逻辑不改变 Core/MCP 骨架。
140
- - [x] 正常 Stop 同步 process;失败保留 inbox 与待处理状态,Hook 错误不阻塞宿主结束。
141
- - [x] 使用脱敏合成 fixture 完成定向与全量单元测试;Codex 真机已验证可见捕获、process 与 context 调用链。安装后 Codex 状态先为 `pending_user_review`,用户需打开 `/hooks` 审核;首个合法成功 Hook 后记录 `active`/`trusted`。
142
- - [x] Antigravity 适配器及其官方 Hook 解析代码继续保留作兼容性测试,但 v0.1 安装不会写入 Antigravity MCP/Hook 配置,也不会声称其已接入。
143
- - [ ] Codex 非空跨宿主记忆召回专项验收;Antigravity 接入与真实宿主 E2E 延后到后续版本。
@@ -1,97 +0,0 @@
1
- # 发布检查清单
2
-
3
- 本文件是 memleaf 的长期发布 SOP,不记录某个具体版本的发布说明。
4
-
5
- 版本历史统一维护在 `CHANGELOG.md`;GitHub Release 从对应版本的 CHANGELOG
6
- 段落生成。不要再新增 `RELEASE_NOTES_*.md` 文件。
7
-
8
- ## 1. 版本准备
9
-
10
- - [ ] 明确本次版本号与变更范围。
11
- - [ ] 更新 `pyproject.toml` 的项目版本。
12
- - [ ] 更新 `src/memleaf/__init__.py` 的 `__version__`。
13
- - [ ] 更新唯一 Hermes Provider manifest 的版本:
14
- `src/memleaf/hermes_provider/plugin.yaml`
15
- - [ ] 更新所有依赖具体版本号的测试。
16
- - [ ] 在 `CHANGELOG.md` 顶部新增本版本段落。
17
- - [ ] 同步 `README.md` 与 `README.en.md` 的当前版本信息。
18
- - [ ] 不新增单独的版本发布说明 Markdown 文件。
19
-
20
- ## 2. 自动化验证
21
-
22
- - [ ] Linux Python 3.11 / 3.12 / 3.13 完整 unittest 通过。
23
- - [ ] Windows Python 3.11 / 3.12 / 3.13 安装与集成验收通过。
24
- - [ ] macOS Python 3.11 / 3.13 Hermes/Codex 宿主与记忆语义验收通过。
25
- - [ ] Windows 真实 Provider → `memleaf-mcp` stdio 回归通过:
26
- `stats`、`scope_catalog`、user/assistant capture、inbox 落盘。
27
- - [ ] Windows 与 macOS 使用当前受支持 Codex CLI 做真实 `codex mcp add/get` 验收,
28
- Unicode/空格路径正常,重复安装为 `already_configured` 且 `changed=false`。
29
- - [ ] Codex `PreToolUse` 参数重写符合当前 Hook 合同:
30
- `permissionDecision=allow` 与 `updatedInput` 同时存在,当前轮 `retrieval_id` 不丢失。
31
- - [ ] Windows `commandWindows` 不含会触发 Codex 当前 cmd 外层引号缺陷的内嵌双引号;
32
- Python/Vault 含空格和中文时,quote-free 命令在原生 `cmd.exe` 执行回归通过。
33
- - [ ] Codex → Codex、Hermes → Codex、Codex → Hermes 三条共享 Vault 持久记忆闭环全部通过。
34
- - [ ] Scope Map 仍只注入 Scope/alias/检索协议;`search` 候选严格只返回
35
- `memory_id + title`,`read` 才读取选中正文,检索预算与 retrieval gate 保持。
36
- - [ ] CREATE / UPDATE / NO_CHANGE、history、去重、process 继续由 Core 统一实现,
37
- Codex/Hermes Adapter 不复制记忆语义。
38
- - [ ] wheel 与 sdist 构建通过。
39
- - [ ] 从 wheel 安装后 `memleaf` / `memleaf-mcp` 入口正常。
40
- - [ ] 从 sdist 解包后的测试通过。
41
- - [ ] PowerShell 安装器语法验证通过。
42
- - [ ] `git diff --check` / compileall 等静态检查无异常。
43
-
44
- ## 3. Hermes 真实环境重点
45
-
46
- - [ ] Hermes 实际 Python 环境加载的是目标 memleaf 版本。
47
- - [ ] Hermes `plugins/memleaf` Provider 副本也是目标版本。
48
- - [ ] MemoryProvider 可正常加载;`registered (0 tools)` 属于预期。
49
- - [ ] 独立 memleaf MCP 注册 11 个工具。
50
- - [ ] `stats` / `scope_catalog` 无 OSError、WinError 10093、TimeoutError。
51
- - [ ] 可见轮次能 capture 到 inbox。
52
- - [ ] process 能将有长期价值的内容提炼到 knowledge。
53
- - [ ] UPDATE 能复用 active memory ID,并将旧版归档到 history。
54
- - [ ] 新 Hermes 会话能召回旧会话中的已保存信息。
55
-
56
- ## 4. 安全与兼容
57
-
58
- - [ ] Hermes 脱敏 credential(如 `***`、头尾掩码)不会被当成真实 API key。
59
- - [ ] 日志与状态输出不泄露真实 API key。
60
- - [ ] Windows 路径仍支持 `%LOCALAPPDATA%\hermes` 及官方 launcher 布局。
61
- - [ ] 从旧版本升级时保留已有 Hermes `memleaf.json` 中的自定义 Vault,不静默切换到默认 Vault。
62
- - [ ] Provider 的 Windows stdio 实现不重新引入 `select.select(pipe)`。
63
- - [ ] 普通升级/`memleaf install` 不自动配置 Codex;只有显式
64
- `memleaf install --host codex` 才修改 Codex memleaf 接入。
65
- - [ ] Codex 安装前后的 model/model_provider/base_url、sandbox、approval、
66
- profiles、已有 MCP 与已有 Hooks 保持;DeepSeek/OpenRouter/自定义 provider 不被改写。
67
- - [ ] Hermes/Codex 已有 Vault 唯一一致时复用;冲突时 `vault_conflict` fail closed。
68
- - [ ] Codex 自动提炼只使用独立 memleaf Model Route;没有 Route 时明确返回
69
- `processing_status=model_route_required`,不复制 Codex credential、不隐式消耗 Codex 会话模型。
70
- - [ ] shell、Python 与 PowerShell 安装路径都使用
71
- `src/memleaf/hermes_provider` 这一份权威 Provider 源码。
72
-
73
- ## 5. 正式发布
74
-
75
- 正式 release commit 的 subject 必须严格为:
76
-
77
- ```text
78
- release: vX.Y.Z
79
- ```
80
-
81
- 然后:
82
-
83
- - [ ] push 到 `main`。
84
- - [ ] CI 全部通过。
85
- - [ ] CI 从 `pyproject.toml` 读取版本,并确认 commit subject 与版本一致。
86
- - [ ] CI 从 `CHANGELOG.md` 提取本版本段落创建 GitHub Release。
87
- - [ ] GitHub Release tag、标题、wheel、sdist、SHA256SUMS 均对应目标版本。
88
- - [ ] `Publish to PyPI` workflow 使用 Trusted Publishing / OIDC 成功。
89
- - [ ] PyPI 页面显示目标版本。
90
- - [ ] 安装命令实际可升级到目标版本。
91
-
92
- ## 6. 发布后
93
-
94
- - [ ] 检查 GitHub Release 显示标题、tag 与正文版本一致。
95
- - [ ] 检查 PyPI 与 GitHub Release 的版本一致。
96
- - [ ] 如有真实宿主验收结果,更新 `MAINTAINER_HANDOFF.md` 中的维护证据或注意事项。
97
- - [ ] 不修改或覆盖已发布的 PyPI 版本;有修复时递增新版本。