@rallycry/conveyor-agent 4.8.0 → 4.9.1
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.
|
@@ -670,15 +670,15 @@ async function processAssistantEvent(event, host, turnToolCalls) {
|
|
|
670
670
|
}
|
|
671
671
|
var API_ERROR_PATTERN = /API Error: [45]\d\d/;
|
|
672
672
|
var IMAGE_ERROR_PATTERN = /Could not process image/i;
|
|
673
|
-
function isRetriableMessage(msg
|
|
673
|
+
function isRetriableMessage(msg) {
|
|
674
674
|
if (IMAGE_ERROR_PATTERN.test(msg)) return true;
|
|
675
|
-
if (API_ERROR_PATTERN.test(msg)
|
|
675
|
+
if (API_ERROR_PATTERN.test(msg)) return true;
|
|
676
676
|
return false;
|
|
677
677
|
}
|
|
678
678
|
function handleSuccessResult(event, host, context, startTime) {
|
|
679
679
|
const durationMs = Date.now() - startTime;
|
|
680
680
|
const summary = event.result || "Task completed.";
|
|
681
|
-
const retriable = isRetriableMessage(summary
|
|
681
|
+
const retriable = isRetriableMessage(summary);
|
|
682
682
|
const cumulativeTotal = host.costTracker.addQueryCost(event.total_cost_usd);
|
|
683
683
|
const { modelUsage } = event;
|
|
684
684
|
if (modelUsage && typeof modelUsage === "object") {
|
|
@@ -768,6 +768,14 @@ async function emitResultEvent(event, host, context, startTime) {
|
|
|
768
768
|
function handleRateLimitEvent(event, host) {
|
|
769
769
|
const { rate_limit_info } = event;
|
|
770
770
|
const status = rate_limit_info.status;
|
|
771
|
+
if (rate_limit_info.utilization != null && rate_limit_info.rateLimitType) {
|
|
772
|
+
host.connection.sendEvent({
|
|
773
|
+
type: "rate_limit_update",
|
|
774
|
+
rateLimitType: rate_limit_info.rateLimitType,
|
|
775
|
+
utilization: rate_limit_info.utilization,
|
|
776
|
+
status
|
|
777
|
+
});
|
|
778
|
+
}
|
|
771
779
|
if (status === "rejected") {
|
|
772
780
|
const resetsAt = rate_limit_info.resetsAt ? new Date(rate_limit_info.resetsAt).toISOString() : void 0;
|
|
773
781
|
const resetsAtDisplay = resetsAt ?? "unknown";
|
|
@@ -3880,4 +3888,4 @@ export {
|
|
|
3880
3888
|
ProjectRunner,
|
|
3881
3889
|
FileCache
|
|
3882
3890
|
};
|
|
3883
|
-
//# sourceMappingURL=chunk-
|
|
3891
|
+
//# sourceMappingURL=chunk-ACPWJ2SL.js.map
|