@chrysb/alphaclaw 0.9.3 → 0.9.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/bin/alphaclaw.js CHANGED
@@ -508,6 +508,7 @@ if (!kSetupPassword) {
508
508
  // ---------------------------------------------------------------------------
509
509
 
510
510
  process.env.OPENCLAW_HOME = rootDir;
511
+ process.env.HOME = rootDir;
511
512
  process.env.OPENCLAW_CONFIG_PATH = path.join(openclawDir, "openclaw.json");
512
513
  process.env.OPENCLAW_STATE_DIR = openclawDir;
513
514
  process.env.GOG_KEYRING_PASSWORD =
@@ -519,6 +520,39 @@ process.env.GOG_KEYRING_PASSWORD =
519
520
 
520
521
  process.env.XDG_CONFIG_HOME = openclawDir;
521
522
 
523
+ const ensureGogCliCompatConfigPath = () => {
524
+ const configDir = path.join(rootDir, ".config");
525
+ const compatPath = path.join(configDir, "gogcli");
526
+ const managedPath = path.join(openclawDir, "gogcli");
527
+
528
+ try {
529
+ fs.mkdirSync(configDir, { recursive: true });
530
+ if (!fs.existsSync(compatPath)) {
531
+ fs.symlinkSync(managedPath, compatPath, "dir");
532
+ console.log(
533
+ `[alphaclaw] Linked gogcli config path ${compatPath} -> ${managedPath}`,
534
+ );
535
+ return;
536
+ }
537
+
538
+ const stat = fs.lstatSync(compatPath);
539
+ if (!stat.isSymbolicLink()) return;
540
+ const linkTarget = fs.readlinkSync(compatPath);
541
+ const resolvedTarget = path.resolve(configDir, linkTarget);
542
+ if (resolvedTarget !== managedPath) {
543
+ console.log(
544
+ `[alphaclaw] gogcli config path already exists at ${compatPath}; leaving existing symlink in place`,
545
+ );
546
+ }
547
+ } catch (error) {
548
+ console.log(
549
+ `[alphaclaw] gogcli config path compatibility setup skipped: ${error.message}`,
550
+ );
551
+ }
552
+ };
553
+
554
+ ensureGogCliCompatConfigPath();
555
+
522
556
  const gogInstalled = (() => {
523
557
  try {
524
558
  execSync("command -v gog", { stdio: "ignore" });
@@ -43,6 +43,7 @@ const setGatewayLaunchHandler = (handler) => {
43
43
 
44
44
  const gatewayEnv = () => ({
45
45
  ...process.env,
46
+ HOME: kRootDir,
46
47
  OPENCLAW_HOME: kRootDir,
47
48
  OPENCLAW_CONFIG_PATH: `${OPENCLAW_DIR}/openclaw.json`,
48
49
  OPENCLAW_STATE_DIR: OPENCLAW_DIR,
@@ -105,6 +105,19 @@ const buildGogSkillContent = ({ fs, accounts }) => {
105
105
  lines.push("```");
106
106
  lines.push("");
107
107
 
108
+ lines.push("## Runtime Notes");
109
+ lines.push("");
110
+ lines.push(
111
+ "- In AlphaClaw-managed deployments, gog state lives under `$OPENCLAW_STATE_DIR` (typically `/data/.openclaw`).",
112
+ );
113
+ lines.push(
114
+ "- If a direct shell `gog ...` command falls back to `/root/.config/gogcli` or `/root/.openclaw`, rerun it with `XDG_CONFIG_HOME=\"${OPENCLAW_STATE_DIR:-$OPENCLAW_HOME/.openclaw}\"` so gog uses the managed state dir.",
115
+ );
116
+ lines.push(
117
+ "- Always pass `--account <email>` (and `--client <name>` if not \"default\") so gog targets the correct account.",
118
+ );
119
+ lines.push("");
120
+
108
121
  // Account table
109
122
  lines.push("## Connected Accounts");
110
123
  lines.push("");
@@ -117,10 +130,6 @@ const buildGogSkillContent = ({ fs, accounts }) => {
117
130
  lines.push(`| ${email} | ${client} | ${services} |`);
118
131
  }
119
132
  lines.push("");
120
- lines.push(
121
- "Always pass `--account <email>` (and `--client <name>` if not \"default\") so gog targets the correct account.",
122
- );
123
- lines.push("");
124
133
 
125
134
  // Per-service sections (read from markdown files)
126
135
  for (const svc of kServiceOrder) {
@@ -493,6 +493,7 @@ const createOnboardingService = ({
493
493
  {
494
494
  env: {
495
495
  ...process.env,
496
+ HOME: kRootDir,
496
497
  OPENCLAW_HOME: kRootDir,
497
498
  OPENCLAW_CONFIG_PATH: `${OPENCLAW_DIR}/openclaw.json`,
498
499
  OPENCLAW_STATE_DIR: OPENCLAW_DIR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrysb/alphaclaw",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },