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: dedupe deploy flag allowlist into single source of truth

Adam Eivy7def4dba584b
diff --git a/server/lib/socketValidation.js b/server/lib/socketValidation.js
index 534f31e2b2..b881a345f7 100644
--- a/server/lib/socketValidation.js
+++ b/server/lib/socketValidation.js
@@ -59,10 +59,9 @@ export const appStandardizeSchema = z.object({
});
// app:deploy — app ID and optional flags for Xcode deploy
-// Must match VALID_FLAGS in appDeployer.js
-const ALLOWED_DEPLOY_FLAGS = ['--ios', '--macos', '--all', '--skip-tests'];
-const appDeployFlagSchema = z.enum(ALLOWED_DEPLOY_FLAGS, {
- errorMap: () => ({ message: `flag must be one of: ${ALLOWED_DEPLOY_FLAGS.join(', ')}` })
+import { DEPLOY_FLAGS } from '../services/appDeployer.js';
+const appDeployFlagSchema = z.enum(DEPLOY_FLAGS, {
+ errorMap: () => ({ message: `flag must be one of: ${DEPLOY_FLAGS.join(', ')}` })
});
export const appDeploySchema = z.object({
diff --git a/server/services/appDeployer.js b/server/services/appDeployer.js
index 8025a54723..e4bb218503 100644
--- a/server/services/appDeployer.js
+++ b/server/services/appDeployer.js
@@ -3,7 +3,8 @@ import { existsSync } from 'fs';
import { join } from 'path';
import { NON_PM2_TYPES } from './streamingDetect.js';
-const VALID_FLAGS = new Set(['--ios', '--macos', '--all', '--skip-tests']);
+export const DEPLOY_FLAGS = ['--ios', '--macos', '--all', '--skip-tests'];
+const VALID_FLAGS = new Set(DEPLOY_FLAGS);
const FLUSH_INTERVAL_MS = 80;
// Per-app lock to prevent concurrent deploys