Skip to content

V0.6 update#50

Merged
wey-gu merged 12 commits into
mainfrom
v0.6
Feb 18, 2026
Merged

V0.6 update#50
wey-gu merged 12 commits into
mainfrom
v0.6

Conversation

@wey-gu

@wey-gu wey-gu commented Feb 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Remote mode configuration with API URL and key support.
    • Memory deletion (forget) functionality via command and tool.
    • Working Memory patching for section updates.
    • Graph exploration features: connections and evolution tracking.
    • Activity timeline browser.
    • Bi-temporal date filtering for memory searches.
    • Native Nowledge Mem tools: save, context, timeline, forget.
  • Bug Fixes

    • Improved auto-capture with independent thread and memory tracking.
    • Enhanced recall with richer memory formatting and tool guidance.
  • Documentation

    • Redesigned README and design documentation.
    • Updated CHANGELOG for v0.2.7.

wey-gu and others added 12 commits February 17, 2026 21:16
Redesigned tool set around Nowledge Mem's v0.6 architecture.

Tools:
- Add nowledge_mem_save: structured capture with 8 unit_types
- Add nowledge_mem_context: Working Memory daily briefing
- Add nowledge_mem_connections: graph exploration with EVOLVES chains,
  entity discovery, cross-topic synthesis, and SOURCED_FROM provenance
  for Library documents/URLs
- Add nowledge_mem_forget: delete by ID or query with confirmation
- Remove nowledge_mem_search (redundant with memory_search)
- Remove nowledge_mem_store (replaced by nowledge_mem_save)
- Remove nowledge_mem_working_memory (replaced by nowledge_mem_context)

Tool descriptions sharpened based on live testing:
- connections: explicit cross-topic synthesis and provenance use cases
- save: proactive signal — don't wait to be asked
- memory_search: temporal query guidance

Hooks:
- recall: updated tool guidance to map user intents to right tools
- capture: multi-layer quality gate (questions, injection, triggers)
- after_compaction hook added for thread continuity

Slash commands: add /forget

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add nowledge_mem_timeline: wraps /agent/feed/events with day-grouped
  output for temporal questions (last_n_days, event_type, tier1_only)
- Update memory_search description to reflect multi-signal scoring:
  embedding + BM25 + labels + graph/community + recency decay
- Update recall hook: route temporal queries to timeline, topic queries
  to memory_search/connections
- Update nowledge_mem_context: clarify WM is read-only from plugin side
- Document WM full-overwrite API and backend gaps in CLAUDE.md

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add event_date_from/to and recorded_date_from/to params to memory_search
  Two time dimensions: when fact HAPPENED vs when it was SAVED
  Uses client.searchTemporal() via API directly (works with any CLI version)
- Results include eventStart, eventEnd, temporalContext from backend
- CLAUDE.md: document all API signatures with params

Co-authored-by: Cursor <cursoragent@cursor.com>
…meline chaining

- connections: rewrite output to JOIN edges→nodes; show CRYSTALLIZED_FROM,
  EVOLVES (with sub-relation labels), SOURCED_FROM, MENTIONS each as typed
  sections with relationship strength and memoryIds for follow-up
- memory_search: switch to searchRich (API-direct) — surface relevanceReason
  ("Text Match 100% + Semantic 69% | decay[imp:high]") and importance per result
- timeline: embed memoryId hints in entries so agent can chain to connections
- timeline: document event_type values in description for model discoverability
- recall hook: use searchRich — show scoring breakdown in injected context
- client: add searchRich() convenience wrapper

Co-authored-by: Cursor <cursoragent@cursor.com>
Aligns with nmem-cli v0.4 which adds graph expand (g) and feed (f) commands.
Every feature now works in remote mode via NMEM_API_URL + NMEM_API_KEY
without any plugin changes.

- client: graphExpand() uses `nmem g expand`, feedEvents() uses `nmem f`
- client: search() now gets rich fields (relevance_reason, importance, labels,
  temporal) from the enriched CLI JSON — searchRich() is now an alias
- client: searchTemporal() uses CLI --event-from/--recorded-from args
- client: _normalizeMemory() canonical shape across all search paths
- connections: uses client.graphExpand() instead of client.apiJson()
- timeline: uses client.feedEvents() instead of client.apiJson()
- All API fallbacks retained for graceful degradation on older CLI versions

