mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-05 17:28:00 +01:00
* feat(autopilot): the night works from what you said, and no further than you allow The night used to be `nudge-idle`: wake three idle projects at 04:00 with a generic "pick the highest-impact action" prompt, with no limit on what that spent and no record the owner could read in the morning. A run with no brief is where the queue of things nobody asked for came from. The night now - builds from the feedback inbox — one fix per project, the owner's own notes first, then what most visitors hit — through the same Implement path as the button, so a night's run is a person's run: same prompt, same auto-ship rules, same ledger; - is capped by a per-account budget counted in RUNS (beacon_settings .night_runs, default 4, max 20, 0 = file away but build nothing). A run is the unit that spends the owner's agent credits, and a run cap holds whether or not the runner reports a price; - reads one site not read this week, when there is budget left, through the same review prompt as "AI review this page" (now shared in lib/feedback/ai-review-prompt.ts), filing findings into the inbox; - files away reports nobody started in 21 days, with the reason on the row (site_feedback.archive_reason, cleared on reopen); - hands rows waiting for a shut laptop to the cloud builder; - writes one row per (user, night) to autopilot_nights and leaves one line on /feedback, Telegram and push — nothing when it did nothing. Decisions are one pure planner (src/config/autopilot-night.ts, tested in scripts/test/autopilot-night.ts); the lib gathers facts and carries the plan out; the same dispatch gates as Control refuse a working, blocked or failing project; a project paused on Control takes nothing. No model is called from the timer — every night action is an agent run on the owner's builder or a count — so no-free-background-ai stays green. Settings → When an agent finishes gains "Overnight: up to N runs a night"; the autopilot copy on Settings and the Control sheet says what On means now. docs/paths.md path 3 and CHANGELOG record it; effective-loop-operations.md names the night in place of the idle cron. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4 * docs(telegram): register the night's morning note The registry gate found the one new path that can reach the phone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011L2dmcydDLYAiNQwK4XcF4 --------- Co-authored-by: Claude <noreply@anthropic.com>