@productbrain/mcp 0.0.1-beta.11531 → 0.0.1-beta.11545

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.
@@ -853,10 +853,13 @@ function authorityRecovery(refusal) {
853
853
  function spineNextLine(details) {
854
854
  const next = spineNextOf(details);
855
855
  if (!next) return null;
856
- if (next.action === "accept") return next.replaces ? null : `Next: \`entries action=accept entryId="${next.entryId}"\`.`;
856
+ if (next.action === "accept") return `Next: ${acceptCall(next.entryId, next.replaces)}.`;
857
857
  const to = next.to ?? spineKindPlaceholder(next.toKind);
858
858
  return `Next: \`relations action=create from="${next.from}" type="${next.type}" to="${to}"\`.`;
859
859
  }
860
+ function acceptCall(entryId, replaces) {
861
+ return `\`entries action=accept entryId="${entryId}"${replaces ? ` replaces="${replaces}"` : ""}\``;
862
+ }
860
863
  var GateError = class extends Error {
861
864
  constructor(message) {
862
865
  super(message);
@@ -931,13 +934,13 @@ function classifyError(err) {
931
934
  const { code: convexCode, fn, cleanMessage, missingRequiredFields, fieldErrors } = mcpErr;
932
935
  if (convexCode === "VALIDATION_FAILED") {
933
936
  const hasDiagnostics = missingRequiredFields?.length || fieldErrors?.length;
934
- const next = spineNextLine(mcpErr.details);
937
+ const next2 = spineNextLine(mcpErr.details);
935
938
  return {
936
939
  code: "VALIDATION_ERROR",
937
940
  fn,
938
- message: next ? `${cleanMessage}
939
- ${next}` : cleanMessage,
940
- ...next ? { recovery: next } : {},
941
+ message: next2 ? `${cleanMessage}
942
+ ${next2}` : cleanMessage,
943
+ ...next2 ? { recovery: next2 } : {},
941
944
  ...hasDiagnostics ? {
942
945
  diagnostics: {
943
946
  ...missingRequiredFields?.length ? { missingRequiredFields } : {},
@@ -983,8 +986,9 @@ ${next}` : cleanMessage,
983
986
  recovery: `Rate limit hit for this API key. ${wait}, then retry the same call unchanged \u2014 it is safe to retry.`
984
987
  };
985
988
  }
986
- const recovery = authorityRecovery(mcpErr.details?.[0]);
987
- return { code: convexCode, fn, message: recovery ? `${cleanMessage} ${recovery}` : cleanMessage, ...recovery ? { recovery } : {} };
989
+ const next = spineNextLine(mcpErr.details);
990
+ const recovery = next ?? authorityRecovery(mcpErr.details?.[0]);
991
+ return { code: convexCode, fn, message: recovery ? `${cleanMessage}${next ? "\n" : " "}${recovery}` : cleanMessage, ...recovery ? { recovery } : {} };
988
992
  }
989
993
  for (const { pattern, code, recovery, action } of GATE_PATTERNS) {
990
994
  if (pattern.test(message)) {
@@ -1607,6 +1611,7 @@ export {
1607
1611
  formatBriefingLines,
1608
1612
  SPINE_RUNG_SEQUENCE,
1609
1613
  authorityRecovery,
1614
+ acceptCall,
1610
1615
  PASS_SESSION_ID,
1611
1616
  WORKSPACE_CLOSED,
1612
1617
  orientationRefusal,
@@ -1646,4 +1651,4 @@ export {
1646
1651
  appUrl,
1647
1652
  apiKeysUrl
1648
1653
  };
1649
- //# sourceMappingURL=chunk-BZ4N37TH.js.map
1654
+ //# sourceMappingURL=chunk-5EIHZGHY.js.map