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
Release v2.4.0
Released: 2026-05-19
Added
- Season-lock-aware arc resolve.
commitSeasonsWithRemapnow restores locked seasons field-for-field over LLM-proposed rewrites (via a newmergeSeasonsWithLockshelper) and re-inserts any locked season the LLM drops from the new shape. Auto-resolve +/arc/generatehonor per-seasonlocked: trueflags without needing to unlock the whole arc — mirrors the per-field arc-lock pattern. worldEntitiesSummarytemplate variable in text-stage prompts. NewrenderEntitiesSummaryhelper inserver/lib/universePromptRenderers.jsproduces a compact one-line-per-kind synopsis of a linked universe's named canon (top-N entries per kind, 80-char descriptor cap). Plumbed intoloadWorldContext(arc/verify/resolve contexts) andtextStages.buildStageContext(per-issue prose/teleplay/comic-script). Migration 027 updates the three text-stage prompts to reference{{worldEntitiesSummary}}in a new "Universe at a glance" block.- Character bible
speechPatternfield. Splits the historicspeechAccent(regional/cultural accent) from the new dedicatedspeechPattern(cadence, sentence structure, lexical tics, recurring phrases — distinct fromvoiceId, which is the TTS engine pointer). Field is piped through the sanitizer +MERGE_CONFIG, the universe character-expand contract + prompt, the rendered reference-sheet header, theCharacterDetailEditor.jsxUI, and the prose/teleplay/comic-script character render mustache so dialogue carries the character's prose voice. Migration 027 handles existing installs. - Delete affordance for character reference sheets. New trash button on
CharacterReferenceSheetPanel(inline[Cancel] [Delete sheet]confirm row) backed byDELETE /api/universe-builder/:id/characters/:entryId/reference-sheet. Server unlinks the PNG fromdata/image-refs/and eagerly purges every matchingreferenceSheetImageRefpointer across all universes via a newpurgeReferenceSheetFromAllUniverses(filename)helper. Locked characters' sheets stay delete-protected (UNIVERSE_CANON_LOCKED409, mirrors the renderer's lock guard). - Per-stage editorial locks on Pipeline issues. Each
issue.stages.{id}now carries alockedflag; locked stages refuse regeneration (text generate, image / video enqueue, refine, extract-scenes / extract-pages, audio extract / render, episode-video fresh start, cover-concepts commit). UI exposes a lock toggle on every Pipeline Issue tab and renders a per-stage Lock indicator on the TabPills strip, so users can freeze a finalized comic script while still iterating storyboards. - Per-field arc locks on series.
series.locked.arcFieldsis an opt-in sub-map ({ logline, summary, themes, protagonistArc, shape }); locked fields are preserved verbatim throughcommitSeasonsWithRemapso arc regenerate + auto-resolve only rewrite the unlocked fields. Inline lock icons on the Arc Canvas read view toggle each field. - Pagination on
GET /api/pipeline/series/:id/issues. Accepts optional?offset=N&limit=N; when present, returns{ items, total, offset, limit }. Without the params, the endpoint still returns the legacy raw array. Eliminates the silent 1000-issue cap for long-running series. - Zod validation across cos-task / loops / cos-job / cos-learning routes. Replaces manual destructure-and-check with
safeParse+failValidationfor consistent 400 errors. - Pending sheet slot cleanup on character/universe delete. New
universeCharacterSheetSlot.jsmodule owns the_latestPendingByCharacterMap (extracted fromuniverseCharacterSheet.jsto avoid a require cycle) and exposesclearPendingSheetSlot(universeId, entryId)+clearPendingSheetSlotsForUniverse(universeId).updateUniversediffscur.charactersvs the merged record inside the write queue and drops slots for any character that disappeared; universe delete drops all slots for that universe. Closes the leak where an in-flight render whose character was deleted mid-flight could still stampreferenceSheetImageRefagainst a missing record. useRowDrafthook for multi-column row drafts. Row-level analogue ofuseFieldDraftinclient/src/hooks/. Preserves the sibling-draft "ride-along" race protection (drafts map merged into the commit payload so a fast A-blur → B-blur sequence doesn't lose column A when the parent hasn't re-rendered yet).ListRowinCharacterDetailEditor.jsxcollapses to a single hook call; covered by 9 vitest cases.- Module discovery infrastructure — barrels + catalogs. New
index.jsbarrels andREADME.mdcatalogs acrossserver/lib/,client/src/lib/,client/src/hooks/, andclient/src/services/enumerate ~80 reusable helpers so new code can grep the catalog before re-implementing (tryReadFile,atomicWrite,optionalBooleanMap,useLockToggle,formatBytes,copyToClipboard, etc.). New "Module Organization" section in CLAUDE.md codifies where new code lives, the discovery rule ("grep the catalog before writing a helper"), the maintenance rule ("every new public module re-exports from the barrel AND lists in the README"), and the namespace-export pattern for domain-prefixed name collisions.server/lib/index.test.js(and matching client tests) enforce the barrel/README contract so a forgotten entry fails boot.
Changed
/claimslash command now hard-requires an isolated worktree with absolute paths, a single-Bash-invocation flow, and apwdverification checkpoint — eliminates the failure mode where the claim branch was checked out in the main repo and blocked further parallel claims./claimslash command accepts--review-with=<copilot|codex|gemini|claude>to pick the post-PR reviewer. Defaultcopilotpreserves the existing/do:prCopilot loop;codex/gemini/claudeskip the Copilot loop and drive an iterative CLI-based review againstgh pr diffinstead (CLIs invoked the same way the PortOS AI Toolkit drives them —codex exec -,gemini -p,claude -p -).- Removed the CLAUDE.md "Worktrees" section that prohibited TUI worktrees; it conflicted with
/claim's explicit worktree requirement. atomicWritemigration. 10 services + 4 aiToolkit modules switched from inlineensureDir + writeFile + JSON.stringifyto theatomicWritehelper (toolkit gets a self-contained copy atserver/lib/aiToolkit/internal/atomicWrite.js). Prevents partial-write corruption on shared JSON state files.- Code-quality dedup batch. Eight
/simplifyfollow-up items shipped together: newtryReadFilehelper infileUtils.js(collapses thereadFile(...).catch(() => null)pattern at ~60 sites); newoptionalBooleanMapZod helper (3 sites); newassertProviderhelper inpromptRunner.js(7 sites); newuseLockToggleReact hook (4 sites in ArcCanvas + PipelineIssue); three moreresolveProviderAndModelmigrations (agentContentGenerator, agentPersonalityGenerator, loops); TUI text-accumulator skip inrunPromptThroughProvider(avoids hundreds of KB of screen-redraw concat per TUI run);loadProvidersJSON.parse rescue (renames<path>.corrupt.<ts>instead of crashing boot); newcreateProviderfield-parity test guarding the schema-vs-explicit-list regression noted in CLAUDE.md. - AI Toolkit runner: PortOS-aware
deleteRunoverride. Now stops the live child process before deleting the run on disk (closes a zombie-process leak when an in-flight CLI run was deleted via the UI). - Better-audit residue cleanups. Four bundled refactors: (1) Shared
formatTimecode/formatDurationSec/formatDateShortinclient/src/utils/formatters.js(migratedVideoTimelineEditor,VideoTimeline,ImportTaboff local copies). (2)feeds.jsnow sortsdata.itemson write (addFeed / refreshFeed / refreshAllFeeds), sogetItemsdrops its per-call sort;ensureItemsSortednormalizes legacy unsorted data once on first read with anisSortedNewestFirstguard so already-sorted state isn't re-saved on boot. (3) TypedServerErrorcodes replace brittleerr.messagestring-checks:voice/tts.jsthrowsUNKNOWN_VOICE(400); nine "AI Toolkit not initialized" throws inproviders.jsconsolidated into onerequireToolkit()helper throwingAI_TOOLKIT_NOT_INITIALIZED(503);visionTest.js's misleading "Provider not found" path swapped for an accurate "AI provider service is still initializing" message. (4) Named magic numbers acrosscos.js(RECENT_TASK_LIMIT= 50,MAX_PARALLEL= 4, etc.) — no behavior change, just self-documenting constants.
Fixed
- Shell-injection vector in
agentLifecycle.js:322. ReplacedexecSync(\git merge --ff-only origin/${defaultBranch}`, ...)with array-arg spawn-based git invocation (shell: false`). - CVEs in server dependencies.
basic-ftp5.3.0 → 6.0.1 (DoS via malicious FTP server, GHSA-rpmf-866q-6p89);protobufjspinned to 7.5.9 (code injection / prototype pollution); plus transitiveip-address,picomatch,postcsspatched viaoverrides. agentCliSpawning.jsstream handlers no longer crash the process. stdout + stderrasync (data)callbacks now wrap their bodies in try/catch (CLAUDE.md PTY/child-process rule). Stream-json output is batched viaappendAgentOutputLinesinstead of per-line state writes.toolStateMachine.executionsMap capped at 1000 (previously orphaned on crash because eviction only ran via the success-path 60s timer).- Voice LM Studio fetch calls now use
AbortSignal.timeout(5000). Prevents the voice pipeline from hanging when LM Studio accepts the TCP connection but stops responding mid-model-swap. exportByKind('series'|'universe', ids)now parallelizes exports viaPromise.all(was serialfor…of).agentTuiSpawning.js doneSentinelTimerno longer silently swallowsreadFileerrors; setInterval body wrapped in try/catch.server/routes/agents.jsvalidates:pidas a number before reachingkillProcess/getProcessInfo(Number.isNaNguard → 400).client/src/components/Layout.jsxsidebar refetch failures now log instead of being silently swallowed.- Accessibility: form labels in
VoiceTab,ProviderModelSelector,IconPicker,ImageGenTab,BackupTab,MortalLoomTab,BackupWidgetnow havehtmlFor/idpairing viauseId(); icon-only buttons inIconPickerandTaskAddFormusearia-label. ImageGenTabparallel-limit number input no longer snaps to default on every keystroke; draft string state, clamp on blur.- NAV_COMMANDS manifest registers
/city/settingsand/ambientso they are reachable from⌘Kand voice. loadProviders()corrupt-sample handling. Parses the shippedproviders.sample.jsonBEFORE persisting it as the liveproviders.json. Previously a corrupt sample combined with a corrupt user file would rename the sample to<sample>.corrupt.<ts>while leaving the freshly-written corrupt user file in place; next boot still saw the bad user file and the sample silently disappeared. NowparseOrRescueonly guards the user-side file — the only file whose corruption we want to quarantine.
Removed
- Series Bible "Visual style preset" + per-stage style override. The curated catalog (
server/lib/visualStyles.js: graphic-novel / cinematic / anime / etc.) and theseries.visualStyleDefault+issue.stages.*.visualStyleOverrideplumbing have been retired. Style now flows from a single source — the linked universe'sstylePromptplus the series-levelstylePromptOverridewith a newstylePromptOverrideModetoggle (prepend|append|override). TheVisualStylePickercomponent, the three stage-component pickers, the/api/pipeline/visual-stylesroute, andlistPipelineVisualStyles/updateIssueStageVisualStyleAPI helpers all gone. Migration026-remove-visual-style-fields.jsstrips the dead fields frompipeline-series.json+pipeline-issues.json.
Changed (continued)
- Series creation requires a universe in the UI. The
New Seriesform's universe picker is now required (submit disabled until one is picked); the bible's "Linked World" picker drops the— None —option. Server-side stays permissive so the importer / share-bucket sync can still land legacy orphan records — the UI is the gate, matching PortOS's single-user model.
Full Changelog
Full Diff: https://github.com/atomantic/PortOS/compare/v2.3.0...v2.4.0