@unified-product-graph/mcp-server 0.8.10 → 0.8.12

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to `@unified-product-graph/mcp-server` are documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4
4
 
5
+ ## [0.8.12] - 2026-06-04
6
+
7
+ Co-versioned with the train. No changes to this package; bundles the `@unified-product-graph/core` serialiser root-product reconcile fix (#1981).
8
+
9
+ ## [0.8.11] - 2026-06-03
10
+
11
+ ### Fixed
12
+ - Startup deprecation check no longer flags canonical types. It used `getDeprecatedTypes()` (the historical migration union, which still contains `hypothesis` from the v0.2.8 split) and walked `UPG_MIGRATIONS` for the replacement, so a graph with canonical `hypothesis` nodes printed a bogus warning pointing a canonical type at a deprecated one. Detection and the suggested replacement now come from entity-meta (`isDeprecatedType` / `getReplacementType`). Genuinely deprecated types (`hypothesis_claim`, `pain_point`, `jtbd`) still warn, in the correct direction. (#1976)
13
+
5
14
  ## [0.8.10] - 2026-06-03
6
15
 
7
16
  Co-versioned 0.8.10 release, in lockstep with the package train. No changes to `@unified-product-graph/mcp-server` itself; it inherits the core framework-score validation fix (Kano sum-denominator false positive) via its `@unified-product-graph/core` dependency.
package/dist/index.js CHANGED
@@ -944,6 +944,10 @@ var UPG_ENTITY_META_BY_ID = new Map(
944
944
  );
945
945
  var UPG_ACTIVE_TYPES = UPG_ENTITY_META.filter((m) => m.maturity === "stable" || m.maturity === "proposed").map((m) => m.name);
946
946
  var UPG_DEPRECATED_TYPES = UPG_ENTITY_META.filter((m) => m.maturity === "deprecated").map((m) => m.name);
947
+ function isDeprecatedType(name) {
948
+ const meta = UPG_ENTITY_META_BY_NAME.get(name);
949
+ return meta?.maturity === "deprecated";
950
+ }
947
951
  function getReplacementType(name) {
948
952
  const meta = UPG_ENTITY_META_BY_NAME.get(name);
949
953
  return meta?.replacement;
@@ -6409,15 +6413,6 @@ function compareVersions(a, b) {
6409
6413
  function versionInRange(version, fromVersion, toVersion) {
6410
6414
  return compareVersions(version, fromVersion) > 0 && compareVersions(version, toVersion) <= 0;
6411
6415
  }
6412
- function getDeprecatedTypes() {
6413
- const deprecated = /* @__PURE__ */ new Set();
6414
- for (const migrations of Object.values(UPG_MIGRATIONS)) {
6415
- for (const m of migrations) {
6416
- deprecated.add(m.from);
6417
- }
6418
- }
6419
- return deprecated;
6420
- }
6421
6416
  var UPG_PROPERTY_MIGRATIONS = {
6422
6417
  // ── v0.8.0: UPG-574 deprecated-property removal pass ───────────────────
6423
6418
  //
@@ -24272,9 +24267,20 @@ function canonicalCrossEdge(edge) {
24272
24267
  function canonicalProduct(product) {
24273
24268
  return orderedObject(product, PRODUCT_KEY_ORDER, { forceKeys: ["id", "title"], openKeys: ["properties"] });
24274
24269
  }
24270
+ function effectiveRootProduct(doc) {
24271
+ const node = doc.nodes?.find((n) => n.type === "product" && n.id === doc.product.id);
24272
+ if (!node) return doc.product;
24273
+ return {
24274
+ ...doc.product,
24275
+ title: node.title ?? doc.product.title,
24276
+ description: node.description ?? doc.product.description,
24277
+ // A product's lifecycle status IS its stage, the same axis (grammar/lifecycles).
24278
+ stage: node.status ?? doc.product.stage
24279
+ };
24280
+ }
24275
24281
  function singleBody(doc) {
24276
24282
  return {
24277
- product: canonicalProduct(doc.product),
24283
+ product: canonicalProduct(effectiveRootProduct(doc)),
24278
24284
  nodes: sortNodes(doc.nodes ?? []).map(canonicalNode),
24279
24285
  edges: sortEdges(doc.edges ?? []).map(canonicalEdge)
24280
24286
  };
@@ -24323,7 +24329,7 @@ function buildProvenance(doc, opts) {
24323
24329
  }
24324
24330
  function serializeSingleWithHeader(doc, opts) {
24325
24331
  const body = singleBody(doc);
24326
- const product = doc.product;
24332
+ const product = effectiveRootProduct(doc);
24327
24333
  const header = {
24328
24334
  format_version: UPG_CANONICAL_FORMAT_VERSION,
24329
24335
  spec_version: doc.upg_version,
@@ -24365,7 +24371,7 @@ function serializePortfolioWithHeader(doc, opts) {
24365
24371
  header.integrity = { algorithm: INTEGRITY_ALGORITHM, body: computeBodyChecksum(doc) };
24366
24372
  return JSON.stringify({ $upg: header, ...body }, null, 2) + "\n";
24367
24373
  }
24368
- var UPG_VERSION = "0.8.10";
24374
+ var UPG_VERSION = "0.8.12";
24369
24375
  var MARKDOWN_FORMAT_VERSION = "0.1";
24370
24376
  var UPG_TYPES = getTypes();
24371
24377
  var UPG_TYPES_SET = new Set(UPG_TYPES);
@@ -30304,21 +30310,17 @@ async function runMcpServer() {
30304
30310
  const store = new UPGFileStore();
30305
30311
  store.setWriter("upg-mcp-local", SERVER_VERSION);
30306
30312
  await store.load(resolvedPath);
30307
- const deprecated = getDeprecatedTypes();
30308
30313
  const nodes = store.getAllNodes();
30309
30314
  const deprecatedCounts = {};
30310
30315
  for (const node of nodes) {
30311
- if (deprecated.has(node.type)) {
30316
+ if (isDeprecatedType(node.type)) {
30312
30317
  deprecatedCounts[node.type] = (deprecatedCounts[node.type] ?? 0) + 1;
30313
30318
  }
30314
30319
  }
30315
30320
  if (Object.keys(deprecatedCounts).length > 0) {
30316
30321
  const lines = Object.entries(deprecatedCounts).map(([type, count]) => {
30317
- for (const migrations of Object.values(UPG_MIGRATIONS)) {
30318
- const m = migrations.find((m2) => m2.from === type);
30319
- if (m) return ` \u26A0\uFE0F ${count} "${type}" entities \u2192 should be "${m.to}"`;
30320
- }
30321
- return ` \u26A0\uFE0F ${count} "${type}" entities (deprecated)`;
30322
+ const replacement = getReplacementType(type);
30323
+ return replacement ? ` \u26A0\uFE0F ${count} "${type}" entities \u2192 should be "${replacement}"` : ` \u26A0\uFE0F ${count} "${type}" entities (deprecated)`;
30322
30324
  });
30323
30325
  process.stderr.write(`
30324
30326
  Deprecated types found in your graph: