@ghl-ai/aw 0.1.43-beta.2 → 0.1.44-beta.0
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/ecc.mjs +25 -7
- package/mcp.mjs +23 -2
- package/package.json +1 -1
package/ecc.mjs
CHANGED
|
@@ -10,9 +10,9 @@ import { homedir } from "node:os";
|
|
|
10
10
|
import * as fmt from "./fmt.mjs";
|
|
11
11
|
import { applyStoredStartupPreferences } from "./startup.mjs";
|
|
12
12
|
|
|
13
|
-
const AW_ECC_REPO_SSH = "git@github.com:
|
|
14
|
-
const AW_ECC_REPO_HTTPS = "https://github.com/
|
|
15
|
-
export const AW_ECC_TAG = "v1.4.
|
|
13
|
+
const AW_ECC_REPO_SSH = "git@github.com:GoHighLevel/aw-ecc.git";
|
|
14
|
+
const AW_ECC_REPO_HTTPS = "https://github.com/GoHighLevel/aw-ecc.git";
|
|
15
|
+
export const AW_ECC_TAG = "v1.4.44";
|
|
16
16
|
|
|
17
17
|
const MARKETPLACE_NAME = "aw-marketplace";
|
|
18
18
|
const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
|
|
@@ -475,10 +475,28 @@ export function uninstallAwEcc({ silent = false } = {}) {
|
|
|
475
475
|
} catch { /* best effort */ }
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
-
// Clean leftover
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
// Clean leftover plugin cache directories (Claude Code may not fully remove these)
|
|
479
|
+
for (const cacheName of ["aw", "aw-marketplace"]) {
|
|
480
|
+
const cacheDir = join(HOME, ".claude", "plugins", "cache", cacheName);
|
|
481
|
+
if (existsSync(cacheDir)) {
|
|
482
|
+
try { rmSync(cacheDir, { recursive: true, force: true }); removed++; } catch { /* best effort */ }
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
// Clean rules copied by session-start hook (plugin-only users)
|
|
487
|
+
const pluginRulesDir = join(HOME, ".claude", "rules", "platform");
|
|
488
|
+
if (existsSync(pluginRulesDir)) {
|
|
489
|
+
try { rmSync(pluginRulesDir, { recursive: true, force: true }); removed++; } catch { /* best effort */ }
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// Clean commands created by docsregistry sync (all IDEs)
|
|
493
|
+
for (const cmdDir of [
|
|
494
|
+
join(HOME, ".claude", "commands", "aw"),
|
|
495
|
+
join(HOME, ".cursor", "commands", "aw"),
|
|
496
|
+
]) {
|
|
497
|
+
if (existsSync(cmdDir)) {
|
|
498
|
+
try { rmSync(cmdDir, { recursive: true, force: true }); removed++; } catch { /* best effort */ }
|
|
499
|
+
}
|
|
482
500
|
}
|
|
483
501
|
|
|
484
502
|
// Remove permanent aw-ecc repo clone — use rm -rf (more reliable than rmSync on git repos)
|
package/mcp.mjs
CHANGED
|
@@ -249,6 +249,21 @@ 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
|
* Setup MCP configs globally for Claude Code and Cursor.
|
|
254
269
|
* Merges ghl-ai server into existing configs without overwriting other servers.
|
|
@@ -285,9 +300,15 @@ export async function setupMcp(cwd, namespace, { silent = false } = {}) {
|
|
|
285
300
|
};
|
|
286
301
|
|
|
287
302
|
// ── 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).
|
|
288
305
|
const claudeJsonPath = join(HOME, '.claude.json');
|
|
289
|
-
if (
|
|
290
|
-
|
|
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');
|
|
291
312
|
}
|
|
292
313
|
|
|
293
314
|
// ── Cursor: ~/.cursor/mcp.json (global) ──
|