@askalf/dario 4.8.118 → 4.8.119
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/proxy.js +17 -1
- package/package.json +1 -1
package/dist/proxy.js
CHANGED
|
@@ -3173,7 +3173,17 @@ export async function startProxy(opts = {}) {
|
|
|
3173
3173
|
return;
|
|
3174
3174
|
lastPresencePulse = now;
|
|
3175
3175
|
try {
|
|
3176
|
-
|
|
3176
|
+
// In pool mode the pool refresh loop (above) is the SOLE refresher of
|
|
3177
|
+
// every account's token lineage. credentials.json shares its refresh-
|
|
3178
|
+
// token family with accounts/login.json after a login->pool migration
|
|
3179
|
+
// (ensureLoginCredentialsInPool), so refreshing credentials.json here
|
|
3180
|
+
// via getAccessToken() races the pool refreshing login.json and trips
|
|
3181
|
+
// Anthropic's refresh-token reuse-detection (the 2026-06-23 fleet
|
|
3182
|
+
// outage, dario#641-audit). Pulse with a token the pool already keeps
|
|
3183
|
+
// fresh; never refresh from this side in pool mode.
|
|
3184
|
+
const token = pool ? (pool.all()[0]?.accessToken ?? '') : await getAccessToken();
|
|
3185
|
+
if (!token)
|
|
3186
|
+
return;
|
|
3177
3187
|
const presenceUrl = `${ANTHROPIC_API}/v1/code/sessions/${SESSION_ID}/client/presence`;
|
|
3178
3188
|
await fetch(presenceUrl, {
|
|
3179
3189
|
method: 'POST',
|
|
@@ -3191,6 +3201,12 @@ export async function startProxy(opts = {}) {
|
|
|
3191
3201
|
}, 5000);
|
|
3192
3202
|
// Periodic token refresh (every 15 minutes)
|
|
3193
3203
|
const refreshInterval = setInterval(async () => {
|
|
3204
|
+
// Pool mode: the pool's own 15-min refresh loop (above) owns token refresh
|
|
3205
|
+
// for every account. Refreshing credentials.json here too would double-
|
|
3206
|
+
// refresh a shared token lineage (see the presence-loop note) -> reuse-
|
|
3207
|
+
// detection. Skip; the pool is the sole refresher.
|
|
3208
|
+
if (pool)
|
|
3209
|
+
return;
|
|
3194
3210
|
try {
|
|
3195
3211
|
const s = await getStatus();
|
|
3196
3212
|
if (s.status === 'expiring' || s.status === 'expired') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.119",
|
|
4
4
|
"description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|