@tangle-network/agent-app 4.0.13 → 4.0.15
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/billing/identity-bound.d.ts +14 -9
- package/dist/billing/index.js +1 -1
- package/dist/chat-routes/detached-turn.d.ts +1 -1
- package/dist/chat-routes/failure-wording.d.ts +3 -4
- package/dist/chat-routes/index.js +5 -5
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/{chunk-XCUT2I52.js → chunk-5QQBQS7W.js} +8 -2
- package/dist/{chunk-XCUT2I52.js.map → chunk-5QQBQS7W.js.map} +1 -1
- package/dist/{chunk-GWATTXFR.js → chunk-FYF564KJ.js} +2 -2
- package/dist/{chunk-QPD42X6A.js → chunk-G4NHCLYA.js} +17 -9
- package/dist/chunk-G4NHCLYA.js.map +1 -0
- package/dist/{chunk-TMWUWKLU.js → chunk-GE242CLI.js} +2 -2
- package/dist/{chunk-RNDWCT4O.js → chunk-MZZMOGFN.js} +101 -89
- package/dist/{chunk-RNDWCT4O.js.map → chunk-MZZMOGFN.js.map} +1 -1
- package/dist/{chunk-CD4SJXYC.js → chunk-RFXROORA.js} +12 -12
- package/dist/chunk-RFXROORA.js.map +1 -0
- package/dist/platform/delegated-keys.d.ts +5 -1
- package/dist/platform/index.js +8 -2
- package/dist/platform/index.js.map +1 -1
- package/dist/preset-cloudflare/index.js +3 -3
- package/dist/public-consultation/index.js +3 -3
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/router-turn.js +1 -1
- package/dist/spend/delegate-budget.d.ts +4 -0
- package/dist/spend/index.js.map +1 -1
- package/dist/turn-health/index.js +3 -1
- package/dist/turn-health/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-CD4SJXYC.js.map +0 -1
- package/dist/chunk-QPD42X6A.js.map +0 -1
- /package/dist/{chunk-GWATTXFR.js.map → chunk-FYF564KJ.js.map} +0 -0
- /package/dist/{chunk-TMWUWKLU.js.map → chunk-GE242CLI.js.map} +0 -0
|
@@ -907,7 +907,13 @@ async function runRouterTurn(options) {
|
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
const detail = error instanceof Error ? error.message.match(/\(HTTP \d+\): ([\s\S]*)$/)?.[1]?.slice(0, 1e3) : void 0;
|
|
910
|
-
|
|
910
|
+
const spent = status === 402 && /budget_(exhausted|exceeded)/i.test(detail ?? "");
|
|
911
|
+
return outcome(typeof status === "number" ? {
|
|
912
|
+
code: `model_http_${status}`,
|
|
913
|
+
status,
|
|
914
|
+
...detail ? { detail } : {},
|
|
915
|
+
message: spent ? "The paying key has spent its budget. Top it up or raise its cap, then retry." : "The model service did not answer."
|
|
916
|
+
} : { code: "model_unavailable", message: "The model service did not answer." });
|
|
911
917
|
}
|
|
912
918
|
if (placementFailure) return outcome(placementFailure);
|
|
913
919
|
if (stop === "deadline" && checkpoint) {
|
|
@@ -998,4 +1004,4 @@ export {
|
|
|
998
1004
|
composeRouterTurnPrompt,
|
|
999
1005
|
runRouterTurn
|
|
1000
1006
|
};
|
|
1001
|
-
//# sourceMappingURL=chunk-
|
|
1007
|
+
//# sourceMappingURL=chunk-5QQBQS7W.js.map
|