traderclaw-cli 1.0.124 → 1.0.126

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.
@@ -5,7 +5,7 @@ import { homedir, tmpdir } from "os";
5
5
  import { basename, dirname, join } from "path";
6
6
  import { resolvePluginPackageRoot } from "./resolve-plugin-root.mjs";
7
7
  import { choosePreferredProviderModel } from "./llm-model-preference.mjs";
8
- import { getLinuxGatewayPersistenceSnapshot } from "./gateway-persistence-linux.mjs";
8
+ import { getLinuxGatewayPersistenceSnapshot, isLinuxGatewayPersistenceEligible } from "./gateway-persistence-linux.mjs";
9
9
 
10
10
  const CONFIG_DIR = join(homedir(), ".openclaw");
11
11
  const CONFIG_FILE = join(CONFIG_DIR, "openclaw.json");
@@ -2481,6 +2481,17 @@ export class InstallerStepEngine {
2481
2481
  this.state.autoRecovery.backupPath = backupPath;
2482
2482
  this.emitLog(stepId, "warn", `Auto-recovery: applied ${changed.join(", ")} with backup at ${backupPath}`);
2483
2483
 
2484
+ if (isLinuxGatewayPersistenceEligible()) {
2485
+ const lingerSnap = getLinuxGatewayPersistenceSnapshot();
2486
+ if (lingerSnap.linger !== true) {
2487
+ try {
2488
+ await this.runWithPrivilegeGuidance(stepId, "sudo", ["loginctl", "enable-linger", lingerSnap.username]);
2489
+ } catch {
2490
+ // best effort; gateway install may still surface a clearer error
2491
+ }
2492
+ }
2493
+ }
2494
+
2484
2495
  try {
2485
2496
  await this.runWithPrivilegeGuidance(stepId, "openclaw", ["gateway", "stop"]);
2486
2497
  } catch {
@@ -2835,6 +2846,23 @@ export class InstallerStepEngine {
2835
2846
  ensureGatewayBootstrapDefaults(CONFIG_FILE, (msg) =>
2836
2847
  this.emitLog("gateway_bootstrap", "info", msg),
2837
2848
  );
2849
+ // `openclaw gateway install` uses user systemd; linger must be enabled before install
2850
+ // (gateway_persistence runs later — too late). VPS userdata may already do this as root.
2851
+ if (isLinuxGatewayPersistenceEligible()) {
2852
+ const lingerSnap = getLinuxGatewayPersistenceSnapshot();
2853
+ if (lingerSnap.linger !== true) {
2854
+ this.emitLog(
2855
+ "gateway_bootstrap",
2856
+ "info",
2857
+ "Enabling systemd user linger before openclaw gateway install (required for headless/SSH).",
2858
+ );
2859
+ await this.runWithPrivilegeGuidance("gateway_bootstrap", "sudo", [
2860
+ "loginctl",
2861
+ "enable-linger",
2862
+ lingerSnap.username,
2863
+ ]);
2864
+ }
2865
+ }
2838
2866
  await this.runWithPrivilegeGuidance("gateway_bootstrap", "openclaw", ["gateway", "install"]);
2839
2867
  await this.runWithPrivilegeGuidance("gateway_bootstrap", "openclaw", ["gateway", "restart"]);
2840
2868
  if (this.options.skipFunnel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "traderclaw-cli",
3
- "version": "1.0.124",
3
+ "version": "1.0.126",
4
4
  "description": "Global TraderClaw CLI (install --wizard, setup, precheck). Installs solana-traderclaw as a dependency for OpenClaw plugin files.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "node": ">=22"
18
18
  },
19
19
  "dependencies": {
20
- "solana-traderclaw": "^1.0.124"
20
+ "solana-traderclaw": "^1.0.126"
21
21
  },
22
22
  "keywords": [
23
23
  "traderclaw",