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
fix(windows): revert broken stdin pipe in Invoke-Logged, fix setup.ps1 EISDIR
[._.]/ Adam Eivy86659886f195
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 4a55d4a709..f7aaf68602 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -62,4 +62,5 @@- **Morse Send drill** no longer reveals the answer or competes with itself for spacebar input: the morse pattern under each prompt is gone (the reference tabs on the right are still available for hints), the global spacebar keying listener only attaches in Send mode (so it doesn't fire on the trainer landing page or during Copy drills), the side widget's "Practice Key" panel is hidden outside Send mode and no longer duplicates the live decoded letter, and the "Your sending" box starts blank with a "waiting for your first key…" hint instead of a misleading "—" placeholder.- **CoS agents now reliably open PRs and request Copilot reviews when configured.** Previously, when both `openPR` and `reviewLoop` were enabled on a task, the worktree-cleanup logic's gate (`taskOpenPR && !taskReviewLoop`) skipped PR creation — falling through to auto-merge the agent's branch into main with no PR, no review, and contradictory wording in the agent prompt about whether it should open the PR itself. The cleanup now always opens the PR when `openPR` is set; when `reviewLoop` is also set, it requests a Copilot review on the new PR via the new `git.requestCopilotReview()` helper. The agent prompt is updated to consistently tell the agent the system handles PR creation and review requests.-- **`update.ps1` no longer hangs at "Running setup…" when Docker is unavailable.** `Invoke-Logged` now pipes empty stdin to all child processes so Node scripts detect non-TTY context correctly. `setup-db.js` no longer shows an invisible interactive prompt (stdout was redirected to the log file) and no longer silently rewrites `PGMODE=file` in `.env` — instead it logs a warning to stderr and exits 0 so the update continues.+- **`update.ps1` no longer hangs at "Running setup…" when Docker is unavailable.** `setup-db.js` checks `!process.stdout.isTTY` (stdout is redirected to the log file by `Invoke-Logged`) in addition to stdin, so the interactive storage-mode prompt is skipped — it logs a warning to stderr and exits 0 instead of hanging for input or silently rewriting `PGMODE=file` in `.env`.+- **`setup.ps1` no longer fails with `EISDIR` on Windows.** Replaced the `npm run setup` call (which uses `npm install --prefix client/server/autofixer`) with individual `Push-Location`/`Pop-Location` installs. `npm install --prefix <subdir>` from the root causes npm to symlink the root `portos` package into each sub-package's `node_modules` as a directory symlink, which requires Developer Mode or admin rights on Windows. Also adds the previously missing steps: git submodule update, autofixer install, esbuild rebuild, and node-pty rebuild.diff --git a/setup.ps1 b/setup.ps1index 9a407c65bf..a64b9616c5 100644--- a/setup.ps1+++ b/setup.ps1@@ -1,6 +1,9 @@# PortOS Setup Script for Windows PowerShell$ErrorActionPreference = "Stop"+$RootDir = Split-Path -Parent $MyInvocation.MyCommand.Path+Set-Location $RootDir+Write-Host "===================================" -ForegroundColor CyanWrite-Host " PortOS Setup" -ForegroundColor CyanWrite-Host "===================================" -ForegroundColor Cyan@@ -22,9 +25,17 @@ if ($majorVersion -lt 18) {exit 1}Write-Host "Found Node.js v$nodeVersion" -ForegroundColor Green+Write-Host ""-# Install dependencies+# Update submodules (slash-do and any others)+Write-Host "Updating submodules..." -ForegroundColor Yellow+git submodule update --init --recursive+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }Write-Host ""++# Install dependencies — use Push-Location instead of --prefix so npm doesn't+# create a directory symlink (root package into sub-package node_modules), which+# requires Developer Mode or admin rights on Windows.Write-Host "Installing dependencies..." -ForegroundColor YellowWrite-Host " Installing root dependencies..."@@ -43,15 +54,34 @@ npm installif ($LASTEXITCODE -ne 0) { Pop-Location; exit $LASTEXITCODE }Pop-Location-# Run setup scripts+Write-Host " Installing autofixer dependencies..."+Push-Location autofixer+npm install+if ($LASTEXITCODE -ne 0) { Pop-Location; exit $LASTEXITCODE }+Pop-Location++# Rebuild native bindingsWrite-Host ""-Write-Host "Setting up data directory..." -ForegroundColor Yellow-npm run setup+Write-Host "Rebuilding esbuild & node-pty..." -ForegroundColor Yellow+node client/node_modules/esbuild/install.js+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+node server/node_modules/esbuild/install.js+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+npm rebuild node-pty --prefix serverif ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+# Run data setup scriptsWrite-Host ""+Write-Host "Setting up data directory..." -ForegroundColor Yellow+node scripts/setup-data.js+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+node scripts/setup-db.js+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+node scripts/setup-browser.js+if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }# Optional Ghostty setup+Write-Host ""$setupGhostty = Read-Host "Set up Ghostty terminal themes? (y/N)"if ($setupGhostty -match '^[Yy]$') {node scripts/setup-ghostty.jsdiff --git a/update.ps1 b/update.ps1index fdbc252b70..751a3c72e8 100644--- a/update.ps1+++ b/update.ps1@@ -63,7 +63,7 @@ function Invoke-Logged {$cmd = $CmdArgs[0]$args = @()if ($CmdArgs.Count -gt 1) { $args = $CmdArgs[1..($CmdArgs.Count - 1)] }- "" | & $cmd @args >> $UpdateLog 2>&1+ & $cmd @args >> $UpdateLog 2>&1}Write-SafeHost "===================================" -ForegroundColor Cyan