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

address review: pwsh fallback to powershell + use isRecoveryTask helper

Adam Eivye0da8f158aea
diff --git a/server/services/cos.js b/server/services/cos.js
index 4675a8a5e6..11f2f634b2 100644
--- a/server/services/cos.js
+++ b/server/services/cos.js
@@ -31,6 +31,7 @@ import { ensureDir, formatDuration, safeJSONParse, PATHS } from '../lib/fileUtil
import { sanitizeTaskMetadata, PIPELINE_BEHAVIOR_FLAGS, MAX_TOTAL_SPAWNS } from '../lib/validation.js';
import { addNotification, NOTIFICATION_TYPES } from './notifications.js';
import { recordDecision, DECISION_TYPES } from './decisionLog.js';
+import { isRecoveryTask } from './recoveryTasks.js';
import { getUserTimezone, getLocalParts, nextLocalTime, todayInTimezone } from '../lib/timezone.js';
import { PORTOS_UI_URL } from '../lib/ports.js';
@@ -981,7 +982,7 @@ async function queueEligibleImprovementTasks(state, cosTaskData) {
existingTaskTypes.add(appId ? `app:${appId}:${analysisType}` : analysisType);
}
}
- if (isActive && task.metadata?.app && !task.metadata?.isRecovery) {
+ if (isActive && task.metadata?.app && !isRecoveryTask(task)) {
appsWithPendingImprovement.add(task.metadata.app);
}
}
diff --git a/server/services/voice/bootstrap.js b/server/services/voice/bootstrap.js
index d853c7ff22..23f243aae3 100644
--- a/server/services/voice/bootstrap.js
+++ b/server/services/voice/bootstrap.js
@@ -69,9 +69,18 @@ export const runSetupScript = async (cfg) => {
console.log(`🔧 voice: setup-voice (stt=${sttEngine}/${modelName}, tts=${cfg.tts.engine}, coreml=${env.INSTALL_COREML})`);
// 10-minute cap — large models + slow network can legitimately take several
// minutes, but a hung curl must not pin the HTTP request that triggered us.
- const [cmd, args] = IS_WIN
- ? ['pwsh', ['-ExecutionPolicy', 'Bypass', '-File', 'scripts\\setup-voice.ps1']]
- : ['bash', ['scripts/setup-voice.sh']];
+ // On Windows prefer pwsh (PowerShell 7+) but fall back to the always-present
+ // Windows PowerShell when pwsh isn't installed.
+ let cmd;
+ let args;
+ if (IS_WIN) {
+ const psBin = (await which('pwsh')) ? 'pwsh' : 'powershell';
+ cmd = psBin;
+ args = ['-ExecutionPolicy', 'Bypass', '-File', 'scripts\\setup-voice.ps1'];
+ } else {
+ cmd = 'bash';
+ args = ['scripts/setup-voice.sh'];
+ }
const { stdout, stderr } = await pexec(cmd, args, {
cwd: PATHS.root,
env,