@ghl-ai/aw 0.1.70-beta.4 → 0.1.70-beta.6

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 +47 -12
  2. package/package.json +1 -1
package/integrations.mjs CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  mkdirSync,
16
16
  rmSync,
17
17
  } from 'node:fs';
18
- import { join, basename } from 'node:path';
18
+ import { join, basename, delimiter } from 'node:path';
19
19
  import { homedir } from 'node:os';
20
20
  import * as fmt from './fmt.mjs';
21
21
  import { chalk } from './fmt.mjs';
@@ -36,6 +36,35 @@ 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
+
45
+ function shellQuote(value) {
46
+ return `'${String(value).replaceAll("'", "'\\''")}'`;
47
+ }
48
+
49
+ function installerEnv(home = HOME) {
50
+ const pathEntries = [
51
+ join(home, '.local', 'bin'),
52
+ join(home, '.cargo', 'bin'),
53
+ join(home, 'bin'),
54
+ process.env.PATH || '',
55
+ ].filter(Boolean);
56
+
57
+ return {
58
+ ...process.env,
59
+ HOME: home,
60
+ PATH: pathEntries.join(delimiter),
61
+ };
62
+ }
63
+
64
+ function posixInstallerCommand(url, runner = 'bash') {
65
+ return `bash -o pipefail -c ${shellQuote(`curl -fsSL ${shellQuote(url)} | ${runner}`)}`;
66
+ }
67
+
39
68
  // ────────────────────────────────────────────────────────────────────────────────
40
69
  // INTEGRATION REGISTRY
41
70
  // ────────────────────────────────────────────────────────────────────────────────
@@ -76,13 +105,13 @@ export const INTEGRATIONS = {
76
105
  description: 'CLI proxy that filters/compresses shell output (git, tests, logs) by 60-90%',
77
106
  scripts: {
78
107
  win32: null, // use WSL fallback
79
- posix: 'https://raw.githubusercontent.com/rtk-ai/rtk/main/install.sh',
108
+ posix: 'https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh',
80
109
  },
81
110
  postInstall: [
82
- 'rtk init -g', // Claude Code
83
- 'rtk init -g --gemini', // Gemini CLI
84
- 'rtk init -g --codex', // Codex
85
- 'rtk init -g --agent cursor', // Cursor
111
+ 'rtk init -g --auto-patch', // Claude Code
112
+ 'rtk init -g --gemini --auto-patch', // Gemini CLI
113
+ 'rtk init -g --codex', // Codex (--auto-patch is not supported)
114
+ 'rtk init -g --agent cursor', // Cursor
86
115
  ],
87
116
  teams: [], // universal — every team benefits
88
117
  requiresAuth: false,
@@ -110,11 +139,11 @@ export const INTEGRATIONS = {
110
139
  posix: null, // no binary — installed entirely via npx below
111
140
  },
112
141
  postInstall: [
113
- 'npx skills@latest add mattpocock/skills',
142
+ 'npx skills@latest add mattpocock/skills --global --all',
114
143
  ],
115
144
  teams: [],
116
145
  requiresAuth: false,
117
- authNote: 'Interactive install pick which skills + agents you want. Then run /setup-matt-pocock-skills once per repo.',
146
+ authNote: 'Installs all bundled skills and agents globally. Then run /setup-matt-pocock-skills once per repo.',
118
147
  },
119
148
 
120
149
  // PYTHON CLIs (installed via uv / pipx / pip, then runs post-install hooks)
@@ -601,6 +630,7 @@ async function runClaudePlugin(installCmd, { silent = false, marketplaceSource =
601
630
 
602
631
  async function runUniversalInstaller(integration, key, { silent = false, home = HOME } = {}) {
603
632
  const spinner = silent ? null : fmt.spinner();
633
+ const env = installerEnv(home);
604
634
 
605
635
  if (!silent) spinner.start(`Installing ${integration.label} for all detected IDEs...`);
606
636
 
@@ -633,7 +663,7 @@ async function runUniversalInstaller(integration, key, { silent = false, home =
633
663
  }
634
664
 
635
665
  if (wslOk) {
636
- cmd = `wsl -- bash -c "curl -fsSL '${integration.scripts.posix}' | sh"`;
666
+ cmd = `wsl -- ${posixInstallerCommand(integration.scripts.posix, 'sh')}`;
637
667
  } else if (integration.npmPackage) {
638
668
  if (!silent) fmt.logWarn('WSL/bash not available — installing via npm instead');
639
669
  cmd = `npm install -g ${integration.npmPackage}`;
@@ -651,13 +681,14 @@ async function runUniversalInstaller(integration, key, { silent = false, home =
651
681
  }
652
682
  }
653
683
  } else {
654
- cmd = `curl -fsSL '${integration.scripts.posix}' | bash`;
684
+ cmd = posixInstallerCommand(integration.scripts.posix);
655
685
  }
656
686
 
657
687
  if (cmd) {
658
688
  await execAsync(cmd, {
659
689
  timeout: 5 * 60 * 1000,
660
690
  maxBuffer: 20 * 1024 * 1024,
691
+ env,
661
692
  });
662
693
  }
663
694
 
@@ -673,10 +704,14 @@ async function runUniversalInstaller(integration, key, { silent = false, home =
673
704
  }
674
705
 
675
706
  try {
676
- await execAsync(finalPostCmd, { timeout: 60 * 1000, maxBuffer: 10 * 1024 * 1024 });
707
+ await execAsync(finalPostCmd, {
708
+ timeout: 60 * 1000,
709
+ maxBuffer: 10 * 1024 * 1024,
710
+ env,
711
+ });
677
712
  } catch (e) {
678
713
  failedPostInstalls.push(finalPostCmd);
679
- if (!silent) fmt.logWarn(`Post-install step failed: ${finalPostCmd} — ${getErrorMessage(e)}`);
714
+ if (!silent) fmt.logWarn(`Post-install step failed: ${finalPostCmd} — ${getCommandErrorMessage(e)}`);
680
715
  }
681
716
  }
682
717
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.70-beta.4",
3
+ "version": "0.1.70-beta.6",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {