Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix: make modular shell ownership explicit

Rahman94a17b483d76
diff --git a/scripts/cli/commands-admin.sh b/scripts/cli/commands-admin.sh
index 0753e49d..69bef4ec 100755
--- a/scripts/cli/commands-admin.sh
+++ b/scripts/cli/commands-admin.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
# Devices, OAuth/MCP/audit, service/update, CRUD and escape-hatch commands.
+# Usage variables are defined by scripts/cli/commands.sh before this sourced handler runs.
+# shellcheck disable=SC2154
mso_cmd_admin() {
local cmd="$1"; shift || true
case "$cmd" in
diff --git a/scripts/cli/commands-host.sh b/scripts/cli/commands-host.sh
index 27c4c7aa..be6840f5 100755
--- a/scripts/cli/commands-host.sh
+++ b/scripts/cli/commands-host.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
# Files, host inspection, health and doctor commands.
+# Usage variables are defined by scripts/cli/commands.sh before this sourced handler runs.
+# shellcheck disable=SC2154
mso_cmd_host() {
local cmd="$1"; shift || true
case "$cmd" in
diff --git a/scripts/cli/commands-runtime.sh b/scripts/cli/commands-runtime.sh
index 71cdc19a..a4fd439d 100755
--- a/scripts/cli/commands-runtime.sh
+++ b/scripts/cli/commands-runtime.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
# Agent/provider/gateway/browser/managed-app/terminal commands.
+# Usage variables are defined by scripts/cli/commands.sh before this sourced handler runs.
+# shellcheck disable=SC2154
mso_cmd_runtime() {
local cmd="$1"; shift || true
case "$cmd" in
diff --git a/scripts/cli/commands-state.sh b/scripts/cli/commands-state.sh
index 001348e8..d8eb4b0d 100755
--- a/scripts/cli/commands-state.sh
+++ b/scripts/cli/commands-state.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
# Assistant, sessions, A2A, memory/config/skills state commands.
+# Usage variables are defined by scripts/cli/commands.sh before this sourced handler runs.
+# shellcheck disable=SC2154
mso_cmd_state() {
local cmd="$1"; shift || true
case "$cmd" in
diff --git a/scripts/install-core.sh b/scripts/install-core.sh
index a05d0b21..5793bca3 100755
--- a/scripts/install-core.sh
+++ b/scripts/install-core.sh
@@ -65,7 +65,11 @@ die() { printf '%s✗%s %s\n' "$C_ERR" "$C_RST" "$*" >&2; exit 1; }
# this complete file first. This phase-only ERR trap handles genuine runtime
# failures without echoing commands that may contain credentials.
INSTALL_PHASE=arguments
-trap 'rc=$?; printf "%s✗%s mso installer failed during %s (line %s, exit %s)\n" "$C_ERR" "$C_RST" "$INSTALL_PHASE" "$LINENO" "$rc" >&2' ERR
+install_error_trap() {
+ local rc=$?
+ printf "%s✗%s mso installer failed during %s (line %s, exit %s)\n" "$C_ERR" "$C_RST" "$INSTALL_PHASE" "$LINENO" "$rc" >&2
+}
+trap install_error_trap ERR
usage() {
cat <<EOF
diff --git a/scripts/install.sh b/scripts/install.sh
index 816526ea..eba1204a 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -12,7 +12,7 @@ set -Eeuo pipefail
umask 077
CORE_URL="${MSO_INSTALL_CORE_URL:-https://raw.githubusercontent.com/rahmanef63/mso/main/scripts/install-core.sh}"
-CORE_SHA256="09fc92677ad4082102f867717aa00774466920320d4958bc94384c69562bcb31"
+CORE_SHA256="31a50e9b8306c5c4f056cc9b351627b8368ef437440c6154bc2544b235908d7b"
CORE_EOF='# MSO_INSTALLER_CORE_EOF'
TMP_INSTALLER=''