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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
chore: release v2.18.0
Adam Eivy859a01e21531
diff --git a/.changelog/NEXT.md b/.changelog/v2.18.0.mdsimilarity index 99%rename from .changelog/NEXT.mdrename to .changelog/v2.18.0.mdindex 4e8d3acb5d..b2c96501a6 100644--- a/.changelog/NEXT.md+++ b/.changelog/v2.18.0.md@@ -1,3 +1,7 @@+# Release v2.18.0++Released: 2026-06-09+## Added- **Image gallery: remove the Gemini / Nano-Banana ✦ sparkle** — gallery images now get a **Remove ✦** action in the lightbox that erases the visible sparkle logo Google stamps into the bottom-right corner of its image-gen output. It localizes just that corner and reconstructs it from the surrounding pixels (a dependency-free harmonic inpaint — no GPU, runs on every install), leaving the rest of the image untouched, and saves the result as a new variant alongside the original. This is distinct from the existing **Regenerate** (which overwrites the *invisible* SynthID watermark by re-rolling the whole image) — the sparkle is a visible, fixed-position logo, so it gets a surgical corner fix instead. Available everywhere the media lightbox appears (Image Gen, History, Collections, Universe Builder).@@ -8,14 +12,6 @@- **Songs: a live vocal tuner while you record** — the song recorder now shows the note you're singing and how flat or sharp it is, in real time, right next to the metronome. Hit a take and the tuner reads the same microphone you're recording into (it never opens a second mic), displaying the detected note and a green/yellow/red cents needle that swings flat ↔ sharp and centers when you're in tune. When you're not recording, a **Tune** button opens a standalone tuning mode that listens to the mic without recording or saving anything — handy for warming up or finding a starting pitch. Mobile-friendly, and the mic and analysis shut down cleanly the moment you stop or leave the page. Built on the in-house pitch-detection core — no third-party audio library. (#1023)- **[issue-1026] Songs: sing a melody and turn it into sheet music** — the score editor has a new **Sing to score** panel. Press Sing, get a one-bar count-in so you know where the downbeat is, sing your phrase, then press Stop — PortOS listens to the melody, picks out the notes, snaps their timing to the song's tempo, and writes them out as notation. The detected notes preview on a real staff before you commit, and you can append them to the end of your score or drop them in place of whatever you've selected in the editor. Notes are spelled to match the song's key (flats in a flat key), and it all runs on the built-in pitch detection — no extra audio library.-## Fixed--- **Brain Daily Log and Inbox now sync across federated machines** — your Daily Log entries and Inbox items were never federating to your other PortOS peers, even with Brain sync turned on. Both stores lived outside the brain sync pipeline — the Daily Log in a separate journal store and the Inbox as an append-only log — so neither was ever recorded in the change log that peers pull from. They are now first-class brain records that ride the same delta-sync + last-writer-wins + tombstone machinery as the rest of Brain (people, projects, ideas, links, …): edits propagate, deletes propagate as tombstones (so a delete on one machine can't be resurrected by another), and the anti-entropy reconcile self-heals a peer that was offline. Daily Log entries are keyed by date so the same day edited on two machines converges into one entry instead of forking. A migration converts each install's existing Inbox log to the new format (keeping a `.migrated` backup) and brings existing journal entries into the sync contract — no action needed.-- **Updating across a major dependency bump no longer breaks the UI** — when an update changed a workspace's `package.json` (e.g. the React 18 → 19 bump), the updater ran an in-place `npm install` over the old `node_modules`. Because the client/server lockfiles are per-install and gitignored, that could leave a half-upgraded, duplicated dependency tree (a stray `react@18` lingering beside `react@19`) — the build succeeded but the app threw "Invalid hook call" at runtime and rendered a blank page. The updater now detects which workspaces' `package.json` the pull actually changed and does a clean reinstall (wiping `node_modules` and the stale gitignored lockfile) for only those, resolving the tree from scratch; unchanged workspaces keep their fast incremental install. Both `update.sh` and `update.ps1` (Windows) got the fix, and the same guard now covers the manual `git pull` + `npm start` path — startup remembers each workspace's `package.json` hash and clean-reinstalls when it changes.-- **De-watermarked images now label correctly in the gallery lightbox** — after removing the visible Gemini / Nano-Banana ✦ sparkle, the resulting variant was meant to read "Watermark removed from …" in the lightbox lineage row and group as "Watermark removed". But the `watermarkRemoved` flag the server stamps on the variant was dropped during image normalization, so through the real gallery path (Image Gen, History, Collections) the variant fell through to the generic "Cleaned from …" label instead. The flag now survives normalization, so the honest lineage label and variant grouping fire as intended.-- **Database page works on Windows** — the Database page's Start/Fix/Status actions invoke the `db.sh` manager through bash; on Windows the script's native path (`H:\…\db.sh`) was passed with backslashes, which bash collapsed into a bogus path (exit 127, "No such file or directory"), so the page reported the Docker database as stopped even while it was running. The path is now normalized to forward slashes, which Git Bash accepts on Windows. A second Windows-only failure in the per-backend export path (spawning `mkdir -p`, which isn't a real executable on Windows) was also fixed by using Node's filesystem API instead. Mac/Linux behavior is unchanged.-- **Database page works on Windows (follow-up: use Git Bash, not WSL)** — even after the path was forward-slashed, Start/Fix/Status still failed with exit 127 on machines that have **both** Git Bash and WSL installed: the server (launched by PM2) resolved a bare `bash` to WSL's `C:\Windows\System32\bash.exe`, which mounts drives at `/mnt/h/…` and genuinely cannot see a `H:/…` drive path — and would run `db.sh` against Linux tools even if it could. PortOS now resolves the interpreter explicitly, preferring **Git Bash** (the correct Windows interpreter), with a `PORTOS_BASH` override for non-standard installs. Mac/Linux behavior is unchanged (bare `bash`).-## Changed- **[issue-1070] Federation sync is now bidirectional from one switch** — turning on a sync category for a peer (Brain, Goals, Universe, etc.) now automatically asks that peer to sync the same category back, so you no longer have to set the toggle on both machines by hand. Since you typically own every federated machine, enabling once establishes two-way sync. The Sync Categories panel explains this inline, and a new **Make mutual** button pushes the current set to a peer that was offline during an earlier change (or was configured one-directionally before this existed). Peers on older versions that don't understand the request simply stay one-directional until you toggle again — nothing breaks.@@ -29,5 +25,14 @@## Fixed+- **Brain Daily Log and Inbox now sync across federated machines** — your Daily Log entries and Inbox items were never federating to your other PortOS peers, even with Brain sync turned on. Both stores lived outside the brain sync pipeline — the Daily Log in a separate journal store and the Inbox as an append-only log — so neither was ever recorded in the change log that peers pull from. They are now first-class brain records that ride the same delta-sync + last-writer-wins + tombstone machinery as the rest of Brain (people, projects, ideas, links, …): edits propagate, deletes propagate as tombstones (so a delete on one machine can't be resurrected by another), and the anti-entropy reconcile self-heals a peer that was offline. Daily Log entries are keyed by date so the same day edited on two machines converges into one entry instead of forking. A migration converts each install's existing Inbox log to the new format (keeping a `.migrated` backup) and brings existing journal entries into the sync contract — no action needed.+- **Updating across a major dependency bump no longer breaks the UI** — when an update changed a workspace's `package.json` (e.g. the React 18 → 19 bump), the updater ran an in-place `npm install` over the old `node_modules`. Because the client/server lockfiles are per-install and gitignored, that could leave a half-upgraded, duplicated dependency tree (a stray `react@18` lingering beside `react@19`) — the build succeeded but the app threw "Invalid hook call" at runtime and rendered a blank page. The updater now detects which workspaces' `package.json` the pull actually changed and does a clean reinstall (wiping `node_modules` and the stale gitignored lockfile) for only those, resolving the tree from scratch; unchanged workspaces keep their fast incremental install. Both `update.sh` and `update.ps1` (Windows) got the fix, and the same guard now covers the manual `git pull` + `npm start` path — startup remembers each workspace's `package.json` hash and clean-reinstalls when it changes.+- **De-watermarked images now label correctly in the gallery lightbox** — after removing the visible Gemini / Nano-Banana ✦ sparkle, the resulting variant was meant to read "Watermark removed from …" in the lightbox lineage row and group as "Watermark removed". But the `watermarkRemoved` flag the server stamps on the variant was dropped during image normalization, so through the real gallery path (Image Gen, History, Collections) the variant fell through to the generic "Cleaned from …" label instead. The flag now survives normalization, so the honest lineage label and variant grouping fire as intended.+- **Database page works on Windows** — the Database page's Start/Fix/Status actions invoke the `db.sh` manager through bash; on Windows the script's native path (`H:\…\db.sh`) was passed with backslashes, which bash collapsed into a bogus path (exit 127, "No such file or directory"), so the page reported the Docker database as stopped even while it was running. The path is now normalized to forward slashes, which Git Bash accepts on Windows. A second Windows-only failure in the per-backend export path (spawning `mkdir -p`, which isn't a real executable on Windows) was also fixed by using Node's filesystem API instead. Mac/Linux behavior is unchanged.+- **Database page works on Windows (follow-up: use Git Bash, not WSL)** — even after the path was forward-slashed, Start/Fix/Status still failed with exit 127 on machines that have **both** Git Bash and WSL installed: the server (launched by PM2) resolved a bare `bash` to WSL's `C:\Windows\System32\bash.exe`, which mounts drives at `/mnt/h/…` and genuinely cannot see a `H:/…` drive path — and would run `db.sh` against Linux tools even if it could. PortOS now resolves the interpreter explicitly, preferring **Git Bash** (the correct Windows interpreter), with a `PORTOS_BASH` override for non-standard installs. Mac/Linux behavior is unchanged (bare `bash`).- **Federated brain sync no longer loops forever** — on installs with two or more federated machines, deleting a Brain item (a person, project, idea, link, etc.) could quietly resurrect it: a peer would echo back the old "create," the item would reappear, the delete would re-run, and the two halves would ping-pong between machines indefinitely — flooding the logs with constant sync activity and ballooning the sync counters into the tens of thousands. Brain deletes now leave a durable "tombstone" so a stale create from a peer is rejected instead of reviving the record, matching how the creative catalog already handles deletes. A one-time cleanup neutralizes any already-resurrected items and compacts the runaway sync log (one install collapsed from 74,000 log entries to 7) without disturbing peer sync positions, and old tombstones are swept automatically after a grace period. If you disabled federation sync to stop the churn, it's safe to re-enable once every machine is updated.- **[issue-1077] Federated Brain now re-converges instead of silently diverging** — Brain sync between machines was delta-only: each peer pulled change-log entries since its last position. That alone wasn't enough to guarantee two machines ended up identical — if a peer was offline (or had sync off) while the change log was trimmed to bound its growth, any records whose entries had already been trimmed were lost to that peer *forever*, with no way to catch up. Two machines could quietly drift apart (in one real case, one machine was missing 21 links/projects/ideas the other had) while the UI still showed everything as fine. Three fixes: (1) Brain now does a periodic full reconcile — after the normal delta pull, the two machines compare a checksum of their entire Brain and, only if it differs, exchange a full snapshot and merge it (newest edit wins, deletes respected), so a machine that missed trimmed entries re-converges automatically; (2) the change log is now trimmed only below what every machine has actually pulled *from you* (not how far you've pulled from *them*), so entries a peer still needs are never dropped; (3) the peer card no longer mislabels a category "behind" when both machines are actually in sync (it was comparing a per-peer-scoped checksum against a whole-instance one — e.g. "Media Collections: behind" when both sides were empty). Brain has no per-record push pipeline, so the reconcile is a simple whole-Brain snapshot, applied idempotently; older peers that don't expose the new reconcile endpoints keep working on delta sync alone.++## Full Changelog++**Full Diff**: https://github.com/atomantic/PortOS/compare/v2.17.0...v2.18.0diff --git a/package-lock.json b/package-lock.jsonindex 4803a4bd0d..d15fa9f6e1 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "portos",- "version": "2.17.0",+ "version": "2.18.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "portos",- "version": "2.17.0",+ "version": "2.18.0","license": "MIT","devDependencies": {"pm2": "7.0.1"diff --git a/package.json b/package.jsonindex df0019087b..5d94e90526 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "portos",- "version": "2.17.0",+ "version": "2.18.0","private": true,"description": "Local dev machine App OS portal","author": "Adam Eivy (@antic|@atomantic)",