@ghl-ai/aw 0.1.35-beta.7 → 0.1.35-beta.8

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/ecc.mjs +43 -0
  2. package/package.json +3 -2
package/ecc.mjs ADDED
@@ -0,0 +1,43 @@
1
+ import { execSync } from "node:child_process";
2
+ import { existsSync, rmSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import * as fmt from "./fmt.mjs";
5
+
6
+ const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
7
+ const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
8
+ const AW_ECC_TAG = "v1.0.0";
9
+ const TMP_DIR = "/tmp/aw-ecc";
10
+
11
+ function cloneRepo(tag, dest, stdio) {
12
+ try {
13
+ execSync(`git clone --depth 1 --branch ${tag} ${AW_ECC_REPO_SSH} ${dest}`, {
14
+ stdio,
15
+ });
16
+ } catch {
17
+ execSync(
18
+ `git clone --depth 1 --branch ${tag} ${AW_ECC_REPO_HTTPS} ${dest}`,
19
+ { stdio },
20
+ );
21
+ }
22
+ }
23
+
24
+ export async function installAwEcc(
25
+ cwd,
26
+ { targets = ["cursor"], silent = false } = {},
27
+ ) {
28
+ if (!silent) fmt.logStep("Installing aw-ecc engine...");
29
+
30
+ if (existsSync(TMP_DIR)) rmSync(TMP_DIR, { recursive: true, force: true });
31
+
32
+ cloneRepo(AW_ECC_TAG, TMP_DIR, silent ? "pipe" : "inherit");
33
+
34
+ for (const target of targets) {
35
+ execSync(
36
+ `node ${join(TMP_DIR, "scripts/install-apply.js")} --target ${target} --profile full`,
37
+ { cwd, stdio: silent ? "pipe" : "inherit" },
38
+ );
39
+ }
40
+
41
+ rmSync(TMP_DIR, { recursive: true, force: true });
42
+ if (!silent) fmt.logSuccess("aw-ecc engine installed");
43
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.35-beta.7",
3
+ "version": "0.1.35-beta.8",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,7 +24,8 @@
24
24
  "registry.mjs",
25
25
  "apply.mjs",
26
26
  "update.mjs",
27
- "hooks.mjs"
27
+ "hooks.mjs",
28
+ "ecc.mjs"
28
29
  ],
29
30
  "engines": {
30
31
  "node": ">=18.0.0"