文件最后提交记录最后更新时间
fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) Consolidated salvage from PRs #5301 (qaqcvc), #5339 (lance0), #5058 and #5098 (maymuneth). Mem0 API v2 compatibility (#5301): - All reads use filters={user_id: ...} instead of bare user_id= kwarg - All writes use filters with user_id + agent_id for attribution - Response unwrapping for v2 dict format {results: [...]} - Split _read_filters() vs _write_filters() — reads are user-scoped only for cross-session recall, writes include agent_id - Preserved 'hermes-user' default (no breaking change for existing users) - Omitted run_id scoping from #5301 — cross-session memory is Mem0's core value, session-scoping reads would defeat that purpose Memory prefetch context fencing (#5339): - Wraps prefetched memory in <memory-context> fenced blocks with system note marking content as recalled context, NOT user input - Sanitizes provider output to strip fence-escape sequences, preventing injection where memory content breaks out of the fence - API-call-time only — never persisted to session history Secret redaction (#5058, #5098): - Added prefix patterns for Groq (gsk_), Matrix (syt_), RetainDB (retaindb_), Hindsight (hsk-), Mem0 (mem0_), ByteRover (brv_)1 个月前
feat(hindsight): probe API for update_mode='append' support, dedupe across processes Mirrors the pattern already shipping in hindsight-integrations/openclaw: probe <api_url>/version once per process, gate on Hindsight ≥ 0.5.0. When supported, retains use a stable session-scoped document_id (session_id) plus update_mode='append' so cross-process retains for the same session merge into one document instead of producing N-different-process-stamped duplicates. When unsupported (or probe fails), fall back to the existing per-process unique f"{session_id}-{start_ts}" document_id with no update_mode — the resume-overwrite fix (#6654) keeps working unchanged on legacy servers. Closes the dedup half of #20115. The proposed document_id_strategy config knob isn't needed: auto-detection via the same /version probe the OpenClaw plugin already uses gives the same outcome with no extra config burden, and the choice is purely a function of what the server can do. Plumbing -------- - Module-level helpers (_meets_minimum_version, _fetch_hindsight_api_version, _check_api_supports_update_mode_append) cache the result per api_url so every provider in the process gets one /version round-trip. - One-time WARN logged when the API is older than 0.5.0, telling the user to upgrade for cross-session deduplication. - New instance helper _resolve_retain_target(fallback_doc_id) returns (document_id, update_mode) based on cached capability. Wired into sync_turn and the on_session_switch flush path. - For local_embedded mode, the probe URL is taken from the running client (client.url) so we hit the actual daemon port rather than the configured default. - update_mode is set on the per-item dict; aretain_batch already threads item['update_mode'] into the API call. Tests ----- - TestUpdateModeAppendCapability (5 cases): legacy fallback, modern stable+append, per-url cache, one-time warn, flush-on-switch resolves against the OLD session. - Existing _make_hindsight_provider factory in the manager-side test file extended to seed _mode/_api_url/_api_key/_client and stub _resolve_retain_target so the bypass-init pattern keeps working. E2E verified against installed ~/.hermes/hermes-agent: - Legacy probe (unreachable host) → legacy-session-<ts> doc_id, no update_mode. - Modern probe (live local_embedded 0.5.6 daemon) → stable modern-session doc_id + update_mode='append'. - test_hermes_embedded_smoke.py passes (90s). 29 天前
fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) Consolidated salvage from PRs #5301 (qaqcvc), #5339 (lance0), #5058 and #5098 (maymuneth). Mem0 API v2 compatibility (#5301): - All reads use filters={user_id: ...} instead of bare user_id= kwarg - All writes use filters with user_id + agent_id for attribution - Response unwrapping for v2 dict format {results: [...]} - Split _read_filters() vs _write_filters() — reads are user-scoped only for cross-session recall, writes include agent_id - Preserved 'hermes-user' default (no breaking change for existing users) - Omitted run_id scoping from #5301 — cross-session memory is Mem0's core value, session-scoping reads would defeat that purpose Memory prefetch context fencing (#5339): - Wraps prefetched memory in <memory-context> fenced blocks with system note marking content as recalled context, NOT user input - Sanitizes provider output to strip fence-escape sequences, preventing injection where memory content breaks out of the fence - API-call-time only — never persisted to session history Secret redaction (#5058, #5098): - Added prefix patterns for Groq (gsk_), Matrix (syt_), RetainDB (retaindb_), Hindsight (hsk-), Mem0 (mem0_), ByteRover (brv_)1 个月前
fix(memory): skip OpenViking upload symlinks 21 天前
feat(supermemory): add multi-container, search_mode, identity template, and env var override (#5933) Based on PR #5413 spec by MaheshtheDev (Mahesh Sanikommu). Changes: - Add search_mode config (hybrid/memories/documents) passed to SDK - Add {identity} template support in container_tag for profile-scoped containers - Add SUPERMEMORY_CONTAINER_TAG env var override (priority over config) - Add multi-container mode: enable_custom_container_tags, custom_containers, custom_container_instructions in supermemory.json - Dynamic tool schemas when multi-container enabled (optional container_tag param) - Whitelist validation for custom container tags in tool calls - Simplify get_config_schema() to only prompt for API key during setup - Defer container_tag sanitization to initialize() (after template resolution) - Add custom_id support to documents.add calls - Update README with multi-container docs, search_mode, identity template, support links (Discord, email) - Update memory-providers.md with new features and multi-container example - Update memory-provider-plugin.md with minimal vs full schema guidance - Add 12 new tests covering identity template, search_mode, multi-container, config schema, and env var override1 个月前