ccdeck 3.82.0 → 3.82.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.
- package/dist/web/assets/{BrowserWatchModal-lX2W_tSy.js → BrowserWatchModal-5txXQWqr.js} +1 -1
- package/dist/web/assets/{IntegrationModal-oMFIAY4f.js → IntegrationModal-2caOGb1q.js} +1 -1
- package/dist/web/assets/{RadioPanel-DLiI3_Ok.js → RadioPanel-DuvwS-TT.js} +1 -1
- package/dist/web/assets/{TrafficRadar-D2JAXMid.js → TrafficRadar-BD_S2b0e.js} +1 -1
- package/dist/web/assets/{UsageHistoryModal-DTJc1c1C.js → UsageHistoryModal-CXDbKfIt.js} +1 -1
- package/dist/web/assets/{app-BIrh5Q0W.css → app-CbXmr9rC.css} +1 -1
- package/dist/web/assets/{app-BK08kq7X.js → app-CoVinTuS.js} +78 -78
- package/dist/web/assets/{index-B3icWRJZ.js → index-DpfbtL3r.js} +1 -1
- package/dist/web/index.html +3 -3
- package/package.json +1 -1
- package/release-notes.json +20 -0
- package/src/server/codex-live-engine.mjs +34 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./app-
|
|
1
|
+
import"./app-CoVinTuS.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();
|
package/dist/web/index.html
CHANGED
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
document.documentElement.setAttribute("data-density", density === "tightest" || density === "tighter" || density === "compact" || density === "comfortable" ? density : "default");
|
|
78
78
|
})();
|
|
79
79
|
</script>
|
|
80
|
-
<script type="module" crossorigin src="/assets/index-
|
|
81
|
-
<link rel="modulepreload" crossorigin href="/assets/app-
|
|
82
|
-
<link rel="stylesheet" crossorigin href="/assets/app-
|
|
80
|
+
<script type="module" crossorigin src="/assets/index-DpfbtL3r.js"></script>
|
|
81
|
+
<link rel="modulepreload" crossorigin href="/assets/app-CoVinTuS.js">
|
|
82
|
+
<link rel="stylesheet" crossorigin href="/assets/app-CbXmr9rC.css">
|
|
83
83
|
</head>
|
|
84
84
|
<body>
|
|
85
85
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccdeck",
|
|
3
|
-
"version": "3.82.
|
|
3
|
+
"version": "3.82.1",
|
|
4
4
|
"description": "Local dashboard for Claude Code and Codex CLI sessions: which Claude Code session needs input, every tool call and Claude Code subagent live, token cost and quota, several Claude accounts. Run npx ccdeck.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/release-notes.json
CHANGED
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"without one."
|
|
85
85
|
],
|
|
86
86
|
"//summaries": {
|
|
87
|
+
"3.82.1": "Clearer network shortcuts, accurate account capacity and Codex recovery fixes",
|
|
87
88
|
"3.82.0": "Steadier Codex switching, and uninstall cleans up Codex's terminal selection",
|
|
88
89
|
"3.81.4": "Codex account switching works with Windows sandbox logins",
|
|
89
90
|
"3.81.3": "More reliable Codex switching and quieter account rows",
|
|
@@ -141,6 +142,25 @@
|
|
|
141
142
|
"3.53.1",
|
|
142
143
|
"3.53.3"
|
|
143
144
|
],
|
|
145
|
+
"3.82.1": [
|
|
146
|
+
{
|
|
147
|
+
"title": "Local network controls, easier to find",
|
|
148
|
+
"body": "Open this deck’s network settings or the network graph directly from the Local network row.",
|
|
149
|
+
"priority": "highlight"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"title": "More accurate account capacity",
|
|
153
|
+
"body": "Accounts at their weekly limit no longer inflate the average remaining five-hour capacity.",
|
|
154
|
+
"priority": "highlight",
|
|
155
|
+
"icon": "accounts"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"title": "Codex account recovery fixes",
|
|
159
|
+
"body": "Codex account control can recover after temporary startup timeouts and checks account changes again when reconnecting.",
|
|
160
|
+
"priority": "highlight",
|
|
161
|
+
"icon": "accounts"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
144
164
|
"3.82.0": [
|
|
145
165
|
{
|
|
146
166
|
"title": "🔄 Codex switching recovers instead of staying stuck",
|
|
@@ -146,20 +146,30 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
try {
|
|
149
|
+
if (!await lease?.valid()) throw liveError('native_control_lost');
|
|
150
|
+
if (owner !== rpc || !owned || closed || ownershipPaused || epoch !== ownershipEpoch) return;
|
|
149
151
|
const next = await credentialFor(credential.profileId, { refresh: true });
|
|
150
152
|
if (closed || owner !== rpc || !owned || ownershipPaused || epoch !== ownershipEpoch) return;
|
|
151
153
|
if (next.accountId !== previous) throw liveError('profile_changed');
|
|
152
154
|
const actual = await owner.request('account/read', { refreshToken: false });
|
|
153
155
|
if (closed || owner !== rpc || ownershipPaused || epoch !== ownershipEpoch) return;
|
|
154
156
|
if (!sameAccount(actual, next)) { await externalChange(); return; }
|
|
157
|
+
// A profile can be removed after its credential read has finished.
|
|
158
|
+
// Do not keep renewing a login whose row/home is no longer available.
|
|
159
|
+
const latest = await selection();
|
|
160
|
+
if (!latest.profiles?.some(p => p.id === credential.profileId && p.available !== false)) throw liveError('profile_unavailable');
|
|
161
|
+
if (!await lease?.valid()) throw liveError('native_control_lost');
|
|
162
|
+
if (closed || owner !== rpc || !owned || ownershipPaused || epoch !== ownershipEpoch) return;
|
|
155
163
|
// ExternalAuthBridge::refresh returns the auth directly; it does not
|
|
156
164
|
// emit account/updated. Do not leave a notification-suppression window.
|
|
157
165
|
credential = next; lastRefresh = Date.now();
|
|
158
166
|
owner.send({ id: message.id, result: { accessToken: next.accessToken, chatgptAccountId: next.accountId, chatgptPlanType: next.planType } });
|
|
159
|
-
} catch {
|
|
167
|
+
} catch (error) {
|
|
168
|
+
if (closed || owner !== rpc || !owned || ownershipPaused || epoch !== ownershipEpoch) return;
|
|
160
169
|
// Never return paths, token values or provider error text on the wire.
|
|
161
170
|
try { owner.send({ id: message.id, error: { code: -32000, message: 'Selected Codex login could not be renewed.' } }); } catch { /* connection ended */ }
|
|
162
|
-
|
|
171
|
+
if (['native_control_lost', 'profile_unavailable'].includes(error?.code)) await externalChange(error.code);
|
|
172
|
+
else update({ state: 'failed', reason: 'credential_refresh_failed' });
|
|
163
173
|
}
|
|
164
174
|
});
|
|
165
175
|
}
|
|
@@ -261,6 +271,10 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
261
271
|
throw liveError('auto_switch_disabled');
|
|
262
272
|
}
|
|
263
273
|
};
|
|
274
|
+
const assertProfileAvailable = async () => {
|
|
275
|
+
const latest = await selection();
|
|
276
|
+
if (!latest.profiles?.some(p => p.id === intent.id && p.available !== false)) throw liveError('profile_unavailable');
|
|
277
|
+
};
|
|
264
278
|
const authCurrent = () => !closed && !ownershipPaused && epoch === ownershipEpoch;
|
|
265
279
|
const owner = () => authCurrent() && currentIntent()?.revision === intent.revision && currentIntent()?.id === intent.id;
|
|
266
280
|
const verifyOwnership = async () => {
|
|
@@ -286,6 +300,7 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
286
300
|
if (!s.profiles?.some(p => p.id === intent.id && p.available !== false)) throw liveError('profile_unavailable');
|
|
287
301
|
await ensureRpc(s.originalHome);
|
|
288
302
|
const next = await loginCredential(intent.id, refresh);
|
|
303
|
+
await assertProfileAvailable();
|
|
289
304
|
await assertAutoEnabled();
|
|
290
305
|
if (!owner()) throw liveError('account_changed_outside_deck');
|
|
291
306
|
if (!await lease.valid()) throw liveError('native_control_lost');
|
|
@@ -293,6 +308,7 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
293
308
|
resumeIdentity = before;
|
|
294
309
|
handoff = await prepareCodexLiveHandoff(rpc, { isCurrent: owner,
|
|
295
310
|
beforeInterrupt: async entry => {
|
|
311
|
+
await assertProfileAvailable();
|
|
296
312
|
await assertAutoEnabled();
|
|
297
313
|
if (!owner()) throw liveError('account_changed_outside_deck');
|
|
298
314
|
await record(entry, 'interrupt_sent');
|
|
@@ -324,6 +340,7 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
324
340
|
const current = await rpc.request('account/read', { refreshToken: false });
|
|
325
341
|
if (!owner() || !sameNativeAccount(current, before)) throw liveError('account_changed_outside_deck');
|
|
326
342
|
if (!await lease.valid()) throw liveError('native_control_lost');
|
|
343
|
+
await assertProfileAvailable();
|
|
327
344
|
await assertAutoEnabled();
|
|
328
345
|
if (!owner()) throw liveError('account_changed_outside_deck');
|
|
329
346
|
// Authentication crosses only this owner-validated local socket. Codex
|
|
@@ -422,10 +439,13 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
422
439
|
});
|
|
423
440
|
return pendingSwitch;
|
|
424
441
|
}
|
|
425
|
-
async function restorePrevious(saved, intent
|
|
426
|
-
restorePending = null;
|
|
442
|
+
async function restorePrevious(saved, intent) {
|
|
427
443
|
const epoch = ownershipEpoch;
|
|
428
444
|
const previous = await loginCredential(saved.profileId);
|
|
445
|
+
const actual = await rpc.request('account/read', { refreshToken: false });
|
|
446
|
+
if (!await lease?.valid()) throw liveError('native_control_lost');
|
|
447
|
+
if (closed) return;
|
|
448
|
+
restorePending = null;
|
|
429
449
|
if (ownershipPaused || epoch !== ownershipEpoch) { await externalChange(); return; }
|
|
430
450
|
if (endpointKey(endpoint) === saved.endpoint && sameAccount(actual, previous, true)) {
|
|
431
451
|
credential = previous; appliedIntent = { id: saved.profileId, revision: saved.revision }; owned = true;
|
|
@@ -454,7 +474,7 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
454
474
|
if (closed || restorePending !== saved) return;
|
|
455
475
|
desired = intent;
|
|
456
476
|
await ensureRpc(s.originalHome);
|
|
457
|
-
|
|
477
|
+
let actual = await rpc.request('account/read', { refreshToken: false });
|
|
458
478
|
if (!accountIds(actual).length) {
|
|
459
479
|
restorePending = null; await externalChange('native_identity_unattested'); return;
|
|
460
480
|
}
|
|
@@ -462,14 +482,19 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
462
482
|
try { next = await loginCredential(intent.id); }
|
|
463
483
|
catch (error) {
|
|
464
484
|
if (intent.revision <= saved.revision) throw error;
|
|
465
|
-
await restorePrevious(saved, intent
|
|
485
|
+
await restorePrevious(saved, intent); return;
|
|
466
486
|
}
|
|
487
|
+
// Credential preparation can outlive both the native account and our
|
|
488
|
+
// control lease. Reattest after it, rather than adopting the old read.
|
|
489
|
+
actual = await rpc.request('account/read', { refreshToken: false });
|
|
490
|
+
if (!await lease?.valid()) throw liveError('native_control_lost');
|
|
467
491
|
if (closed || restorePending !== saved) return;
|
|
468
492
|
if (ownershipPaused || epoch !== ownershipEpoch) { restorePending = null; await externalChange(); return; }
|
|
493
|
+
if (!accountIds(actual).length) { restorePending = null; await externalChange('native_identity_unattested'); return; }
|
|
469
494
|
if (intent.revision > saved.revision && !sameAccount(actual, next, true)) {
|
|
470
495
|
// The newer request has no persisted acknowledgement. It may have
|
|
471
496
|
// timed out after sending: reconcile it, never replay it on restart.
|
|
472
|
-
await restorePrevious(saved, intent
|
|
497
|
+
await restorePrevious(saved, intent); return;
|
|
473
498
|
}
|
|
474
499
|
if (intent.revision === saved.revision && endpointKey(endpoint) === saved.endpoint && !sameAccount(actual, next, true)) {
|
|
475
500
|
restorePending = null; await externalChange(); return;
|
|
@@ -488,7 +513,8 @@ export function createCodexLiveAccountController(input = {}) {
|
|
|
488
513
|
} catch (error) {
|
|
489
514
|
if (!owned) await disconnect();
|
|
490
515
|
const reason = publicReason(error);
|
|
491
|
-
const retry = ['native_not_running', 'cli_unavailable', 'native_unavailable', 'native_connection_failed', 'native_disconnected', 'native_control_busy'
|
|
516
|
+
const retry = ['native_not_running', 'cli_unavailable', 'native_unavailable', 'native_connection_failed', 'native_disconnected', 'native_control_busy',
|
|
517
|
+
'native_request_timeout', 'native_initial_account_unconfirmed'].includes(reason);
|
|
492
518
|
update({ state: retry ? 'unavailable' : 'failed', reason });
|
|
493
519
|
if (!retry) restorePending = null;
|
|
494
520
|
restoreRetryAt = Date.now() + (options.restoreRetryMs ?? 5000);
|