mindgraph-mcp 0.18.0 → 0.19.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/dist/index.js CHANGED
@@ -2110,7 +2110,7 @@ function renderSignals(response) {
2110
2110
  var TOOLS = [
2111
2111
  {
2112
2112
  name: "mindgraph_capture",
2113
- description: "Capture knowledge into the graph. Use 'entity' for people/orgs/places/events/nations/concepts (auto-deduplicates \u2014 safe to call even if already exists), 'observation' for factual statements, 'source' for documents/URLs, 'snippet' for quotes from a source, and 'concept' for abstract ideas. Use 'journal' for quick personal notes and 'lesson' for a durable learning attributable to a session or source nodes. Prefer 'entity'/'observation' for objective facts, 'journal' for informal notes, and 'lesson' only for reusable knowledge.",
2113
+ description: "Capture knowledge into the graph. Use 'entity' for people/orgs/places/events/nations/concepts (auto-deduplicates \u2014 safe to call even if already exists), 'observation' for factual statements, 'source' for documents/URLs, 'snippet' for quotes from a source, and 'concept' for abstract ideas. Use 'journal' for quick personal notes, 'lesson' for a durable learning, and 'skill' for a reusable procedure authored from completed work. Skill capture always creates a candidate requiring admin review; it never publishes. Skill names must be 1-64 lowercase a-z, digits, or hyphens, with no leading/trailing/consecutive hyphens and no 'anthropic' or 'claude'. Provide at least one provenance field and write instructions, not a transcript dump.",
2114
2114
  inputSchema: {
2115
2115
  type: "object",
2116
2116
  properties: {
@@ -2123,7 +2123,8 @@ var TOOLS = [
2123
2123
  "snippet",
2124
2124
  "concept",
2125
2125
  "journal",
2126
- "lesson"
2126
+ "lesson",
2127
+ "skill"
2127
2128
  ],
2128
2129
  description: "Type of knowledge to capture"
2129
2130
  },
@@ -2137,11 +2138,30 @@ var TOOLS = [
2137
2138
  },
2138
2139
  content: {
2139
2140
  type: "string",
2140
- description: "Journal content/body text (for action=journal)"
2141
+ maxLength: 65536,
2142
+ description: "Journal body (action=journal) or complete SKILL.md instructions, at most 64 KiB UTF-8 (action=skill)"
2143
+ },
2144
+ name: {
2145
+ type: "string",
2146
+ minLength: 1,
2147
+ maxLength: 64,
2148
+ pattern: "^(?!.*(?:anthropic|claude))(?!-)(?!.*--)[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
2149
+ description: "Stable skill identifier using lowercase a-z, digits, and hyphens (for action=skill)"
2150
+ },
2151
+ description: {
2152
+ type: "string",
2153
+ minLength: 1,
2154
+ maxLength: 1024,
2155
+ description: "When the skill should be used; XML tags are rejected (for action=skill)"
2156
+ },
2157
+ license: {
2158
+ type: "string",
2159
+ description: "Optional skill license (for action=skill)"
2141
2160
  },
2142
2161
  session_uid: {
2143
2162
  type: "string",
2144
- description: "Session UID that produced a lesson (for action=lesson)"
2163
+ minLength: 1,
2164
+ description: "Session UID that produced a lesson or skill"
2145
2165
  },
2146
2166
  work_uid: {
2147
2167
  type: "string",
@@ -2162,7 +2182,8 @@ var TOOLS = [
2162
2182
  summarizes_uids: {
2163
2183
  type: "array",
2164
2184
  items: { type: "string" },
2165
- description: "Source node UIDs the lesson was learned from (for action=lesson)"
2185
+ minItems: 1,
2186
+ description: "Source node UIDs the lesson or skill was learned from"
2166
2187
  },
2167
2188
  entity_type: {
2168
2189
  type: "string",
@@ -2229,7 +2250,24 @@ var TOOLS = [
2229
2250
  description: "Agent identity"
2230
2251
  }
2231
2252
  },
2232
- required: ["action", "label"]
2253
+ required: ["action", "label"],
2254
+ allOf: [
2255
+ {
2256
+ if: {
2257
+ properties: { action: { const: "skill" } },
2258
+ required: ["action"]
2259
+ },
2260
+ then: {
2261
+ required: ["name", "description", "content"],
2262
+ anyOf: [
2263
+ { required: ["session_uid"] },
2264
+ { required: ["work_uid"] },
2265
+ { required: ["execution_uid"] },
2266
+ { required: ["summarizes_uids"] }
2267
+ ]
2268
+ }
2269
+ }
2270
+ ]
2233
2271
  }
2234
2272
  },
2235
2273
  {
@@ -2815,6 +2853,42 @@ var TOOLS = [
2815
2853
  required: ["action"]
2816
2854
  }
2817
2855
  },
2856
+ {
2857
+ name: "mindgraph_series_query",
2858
+ description: "Read dense numeric time series without placing raw points in general retrieval context. Use list_for_entity to discover series, latest for cached statistics, window for [from,to) keyset pages, and aggregate for bounded calendar buckets.",
2859
+ inputSchema: {
2860
+ type: "object",
2861
+ additionalProperties: false,
2862
+ properties: {
2863
+ action: {
2864
+ type: "string",
2865
+ enum: ["list_for_entity", "latest", "window", "aggregate"]
2866
+ },
2867
+ entity_uid: { type: "string" },
2868
+ series_uid: { type: "string" },
2869
+ from: { type: "number" },
2870
+ to: { type: "number" },
2871
+ cursor: { type: "number" },
2872
+ limit: { type: "number", minimum: 1, maximum: 1e4 },
2873
+ bucket: {
2874
+ type: "string",
2875
+ enum: ["year", "quarter", "month", "week", "day", "hour"]
2876
+ },
2877
+ agg: {
2878
+ type: "string",
2879
+ enum: ["sum", "mean", "min", "max", "count", "std_dev", "last"]
2880
+ },
2881
+ fill: { type: "string", enum: ["none", "null", "prev"] }
2882
+ },
2883
+ required: ["action"]
2884
+ },
2885
+ annotations: {
2886
+ readOnlyHint: true,
2887
+ destructiveHint: false,
2888
+ idempotentHint: true,
2889
+ openWorldHint: false
2890
+ }
2891
+ },
2818
2892
  {
2819
2893
  name: "mindgraph_ingest",
2820
2894
  description: "Ingest long-form content (articles, transcripts, documents, meeting notes) into the knowledge graph. The pipeline automatically chunks the text, extracts entities/claims/relationships via LLM, and deduplicates against existing nodes. Use 'chunk' for a single passage (synchronous), 'document' for full documents (async \u2014 returns a job ID), 'session' for conversation transcripts. Use 'job_status' to check progress. For short individual facts, use the specific cognitive tools instead.",
@@ -3147,6 +3221,9 @@ async function handleTool(client2, name, args) {
3147
3221
  case "mindgraph_retrieve":
3148
3222
  result = await handleRetrieve(client2, args);
3149
3223
  break;
3224
+ case "mindgraph_series_query":
3225
+ result = await handleSeriesQuery(client2, args);
3226
+ break;
3150
3227
  case "mindgraph_ingest":
3151
3228
  result = await handleIngest(client2, args);
3152
3229
  break;
@@ -3191,12 +3268,36 @@ async function handleTool(client2, name, args) {
3191
3268
  return err3(errorDetail(e));
3192
3269
  }
3193
3270
  }
3271
+ async function handleSeriesQuery(client2, args) {
3272
+ const action = typeof args.action === "string" ? args.action : "";
3273
+ if (!["list_for_entity", "latest", "window", "aggregate"].includes(action)) {
3274
+ return err3(`Unknown series query action: ${action}`);
3275
+ }
3276
+ if (action === "list_for_entity" && typeof args.entity_uid !== "string") {
3277
+ return err3("entity_uid is required for action='list_for_entity'");
3278
+ }
3279
+ if (action !== "list_for_entity" && typeof args.series_uid !== "string") {
3280
+ return err3(`series_uid is required for action='${action}'`);
3281
+ }
3282
+ if ((action === "window" || action === "aggregate") && (typeof args.from !== "number" || typeof args.to !== "number")) {
3283
+ return err3(`from and to are required for action='${action}'`);
3284
+ }
3285
+ if (action === "aggregate" && (typeof args.bucket !== "string" || typeof args.agg !== "string")) {
3286
+ return err3("bucket and agg are required for action='aggregate'");
3287
+ }
3288
+ return ok3(
3289
+ await client2.series(args)
3290
+ );
3291
+ }
3194
3292
  async function handleCapture(client2, args) {
3195
3293
  const {
3196
3294
  action,
3197
3295
  label,
3198
3296
  summary,
3199
3297
  content,
3298
+ name,
3299
+ description,
3300
+ license,
3200
3301
  session_uid,
3201
3302
  work_uid,
3202
3303
  execution_uid,
@@ -3231,6 +3332,41 @@ async function handleCapture(client2, args) {
3231
3332
  agent_id
3232
3333
  })
3233
3334
  );
3335
+ case "skill": {
3336
+ if (!name) return err3("name is required for action=skill");
3337
+ if (!description) return err3("description is required for action=skill");
3338
+ if (content === void 0) return err3("content is required for action=skill");
3339
+ const hasProvenance = [session_uid, work_uid, execution_uid].some(
3340
+ (uid) => typeof uid === "string" && uid.length > 0
3341
+ ) || Array.isArray(summarizes_uids) && summarizes_uids.some((uid) => typeof uid === "string" && uid.length > 0);
3342
+ if (!hasProvenance) {
3343
+ return err3(
3344
+ "at least one of session_uid, work_uid, execution_uid, or summarizes_uids is required for action=skill"
3345
+ );
3346
+ }
3347
+ return ok3(
3348
+ await client2.distill({
3349
+ label,
3350
+ output_type: "skill",
3351
+ summary,
3352
+ confidence,
3353
+ salience,
3354
+ session_uid,
3355
+ work_uid,
3356
+ execution_uid,
3357
+ idempotency_key,
3358
+ supersedes_uid,
3359
+ summarizes_uids,
3360
+ props: {
3361
+ name,
3362
+ description,
3363
+ content,
3364
+ ...license ? { license } : {}
3365
+ },
3366
+ agent_id
3367
+ })
3368
+ );
3369
+ }
3234
3370
  case "journal": {
3235
3371
  if (!content) return err3("content is required for action=journal");
3236
3372
  const journalProps = { content };
@@ -4434,6 +4570,7 @@ var ONTOLOGY_READ_ACTIONS = /* @__PURE__ */ new Set([
4434
4570
  ]);
4435
4571
  function toolMutability(toolName, action) {
4436
4572
  if (toolName === "mindgraph_retrieve") return "read";
4573
+ if (toolName === "mindgraph_series_query") return "read";
4437
4574
  if (toolName === "mindgraph_plan") {
4438
4575
  return action && PLAN_READ_ACTIONS.has(action) ? "read" : "write";
4439
4576
  }
@@ -4460,6 +4597,8 @@ function toolMutability(toolName, action) {
4460
4597
  var UID_FIELDS = [
4461
4598
  "uid",
4462
4599
  "source_uid",
4600
+ "entity_uid",
4601
+ "series_uid",
4463
4602
  "session_uid",
4464
4603
  "work_uid",
4465
4604
  "goal_uid",
@@ -5070,7 +5209,7 @@ if (PROFILE === "coding") {
5070
5209
  }
5071
5210
  var RUNNER_REFRESH = (() => {
5072
5211
  try {
5073
- return refreshHookRunner("0.18.0", import_node_path5.default.join(__dirname, "cli.js"));
5212
+ return refreshHookRunner("0.19.0", import_node_path5.default.join(__dirname, "cli.js"));
5074
5213
  } catch {
5075
5214
  return void 0;
5076
5215
  }
@@ -5084,12 +5223,12 @@ if (RUNNER_REFRESH?.refreshed) {
5084
5223
  }
5085
5224
  })();
5086
5225
  console.error(
5087
- `[mindgraph-mcp] refreshed pinned hook runner ${RUNNER_REFRESH.runnerVersion ? `v${RUNNER_REFRESH.runnerVersion}` : "(pre-sidecar)"} \u2192 v${"0.18.0"}` + (refreshedSettings.length > 0 ? `; refreshed owned hook entries in ${refreshedSettings.join(", ")}` : "")
5226
+ `[mindgraph-mcp] refreshed pinned hook runner ${RUNNER_REFRESH.runnerVersion ? `v${RUNNER_REFRESH.runnerVersion}` : "(pre-sidecar)"} \u2192 v${"0.19.0"}` + (refreshedSettings.length > 0 ? `; refreshed owned hook entries in ${refreshedSettings.join(", ")}` : "")
5088
5227
  );
5089
5228
  }
5090
5229
  var HOOK_SKEW_NOTE = (() => {
5091
5230
  try {
5092
- return versionSkewNote("0.18.0");
5231
+ return versionSkewNote("0.19.0");
5093
5232
  } catch {
5094
5233
  return void 0;
5095
5234
  }
@@ -5103,7 +5242,7 @@ ${HOOK_SKEW_NOTE}`;
5103
5242
  var server = new import_server.Server(
5104
5243
  {
5105
5244
  name: "mindgraph",
5106
- version: "0.18.0"
5245
+ version: "0.19.0"
5107
5246
  },
5108
5247
  {
5109
5248
  capabilities: {
@@ -5317,7 +5456,7 @@ async function main() {
5317
5456
  const transport = new import_stdio.StdioServerTransport();
5318
5457
  await server.connect(transport);
5319
5458
  console.error(
5320
- `MindGraph MCP server v${"0.18.0"} running on stdio (${BASE_URL})`
5459
+ `MindGraph MCP server v${"0.19.0"} running on stdio (${BASE_URL})`
5321
5460
  );
5322
5461
  }
5323
5462
  main().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindgraph-mcp",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "MCP server for MindGraph — connect Claude Desktop, Claude Code, and any MCP client to your knowledge graph",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
34
  "@modelcontextprotocol/sdk": "^1.12.1",
35
- "mindgraph": "^0.14.0"
35
+ "mindgraph": "^0.15.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.0.0",