mindgraph-mcp 0.22.0 → 0.23.0

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
@@ -88,6 +88,34 @@ cleanly. Connection settings persist to `~/.mindgraph/hooks.json` (mode 600) so
88
88
  hooks work regardless of shell environment; the API key is never written into
89
89
  project settings.
90
90
 
91
+ **Per-prompt recall (on by default).** A `UserPromptSubmit` hook runs a
92
+ bounded topic recall for each prompt — the same request the Hermes provider
93
+ makes: `POST /retrieve/context` with up to 8 keywords from the prompt (obvious
94
+ secrets redacted first), 5 items, no source chunks — and injects at most 4,000
95
+ characters headed `MindGraph recall (bounded):`, one line per item (type,
96
+ label, one-line summary, source document). Prompts under 12 characters and
97
+ slash commands are skipped, a block identical to the last one injected is not re-injected in the same
98
+ session, and the hook gives up after 4 s and injects nothing on any error, so
99
+ it never blocks a prompt. Turn it off with
100
+ `install-hooks --no-prompt-recall` (or `MINDGRAPH_HOOK_PROMPT_RECALL=off` in
101
+ the environment); `--prompt-recall` turns it back on.
102
+
103
+ **Transcript capture (off by default).** `install-hooks --capture` adds a
104
+ `PreCompact` hook and makes `SessionEnd` capture too. **What leaves the
105
+ machine when capture is on:** the user prompts and assistant text replies
106
+ from the Claude Code transcript (`transcript_path`) written since the last
107
+ capture, sent to `POST /ingest/session` for extraction, attached to the
108
+ session's MindGraph Session. Tool calls, tool output, thinking blocks,
109
+ subagent (sidechain) turns, compaction summaries, slash-command output and
110
+ system reminders are never sent; API keys, tokens, private keys and
111
+ `key=value` credentials are redacted by pattern (a heuristic, not a
112
+ guarantee). The capture offset lives in the hook ledger under
113
+ `~/.mindgraph/runtime/` (mode 600). `npx mindgraph-mcp hooks preview
114
+ [transcript_path]` prints exactly the request body that would be sent, and
115
+ sends nothing. `install-hooks --no-capture` (or
116
+ `MINDGRAPH_HOOK_CAPTURE=off`) turns it off. Both choices persist in
117
+ `~/.mindgraph/hooks.json`, so automatic hook refreshes keep them.
118
+
91
119
  **Updates are hands-free.** The MCP registration floats on `npx @latest`,
92
120
  and at startup the server self-heals the pinned hook runner from its own
93
121
  bundle — upgrade-only (never a downgrade from a stale npx cache), atomic,
@@ -224,13 +252,16 @@ mindgraph-mcp uninstall Remove from Claude Desktop config
224
252
  mindgraph-mcp uninstall-code Remove from Claude Code
225
253
  mindgraph-mcp install-hooks Install coding hooks (--harness claude-code|codex)
226
254
  mindgraph-mcp uninstall-hooks Remove MindGraph-owned hook entries
255
+ mindgraph-mcp hooks preview Print what transcript capture would send (sends nothing)
227
256
  mindgraph-mcp skills pull Render published and granted skills into local SKILL.md directories
228
257
  mindgraph-mcp skills push Import or update one local SKILL.md as a governed candidate
229
258
  mindgraph-mcp status Show installation status
230
259
  ```
231
260
 
232
261
  Options: `--api-key <key>`, `--base-url <url>`, `--agent-id <id>`,
233
- `--scope user|project`, `--project-dir <dir>`, `--harness <name>`, `--help`.
262
+ `--scope user|project`, `--project-dir <dir>`, `--harness <name>`,
263
+ `--no-prompt-recall` / `--prompt-recall`, `--capture` / `--no-capture`,
264
+ `--session-id <id>` (for `hooks preview`), `--help`.
234
265
 
235
266
  **Teams**: when several people share one org graph, give each member a
236
267
  distinct identity — `--agent-id claude-code:<name>` on `install-code` /
@@ -250,6 +281,8 @@ teammates one logical agent, which claims each other's work).
250
281
  | `MINDGRAPH_ORG_ID` | *(unset)* | Pin operations to a specific organization when a key has access to more than one |
251
282
  | `MINDGRAPH_CODEGRAPH_BIN` | *(auto)* | Explicit path to the codegraph binary (PATH and `~/.local/bin` are probed) |
252
283
  | `MINDGRAPH_HOOK_AUTOUPDATE` | *(on)* | `off` disables the server's startup self-heal of the pinned hook runner; the version-skew note then signals drift instead |
284
+ | `MINDGRAPH_HOOK_PROMPT_RECALL` | *(on)* | `off` disables the Claude `UserPromptSubmit` recall at runtime |
285
+ | `MINDGRAPH_HOOK_CAPTURE` | *(stored choice; off)* | `on`/`off` overrides the stored `--capture` choice for Claude transcript capture at runtime. With capture stored off, `on` captures only at `SessionEnd`, because the `PreCompact` entry is not installed; run `install-hooks --capture` to add it |
253
286
  | `MINDGRAPH_SKIP_MCP_REGISTRATION_CHECK` | *(unset)* | `1` silences the SessionStart warning for hooks running without a registered MindGraph MCP server (exotic registration layouts) |
254
287
 
255
288
  ## Usage in Claude