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

47.2 KB
Raw Blame

Release v2.13.0

Released: 2026-05-30

Changed

  • [claude-default-opus-4-8] Default Claude CLI/TUI providers now use claude-opus-4-8. The seeded claude-code and claude-code-tui providers ship the new opus tier (claude-haiku-4-5 / claude-sonnet-4-6 / claude-opus-4-8) with claude-opus-4-8 as the default and heavy model, and the Anthropic model-refresh dropdown lists it first. Migration 058 bumps existing installs from the opus-4-7 trio to the opus-4-8 trio — rewriting the models list and swapping any tier pointer still on claude-opus-4-7, while leaving customized model lists and still-current pins (sonnet-4-6, haiku-4-5) untouched. Bedrock providers (separate model ids) are not affected.

  • [comic-structure-editorial-review] "Finish the draft" editorial review now flags malformed comic-script pages. Comic scripts can accumulate pages where all scene content — action, dialogue, transitions — is in the page-level description instead of panel definitions; those pages can't be rendered by the image generator because no discrete panels exist. The review pass now detects these as a new comic-structure category finding (always high severity) and generates a full panel-by-panel rewrite as the suggestion, so accepting the fix restructures the page in place. A legitimate page description is 1–3 lines of layout intent; anything longer that reads as story content is flagged. Migration 057 updates the pipeline-manuscript-completeness prompt on existing installs (customized prompts are skipped with a warning).

  • [catalog-type-table-vs-check] Adding a new catalog ingredient type no longer needs a database migration. The catalog_ingredients.type column previously carried a hardcoded CHECK (type IN (…six types…)) duplicated in both the fresh-install SQL and the runtime schema-upgrade path, so introducing a seventh type meant a two-file constraint migration. The CHECK is dropped (and the column widened to VARCHAR(32)); valid types are now enforced purely at the app layer by the shared type registry (catalogTypes.js) and its Zod enum — the same gate that was already validating every create/update. Existing installs drop the constraint idempotently on the next restart. No behavior change for the current six types and no cross-peer sync version bump (the wire payloads are identical until a new type is actually introduced); this clears the precondition for user-defined ingredient types.

  • [catalog-detail-batched-endpoint] Catalog ingredient detail page loads in one request. The detail page used to fire five separate requests on mount (the ingredient, its relations, revision history, media attachments, and the missing-media integrity overlay). A new GET /api/catalog/ingredients/:id/details hydrates all of them in a single round-trip, and the page consumes it on initial load. Post-mutation updates (attach media, restore a revision, add a relation) still use the granular endpoints so a single edit doesn't re-pull the whole record. No visible change beyond a faster, less flickery detail load.

  • [catalog-import-sync-hardening] Catalog bulk-import keeps scraps; legacy universe tags self-heal across peers. Bulk-importing markdown that carries a ### Scraps subsection now persists those scraps as catalog_scraps rows + source links inside the same transaction (previously the round-tripped scraps were silently dropped on import); the response reports a scrapsCreated count. Separately, an ingredient synced from an older or offline peer after the one-time boot tag-repair ran would reintroduce raw from-universe / universe:<uuid> machine tags via last-writer-wins — those are now friendlified to the universe NAME on inbound sync — re-applying the repair whenever an ingredient is (re)synced and its universe is resolvable locally, instead of only at boot (a catalog row that arrives before its universe keeps its machine tags and is cleaned up on the next sync or by the boot repair). Internal: the seven near-identical per-kind apply loops in catalogSync.applyRemoteChanges collapse into a single applyKind helper (pure refactor, behavior-identical), and createScrap gains a { client } transaction option. Adds route-level Postgres integration tests for /bulk-import and revision /restore.

  • [federated-media-sync-followups] Sync integrity, local LLM, voice, and service hardening. Federated sync badges now distinguish offline peers from peers that need a PortOS update, series integrity checks include child-issue assets, and records with images missing prompt sidecars show a dedicated "Metadata missing" status. Tombstone pushes now bypass the schema-version cooldown so deletes converge immediately. Internal cleanup: the AI toolkit receives Ollama readiness through an injected hook, Linux Ollama startup uses persistent systemctl enable --now / disable --now, migration 037 streams history conversion instead of materializing the union in memory, Local LLM backend switching writes .env atomically, the Voice settings UI can pin a vision model, and the LTX2 negative-prompt patch only targets namespaced constants modules.

  • [catalog-tests + catalog-ddl-drift-test] Catalog stack now has unit-test coverage + a DDL parity guard. Internal: pure unit tests for the catalog Zod validators, the peer-sync envelope apply path (per-kind dispatch, per-row isolation, schema-version gate, cursor normalization), and the extraction service (stage frames, isolation, light-shape sanitizer). A new structural parity test diffs the catalog DDL between server/scripts/init-db.sql (fresh-install path) and the catalogDDL array in server/lib/db.js:ensureSchema() (upgrade path) — table columns, indexes, trigger functions, triggers, the type CHECK list, and the search_tsv payload-field set must match in both files, so a future PR can't update one and forget the other.

  • [pythonsetup-arch-tests] Test coverage for the arch-aware Local Python detector. Internal: locks in the macOS arm64-vs-x86_64 preference behavior and the /setup/check arch fields with mocked-platform unit tests, so future edits to interpreter detection can't silently regress mlx wheel loading. No user-visible behavior change.

  • [mediajobqueue-resolve-live-params] Media job dispatch internals. Internal refactor: the live-settings re-resolution step that picks the current Python interpreter before each video / local-image render moves into its own helper, giving future live-resolved fields a single seam. No user-visible behavior change.

  • [patch-settings-slice-helper] Nested settings edits no longer risk clobbering sibling fields. Saving a Python path from Video Gen, or an image-gen config from a pipeline / Writers Room stage, used to round-trip the entire current settings object — leaving unrelated top-level keys exposed to drift if the read raced a concurrent write elsewhere. These edits now scope themselves to the slice being changed.

  • [client-use-previous-hook] Shared usePrevious hook. Internal refactor: collapses two ad-hoc previous-render comparisons into one shared hook. No user-visible behavior change.

  • [warning-banner-component] Shared Banner component. Internal refactor: introduces a tone-variant Banner primitive and replaces five hand-rolled warning banners (LoRA manager, Security audio prompt, scheduled-runs paused / improvement-disabled callouts, local Python arch / externally-managed notices, CoS memory-backend status). Two of those banners pick up a minor visual unification — the LoRA download message body now uses the standard warning amber instead of a cream variant, and the local Python notices gain a few pixels of horizontal padding to match the rest of the warning banner family.

  • [warning-banner-migrate-remaining-sites] Status banner consistency across the app. Internal refactor: ~25 more hand-rolled status banners (across Brain, CoS, Apps, MeatSpace, Digital Twin, Pipeline, and several pages) now use the shared Banner primitive instead of ad-hoc tone-and-padding combinations. Most banners are visually identical to before; a few pick up small cosmetic unifications — uniform corner radius, consistent horizontal padding, and the standard warning/error/success/info color family.

  • [setup-check-cache] Local Python setup check no longer spawns a subprocess per keystroke. Typing in the Python interpreter path used to fire a fresh ~0.5–1 s python probe on every (debounced) keystroke, on mount, and on the refresh button. The check now memoises its result per interpreter for 30 seconds, and the cache busts automatically when the interpreter binary changes, when a new venv is created, and when a pip install finishes — so typing flows feel snappier. External package mutations (a shell-side pip install) can take up to 30 s to surface; the next setup interaction picks them up.

