@echomem/mcp 1.4.0 → 1.4.2

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.
package/README.md CHANGED
@@ -35,23 +35,57 @@ legacy EchoMem-synthesized recall answer.
35
35
  ## Quick start (recommended)
36
36
 
37
37
  ```bash
38
- # One command: detect your editor, write its MCP config, log in via the browser.
39
- npx -y @echomem/mcp setup
38
+ # One command: install the CLI, detect your editor, write MCP config, log in via the browser.
39
+ npm i -g @echomem/mcp@latest && echomem-mcp setup
40
40
  ```
41
41
 
42
- `setup` detects the client (Cursor / Windsurf / Claude Desktop), writes its MCP config (with **no
43
- secret** in it credentials live in `~/.echomem/credentials.json`, mode 0600), then opens the
44
- browser to approve the device and, for encrypted accounts, unlock the vault. Reload your editor and
45
- you're done.
42
+ This keeps `echomem-mcp` available for later commands like `status`, `update`, `unlock`, and
43
+ playground setup. `setup` detects the client (Cursor / Windsurf / Claude Desktop), writes its MCP
44
+ config (with **no secret** in it credentials live in `~/.echomem/credentials.json`, mode 0600),
45
+ then opens the browser to approve the device and, for encrypted accounts, unlock the vault. Reload
46
+ your editor and you're done.
46
47
 
47
48
  | Command | What it does |
48
49
  |---|---|
50
+ | `npm i -g @echomem/mcp@latest && echomem-mcp setup` | Install the CLI globally and run setup in one explicit step |
51
+ | `npx -y @echomem/mcp@latest setup` | One-off setup without keeping a global CLI command |
49
52
  | `echomem-mcp setup [--client cursor\|windsurf\|claude-desktop]` | Write client config + log in |
53
+ | `echomem-mcp setup --skip-login [--client cursor\|windsurf\|claude-desktop\|codex]` | Write client config without opening the browser or changing credentials |
54
+ | `npx -y @echomem/mcp@latest update [--client cursor\|windsurf\|claude-desktop\|codex]` | One-shot update: repoint the client config to the latest bridge, with no browser login |
55
+ | `echomem-mcp setup --with-hud [--client codex]` | Write client config + log in + launch the EchoMem context HUD |
50
56
  | `echomem-mcp login` | Approve device in browser (or use `--token` / `--passphrase`) |
51
57
  | `echomem-mcp unlock` | Re-derive the encryption key after its TTL (or `--passphrase`) |
52
58
  | `echomem-mcp status` | Show token / key / detected clients |
53
59
  | `echomem-mcp logout` | Remove stored credentials |
54
60
 
61
+ The bridge reports its package version in MCP server instructions and in the `search_memories`
62
+ tool description. Agents should use that version signal to update once when stale, not auto-update
63
+ on every MCP startup.
64
+
65
+ ## EchoMem Context HUD
66
+
67
+ The package also ships `echomem-hud`, a local context-health sidecar for Codex and Claude. It reads
68
+ local agent logs, computes a tracked lower-bound "clean vs dirty" context score, and renders a small
69
+ HUD without adding tokens to the agent conversation.
70
+
71
+ ```bash
72
+ echomem-hud app # Electron floating HUD
73
+ echomem-hud serve # Browser fallback at http://127.0.0.1:17377
74
+ echomem-hud summary --json # Machine-readable current score
75
+ echomem-hud status # Show detected Codex/Claude sources
76
+ ```
77
+
78
+ Supported local sources:
79
+ - Codex: `~/.codex/sessions/**/rollout-*.jsonl`
80
+ - Claude Code: `~/.claude/echo-ctx/*.json` first, then local transcripts when present
81
+ - Claude desktop agent/Cowork: local agent-mode transcripts under Application Support
82
+
83
+ The v1 metric counts `range_redundant` reads only and reports pollution as `tracked dead-weight ≥`
84
+ because exact context composition and provider eviction are not observable.
85
+
86
+ MCP fallback: agents can call `echo_context_health` to get the same score as markdown in-chat. This
87
+ is on-demand; the passive HUD remains a separate local process.
88
+
55
89
  ### Manual / headless (SSH, containers, CI)
56
90
 
57
91
  No browser? Provide secrets directly — this is the documented headless path:
@@ -80,7 +114,7 @@ npm test # crypto compat + encrypted-local integration tests
80
114
 
81
115
  ### Add to your IDE (Cursor or Windsurf)
82
116
 
83
- > Prefer `npx -y @echomem/mcp setup` above — it writes these files for you and keeps secrets out of
117
+ > Prefer `npm i -g @echomem/mcp@latest && echomem-mcp setup` above — it writes these files for you and keeps secrets out of
84
118
  > the client config. The manual steps below are the fallback.
85
119
 
86
120
  #### For Cursor
@@ -151,6 +185,7 @@ ECHO_API_TOKEN="your_token" ECHO_API_BASE_URL="http://localhost:3000" npm run st
151
185
  * **`search_memories_by_keywords`**: Retrieve memories by matching the `keys` field.
152
186
  * **`search_others_memories`**: Search other users' public memories through MemoryFeed public search.
153
187
  * **`delete_memory`**: Delete a single personal memory through a two-step confirmation flow. First call with `memoryId` only to preview the target and receive `confirmationToken`; after the user explicitly confirms, call again with `confirmed: true` and that exact token. This deletes the memory row only and preserves raw `source_of_truth` conversation records.
188
+ * **`echo_context_health`**: Return the local Codex/Claude context-health score as markdown. Works without login and uploads no transcript content.
154
189
 
155
190
  Legacy aliases are preserved for compatibility:
156
191
 
Binary file