chore(cli): bump to v0.2.5 + changelog + ruff format fix

- Python: 0.2.4 → 0.2.5 in cli/python/pyproject.toml
- Node:   0.2.4 → 0.2.5 in cli/node/package.json
- docs/changelog/sdk.mdx: new CLI v0.2.5 entry (Agent Mode bootstrap,
  --agent-caller, mem0 identify, plugin sync, claim flow, pingKey fix,
  rate-limit clarity, JSON envelope command field, envelope validation)
- CI fix: ruff format applied to config.py + test_init_internals.py

Release flow: merge → tag cli-v0.2.5 (Python CD) and cli-node-v0.2.5
(Node CD) on GitHub Releases. OIDC trusted publishing — no tokens needed.
This commit is contained in:
Mgeeeek
2026-05-14 19:51:27 +05:30
parent bd6d170ebb
commit 3d3303bf36
5 changed files with 23 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@mem0/cli", "name": "@mem0/cli",
"version": "0.2.4", "version": "0.2.5",
"description": "The official CLI for mem0 — the memory layer for AI agents", "description": "The official CLI for mem0 — the memory layer for AI agents",
"type": "module", "type": "module",
"bin": { "bin": {
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "mem0-cli" name = "mem0-cli"
version = "0.2.4" version = "0.2.5"
description = "The official CLI for mem0 — the memory layer for AI agents" description = "The official CLI for mem0 — the memory layer for AI agents"
readme = "README.md" readme = "README.md"
license = "Apache-2.0" license = "Apache-2.0"
+3 -1
View File
@@ -31,7 +31,9 @@ class PlatformConfig:
# Agent Mode (unclaimed-shadow signup) # Agent Mode (unclaimed-shadow signup)
agent_mode: bool = False # True while the key is an unclaimed agent-mode key agent_mode: bool = False # True while the key is an unclaimed agent-mode key
created_via: str = "" # "agent_mode" | "email" | "api_key" | "existing_key" created_via: str = "" # "agent_mode" | "email" | "api_key" | "existing_key"
agent_caller: str = "" # canonical agent name when created_via == "agent_mode" (e.g. "claude-code") agent_caller: str = (
"" # canonical agent name when created_via == "agent_mode" (e.g. "claude-code")
)
claimed_at: str = "" # ISO timestamp once the agent has been claimed by a human claimed_at: str = "" # ISO timestamp once the agent has been claimed by a human
default_user_id: str = "" # `user_<slug>` returned by bootstrap; used as auto-default default_user_id: str = "" # `user_<slug>` returned by bootstrap; used as auto-default
+1 -6
View File
@@ -91,12 +91,7 @@ def test_shell_rc_does_not_create_new_export(tmp_path) -> None:
def test_shell_rc_preserves_surrounding_content(tmp_path) -> None: def test_shell_rc_preserves_surrounding_content(tmp_path) -> None:
rc = tmp_path / ".zshrc" rc = tmp_path / ".zshrc"
original = ( original = "# my zshrc\nalias ll='ls -la'\nexport MEM0_API_KEY='old'\nexport OTHER=keepme\n"
"# my zshrc\n"
"alias ll='ls -la'\n"
"export MEM0_API_KEY='old'\n"
"export OTHER=keepme\n"
)
rc.write_text(original, encoding="utf-8") rc.write_text(original, encoding="utf-8")
_update_shell_rc(rc, "newkey") _update_shell_rc(rc, "newkey")
after = rc.read_text(encoding="utf-8") after = rc.read_text(encoding="utf-8")
+17
View File
@@ -1323,6 +1323,23 @@ See the [TypeScript SDK migration guide](https://docs.mem0.ai/migration/ts-v2-to
<Tab title="CLI"> <Tab title="CLI">
<Update label="2026-05-14" description="Python v0.2.5 / Node v0.2.5">
**New Features:**
- **Agent Mode (`mem0 init --agent`):** Zero-friction signup for AI agents — mints a working Mem0 API key in <5s with no email, no dashboard, no OTP. Returns an unclaimed shadow account the human can later claim with `mem0 init --email <their-email>` (memories preserved, same key keeps working) ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Self-declared agent identity:** Agents pass `--agent-caller <name>` (e.g. `claude-code`, `cursor`, `codex`) on `mem0 init --agent` so signups attribute to the right tool in analytics. Proof Editor-style — the agent declares itself rather than the CLI sniffing it from env vars ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **`mem0 identify <name>`:** New subcommand to self-tag an Agent Mode key after the fact when the agent forgot to pass `--agent-caller` on init. Idempotent — re-running just overwrites ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Plugin sync:** `~/.claude/settings.json::env::MEM0_API_KEY` and `~/.zshrc`/`.bashrc` `export MEM0_API_KEY=` lines stay in sync with `~/.mem0/config.json` automatically. Idempotent — only updates EXISTING entries, never creates new ones ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Claim flow:** `mem0 init --email <email>` claims an existing Agent Mode shadow via OTP. Upgrade-in-place — the API key never changes, memories transfer to the human's account ([#5123](https://github.com/mem0ai/mem0/pull/5123))
**Bug Fixes:**
- **Decision tree network resilience:** `pingKey` now distinguishes network errors from invalid keys — returns false ONLY on HTTP 401/403, returns true on connection failures / timeouts / 5xx. Prevents a VPN flap from silently rotating the user's API key and rewriting plugin-sync targets ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Rate-limit error clarity:** DRF's opaque `"You do not have permission"` 403 from Agent Mode rate limits is now translated to `"Daily Agent Mode signup limit reached for this network (5/day). Try again from a different IP or after midnight UTC."` ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **JSON envelope `command` field:** `mem0 init --agent --json` error envelopes now populate the `command` field correctly instead of returning an empty string ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Bootstrap envelope validation:** Defends against partial/malformed backend responses (e.g. `{api_key: null}`) silently persisting null/undefined into typed string fields ([#5123](https://github.com/mem0ai/mem0/pull/5123))
</Update>
<Update label="2026-04-22" description="Python v0.2.4 / Node v0.2.4"> <Update label="2026-04-22" description="Python v0.2.4 / Node v0.2.4">
**New Features:** **New Features:**