@productbrain/mcp 0.0.1-beta.15199 → 0.0.1-beta.15203
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-A5B64CDC.js → chunk-6V5ZOAJH.js} +18 -6
- package/dist/chunk-6V5ZOAJH.js.map +1 -0
- package/dist/{chunk-3CHNRVHI.js → chunk-HKNA2CGK.js} +2 -2
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{setup-5HH2D4XD.js → setup-SLBELVT7.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-A5B64CDC.js.map +0 -1
- /package/dist/{chunk-3CHNRVHI.js.map → chunk-HKNA2CGK.js.map} +0 -0
- /package/dist/{setup-5HH2D4XD.js.map → setup-SLBELVT7.js.map} +0 -0
|
@@ -668,6 +668,18 @@ var ROUTE_TYPE_BY_NAME = Object.assign(
|
|
|
668
668
|
/* @__PURE__ */ Object.create(null),
|
|
669
669
|
ROUTE_TYPE_ENTRIES
|
|
670
670
|
);
|
|
671
|
+
var ROUTES_SAVING_NOTHING_SENT = /* @__PURE__ */ new Set([
|
|
672
|
+
"chain.normalizeEntryDataPreview",
|
|
673
|
+
"chain.deepChainWalk",
|
|
674
|
+
"chain.compoundQuery",
|
|
675
|
+
"chain.getOrientView",
|
|
676
|
+
"chain.getGovernanceWithRelations",
|
|
677
|
+
"scoreboard.get"
|
|
678
|
+
]);
|
|
679
|
+
function routeMaySaveSent(routeName) {
|
|
680
|
+
const type = ROUTE_TYPE_BY_NAME[routeName];
|
|
681
|
+
return type === void 0 || type !== "query" && !ROUTES_SAVING_NOTHING_SENT.has(routeName);
|
|
682
|
+
}
|
|
671
683
|
function latencyBudgetMsForRouteType(type) {
|
|
672
684
|
return ROUTE_LATENCY_BUDGET_MS[type];
|
|
673
685
|
}
|
|
@@ -917,9 +929,9 @@ var GatewayTimeoutError = class extends Error {
|
|
|
917
929
|
elapsedMs;
|
|
918
930
|
/**
|
|
919
931
|
* True when the aborted call could have landed a write server-side despite this client
|
|
920
|
-
* giving up. Derived by `mayHaveLandedOnTimeout` from the route contract's
|
|
921
|
-
*
|
|
922
|
-
* `preview: true` dry run writes nothing) — never guessed from the name.
|
|
932
|
+
* giving up. Derived by `mayHaveLandedOnTimeout` from the route contract's save fact
|
|
933
|
+
* (`routeMaySaveSent`: a query, or an action marked savesNothingSent, saves nothing sent) AND
|
|
934
|
+
* the call's own arguments (a `preview: true` dry run writes nothing) — never guessed from the name.
|
|
923
935
|
*/
|
|
924
936
|
mayHaveLanded;
|
|
925
937
|
constructor(fn, budgetMs, elapsedMs, mayHaveLanded) {
|
|
@@ -941,7 +953,7 @@ function isDryRunCall(args) {
|
|
|
941
953
|
return args?.preview === true;
|
|
942
954
|
}
|
|
943
955
|
function mayHaveLandedOnTimeout(fn, args) {
|
|
944
|
-
return
|
|
956
|
+
return routeMaySaveSent(fn) && !isDryRunCall(args);
|
|
945
957
|
}
|
|
946
958
|
function throwClassifiedGatewayFailure(err, fn, args, budgetMs, elapsedMs, phase, record) {
|
|
947
959
|
if (err?.name === "TimeoutError" || err?.name === "AbortError") {
|
|
@@ -1243,7 +1255,7 @@ function classifyError(err) {
|
|
|
1243
1255
|
const { code: convexCode, fn, cleanMessage, missingRequiredFields, fieldErrors } = mcpErr;
|
|
1244
1256
|
if (convexCode === "BACKEND_UNAVAILABLE") {
|
|
1245
1257
|
const maySaved = err.mayHaveLanded === true;
|
|
1246
|
-
const next2 = !
|
|
1258
|
+
const next2 = !routeMaySaveSent(fn) ? UNAVAILABLE.tryLater : maySaved ? UNAVAILABLE.maySaved : UNAVAILABLE.nothingSaved;
|
|
1247
1259
|
return { code: "BACKEND_UNAVAILABLE", fn, message: UNAVAILABLE.line, recovery: next2 };
|
|
1248
1260
|
}
|
|
1249
1261
|
if (convexCode === "VALIDATION_FAILED") {
|
|
@@ -2001,4 +2013,4 @@ export {
|
|
|
2001
2013
|
appUrl,
|
|
2002
2014
|
apiKeysUrl
|
|
2003
2015
|
};
|
|
2004
|
-
//# sourceMappingURL=chunk-
|
|
2016
|
+
//# sourceMappingURL=chunk-6V5ZOAJH.js.map
|