mindgraph-mcp 0.20.0 → 0.22.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 +45 -1
- package/dist/cli.js +4411 -3831
- package/dist/index.js +5845 -5475
- package/dist/server.d.mts +133 -0
- package/dist/server.d.ts +133 -0
- package/dist/server.js +6336 -0
- package/dist/server.mjs +6322 -0
- package/package.json +16 -4
package/README.md
CHANGED
|
@@ -174,7 +174,7 @@ and never block the coding session.
|
|
|
174
174
|
|
|
175
175
|
## What You Get
|
|
176
176
|
|
|
177
|
-
**
|
|
177
|
+
**11 tools** covering the full knowledge-graph workflow (**13** in the coding
|
|
178
178
|
profile):
|
|
179
179
|
|
|
180
180
|
| Tool | Purpose |
|
|
@@ -185,6 +185,7 @@ profile):
|
|
|
185
185
|
| `mindgraph_plan` | Plans, tasks, procedures, governance policies, risk assessments, executions |
|
|
186
186
|
| `mindgraph_retrieve` | Context retrieval with bounded graph expansion, search, min-cost traversal, document index. Read results return as compact rendered text (labels, uids, summaries, epistemic status tags, relationships, traversal depth/cost); set `max_output_chars` for a hard whole-item character budget, or pass `format: "json"` for the raw server response |
|
|
187
187
|
| `mindgraph_memory` | Read-only M0 memory workflow: inspect honest integration status, retrieve bounded topic context, or recover authoritative task-first resume/continuity context. Returns model-ready text plus a structured envelope with scope, hashes, trace, budget, freshness, and warnings |
|
|
188
|
+
| `mindgraph_remember` | Small-text fast path: `remember` stores one fact/preference/decision synchronously and it is BM25- and vector-searchable on return; a stable `custom_id` makes re-sends an upsert of the same memory. `forget` reversibly removes by uid or custom_id, with `dry_run` previewing the affected edge uids |
|
|
188
189
|
| `mindgraph_series_query` | Bounded, read-only dense-measurement queries: list an entity's Series, inspect latest values, page a time window, or calculate calendar aggregates |
|
|
189
190
|
| `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) |
|
|
190
191
|
| `mindgraph_synthesize` | Project-scoped cross-document synthesis — mine signals (rendered as sections since 0.17.0), spawn Article-generation jobs |
|
|
@@ -286,6 +287,35 @@ lifecycle observation, context delivery, and managed curation.
|
|
|
286
287
|
|
|
287
288
|
Search strategy is **keyword-first**: `mindgraph_retrieve` defaults to `action: "context"`, which seeds bounded cheapest-first graph expansion from BM25/hybrid recall. Escalate to `semantic` or `hybrid` only when keywords fail. Set `graph_expansion_limit: 0` when direct-only retrieval is required. For model-facing reads, `max_output_chars` bounds the rendered response from 512 to 24,000 characters while preserving whole evidence items and reporting omissions; `format: "json"` deliberately bypasses that rendering contract.
|
|
288
289
|
|
|
290
|
+
## Hosted mode
|
|
291
|
+
|
|
292
|
+
The same tool surface is importable as a library for a hosted Streamable HTTP
|
|
293
|
+
endpoint (the `https://mindgraph.cloud/mcp` connector that claude.ai, Claude
|
|
294
|
+
Code, ChatGPT and Cursor sign in to with OAuth). `mindgraph-mcp/server` exports
|
|
295
|
+
a per-request factory and has no load-time side effects — it never exits for a
|
|
296
|
+
missing key or touches hook files:
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
import { handleHostedRequest } from "mindgraph-mcp/server";
|
|
300
|
+
|
|
301
|
+
// After the route has verified the OAuth bearer and exchanged it for an API token:
|
|
302
|
+
return handleHostedRequest(request, {
|
|
303
|
+
client, bearer, baseUrl, orgId, orgName, agentId: `mcp:${clientHost}:${userId}`,
|
|
304
|
+
user: { id: userId, name, email },
|
|
305
|
+
profile: "general", harness: "hosted", serverVersion,
|
|
306
|
+
caches, // { generatedTools: Map, governance: Map } — one entry per org, kept by the route
|
|
307
|
+
});
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Hosted mode serves the `general` profile plus the org's generated ontology
|
|
311
|
+
tools and three extra tools — `search`, `fetch` (the ChatGPT connector
|
|
312
|
+
contract, `structuredContent` + text twin) and `whoami` — each annotated and
|
|
313
|
+
carrying `_meta.securitySchemes` with its `graph:read` / `graph:write` /
|
|
314
|
+
`graph:evolve` scope. The signed-in member's identity overwrites `agent_id`
|
|
315
|
+
on every call; a model-supplied value is kept only as `requested_agent_id`
|
|
316
|
+
metadata. `mindgraph_code`, `mindgraph_sync` and hook installation are stdio-only.
|
|
317
|
+
The HTTP auth gate (401/403) is the route's job, not the library's.
|
|
318
|
+
|
|
289
319
|
## Development
|
|
290
320
|
|
|
291
321
|
```bash
|
|
@@ -300,3 +330,17 @@ npm run dev # tsup --watch
|
|
|
300
330
|
## License
|
|
301
331
|
|
|
302
332
|
MIT
|
|
333
|
+
|
|
334
|
+
### Engine failures and retries
|
|
335
|
+
|
|
336
|
+
Tool failures carry `isError: true`; `code`, `status`, and optional `retriable`
|
|
337
|
+
are preserved in both the JSON text and structured content. Lease-conflict fields
|
|
338
|
+
remain available to hooks. A failed retrieval is not an empty successful result.
|
|
339
|
+
Explicit `retriable: false` stops automatic retries, including index maintenance.
|
|
340
|
+
Other 503 responses retry only reviewed reads or atomically keyed work operations.
|
|
341
|
+
|
|
342
|
+
This adoption branch pins the TypeScript SDK to immutable source commit
|
|
343
|
+
`02bad10728836bf55129c08efabf71386432deee` so installs and CI exercise the same
|
|
344
|
+
retry implementation. Git installation builds the SDK through its `prepare` hook.
|
|
345
|
+
Replace this source pin and regenerate the lockfile only after a registry release
|
|
346
|
+
containing that implementation is verified; older SDK releases retry all 503s.
|