@ghl-ai/aw 0.1.42-beta.27 → 0.1.42-beta.28
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 +8 -0
- package/ecc.mjs +8 -3
- package/package.json +1 -1
package/commands/init.mjs
CHANGED
|
@@ -339,12 +339,16 @@ export async function initCommand(args) {
|
|
|
339
339
|
if (oldManifest) pruneStaleHooks(oldManifest);
|
|
340
340
|
|
|
341
341
|
await installAwEcc(cwd, { silent });
|
|
342
|
+
|
|
343
|
+
const setupSpinner = silent ? null : fmt.spinner();
|
|
344
|
+
if (setupSpinner) setupSpinner.start('Configuring hooks and IDE integration...');
|
|
342
345
|
ensureAwRuntimeHook(HOME);
|
|
343
346
|
syncHomeAndProjectInstructions(cwd, freshCfg?.namespace || team);
|
|
344
347
|
await setupMcp(HOME, freshCfg?.namespace || team, { silent });
|
|
345
348
|
applyStoredStartupPreferences(HOME);
|
|
346
349
|
const removedLegacyStartupFiles = cwd !== HOME ? removeWorkspaceHookDefaults(cwd) : [];
|
|
347
350
|
installGlobalHooks();
|
|
351
|
+
if (setupSpinner) setupSpinner.stop('Hooks and IDE integration configured');
|
|
348
352
|
|
|
349
353
|
// Remove old local .git/hooks/post-checkout that pre-dates core.hooksPath (creates stale .aw_registry symlink)
|
|
350
354
|
if (cwd !== HOME) {
|
|
@@ -482,6 +486,9 @@ export async function initCommand(args) {
|
|
|
482
486
|
if (oldManifestFresh) pruneStaleHooks(oldManifestFresh);
|
|
483
487
|
|
|
484
488
|
await installAwEcc(cwd, { silent });
|
|
489
|
+
|
|
490
|
+
const setupSpinnerFresh = silent ? null : fmt.spinner();
|
|
491
|
+
if (setupSpinnerFresh) setupSpinnerFresh.start('Configuring hooks and IDE integration...');
|
|
485
492
|
ensureAwRuntimeHook(HOME);
|
|
486
493
|
|
|
487
494
|
// Parallel batch B: post-ECC setup (instructions and MCP are independent)
|
|
@@ -494,6 +501,7 @@ export async function initCommand(args) {
|
|
|
494
501
|
const removedLegacyStartupFiles = cwd !== HOME ? removeWorkspaceHookDefaults(cwd) : [];
|
|
495
502
|
const hooksInstalled = installGlobalHooks();
|
|
496
503
|
installIdeTasks();
|
|
504
|
+
if (setupSpinnerFresh) setupSpinnerFresh.stop('Hooks and IDE integration configured');
|
|
497
505
|
|
|
498
506
|
// Remove old local .git/hooks/post-checkout that pre-dates core.hooksPath
|
|
499
507
|
if (cwd !== HOME) {
|
package/ecc.mjs
CHANGED
|
@@ -259,13 +259,16 @@ export async function installAwEcc(
|
|
|
259
259
|
{ targets = ["cursor", "claude", "codex"], silent = false } = {},
|
|
260
260
|
) {
|
|
261
261
|
if (process.env.AW_NO_ECC === '1') return;
|
|
262
|
-
if (!silent) fmt.logStep("Installing aw-ecc engine...");
|
|
263
262
|
|
|
264
263
|
const repoDir = eccDir();
|
|
265
264
|
const home = homedir();
|
|
266
265
|
|
|
266
|
+
const eccSpinner = silent ? null : fmt.spinner();
|
|
267
|
+
|
|
267
268
|
try {
|
|
269
|
+
if (eccSpinner) eccSpinner.start('Cloning aw-ecc engine...');
|
|
268
270
|
cloneOrUpdate(AW_ECC_TAG, repoDir);
|
|
271
|
+
if (eccSpinner) eccSpinner.message('Installing aw-ecc dependencies...');
|
|
269
272
|
|
|
270
273
|
// Claude Code: plugin install via marketplace CLI (proper agent dispatch)
|
|
271
274
|
if (targets.includes("claude")) {
|
|
@@ -291,6 +294,7 @@ export async function installAwEcc(
|
|
|
291
294
|
run(`node "${generateHooksScript}"`, { cwd: repoDir });
|
|
292
295
|
} catch { /* best effort — older engine versions may not have this script */ }
|
|
293
296
|
}
|
|
297
|
+
if (eccSpinner) eccSpinner.message('Applying aw-ecc to IDE targets...');
|
|
294
298
|
// Each target writes to disjoint paths (~/.claude/, ~/.cursor/, ~/.codex/) — safe to parallelize.
|
|
295
299
|
await Promise.all(fileCopyTargets.map(async (target) => {
|
|
296
300
|
try {
|
|
@@ -319,9 +323,10 @@ export async function installAwEcc(
|
|
|
319
323
|
|
|
320
324
|
applyStoredStartupPreferences();
|
|
321
325
|
|
|
322
|
-
if (
|
|
326
|
+
if (eccSpinner) eccSpinner.stop('aw-ecc engine installed');
|
|
323
327
|
} catch (err) {
|
|
324
|
-
if (
|
|
328
|
+
if (eccSpinner) eccSpinner.stop(chalk.yellow(`aw-ecc install failed: ${err.message}`));
|
|
329
|
+
else if (!silent) fmt.logWarn(`aw-ecc install failed: ${err.message}`);
|
|
325
330
|
}
|
|
326
331
|
}
|
|
327
332
|
|