Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Merge pull request #2715 from atomantic/cos/task-mroktost/agent-ef85bae4

[._.]/ Adam Eivy4ebe5cdf739f
diff --cc .changelog/NEXT.md
index fb04a2c5d1,33a5c98c20..0b1a89789e
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@@ -1,19 -1,8 +1,20 @@@
# Unreleased Changes
+## Added
+
+- **The Brain daily log now saves itself.** Your entry is saved automatically as you type (about a second and a half after you pause, and at least every ten seconds during a long uninterrupted writing run), when you click away from the editor, when you switch tabs or navigate away, and when you background the tab or app — so a closed laptop or a backgrounded phone no longer loses the day. The toolbar shows the current state (`Unsaved…` / `Saving…` / `Saved`) in place of a toast on every autosave; the Save button and ⌘S still work and still confirm with a toast. Autosave never reverts what you're typing mid-save, never writes one day's text into another when you change dates, keeps debouncing instead of retrying per keystroke when the server is unreachable, and deliberately stands down when a dictated voice segment arrives while you have unsaved edits (the toolbar says "Autosave paused — save to keep your edits") — a full-content save would otherwise drop the segment.
+
+## Changed
+
+- Daily log entries now re-embed into the Chief-of-Staff memory index once you settle (coalesced per day, ~30s after your last edit) instead of on every single save. Autosave means a day's entry is now written every couple of seconds while you type; re-embedding per save would have meant an embedding call per typing pause — and, once a day's log grows past the embedding size budget, an unrequested AI summarization call each time too. Search results are unchanged; the index simply updates when you pause rather than mid-sentence, which also produces a better vector than embedding a half-typed sentence a hundred times. Journals now use the same debounced, coalesced re-embed path every other Brain record type already used.
+
+## Internal
+
+- **[issue-2706] Stage-seeding migrations now guard their own `data.reference` assets.** Migrations 189 (model-personality), 094 (object-attachment checks), and 182 (CWQE quality) each seed stage prompts on upgrade but shipped without a colocated test, so a rename or removal of a reference template would have surfaced only at runtime as "Stage not found" on a fresh install. Each now has a `.test.js` asserting it seeds when absent, no-ops on re-run, never clobbers a customized template or hand-tuned config entry, and — the point — that every `data.reference/prompts/stages/*.md` template it names and its `stage-config.json` entry actually ship. The guard is anchored to the migration's own stage list (now exposed on the object the seed helper returns), so adding a stage without shipping its template fails the suite instead of leaving it green against a stale hand-copied list. The three suites collapse to one `runSeedStageMigrationTests({ migration, stages, prefix })` call apiece via a new shared helper — the seed-family analogue of `_testHelpers.js`'s `runPromptMigrationTests`. (`scripts/migrations/_seedStageTestHelpers.js`)
+
## Fixed
+ - The Chief of Staff status panel's Learning card no longer spills its skipped-task count outside the card on mobile. The "(3 skipped)" note used to sit beside the success rate on one line, where it was too wide to fit a narrow card and rendered past the border; it now sits on its own line under the percentage and truncates if it can't fit.
- [issue-2669] Sharing, Messages, and Calendar screens no longer show two stacked error toasts when a share/subscribe/export/save/sync action fails — the custom-catch callers now pass `{ silent: true }` so only their own toast fires, not the shared `request()` helper's default one too. Swept the Messages/calendar/sharing feature area (both ConfigTabs, InboxTab, ReviewTab, ShareToButton, and the Sharing page) and threaded a backward-compatible `options` arg into the affected API wrappers (`evaluateMessages`, `enableGmailApi`, `getGoogleAuthUrl`, `create/updateMessageAccount`, `create/updateCalendarAccount`, `updateSubcalendars`, `saveGoogleAuthCredentials`, `start/runGoogleAutoConfig`, `confirmDailyReviewEvent`).
- Creative Director projects that use the Antigravity provider no longer get stuck on "Planning." The agent now reliably receives its instructions instead of launching and sitting idle at an empty prompt (it waits for Antigravity's input box to be ready before sending, the same way the Claude provider does), so planning actually runs to completion.
- A Creative Director project no longer wedges in "Planning" when its agent is interrupted or crashes mid-run. The stuck run is now cleaned up as soon as the dead agent is detected, so the project can retry on its own instead of waiting for the next server restart.