Conversation
The plugin now reads apiUrl/apiKey from ~/.nowledge-mem/config.json, the same file used by nmem CLI, Bub, Claude Code, and other integrations. One file connects all tools for Access Anywhere. Legacy ~/.nowledge-mem/openclaw.json is still honored at highest priority for backward compatibility. New cascade for credentials: openclaw.json > pluginConfig (dashboard) > config.json > env > defaults README, CLAUDE.md updated to recommend config.json + dashboard over the legacy openclaw.json path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Matches the same fix in nmem-cli and the existing behavior in the frontend RemoteTransport. Prevents double-slash URLs when users configure apiUrl with a trailing slash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skill names "Search Memory", "Save Thread", "Distill Memory" were parsed by Claude Code as command + args (e.g. /Search with arg Memory). Renamed to hyphenated form matching all other plugins: search-memory, save-thread, distill-memory. read-working-memory was already correct. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughNormalizes API URLs by stripping trailing slashes at config load, adds shared credentials support via ~/.nowledge-mem/config.json (while preserving legacy files), fixes skill metadata names to hyphenated forms, and updates changelogs/docs and plugin versions accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI / Plugin
participant Config as parseConfig
participant FS as Filesystem (~/.nowledge-mem)
participant Env as Environment
participant Client as Client (OpenClaw / Bub)
CLI->>Config: request resolved credentials
Config->>FS: read legacy openclaw.json
Config->>FS: read shared config.json
Config->>Env: read NMEM_* env vars
Config->>CLI: return resolved { apiUrl, apiKey, source }
CLI->>Client: initialize with resolved credentials
Client->>Client: normalize apiUrl (strip trailing /)
Client-->>CLI: ready (apiUrl normalized)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
nowledge-mem-openclaw-plugin/README.md (3)
381-382: Consider clarifying trailing-slash handling.The PR summary mentions that API URLs are normalized by stripping trailing slashes at configuration load time. Consider adding a brief note in the example or nearby text to inform users that trailing slashes are automatically removed.
📝 Suggested clarification
{ - "apiUrl": "https://<your-url>", + "apiUrl": "https://<your-url>", // trailing slashes are automatically stripped "apiKey": "nmem_..." }Or add a note below the example:
}
+> Note: Trailing slashes in
apiUrlare automatically removed during configuration loading.</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@nowledge-mem-openclaw-plugin/README.mdaround lines 381 - 382, Add a brief
clarification next to the example JSON showing "apiUrl" and "apiKey" that
trailing slashes in the apiUrl are stripped at configuration load time;
specifically, update the README section that contains the example lines
"apiUrl": "https://<your-url>",and"apiKey": "nmem_..."to include a short
note (e.g., “Note: Trailing slashes in apiUrl are automatically removed during
configuration loading.”) immediately after the example so users know the
normalization behavior.</details> --- `406-408`: **Add language specification to the code block.** The static analysis tool correctly flagged this fenced code block as missing a language specification. Use `text` or `plaintext` for better rendering. <details> <summary>📝 Proposed fix</summary> ```diff Plugin-specific settings: -``` +```text openclaw.json (legacy) > OpenClaw dashboard > env vars > defaults</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@nowledge-mem-openclaw-plugin/README.mdaround lines 406 - 408, The fenced
code block in README.md is missing a language tag causing lint warnings; update
the triple-backtick fence for the snippet "openclaw.json (legacy) > OpenClaw
dashboard > env vars > defaults" to include a language specifier (use text or
plaintext) so the block becomestext ...(orplaintext ...).
Locate the code block in README.md and add the language token immediately after
the opening backticks to satisfy the static analysis rule.</details> --- `411-413`: **Add language specification to the code block.** The static analysis tool correctly flagged this fenced code block as missing a language specification. Use `text` or `plaintext` for better rendering. <details> <summary>📝 Proposed fix</summary> ```diff Credentials (apiUrl, apiKey): -``` +```text openclaw.json (legacy) > OpenClaw dashboard > config.json (shared) > env vars > defaults ``` ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@nowledge-mem-openclaw-plugin/README.mdaround lines 411 - 413, The fenced
code block in README.md is missing a language hint; update the block that
currently contains "openclaw.json (legacy) > OpenClaw dashboard > config.json
(shared) > env vars > defaults" to use a plaintext language specifier (e.g.,
changetotext) so the line renders correctly; locate the exact fenced
block in the README and add the language token immediately after the opening
backticks.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Inline comments:
In@nowledge-mem-bub-plugin/src/nowledge_mem_bub/client.py:
- Around line 47-53: The code assumes raw_url is a string and calls
raw_url.rstrip("/") which fails for non-string config values; update the
initialization in client.py so the value pulled from
os.environ.get("NMEM_API_URL") or file_config.get("apiUrl") /
file_config.get("api_url") is validated/converted to a string before calling
rstrip — e.g. check isinstance(raw_url, str) and only call raw_url.rstrip("/")
when true, or coerce with str(raw_url) for non-None values, and ensure
self._api_url is set to None when no valid URL is present (referencing raw_url,
file_config, NMEM_API_URL and self._api_url to locate the change).
Nitpick comments:
In@nowledge-mem-openclaw-plugin/README.md:
- Around line 381-382: Add a brief clarification next to the example JSON
showing "apiUrl" and "apiKey" that trailing slashes in the apiUrl are stripped
at configuration load time; specifically, update the README section that
contains the example lines"apiUrl": "https://<your-url>",and"apiKey": "nmem_..."to include a short note (e.g., “Note: Trailing slashes in apiUrl are
automatically removed during configuration loading.”) immediately after the
example so users know the normalization behavior.- Around line 406-408: The fenced code block in README.md is missing a language
tag causing lint warnings; update the triple-backtick fence for the snippet
"openclaw.json (legacy) > OpenClaw dashboard > env vars > defaults" to include a
language specifier (use text or plaintext) so the block becomestext ...
(orplaintext ...). Locate the code block in README.md and add the
language token immediately after the opening backticks to satisfy the static
analysis rule.- Around line 411-413: The fenced code block in README.md is missing a language
hint; update the block that currently contains "openclaw.json (legacy) >
OpenClaw dashboard > config.json (shared) > env vars > defaults" to use a
plaintext language specifier (e.g., changetotext) so the line renders
correctly; locate the exact fenced block in the README and add the language
token immediately after the opening backticks.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `8c1f8f81-e2bc-4f6d-af3b-49b722ecd7d8` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between ec604911e40fceb715fcbdfe16c5b8307c711291 and ba7534391e1b07935260e7f57f2d786663ebfa0f. </details> <details> <summary>📒 Files selected for processing (13)</summary> * `nowledge-mem-bub-plugin/CHANGELOG.md` * `nowledge-mem-bub-plugin/src/nowledge_mem_bub/client.py` * `nowledge-mem-claude-code-plugin/CHANGELOG.md` * `nowledge-mem-claude-code-plugin/skills/distill-memory/SKILL.md` * `nowledge-mem-claude-code-plugin/skills/save-thread/SKILL.md` * `nowledge-mem-claude-code-plugin/skills/search-memory/SKILL.md` * `nowledge-mem-openclaw-plugin/CHANGELOG.md` * `nowledge-mem-openclaw-plugin/CLAUDE.md` * `nowledge-mem-openclaw-plugin/README.md` * `nowledge-mem-openclaw-plugin/openclaw.plugin.json` * `nowledge-mem-openclaw-plugin/package.json` * `nowledge-mem-openclaw-plugin/src/client.js` * `nowledge-mem-openclaw-plugin/src/config.js` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
♻️ Duplicate comments (1)
nowledge-mem-bub-plugin/src/nowledge_mem_bub/client.py (1)
47-58:⚠️ Potential issue | 🔴 CriticalLine 58 overwrites the type-guarded normalization and reintroduces the crash bug.
Lines 53-57 correctly guard against non-string
raw_urlvalues, but line 58 immediately overwritesself._api_urlwithraw_url.rstrip("/")unconditionally. Ifraw_urlis a truthy non-string (e.g., an integer or dict from malformed config JSON), this will crash withAttributeError.Remove the redundant line 58 — the logic in lines 53-57 already handles normalization correctly.
Proposed fix
raw_url = ( os.environ.get("NMEM_API_URL") or file_config.get("apiUrl") or file_config.get("api_url") or None ) if isinstance(raw_url, str): normalized = raw_url.strip().rstrip("/") self._api_url = normalized or None else: self._api_url = None - self._api_url = raw_url.rstrip("/") if raw_url else None🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@nowledge-mem-bub-plugin/src/nowledge_mem_bub/client.py` around lines 47 - 58, The assignment at the end overwrites the earlier type-guarded normalization and causes AttributeError for non-string raw_url; remove the redundant final assignment (the line setting self._api_url = raw_url.rstrip("/") if raw_url else None) so that the earlier guarded block that checks isinstance(raw_url, str), trims and sets self._api_url (or None) remains the sole logic for normalizing raw_url in the constructor of the client.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@nowledge-mem-bub-plugin/src/nowledge_mem_bub/client.py`:
- Around line 47-58: The assignment at the end overwrites the earlier
type-guarded normalization and causes AttributeError for non-string raw_url;
remove the redundant final assignment (the line setting self._api_url =
raw_url.rstrip("/") if raw_url else None) so that the earlier guarded block that
checks isinstance(raw_url, str), trims and sets self._api_url (or None) remains
the sole logic for normalizing raw_url in the constructor of the client.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6c9782f5-3067-46d5-af4c-958f7175c405
📒 Files selected for processing (1)
nowledge-mem-bub-plugin/src/nowledge_mem_bub/client.py
Summary by CodeRabbit
Bug Fixes
New Features
Documentation