@ryuenn3123/agentic-senior-core 6.7.1 → 6.7.2
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/gemini-extension.json
CHANGED
|
@@ -418,23 +418,41 @@ export function installGlobalGitPreCommitHook({ homeDir = os.homedir() } = {}) {
|
|
|
418
418
|
const dispatcherContent = `#!/bin/sh
|
|
419
419
|
${ASC_HOOK_HEADER} -- Global Smart Dispatcher
|
|
420
420
|
|
|
421
|
-
# 1.
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
421
|
+
# 1. Resolve Git Root directory
|
|
422
|
+
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
423
|
+
LOCAL_HOOK=""
|
|
424
|
+
|
|
425
|
+
if [ -n "$GIT_ROOT" ]; then
|
|
426
|
+
# Check 1: Root level (.husky/pre-commit or .git/hooks/pre-commit.local)
|
|
427
|
+
if [ -f "$GIT_ROOT/.husky/pre-commit" ] && [ -x "$GIT_ROOT/.husky/pre-commit" ]; then
|
|
428
|
+
LOCAL_HOOK="$GIT_ROOT/.husky/pre-commit"
|
|
429
|
+
elif [ -f "$GIT_ROOT/.git/hooks/pre-commit.local" ] && [ -x "$GIT_ROOT/.git/hooks/pre-commit.local" ]; then
|
|
430
|
+
LOCAL_HOOK="$GIT_ROOT/.git/hooks/pre-commit.local"
|
|
431
|
+
else
|
|
432
|
+
# Check 2: Monorepo & Microservice subfolders (web/, api/, apps/*, services/*, packages/*)
|
|
433
|
+
for sub in "$GIT_ROOT"/* "$GIT_ROOT"/apps/* "$GIT_ROOT"/services/* "$GIT_ROOT"/packages/*; do
|
|
434
|
+
if [ -d "$sub" ] && [ -f "$sub/.husky/pre-commit" ] && [ -x "$sub/.husky/pre-commit" ]; then
|
|
435
|
+
LOCAL_HOOK="$sub/.husky/pre-commit"
|
|
436
|
+
break
|
|
437
|
+
fi
|
|
438
|
+
done
|
|
427
439
|
fi
|
|
428
|
-
|
|
429
|
-
|
|
440
|
+
fi
|
|
441
|
+
|
|
442
|
+
# 2. Prioritize local team hook if found
|
|
443
|
+
if [ -n "$LOCAL_HOOK" ]; then
|
|
444
|
+
"$LOCAL_HOOK" "$@"
|
|
430
445
|
LOCAL_STATUS=$?
|
|
431
446
|
if [ $LOCAL_STATUS -ne 0 ]; then
|
|
432
447
|
exit $LOCAL_STATUS
|
|
433
448
|
fi
|
|
434
449
|
fi
|
|
435
450
|
|
|
436
|
-
#
|
|
437
|
-
if [ -f "
|
|
451
|
+
# 3. Run ASC workspace pre-commit runner if present
|
|
452
|
+
if [ -n "$GIT_ROOT" ] && [ -f "$GIT_ROOT/.asc/hooks/pre-commit-runner.cjs" ]; then
|
|
453
|
+
node "$GIT_ROOT/.asc/hooks/pre-commit-runner.cjs" "$@"
|
|
454
|
+
exit $?
|
|
455
|
+
elif [ -f ".asc/hooks/pre-commit-runner.cjs" ]; then
|
|
438
456
|
node .asc/hooks/pre-commit-runner.cjs "$@"
|
|
439
457
|
exit $?
|
|
440
458
|
fi
|
package/package.json
CHANGED
package/plugin.yaml
CHANGED