nexus/packages/db/src
Devin Foley 1b70091dcd Implement idle timeout reaper and liveness visibility for hung runs
Add lastOutputAt tracking on heartbeat runs, updated from adapter stdout/stderr
with batched DB writes (30s debounce). The orphan reaper now checks running
processes for idle timeout: warns at 10 min, kills (SIGTERM/SIGKILL) at 15 min.

- DB: add last_output_at column to heartbeat_runs (migration 0046)
- Server: idle warning/kill logic in reapOrphanedRuns, lastOutputAt flush in onLog
- Server: clear idle_warning on activity report (clearDetachedRunWarning)
- API: expose errorCode and lastOutputAt on active/recent run endpoints
- UI: orange idle warning badge on ActiveAgentsPanel and LiveRunWidget
- UI: show last output relative time in LiveRunWidget
- UI: add idle_timeout status color

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-26 23:05:47 -07:00
..
migrations Implement idle timeout reaper and liveness visibility for hung runs 2026-03-26 23:05:47 -07:00
schema Implement idle timeout reaper and liveness visibility for hung runs 2026-03-26 23:05:47 -07:00
backup-lib.ts Fix worktree minimal clone startup 2026-03-10 10:13:05 -05:00
backup.ts Add configurable automatic database backup scheduling 2026-03-04 18:03:23 -06:00
client.test.ts test: skip embedded postgres suites when initdb is unavailable 2026-03-26 11:12:39 -05:00
client.ts Add routines automation workflows 2026-03-19 08:39:24 -05:00
embedded-postgres-error.test.ts Improve embedded Postgres bootstrap errors 2026-03-26 12:35:19 -05:00
embedded-postgres-error.ts Improve embedded Postgres bootstrap errors 2026-03-26 12:35:19 -05:00
index.ts Improve embedded Postgres bootstrap errors 2026-03-26 12:35:19 -05:00
migrate.ts Fix dev migration prompt and embedded db:migrate 2026-03-10 15:31:05 -05:00
migration-runtime.ts Improve embedded Postgres bootstrap errors 2026-03-26 12:35:19 -05:00
migration-status.ts feat(costs): add billing, quota, and budget control plane 2026-03-16 15:11:01 -05:00
runtime-config.test.ts Fix env-sensitive worktree and runtime config tests 2026-03-11 16:38:31 -05:00
runtime-config.ts Fix dev migration prompt and embedded db:migrate 2026-03-10 15:31:05 -05:00
seed.ts Expand data model with companies, approvals, costs, and heartbeats 2026-02-17 09:07:22 -06:00
test-embedded-postgres.ts test(worktree): address embedded postgres helper review feedback 2026-03-26 11:56:05 -05:00