@cortexkit/anthropic-auth-core 2.7.1 → 2.7.2
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/index.js +3 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17062,7 +17062,7 @@ class CacheKeepManager2 {
|
|
|
17062
17062
|
}
|
|
17063
17063
|
track(input) {
|
|
17064
17064
|
const now = this.options.now?.() ?? Date.now();
|
|
17065
|
-
const acceptedAt = input.acceptedAt ?? now;
|
|
17065
|
+
const acceptedAt = input.acceptedAt ?? input.retained?.lastTouchAt ?? now;
|
|
17066
17066
|
if (input.retained && input.retained.cacheExpiresAt <= now)
|
|
17067
17067
|
return { tracked: false, reason: "cache expired" };
|
|
17068
17068
|
let bodyBytes;
|
|
@@ -17102,7 +17102,7 @@ class CacheKeepManager2 {
|
|
|
17102
17102
|
this.removeTarget(previous, reason, now);
|
|
17103
17103
|
return refuse(reason, reason);
|
|
17104
17104
|
};
|
|
17105
|
-
if (input.retained && (planned || isCacheKeepAlways(input.storage)) &&
|
|
17105
|
+
if (input.retained && (planned || isCacheKeepAlways(input.storage)) && input.retained.policyState?.needsRealRequest)
|
|
17106
17106
|
return retire("unsupported");
|
|
17107
17107
|
if (!policy && (input.retained?.policyState?.planned || previous?.policyState?.planned))
|
|
17108
17108
|
return retire("session-ended");
|
|
@@ -17189,8 +17189,7 @@ class CacheKeepManager2 {
|
|
|
17189
17189
|
lastRealRequestAt: acceptedAt,
|
|
17190
17190
|
warmsSinceLastRealRequest: 0,
|
|
17191
17191
|
warmCostSoFar: 0,
|
|
17192
|
-
hasWarmed: previous?.policyState?.hasWarmed ?? false
|
|
17193
|
-
...input.retained && { needsRealRequest: true }
|
|
17192
|
+
hasWarmed: input.retained ? false : previous?.policyState?.hasWarmed ?? false
|
|
17194
17193
|
},
|
|
17195
17194
|
...input.sourceWarm === true && { sourceWarm: true }
|
|
17196
17195
|
});
|