@productbrain/mcp 0.0.1-beta.6166 → 0.0.1-beta.6198

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.
@@ -449,7 +449,10 @@ var ownerOutputShape = z2.discriminatedUnion("kind", [
449
449
  // Review round 2: count is capped at OWNERSHIP_DISPLAY_CAP; truncated is true when a row past
450
450
  // that cap exists, so 3+ duplicates are never silently reported as exactly 2.
451
451
  z2.object({ kind: z2.literal("many"), count: z2.number(), truncated: z2.boolean() }),
452
- z2.object({ kind: z2.literal("dangling"), teamId: z2.string(), roleId: z2.string() })
452
+ z2.object({ kind: z2.literal("dangling"), teamId: z2.string(), roleId: z2.string() }),
453
+ // PRRT_kwDORS4ils6igqYN (round 2): the routed team's membership scan overflowed the cap — an
454
+ // active Team Lead may still exist; distinct from `unavailable` (asserts none does).
455
+ z2.object({ kind: z2.literal("overflow"), teamId: z2.string() })
453
456
  ]);
454
457
  function parseOwnerOutput(raw) {
455
458
  if (!raw) return void 0;
@@ -468,6 +471,8 @@ function formatOwnerLine(owner) {
468
471
  return `**Owner:** present but unresolvable: ${owner.count}${owner.truncated ? "+" : ""} ownership rows`;
469
472
  case "dangling":
470
473
  return `**Owner:** unresolved (team ${owner.teamId}, role ${owner.roleId})`;
474
+ case "overflow":
475
+ return `**Owner:** unresolved \u2014 routed team ${owner.teamId} has too many membership rows to safely scan; repair its membership structure`;
471
476
  }
472
477
  }
473
478
  function extractPreview(data, maxLen) {
@@ -12247,9 +12252,15 @@ function readSpineVerdict(value) {
12247
12252
  }
12248
12253
  return { kind: "graded", verdict: value };
12249
12254
  }
12250
- function describeSpineStaleness(changedMemberCount, membershipTruncated = false) {
12251
- const reason = changedMemberCount > 0 ? `${membershipTruncated ? "at least " : ""}${changedMemberCount} entr${changedMemberCount === 1 ? "y" : "ies"} changed or joined/left the spine since this was computed` : "freshness could not be verified; the changed-entry count is unknown";
12252
- return reason + (membershipTruncated ? "; membership scan incomplete" : "");
12255
+ function describeSpineStaleness(changedMemberCount, membershipTruncated = false, relationsChanged = false) {
12256
+ if (changedMemberCount > 0) {
12257
+ const reason = `${membershipTruncated ? "at least " : ""}${changedMemberCount} entr${changedMemberCount === 1 ? "y" : "ies"} changed or joined/left the spine since this was computed`;
12258
+ return reason + (membershipTruncated ? "; membership scan incomplete" : "");
12259
+ }
12260
+ if (relationsChanged) {
12261
+ return "the spine's relation topology (an informs/part_of edge) changed since this was computed" + (membershipTruncated ? "; membership scan incomplete" : "");
12262
+ }
12263
+ return "freshness could not be verified; the changed-entry count is unknown" + (membershipTruncated ? "; membership scan incomplete" : "");
12253
12264
  }
12254
12265
 
12255
12266
  // src/tools/spine-check.ts
@@ -12272,8 +12283,8 @@ async function handleSpineCheck(story, refresh = false) {
12272
12283
  };
12273
12284
  }
12274
12285
  const parsed = readSpineVerdict(row.verdict);
12275
- const freshnessData = { stale: row.stale, staleMemberIds: row.staleMemberIds, membershipTruncated: row.membershipTruncated ?? false };
12276
- const staleReason = describeSpineStaleness(row.staleMemberIds.length, row.membershipTruncated);
12286
+ const freshnessData = { stale: row.stale, staleMemberIds: row.staleMemberIds, membershipTruncated: row.membershipTruncated ?? false, relationsChanged: row.relationsChanged ?? false };
12287
+ const staleReason = describeSpineStaleness(row.staleMemberIds.length, row.membershipTruncated, row.relationsChanged);
12277
12288
  if (parsed.kind === "empty") {
12278
12289
  const pending = stillRunning || scheduleResult.reason === "already-in-flight";
12279
12290
  const freshness = (row.stale ? ` Stale: ${staleReason}.` : "") + (pending ? " A check is running; re-run quality action=spine-check in a few seconds to read its result." : row.stale ? " Run quality action=spine-check refresh=true to refresh it." : "");
@@ -12447,6 +12458,10 @@ var qualitySpineCheckOutputSchema = z25.object({
12447
12458
  // malformed verdict needs its own discriminator — both were silently stripped before this.
12448
12459
  staleMemberIds: z25.array(z25.string()).optional(),
12449
12460
  membershipTruncated: z25.boolean().optional(),
12461
+ // PRRT_kwDORS4ils6i_PVS: a KNOWN relations-fingerprint mismatch, distinct from "unknown" —
12462
+ // without this, a detected topology change and an unverifiable legacy fingerprint were
12463
+ // indistinguishable in structured output.
12464
+ relationsChanged: z25.boolean().optional(),
12450
12465
  malformed: z25.boolean().optional()
12451
12466
  });
12452
12467
  function registerQualityTools(server) {
@@ -17034,4 +17049,4 @@ export {
17034
17049
  createProductBrainServer,
17035
17050
  initFeatureFlags
17036
17051
  };
17037
- //# sourceMappingURL=chunk-N4LOB7ZT.js.map
17052
+ //# sourceMappingURL=chunk-ZN2NXC7F.js.map