@geekbeer/minion 2.68.3 → 2.68.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekbeer/minion",
3
- "version": "2.68.3",
3
+ "version": "2.68.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": {
@@ -69,7 +69,7 @@ function buildGracefulStopBlock(agentPort, apiToken) {
69
69
  return [
70
70
  ` try {`,
71
71
  ` Invoke-RestMethod -Uri 'http://localhost:${agentPort}/api/shutdown' -Method POST ` +
72
- `-Headers @{ Authorization = 'Bearer ${apiToken}' } -TimeoutSec 5 | Out-Null`,
72
+ `-ContentType 'application/json' -Headers @{ Authorization = 'Bearer ${apiToken}' } -TimeoutSec 5 | Out-Null`,
73
73
  ` Log 'Graceful shutdown requested, waiting for offline heartbeat...'`,
74
74
  ` Start-Sleep -Seconds 4`,
75
75
  ` } catch {`,
@@ -206,7 +206,7 @@ function Stop-MinionProcess {
206
206
  try {
207
207
  $headers = @{}
208
208
  if ($token) { $headers['Authorization'] = "Bearer $token" }
209
- Invoke-RestMethod -Uri "$AgentUrl/api/shutdown" -Method POST -Headers $headers -TimeoutSec 5 | Out-Null
209
+ Invoke-RestMethod -Uri "$AgentUrl/api/shutdown" -Method POST -ContentType 'application/json' -Headers $headers -TimeoutSec 5 | Out-Null
210
210
  Write-Host "Graceful shutdown requested, waiting..."
211
211
  Start-Sleep -Seconds 4
212
212
  } catch {
@@ -68,13 +68,11 @@ async function commandRoutes(fastify) {
68
68
  const [cmd, args] = allowedCommand.spawnArgs
69
69
  spawnLog(`[${command}] spawn: ${cmd} ${JSON.stringify(args)}`)
70
70
  try {
71
- // Capture PowerShell stderr to diagnose silent exit (code=0, 116ms)
72
71
  const stderrPath = path.join(os.homedir(), '.minion', `${command}-stderr.log`)
73
72
  const stderrFd = fs.openSync(stderrPath, 'w')
74
73
  const child = spawn(cmd, args, {
75
74
  detached: true,
76
75
  stdio: ['ignore', 'ignore', stderrFd],
77
- windowsHide: true,
78
76
  })
79
77
  child.on('error', (err) => {
80
78
  spawnLog(`[${command}] child error: ${err.message}`)