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
docs: check off browser-navigate-ssrf-guard + changelog
[._.]/ Adam Eivy7feeaee43e01
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 962dfffb56..aab5d909c7 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -42,6 +42,7 @@## Fixed+- **[browser-navigate-ssrf-guard] SSRF guard on the browser navigate route.** `POST /api/browser/navigate` validated its URL with a bare `z.string().url()`, so `file://`, loopback, link-local, and cloud-metadata (`169.254.169.254`) targets were reachable — a redirect or agent-driven navigation could turn it into local-file exfiltration or a metadata-endpoint hit. It now reuses the catalog ingest guard (`isSafeIngestUrl`): http(s) only, with loopback / link-local / metadata hosts blocked (including IPv4-mapped-IPv6 bypass forms like `[::ffff:127.0.0.1]`). Private/LAN and Tailscale hosts stay allowed; `localhost`/`127.x` are now blocked, so navigate a local app by its LAN IP/hostname. Bad input also returns a clean 400 instead of a 500.- **[catalog round-trip + cast multi-role] Catalog export → re-import keeps ref links, scraps, and non-primary payload keys; Cast unlink is role-precise.** Re-importing a JSON export bundle through Bulk Import now recreates the bundle's slice membership: the parser carries the bundle's own `ref` plus each row's `roleForExportedRef`, and the route falls back to them when no explicit `defaults.*Ref` override is supplied — so a re-imported slice is no longer invisible to "Appears in" and to future slice exports. The markdown parser now recognizes the ` ```json ` payload fence and the `### Scraps` subsection as body terminators and round-trips them into `payload.*` / a sibling `scraps[]` instead of polluting the primary description/summary with fence text. The Cast (from Catalog) panel's unlink now removes only the `(ingredient, role)` row that was unlinked, not every row sharing the ingredient id — correct when the same ingredient is linked to one record under multiple roles.- Custom browser setup is more reliable: macOS app bundles are paired automatically with Chrome-compatible browser paths, Canary setup no longer repeatedly prompts after you decline, and non-interactive updates no longer risk hanging on package-manager password prompts.- **[mediacard-use-mediaimage-for-syncing-assets] Media grid thumbnails now recover cleanly for peer-synced assets.** `MediaCard` now renders previews through `MediaImage`, so a peer-pushed image or video thumbnail that arrives after the record shows the "Syncing" placeholder instead of a broken image and swaps to the real asset when `peerSync:asset-arrived` fires.diff --git a/PLAN.md b/PLAN.mdindex 9937e5b58b..48cfe1da73 100644--- a/PLAN.md+++ b/PLAN.md@@ -18,7 +18,7 @@ New follow-ups surfaced during the 2026-05-30 review pass:- [x] [catalog-bulk-import-scrap-persistence] **Persist scraps on markdown bulk-import.** `parseMarkdownBulk` now round-trips `### Scraps` into a non-enumerable `entry.scraps[]`, but the bulk-import route does NOT create `catalog_scraps`/`catalog_ingredient_sources` rows from them (lossy-but-not-corrupt per the PLAN). Wire scrap creation into the bulk-import transaction (createScrap needs a `{ client }` option). Surfaced by codex review of #554.- [x] [catalog-sync-apply-kind-helper] **Extract an `applyKindEnvelope(kind, items, upsertFn, statsTally)` helper in `server/services/catalogSync.js`.** The 7 per-kind apply loops (scraps/ingredients/sources/refs/relations/tags/media) share a try/catch + stats-tally shape. Deferred from #558 to avoid churning tested sync code in an already-large PR. Surfaced by codex review.- [ ] [catalog-detail-batched-endpoint] **`GET /api/catalog/ingredients/:id/details` to collapse the detail page's 4 round-trips** (relations + revisions + media + missing-media) into one hydrated response. Nice-to-have; surfaced by simplify review of #558.-- [ ] [browser-navigate-ssrf-guard] **Apply the catalog-ingest SSRF guard to the pre-existing `POST /api/browser/navigate` route.** `server/lib/catalogValidation.js:isSafeIngestUrl` + the DNS-resolution + post-redirect re-check from #559 should be reused by `server/routes/browser.js` (it has the same bare-`z.string().url()` gap — `file://`/loopback/link-local reachable). Surfaced by claude review of #559.+- [x] [browser-navigate-ssrf-guard] **Apply the catalog-ingest SSRF guard to the pre-existing `POST /api/browser/navigate` route.** `server/lib/catalogValidation.js:isSafeIngestUrl` + the DNS-resolution + post-redirect re-check from #559 should be reused by `server/routes/browser.js` (it has the same bare-`z.string().url()` gap — `file://`/loopback/link-local reachable). Surfaced by claude review of #559.- [x] [catalog-friendlify-universe-tags-on-sync] **Friendlify late-synced legacy universe tags.** The one-time boot repair (`repairUniverseTags.js`) is marker-gated, so a catalog ingredient synced from an older/offline peer AFTER the marker is written keeps its raw `from-universe`/`universe:<uuid>` machine tags. Either run `friendlifyUniverseTags` on inbound catalog rows in the sync-apply path, or replace the one-shot marker with a periodic/high-water repair. Surfaced by codex review of #560.- [x] [catalog-universe-builder-picker] **Add "Pick from Catalog" button to `client/src/pages/UniverseBuilder.jsx` character/place/object panels (~3736 LOC file).** When a catalog ingredient is picked, copy its `payload` into a new embedded canon entry with `ingredientId` stamped, AND post `linkCatalogIngredient(id, { refKind: 'universe', refId, role: 'canon-character'|'canon-place'|'canon-object' })`. Picker component lives at `client/src/components/IngredientPicker.jsx` (already built). Deferred from the initial PR because of the file size — needs targeted exploration of the canon-panel structure first (CanonTab / BibleTab around `UniverseBuilder.jsx:1835` + `:2945`).