mindgraph-mcp 0.16.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 +57 -4
  2. package/dist/cli.js +879 -335
  3. package/dist/index.js +718 -119
  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.
@@ -133,9 +184,9 @@ profile):
133
184
  | `mindgraph_commit` | Goals, projects, decisions, options, milestones, and dated decision-context linkage |
134
185
  | `mindgraph_plan` | Plans, tasks, procedures, governance policies, risk assessments, executions |
135
186
  | `mindgraph_retrieve` | Context retrieval with bounded graph expansion, search, min-cost traversal, document index. Since 0.16.0, read results return as a rendered, token-bounded text block (labels, uids, summaries, epistemic status tags, relationships) — pass `format: "json"` on any call for the raw server response |
136
- | `mindgraph_ingest` | Chunk / document / session ingestion with LLM-powered extraction |
137
- | `mindgraph_synthesize` | Project-scoped cross-document synthesis — mine signals, spawn Article-generation jobs |
138
- | `mindgraph_ontology` | Operational Ontology (Layer 7) — typed domain objects, NL queries with provenance, extraction proposal review (approve/reject), object linking |
187
+ | `mindgraph_ingest` | Chunk / document / session ingestion with LLM-powered extraction. `job_status` without an id renders the 20 most recent jobs (`format: "json"` for the full list) |
188
+ | `mindgraph_synthesize` | Project-scoped cross-document synthesis — mine signals (rendered as sections since 0.17.0), spawn Article-generation jobs |
189
+ | `mindgraph_ontology` | Operational Ontology (Layer 7) — typed domain objects, NL queries with provenance, extraction proposal review (approve/reject), object linking. Read actions render as text since 0.17.0 (`format: "json"` for raw) |
139
190
  | `mindgraph_code` *(coding profile)* | Identity-stable code anchors + live structural federation: `anchor`/`recall`/`expand`/`affected` over a local codegraph index — what the graph knows about this code, joined to who calls it |
140
191
  | `mindgraph_sync` *(coding profile)* | Idempotent, resumable import of markdown memory files (`.claude/agent-memory/**` etc.) with content-hash drift tracking, conflict surfacing, and a retirement report |
141
192
 
@@ -145,7 +196,7 @@ composites: `resume_work` (deterministic bounded brief), `claim_task` /
145
196
  `block_task` / `complete_task` / `abandon_iteration` (idempotent material
146
197
  attempts with version conflict detection).
147
198
 
148
- Plus **dynamically generated read tools**: when the tenant's active schema declares object types, the server renders per-type `search_<objs>` / `get_<obj>` / `summarize_<obj>` tools (from the cloud's `GET /v1/ontology/tools` manifest) at session start. `summarize_<obj>` returns the object — whether mapped from a connected SQL database or extracted from documents — *plus* its cognitive context (claims, risks, decisions, evidence).
199
+ Plus **dynamically generated read tools**: when the tenant's active schema declares object types, the server renders per-type `search_<objs>` / `get_<obj>` / `summarize_<obj>` tools (from the cloud's `GET /v1/ontology/tools` manifest) at session start. `summarize_<obj>` returns the object — whether mapped from a connected SQL database or extracted from documents — *plus* its cognitive context (claims, risks, decisions, evidence). Since 0.17.0 these read tools render as text by default (pass `format: "json"` for the raw response); `related_*` tools follow the same contract, and `structured_query_*` composites always return raw rows.
149
200
 
150
201
  **7 prompt templates** for common workflows:
151
202
 
@@ -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