@yeaft/webchat-agent 0.0.56 → 0.0.57

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/connection.js CHANGED
@@ -475,6 +475,13 @@ async function handleMessage(msg) {
475
475
  '#!/bin/bash',
476
476
  `PID=${pid}`,
477
477
  `PKG="${pkgName}@latest"`,
478
+ `LOGFILE="${join(configDir, 'logs', 'upgrade.log')}"`,
479
+ `export PATH="${process.env.PATH}"`,
480
+ '',
481
+ '# Redirect all output to log file',
482
+ 'exec > "$LOGFILE" 2>&1',
483
+ 'echo "[Upgrade] Started at $(date)"',
484
+ '',
478
485
  ...(cwd ? [`INSTALL_DIR="${cwd}"`] : []),
479
486
  '',
480
487
  '# Wait for current process to exit',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/service.js CHANGED
@@ -164,6 +164,7 @@ ExecStart=${nodePath} ${cliPath}
164
164
  WorkingDirectory=${config.workDir || homedir()}
165
165
  Restart=on-failure
166
166
  RestartSec=10
167
+ KillMode=process
167
168
  ${envLines.join('\n')}
168
169
  Environment=PATH=${nodeBinDir}:${homedir()}/.local/bin:${homedir()}/.npm-global/bin:/usr/local/bin:/usr/bin:/bin
169
170