@ghl-ai/aw 0.1.44-beta.0 → 0.1.44-beta.1

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 (3) hide show
  1. package/ecc.mjs +48 -1
  2. package/mcp.mjs +2 -22
  3. package/package.json +1 -1
package/ecc.mjs CHANGED
@@ -12,7 +12,7 @@ import { applyStoredStartupPreferences } from "./startup.mjs";
12
12
 
13
13
  const AW_ECC_REPO_SSH = "git@github.com:GoHighLevel/aw-ecc.git";
14
14
  const AW_ECC_REPO_HTTPS = "https://github.com/GoHighLevel/aw-ecc.git";
15
- export const AW_ECC_TAG = "v1.4.44";
15
+ export const AW_ECC_TAG = "v1.4.45";
16
16
 
17
17
  const MARKETPLACE_NAME = "aw-marketplace";
18
18
  const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
@@ -499,6 +499,53 @@ export function uninstallAwEcc({ silent = false } = {}) {
499
499
  }
500
500
  }
501
501
 
502
+ // Strip aw-managed content from ~/.claude/CLAUDE.md (keep user content above the marker)
503
+ const claudeMdPath = join(HOME, ".claude", "CLAUDE.md");
504
+ if (existsSync(claudeMdPath)) {
505
+ try {
506
+ const content = readFileSync(claudeMdPath, "utf8");
507
+ const marker = "<!-- aw-managed:";
508
+ const idx = content.indexOf(marker);
509
+ if (idx !== -1) {
510
+ const userContent = content.slice(0, idx).trimEnd();
511
+ if (userContent.length > 0) {
512
+ writeFileSync(claudeMdPath, userContent + "\n");
513
+ } else {
514
+ rmSync(claudeMdPath, { force: true });
515
+ }
516
+ removed++;
517
+ }
518
+ } catch { /* best effort */ }
519
+ }
520
+
521
+ // Clean Codex aw hooks
522
+ const codexHooksDir = join(HOME, ".codex", "hooks");
523
+ if (existsSync(codexHooksDir)) {
524
+ try {
525
+ for (const file of readdirSync(codexHooksDir)) {
526
+ if (file.startsWith("aw-") || file.startsWith("session-end-extract") || file.startsWith("session-stop-marker")) {
527
+ rmSync(join(codexHooksDir, file), { force: true });
528
+ removed++;
529
+ }
530
+ }
531
+ pruneEmptyParents(codexHooksDir, join(HOME, ".codex"));
532
+ } catch { /* best effort */ }
533
+ }
534
+
535
+ // Clean Codex ecc backup directories
536
+ const codexBackupsDir = join(HOME, ".codex", "backups");
537
+ if (existsSync(codexBackupsDir)) {
538
+ try {
539
+ for (const dir of readdirSync(codexBackupsDir)) {
540
+ if (dir.startsWith("ecc-")) {
541
+ rmSync(join(codexBackupsDir, dir), { recursive: true, force: true });
542
+ removed++;
543
+ }
544
+ }
545
+ pruneEmptyParents(codexBackupsDir, join(HOME, ".codex"));
546
+ } catch { /* best effort */ }
547
+ }
548
+
502
549
  // Remove permanent aw-ecc repo clone — use rm -rf (more reliable than rmSync on git repos)
503
550
  const repoDir = eccDir();
504
551
  if (existsSync(repoDir)) {
package/mcp.mjs CHANGED
@@ -249,20 +249,6 @@ async function resolveClickUpToken(silent = false, cwd = process.cwd()) {
249
249
  return token;
250
250
  }
251
251
 
252
- /**
253
- * Check if the aw Claude Code plugin is already enabled.
254
- * If so, ghl-ai MCP is provided by the plugin's .mcp.json — no need to duplicate in ~/.claude.json.
255
- */
256
- function isClaudePluginEnabled() {
257
- try {
258
- const settingsPath = join(HOME, '.claude', 'settings.json');
259
- if (!existsSync(settingsPath)) return false;
260
- const settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
261
- return settings?.enabledPlugins?.['aw@aw-marketplace'] === true;
262
- } catch {
263
- return false;
264
- }
265
- }
266
252
 
267
253
  /**
268
254
  * Setup MCP configs globally for Claude Code and Cursor.
@@ -300,15 +286,9 @@ export async function setupMcp(cwd, namespace, { silent = false } = {}) {
300
286
  };
301
287
 
302
288
  // ── Claude Code: ~/.claude.json (global) ──
303
- // Skip if the aw plugin is enabled — it already provides ghl-ai MCP via .mcp.json.
304
- // Writing here too would create duplicate MCP tools (~100+ tools doubled).
305
289
  const claudeJsonPath = join(HOME, '.claude.json');
306
- if (!isClaudePluginEnabled()) {
307
- if (mergeJsonMcpServer(claudeJsonPath, 'ghl-ai', ghlAiServerLocal)) {
308
- updatedFiles.push(claudeJsonPath);
309
- }
310
- } else {
311
- if (!silent) fmt.logStep('Claude MCP skipped — aw plugin already provides ghl-ai');
290
+ if (mergeJsonMcpServer(claudeJsonPath, 'ghl-ai', ghlAiServerLocal)) {
291
+ updatedFiles.push(claudeJsonPath);
312
292
  }
313
293
 
314
294
  // ── Cursor: ~/.cursor/mcp.json (global) ──
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.44-beta.0",
3
+ "version": "0.1.44-beta.1",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {