Skip to content

Latest commit

 

History

History
167 lines (139 loc) · 16.9 KB

File metadata and controls

167 lines (139 loc) · 16.9 KB

PortOS — Completed Milestones

Archive of completed work. For active roadmap, see PLAN.md. For project goals, see GOALS.md.


2026-04-28

  • Better Audit follow-up — bugs/perf/test quality — Added AbortSignal.timeout to remaining fetch sites (aiDetect.js, meatspacePostLlm.js, memoryEmbeddings.js ×3, telegramBridge.js); fixed httpClient.js abort-listener leak via cleanup + { once: true }; fixed MessageDetail.jsx iframe load listener leak via { once: true }; parallelized feeds.js refresh with Promise.allSettled over fetchAndParseFeed; replaced vacuous usage.test.js typeof checks with real streak-calculation assertions; cosRunnerClient.test.js now uses .rejects.toThrow for capacity/spawn/kill/terminate paths; subAgentSpawner.test.js imports the real selectModelForTask instead of re-implementing it; added loops.test.js.
  • Ask Yourself — slice (b) — Voice (ui_ask) + per-turn promotions ("Save as Brain note" / "Create CoS task" / "Attach to Goal…") with auto-pin to survive 30-day expiry; palette whitelist for ⌘KAsk Yourself; ask-intent classifier gates the voice tool to RAG-shaped phrasing only; barge-in cancels upstream askService stream via AbortSignal. 17 new tests; suite 2785/2785 green.

2026-04-24

  • Global Command Palette (⌘K / Ctrl+K)client/src/components/CmdKSearch.jsx + server/lib/navManifest.js (single source of truth) + server/routes/palette.js (manifest + action dispatch). Shared backbone with voice agent's ui_navigate so navigation, palette, and voice all resolve through one map. See CLAUDE.md "Command Palette & Voice Nav" for the entry shape every new page must register.
  • Customizable Dashboard with Saved Layouts — Widget registry (client/src/components/dashboard/widgetRegistry.jsx, 15 widgets, 3 data-gated) + named layouts persisted to data/dashboard-layouts.json via GET/PUT/DELETE /api/dashboard/layouts. Built-in layouts: default / focus / morning-review / ops. Keyboard-accessible editor with reorder + add/delete + rename + save-as-new. Palette integration: ⌘K → any layout name switches instantly. See CLAUDE.md "Dashboard Widgets & Layouts" for the widget contract.
  • Ask Yourself — slice (a)/ask and /ask/:conversationId live. server/services/askService.js orchestrates parallel retrieval across memory (hybrid) + brain notes + autobiography + goals + calendar with kind-weighted reranking. Three modes (ask / advise / draft). API providers stream SSE; CLI providers single-shot. Conversations persist to data/ask-conversations/ with 30-day auto-expiry. 40 new tests; suite stayed green.
  • God file decompositionroutes/cos.js (28-line index + 6 modular route files), routes/scaffold.js, client/api.js (split into 19 focused api*.js modules), services/digital-twin.js (split into 10 focused modules), services/subAgentSpawner.js (slimmed from monolithic to 192 lines, logic extracted across helper modules).

2026-04-21

  • Better Audit remediation — security & overrides — Added root-package overrides for path-to-regexp (^8.4.2), lodash (^4.18.1), basic-ftp (^5.3.0), follow-redirects (^1.16.0), brace-expansion (^5.0.5), socket.io-parser (^4.2.6); upgraded react-router-dom to 7.5.2.
  • Better Audit remediation — code/DRY/bugspgQuoteIdentifier helper in routes/database.js; escapeJql in services/jira.js; atomicWrite extracted to lib/fileUtils.js; dataManager.js uses PATHS.data; brain.js setTimeout cleared on close/error; telegramClient.js polling retry with 5s backoff; clinvar.js 5-minute AbortSignal; loops.js floating promise caught + logged; systemHealth.js wrapped in asyncHandler; SIGTERM/SIGINT graceful shutdown in server/index.js; agents.test.js and socket.test.js rewritten against real exports; autofixer log statements gained emoji prefixes.
  • Test coveragecosRunnerClient.test.js (37 tests, 497 lines), agentActionExecutor.test.js (27 tests), CoS routes (170 tests across 6 test files, 83-100% route coverage).

2026-03-31

  • Depfree audit (heavy mode) — Removed 13 of 15 targeted packages (uuid, cors, axios, multer, unzipper, node-telegram-bot-api, supertest, geist, globals, fflate, react-markdown, react-diff-viewer-continued, react-hot-toast). ~1,100 lines of owned replacement code across 9 new files (server/lib/uuid.js, httpClient.js, multipart.js, zipStream.js, telegramClient.js, testHelper.js; client/src/components/ui/Toast.jsx; etc.). @dnd-kit/* and recharts deferred — replacement effort exceeds 300-line heavy-mode ceiling.

2026-03-20

  • Keyboard Shortcuts Help Modal — Press ? to show all keyboard shortcuts; global overlay with section grouping, accessible dialog

2026-03-18

  • Fixed PromptManager.jsx fetch calls — response.ok checks now present on all endpoints
  • Fixed memory.js sort comparison — now type-safe with NaN/Date.parse validation
  • Fixed silent catch in useTheme.js — now has console logging instead of swallowing errors
  • Fixed agentActionExecutor.js:137 — reformatted complex ternary for readability
  • Fixed memorySync.js rows[0] — added optional chaining with nullish coalescing fallback
  • Fixed db.js rows[0] — added optional chaining with empty object fallback
  • Resolved hardcoded localhost in lmStudioManager.js/memoryClassifier.js — server-side connections to local LM Studio with env var overrides, not a bug
  • Resolved empty .catch(() => {}) in client files — request() in api.js already shows toast.error() centrally; catches just prevent unhandled rejection warnings
  • Resolved silent catches in runner.js — intentional best-effort writes during error handling
  • Resolved Settings.jsx:366 catch — error toast already fires via centralized request() handler
  • DRY: Extended PATHS object with 15 new centralized path constants in fileUtils.js
  • DRY: Migrated 36 files from local __dirname/process.cwd() path definitions to centralized PATHS
  • DRY: Replaced 57 mkdir({recursive:true}) calls across 26 files with ensureDir()/ensureDirs()

Milestones

  • M0-M3: Bootstrap, app registry, PM2 integration, log viewer — Core infrastructure
  • M4: App Wizard — Register existing apps or create from templates. See App Wizard
  • M5: AI Providers — Multi-provider AI execution with headless Claude CLI
  • M6: Dev Tools — Command runner with history and execution tracking
  • M8: Prompt Manager — Customizable AI prompts with variables and stages. See Prompt Manager
  • M9: Streaming Import — Real-time websocket updates during app detection
  • M10: Enhanced DevTools — Provider/model selection, screenshots, git status, usage metrics
  • M11: AI Agents Page — Process detection and management with colorful UI
  • M12: History Improvements — Expandable entries with runtime/output capture
  • M13: Autofixer — Autonomous crash detection and repair. See Autofixer
  • M14: Chief of Staff — Autonomous agent manager with task orchestration. See Chief of Staff
  • M15: Error Handling — Graceful error handling with auto-fix. See Error Handling
  • M16: Memory System — Semantic memory with LLM classification. See Memory System
  • M17: PM2 Config Enhancement — Per-process port detection and CDP_PORT support
  • M18: PM2 Standardization — LLM-powered config refactoring
  • M19: CoS Agent Runner — Isolated PM2 process for agent spawning. See CoS Agent Runner
  • M20: AI Error Handling — Enhanced error extraction and CoS integration
  • M21: Usage Metrics — Comprehensive AI usage tracking and mobile UI
  • M22: Orphan Auto-Retry — Automatic retry for orphaned agents
  • M23: Self-Improvement — Automated UI/security/code analysis with Playwright
  • M24: Goal-Driven Mode — COS-GOALS.md mission file and always-working behavior
  • M25: Task Learning — Completion tracking and success rate analysis
  • M26: Scheduled Scripts — Cron-based automation with agent triggering
  • M27: CoS Capability Enhancements — Dependency updates, performance tracking, learning insights
  • M28: Weekly Digest UI — Visual digest with insights and comparisons
  • M29: App Improvement — Comprehensive analysis extended to managed apps
  • M30: Configurable Intervals — Per-task-type scheduling (daily, weekly, once, on-demand)
  • M31: LLM Memory Classification — Intelligent memory extraction with quality filtering
  • M32: Brain System — Second-brain capture and classification. See Brain System
  • M33: Soul System — Digital twin identity scaffold management. See Soul System
  • M34 P1-P2,P4: Digital Twin — Quantitative personality modeling and confidence scoring. See Digital Twin
  • M35: Chief of Staff Enhancement — Proactive autonomous agent with hybrid memory, missions, LM Studio, thinking levels. See CoS Enhancement
  • M35.1: CoS UI — Added Arcane Sigil (3D) avatar style option alongside Cyberpunk 3D
  • M36: Browser Management — CDP/Playwright browser page with status, controls, config, and logs
  • M37: Autonomous Jobs — Recurring scheduled jobs that the CoS executes proactively using digital twin identity
  • M38: Agent Tools — AI content generation, feed browsing, and autonomous engagement for Moltbook agents
  • M39: Agent-Centric Drill-Down — Redesigned Agents section with agent-first hierarchy, deep-linkable URLs, and scoped sub-tabs
  • M40: Agent Skill System — Task-type-specific prompts, context compaction, negative routing examples, deterministic workflow skills. See Agent Skills
  • M41: CyberCity Immersive Overhaul — Procedural synthwave audio, enhanced post-processing, reflective wet-street ground, settings system
  • M42 P1-P4: Unified Digital Twin Identity System — Identity orchestrator, chronotype derivation, personalized taste prompting, behavioral feedback loop, mortality-aware goal tracking, Identity Tab UI dashboard
  • M43: Moltworld Platform Support — Second platform integration for AI agents in a shared voxel world
  • M44 P1-P7: MeatSpace — Health tracker with death clock, LEV 2045 tracker, alcohol logging, blood/body/epigenetic/eye tracking, lifestyle questionnaire, TSV import, dashboard widget, compact grid overview, genome/epigenetic migration cleanup, Apple Health integration
  • M45: Data Backup & Recovery — Rsync-based incremental backup with SHA-256 manifests, PostgreSQL pg_dump, configurable cron schedule, restore with dry-run preview and selective subdirectory restore, Dashboard widget with health status
  • M46: Unified Search (Cmd+K) — Global search across brain, memory, history, agents, tasks, and apps
  • M48 P1-P10: Google Calendar Integration — MCP push sync, direct Google API via OAuth2, subcalendar management, goal-calendar linking, daily review, auto-configure via CDP, color-coded events, 15-min Day/Week views, Life Calendar consolidated under Calendar > Lifetime
  • M49 P1-P4: Life Goals — Enhanced goal model with todos, progress percentage, velocity tracking, projected completion, time tracking aggregates, AI phase planning, calendar time-blocking, automated weekly check-ins with status tracking
  • M50 P1-P7: Email Management — Outlook API+Playwright sync, AI triage with security hardening, draft generation, thread capture, per-action models, full Messages UI, Gmail API sync+send
  • M51: Memory System PostgreSQL Upgrade — PostgreSQL + pgvector backend with HNSW vector search, tsvector full-text search, federation sync, and pg_dump backup integration
  • M52: Update Detection — GitHub release polling with semver comparison, auto-check every 30 min, Socket.IO real-time notifications, Update tab UI with progress tracking, update executor with health polling
  • M53: POST (Power On Self Test) — Daily cognitive self-test with mental math drills (P1) and LLM-powered wit & memory drills (P2)
  • M54: MeatSpace Life Calendar — "4000 Weeks" mortality-aware time mapping with responsive grid, goal-activity linking, and time feasibility analysis
  • M55: POST Enhancement — Memory builder, imagination drills, training mode, 5-min balanced sessions, wordplay training (4 game modes). See POST
  • M56: Telegram Bot Integration — External notification channel via Telegram bot with conversational commands, goal check-in persistence
  • GSD Tab: Smart State Detection, One-Click Agent Spawn, Actionable Dashboard
  • Database Management: Native PostgreSQL mode (reuses system pg on port 5432), Docker/native switching UI, resource stats, sync/start/stop/destroy controls, per-backend backup buttons
  • Review Hub: Aggregated review page with alerts, CoS actions, todos, daily briefings, fullscreen toggle, markdown rendering
  • JIRA Sprint Manager: Autonomous JIRA triage and implementation as opt-in per-app scheduled task. See JIRA Sprint Manager
  • App Icons + Non-PM2 Support: App icon detection/display for iOS/macOS/Swift projects, non-PM2 app type management (Swift/Xcode)

Code Audits

See Security Audit for the 2025-02-19 security hardening (all 10 items resolved).

Audit Findings (2026-03-05) — Resolved

Items fixed from audit Passes 1-3 (PRs #67-72):

  • App status computation duplication (apps.js) — unified
  • TOCTOU race in addTask/updateTask/deleteTask — withStateLock mutex added
  • Fetch timeouts missing in cosRunnerClient.js — fetchWithTimeout added to all calls
  • Socket.IO infinite reconnection — capped to 10 attempts with error handler
  • Data race in memory.js loadMemory() — withMemoryLock applied
  • Duplicate getDateString — centralized in lib/fileUtils.js
  • Duplicate HOUR/DAY constants — centralized in lib/fileUtils.js
  • Missing fetch timeouts in moltworld/moltbook api.js — timeout-aware patterns added
  • ChiefOfStaff.jsx useState hooks — reduced from 24 to 19

Known low-severity: pm2 ReDoS (GHSA-x5gf-qvw8-r2rm) — no upstream fix, not exploitable via PortOS routes.


Documentation

Architecture & Guides

Feature Documentation