@productbrain/mcp 0.0.1-beta.12588 → 0.0.1-beta.12599

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.
@@ -240,6 +240,10 @@ var LINK_REFUSAL_WORDS = {
240
240
  },
241
241
  heldBundle: (count) => `Nothing was accepted: ${count} ${count === 1 ? "entry links to nothing it serves" : "entries link to nothing they serve"}.`
242
242
  };
243
+ function refusalFixOf(details) {
244
+ const row = details?.find((d) => typeof d === "object" && d !== null && "refusalFix" in d);
245
+ return row?.refusalFix === "verify" || row?.refusalFix === "person" ? row.refusalFix : null;
246
+ }
243
247
  var CHECKLIST_LINES = {
244
248
  purpose: {
245
249
  stranger_test: "Explain it so a stranger knows why this company exists",
@@ -1851,6 +1855,13 @@ async function handleCommitEntry({ entryId, preview, steeringOverrideReason, qua
1851
1855
  ...conflictEvidence.length > 0 ? { conflicts: conflictEvidence } : {},
1852
1856
  ...replaces ? { replaces, ...reason !== void 0 ? { replacesReason: reason } : {} } : {}
1853
1857
  // TASK-1030; DEC-2006: the reason rides with it
1858
+ }).catch((err) => {
1859
+ const { code, details } = err;
1860
+ const fix = code === "GROUNDING_GATE_BLOCKED" ? refusalFixOf(details) : null;
1861
+ if (!fix) throw err;
1862
+ const reason2 = err.message.replace(/^MCP call "[^"]+" failed \(\d+\): /s, "");
1863
+ const acceptRefusal = details?.find((d) => typeof d === "object" && d !== null && "acceptRefusal" in d);
1864
+ return { status: "coherency_refused", refusal: { reason: reason2, fix, acceptRefusal: acceptRefusal?.acceptRefusal } };
1854
1865
  });
1855
1866
  if (result2?.status === "coherency_refused" && result2?.refusal) {
1856
1867
  return coherencyRefusedResult(`${toolName} action=accept`, entryId, result2.refusal);
@@ -11962,4 +11973,4 @@ export {
11962
11973
  SERVER_VERSION,
11963
11974
  createProductBrainServer
11964
11975
  };
11965
- //# sourceMappingURL=chunk-PS3JQBYH.js.map
11976
+ //# sourceMappingURL=chunk-6OCELL4L.js.map