orchestrix-yuri 4.8.16 → 4.8.17
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.
|
@@ -261,10 +261,12 @@ function loadSessionState() {
|
|
|
261
261
|
if (!fs.existsSync(SESSION_FILE)) return null;
|
|
262
262
|
try {
|
|
263
263
|
const state = JSON.parse(fs.readFileSync(SESSION_FILE, 'utf8'));
|
|
264
|
-
// Reject: wrong version (system prompt changed), or expired (>
|
|
264
|
+
// Reject: wrong version (system prompt changed), or expired (>4h)
|
|
265
|
+
// Claude API sessions expire well before 24h. 4h is a safe max to avoid
|
|
266
|
+
// wasting a call on a stale --resume that will fail.
|
|
265
267
|
if (state.version !== SESSION_VERSION) return null;
|
|
266
268
|
const age = Date.now() - new Date(state.savedAt).getTime();
|
|
267
|
-
if (age >
|
|
269
|
+
if (age > 4 * 3600_000) return null;
|
|
268
270
|
return state;
|
|
269
271
|
} catch { return null; }
|
|
270
272
|
}
|