mindgraph-mcp 0.17.0 → 0.18.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.
Files changed (4) hide show
  1. package/README.md +53 -0
  2. package/dist/cli.js +573 -257
  3. package/dist/index.js +418 -46
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -88,6 +88,57 @@ 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
+ **Updates are hands-free.** The MCP registration floats on `npx @latest`,
92
+ and at startup the server self-heals the pinned hook runner from its own
93
+ bundle — upgrade-only (never a downgrade from a stale npx cache), atomic,
94
+ and only on machines that already have hooks installed. When it refreshes
95
+ the runner it also re-writes MindGraph-owned hook entries (timeout budgets,
96
+ new events) in settings files that already carry them — your scope choice is
97
+ respected, never expanded. So after a release, the next session start picks
98
+ up the new server and refreshes the hooks; the session after that runs them.
99
+ Opt out with `MINDGRAPH_HOOK_AUTOUPDATE=off` (the server then just prints a
100
+ version-skew note and leaves updating to `install-hooks`).
101
+
102
+ ### Multi-repository workspaces
103
+
104
+ Working across sibling repositories (a parent directory holding several
105
+ checkouts)? Declare them once in `.mindgraph/workspace.json` at the parent:
106
+
107
+ ```json
108
+ {
109
+ "v": 1,
110
+ "workspace_id": "my-workspace",
111
+ "repositories": [
112
+ { "root": "engine", "repo_id": "github.com/acme/engine", "space_uid": "space:project:engine" },
113
+ { "root": "core", "space_uid": "space:project:core" }
114
+ ]
115
+ }
116
+ ```
117
+
118
+ - **Discovery** walks up from the invocation directory to the nearest
119
+ `.mindgraph/workspace.json` (override with `MINDGRAPH_WORKSPACE_FILE`).
120
+ `root` paths are relative to the directory containing `.mindgraph`. Only
121
+ declared repositories participate — siblings are never scanned implicitly.
122
+ - **Routing**: a code ref with a `path` routes to the repository defining that
123
+ file (nearest declared root, else its git root). A `repo` argument matches by
124
+ declared `repo_id`, root path, or directory basename. Bare symbol refs
125
+ resolve against the current repository only — pass `path` or `repo` to
126
+ target a sibling. An id that matches nothing errors (`unknown_repository`)
127
+ rather than guessing.
128
+ - **Identity**: `repo_id` defaults to the normalized origin remote
129
+ (`github.com/acme/engine`), so teammates' clones converge on the same graph
130
+ entities; clones without a remote get a durable generated id.
131
+ - **Spaces**: each repository's anchors are written into its `space_uid`.
132
+ Anchoring requires an explicit space — per-repo `space_uid`, a
133
+ `repo_space_uid` argument, or `MINDGRAPH_CODE_SPACE_UID` — so shared code
134
+ identity never lands silently in a private per-agent space.
135
+ - **Memory-file sync**: `mindgraph_sync action=scan workspace=true` fans out
136
+ across the declared repositories (and errors with a diagnostic when nothing
137
+ is declared); all other sync actions stay single-repository.
138
+ - **Precedence**: the legacy `MINDGRAPH_CODE_REPOS` env map (`{"repo-id":
139
+ {"root": "...", "space_uid": "..."}}`) merges over workspace-file entries
140
+ for the same root.
141
+
91
142
  ### Coding agents (Codex)
92
143
 
93
144
  Codex gets the same durable work substrate through its native command hooks.
@@ -192,6 +243,8 @@ teammates one logical agent, which claims each other's work).
192
243
  | `MINDGRAPH_AGENT_ID` | *(stable per-user id)* | Agent identity stamped on every write and used for durable-work leases. Defaults to a stable `u-<hash>` derived from user@host, shared by the hooks, the registration, and the serve path — set explicitly for cross-device continuity or per-teammate identities |
193
244
  | `MINDGRAPH_ORG_ID` | *(unset)* | Pin operations to a specific organization when a key has access to more than one |
194
245
  | `MINDGRAPH_CODEGRAPH_BIN` | *(auto)* | Explicit path to the codegraph binary (PATH and `~/.local/bin` are probed) |
246
+ | `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 |
247
+ | `MINDGRAPH_SKIP_MCP_REGISTRATION_CHECK` | *(unset)* | `1` silences the SessionStart warning for hooks running without a registered MindGraph MCP server (exotic registration layouts) |
195
248
 
196
249
  ## Usage in Claude
197
250