memleaf 0.2.32__tar.gz → 0.2.34__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.
- {memleaf-0.2.32 → memleaf-0.2.34}/CHANGELOG.md +17 -0
- {memleaf-0.2.32/src/memleaf.egg-info → memleaf-0.2.34}/PKG-INFO +26 -36
- {memleaf-0.2.32 → memleaf-0.2.34}/README.en.md +24 -33
- {memleaf-0.2.32 → memleaf-0.2.34}/README.md +25 -35
- memleaf-0.2.34/docs/capture-budget-design.md +9 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/docs/config-migrations.md +2 -2
- memleaf-0.2.34/docs/evidence-retention.md +96 -0
- memleaf-0.2.34/docs/gate-evidence-boundary.md +150 -0
- memleaf-0.2.34/docs/general-processing.md +167 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/docs/hermes-mcp-runtime.md +1 -1
- memleaf-0.2.34/examples/README.md +35 -0
- memleaf-0.2.34/examples/live_core_lifecycle_acceptance.py +156 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/pyproject.toml +1 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/__init__.py +1 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/adapters/hermes.py +1 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/admission.py +535 -56
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/cli.py +26 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/config.py +10 -8
- memleaf-0.2.34/src/memleaf/create_coordinator.py +380 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/evidence_policy.py +40 -21
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/hermes_provider/README.md +11 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/hermes_provider/__init__.py +383 -33
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/hermes_provider/plugin.yaml +1 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/host_runtime.py +6 -66
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/installer.py +3 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/llm/openai_compatible.py +0 -3
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/mcp_server.py +35 -7
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/memory_planner.py +817 -116
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/memory_writer.py +3 -2
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/model_execution.py +55 -7
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/planning_context.py +73 -17
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/process_common.py +227 -12
- memleaf-0.2.34/src/memleaf/process_jobs.py +456 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/process_journal.py +205 -14
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/processing.py +7 -2
- memleaf-0.2.34/src/memleaf/prompts.py +640 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/provenance.py +1 -1
- memleaf-0.2.34/src/memleaf/target_reconciliation.py +420 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/turn_plan.py +4 -1
- memleaf-0.2.34/src/memleaf/update_coordinator.py +708 -0
- memleaf-0.2.34/src/memleaf/update_review.py +500 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/validation.py +37 -16
- {memleaf-0.2.32 → memleaf-0.2.34/src/memleaf.egg-info}/PKG-INFO +26 -36
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf.egg-info/SOURCES.txt +25 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/semantic_fixtures.py +27 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_admission_noise.py +138 -22
- memleaf-0.2.34/tests/test_automatic_duplicate_noop_collision.py +123 -0
- memleaf-0.2.34/tests/test_candidate_polarity.py +220 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_config_migrations_v028.py +18 -0
- memleaf-0.2.34/tests/test_conversation_only.py +111 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_cross_host_acceptance.py +2 -0
- memleaf-0.2.34/tests/test_due_date_grounding.py +123 -0
- memleaf-0.2.34/tests/test_due_date_grounding_retry.py +136 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_email_actionable_coverage.py +29 -27
- memleaf-0.2.34/tests/test_evidence_budget.py +192 -0
- memleaf-0.2.34/tests/test_evidence_retention_policy.py +450 -0
- memleaf-0.2.34/tests/test_external_source_dates.py +259 -0
- memleaf-0.2.34/tests/test_gate_capacity.py +588 -0
- memleaf-0.2.34/tests/test_gate_schema_repair.py +200 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_general_evidence_admission.py +266 -34
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_general_tool_provenance.py +7 -4
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_global_todo_query_no_write.py +18 -10
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_hermes_provider.py +129 -12
- memleaf-0.2.34/tests/test_hermes_transport_evidence.py +92 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_install.py +1 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_maintenance_v2.py +264 -1
- memleaf-0.2.34/tests/test_new_scope_source_grounding.py +218 -0
- memleaf-0.2.34/tests/test_partial_retry_idempotency.py +330 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_phase2_model_decisions.py +6 -0
- memleaf-0.2.34/tests/test_process_jobs.py +100 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_processing_contract_v026.py +11 -5
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_pypi_install.py +6 -0
- memleaf-0.2.34/tests/test_read_only_deferred_isolation.py +190 -0
- memleaf-0.2.34/tests/test_review_source_context.py +46 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_shared_memory_refactor.py +7 -5
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b1.py +52 -17
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b2a.py +4 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b2b.py +11 -5
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3a_commit.py +8 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3b_native_context.py +4 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3b_scope.py +8 -8
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3d_scope_maintenance.py +5 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_c1_mcp.py +46 -1
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_c2_init.py +1 -1
- memleaf-0.2.34/tests/test_summary_date_grounding_integration.py +39 -0
- memleaf-0.2.34/tests/test_target_reconciliation.py +345 -0
- memleaf-0.2.34/tests/test_target_reconciliation_integration.py +50 -0
- memleaf-0.2.34/tests/test_update_review.py +802 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_update_target_recovery.py +54 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_v023_scope_correction.py +9 -8
- memleaf-0.2.34/tests/test_whole_unit_bindings.py +361 -0
- memleaf-0.2.32/docs/capture-budget-design.md +0 -74
- memleaf-0.2.32/docs/evidence-retention.md +0 -66
- memleaf-0.2.32/docs/gate-evidence-boundary.md +0 -117
- memleaf-0.2.32/docs/general-processing.md +0 -196
- memleaf-0.2.32/examples/README.md +0 -19
- memleaf-0.2.32/src/memleaf/prompts.py +0 -368
- memleaf-0.2.32/src/memleaf/update_coordinator.py +0 -200
- memleaf-0.2.32/tests/test_evidence_budget.py +0 -381
- memleaf-0.2.32/tests/test_evidence_retention_policy.py +0 -201
- {memleaf-0.2.32 → memleaf-0.2.34}/IMPLEMENTATION_PLAN.md +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/LICENSE +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/MANIFEST.in +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/RELEASE_CHECKLIST.md +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/docs/core-refactor.md +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/docs/performance.md +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/docs/v0.2.26-processing-status.md +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/examples/basic_usage.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/examples/live_processing_acceptance.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/examples/mcp_stdio.ndjson +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/install.ps1 +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/install.sh +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/setup.cfg +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/__main__.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/adapters/__init__.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/adapters/antigravity.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/adapters/base.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/adapters/codex.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/budget.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/capture.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/compaction.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/credentials.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/evidence_budget.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/frontmatter.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/hermes_provider/evidence_budget.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/hermes_runtime.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/host_events.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/inbox.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/index.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/inspection.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/llm/__init__.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/llm/base.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/llm/claude_compatible.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/llm/gemini.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/llm/router.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/locking.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/memory_commit.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/model_discovery.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/models.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/native_index.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/native_registration.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/process_owner.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/recording_policy.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/redaction.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/retention.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/retrieval.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/retrieval_gate.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/scope_maintenance.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/scope_state.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/service.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/source_policy.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/state_layout.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/turn_audit.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf/vault.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf.egg-info/dependency_links.txt +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf.egg-info/entry_points.txt +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/src/memleaf.egg-info/top_level.txt +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/__init__.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_codex_install.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_codex_native_cli.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_context_budget.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_credential_safety.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_cross_turn_dedupe_regressions.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_extraction_quality_regressions.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_global_todo_acceptance.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_global_todo_retrieval.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_hermes_native_registration.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_hermes_runtime_install.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_hermes_stdio_transport.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_host_events.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_host_runtime_contract.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_inspection_state_v028.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_long_run_hygiene.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_model_discovery.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_model_owned_fields.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_process_owner_locking.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_retrieval_gate.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_retrieval_v2.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_session_lineage.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_source_neutral_todos_v028.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_a.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3a_contract.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3b_native_index.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_b3c_retrieval.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_stage_c3_packaging.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_state_layout_v028.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_todo_state_recovery.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_upgrade_preserves_vault.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_v2_gate_limits.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_v2_host_flow.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_v2_mcp_flow.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_v2_nomatch_semantics.py +0 -0
- {memleaf-0.2.32 → memleaf-0.2.34}/tests/test_v2_search_gate_acceptance.py +0 -0
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to memleaf are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.2.34 — 2026-09-08
|
|
6
|
+
|
|
7
|
+
- Restrict automatic memory extraction to 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. Explicit memory-write prohibitions still fail closed.
|
|
8
|
+
- Add persisted background processing jobs and the read-only `process_status` MCP tool. Accepted background work reports its job identity before completion, while succeeded, deferred and failed outcomes remain observable; failed or unresolved work stays retryable without advancing cleanup state.
|
|
9
|
+
- Tighten source-neutral Gate coverage, exact evidence bindings, assistant-report context, date grounding, target reconciliation, duplicate/no-op handling, same-target update coordination and semantic review before automatic CREATE/UPDATE writes. Preserve candidate-local deferral and idempotent partial retries so unresolved ownership, target, evidence or timing does not fabricate a write.
|
|
10
|
+
- Keep the copied Hermes provider aligned with Core on the conversation-only source boundary, background job polling, session aliasing and bounded failure/deferred diagnostics. Existing Markdown Vaults, shared Hermes/Codex retrieval and explicit remember/forget paths remain local and source-of-truth preserving.
|
|
11
|
+
- Validation for this release: deterministic regression suites ran 927 tests successfully with 2 skips, and isolated MCP transport checks passed. Semantic quality and processing latency remain model-dependent; no concurrency or performance improvement is claimed, and this release does not claim real-mail or customer-business acceptance.
|
|
12
|
+
|
|
13
|
+
## 0.2.33 — 2026-09-08
|
|
14
|
+
|
|
15
|
+
- Extend the Gate with bounded physical-evidence batches, exact unit/quote bindings, isolated cross-batch candidate IDs, same-target update coordination, and bounded model reconciliation for compatible CREATE proposals. Failed batches remain retryable and fail closed without advancing the watermark or cleanup.
|
|
16
|
+
- Align Core, HostRuntime, and the copied Hermes provider on document/attachment classification and effective capture-policy reporting: ordinary structural files follow the selected retention mode, while explicitly identified attachments still require attachment opt-in and bounded retention.
|
|
17
|
+
- Keep automatic UPDATEs as `NO_CHANGE` when current evidence only restates the target or adds provenance/source metadata; preserve the selected target for real semantic state changes. Add synthetic-document real-model lifecycle acceptance and regressions for coverage, deadlines, todo completion, capture policy, and lifecycle behavior.
|
|
18
|
+
- Harden automatic processing around source/date grounding, target reconciliation, update review, duplicate/no-op collision handling, and partial-retry idempotency so unresolved ownership, target, evidence, or timing stays deferred without fabricated writes.
|
|
19
|
+
- Isolate read-only/general queries from stale deferred automatic turns while preserving retries for assertions, explicit scopes, and external observations; extend Core/Hermes transport and evidence regressions for these boundaries.
|
|
20
|
+
- Validation for this release: the full suite ran 911 tests successfully with 2 skips. A four-phase synthetic-input real-model acceptance also passed; this does not claim real-mail or customer-business acceptance.
|
|
21
|
+
|
|
5
22
|
## 0.2.32 — 2026-09-07
|
|
6
23
|
|
|
7
24
|
- Add bounded `unknown_unit` Gate diagnostics that identify the exact response field and retain only allowlisted type/length/digest and expected-set summaries; raw invalid values, legal ID lists and model output remain excluded from normal logs and failed state.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memleaf
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.34
|
|
4
4
|
Summary: A local-first Markdown memory core for AI agents
|
|
5
5
|
Author: memleaf contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,8 +23,8 @@ 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.
|
|
27
|
-
>
|
|
26
|
+
> **版本:0.2.34。**
|
|
27
|
+
> 记忆只从用户与 Agent 的可见对话提炼。Agent 已在回复中整理的事实、项目进展和明确待办可作为来源;邮件、附件、网页和终端等工具原文不进入记忆提炼。模型负责保留原话中的不确定性,现有记忆仅用于比较、去重和更新。Markdown 仍是唯一事实源。
|
|
28
28
|
> **当前版本支持 Hermes 和 Codex。** Antigravity(反重力)不检测、不安装、不配置。
|
|
29
29
|
|
|
30
30
|
## 项目定位
|
|
@@ -159,12 +159,12 @@ python -m pip install -U memleaf && python -m memleaf install
|
|
|
159
159
|
4. 激活 `memory.provider=memleaf`;
|
|
160
160
|
5. 通过 Hermes 官方 CLI 配置 memleaf MCP;
|
|
161
161
|
6. 配置 MCP lazy/idle 生命周期;
|
|
162
|
-
7. 验证 MCP Server 能发现
|
|
162
|
+
7. 验证 MCP Server 能发现 13 个工具;
|
|
163
163
|
8. 写入本地 Agent 状态索引。
|
|
164
164
|
|
|
165
165
|
完成后重启 Hermes。
|
|
166
166
|
|
|
167
|
-
如果没有检测到 Hermes、无法取得完整模型路由、Provider 激活失败或 MCP 的
|
|
167
|
+
如果没有检测到 Hermes、无法取得完整模型路由、Provider 激活失败或 MCP 的 13 工具验证失败,安装会明确返回失败,不会把未完成的接入报告为成功。
|
|
168
168
|
|
|
169
169
|
仓库中的 `install.sh` 保留给源码开发、离线源码安装和故障排查;普通 PyPI 用户不需要执行它。
|
|
170
170
|
|
|
@@ -234,7 +234,7 @@ Hermes 的原生 Provider 和 MCP Server 是两个不同入口,但共用同一
|
|
|
234
234
|
- Agent 需要通过 MCP `search` 找到候选,再用当前 `retrieval_id` 调用 `read`;
|
|
235
235
|
- MCP 仍用于主动 `search`、`remember`、`forget` 和维护操作;
|
|
236
236
|
- MCP 连接失败时会关闭坏连接,后续请求可重建连接;
|
|
237
|
-
- `process`
|
|
237
|
+
- Provider 自动处理通过 `process(background=true)` 持久化本地 job 后立即返回;用只读 `process_status` 查看最终的 `succeeded`、`deferred` 或 `failed` 结果。显式同步 `process` 仍可用;失败数据保留在 inbox 中;
|
|
238
238
|
- cron、flush、subagent 等非主用户会话不会自动召回、捕获或处理。
|
|
239
239
|
|
|
240
240
|
安装完成后可检查:
|
|
@@ -261,7 +261,7 @@ python -m memleaf.mcp_server --vault "$HOME/.memleaf"
|
|
|
261
261
|
|
|
262
262
|
不传 `--vault` 时默认使用 `~/.memleaf`;也可以设置 `MEMLEAF_VAULT`。正常情况下不需要手工常驻,Hermes 或 Codex 会按需启动它。stdout 只输出 JSON-RPC,日志不会污染协议通道。
|
|
263
263
|
|
|
264
|
-
当前提供
|
|
264
|
+
当前提供 13 个工具:
|
|
265
265
|
|
|
266
266
|
| 工具 | 用途 |
|
|
267
267
|
| --- | --- |
|
|
@@ -270,7 +270,8 @@ python -m memleaf.mcp_server --vault "$HOME/.memleaf"
|
|
|
270
270
|
| `scope_catalog` | 返回 Scope、父级和别名,不返回具体记忆正文 |
|
|
271
271
|
| `search` | 返回有界候选目录和 `found`/`no_match` 状态 |
|
|
272
272
|
| `read` | 使用当前 `retrieval_id` 分页读取选中的记忆正文 |
|
|
273
|
-
| `process` | 处理完整 inbox
|
|
273
|
+
| `process` | 处理完整 inbox 轮次并按准入规则提炼;`background=true` 时异步入队 |
|
|
274
|
+
| `process_status` | 只读查询异步处理 job 状态 |
|
|
274
275
|
| `remember` | 用户明确要求时创建或更新记忆 |
|
|
275
276
|
| `forget_memory` | 按精确 ID 删除一条记忆 |
|
|
276
277
|
| `forget_about` | 忘记明确主题;有歧义时只返回候选 |
|
|
@@ -443,7 +444,7 @@ history:
|
|
|
443
444
|
|
|
444
445
|
## 隐私与安全边界
|
|
445
446
|
|
|
446
|
-
- 对话捕获只接收 user/assistant 可见文本,不捕获 system/developer
|
|
447
|
+
- 对话捕获只接收 user/assistant 可见文本,不捕获 system/developer 指令、隐藏推理或工具输出。工具原文不保存,也不会从旧 inbox 重新送入提炼;
|
|
447
448
|
- 捕获落盘前尽力脱敏常见 API key、Bearer token、Cookie、JWT 和私钥,但脱敏不是加密,也不能保证识别所有敏感信息;
|
|
448
449
|
- 路径校验、符号链接检查、Vault 锁、同目录临时文件、fsync 和原子替换用于保护本地写入;
|
|
449
450
|
- memleaf 不主动上传整个 Vault,也没有托管后台、遥测或账号系统;
|
|
@@ -490,11 +491,12 @@ MIT,见 [LICENSE](LICENSE)。
|
|
|
490
491
|
*Your memories, in files you own.*
|
|
491
492
|
|
|
492
493
|
|
|
493
|
-
## 通用处理与只读验收(0.2.
|
|
494
|
+
## 通用处理与只读验收(0.2.34)
|
|
494
495
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
496
|
+
所有自动记忆只从用户与 Agent 的可见对话中提炼。Agent 已经在回复里总结的
|
|
497
|
+
事实、进展和明确待办可以保留;不重新读取或分析邮件、附件、网页、文件、终端输出。
|
|
498
|
+
建议、猜测、提问和条件必须保留其性质,不能升级为用户决定、已完成动作或已核实事实。
|
|
499
|
+
已有记忆的纯复述不新建;新结论与旧记忆比较后才新增或更新。
|
|
498
500
|
|
|
499
501
|
```bash
|
|
500
502
|
memleaf audit --vault /path/to/existing/vault --json
|
|
@@ -505,29 +507,17 @@ memleaf process --vault /path/to/existing/vault --source hermes --session-id SES
|
|
|
505
507
|
`--dry-run` 在私有临时副本运行正常处理,可能调用配置的独立 Model Route;不会改写原 Vault。
|
|
506
508
|
检测到原 Vault 并发变化时会拒绝输出可用预览。没有一键应用预览的功能。
|
|
507
509
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
510
|
+
处理结果只反映可见对话的记忆提炼。若对话中的项目归属或含义仍不确定,
|
|
511
|
+
`coverage_status` 可以为 `partial`;工具执行错误或原文截断本身不再造成提炼漏项。
|
|
512
|
+
`external_evidence_status=disabled` 表示工具证据不属于提炼输入。
|
|
513
|
+
行为、限制、测试协议见 [通用处理说明](docs/general-processing.md)。
|
|
511
514
|
|
|
512
|
-
###
|
|
515
|
+
### 对话来源边界
|
|
513
516
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
include_attachments: false
|
|
518
|
-
```
|
|
519
|
-
|
|
520
|
-
`bounded` 允许当前轮真实工具观察保留有界、脱敏的正文;小结果可能完整保留,
|
|
521
|
-
不是承诺只保存模型总结。`metadata` 仅留工具调用标识等元数据(仍可能包含标题),
|
|
522
|
-
不保留证据正文,也不把主动排除误报成提炼漏项。`off` 不保存工具证据记录。
|
|
523
|
-
三种模式均不允许把助手复述或旧记忆回读变成独立的新事实。
|
|
524
|
-
|
|
525
|
-
现有配置未提供新字段时,旧 `include_tool_output: false` 或未设置该开关均按
|
|
526
|
-
`metadata` 处理,旧 `true` 按 `bounded` 处理。显式新字段优先;新建 Vault 只写
|
|
527
|
-
新字段,不再同时写含义冲突的旧开关。`include_attachments: true` 仍受上述总模式限制。
|
|
528
|
-
宿主通过结构化文件路径、文件/附件标识识别文档;不承诺识别任意 Shell 命令或不透明工具
|
|
529
|
-
隐藏读取的文件。用户粘贴的可见文档和显式 `remember` 内容不属于自动附件抓取。
|
|
517
|
+
新建配置使用 `capture.tool_evidence_mode: off` 与 `include_attachments: false`。
|
|
518
|
+
旧配置中的 `bounded`、`metadata` 等值仅为兼容而接受,不能重新开启工具原文提炼。
|
|
519
|
+
状态接口展示实际生效的 `off`。用户自己粘贴到可见消息中的内容属于对话来源。
|
|
530
520
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
521
|
+
边界在宿主采集、Core capture 和历史 inbox 的新处理处执行。
|
|
522
|
+
已提交记忆不会自动删除。旧版本已冻结但未完成的计划不会被静默丢弃或重新规划,
|
|
523
|
+
不含新来源边界标记的计划会停止恢复并保留现场,避免越过新的输入约定。
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
[中文](README.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
|
|
6
6
|
|
|
7
|
-
> **Version: 0.2.
|
|
8
|
-
>
|
|
7
|
+
> **Version: 0.2.34.**
|
|
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
|
|
|
11
11
|
## Project scope
|
|
@@ -141,12 +141,12 @@ Both installation paths automatically:
|
|
|
141
141
|
4. Activate `memory.provider=memleaf`.
|
|
142
142
|
5. Configure the memleaf MCP entry through Hermes' official CLI.
|
|
143
143
|
6. Configure MCP lazy/idle lifecycle settings.
|
|
144
|
-
7. Verify that the MCP server exposes all
|
|
144
|
+
7. Verify that the MCP server exposes all 13 tools.
|
|
145
145
|
8. Record the local Agent integration status.
|
|
146
146
|
|
|
147
147
|
Restart Hermes after installation.
|
|
148
148
|
|
|
149
|
-
If Hermes cannot be detected, no complete model route can be configured, Provider activation fails, or the
|
|
149
|
+
If Hermes cannot be detected, no complete model route can be configured, Provider activation fails, or the 13-tool MCP verification fails, the installer returns an explicit failure rather than reporting an incomplete integration as successful.
|
|
150
150
|
|
|
151
151
|
The repository `install.sh` remains for source development, offline source installation, and troubleshooting. Normal PyPI users do not need to run it.
|
|
152
152
|
|
|
@@ -216,7 +216,7 @@ Hermes' native Provider and the MCP server are separate entry points, but they s
|
|
|
216
216
|
- The Agent uses MCP `search` to find candidates and `read` with the current `retrieval_id` to load selected bodies.
|
|
217
217
|
- MCP remains the deliberate interface for `search`, `remember`, `forget`, and maintenance.
|
|
218
218
|
- A failed MCP request closes the broken connection so a later request can create a fresh one.
|
|
219
|
-
- `process`
|
|
219
|
+
- Provider automatic processing enqueues a durable local job with `process(background=true)` and returns immediately; use the read-only `process_status` tool to inspect its final `succeeded`, `deferred`, or `failed` result. Explicit synchronous `process` remains available, and failed data remains in the inbox.
|
|
220
220
|
- cron, flush, and subagent contexts do not automatically recall, capture, or process memory.
|
|
221
221
|
|
|
222
222
|
Check the native provider after installation with:
|
|
@@ -243,7 +243,7 @@ python -m memleaf.mcp_server --vault "$HOME/.memleaf"
|
|
|
243
243
|
|
|
244
244
|
Without `--vault`, the server uses `~/.memleaf`; `MEMLEAF_VAULT` can also specify the Vault. In normal use the server does not need to be kept running manually: Hermes or Codex starts it on demand. stdout contains only JSON-RPC messages so logs do not corrupt the protocol stream.
|
|
245
245
|
|
|
246
|
-
The server currently exposes
|
|
246
|
+
The server currently exposes 13 tools:
|
|
247
247
|
|
|
248
248
|
| Tool | Purpose |
|
|
249
249
|
| --- | --- |
|
|
@@ -253,7 +253,8 @@ The server currently exposes 12 tools:
|
|
|
253
253
|
| `search` | Return a bounded candidate directory and `found`/`no_match` status |
|
|
254
254
|
| `list_todos` | Enumerate current todo memories across scopes with status/date filters and pagination |
|
|
255
255
|
| `read` | Read a selected memory body in pages using the current `retrieval_id` |
|
|
256
|
-
| `process` | Process complete inbox turns under the admission rules |
|
|
256
|
+
| `process` | Process complete inbox turns under the admission rules; `background=true` enqueues a job |
|
|
257
|
+
| `process_status` | Read the status of a background processing job |
|
|
257
258
|
| `remember` | Create or update memory after an explicit request |
|
|
258
259
|
| `forget_memory` | Delete one memory by exact ID |
|
|
259
260
|
| `forget_about` | Forget an unambiguous topic; return candidates when ambiguous |
|
|
@@ -426,7 +427,7 @@ Directories are normally created with mode `0700`, and files are stored as plain
|
|
|
426
427
|
|
|
427
428
|
## Privacy and security boundaries
|
|
428
429
|
|
|
429
|
-
- Conversation capture accepts visible user/assistant text, never system/developer instructions
|
|
430
|
+
- Conversation capture accepts only visible user/assistant text, never system/developer instructions, hidden reasoning, or tool output. Tool bodies are not saved or reprocessed from older inbox records; legacy tool-evidence settings cannot re-enable raw-source extraction.
|
|
430
431
|
- Common API keys, Bearer tokens, cookies, JWTs, and private keys are redacted on a best-effort basis before capture is written. Redaction is not encryption and cannot detect every secret.
|
|
431
432
|
- Path validation, symlink checks, Vault locks, same-directory temporary files, fsync, and atomic replacement protect local writes.
|
|
432
433
|
- memleaf does not upload the entire Vault and has no hosted backend, telemetry, or account system.
|
|
@@ -474,11 +475,9 @@ MIT; see [LICENSE](LICENSE).
|
|
|
474
475
|
*Your memories, in files you own.*
|
|
475
476
|
|
|
476
477
|
|
|
477
|
-
## General processing and read-only inspection (0.2.
|
|
478
|
+
## General processing and read-only inspection (0.2.34)
|
|
478
479
|
|
|
479
|
-
|
|
480
|
-
Models interpret semantics; Core validates physical provenance and exact original quotations.
|
|
481
|
-
A valid quotation establishes provenance, not the truth or entailment of a generated claim.
|
|
480
|
+
Automatic memory extraction uses only visible user and assistant conversation text. Findings already summarized in the final assistant reply can be retained; mail, attachments, web pages, files and terminal output are not re-read or analyzed. Suggestions, guesses, questions and conditions retain their original status and cannot be promoted to decisions, completed actions or verified facts. Existing-memory restatements do not create new memories; new conclusions are compared with existing memories before creation or update.
|
|
482
481
|
|
|
483
482
|
```bash
|
|
484
483
|
memleaf audit --vault /path/to/existing/vault --json
|
|
@@ -488,32 +487,24 @@ memleaf process --vault /path/to/existing/vault --source hermes --session-id SES
|
|
|
488
487
|
Audit is local/read-only, never calls a model, never infers producing versions and never repairs automatically.
|
|
489
488
|
Dry-run executes the normal processor on a private temporary copy and may call the configured Model Route.
|
|
490
489
|
It does not modify the source Vault; concurrent source changes invalidate the preview. There is no apply-preview mode.
|
|
491
|
-
|
|
490
|
+
Processing results describe visible-conversation extraction. If project ownership or meaning remains uncertain, `coverage_status=partial` may report unresolved work. Tool execution errors or truncated raw payloads do not create extraction gaps because those payloads are outside the input.
|
|
491
|
+
`external_evidence_status=disabled` means tool evidence is not part of the extraction input.
|
|
492
492
|
See [general processing](docs/general-processing.md) for the protocol, limits and verification boundaries.
|
|
493
493
|
|
|
494
|
-
###
|
|
494
|
+
### Conversation source boundary
|
|
495
495
|
|
|
496
496
|
```yaml
|
|
497
497
|
capture:
|
|
498
|
-
tool_evidence_mode:
|
|
498
|
+
tool_evidence_mode: off
|
|
499
499
|
include_attachments: false
|
|
500
500
|
```
|
|
501
501
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
mode. Adapters classify structural file paths, file IDs and attachment handles, not
|
|
512
|
-
arbitrary opaque shell commands. Pasted visible documents and explicit remember text
|
|
513
|
-
are not automatic attachment capture.
|
|
514
|
-
|
|
515
|
-
The policy applies to pending cache, inbox writes, and new model-planning inputs.
|
|
516
|
-
Tightening it is not a retroactive rewrite of committed memories or captured inbox files.
|
|
517
|
-
Previously frozen operations are recovered as existing plans, not new model calls.
|
|
518
|
-
Captured evidence retains its existing cleanup grace period; use explicit forget for
|
|
519
|
-
memory deletion. See `docs/evidence-retention.md` for limits and scope.
|
|
502
|
+
New configurations use `capture.tool_evidence_mode: off` and `include_attachments: false`.
|
|
503
|
+
Legacy `bounded` and `metadata` values remain accepted for compatibility but cannot
|
|
504
|
+
re-enable raw tool extraction. Status output reports the effective `off` behavior.
|
|
505
|
+
Content a user pastes into a visible message is conversation input.
|
|
506
|
+
|
|
507
|
+
The boundary is enforced by host capture, Core capture and new processing of historical
|
|
508
|
+
inbox records. Committed memories are not deleted automatically. Frozen operations without
|
|
509
|
+
the conversation-only policy marker are not silently replayed or replanned; they remain
|
|
510
|
+
available for inspection so the new input contract is not bypassed.
|
|
@@ -4,8 +4,8 @@
|
|
|
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.
|
|
8
|
-
>
|
|
7
|
+
> **版本:0.2.34。**
|
|
8
|
+
> 记忆只从用户与 Agent 的可见对话提炼。Agent 已在回复中整理的事实、项目进展和明确待办可作为来源;邮件、附件、网页和终端等工具原文不进入记忆提炼。模型负责保留原话中的不确定性,现有记忆仅用于比较、去重和更新。Markdown 仍是唯一事实源。
|
|
9
9
|
> **当前版本支持 Hermes 和 Codex。** Antigravity(反重力)不检测、不安装、不配置。
|
|
10
10
|
|
|
11
11
|
## 项目定位
|
|
@@ -140,12 +140,12 @@ python -m pip install -U memleaf && python -m memleaf install
|
|
|
140
140
|
4. 激活 `memory.provider=memleaf`;
|
|
141
141
|
5. 通过 Hermes 官方 CLI 配置 memleaf MCP;
|
|
142
142
|
6. 配置 MCP lazy/idle 生命周期;
|
|
143
|
-
7. 验证 MCP Server 能发现
|
|
143
|
+
7. 验证 MCP Server 能发现 13 个工具;
|
|
144
144
|
8. 写入本地 Agent 状态索引。
|
|
145
145
|
|
|
146
146
|
完成后重启 Hermes。
|
|
147
147
|
|
|
148
|
-
如果没有检测到 Hermes、无法取得完整模型路由、Provider 激活失败或 MCP 的
|
|
148
|
+
如果没有检测到 Hermes、无法取得完整模型路由、Provider 激活失败或 MCP 的 13 工具验证失败,安装会明确返回失败,不会把未完成的接入报告为成功。
|
|
149
149
|
|
|
150
150
|
仓库中的 `install.sh` 保留给源码开发、离线源码安装和故障排查;普通 PyPI 用户不需要执行它。
|
|
151
151
|
|
|
@@ -215,7 +215,7 @@ Hermes 的原生 Provider 和 MCP Server 是两个不同入口,但共用同一
|
|
|
215
215
|
- Agent 需要通过 MCP `search` 找到候选,再用当前 `retrieval_id` 调用 `read`;
|
|
216
216
|
- MCP 仍用于主动 `search`、`remember`、`forget` 和维护操作;
|
|
217
217
|
- MCP 连接失败时会关闭坏连接,后续请求可重建连接;
|
|
218
|
-
- `process`
|
|
218
|
+
- Provider 自动处理通过 `process(background=true)` 持久化本地 job 后立即返回;用只读 `process_status` 查看最终的 `succeeded`、`deferred` 或 `failed` 结果。显式同步 `process` 仍可用;失败数据保留在 inbox 中;
|
|
219
219
|
- cron、flush、subagent 等非主用户会话不会自动召回、捕获或处理。
|
|
220
220
|
|
|
221
221
|
安装完成后可检查:
|
|
@@ -242,7 +242,7 @@ python -m memleaf.mcp_server --vault "$HOME/.memleaf"
|
|
|
242
242
|
|
|
243
243
|
不传 `--vault` 时默认使用 `~/.memleaf`;也可以设置 `MEMLEAF_VAULT`。正常情况下不需要手工常驻,Hermes 或 Codex 会按需启动它。stdout 只输出 JSON-RPC,日志不会污染协议通道。
|
|
244
244
|
|
|
245
|
-
当前提供
|
|
245
|
+
当前提供 13 个工具:
|
|
246
246
|
|
|
247
247
|
| 工具 | 用途 |
|
|
248
248
|
| --- | --- |
|
|
@@ -251,7 +251,8 @@ python -m memleaf.mcp_server --vault "$HOME/.memleaf"
|
|
|
251
251
|
| `scope_catalog` | 返回 Scope、父级和别名,不返回具体记忆正文 |
|
|
252
252
|
| `search` | 返回有界候选目录和 `found`/`no_match` 状态 |
|
|
253
253
|
| `read` | 使用当前 `retrieval_id` 分页读取选中的记忆正文 |
|
|
254
|
-
| `process` | 处理完整 inbox
|
|
254
|
+
| `process` | 处理完整 inbox 轮次并按准入规则提炼;`background=true` 时异步入队 |
|
|
255
|
+
| `process_status` | 只读查询异步处理 job 状态 |
|
|
255
256
|
| `remember` | 用户明确要求时创建或更新记忆 |
|
|
256
257
|
| `forget_memory` | 按精确 ID 删除一条记忆 |
|
|
257
258
|
| `forget_about` | 忘记明确主题;有歧义时只返回候选 |
|
|
@@ -424,7 +425,7 @@ history:
|
|
|
424
425
|
|
|
425
426
|
## 隐私与安全边界
|
|
426
427
|
|
|
427
|
-
- 对话捕获只接收 user/assistant 可见文本,不捕获 system/developer
|
|
428
|
+
- 对话捕获只接收 user/assistant 可见文本,不捕获 system/developer 指令、隐藏推理或工具输出。工具原文不保存,也不会从旧 inbox 重新送入提炼;
|
|
428
429
|
- 捕获落盘前尽力脱敏常见 API key、Bearer token、Cookie、JWT 和私钥,但脱敏不是加密,也不能保证识别所有敏感信息;
|
|
429
430
|
- 路径校验、符号链接检查、Vault 锁、同目录临时文件、fsync 和原子替换用于保护本地写入;
|
|
430
431
|
- memleaf 不主动上传整个 Vault,也没有托管后台、遥测或账号系统;
|
|
@@ -471,11 +472,12 @@ MIT,见 [LICENSE](LICENSE)。
|
|
|
471
472
|
*Your memories, in files you own.*
|
|
472
473
|
|
|
473
474
|
|
|
474
|
-
## 通用处理与只读验收(0.2.
|
|
475
|
+
## 通用处理与只读验收(0.2.34)
|
|
475
476
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
所有自动记忆只从用户与 Agent 的可见对话中提炼。Agent 已经在回复里总结的
|
|
478
|
+
事实、进展和明确待办可以保留;不重新读取或分析邮件、附件、网页、文件、终端输出。
|
|
479
|
+
建议、猜测、提问和条件必须保留其性质,不能升级为用户决定、已完成动作或已核实事实。
|
|
480
|
+
已有记忆的纯复述不新建;新结论与旧记忆比较后才新增或更新。
|
|
479
481
|
|
|
480
482
|
```bash
|
|
481
483
|
memleaf audit --vault /path/to/existing/vault --json
|
|
@@ -486,29 +488,17 @@ memleaf process --vault /path/to/existing/vault --source hermes --session-id SES
|
|
|
486
488
|
`--dry-run` 在私有临时副本运行正常处理,可能调用配置的独立 Model Route;不会改写原 Vault。
|
|
487
489
|
检测到原 Vault 并发变化时会拒绝输出可用预览。没有一键应用预览的功能。
|
|
488
490
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
491
|
+
处理结果只反映可见对话的记忆提炼。若对话中的项目归属或含义仍不确定,
|
|
492
|
+
`coverage_status` 可以为 `partial`;工具执行错误或原文截断本身不再造成提炼漏项。
|
|
493
|
+
`external_evidence_status=disabled` 表示工具证据不属于提炼输入。
|
|
494
|
+
行为、限制、测试协议见 [通用处理说明](docs/general-processing.md)。
|
|
492
495
|
|
|
493
|
-
###
|
|
496
|
+
### 对话来源边界
|
|
494
497
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
include_attachments: false
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
`bounded` 允许当前轮真实工具观察保留有界、脱敏的正文;小结果可能完整保留,
|
|
502
|
-
不是承诺只保存模型总结。`metadata` 仅留工具调用标识等元数据(仍可能包含标题),
|
|
503
|
-
不保留证据正文,也不把主动排除误报成提炼漏项。`off` 不保存工具证据记录。
|
|
504
|
-
三种模式均不允许把助手复述或旧记忆回读变成独立的新事实。
|
|
505
|
-
|
|
506
|
-
现有配置未提供新字段时,旧 `include_tool_output: false` 或未设置该开关均按
|
|
507
|
-
`metadata` 处理,旧 `true` 按 `bounded` 处理。显式新字段优先;新建 Vault 只写
|
|
508
|
-
新字段,不再同时写含义冲突的旧开关。`include_attachments: true` 仍受上述总模式限制。
|
|
509
|
-
宿主通过结构化文件路径、文件/附件标识识别文档;不承诺识别任意 Shell 命令或不透明工具
|
|
510
|
-
隐藏读取的文件。用户粘贴的可见文档和显式 `remember` 内容不属于自动附件抓取。
|
|
498
|
+
新建配置使用 `capture.tool_evidence_mode: off` 与 `include_attachments: false`。
|
|
499
|
+
旧配置中的 `bounded`、`metadata` 等值仅为兼容而接受,不能重新开启工具原文提炼。
|
|
500
|
+
状态接口展示实际生效的 `off`。用户自己粘贴到可见消息中的内容属于对话来源。
|
|
511
501
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
502
|
+
边界在宿主采集、Core capture 和历史 inbox 的新处理处执行。
|
|
503
|
+
已提交记忆不会自动删除。旧版本已冻结但未完成的计划不会被静默丢弃或重新规划,
|
|
504
|
+
不含新来源边界标记的计划会停止恢复并保留现场,避免越过新的输入约定。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Capture budget compatibility
|
|
2
|
+
|
|
3
|
+
Automatic extraction uses only the current turn's visible user input and final assistant reply. Historical context, intermediate assistant messages, tool calls/results and hidden payloads are not new memory sources.
|
|
4
|
+
|
|
5
|
+
The shared evidence-budget helper remains available for legacy parsing and standalone provider compatibility. Its record, UTF-8 body and aggregate limits are implementation bounds, not permission to capture external content. Automatic capture discards tool evidence before inbox persistence, and processing excludes raw evidence in older inbox files. Legacy `bounded` or `metadata` configuration cannot restore it.
|
|
6
|
+
|
|
7
|
+
Synthetic tests retain deterministic budget, redaction, overflow and idempotency checks for that helper. Runtime acceptance verifies excluded payloads never reach model prompts or cause partial/deferred work. A final visible reply can support multiple independently useful memories through exact source bindings; repeated existing facts remain comparison-only and should produce NO_CHANGE.
|
|
8
|
+
|
|
9
|
+
Model context capacity is separate from capture compatibility. Visible messages still consume prompt capacity, and model failure must preserve retryable input rather than silently dropping it. Synthetic checks, live model results, installation and release are reported separately.
|
|
@@ -6,7 +6,7 @@ This document describes the configuration and Vault-layout compatibility boundar
|
|
|
6
6
|
|
|
7
7
|
The current persisted top-level sections are `vault`, `agents`, `scopes`, `native_sources`, `process`, `history`, `capture`, and `llm`. Retrieval remains Scope Map -> search -> read; there is no configurable legacy injection mode.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Automatic extraction uses only the current turn’s visible user input and final assistant reply. `capture.tool_evidence_mode` defaults to `off` and `capture.include_attachments` to `false`. Legacy `bounded` and `metadata` values remain readable for configuration compatibility, but all modes exclude raw tool and attachment payloads.
|
|
10
10
|
|
|
11
11
|
## Deprecated fields
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ memleaf's own current installers no longer pass the two deprecated no-op flags;
|
|
|
22
22
|
## Automatic migration
|
|
23
23
|
|
|
24
24
|
When reading an older configuration, `capture.include_tool_output: true` becomes `tool_evidence_mode: bounded`; `false` becomes `metadata`. Saving the normalized configuration writes only the current field. If both legacy and current fields are present but disagree, loading fails closed instead of guessing.
|
|
25
|
-
A
|
|
25
|
+
A missing capture mode normalizes to `off`. New Vaults write `off` and `include_attachments: false`. Explicit legacy values remain parseable, but effective capture status always reports `off` and attachment inclusion `false`; compatibility never restores raw evidence as a memory source.
|
|
26
26
|
|
|
27
27
|
The obsolete `inject` section is removed during normalization. No current runtime component consumes it.
|
|
28
28
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Evidence retention
|
|
2
|
+
|
|
3
|
+
Memleaf extracts memories from the visible conversation only. User messages and
|
|
4
|
+
complete Agent messages are the source boundary. Tool results, mail bodies,
|
|
5
|
+
documents, attachments, retrieved snippets, and terminal output are not
|
|
6
|
+
captured as memory evidence and are never sent to the extraction model.
|
|
7
|
+
|
|
8
|
+
The `tool_evidence` argument remains accepted at compatibility boundaries so an
|
|
9
|
+
older host can call a newer Vault. It has no retention authority: the effective
|
|
10
|
+
policy drops it before pending-cache, inbox, planning, or model input. A visible
|
|
11
|
+
Agent message may report a result in its own words; that message is evaluated as
|
|
12
|
+
conversation text, while the underlying tool result remains unavailable.
|
|
13
|
+
|
|
14
|
+
## Effective policy and compatibility
|
|
15
|
+
|
|
16
|
+
New Vaults write this explicit capture policy:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
capture:
|
|
20
|
+
visible_messages_only: true
|
|
21
|
+
tool_evidence_mode: off
|
|
22
|
+
include_attachments: false
|
|
23
|
+
redact_secrets: true
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`capture_policy_status` always reports the effective boundary as:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"tool_evidence_mode": "off",
|
|
31
|
+
"include_attachments": false,
|
|
32
|
+
"body_retention": "off"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Older configurations remain readable. `bounded`, `metadata`, `off`, and the
|
|
37
|
+
legacy `include_tool_output` boolean are validated and normalized for migration,
|
|
38
|
+
but none of them can re-enable tool bodies. A legacy `true` or an explicit
|
|
39
|
+
`bounded` value is therefore readable configuration state, not permission to
|
|
40
|
+
collect raw evidence. Invalid modes and non-boolean flags fail closed.
|
|
41
|
+
|
|
42
|
+
Loading a configuration does not rewrite it. Normal saves may make the
|
|
43
|
+
compatibility fields explicit, but they do not restore discarded source text.
|
|
44
|
+
|
|
45
|
+
## Redaction and budget helpers
|
|
46
|
+
|
|
47
|
+
The redaction and UTF-8 budget functions remain deterministic defensive helpers
|
|
48
|
+
for callers that validate legacy or untrusted records. They may return a bounded
|
|
49
|
+
or redacted in-memory value for that pure-function contract. Their result is not
|
|
50
|
+
an admissible memory source: capture applies the conversation-only policy after
|
|
51
|
+
validation and returns no tool evidence.
|
|
52
|
+
|
|
53
|
+
Structural `path`, `file`, `file_id`, `file://`, and explicit `attachment_id`
|
|
54
|
+
arguments may still be classified for diagnostics. Classification never grants
|
|
55
|
+
permission to retain the referenced body. A path that happens to point at an
|
|
56
|
+
attachment cannot authorize attachment content.
|
|
57
|
+
|
|
58
|
+
## Ingress and legacy data
|
|
59
|
+
|
|
60
|
+
- Direct `Memleaf.capture(..., tool_evidence=...)` stores only the visible event.
|
|
61
|
+
- `HostRuntime.observe_external_tool` drops tool, mail, document, and attachment
|
|
62
|
+
bodies before writing its pending state.
|
|
63
|
+
- The standalone Hermes adapter may keep its compatibility call shape, but Core
|
|
64
|
+
applies the same no-body boundary.
|
|
65
|
+
- A legacy inbox can still be parsed for migration and audit compatibility. Its
|
|
66
|
+
old `tool_evidence` fields are excluded from admission and model prompts; they
|
|
67
|
+
do not become retryable or partial evidence.
|
|
68
|
+
|
|
69
|
+
The policy does not silently rewrite an existing user's inbox or knowledge. An
|
|
70
|
+
old raw field may remain in an already captured file until the user explicitly
|
|
71
|
+
forgets or cleans it, but processing never treats that field as source text.
|
|
72
|
+
|
|
73
|
+
## Processing status
|
|
74
|
+
|
|
75
|
+
Intentional tool-evidence exclusion is a complete policy decision. It reports
|
|
76
|
+
`external_evidence_status=disabled`, with zero retained body bytes and zero
|
|
77
|
+
unresolved evidence caused by the exclusion. It must not create a `partial`
|
|
78
|
+
coverage result, a deferred inbox turn, or a retry request. Partial coverage and
|
|
79
|
+
deferred recovery remain available for failures in the visible conversation
|
|
80
|
+
pipeline and model validation.
|
|
81
|
+
|
|
82
|
+
No later policy change reconstructs a body that was discarded at capture. The
|
|
83
|
+
host must not re-read a mail server, document, attachment, or terminal result to
|
|
84
|
+
make a Gate decision pass.
|
|
85
|
+
|
|
86
|
+
## Verification
|
|
87
|
+
|
|
88
|
+
The contract tests cover:
|
|
89
|
+
|
|
90
|
+
- default, legacy, and explicit bounded configuration compatibility;
|
|
91
|
+
- effective `off`/disabled status and invalid-setting rejection;
|
|
92
|
+
- pure redaction and UTF-8 budget behavior;
|
|
93
|
+
- direct capture and HostRuntime dropping raw bodies;
|
|
94
|
+
- legacy inbox bodies remaining outside model input and partial accounting;
|
|
95
|
+
- admission of visible user and Agent messages only;
|
|
96
|
+
- MCP, CLI, and Hermes status reporting the disabled policy.
|