mindgraph-mcp 0.22.0 → 0.24.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 +37 -1
- package/dist/cli.js +915 -258
- package/dist/index.js +263 -136
- package/dist/server.d.mts +4 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +32 -2
- package/dist/server.mjs +32 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -88,6 +88,36 @@ 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). An item is injected only when its
|
|
97
|
+
label or summary mentions two distinct keywords from the prompt (one, when the
|
|
98
|
+
prompt yields a single keyword), so a prompt can inject nothing. Prompts under 12 characters and
|
|
99
|
+
slash commands are skipped, a block identical to the last one injected is not re-injected in the same
|
|
100
|
+
session, and the hook gives up after 4 s and injects nothing on any error, so
|
|
101
|
+
it never blocks a prompt. Turn it off with
|
|
102
|
+
`install-hooks --no-prompt-recall` (or `MINDGRAPH_HOOK_PROMPT_RECALL=off` in
|
|
103
|
+
the environment); `--prompt-recall` turns it back on.
|
|
104
|
+
|
|
105
|
+
**Transcript capture (off by default).** `install-hooks --capture` adds a
|
|
106
|
+
`PreCompact` hook and makes `SessionEnd` capture too. **What leaves the
|
|
107
|
+
machine when capture is on:** the user prompts and assistant text replies
|
|
108
|
+
from the Claude Code transcript (`transcript_path`) written since the last
|
|
109
|
+
capture, sent to `POST /ingest/session` for extraction, attached to the
|
|
110
|
+
session's MindGraph Session. Tool calls, tool output, thinking blocks,
|
|
111
|
+
subagent (sidechain) turns, compaction summaries, slash-command output and
|
|
112
|
+
system reminders are never sent; API keys, tokens, private keys and
|
|
113
|
+
`key=value` credentials are redacted by pattern (a heuristic, not a
|
|
114
|
+
guarantee). The capture offset lives in the hook ledger under
|
|
115
|
+
`~/.mindgraph/runtime/` (mode 600). `npx mindgraph-mcp hooks preview
|
|
116
|
+
[transcript_path]` prints exactly the request body that would be sent, and
|
|
117
|
+
sends nothing. `install-hooks --no-capture` (or
|
|
118
|
+
`MINDGRAPH_HOOK_CAPTURE=off`) turns it off. Both choices persist in
|
|
119
|
+
`~/.mindgraph/hooks.json`, so automatic hook refreshes keep them.
|
|
120
|
+
|
|
91
121
|
**Updates are hands-free.** The MCP registration floats on `npx @latest`,
|
|
92
122
|
and at startup the server self-heals the pinned hook runner from its own
|
|
93
123
|
bundle — upgrade-only (never a downgrade from a stale npx cache), atomic,
|
|
@@ -224,13 +254,17 @@ mindgraph-mcp uninstall Remove from Claude Desktop config
|
|
|
224
254
|
mindgraph-mcp uninstall-code Remove from Claude Code
|
|
225
255
|
mindgraph-mcp install-hooks Install coding hooks (--harness claude-code|codex)
|
|
226
256
|
mindgraph-mcp uninstall-hooks Remove MindGraph-owned hook entries
|
|
257
|
+
mindgraph-mcp hooks preview Print what transcript capture would send (sends nothing)
|
|
258
|
+
mindgraph-mcp hooks stats Per-event hook calls, time and injected characters for a session
|
|
227
259
|
mindgraph-mcp skills pull Render published and granted skills into local SKILL.md directories
|
|
228
260
|
mindgraph-mcp skills push Import or update one local SKILL.md as a governed candidate
|
|
229
261
|
mindgraph-mcp status Show installation status
|
|
230
262
|
```
|
|
231
263
|
|
|
232
264
|
Options: `--api-key <key>`, `--base-url <url>`, `--agent-id <id>`,
|
|
233
|
-
`--scope user|project`, `--project-dir <dir>`, `--harness <name>`,
|
|
265
|
+
`--scope user|project`, `--project-dir <dir>`, `--harness <name>`,
|
|
266
|
+
`--no-prompt-recall` / `--prompt-recall`, `--capture` / `--no-capture`,
|
|
267
|
+
`--session-id <id>` (for `hooks preview` and `hooks stats`), `--help`.
|
|
234
268
|
|
|
235
269
|
**Teams**: when several people share one org graph, give each member a
|
|
236
270
|
distinct identity — `--agent-id claude-code:<name>` on `install-code` /
|
|
@@ -250,6 +284,8 @@ teammates one logical agent, which claims each other's work).
|
|
|
250
284
|
| `MINDGRAPH_ORG_ID` | *(unset)* | Pin operations to a specific organization when a key has access to more than one |
|
|
251
285
|
| `MINDGRAPH_CODEGRAPH_BIN` | *(auto)* | Explicit path to the codegraph binary (PATH and `~/.local/bin` are probed) |
|
|
252
286
|
| `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 |
|
|
287
|
+
| `MINDGRAPH_HOOK_PROMPT_RECALL` | *(on)* | `off` disables the Claude `UserPromptSubmit` recall at runtime |
|
|
288
|
+
| `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
289
|
| `MINDGRAPH_SKIP_MCP_REGISTRATION_CHECK` | *(unset)* | `1` silences the SessionStart warning for hooks running without a registered MindGraph MCP server (exotic registration layouts) |
|
|
254
290
|
|
|
255
291
|
## Usage in Claude
|