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

48.6 KB
Raw Blame

Release v2.29.0

Released: 2026-07-12

Highlights

  • See what your AI actually costs. The DevTools Usage page now covers every enabled provider — live Claude Code meters, real Codex session/weekly meters read from local telemetry, and honest "not available" notes for the rest — plus an Est. API Cost Report that answers "what would this usage have cost under API billing" for any window (7/30/90 days, all-time, or custom), broken down per provider and per model against a verified rate table. Local providers are tagged free. On-disk usage history is now rolled up from daily into monthly buckets so usage.json stays bounded.

  • A flaky local reviewer no longer strands your PRs. Any code reviewer can now be marked non-blocking (~opt): it still runs and its findings still get fixed, but an inconclusive verdict (a timeout / no-result from, say, a local Ollama model) is excluded from the merge gate. The Claude reviewer gained an optional model field (including an Ollama-backed Claude for local-only setups), Grok is now a selectable reviewer, and merges can be gated on arbitrary GitHub reviewer usernames. Bundled slashdo updated to 3.24.0.

  • Chief of Staff self-healing got smarter and more accountable. Task-learning success rates now decay via a recency window so a since-resolved failure burst stops nagging Layered Intelligence; recurring failures fold themselves into human-readable "Standing Learnings"; and investigation tasks use a plain-language "What happened / What to approve / What unblocks" template with PII redacted from the failure snippet. A new challenge protocol lets a sub-agent dispute a wrong reviewer rejection exactly once — auto-invoked from the review loop, resolvable by an automatic reviewer re-check or inline from the task card. Confidence auto-approval now always requires human sign-off for outward-facing or irreversible work.

  • A daily self-diagnostics job surfaces CoS self-healing failures into a single GitHub monitoring issue, and the CoS Schedule Timeline can expand each task track to edit its per-app overrides inline.

  • Layered Intelligence now judges a managed app on its OWN goals and performance rather than PortOS's agent telemetry, closes its feedback loop by learning from its own results, and no longer silently wedges when pinned to an API-only provider.

  • Media generation gains flexible output sizes. Image Gen (and the dashboard's Quick Image widget) now support arbitrary dimensions beyond the fixed presets, and image + video share one resolution control. Audio→MIDI transcription via MuScriptor adds a model-size picker, auto-installs its runtime on first use, prompts for HuggingFace access instead of dead-ending, and shows a distinct "Downloading model…" phase. HuggingFace and runtime/venv installs now also log to the server console.

  • Offline support. PortOS installs a service worker for offline app-shell loading and low-bandwidth caching — the modern replacement for the deprecated AppCache manifest — with its one cold-first-visit limitation documented as an accepted trade-off.

  • The Elements Song page gains a Flash Cards study mode for learning name↔symbol pairings before being tested.

  • Reliability & internals. Character Sheet name edits can no longer be reverted by a stale in-flight blur-save; Privacy broker case actions render from the server's state machine so the UI can't offer an illegal transition; and several duplicated child-process stream/discovery helpers and SSE job-slot hooks were consolidated into shared modules.

Changes

  • Bundled slashdo submodule updated to 3.24.0. Picks up the --review-with …~opt non-blocking-reviewer suffix used by the Code Review Defaults changes in this release, plus injection-safe untracked-file fingerprinting and gitignored-write detection in the ship path, and relative-Markdown-lib-link resolution for Agent Skills installs.

  • The DevTools Usage page now covers every enabled AI provider — subscription meters plus a "what would this have cost" report with time filters (#2484). The old Claude-only subscription panel becomes a per-provider grid: Claude Code keeps its live /usage meters, Codex gains real session/weekly meters read zero-cost from its local session telemetry (with plan type and reset times), and Antigravity/Grok show an honest "usage reporting not available" note instead of nothing. Below it, a new Est. API Cost Report answers "what would my subscription usage have cost under API billing" for any window — 7/30/90 days, all time, or a custom date range (URL-driven, so views are shareable) — broken down per provider and per model with input/output token counts and an aggregate total. Local providers (Ollama, LM Studio, and Ollama-backed CLI wrappers) are tagged "Local — free" and priced at $0. The flat legacy $3/$15 blended estimate is replaced by a real per-model rate table verified against the Anthropic/OpenAI/xAI/Google pricing pages (2026-07-12), with family fallbacks for shorthand model ids and a ~ marker on approximated rows; caching/batch discounts are deliberately excluded and disclosed. Usage capture now also records input tokens (estimated from prompt size) and attributes tokens per provider per model per day — the breakdown is forward-only from this upgrade, and the report says so.

  • Code reviewers can now be marked non-blocking, so a flaky local reviewer no longer strands your PRs. Each reviewer chip in the Code Review Defaults panel, the task form, and the per-task-type schedule config gains a ~opt toggle. A reviewer marked non-blocking still runs and still has its findings fixed, but its inconclusive verdict (timeout / no result / partial review) is excluded from the merge gate — it no longer flips the aggregate to inconclusive, so a saved --merge proceeds. A hard failure (broken build / failed tests) from it still blocks. This is the answer to a valuable-but-flaky reviewer like a local Ollama model that frequently returns no verdict and would otherwise block every auto-merge. Under the hood the setting is a new optionalReviewers list (additive, no migration) threaded through the CoS reviewer config into slashdo's new --review-with …~opt suffix (requires the bundled slashdo submodule bump in this release). GitHub @username reviewers can be marked non-blocking too.

  • The Claude reviewer now takes an optional model, including an Ollama-backed Claude for local-only setups (#2377). Code Review Defaults gains a Claude model field alongside the existing Codex one: pick a Claude tier, or — if you run claude pointed at a local Ollama daemon — type or pick one of your installed Ollama models, and the Review Loop invokes the reviewer as claude --model <id>. Under the hood the codex-only model threading is generalized into a reviewer-keyed model map, so any CLI reviewer that supports --model (today: Codex and Claude) threads its configured model through the review-loop follow-up with a single code path instead of a per-reviewer special case. Older in-flight review tasks that stored only the legacy Codex tier still work unchanged.

  • The MIDI transcription button now shows a distinct "Downloading model…" phase with a toast, instead of an opaque multi-minute spinner. MuScriptor auto-downloads its (gated, multi-hundred-MB) weights from HuggingFace on first use, but the sidecar reported that first-run download as the same generic load-model stage as a fast cached load — so the Transcribe MIDI / MIDI buttons just sat in an animation state with no explanation for minutes. transcribe_muscriptor.py now peeks at the HF hub cache and emits a separate download-model STAGE only when a download is actually about to happen; the shared useMidiTranscription hook maps it to a "Downloading model…" label (now exposed as a ready-to-render stageLabel both the Rounds and Music Video surfaces use — the Music Video button previously showed only a static "MIDI · Cancel" with no progress) and fires a one-time toast ("Downloading the MuScriptor model — first use only, this can take a few minutes.") when the download begins. Cache detection is best-effort — a wrong guess only mislabels the stage, never fails the transcription.

  • The offline service worker's cold-first-visit route gap is now a documented, accepted trade-off rather than an open question (#2424). A route visited only during the very first page load (before the SW registers at window.load) has an uncached chunk, so an offline reload of exactly that route boots the shell but can't render until the route is visited online once more. Fully closing this would require a build-time precache manifest (workbox / vite-plugin-pwa or an emitted asset-manifest) that precaches every build chunk upfront — which spends first-visit bandwidth on routes the user may never open, directly against this SW's low-bandwidth goal. For a single-user app the mitigation is a one-time online load per route, so the limitation is deliberately left in place; the reasoning is now recorded inline in client/public/sw.js so it doesn't dangle-point at a closed issue. No behavior change.

  • CoS task-learning success rates now decay via a recency window, so a since-resolved failure burst stops signaling Layered Intelligence that work is needed (#2460). The byTaskType counters in data/cos/learning.json are lifetime-cumulative and never age out — a provider misconfig or PTY-capture artifacts recorded as failures on a now-retired task type permanently depressed the success rate the LI reasoner reads via its cosMetrics source (default-on for PortOS), long after the root cause was fixed. Each task-type bucket now also carries a bounded recentOutcomes ring ({ t, s }, cap 50, mirroring the failureSignatures.recent precedent) that recordTaskCompletion appends to; a new pure computeWindowedStats derives a recentSuccessRate windowed by BOTH count and age (defaults: last 30 runs / 30 days, configurable), exposed via getWindowedStats(taskType, { maxCount, maxAgeMs }). The LI cosMetrics source now surfaces lifetime and windowed rates labeled distinctly, so a resolved failure burst self-heals without a manual resetTaskTypeLearning, while the lifetime counters stay intact for the dashboard/telemetry views. recentSuccessRate uses a null sentinel (never a fabricated 0%) when the window has no samples, so the reasoner falls back to the lifetime rate. Store version bumped 1→2 with an idempotent migration (188) that initializes an EMPTY ring per task type — deliberately not backfilled from failure-only history, which would fabricate an all-failure window.

  • The inline-claim task prompts now name grok as a local-CLI reviewer (#2453). After Grok became a selectable Review Loop reviewer, the four inline-claim prompt defaults (plan-task, claim-issue, claim-issue-gitlab, claim-issue-jira) still enumerated only `claude` / `codex` / `antigravity` in their per-kind reviewer-handling bullets, leaving grok un-categorized as a CLI reviewer when a user set it as their default. All seven bullet sites now list `grok` alongside the other coding-agent CLIs. Following the cross-install prompt-upgrade contract, each of the four task types gets a PROMPT_VERSIONS bump with the entire prior default preserved in PREVIOUS_DEFAULT_PROMPTS, so non-customized installs auto-upgrade; the integrity snapshot is regenerated. Text-only change.

  • Media-gen marker parsers converged onto createLineReader too (#2463, follow-up to #2392). The two remaining hand-copied per-chunk splitters — imageGen/local.js (stderr + stdout) and videoGen/local.js (stderr, plus a stdout '\n'-carry that never flushed the last line and decoded each chunk independently) — parsed STAGE:/STATUS:/DOWNLOAD: protocol markers with no carry buffer, so a marker or multibyte char split across a pipe chunk boundary could tear a progress event. Both services now route line parsing through server/lib/streamLines.js#createLineReader (StringDecoder-backed, carry across chunks, flush() on close), while the render-critical machinery is left exactly as-is: idle-stall + completion watchdogs still fire on the same signals (resetIdleStallTimer stays in the per-chunk data handler; the videoGen flush runs before the watchdog clears so a final result-JSON line can't re-arm a stray SIGKILL), the imageGen stderrBuffer error tail keeps accumulating raw chunk text, and the stdout JSON video_path/result capture is unchanged. Behavior-preserving; adds a chunk-boundary test proving a marker split across two chunks parses as one event.

  • CoS investigation tasks now use a human-facing "What happened / What to approve / What unblocks" template with a redacted failure snippet (#2442). When a CoS agent failure is classified as actionable, createInvestigationTask() filed a fixed 6-field stub (Failed Agent / Original Task / Error Category / Suggested Fix / Model) that read identically for every category, while the useful diagnostic context stayed buried in learning.json telemetry. The body is now restructured into three sections — What happened (plain-language category + provider/model attribution + a short captured failure snippet), What to approve (the concrete decision/action to take), and What unblocks (which original task resumes) — and each ERROR_PATTERN may optionally supply category-specific escalation prose so the note varies by failure kind (model-not-found, context-length, spawn-error, task-rejected, content-filtered, etc.) instead of being uniform. The folded-in snippet and task description are passed through a new redactFailureSnippet() helper that strips OS usernames from home paths, emails, IPs, Tailscale/mDNS hostnames, and bearer/secret tokens before anything lands in the human-facing (and potentially federated) task body. Additive copy/structure change to one function plus optional per-pattern fields — no status-model change.

  • A CoS sub-agent can now challenge a wrong reviewer rejection instead of silently fixing it or getting blocked (#2441). When a review-loop reviewer rejects work — common with noisy local/CLI reviewers — the task can be parked in a new challenged status with the worker's case attached (reason + optional evidence + which reviewer is disputed) via POST /api/cos/tasks/:id/challenge. Disputes are bounded to exactly one per task (a second is refused with 409 CHALLENGE_EXHAUSTED), so an agent can't loop forever. Resolving via POST /api/cos/tasks/:id/challenge/resolve either overturns the rejection (upheld → task re-queues to pending) or escalates the unresolved dispute to the single PortOS user (escalated → task blocked with a challenge-escalation reason AND an approval-required arbitration task filed into COS-TASKS.md) — surfacing a sustained disagreement rather than quietly fixing or blocking. The full challenge trio (case + resolution + count) rides task metadata, so it round-trips the TASKS.md store, is auditable in the CoS task UI, and federates + converges across sync peers: challenged is wired into the claim-aware merge rank (above in_progress, below the terminal states), the peer-sync wire status vocab, and a cosTasks schema bump (v1→v2) so an older peer gently pauses cos-task sync instead of choking on the unknown status. Partial slice of the Conductor↔CoS challenge protocol — the automatic reviewer re-check and the agent-side auto-invocation land in a follow-up.

  • The challenge protocol now auto-invokes from the review loop and can resolve by an automatic reviewer re-check (#2471, follow-up to #2470). The two deferred halves of the challenge slice land: (1) the review-loop follow-up prompt (agentPromptBuilder.js, both the compact and verbose paths) now teaches the CoS sub-agent the challenge protocol — when a reviewer raises a BLOCKING finding the agent has strong, specific evidence is a false positive, it disputes it exactly once via POST /api/cos/tasks/:id/challenge (threading in the disputed reviewer) instead of silently "fixing" it or accepting a false block, then re-checks and resolves; (2) POST /api/cos/tasks/:id/challenge/resolve now accepts a recheck: { backend, model?, diff } object as an alternative to a manual outcome — the resolver re-runs the disputed local-LLM reviewer (lmstudio/ollama) against the current diff and auto-derives the verdict from its fresh findings via a new pure classifyRecheckOutcome() helper (the ## Blocking section is the only merge-gating signal, so a surviving blocking finding sustains the rejection → escalated, and a clean/No findings./non-blocking result overturns it → upheld), so a cheap confirm/overturn pass runs before falling back to user escalation. The schema requires exactly one of outcome or recheck; an unreachable reviewer or unusable findings returns 502 RECHECK_FAILED rather than silently escalating. CLI reviewers (claude/codex) are re-run by the follow-up agent itself, which then resolves with an explicit outcome. Richer inline CoS-UI challenge/resolve controls and unifying the one-shot cap with MAX_TOTAL_SPAWNS remain deferred.

  • The dashboard's Quick Image widget now offers custom output dimensions and no longer shows a blank size dropdown for off-preset sizes (#2437). The quick widget had its own inline resolution <select> over the universal presets and never gained the Custom… option added to the full Image Gen page, so its size picker was inconsistent — and a remix/off-preset size (any width/height not on the preset list) rendered a blank dropdown because no matching <option> existed. It now reuses the shared ResolutionField control, so selecting Custom… reveals Width/Height inputs (any edge 64–3840px, total ≤ 8,294,400px, matching the server's imageEdgeSchema + pixel cap), and an off-preset size auto-opens those inputs with the exact dimensions visible instead of collapsing to a blank select. No behavior change to the presets themselves.

  • Duplicated child-process stream/discovery helpers converged into shared lib modules (#2392). Three hand-copied "split a stdout/stderr chunk stream into lines with a carry buffer" implementations (ytdlpAudioImport.js, videoDownload.js, hfDownload.js) had already drifted — only hfDownload's copy flushed the final unterminated line. They now share server/lib/streamLines.js#createLineReader(onLine, {splitRe?, maxCarry?}), which carries the partial trailing line across chunks, exposes a flush() for the last newline-less line (so the two yt-dlp paths stop dropping it — and skip the flush on cancel so a partial marker can't fire a stray progress frame), clamps the carry buffer against a newline-less runaway stream, and takes a splitRe: /[\r\n]+/ option for bare-\r torch/tqdm progress redraws. The four bare-\r progress-splitter siblings (midiRuntime.js, videoGen.js, music.js install-log routes, and pythonSetup.js#streamSpawn) are converged onto the same reader with that option, so a progress line split across a chunk boundary is no longer torn. Separately, the inline which/where PATH probes in ytdlp.js, ffmpeg.js (×2), pythonSetup.js, and voice bootstrap.js are replaced by a single whichFirst(name) in server/lib/processEnv.js (Malloc-stripped env, 5s timeout, first-line result). The vendored aiToolkit/providers.js copy is intentionally left alone (self-contained by design). Behavior-preserving; both new helpers are unit-tested.

  • Runtime/venv install SSE flows now log to the server console too, matching the HF model-download logging (#2432). The image/video/MuScriptor runtime installers (spawning setup-image-video.sh), the FLUX.2 venv bootstrap, and the local image-gen pip installer streamed multi-GB pip/git progress only to the browser via SSE — a headless / PM2 log had no record the install ever ran (the same gap startHfDownloadStream had already closed for HF model downloads). A new shared createInstallLogger chokepoint (server/lib/installLogger.js) now emits a single-line START, throttled heartbeats + stage milestones, and the OUTCOME (success/fail/cancel) with installer name, target, and elapsed time — without echoing every raw pip/bash line. Wired into all five install spawn sites in music.js, videoGen.js, imageGen.js (FLUX.2 venv + local pip install), and midiRuntime.js.

  • The four SSE job-slot hooks now share one implementation. useReferenceAudioImport, useYoutubeTrackImport, useVideoDownload, and useMidiTranscription each hand-rolled the same "kick off a job → stream SSE progress → settle on the terminal frame, with double-click and lost-connection recovery" machinery. That logic now lives in exactly one place — a new generic useSseJobSlot hook — and the four feature hooks are thin wrappers that pass their own kickoff/SSE/cancel calls plus per-feature toast copy (and, for MuScriptor, its runtime-install and gated-repo modals). Behavior-preserving refactor deferred from the MuScriptor /simplify pass (#2368); ~150 fewer lines.

  • Shell page quick-command buttons trimmed to the interactive tools. Dropped the four shell one-liner shortcuts (git status, git pull, npm test, npm run dev) that duplicated things you'd just type, renamed the antigravity button to its actual command agy, and added a grok button alongside the other coding-agent launchers.

  • Image and video generators now share one resolution control (#2436). The image (ImageGenControls) and video (VideoGen) size pickers had diverged into two separate "preset dropdown + custom W×H" implementations over the same helper tables — and VideoGen rendered its Width/Height inputs twice. Both now consume a single components/media/ResolutionField.jsx (preset <select> + a "Custom…" sentinel that reveals gated Width/Height inputs with a blur-clamp), and clampImageEdge in imageGenResolutions.js is generalized to accept { min, max, step } so video reuses it (clamping to 64–2048 and snapping to the multiple-of-64 grid the server floors to). The controls mirror their routes: the image edge inputs use step=1 (its route accepts any integer edge, so a hand-typed 705 no longer trips the form's native step validation), while video keeps step=64 and snaps on blur. Cleanup deferred from the custom-image-dimensions slice.

  • Recurring CoS agent failures now fold themselves into human-readable "Standing Learnings" the failure path writes automatically (#2443). CoS learnings previously fed only machinery (routing, cooldowns, skip-gating) — the one prose channel, recordLearningInsight, was invoked solely from a manual API route, so no incident ever became a readable operating note. Now, when a single error category recurs to a milestone (3, 10, 25, 50, 100 occurrences), recordTaskCompletion auto-records a provenance-stamped insight — timestamp, originating agent id, error category, task type, recurrence count, and provider/model attribution — built only from controlled fields (never the raw error message, so no path/PII leaks). Auto-flagged incidents are distinguished from user-authored notes (origin: 'auto-incident' vs 'user') and surfaced in a new collapsible Standing Learnings panel on the CoS Learning tab. All runtime-only (data/cos/learning.json) — nothing is committed to git or federated. Milestone matching is exact so each threshold fires once and escalates rather than spamming.

Fixes

  • Privacy broker case actions are now rendered from the server's state machine, so the UI can't offer an illegal transition. The drawer and the human-task digest strip used to decide which manual buttons to show from a hand-mirrored client map (MANUAL_DONE_ACTION) of the server's STATE_TRANSITIONS — a copy that could silently drift (the original bug: a "Mark submitted" button on blocked cases, where blocked → submitted is not a legal transition, so it always failed). Case payloads and digest items now carry a server-derived allowedTransitions list (computed from the same rules assertTransition enforces, folding in the any-state human_task_queued special case and excluding the rescan-only confirmed_removed/reappeared targets a human can't initiate). Both action strips render from a shared state → { target, label, tone } presentation table (CASE_ACTIONS, labels/tones stay UI concerns) filtered by that list, so an action whose target the server doesn't consider legal structurally cannot render.

  • Generated agent prompts (swarm, scheduled claim-work, other queued system tasks) no longer double-print their first line. A task queued through the CoS improvement/claim-work path is persisted to COS-TASKS.md by moving its full multi-line prompt into metadata.context and keeping only the first line as description (so the markdown stays one-line-per-task). Coming back out, context therefore led with a verbatim copy of description, and every prompt-render path emitted both — so a swarm run opened with the header twice (# ⚡ SWARM MODE …, then ### Context, then # ⚡ SWARM MODE … again, the whole body repeated). A new reconcileSplitContext step in agentPromptBuilder.js detects that exact split signature (context's first non-empty line equals description), folds the body back into description, and drops the redundant metadata.context — so the prompt renders once as one clean body with no spurious ### Context wrapper. A genuinely-separate user-supplied context (whose first line differs from the description) is left untouched, and the stored task keeps its one-line description for the task-list UI. Pure code fix — reaches every install on update, no data or prompt-template migration.

  • The CoS agent briefing no longer prints a redundant "Target Application" heading for the PortOS default app on the api-prompt path (#2430). The light/fallback prompt path already suppressed the target-app line for portos-default (the agent runs in the PortOS directory, so it adds nothing), but the editable cos-agent-briefing stage template still rendered the heading for any task carrying an app id. The template now gates the stock heading on a precomputed targetAppLabel (empty for the default app, the app id for managed apps) that agentPromptBuilder.js threads into the render context — mirroring buildTaskBlock's predicate — while leaving task.metadata.app in the context untouched for any custom template references. Ships as stage-prompt migration 187 (hash-matched, cross-synced with 010's accepted-hash chain) so unmodified installs auto-upgrade and customized copies are left alone.

  • Layered Intelligence's outcome feedback loop now reconciles the plan (PLAN.md) tracker too (#2435). After #2428 closed the loop for forge (gh/glab) and jira trackers, the plan tracker stayed excluded because readIssues mapped every [lil-*] PLAN.md item to state: 'open' regardless of its - [ ] / - [x] checkbox, so a completed proposal could never resolve. extractPlanSlugs now preserves each item's checkbox state — a checked - [x] reads closed (which deriveOutcome maps to merged) and an unchecked - [ ] (or a bare tag with no checkbox — absent ≠ done) reads open — so a checked item both reconciles as an outcome and falls out of the dedup window to become re-proposable, while open items stay suppressed as before. The outcomesTrackerSupported() gate now includes plan, so PLAN-tracked apps learn from their own merge rate like forge/jira apps.

  • Character Sheet name edits can no longer be reverted by a stale blur-save that fires while the prior save is still in flight (#2409). Committing a name change (Enter or blur) starts a PUT and immediately returns the header to its button view. If you reopened the editor before that PUT landed, the reopened input seeded from the pre-save name — and a subsequent blur could persist that stale value straight back over the change you just made. The name trigger now disables while a save is in flight (tracked via a nameSaving flag set before the PUT and cleared in finally) and startNameEdit refuses to reopen until the save settles, so exactly one write wins and no stale revert can slip through.

  • HuggingFace model downloads (Flux and every other image/video/music pull) now log to the server console. Triggering a base-model download showed a progress bar in the UI but left no trace in the server log — the entire download path emitted progress only over the SSE stream to the browser, and PortOS has no HTTP access logger, so a headless/PM2 log had no record the multi-GB fetch ever ran. The shared SSE driver (server/lib/sseDownload.js#startHfDownloadStream, the single chokepoint behind the image, video, and music download endpoints) now writes single-line, emoji-prefixed log lines for the start of each repo pull (⬇️, with a forced-re-fetch marker), each file as it streams, a cache hit that skips the download (📦), the outcome (✅ complete with byte count / ❌ failed with the error message), and client-disconnect cancellation (🛑) — while cancelled results are deliberately not logged as failures.

  • Audio → MIDI transcription now prompts for HuggingFace access instead of dead-ending on a gated-repo traceback. MuScriptor's model weights turned out to live in a gated HuggingFace repo (MuScriptor/muscriptor-*), so the first transcription on a fresh install — even right after the runtime auto-installs — 403'd with a raw GatedRepoError: Access to model … is restricted traceback the user couldn't act on. The MuScriptor sidecar now runs under the shared install_hf_error_handler (the same cause-chain walker the image/video runners use), so a gated download emits a structured USER_ERROR:gated_repo:<repo> marker; the server classifies that into a typed gated_repo SSE frame (carrying the repo id), and the client opens the same license-accept + token-paste prompt the gated image models use (reusing HfTokenBanner): accept the model's license, paste a HuggingFace read token, and the transcription you originally asked for re-runs automatically. Gated-error detection is now shared via isGatedRepoError/extractGatedRepo in server/lib/hfErrors.js (also adopted by the image runner's prose fallback).

  • Layered Intelligence no longer silently wedges when pinned to an API-only provider. After LI became an agent-backed scheduled task (#2322), its reasoning run needs a CLI/TUI coding provider (one with a file-writing harness to emit the .agent-done sentinel). Installs that carried an HTTP api provider (ollama / LM Studio) through migration 184 hit a dead end: every dispatch failed provider resolution before an agent registered, so nothing updated the task's status and it sat pending forever — silently blocking the app's whole improvement slot. Now the LI buildTaskInput hook detects an api-only provider up front and skips with an actionable reason (surfaced on the Intelligence tab: "pick a CLI/TUI provider — e.g. the Claude Ollama sample"), and, as a general safety net, any agent task that fails provider resolution with a permanent config error is blocked with a provider-config reason instead of re-failing on every dispatch.

Features

  • A challenged CoS task can now be upheld or escalated inline from the task card, and a challenge is bounded by the shared retry budget (#2471). Follow-up to #2470/#2472 (the challenge-protocol backbone + agent auto-invocation and reviewer re-check). When a sub-agent disputes a reviewer rejection and the task parks in challenged, the task card previously only showed the worker's case read-only — resolving it meant an out-of-band API call. Each unresolved challenge now carries inline Uphold (overturn the rejection → re-queue the work) and Escalate (let the rejection stand → block + file an arbitration task) controls that call POST /challenge/resolve and refresh in place; the buttons disable while a verdict is in flight and disappear once the challenge settles. Separately, the one-shot challenge cap is now unified with the shared MAX_TOTAL_SPAWNS retry budget: a task that has already burned its total-spawn budget is refused a challenge (409 CHALLENGE_BUDGET_EXHAUSTED) up front, since overturning it would only re-queue work that agentLifecycle's spawn gate immediately re-blocks — making the module's "a challenge shares the retry budget" promise real. No migration needed (metadata-only, read on demand).

  • CoS confidence auto-approval now has a safety-kind override, so outward-facing / irreversible work always needs human sign-off (#2440). Confidence auto-approval used to gate on ONE axis — a task type's historical success rate — so once a type crossed the threshold, any task of that type could auto-run, including inherently outward-facing work: publishing content that goes live, federating records to sync peers, opening external/upstream PRs, or releasing/deploying. A new safety-kind axis, orthogonal to confidence, classifies each generated task (server/services/taskLearning/safetyKind.js): outward-facing/irreversible kinds (content, publish, federation, external-pr) always require the user's approval regardless of how high the success rate is — a 100% score can't undo work that has already left the install — while reversible internal work (analysis, refactor, code-review, same-repo improvement PRs) keeps today's success-rate gate unchanged. Classification is driven by explicit task metadata (safetyKind / outwardFacing / capability flags) then conservative keyword signatures, defaulting to reversible so existing behavior is preserved unless a task carries an outward signal. The reason is surfaced on the task record (safetyKind + approvalReason) and in the approval log line, so the UI can show why a high-confidence task still needs review. Tunable via the new safetyKindApproval CoS config ({ enabled, alwaysApproveKinds }, default on) — additive optional key merged on read, no migration needed.

  • The CoS Schedule Timeline can now expand each task track to see and edit its per-app overrides inline. Which apps run a given scheduled task type (and each app's interval / agent-option / issue-author / swarm overrides) was previously only visible on the Schedule tab's per-task drawer — the Timeline showed the task cadence but not who it runs for. Every task track — both the pinned timeline rows and the unpinned rotation/on-demand tasks in the "Unpinned runner queue" — now carries a chevron that expands to the same PerAppOverrideList used on the Schedule tab (enable/disable per app, "Enable/Disable All", per-app interval and metadata), plus an enabled/total app-count badge (shown even at 0/N so "runs for none of my apps" is distinguishable from "no app scope") so an at-a-glance "3/5 apps" is visible without expanding. Edits save through the existing per-app override endpoints and refresh the timeline in place. System-job tracks (which are not per-app) show no expand toggle. The timeline graph node now forwards the appOverrides/enabledAppCount/totalAppCount plus the global taskMetadata/managedAgentOptions defaults that getScheduleStatus already computes; no migration needed (read-only surfacing of existing data).

  • Layered Intelligence now evaluates a managed app against its OWN goals and performance — not PortOS's agent telemetry. Running the loop on a managed app previously fed it the PortOS install's global autonomous-agent run stats (data/cos/learning.json) as the "CoS metrics" source — which is on by default for every app — so a managed-app run reasoned over PortOS's tooling performance instead of the app's own product performance. Two changes fix this: (1) a new App metrics (METRICS.md) telemetry source, on by default for every app, reads a repo-root METRICS.md from the app (same as GOALS.md/PLAN.md) — the place an app documents how it measures success (user-success KPIs, production telemetry, where its data lives, and read-only queries an agent can run); and (2) the CoS metrics source now defaults on only for the PortOS install (where the agent stats genuinely are its own-performance metric) and off for managed apps (where they're a tooling/interaction signal, still opt-in). The reasoning prompt is reframed around "how is THIS app performing against its own goals and purpose," and when a managed app exposes no own-performance metrics the loop is nudged to propose adding a METRICS.md as an app-data-gap. New standard documented in docs/METRICS.md; apps can also wire a custom cmd/http source to feed live numbers into each run. Back-compat: these are default changes only — any explicitly-stored source toggle is preserved, so no migration is needed.

  • Grok is now selectable as a Review Loop code reviewer. The reviewer picker (AI Providers → Code Review Defaults, plus the per-task task form and the per-task-type Schedule config) gains a Grok option alongside Claude, Codex, and Antigravity. Selecting it adds grok to slashdo's --review-with list, and the review-loop follow-up agent invokes the Grok Build CLI (grok) headless against the PR diff — the same CLI-reviewer path the other coding-agent reviewers use (it already routed any non-Copilot/non-local-LLM reviewer generically). New enum value grok in REVIEWER_VALUES (mirrored in the client REVIEWER_OPTIONS); no migration needed (absent from a stored list = not selected, and the default reviewer stays copilot).

  • Code Review Defaults can now gate merges on arbitrary GitHub reviewer usernames (e.g. @CodeReviewbot). The Review Loop was limited to a fixed set of reviewer kinds (Copilot, the Claude/Antigravity/Codex CLIs, and the local LM Studio/Ollama backends); there was no way to require a specific GitHub bot or teammate as a PR reviewer. The reviewer picker (AI Providers → Code Review Defaults, plus per-task in the task form and per-task-type in the Schedule config) grows a "GitHub reviewers (gate merge)" row where you type any GitHub username or org/team slug. Those usernames are appended to slashdo's --review-with as @user tokens after the keyed reviewers, and the review-loop follow-up agent is instructed to request each as a PR reviewer (gh pr edit … --add-reviewer), wait for their review, and treat their approval as a merge gate — end to end through the original-agent completion prompt, the follow-up loop, and the /do:next claim flow. Usernames are stored without the @, validated against a shell-safe GitHub-username charset (1–39 chars, alphanumeric/hyphen, optional /team), case-insensitively deduped, and capped at 20, so a hand-edited settings.json can't smuggle in an unsafe or oversized token. They're a distinct class from the behavior reviewers — external PR reviewers that gate the merge, not CLIs that apply fixes — so --reviewer-applies never turns on for a username-only addition, and a username reviewer is forge-agnostic (kept even when Copilot is stripped on a non-GitHub forge, and able to drive the loop on its own). New config key: settings.codeReview.usernames (+ per-task metadata.usernames); no migration needed (absent = none).

  • Image Gen now supports arbitrary (larger) output dimensions, not just the fixed preset list. The resolution dropdown gained a Custom… entry that reveals Width and Height number inputs, so sizes the presets never covered — e.g. 704×1280 (9:16 portrait) for Z-Image — no longer require adding a new preset. Any edge in 64–3840px is accepted as long as the total stays ≤ 8,294,400px (the same imageEdgeSchema + pixel cap the server already enforced); a below-minimum edge snaps up to 64 (on blur, and again at submit so an Enter-key submit can't slip a sub-64 value through), and an over-cap total shows an inline warning before you submit. Custom mode also auto-engages whenever the current size matches no preset (a remix, an uploaded init image, or a stale off-backend size), so the exact dimensions stay visible and editable instead of collapsing to a read-only "(custom)" label. The inputs live in the shared ImageGenControls, so the Image Gen page, Universe Builder batch render, and the pipeline image-gen drawers all get custom dimensions at once.

  • Layered Intelligence now learns from its own results — the feedback loop is closed (#2428). The LI reasoner used to file improvement proposals as tracker issues and then never read back whether they were merged, rejected, or abandoned, so it proposed in a vacuum (re-suggesting scopes with a 0% adoption rate). LI now records every filed proposal in a lightweight per-app outcome store (data/cos/li-outcomes/, a createCollectionStore collection with per-slug records and 30-day auto-GC), reconciles each proposal's outcome from the live tracker state on the next run (GitHub stateReason maps not-planned → rejected, any other close → merged; still-open stays unresolved), and folds a merge-rate report — totals, per-scope adoption, common rejection reasons — back into the reasoning prompt with guidance to prefer higher-merge scopes and justify low-merge ones. Gated behind a new Proposal outcomes telemetry source toggle in the per-app LI config (default on for the PortOS install, off for managed apps). No migration needed — the store is created on first use and existing LI behavior is unchanged when the toggle is off.

  • Audio → MIDI transcription now lets you pick the MuScriptor model size (small / medium / large) per request. The transcribe controls always ran the medium weights because the client never sent a size, even though the server route, Zod schema, and sidecar already accepted an optional model. Both trigger points — Transcribe MIDI on a Rounds reference audio and MIDI on a Music Video source track — now show a size selector next to the button. Larger tiers give higher-quality transcriptions but are slower and pull a bigger weight file on first use; medium stays the default so existing behavior is unchanged, and the chosen size is threaded straight into the existing transcribe-midi endpoints. The selector disables while a transcription is in flight.

  • Audio → MIDI transcription now installs its runtime automatically on first use. Clicking Transcribe MIDI (Rounds reference audio) or MIDI (Music Video source track) used to dead-end on a toast telling you to run INSTALL_MUSCRIPTOR=1 bash scripts/setup-image-video.sh in a terminal. Now, when the MuScriptor venv isn't provisioned yet, PortOS opens an in-app installer that streams the setup line-by-line — the same experience as the image and video model runtimes — and, on completion, automatically runs the transcription you originally asked for. A new GET /api/midi-runtime/install endpoint reuses the shared RuntimeInstallModal/SSE-install path (in-flight singleton, detached process group so a cancel kills pip/git children, post-install venv re-probe); useMidiTranscription catches the 503 MIDI_RUNTIME_MISSING kickoff, gates the modal, and retries once installed (with a loop guard so a genuinely-failed install surfaces its error instead of relooping).

  • PortOS now installs a service worker for offline app-shell loading and low-bandwidth caching — the modern replacement for the long-deprecated AppCache manifest. After the first online visit, the built app shell (index.html) and the content-hashed JS/CSS chunks are cached, so the UI loads instantly on repeat visits, keeps rendering when the server is briefly unreachable (flaky Tailnet links), and stops re-pulling megabytes of vendor JS on every navigation over a slow connection. Google Fonts and static public assets (icons, textures, manifest) are cached too. Real-time and large/dynamic routes — /api/*, /socket.io/*, and /data/* media — are never cached, so live data and streamed assets always hit the network (HTTP Range preserved for /data). Navigations stay network-first so a fresh build is always picked up when online, and the existing build-id / stale-chunk-reload machinery still handles "the server rebuilt while a tab was open." The worker registers only in a production secure context (HTTPS, or localhost) — it is a progressive enhancement that silently no-ops over a plain-HTTP Tailnet hostname and in the Vite dev server (where it also tears down any stale worker). Implemented as a hand-rolled worker (client/public/sw.js) with no new dependency; registration lives in client/src/lib/registerServiceWorker.js. The PWA manifest gained explicit id/scope for a deterministic installed-app identity.

  • A daily self-diagnostics job now surfaces CoS self-healing failures into a single GitHub monitoring issue (#2464). The Layered Intelligence loop can only improve if failures are actually observed, but a category quietly stuck failing (e.g. self-improve:claim-issue's claim-work at a ~30% failure rate, or layered-intelligence failing its first run) had no automated pulse — the numbers lived only in the Learning tab. A new deterministic type: 'script' autonomous job (job-self-diagnostics, scriptHandler: 'self-diagnostics', daily at 05:00, disabled by default) reads the task-learning per-category metrics (data/cos/learning.json byTaskType), and for every category with recorded failures records a structured single-line log entry (slug, failed/total, success rate, lastCompleted, avg/max duration) and aggregates them — ordered by impact (most failures first, then lowest success rate) — into ONE persistent GitHub summary issue. It reuses an existing open issue marked monitoring (matched by an embedded dedup slug marker) rather than filing a fresh duplicate each cycle, refreshes its body in place, and toggles a needs attention label on while failures exist / off once the categories recover. The issue read distinguishes a failed gh call (skip, don't file) from an empty list (ok:true), so a transient CLI blip can't defeat dedup. No LLM calls — a pure metrics-read + gh write, cold-bootstrap-safe and a sanctioned scheduled automation. The new default job self-installs on existing installs via the additive mergeWithDefaults boot merge (no migration needed).

  • The Elements Song page gains a Flash Cards study mode so you can learn name↔symbol pairings before being tested (#2480). The /post/memory/elements surface previously only tested element mappings (the Element Flash recall quiz) or let you browse the periodic table — a user who didn't already know the pairings had nowhere to learn them, unlike Morse (copy vs head-copy) and MemoryPractice (learn vs recall) which both have an explicit study→test split. A new Flash Cards mode draws the weakest-mastered elements first, shows one face (name, or symbol + atomic number) and flips to reveal the full pairing, then lets you self-rate Got It / Study Again. Study reps advance element mastery through the same submitMemoryPractice path the recall quiz uses (mode: 'element-study'), so studying counts toward the same per-element mastery the periodic-table heatmap shows. The elements page is also now reachable from ⌘K / voice nav (a new nav.post.memory.elements manifest entry) — it had no entry before. element-study is a standalone practice mode (like learn), not a POST-session drill type, so it's intentionally not offered in the balanced-session drill picker (the server has no session generator for it); no migration needed (additive enum value + label).

  • data/usage.json no longer grows without bound — old per-day activity is rolled up into monthly buckets at load time (#2485). Usage is rewritten in full on every AI run (recordSession/recordMessages), and dailyActivity accumulated one key per day forever, so the hot-path serialize+write grew linearly and would keep bloating as richer per-provider/per-model day buckets land. loadUsage() now runs a one-shot, idempotent rollup that moves day buckets older than 400 days (a full year-plus of per-day granularity, beyond any useful streak/report window) into a new monthlyActivity['YYYY-MM'] map, deep-summing their numeric fields so long-range totals stay accurate at monthly granularity — and shape-tolerant, so any nested per-provider/per-model token splits are preserved when collapsed. Recent days are left untouched (streaks, last-7-days, and top-level totals are unchanged), and monthlyActivity is backfilled for existing installs on first load with no migration script needed (pure additive, tolerant load-time transform). The buildUsageReport cost report (#2484) now folds the monthly buckets back in alongside the daily ones, so an all-time or long-range Est. API Cost report stays accurate across the rollup boundary (a rolled-up month is whole-month-granular and included whenever it overlaps the requested range). New exported rollupOldDailyActivity helper is unit-tested for the retention boundary, same-month summing, deep nested-shape summing, idempotency, and total-preservation across the boundary, plus report tests for monthly folding and range overlap.

Full Changelog

Full Diff: https://github.com/atomantic/PortOS/compare/v2.28.0...v2.29.0