shadok-ai 0.15.22 → 0.15.23
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/README.md +1 -1
- package/package.json +1 -1
- package/public/auth-expiry.js +3 -3
- package/public/index.html +4 -4
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ Enter to skip; you can add it later from the web UI).
|
|
|
121
121
|
the token itself; the short-lived access token refreshes on its own, so the
|
|
122
122
|
figure shown is the session deadline, not that rotation. A **↻ Re-login to
|
|
123
123
|
Claude** button right there signs you in again without waiting for the lapse,
|
|
124
|
-
and in the last **
|
|
124
|
+
and in the last **48 hours** (or once it has lapsed) a reminder **banner**
|
|
125
125
|
carries the same one-click re-login — so your agents never quietly start
|
|
126
126
|
hitting `401` because nobody renewed the session.
|
|
127
127
|
- **Secret vault** — stored under `~/.shadok-ai`, never in your repo, injected
|
package/package.json
CHANGED
package/public/auth-expiry.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
// token (`accessExpiresAt`, ~6h) rotates on its own and is never what we warn
|
|
10
10
|
// about; see src/claude-creds.ts.
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
export const EXPIRY_WARN_MS =
|
|
12
|
+
/** 48h before the deadline: when the cockpit starts nagging to re-login. */
|
|
13
|
+
export const EXPIRY_WARN_MS = 48 * 60 * 60 * 1000;
|
|
14
14
|
|
|
15
15
|
/** A future instant as "in 22 days" / "in 6 h" / "in 40 min" / "expired". */
|
|
16
16
|
export function fmtExpiry(ts, now = Date.now()) {
|
|
@@ -31,7 +31,7 @@ export function fmtExpiry(ts, now = Date.now()) {
|
|
|
31
31
|
* not a reason to alarm) and never `signed-out` (the sign-in card owns that);
|
|
32
32
|
* - only when the re-login deadline is actually a number (an env-token
|
|
33
33
|
* instance carries none, so it is never nagged);
|
|
34
|
-
* - within
|
|
34
|
+
* - within 48h, INCLUDING already past it — a tab left open across the
|
|
35
35
|
* deadline must still nag, not fall silent.
|
|
36
36
|
*
|
|
37
37
|
* @param {{state?: string, loggedIn?: boolean, tokenExpiresAt?: number}|null} auth
|
package/public/index.html
CHANGED
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
font-family: var(--mono); font-size: 12px; text-align: center;
|
|
284
284
|
padding: 6px 12px;
|
|
285
285
|
}
|
|
286
|
-
/* The re-login reminder (sign-in within
|
|
286
|
+
/* The re-login reminder (sign-in within 48h / expired). Same top strip as the
|
|
287
287
|
update banner; its own id so the two never share styling by accident. */
|
|
288
288
|
#expiryBanner {
|
|
289
289
|
position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
|
|
@@ -6260,9 +6260,9 @@
|
|
|
6260
6260
|
updateExpiryBanner(); // the banner must track the clock even menu-closed
|
|
6261
6261
|
}
|
|
6262
6262
|
|
|
6263
|
-
// ── Re-login reminder banner (sign-in within
|
|
6263
|
+
// ── Re-login reminder banner (sign-in within 48h / expired) ───────────────
|
|
6264
6264
|
// A top strip that nags to re-login before the token lapses and the agents
|
|
6265
|
-
// start getting 401s. The decision (and its
|
|
6265
|
+
// start getting 401s. The decision (and its 48h threshold) is pure —
|
|
6266
6266
|
// window.expiryWarning, public/auth-expiry.js — so only the DOM lives here.
|
|
6267
6267
|
function updateExpiryBanner() {
|
|
6268
6268
|
const w = window.expiryWarning(lastAuth);
|
|
@@ -9342,7 +9342,7 @@
|
|
|
9342
9342
|
.catch(() => {});
|
|
9343
9343
|
});
|
|
9344
9344
|
setInterval(refreshUsage, 60_000);
|
|
9345
|
-
// The sign-in deadline is days out, so a coarse poll catches the
|
|
9345
|
+
// The sign-in deadline is days out, so a coarse poll catches the 48h crossing
|
|
9346
9346
|
// in good time without hammering /auth (which also re-checks the account).
|
|
9347
9347
|
setInterval(refreshAuthRows, 10 * 60_000);
|
|
9348
9348
|
|