@geekbeer/minion 3.6.2 → 3.6.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/win/minion-cli.ps1 +17 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekbeer/minion",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "AI Agent runtime for Minion - manages status and skill deployment on VPS",
5
5
  "main": "linux/server.js",
6
6
  "bin": {
@@ -903,7 +903,15 @@ function Invoke-Setup {
903
903
  Invoke-Nssm remove minion-cloudflared confirm
904
904
  $cfConfigDir = Join-Path $TargetUserProfile '.cloudflared'
905
905
  $cfConfigPath = Join-Path $cfConfigDir 'config.yml'
906
- Invoke-Nssm install minion-cloudflared $cfExe "tunnel run --config `"$cfConfigPath`""
906
+ Invoke-Nssm install minion-cloudflared $cfExe
907
+ Invoke-Nssm set minion-cloudflared AppParameters "tunnel run --config `"$cfConfigPath`""
908
+ # Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
909
+ # (NSSM runs as LocalSystem, whose ~ is C:\Windows\system32\config\systemprofile)
910
+ $cfEnvLines = @(
911
+ "USERPROFILE=$TargetUserProfile",
912
+ "HOME=$TargetUserProfile"
913
+ )
914
+ Invoke-Nssm set minion-cloudflared AppEnvironmentExtra ($cfEnvLines -join "`n")
907
915
  Invoke-Nssm set minion-cloudflared Start SERVICE_DEMAND_START
908
916
  Invoke-Nssm set minion-cloudflared DisplayName "Minion Cloudflared"
909
917
  Invoke-Nssm set minion-cloudflared Description "Cloudflare Tunnel for Minion"
@@ -1367,7 +1375,14 @@ function Invoke-Configure {
1367
1375
  $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
1368
1376
  if ($isAdmin) {
1369
1377
  $cfConfigPath = Join-Path $cfConfigDir 'config.yml'
1370
- Invoke-Nssm install minion-cloudflared $cfExe "tunnel run --config `"$cfConfigPath`""
1378
+ Invoke-Nssm install minion-cloudflared $cfExe
1379
+ Invoke-Nssm set minion-cloudflared AppParameters "tunnel run --config `"$cfConfigPath`""
1380
+ # Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
1381
+ $cfEnvLines = @(
1382
+ "USERPROFILE=$TargetUserProfile",
1383
+ "HOME=$TargetUserProfile"
1384
+ )
1385
+ Invoke-Nssm set minion-cloudflared AppEnvironmentExtra ($cfEnvLines -join "`n")
1371
1386
  Invoke-Nssm set minion-cloudflared Start SERVICE_AUTO_START
1372
1387
  Invoke-Nssm set minion-cloudflared DisplayName "Minion Cloudflared"
1373
1388
  Invoke-Nssm set minion-cloudflared Description "Cloudflare Tunnel for Minion"