Added

  • [manuscript-editor] New full-page Manuscript Editor with inline editorial comments, AI fixes, multi-format editing, and version history. "Finish the draft" findings are no longer a flat advisory list — they now persist as Word-style comments anchored to exact spots in the manuscript, so they survive a reload and stay until you accept, dismiss, or regenerate them (re-running augments the list without wiping in-progress work). A new full-bleed editor (/pipeline/series/:id/manuscript, reachable from the "Finish the draft" results and the series bible) shows the whole series manuscript in story order, one editable section per issue, with the comments in a sidebar. Click a comment to jump to (and highlight) its anchor; Generate fix proposes a surgical find/replace edit you can modify before Accepting it into the manuscript, or Dismiss. Every section is also freely editable. Versioning: every accepted fix and every saved free-text edit snapshots the prior text into the stage's history — each section shows a "History (N)" panel with one-click Revert to any prior version (reversible), including the original imported text. The editor spans all three formats — a Comic / Teleplay / Prose switcher loads the full story in any format, and you can pin the primary manuscript format (the source of truth the others are generated from) in the series bible or from the editor. The completeness pass now anchors each finding with a structured issueNumber + verbatim anchorQuote (migration 056 upgrades the pipeline-manuscript-completeness prompt on existing installs; customized prompts are left intact and warned). New routes under …/series/:id/manuscript, a pipeline-manuscript-fix prompt, a per-series manuscript-review.json, a primaryManuscriptType series field, and an opt-in snapshotPrior on the stage-write path so edits are versioned without faking a run. Also fixes a bug where switching series left the prior series' "Finish the draft" (and verify/derive) results rendered on the new one.

  • [pipeline-derive-from-manuscript + manuscript-completeness] Reconstruct a series arc/bible from an imported manuscript, and get editor feedback on what's left to finish. Two new series-level actions on the Arc Canvas. Derive from manuscript reads the comic-script / prose / teleplay you already drafted across the issues and proposes — in a review-and-confirm preview — a series arc, the bible fields (logline, premise, issue-count target), and a single graphic-novel volume holding every issue as a chapter/act; confirming collapses any stray extra volumes into one, reassigns the issues, fills the bible, and seeds each issue's synopsis so the synopsis-level Verify Arc pass becomes useful — without ever touching your verbatim scripts. (Reuses the existing importer-arc-extract back-derivation that previously lived only inside the Story Builder; collectIssueSourceText is now shared.) Finish the draft is a separate developmental-editor pass that reads the actual drafted manuscript (not synopses, which Verify Arc/Volume are limited to) and returns categorized suggestions — missing content, arc gaps, character-development gaps, pacing, continuity — for rounding out a near-complete draft before you generate every per-issue stage. New routes POST /api/pipeline/series/:id/arc/derive-from-manuscript(/commit) and …/manuscript/completeness, a new pipeline-manuscript-completeness stage prompt (auto-installed via the stage-config merge — no migration), and Zod-validated inputs.

  • [importer-single-volume-choice] The importer lets you choose how a finished work is split — one graphic-novel volume of chapters, or a multi-volume series — and no longer leaves the bible blank. Importing a comic script used to create the LLM's multi-volume breakdown (often 3–4 "volumes") regardless of intent, with no choice offered, and wrote only series.arc + seasons — leaving the bible sidebar (logline, premise, issue-count target) empty after a successful import. The Review step now has a Structure control: comic scripts default to a single volume holding every issue as a chapter/act (the extracted volume descriptions fold into the issue synopses — "the volume descriptions read better as issue descriptions"), with one click to switch back to multi-volume. On commit, the bible's logline / premise / issue-count are populated from the extracted arc + issue count (additive imports only fill empty fields; Replace overwrites).

  • [catalog-character-sheet-enrichment] Catalog and Universe Builder are now the same durable record, and the catalog's color palette / stats / aliases are editable inline. Editing a character/place/object on the Catalog detail page and editing it on the Universe Builder canon surface used to write two parallel copies (the catalog_ingredients row and the embedded universe.characters[] entry) that silently drifted apart. They're now kept in lockstep by a bidirectional projection (server/services/catalogCanonProjection.js): a Catalog edit fans into every linked universe's embedded canon entry (best-effort, after the response), and a canon edit projects back into the catalog row synchronously inside updateUniverse so the embedded copy is a never-lagging cache of the one store of record. Conflicts resolve last-writer-wins on updatedAt; an in-flight re-entrancy guard breaks the catalog→canon→catalog loop so each side is written exactly once per edit. A one-time boot reconciliation (reconcileCanonCatalog.js, marker data/catalog-canon-reconcile.applied.json, registered as migration 055) collapses any pre-existing divergence on first upgrade. Separately, the catalog character/place/object detail page now edits the enriched array fields inline — Aliases (string chips), Color Palette ({ name, hex, role } swatch rows with a native color picker), and Stats ({ label, value } rows) — instead of rendering them read-only; add-buttons disable at the storyBible caps (12 colors, 30 stats, 12 aliases). Bible-type payloads are now run through their storyBible sanitizer (sanitizeCharacter/sanitizePlace/sanitizeObject) on every catalog create/update so the array editors can't land malformed rows; idea/scene/concept and user-defined types are untouched. (Builds on the editable grouped sheet + reference-sheet panel + friendly-tag repair that shipped earlier as a slice.)

  • [catalog-user-defined-types] Define your own Catalog ingredient types in Settings → Catalog. The catalog shipped six built-in types (character / place / object / idea / scene / concept); you can now add your own — wardrobe, vehicle, faction, magic-system, prompt-fragment, anything — without a code change. A new Settings → Catalog tab lists the built-ins read-only and lets you build custom types from a flat field list: each type is { id, label, primaryContentKey, fields: [{ key, label, kind: 'string' | 'longtext' | 'tags' | 'ref', maxLength? }] }. User types persist in data/settings.json (catalogUserTypes) — not a new table — and merge into the active type registry at boot and on every save, so they show up immediately as filter chips, in the "New" dropdown, and as a fully editable detail page driven by a single generic field renderer (no per-type React file). A ref field links to another catalog ingredient via the existing picker; tags reuses the tag chip input. Validity is enforced at the app layer (the registry + a Zod refinement on the ingredient type), building on the already-dropped DB CHECK. User types federate: they ride a new additive catalogTypes block in the catalog sync envelope (LWW-merged into each peer's own settings slice, skipping built-in-id collisions), gated by PORTOS_SCHEMA_VERSIONS.catalog bumped to 8 — a peer on an older catalog schema rejects a forward-shaped push with a clean 412 rather than dropping the definitions and then choking on ingredients of an unknown type. Deleting a type that still has ingredients is refused unless you force it (the orphaned rows survive under a fallback editor). No DB migration — settings-only.

  • [catalog-voice-tools-user-type-filter] Voice can now search your user-defined catalog types. The voice catalog_lookup tool advertised only the six built-in kinds in its type filter, so "search my factions" couldn't narrow to a user-defined type (it silently fell back to an unfiltered search). The tool's type enum is now derived from the active type registry at spec-build time, and the filter accepts any active type (built-in or user-defined), so a custom type created in Settings → Catalog is voice-addressable the moment it exists. Unknown types still drop to an unfiltered search rather than erroring.

  • [catalog-scrap-chunking] Long scrap pastes are now chunked so extraction doesn't silently degrade. Pasting (or ingesting via URL / file / voice) a very long scrap — a whole screenplay, a 50k-word manuscript — used to land as a single row and a single LLM extraction pass, quietly overflowing the model's context and dropping ingredients from the tail. Inputs over ~12k characters now split into a parent row plus N child chunks (preferring paragraph, then sentence, then word boundaries so nothing is cut mid-word and the text reassembles exactly); the extractor runs each chunk independently (two at a time) and unions the results, de-duplicating by name + type so the same character mentioned in three chunks appears once. Short pastes behave exactly as before — one row, one pass. The chunk parent/child structure federates to peers (the catalog sync wire version is bumped, so a peer on an older catalog schema declines a forward-shaped push cleanly rather than mis-applying it); existing scraps are left as-is.

  • [catalog-ask-retrieval] Ask now draws on your Creative Catalog. Asking a question (/api/ask, the Ask page, voice) now retrieves matching catalog ingredients — characters, places, objects, ideas, scenes, concepts — alongside memory, brain notes, goals, autobiography, and calendar. Matches use a hybrid Reciprocal-Rank-Fusion search (full-text + vector embedding) sharing the same scoring/budget model as memory retrieval, capped at 4 catalog sources per answer and weighted between brain-notes and autobiography. Each surfaced ingredient is a clickable source chip that deep-links to its catalog detail page. Full-text matching works immediately; semantic (vector) matches appear once you've configured an embedding model and run the catalog embeddings backfill. A catalog hiccup never blocks an answer (the retriever is isolated in the parallel fan-out).

  • [catalog-federation-orchestrator] The creative catalog now auto-replicates between peers. The catalog sync routes existed but nothing pulled from peers — orphan ingredients (ideas / scenes / concepts not attached to a universe) and the universe→ingredient ref links stayed local. The sync orchestrator now runs catalog as a delta-based PostgreSQL category alongside Memory: on every peer-online event and on the background interval it pulls GET /api/catalog/sync (the seven independent per-kind BIGSERIAL cursors: scraps / ingredients / sources / refs / relations / tags / media) and applies each batch locally with the same last-writer-wins + per-row isolation + schema-version gate as direct sync. A peer ahead on the catalog schema records a gap on the Instances page (the existing SchemaGapBadge) and pauses draining instead of looping. Toggle it per peer under Instances → Sync Categories → "Catalog"; Postgres-only (a non-Postgres peer simply never enables it).

  • [catalog-bundled-universe-push] Universe peer-pushes now carry their catalog enrichments. When peer A pushes a universe to peer B, the push bundles the catalog_ingredients rows referenced by that universe's canon plus the universe→ingredient ref links. Previously only the embedded canon replicated, so the receiver re-derived a strictly-lossy view on first backfill — the tags, vector embedding, and payload.summary-style enrichments that live only in the catalog row were dropped. The bundle ships the full enriched rows (including tombstoned ref rows so unlinks propagate), applied through the same catalog-sync path; it rides only universe pushes (never series / mediaCollection), skips tombstone pushes, and is gated by PORTOS_SCHEMA_VERSIONS.catalog so a receiver on an older catalog schema rejects a forward-shaped bundle with a clean 409 rather than corrupting local rows. Postgres-only and best-effort — a bundle failure never fails the universe push.

  • [catalog-character-sheet-enrichment] The Catalog character detail page is now a full editable character sheet, and backfilled rows get friendly universe tags. Opening a character ingredient (e.g. /catalog/character/cat-chr-…) now shows grouped DnD-style sheet sections — Identity, Appearance, Personality & Voice, Goals & Drives, Background & Relationships, Notes — exposing every enriched canon scalar field the Universe Builder already tracks (role/archetype, pronouns, age, core theme, physical description, visual/silhouette/posture notes, special traits, personality, mannerisms, speech accent/pattern, motivations, likes, dislikes/fears, background, relationships, skills). Because the editor keys mirror sanitizeCharacter exactly, an edit on the Catalog surface lands in the same payload field the Universe Builder canon surface reads — the two are the same durable row (linked by the embedded ingredientId + catalog_ingredient_refs). The catalog's enriched array fields (color palette swatches, stats, aliases) render read-only here (their structured per-item editors live in Universe Builder), and a new "Reference sheet" panel shows the rendered turnaround when one exists (/data/image-refs/…) or, when the character belongs to a universe, links straight to Universe Builder to render one from that universe's style data. Places and objects get the same grouped-section treatment. Migration: a one-time boot-time data repair rewrites the legacy machine tags backfilled rows carried (from-universe, universe:<uuid>) into the friendly universe NAME tag while preserving every user tag and the structured universe ref — marker-gated in data/catalog-universe-tags.applied.json and registered in the migration ledger as 053-catalog-friendly-universe-tags; new bible→catalog promotions stamp the friendly name from the start. (The deeper unification — collapsing the embedded canon entry to a pure ingredientId projection so the catalog row is the single store of record — is scoped to follow.)

  • [catalog-source-kinds-url-file-voice] Catalog Ingest accepts URLs, text files, and voice memos — not just pasted text. The /catalog/ingest paste box now sits behind a source picker: URL fetches the page through the browser service and extracts its main article text server-side (source_kind: url, metadata records the URL + fetched title); File reads a .txt/.md you pick and ingests it (source_kind: file, metadata records filename + mime); Voice Memo records from your mic, transcribes it with Whisper, persists the audio under data/audio to mint a media_key, and ingests the transcript (source_kind: voice-memo, metadata records the audio key so a later commit can attach it via the media-refs table). Every source funnels into the same extract → review → commit flow and streams the same catalog:extract:progress stage checklist as a paste. No DB migration or sync-version bump — catalog_scraps.source_kind was already a free VARCHAR(32) and the sync envelope already accepts any value, so the new kinds federate to peers as-is. PDF text extraction is intentionally deferred (no in-tree PDF-text dependency); picking a .pdf surfaces a clear "paste the text instead" message.

  • [catalog-ingredient-media-refs] Catalog ingredients can now carry typed media attachments — a portrait, mood/reference images, and more. A new "Media" panel on each ingredient detail page lets you set one portrait (rendered large at the head) and attach additional reference images, scoped to your existing media gallery via a "Pick from gallery" picker or by dragging a gallery image onto the panel. Each attachment stores a media_key reference into your media library (the bytes are never duplicated into the catalog), so a federated peer that receives an ingredient gets its media-key list and matches it against its own library — keys whose asset hasn't arrived yet show a "missing" badge (via the same syncing-asset surface used elsewhere) instead of a broken image. Backed by a new catalog_ingredient_media Postgres table (kinds: portrait / reference / audio / video / document) with soft-delete tombstones from day one, so detaches propagate to peers; the rows ride the catalog sync envelope as a new media block (PORTOS_SCHEMA_VERSIONS.catalog bumped to 6 — a peer on an older catalog schema gets a clean 412 rather than silently dropping every attachment). POST/DELETE /api/catalog/ingredients/:id/media, POST …/media/portrait, and GET …/media + …/media/missing are Zod-validated; attaching rejects a key that doesn't resolve against the local library with a 422. Voice-memo capture is intentionally left as a clean seam for the separate source-kinds work.

  • [catalog-ingredient-revisions] Catalog ingredients now keep an edit history with inline diff + restore. Every time a catalog ingredient's name, payload, or tags change — a manual detail-page save, an ingest commit, or a future AI refinement pass — a revision row is recorded, and a new "Revision history" panel on the ingredient detail page lists them newest-first with a source badge (user / extract / refine / sync) and a relative timestamp. Expand any revision to see a field-by-field diff against the current saved state, and click "Restore" on an older revision to roll back (the restore is itself recorded as a new revision, so it's auditable and reversible). Backed by a new append-only catalog_ingredient_revisions Postgres table (foreign-keyed to catalog_ingredients with ON DELETE CASCADE); retention is capped at the most recent 50 revisions per ingredient (configurable via the CATALOG_REVISION_RETENTION env var) so history can't grow unbounded from rapid edits. The history is local audit data — it is intentionally NOT federated (the synced ingredient row already last-write-wins-merges the latest state across peers), so the catalog sync wire version is unchanged.

  • [catalog-ingredient-relations] Catalog ingredients can now link to each other — the catalog is a graph, not a flat list. A new "Relations" panel on each ingredient detail page lets you connect one ingredient to another via the existing Ingredient Picker — a character to the place they live in, a scene to the cast that appears in it, a concept referenced by an object, and so on (kinds: appears-in, lives-in, created-by, parent-of, variant-of, references, related-to). Edges are directed: the panel shows both outbound relations (this ingredient → other, editable here) and inbound ones (other → this ingredient, read-only because the other end owns them, rendered with the inverse label). Backed by a new catalog_ingredient_relations Postgres table with both ids foreign-keyed to catalog_ingredients (ON DELETE CASCADE) and soft-delete tombstones from day one, so unlinks propagate to federated peers instead of silently vanishing. The edges ride the existing catalog sync envelope as a new relations block (PORTOS_SCHEMA_VERSIONS.catalog bumped to 4 — a peer on an older catalog schema gets a clean 412 rather than silently dropping every relation). POST/DELETE /api/catalog/ingredients/:id/relations and GET …/relations are Zod-validated; self-edges are rejected.

  • [catalog-writers-room-version-refs] Writers Room draft versions now record which catalog ingredients they reference. Saving a draft scans the prose against the cast linked to that work in the Catalog (characters / places / objects / etc.) and stamps the matched ingredient ids onto the version snapshot. The Versions drawer renders those references as chips under each version, so you can see at a glance which cast a given draft actually mentions. The scan is best-effort — a catalog hiccup never blocks a save — and a client may pass an explicit referencedIngredientIds[] to skip the server scan.

  • [catalog-universe-builder-picker] "Pick from Catalog" on Universe Builder canon panels. Each Characters / Places / Objects section in Universe Builder (Bible + Cast/Places/Objects tabs) now has a "Pick from Catalog" button next to "Render all" / bulk-lock. It opens the shared Ingredient Picker scoped to that type; picking an ingredient copies its payload into a new embedded canon entry, stamps the catalog row's id onto the entry as ingredientId, and links the ingredient back to the universe (catalog_ingredient_refs, role canon-character / canon-place / canon-object) so the "Appears in" panel populates. The ingredientId stamp ties the embedded entry to its durable catalog row and lets the boot-time bible→catalog backfill recreate the SAME catalog id on every federated peer instead of minting a divergent one. Already-linked ingredients are excluded from the picker so you can't double-add the same character.

  • [meatspace-workouts-read-path] Logged workouts are now visible in MeatSpace. The server exposes GET/POST /api/meatspace/workouts, the client API wraps it, and the MeatSpace Health tab lists recent workouts that were logged by voice, palette, or API.

  • [catalog-pipeline-series-cast] "Cast (from Catalog)" panel on Series, Issue, and Writers Room pages. A new reusable panel surfaces every catalog ingredient linked to the active series / issue / work bible — drawn from the existing catalog_ingredient_refs table — and lets you attach more via the existing Ingredient Picker or unlink with a click. Series records carry no embedded characters[] array, so the cast is purely additive and replicates through the existing catalog sync. The panel lives in the Series bible sidebar above "Canon", at the top of the active stage scroll on Issue (visible across every stage tab), and above the work editor in Writers Room when a work is selected.

  • [catalog-bulk-import] Bulk-ingest endpoint for the Catalog. A new "Bulk Import" panel on /catalog/ingest accepts JSON, CSV (type,name,description,tags header), or simple markdown (## <Type>: <Name> headings with paragraph body and optional tags: line) and creates ingredients directly — no per-row review screen. Each row is re-validated against the same Zod schema the single-create endpoint uses, so one bad row rolls back the entire batch; vector embeddings run in parallel before the transaction (same as the scrap-commit path), so bulk-imported rows are search-ready immediately rather than waiting for the embeddings backfill. POST /api/catalog/bulk-import is Zod-validated (2 MB payload cap), stamps optional defaults.tags plus an optional universe/series/work/issue ref onto every row in the same transaction, and surfaces parser warnings (e.g. ## Plce: … typos in markdown that don't match a known type) in the response so users notice typos that would otherwise be silently skipped.

  • [catalog-export-bundle] Export a catalog slice as a portable bundle. GET /api/catalog/export?refKind=universe|series|issue|work&refId=…&format=json|markdown|yaml walks the ref table for the target, hydrates each ingredient + its scraps + ref-links, and returns an attachment bundle. Pairs with bulk import for round-trip portability (export → edit → re-import) — useful for sharing a universe's cast outside peer-sync or seeding a fresh install from a community pack. Relations and media-ref hydration ship with their own PLAN items.

  • [catalog-cmdk-ask-voice-discovery] Catalog ingredients are now discoverable from ⌘K and voice. The Command Palette ⌘K shows live catalog hits (top 5, debounced) under a "Catalog" group as you type — selecting one jumps straight to the ingredient detail page. A new voice tool catalog_lookup({ query, type?, limit? }) returns matching ingredients with type, snippet, and ref-count, intent-gated so it only loads on catalog-y turns and doesn't bloat every prompt. Ask retrieval (the third leg of the original PLAN item) is split out to follow.

  • [catalog-extraction-idea-scene-concept] Catalog Ingest now extracts ideas, scenes, and concepts too. Pasting prose into /catalog/ingest previously only surfaced characters / places / objects. A new LLM stage runs alongside the three existing bible passes and proposes idea, scene, and concept candidates from the same scrap — each rendered as its own review section with selectable / editable rows, then committed via the same path. One additional LLM call per ingest; failures isolate to that stage so the other three are unaffected.

  • [catalog-quick-idea-dashboard-widget] New "Quick Idea (Catalog)" dashboard widget. Captures a creative ingredient directly into the catalog without the scrap+extract LLM round-trip — pick a type chip (character / place / object / idea / scene / concept), name it, optionally add primary text and tags, and submit. Lands in the Quick Capture row of the seeded "Everything" layout on fresh installs. Existing installs whose data/dashboard-layouts.json predates this PR keep their saved layout — the new widget appears in the Layout Picker's "Edit" sheet so you can toggle it on. The "Open" link in the success toast jumps straight to the new ingredient's detail page.

  • [catalog-extensibility-roadmap] PLAN.md: Creative Catalog extensibility roadmap. Internal: 14 new tracked items covering type-registry consolidation, types table vs CHECK constraint, per-payload schemaVersion + upgraders, user-defined ingredient types, ingredient↔ingredient relations, canonical tag taxonomy, revision history, media attachments, bulk import + slice export, ⌘K/Ask/voice discovery hooks, URL/file/voice-memo source kinds, scrap chunking, and a dashboard Quick Idea (Catalog) widget under Quick Capture. No user-visible behavior change yet — scopes the work required to evolve the catalog beyond the v1 six hardcoded types.

  • [creative-ingredients-catalog-upgrade-path] Catalog deployment + upgrade story. The bible→catalog backfill is now peer-aware: when a universe arrives via federated sync carrying an ingredientId that doesn't exist in the receiving install's catalog, the backfill creates the local catalog row WITH that explicit id instead of minting a new one — so the same logical character keeps the same catalog id across every install in the federation, even when the catalog rows weren't in the original sync payload. A new admin endpoint POST /api/catalog/migration/rerun (with { force: true } to ignore the applied-marker) lets users recover from a stuck backfill or fix data on a peer. Catalog DDL ships in both server/scripts/init-db.sql (fresh installs via docker-entrypoint-initdb.d or setup-db.js/db.sh setup-native) AND server/lib/db.js:ensureSchema() (idempotent runtime upgrades — runs on every server boot), so existing installs pick up the catalog tables on the first restart post-pull without needing to re-run init-db.sql.

  • [creative-ingredients-catalog] New "Catalog" feature under Create. A central, Postgres-backed store of typed creative ingredients — characters, places, objects, ideas, scenes, concepts. Paste any creative scrap (a one-line story spark, a scene snippet, a rough short-story draft) into /catalog/ingest and the server extracts candidate characters / places / objects via LLM, streams progress as a stage checklist, and shows a review screen where you check the ones to commit. The Catalog page (/catalog) lists every ingredient with type-chip filters, debounced search, and a one-click "+ New" inline form for the lighter idea/scene/concept types. Each ingredient has a detail page with source-scrap provenance and an "Appears in" panel that back-links to every universe / series / issue / work referencing it. Federation routes (GET/POST /api/catalog/sync) are wired and version-gated via the existing PORTOS_SCHEMA_VERSIONS contract (catalog: 1); the auto-orchestrator hookup ships in a follow-up. A boot-time migration backfilled 970 ingredients across 10 existing universes (94 characters, 140 places, 736 objects) so the catalog opens populated. Vector embeddings are provider-agnostic — a new Embeddings settings tab lets you pick Ollama or LM Studio + a 768-dim model (e.g. nomic-embed-text); embeddings auto-apply at ingest when configured and a /api/catalog/embeddings/backfill admin endpoint fills missing rows. Per-record sanitizer carries an ingredientId field through the round-trip so embedded universe canon stays linked to its catalog row.

  • Voice coding agent can target a managed app. When you dispatch a coding task by voice, you can now name a managed app ("fix the failing test in BookLoom") and the agent runs against that app's workspace instead of PortOS itself. The app name is fuzzy-matched, so "book loom", "BookLoom", and "bookloom" all resolve to the same app; if no app matches what you said, the agent refuses with a short list of valid names rather than silently running against PortOS.

  • [voice-code-agent-status-query] Ask voice how a dispatched coding task is going. A new voice query — "how's that coding task going?", "status of the agent", "is the agent still working?" — reports each in-flight voice-dispatched coding task with its current phase, target app, elapsed time, and a snippet of the task description. Until now you could only learn the outcome from the completion announcement; this is the mid-task check-in. Also available as "Coding agent status" in the command palette.

Fixed

  • [update-no-pm2-kill] Self-update no longer kills other projects' PM2 apps. update.sh / update.ps1 ran pm2 kill to force a fresh daemon launch — but pm2 kill tears down the entire shared PM2 daemon, stopping every other project's apps on the machine, not just PortOS's. The update now removes only PortOS's apps (pm2 delete ecosystem.config.cjs) and runs pm2 update to reload the daemon in place from this checkout's node_modules — which still refreshes the cached ProcessContainerFork.js path that the kill was working around (a stale path from a daemon launched by another project, e.g. a Yarn PnP zip cache, otherwise crashes future fork() calls with MODULE_NOT_FOUND), without disturbing co-located apps.
  • [canon-extraction-failure-retry] Failed prose→canon extraction is now retained and retryable with a different model. When a pipeline issue's prose finishes, PortOS auto-extracts characters / places / objects into the linked universe. A provider failure (e.g. Codex safety-refusing the object kind, a Claude 401, or a malformed-JSON response) used to be swallowed — and because all three kinds ran in one Promise.all, a single failing kind discarded the characters + places that did extract. Now extraction is per-kind resilient: the kinds that succeed are merged, the rest are flagged, and the outcome (ok / partial / failed + which kinds failed, the error, and the provider/model used) is persisted on the prose stage so it survives a reload. The Nouns stage surfaces a banner for partial/failed extractions and adds a provider/model picker next to "Extract from prose" (defaulting to the series' configured LLM) so you can keep retrying different models until the failed kinds come through — the entries that already landed are kept. The manual extract now routes through the pipeline endpoint (which accepts prose alongside comicScript/teleplay and a model override) so both the auto and manual paths stamp the same marker. Both the extract-canon and storyboards extract-scenes routes also stop pairing an override provider with the series' stored model id (a model id is provider-specific) — switching providers in a retry now correctly resolves the new provider's default model instead of forwarding e.g. an OpenAI model id to Anthropic.
  • [catalog-character-sheet-enrichment] Catalog character stats now display. The catalog detail page's read-only stats list read each stat's .key field, but the storyBible canon shape stores stats as { label, value } — so every stat rendered with a blank label. The new editable stat editor and the read path both standardize on .label, so stats finally show (and edit) correctly.
  • [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. The shared host guard was also hardened against two literal bypasses (deprecated IPv4-compatible IPv6 like [::127.0.0.1], and trailing-FQDN-dot hosts like localhost.), which strengthens catalog URL ingest as well.
  • [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.
  • [strip-malloc-env-ffmpeg-children] Video workflows now suppress macOS malloc-debug noise from ffmpeg too. Pinokio-launched installs can export Malloc* debug variables that make child processes print MallocStackLogging warnings and bury real render progress. PortOS now builds child-process environments through one shared sanitizer and applies it to ffmpeg/ffprobe children used by thumbnails, streaming optimization, upscaling, timeline renders, device capture, last-frame extraction, and video stitching, so video logs stay focused on actual work and errors.
  • [catalog-ref-deletion-tombstones] Catalog ingredient unlinks now propagate to federation peers. Unlinking an ingredient from a universe / series / issue used to hard-DELETE the catalog_ingredient_refs row with no sync_sequence bump and no tombstone — peers that already pulled the link kept it forever, leaving the "Appears in" panel stale across the federation. The ref table now soft-deletes (new deleted / deleted_at columns + an UPDATE trigger that bumps sync_sequence on delete/revive), linkIngredientToRef revives a tombstoned row on re-link, and upsertRefFromPeer mirrors remote deletes via ON CONFLICT DO UPDATE. PORTOS_SCHEMA_VERSIONS.catalog bumps from 1 to 2 so older peers can't push a v1-shaped payload that would silently miss tombstones.
  • [civitai-hidream-qwen-baseModels] Civitai LoRA suggestions now include HiDream and Qwen. Both runner families existed in RUNNER_FAMILIES but were missing from the Civitai baseModels search map and the LoRA Manager UI — so every page load logged Unknown runner family for Civitai search: hidream / qwen, neither family got a "Top for …" section, and any HiDream/Qwen LoRA installed via URL ended up with runnerFamily=null (broken compat filter). The two families now map to Civitai's HiDream / Qwen baseModel strings and render alongside Flux 1, Flux 2, Z-Image, and ERNIE in the suggestions panel.
  • Creative Director long sessions stay fast. Per-scene render orchestration no longer slows down as a project accumulates more scenes — previously a project could degrade from ~3.5 minutes per scene to 10–30 minutes after a long run, because every render reread and rewrote the full per-project run history as that history grew unbounded. The Runs tab now shows up to 200 of the most recent run entries per project; older completed/failed runs are dropped automatically while every in-flight task is always preserved.
  • [triage-gemini-out-of-scope-findings] Editor and Claude Code can now open managed apps on Windows. "Open in Editor" and "Open in Claude" buttons now resolve .cmd/.bat shims (e.g. code.cmd, claude.cmd) that Node otherwise refuses to spawn — previously these actions silently failed on Windows installs.
  • [triage-gemini-out-of-scope-findings] Custom app start commands keep quoted arguments intact. Apps whose start command includes a quoted path or option (node --opt "arg with spaces") now launch with that argument preserved; previously the runner shredded the quotes and PM2 received the broken pieces.
  • [triage-gemini-out-of-scope-findings] Unknown task-type names return a clear error instead of silent no-ops. Toggling a task-type override (per-app or bulk) now rejects unrecognized names with a 400, so a typo can no longer create a phantom override that quietly never runs.
  • [ref-watch-phosphene-strip-malloc-subprocess-env] Image and video generation no longer flood logs with MallocStackLogging warnings. When PortOS is launched from Pinokio or any tool that exports macOS Malloc* debugging env vars, every Python helper used to print "can't turn off malloc stack logging because it was not enabled" once per child exit — dozens of lines per render, burying real progress. Those vars are now stripped before each spawn.

Full Changelog

Full Diff: https://github.com/atomantic/PortOS/compare/v2.12.0...v2.13.0