@ghl-ai/aw 0.1.34 → 0.1.35-beta.11
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/commands/init.mjs +3 -0
- package/ecc.mjs +52 -0
- package/package.json +3 -2
package/commands/init.mjs
CHANGED
|
@@ -19,6 +19,7 @@ import { generateCommands, copyInstructions, initAwDocs } from '../integrate.mjs
|
|
|
19
19
|
import { setupMcp } from '../mcp.mjs';
|
|
20
20
|
import { autoUpdate, promptUpdate } from '../update.mjs';
|
|
21
21
|
import { installGlobalHooks } from '../hooks.mjs';
|
|
22
|
+
import { installAwEcc } from '../ecc.mjs';
|
|
22
23
|
|
|
23
24
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
24
25
|
const VERSION = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8')).version;
|
|
@@ -200,6 +201,7 @@ export async function initCommand(args) {
|
|
|
200
201
|
|
|
201
202
|
// Re-link IDE dirs + hooks (idempotent)
|
|
202
203
|
linkWorkspace(HOME);
|
|
204
|
+
await installAwEcc(cwd, { silent });
|
|
203
205
|
generateCommands(HOME);
|
|
204
206
|
copyInstructions(HOME, null, freshCfg?.namespace || team) || [];
|
|
205
207
|
initAwDocs(HOME);
|
|
@@ -280,6 +282,7 @@ export async function initCommand(args) {
|
|
|
280
282
|
// Step 3: Link IDE dirs + setup tasks
|
|
281
283
|
fmt.logStep('Linking IDE symlinks...');
|
|
282
284
|
linkWorkspace(HOME);
|
|
285
|
+
await installAwEcc(cwd, { silent });
|
|
283
286
|
generateCommands(HOME);
|
|
284
287
|
const instructionFiles = copyInstructions(HOME, null, team) || [];
|
|
285
288
|
initAwDocs(HOME);
|
package/ecc.mjs
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
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 run(cmd, opts = {}) {
|
|
12
|
+
return execSync(cmd, { stdio: "pipe", ...opts });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function cloneRepo(tag, dest) {
|
|
16
|
+
try {
|
|
17
|
+
run(`git clone --quiet --depth 1 --branch ${tag} ${AW_ECC_REPO_SSH} ${dest}`);
|
|
18
|
+
} catch {
|
|
19
|
+
run(`git clone --quiet --depth 1 --branch ${tag} ${AW_ECC_REPO_HTTPS} ${dest}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function installAwEcc(
|
|
24
|
+
cwd,
|
|
25
|
+
{ targets = ["cursor", "claude", "codex"], silent = false } = {},
|
|
26
|
+
) {
|
|
27
|
+
if (!silent) fmt.logStep("Installing aw-ecc engine...");
|
|
28
|
+
|
|
29
|
+
if (existsSync(TMP_DIR)) rmSync(TMP_DIR, { recursive: true, force: true });
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
cloneRepo(AW_ECC_TAG, TMP_DIR);
|
|
33
|
+
run("npm install --no-audit --no-fund --ignore-scripts --loglevel=error", { cwd: TMP_DIR });
|
|
34
|
+
|
|
35
|
+
for (const target of targets) {
|
|
36
|
+
try {
|
|
37
|
+
run(
|
|
38
|
+
`node ${join(TMP_DIR, "scripts/install-apply.js")} --target ${target} --profile full`,
|
|
39
|
+
{ cwd },
|
|
40
|
+
);
|
|
41
|
+
} catch {
|
|
42
|
+
// Target not supported on this system (e.g. codex not installed) — skip silently
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (!silent) fmt.logSuccess("aw-ecc engine installed");
|
|
47
|
+
} catch (err) {
|
|
48
|
+
if (!silent) fmt.logWarn(`aw-ecc install failed: ${err.message}`);
|
|
49
|
+
} finally {
|
|
50
|
+
if (existsSync(TMP_DIR)) rmSync(TMP_DIR, { recursive: true, force: true });
|
|
51
|
+
}
|
|
52
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ghl-ai/aw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35-beta.11",
|
|
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"
|