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
feat: improve PortOS documentation
[._.]/ Adam Eivy8118eacee23e
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 1e239a2718..6e4322f2ce 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -9,6 +9,10 @@- **The favourite star on an image or video card is now reachable by keyboard.** The star sat inside the card's own click-to-preview button. A button nested in another button is invalid HTML with no defined behaviour, and here it left the star unreachable by keyboard and out of the tab order. The star and the badges are now siblings of the preview target rather than children of it, so the star is focusable and clicking it still favourites without also opening the preview. Three more controls with the same defect were fixed alongside it: the Plan/Execute/Verify button on a GSD phase row, the Dashboard link on a Chief-of-Staff GSD project card, and the tag filters on a SongBook entry — each was mouse-only, and each needed a click-suppressing workaround that is no longer necessary.- **A collection whose cover image is missing now shows the syncing placeholder instead of a broken image.** Collection covers were plain `<img>` tags, so a cover pointing at a pruned video thumbnail — or at a federated collection whose files haven't been pulled yet — left the browser's broken-image icon on the card. Covers now use the same component as the rest of the media UI: they fall back to a "Syncing" tile and swap in the real image the moment the file arrives from a peer.+## Documentation++- **Getting started now uses the standard install and production-start commands, with PostgreSQL called out as required.** The documentation catalog also has a product-surface map, making every major area of PortOS easier to find before you need its focused guide.+## Image Gen- **Agy and Grok can no longer hand back a picture they drew themselves.** When Antigravity's `generate_image` backend hit its quota (HTTP 429 "you have exhausted your capacity on this model"), agy did not fail the render — it took the instruction "save a PNG at this path" literally and wrote a script that drew a stand-in with a plotting library instead. The result was a real PNG, so it passed the signature check and landed in the gallery looking like a generated image: flat vector shapes, placeholder circles, overlapping labels, and the prompt's own pixel dimensions captioned into the artwork. Both cloud CLIs are now told that only the image tool may produce the image and that reporting a failure is the correct outcome when it can't; a scratch-directory check discards any render whose agent left a drawing script behind. The agy prompt also stopped naming exact pixel dimensions — `generate_image` only exposes an aspect ratio, so that was an instruction it could never satisfy, which is precisely what made reaching for code look reasonable.diff --git a/README.md b/README.mdindex 4b8f547d99..020fb8d523 100644--- a/README.md+++ b/README.md@@ -248,15 +248,22 @@ Track your biological self alongside your digital one.## Quick Start+### Requirements++- Node.js 18 or later+- Git+- PostgreSQL, either installed locally or available through Docker. PortOS requires a healthy database; the setup command provisions the supported local or Docker-backed instance.+```bash-git clone https://github.com/atomantic/PortOS.git+git clone --recurse-submodules https://github.com/atomantic/PortOS.gitcd PortOS-./setup.sh-pm2 start ecosystem.config.cjs-pm2 save+npm run install:all+npm start```-Access PortOS at `http://localhost:5555` (or via Tailscale at `http://<machine>.<tailnet>.ts.net:5555`).+`npm run install:all` installs the root, client, server, and Autofixer dependencies; initializes bundled submodules; prepares runtime data; and provisions PostgreSQL. `npm start` builds the client and starts the managed processes with PM2. Access PortOS at `http://localhost:5555` (or via Tailscale at `http://<machine>.<tailnet>.ts.net:5555`).++For a guided setup that also checks optional local media and command-line tooling, run `./setup.sh` instead. It prompts before starting PortOS; choose that option or run `npm start` afterward, not both.For HTTPS (recommended — required for the in-browser microphone, and you'll get a trusted cert via Tailscale's Let's Encrypt integration):@@ -363,6 +370,7 @@ Full catalog (including design plans, ADRs, and research notes): [docs/README.md### Feature Deep Dives+- [Product Surface Map](./docs/features/product-surfaces.md) — Browse every user-facing PortOS surface and its canonical guide- [Voice Mode](./docs/features/voice.md) — local STT/TTS/LLM voice assistant setup- [Chief of Staff](./docs/features/chief-of-staff.md) — Autonomous agent orchestrator- [Operational Goals](./docs/GOALS_OPERATIONAL.md) — Runtime priorities the CoS reads when generating workdiff --git a/docs/README.md b/docs/README.mdindex b5e5882659..23f545cf4d 100644--- a/docs/README.md+++ b/docs/README.md@@ -23,6 +23,8 @@ Index of everything under `docs/`. Start with the [root README](../README.md) fo## Feature deep dives (`features/`)+Start with the [product surface map](./features/product-surfaces.md) for a complete, user-facing inventory of the application. The focused guides below explain the features with their own operating contracts.+App management: [app-wizard](./features/app-wizard.md) · [autofixer](./features/autofixer.md) · [browser](./features/browser.md) · [error-handling](./features/error-handling.md) · [jira-sprint-manager](./features/jira-sprint-manager.md)Chief of Staff: [chief-of-staff](./features/chief-of-staff.md) · [cos-agent-runner](./features/cos-agent-runner.md) · [cos-enhancement](./features/cos-enhancement.md) · [agent-skills](./features/agent-skills.md) · [memory-system](./features/memory-system.md) · [claude-ollama](./features/claude-ollama.md) · [prompt-manager](./features/prompt-manager.md)diff --git a/docs/features/product-surfaces.md b/docs/features/product-surfaces.mdnew file mode 100644index 0000000000..3c310bf3d2--- /dev/null+++ b/docs/features/product-surfaces.md@@ -0,0 +1,48 @@+# PortOS Product Surface Map++PortOS is a local-first operating system for a developer's machines, work, and personal data. This map covers every major user-facing surface and points to the focused guide where one exists. It is an orientation guide, not an API reference; use [API.md](../API.md) for endpoints and [ARCHITECTURE.md](../ARCHITECTURE.md) for system design.++## Run and manage software++- **Dashboard, Apps, and Templates** — Register projects, inspect process health, launch or stop services, and scaffold a new app. See [App Wizard](./app-wizard.md).+- **Shell, processes, logs, and system health** — Work with terminal sessions, PM2 processes, action history, and host-level operational signals from the browser.+- **GitHub, JIRA, DataDog, Submodules, and Loops** — Bring project status, issue planning, observability, repository maintenance, and recurring work into DevTools. See [JIRA Sprint Manager](./jira-sprint-manager.md).+- **Browser control** — Connect a managed Chrome instance for automated or assisted browser work. See [Browser Management](./browser.md).+- **Settings, providers, local models, and usage** — Configure CLI/API/local AI providers, choose models, inspect quota and usage information, and manage local model runtimes.++## Delegate work to agents++- **Chief of Staff** — Submit work, schedule automations, monitor tasks, and review operational decisions. See [Chief of Staff](./chief-of-staff.md), [Agent Runner](./cos-agent-runner.md), [Agent Skills](./agent-skills.md), and [CoS Enhancement](./cos-enhancement.md).+- **Feature Agents, Review Hub, and workspace contexts** — Create durable agents for a feature area, collect approvals and alerts, and give agents the right repository context.+- **Prompt Manager, AI Runner, AI Runs, and AI Agents** — Configure reusable prompts; run a provider directly; and inspect active or past model work. See [Prompt Manager](./prompt-manager.md) and [Claude on Ollama](./claude-ollama.md).+- **Autofixer** — Detect and repair managed-process failures with controlled retries. See [Autofixer](./autofixer.md).++## Create stories, media, and music++- **Writers Room, Authors, and Story Builder** — Draft prose, manage works and versions, and develop a story through guided stages. See [Writers Room](./writers-room.md).+- **Universe Builder and Catalog** — Build a world bible, establish canon, and reuse its characters, places, objects, and lore throughout the Create suite.+- **Series Pipeline** — Plan a serial production, write and review issues, generate storyboards, and track editorial readiness.+- **Image, video, 3D, LoRA, and media libraries** — Generate or organize visual assets, models, collections, mood boards, timelines, and annotations. The [Sprite Export Contract](./sprite-export-contract.md) documents the game-sprite handoff; [CyberCity](./cybercity-v2.md) covers the 3D operational view.+- **Creative Director, Creative Commissions, and Music Video** — Turn a brief or track into a treatment, plan, renders, and reviewable media project.+- **Music, SongBook, Rounds, and Ambient** — Create and organize artists, albums, tracks, musical rounds, song references, and ambient sound work.+- **Importer and Sharing** — Convert an outside manuscript into a PortOS project and exchange supported creative records through configured share buckets.++## Capture knowledge and model yourself++- **Brain, rapid reader, insights, tribe, and timeline** — Capture, classify, link, search, and review personal knowledge. See [Brain System](./brain-system.md) and [Memory System](./memory-system.md).+- **Wiki and messages** — Maintain curated evergreen pages alongside messages, drafts, and external account sync. See [Messages Security Model](./messages-security.md) for the message trust boundary.+- **Digital Twin, Character, Ask Yourself, Goals, and Privacy** — Build an identity model, examine its derived view, converse with it, organize life goals, and manage personal-data workflows. See [Digital Twin](./digital-twin.md), [Identity System](./identity-system.md), and [Soul System](./soul-system.md).+- **Calendar, Meatspace, and POST** — Coordinate events and reviews, log real-world activity, and run daily cognitive practice. See [POST](./post.md).++## Connect and operate PortOS++- **Comms, OpenClaw, iMessage, Telegram, and social agents** — Receive, prepare, route, and supervise conversations with people and external agents. See [OpenClaw Operator Chat](./openclaw-operator-chat.md).+- **Voice Mode** — Use local speech-to-text, text-to-speech, and model-backed navigation or assistance. See [Voice Mode](./voice.md).+- **Instances, sharing, backups, and security** — Coordinate peer installations, synchronize selected records, protect data, and run on a private network. See [Backup & Restore](../BACKUP.md), [Storage](../STORAGE.md), [Ports](../PORTS.md), and the [security audit](../SECURITY_AUDIT.md).++## Find the right detail++- Use the [root README](../../README.md) for installation and the feature overview.+- Use [Troubleshooting](../TROUBLESHOOTING.md) when a local install, service, provider, or database is not working.+- Use [Contributing](../CONTRIBUTING.md) for development and test commands.+- Use [Operational Goals](../GOALS_OPERATIONAL.md) for the goals the Chief of Staff reads at runtime.diff --git a/server/lib/requestAbort.js b/server/lib/requestAbort.jsindex ef25dfd0f9..aa5e8fb3f7 100644--- a/server/lib/requestAbort.js+++ b/server/lib/requestAbort.js@@ -15,12 +15,16 @@//// The listener only calls `controller.abort()`, which can't throw — safe to attach// outside the request lifecycle without a try/catch.-// Combine several AbortSignals into one that fires when any of them aborts.-// Prefers the native `AbortSignal.any` (Node 20.3+ / 18.17+) and falls back to a-// manual fan-in for older Node 18 builds — PortOS's `package.json` engines accept-// Node 18, and `AbortSignal.any` is absent on the early-18 line. Mirrors the guard-// in `fetchWithTimeout.js`. The fallback's listeners are `{ once: true }` and self--// removing on first abort, so there's nothing to clean up.+/**+ * Combine the supplied live signals into one signal that aborts when any input does.+ *+ * Prefers native `AbortSignal.any` and preserves early Node 18 compatibility with a+ * one-shot fan-in fallback. The fallback listeners remove themselves on first abort.+ *+ * @param {(AbortSignal | null | undefined)[]} signals Signals to combine.+ * @returns {AbortSignal | undefined} The sole signal unchanged, a combined signal,+ * or `undefined` when no signal was supplied.+ */export function anyAbortSignal(signals) {const live = signals.filter(Boolean);if (live.length === 0) return undefined;@@ -39,6 +43,16 @@ export function anyAbortSignal(signals) {return controller.signal;}+/**+ * Create a cancellation signal for an Express response's unfinished disconnect.+ *+ * `res.close` also fires after a normal response, so the signal aborts only when+ * `writableEnded` is false. This lets streaming routes stop upstream work when a+ * browser cancels without treating successful response completion as a cancellation.+ *+ * @param {import('express').Response} res Express response associated with the work.+ * @returns {AbortSignal} A signal that aborts when the client disconnects early.+ */export function abortSignalFromResponse(res) {const controller = new AbortController();if (res?.writableEnded) return controller.signal; // finished normally — never a cancel