@ghl-ai/aw 0.1.37-beta.20 → 0.1.37-beta.22

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/hooks.mjs +29 -1
  3. package/package.json +1 -1
package/ecc.mjs CHANGED
@@ -9,7 +9,7 @@ import * as fmt from "./fmt.mjs";
9
9
 
10
10
  const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
11
11
  const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
12
- const AW_ECC_TAG = "v1.2.2";
12
+ const AW_ECC_TAG = "v1.2.4";
13
13
 
14
14
  const MARKETPLACE_NAME = "aw-marketplace";
15
15
  const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
package/hooks.mjs CHANGED
@@ -223,6 +223,34 @@ export function removeGlobalHooks() {
223
223
  fmt.logStep('Global git hooks removed');
224
224
  }
225
225
 
226
+ // Standalone prepare-commit-msg for local .git/hooks/ installation.
227
+ // Unlike the global dispatcher, this does NOT chain to repo-local hooks
228
+ // (because it IS the repo-local hook — chaining would cause infinite recursion).
229
+ const LOCAL_PREPARE_COMMIT_MSG = `#!/bin/sh
230
+ # aw: local prepare-commit-msg hook (installed by aw init)
231
+
232
+ # Skip aw temp dirs
233
+ case "$(pwd)" in /tmp/aw-*|/var/folders/*/aw-*|*/.aw|*/.aw/*) exit 0 ;; esac
234
+
235
+ # Skip merge commits
236
+ [ "$2" = "merge" ] && exit 0
237
+
238
+ # Opt-out escape hatch
239
+ [ "$AW_NO_COAUTHOR" = "1" ] && exit 0
240
+
241
+ # Only brand AW-linked repos (check for .aw/ symlink or worktree)
242
+ if [ -L ".aw" ] || [ -f ".aw/.git" ]; then
243
+ TRAILER="${AW_CO_AUTHOR}"
244
+ # Only append if not already present (idempotent)
245
+ if ! grep -qF "$TRAILER" "$1"; then
246
+ echo "" >> "$1"
247
+ echo "$TRAILER" >> "$1"
248
+ fi
249
+ fi
250
+
251
+ exit 0
252
+ `;
253
+
226
254
  /**
227
255
  * Install prepare-commit-msg hook into a project's local .git/hooks/.
228
256
  * This covers repos where another tool (e.g. Claude Code) sets a local
@@ -260,7 +288,7 @@ export function installLocalCommitHook(projectDir) {
260
288
  if (!content.includes('aw:') && !content.includes('Co-Authored-By')) return;
261
289
  }
262
290
 
263
- writeFileSync(hookPath, PREPARE_COMMIT_MSG);
291
+ writeFileSync(hookPath, LOCAL_PREPARE_COMMIT_MSG);
264
292
  chmodSync(hookPath, '755');
265
293
  } catch { /* best effort */ }
266
294
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.37-beta.20",
3
+ "version": "0.1.37-beta.22",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",