Co-authored-by: Cursor <cursoragent@cursor.com>
…giene

Exposes Nowledge Mem remote access in plugin configuration:
- apiUrl: server URL (empty = local, supports remote deployment)
- apiKey: API key, marked secret=true in uiHints for masked UI input

Credential handling rules:
- apiKey injected ONLY as NMEM_API_KEY env var into child processes
- Never passed as a CLI arg (avoids ps aux exposure)
- Never logged at any level
- Config values win over NMEM_API_URL / NMEM_API_KEY env vars
- Initialization log shows mode=remote → URL vs mode=local

NowledgeMemClient now accepts credentials at construction; _spawnEnv()
and _apiUrlArgs() build per-spawn env and args cleanly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Destructure error from both useCachedPromise calls and display a
Toast.Style.Failure when searchMemories or listMemories fails, so
users see "Connection failed" instead of a silent empty list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_type fixed

nowledge_mem_save now exposes the full save contract:
- unit_type: works end-to-end (API model fix in backend)
- labels[]: array of topic/project tags, passed as repeated -l args
- event_start / event_end: bi-temporal "when it happened" fields
- temporal_context: past | present | future | timeless
- importance: clamped to [0, 1]

Confirmation message shows all non-default fields:
  "Saved: DB choice [decision] (id: ...) · labels: backend · event: 2024-03"

CLAUDE.md: full rewrite reflecting current architecture
  - CLI-first table, remote config rules, tool surface, known gaps
README.md: remote mode config section with secure apiKey example

Co-authored-by: Cursor <cursoragent@cursor.com>
Gap 1 — Feed date range:
- nowledge_mem_timeline: add date_from/date_to (YYYY-MM-DD) params for exact
  temporal queries ("what was I doing last Tuesday?")
- client.feedEvents(): pass --from/--to to `nmem f`; API fallback uses
  ?date_from=&date_to= query params
- Range label in timeline output: "Activity 2026-02-17 → 2026-02-17:"

Gap 2 — EVOLVES version chain via CLI:
- client.graphEvolves(): new method using `nmem g evolves <id>`; falls back
  to GET /agent/evolves?memory_id=<id> (newly supported by backend)
- connections.js: switch from raw apiJson() to client.graphEvolves(); edge
  direction now shown relative to the queried memory (→ newer / ← older)

Gap 3 — Working Memory section-level edit:
- client.patchWorkingMemory(heading, { content, append }): new method using
  `nmem wm patch`; falls back to JS patchWmSection() + full PUT
- nowledge_mem_context: now accepts patch_section + patch_content/patch_append
  params; agents can update one WM section without overwriting the rest
- patchWmSection() JS helper mirrors the Python _wm_patch_content() logic

Bump to v0.2.7

Co-authored-by: Cursor <cursoragent@cursor.com>
Bug: buildAgentEndCaptureHandler gated the thread append behind
shouldCaptureAsMemory(), which checks for memory-trigger patterns in the
last user message. Sessions ending with a question or a command were
silently skipped — the thread was never saved to Nowledge Mem.

The before_reset handler was already correct (unconditional).

Fix: move appendOrCreateThread() before the shouldCaptureAsMemory check.
Thread capture now always runs on successful agent_end when messages exist.
The memory note remains gated — it's an additional signal, not the
prerequisite for saving the session thread.

Verified end-to-end:
- thread create --id + append --idempotency-key both work in installed CLI
- second append with same idempotency-key returns messages_added=0
- sessions ending with questions now get thread-captured correctly

Co-authored-by: Cursor <cursoragent@cursor.com>
Expand Hooks section in README to explain:
- autoRecall and autoCapture are plugin lifecycle hooks, not LLM decisions
- autoCapture does two independent things: unconditional thread transcript
  append and conditional memory note extraction
- Thread deduplication by external_id prevents duplicates across hook fires
- Quality gates apply only to memory notes, not thread transcripts
- What "context compaction" is and why capture happens at that point

Co-authored-by: Cursor <cursoragent@cursor.com>
@wey-gu wey-gu merged commit 7ec7488 into main Feb 18, 2026
1 check was pending
@wey-gu wey-gu deleted the v0.6 branch February 18, 2026 04:16
@coderabbitai

