@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.
- package/dist/{chunk-BZ4N37TH.js → chunk-5EIHZGHY.js} +13 -8
- package/dist/{chunk-BZ4N37TH.js.map → chunk-5EIHZGHY.js.map} +1 -1
- package/dist/{chunk-WRKN2TPW.js → chunk-QGMK65TO.js} +26 -11
- package/dist/{chunk-WRKN2TPW.js.map → chunk-QGMK65TO.js.map} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{setup-GX3C7WTT.js → setup-PPE5QDDZ.js} +2 -2
- package/package.json +1 -1
- /package/dist/{setup-GX3C7WTT.js.map → setup-PPE5QDDZ.js.map} +0 -0
|
@@ -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
|
|
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
|
|
937
|
+
const next2 = spineNextLine(mcpErr.details);
|
|
935
938
|
return {
|
|
936
939
|
code: "VALIDATION_ERROR",
|
|
937
940
|
fn,
|
|
938
|
-
message:
|
|
939
|
-
${
|
|
940
|
-
...
|
|
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
|
|
987
|
-
|
|
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-
|
|
1654
|
+
//# sourceMappingURL=chunk-5EIHZGHY.js.map
|