fix(opencode): expire stale host leases on startup

This commit is contained in:
777genius 2026-04-24 23:04:09 +03:00
parent 84412066e8
commit 5c5b5c7afc
2 changed files with 2 additions and 0 deletions

View file

@ -289,6 +289,7 @@ async function cleanupOpenCodeHostsForLifecycle(reason: 'startup' | 'shutdown'):
reason,
mode: reason === 'shutdown' ? 'force' : 'stale',
staleAgeMs: reason === 'startup' ? 5 * 60_000 : null,
leaseStaleAgeMs: reason === 'startup' ? 24 * 60 * 60_000 : null,
});
if (result.cleaned > 0) {
logger.info(

View file

@ -122,6 +122,7 @@ export interface OpenCodeCleanupHostsCommandBody {
mode?: 'stale' | 'force';
projectPath?: string;
staleAgeMs?: number | null;
leaseStaleAgeMs?: number | null;
}
export interface OpenCodeCleanupHostsCommandData {