coderabbitai Bot commented Feb 18, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR advances the Nowledge Mem OpenClaw plugin from version 0.1.4 to 0.2.7, introducing date range filtering for feed events, EVOLVES CLI graph integration, Working Memory section patching, graph exploration tools (connections, timeline), memory deletion (forget), bi-temporal search capabilities, and remote mode support with API configuration.

Changes

Cohort / File(s) Summary
Plugin Manifest & Versioning
manifest.json, openclaw.plugin.json, package.json
Updated plugin ID from nowledge-mem to openclaw-nowledge-mem, added version 0.2.7, extended UI hints and config schema with remote mode fields (apiUrl, apiKey), and bumped package version to 0.2.0.
Documentation
README.md, CLAUDE.md, CHANGELOG.md
Comprehensive documentation redesign: README shifted from personal memory to knowledge graph model with local/remote modes; CLAUDE.md transitioned from scope/status layout to design-focused structure with file mappings and tool surfaces; CHANGELOG.md documented new version 0.2.7 features (feed filtering, EVOLVES, Working Memory patching).
Client & Configuration
src/client.js, src/config.js
Expanded NowledgeMemClient constructor to accept credentials (apiUrl, apiKey), added CLI/API fallback patterns, introduced 8 new methods (patchWorkingMemory, searchRich, searchTemporal, graphExpand, graphEvolves, feedEvents), and enhanced config parsing to return API credentials from env vars or config.
Hooks
src/hooks/capture.js, src/hooks/recall.js
Decoupled thread capture from memory capture in capture.js (thread always appends on success, memory capture is independent and idempotent); enriched recall.js with searchRich, updated memory formatting with scores/labels/snippets, and reorganized context sections with expanded tool guidance.
Tools - New Nowledge Mem Suite
src/tools/save.js, src/tools/forget.js, src/tools/connections.js, src/tools/timeline.js, src/tools/context.js
Added five new tool modules: save (structured knowledge capture with unit types and temporal context), forget (search-then-delete with disambiguation), connections (graph traversal with edge-type grouping), timeline (activity feed grouped by day), and context (Working Memory read/patch operations).
Tools - Legacy, Updated, & Removed
src/tools/memory-search.js, src/tools/memory-get.js, src/tools/search.js, src/tools/store.js, src/tools/working-memory.js
Enhanced memory-search.js with bi-temporal filtering (event/recorded date bounds) and multi-signal search; reformatted memory-get.js for clarity; removed search.js, store.js, and working-memory.js (functionality replaced by new tools: save, connections, timeline, context).
Commands & Integration
src/commands/slash.js, src/index.js
Added createForgetCommand slash command with search-then-delete logic and disambiguation UI; updated index.js to instantiate NowledgeMemClient with credentials, register new native tools, introduce remoteMode detection, and import forget command.
UI Integration
nowledge-mem-raycast/src/search-memories.tsx
Enhanced error handling with useEffect hook to display failure toasts on search or recent memory fetch errors.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant C as Client
    participant CLI as Nmem CLI
    participant API as API Backend
    
    U->>C: patchWorkingMemory(heading, {content})
    C->>CLI: spawn with --patch --heading
    alt CLI supports patch
        CLI->>CLI: apply patch
        CLI-->>C: success
        C-->>U: confirmation
    else CLI lacks patch support
        C->>C: fallback to read-modify-write
        C->>API: GET /agent/working-memory
        API-->>C: document content
        C->>C: patchWmSection(content, heading, {content})
        C->>API: PUT /agent/working-memory
        API-->>C: updated document
        C-->>U: confirmation
    end
Loading
sequenceDiagram
    participant U as User
    participant C as Client
    participant CLI as Nmem CLI
    participant API as API Backend
    
    U->>C: searchTemporal(query, {dateFrom, dateTo})
    C->>CLI: spawn temporal search with date filters
    alt CLI temporal search available
        CLI->>CLI: filter by event/recorded dates
        CLI-->>C: results with temporal context
        C->>U: enriched results (scores, event window)
    else CLI lacks temporal support
        C->>API: GET /search?temporal filters
        API-->>C: bi-temporal filtered results
        C->>U: enriched results (matchedVia, context)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Poem

🐰 A rabbit hops through temporal winds of time,
Connections bloom and timelines rhyme,
Forget the past, or patch it with care,
Graph expansions flourish everywhere!
With save and context, a knowledge garden grows,
Where memory flows through whispered echoes. 🌟

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v0.6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant