sensorium-mcp 3.0.16 → 3.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Install-Sensorium.ps1 +16 -3
- package/package.json +1 -1
package/Install-Sensorium.ps1
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
#>
|
|
27
27
|
param(
|
|
28
28
|
[string]$SecureVaultProfile,
|
|
29
|
-
[ValidateSet("production", "development"
|
|
29
|
+
[ValidateSet("production", "development")]
|
|
30
30
|
[string]$UpdateMode,
|
|
31
31
|
[string]$MCPStartCommand
|
|
32
32
|
)
|
|
@@ -88,6 +88,13 @@ $SecureVaultProfile = $Config["SecureVaultProfile"]
|
|
|
88
88
|
$UpdateMode = $Config["UpdateMode"]
|
|
89
89
|
$EffectiveMCPStartCommand = $Config["MCPStartCommand"]
|
|
90
90
|
|
|
91
|
+
# Validate config values
|
|
92
|
+
if ($UpdateMode -notin @("production", "development")) {
|
|
93
|
+
Write-Host "[WARN] Invalid UpdateMode '$UpdateMode' in config — falling back to 'production'" -ForegroundColor Yellow
|
|
94
|
+
$UpdateMode = "production"
|
|
95
|
+
$Config["UpdateMode"] = "production"
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
# Persist (so next run picks up any overrides)
|
|
92
99
|
Save-Config $Config
|
|
93
100
|
|
|
@@ -214,11 +221,17 @@ function Get-BinaryAsset {
|
|
|
214
221
|
function Install-StartupLauncher {
|
|
215
222
|
# Copy this script to bin/ so startup doesn't depend on repo checkout
|
|
216
223
|
$installedScript = Join-Path $BinDir "Install-Sensorium.ps1"
|
|
217
|
-
|
|
224
|
+
if ($PSCommandPath -ne $installedScript) {
|
|
225
|
+
Copy-Item $PSCommandPath $installedScript -Force
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
# Resolve the full path to pwsh at install time (we know it exists — we're running in it)
|
|
229
|
+
$pwshPath = (Get-Command pwsh -ErrorAction SilentlyContinue)?.Source
|
|
230
|
+
if (-not $pwshPath) { $pwshPath = "pwsh" }
|
|
218
231
|
|
|
219
232
|
$launcherContent = @(
|
|
220
233
|
"@echo off",
|
|
221
|
-
"
|
|
234
|
+
"`"$pwshPath`" -NoProfile -File `"$installedScript`""
|
|
222
235
|
) -join [Environment]::NewLine
|
|
223
236
|
|
|
224
237
|
Set-Content -LiteralPath $StartupLauncher -Value $launcherContent -Encoding ASCII
|