@ghl-ai/aw 0.1.42-beta.4 → 0.1.42-beta.6

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 +1 -1
  2. package/package.json +1 -1
  3. package/startup.mjs +16 -4
package/ecc.mjs CHANGED
@@ -10,7 +10,7 @@ import { applyStoredStartupPreferences } from "./startup.mjs";
10
10
 
11
11
  const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
12
12
  const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
13
- export const AW_ECC_TAG = "v1.4.38-beta.4";
13
+ export const AW_ECC_TAG = "v1.4.38-beta.5";
14
14
 
15
15
  const MARKETPLACE_NAME = "aw-marketplace";
16
16
  const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.42-beta.4",
3
+ "version": "0.1.42-beta.6",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {
package/startup.mjs CHANGED
@@ -16,6 +16,11 @@ const DISABLED_MODE = 'disabled';
16
16
  const CLAUDE_DISABLE_DESCRIPTION = 'AW-managed override: disable automatic AW session routing';
17
17
  const CLAUDE_TELEMETRY_DESCRIPTION = 'AW usage telemetry';
18
18
  const CLAUDE_TELEMETRY_HOOKS = [
19
+ {
20
+ phase: 'SessionStart',
21
+ matcher: undefined,
22
+ command: 'node "$HOME/.aw-ecc/scripts/hooks/aw-usage-session-start.js"',
23
+ },
19
24
  {
20
25
  phase: 'PostToolUse',
21
26
  matcher: 'Skill|Agent|Shell|Bash',
@@ -168,7 +173,10 @@ function hasCommandHook(entry, command) {
168
173
  }
169
174
 
170
175
  function isManagedClaudeTelemetryEntry(entry) {
171
- return entry?.description === CLAUDE_TELEMETRY_DESCRIPTION;
176
+ if (entry?.description === CLAUDE_TELEMETRY_DESCRIPTION) return true;
177
+ // Also match legacy entries (no description) by command pattern
178
+ const cmds = Array.isArray(entry?.hooks) ? entry.hooks.map(h => h?.command || '') : [];
179
+ return cmds.some(c => c.includes('aw-usage-'));
172
180
  }
173
181
 
174
182
  function buildClaudeTelemetryEntry(hookDef) {
@@ -196,10 +204,14 @@ function enableClaudeTelemetryHooks(homeDir = homedir()) {
196
204
 
197
205
  for (const hookDef of CLAUDE_TELEMETRY_HOOKS) {
198
206
  const current = Array.isArray(config.hooks[hookDef.phase]) ? config.hooks[hookDef.phase] : [];
199
- // Skip if already present
200
- if (current.some(isManagedClaudeTelemetryEntry)) continue;
207
+ const managed = current.filter(isManagedClaudeTelemetryEntry);
208
+
209
+ // If exactly one properly described entry exists, nothing to do
210
+ if (managed.length === 1 && managed[0].description === CLAUDE_TELEMETRY_DESCRIPTION) continue;
201
211
 
202
- config.hooks[hookDef.phase] = [...current, buildClaudeTelemetryEntry(hookDef)];
212
+ // Remove all legacy/duplicate telemetry entries, then add the canonical one
213
+ const cleaned = current.filter(e => !isManagedClaudeTelemetryEntry(e));
214
+ config.hooks[hookDef.phase] = [...cleaned, buildClaudeTelemetryEntry(hookDef)];
203
215
  changed = true;
204
216
  }
205
217