@ghl-ai/aw 0.1.70-beta.5 → 0.1.70-beta.7

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/integrations.mjs +25 -6
  2. package/package.json +1 -1
package/integrations.mjs CHANGED
@@ -36,10 +36,20 @@ function getErrorMessage(error) {
36
36
  return error instanceof Error ? error.message : String(error);
37
37
  }
38
38
 
39
+ function getCommandErrorMessage(error) {
40
+ const stderr = typeof error?.stderr === 'string' ? error.stderr.trim() : '';
41
+ const stdout = typeof error?.stdout === 'string' ? error.stdout.trim() : '';
42
+ return stderr || stdout || getErrorMessage(error);
43
+ }
44
+
39
45
  function shellQuote(value) {
40
46
  return `'${String(value).replaceAll("'", "'\\''")}'`;
41
47
  }
42
48
 
49
+ function windowsShellQuote(value) {
50
+ return `"${String(value).replaceAll('"', '\\"')}"`;
51
+ }
52
+
43
53
  function installerEnv(home = HOME) {
44
54
  const pathEntries = [
45
55
  join(home, '.local', 'bin'),
@@ -59,6 +69,15 @@ function posixInstallerCommand(url, runner = 'bash') {
59
69
  return `bash -o pipefail -c ${shellQuote(`curl -fsSL ${shellQuote(url)} | ${runner}`)}`;
60
70
  }
61
71
 
72
+ function wslInstallerCommand(url, runner = 'sh') {
73
+ return `wsl -- bash -o pipefail -c ${windowsShellQuote(`curl -fsSL ${shellQuote(url)} | ${runner}`)}`;
74
+ }
75
+
76
+ export const __test__ = {
77
+ posixInstallerCommand,
78
+ wslInstallerCommand,
79
+ };
80
+
62
81
  // ────────────────────────────────────────────────────────────────────────────────
63
82
  // INTEGRATION REGISTRY
64
83
  // ────────────────────────────────────────────────────────────────────────────────
@@ -102,10 +121,10 @@ export const INTEGRATIONS = {
102
121
  posix: 'https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh',
103
122
  },
104
123
  postInstall: [
105
- 'rtk init -g', // Claude Code
106
- 'rtk init -g --gemini', // Gemini CLI
107
- 'rtk init -g --codex', // Codex
108
- 'rtk init -g --agent cursor', // Cursor
124
+ 'rtk init -g --auto-patch', // Claude Code
125
+ 'rtk init -g --gemini --auto-patch', // Gemini CLI
126
+ 'rtk init -g --codex', // Codex (--auto-patch is not supported)
127
+ 'rtk init -g --agent cursor', // Cursor
109
128
  ],
110
129
  teams: [], // universal — every team benefits
111
130
  requiresAuth: false,
@@ -657,7 +676,7 @@ async function runUniversalInstaller(integration, key, { silent = false, home =
657
676
  }
658
677
 
659
678
  if (wslOk) {
660
- cmd = `wsl -- ${posixInstallerCommand(integration.scripts.posix, 'sh')}`;
679
+ cmd = wslInstallerCommand(integration.scripts.posix, 'sh');
661
680
  } else if (integration.npmPackage) {
662
681
  if (!silent) fmt.logWarn('WSL/bash not available — installing via npm instead');
663
682
  cmd = `npm install -g ${integration.npmPackage}`;
@@ -705,7 +724,7 @@ async function runUniversalInstaller(integration, key, { silent = false, home =
705
724
  });
706
725
  } catch (e) {
707
726
  failedPostInstalls.push(finalPostCmd);
708
- if (!silent) fmt.logWarn(`Post-install step failed: ${finalPostCmd} — ${getErrorMessage(e)}`);
727
+ if (!silent) fmt.logWarn(`Post-install step failed: ${finalPostCmd} — ${getCommandErrorMessage(e)}`);
709
728
  }
710
729
  }
711
730
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.70-beta.5",
3
+ "version": "0.1.70-beta.7",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {