pumuki-ast-hooks 5.5.20 → 5.5.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.
package/README.md
CHANGED
|
@@ -1065,6 +1065,30 @@ For coding standards, see [CODE_STANDARDS.md](./docs/CODE_STANDARDS.md).
|
|
|
1065
1065
|
|
|
1066
1066
|
## 📝 Recent Changes
|
|
1067
1067
|
|
|
1068
|
+
### Version 5.5.21 (2026-01-04)
|
|
1069
|
+
|
|
1070
|
+
**🐛 Bug Fixes:**
|
|
1071
|
+
- Fixed fork bomb caused by wrapper scripts being copied to incorrect location
|
|
1072
|
+
- Excluded wrapper scripts from bin/ copy to prevent recursive calls
|
|
1073
|
+
- Session loader now works correctly without causing resource exhaustion
|
|
1074
|
+
|
|
1075
|
+
---
|
|
1076
|
+
|
|
1077
|
+
### Version 5.5.20 (2026-01-04)
|
|
1078
|
+
|
|
1079
|
+
**🐛 Bug Fixes:**
|
|
1080
|
+
- Restored comprehensive session context report on IDE startup
|
|
1081
|
+
- Fixed evidence age calculation for ISO 8601 timestamps with timezone offsets
|
|
1082
|
+
- Removed `exec "$SHELL"` that caused infinite loop on macOS
|
|
1083
|
+
- Added Python-based timestamp parsing for reliable timezone conversion
|
|
1084
|
+
|
|
1085
|
+
**🔧 Improvements:**
|
|
1086
|
+
- Session loader now displays branch, recent commits, session context, violations summary, and evidence freshness
|
|
1087
|
+
- Added quick commands section for user convenience
|
|
1088
|
+
- Violations summary now reads from `ast-summary.json` with severity breakdown
|
|
1089
|
+
|
|
1090
|
+
---
|
|
1091
|
+
|
|
1068
1092
|
### Version 5.5.16 (2026-01-04)
|
|
1069
1093
|
|
|
1070
1094
|
**✨ New Features:**
|
package/bin/session-loader.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# AST Session Loader v5.5.
|
|
2
|
+
# AST Session Loader v5.5.22
|
|
3
3
|
# Runs on IDE startup to initialize AST hooks, show context and check tokens
|
|
4
4
|
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ fi
|
|
|
26
26
|
# Banner
|
|
27
27
|
echo ""
|
|
28
28
|
echo -e "${BLUE}╔══════════════════════════════════════════════════════════╗${NC}"
|
|
29
|
-
echo -e "${BLUE}║ 🤖 AST Intelligence Hooks v5.5.
|
|
29
|
+
echo -e "${BLUE}║ 🤖 AST Intelligence Hooks v5.5.22 ║${NC}"
|
|
30
30
|
echo -e "${BLUE}║ Workspace Opened - Loading Context... ║${NC}"
|
|
31
31
|
echo -e "${BLUE}╚══════════════════════════════════════════════════════════╝${NC}"
|
|
32
32
|
echo ""
|
package/docs/RELEASE_NOTES.md
CHANGED
|
@@ -1,3 +1,98 @@
|
|
|
1
|
+
# Release Notes - v5.5.21
|
|
2
|
+
|
|
3
|
+
**Release Date**: January 4, 2026
|
|
4
|
+
**Type**: Patch Release
|
|
5
|
+
**Compatibility**: Fully backward compatible with 5.5.x
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎯 Overview
|
|
10
|
+
|
|
11
|
+
This release fixes a critical fork bomb issue in the installer caused by wrapper scripts being copied to incorrect locations, preventing recursive calls that would exhaust system resources.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
### Fixed: Fork bomb in session-loader
|
|
18
|
+
- **Issue**: Wrapper scripts (`session-loader.sh`, `cli.js`, `install.js`) were copied from `/bin/` to `scripts/hooks-system/bin/`, causing them to call themselves recursively
|
|
19
|
+
- **Resolution**: Modified `FileSystemInstallerService` to exclude wrapper scripts when copying the `bin/` directory
|
|
20
|
+
- **Impact**: Session loader now works correctly without causing fork resource exhaustion or infinite loops
|
|
21
|
+
|
|
22
|
+
### Technical Details
|
|
23
|
+
- Wrapper scripts in the library's `/bin/` directory are now excluded during installation
|
|
24
|
+
- This prevents the wrapper from being copied to the location where it would call itself
|
|
25
|
+
- Installation process is now safe and doesn't cause resource exhaustion
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 📦 Installation / Upgrade
|
|
30
|
+
```bash
|
|
31
|
+
npm install --save-dev pumuki-ast-hooks@5.5.21
|
|
32
|
+
npm run install-hooks
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# Release Notes - v5.5.20
|
|
38
|
+
|
|
39
|
+
**Release Date**: January 4, 2026
|
|
40
|
+
**Type**: Patch Release
|
|
41
|
+
**Compatibility**: Fully backward compatible with 5.5.x
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🎯 Overview
|
|
46
|
+
|
|
47
|
+
This release restores the comprehensive session context report on IDE startup and fixes critical bugs in the session loader, including infinite loop prevention and correct timestamp parsing for evidence freshness checks.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 🐛 Bug Fixes
|
|
52
|
+
|
|
53
|
+
### Fixed: Session loader infinite loop on macOS
|
|
54
|
+
- **Issue**: `exec "$SHELL"` at the end of session-loader.sh caused fork resource exhaustion
|
|
55
|
+
- **Resolution**: Removed shell exec, script now completes without forking
|
|
56
|
+
- **Impact**: IDE startup no longer hangs or creates zombie processes
|
|
57
|
+
|
|
58
|
+
### Fixed: Evidence age calculation showing incorrect values
|
|
59
|
+
- **Issue**: ISO 8601 timestamps with timezone offsets (e.g., `2026-01-04T08:12:13.372+01:00`) were parsed incorrectly, showing millions of seconds
|
|
60
|
+
- **Resolution**: Added Python-based timestamp parsing using `datetime.fromisoformat()` for reliable timezone conversion
|
|
61
|
+
- **Impact**: Evidence freshness check now displays correct age in seconds
|
|
62
|
+
|
|
63
|
+
### Fixed: Session loader showing minimal context
|
|
64
|
+
- **Issue**: Session loader was simplified to basic status only, losing branch info, commits, violations summary
|
|
65
|
+
- **Resolution**: Restored full context report with branch, recent commits, session context, violations summary, and evidence freshness
|
|
66
|
+
- **Impact**: Users now see complete project context on IDE startup
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 🔧 Improvements
|
|
71
|
+
|
|
72
|
+
### Enhanced Session Loader Output
|
|
73
|
+
- Displays current branch with color coding
|
|
74
|
+
- Shows last 3 commits with one-line format
|
|
75
|
+
- Reads session context from `.AI_EVIDENCE.json`
|
|
76
|
+
- Shows violations summary from `ast-summary.json` with severity breakdown (CRITICAL/HIGH/MEDIUM/LOW)
|
|
77
|
+
- Displays evidence freshness with correct age calculation
|
|
78
|
+
- Added quick commands section for common actions
|
|
79
|
+
|
|
80
|
+
### Technical Details
|
|
81
|
+
- Evidence timestamps with timezone offsets now correctly parsed
|
|
82
|
+
- Session loader no longer forks shell process
|
|
83
|
+
- All session information displayed in a single, organized banner
|
|
84
|
+
- Violations summary reads from JSON report for accurate counts
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 📦 Installation / Upgrade
|
|
89
|
+
```bash
|
|
90
|
+
npm install --save-dev pumuki-ast-hooks@5.5.20
|
|
91
|
+
npm run install-hooks
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
1
96
|
# Release Notes - v5.3.15
|
|
2
97
|
|
|
3
98
|
**Release Date**: December 30, 2025
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.22",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/scripts/hooks-system/application/services/installation/FileSystemInstallerService.js
CHANGED
|
@@ -54,6 +54,9 @@ class FileSystemInstallerService {
|
|
|
54
54
|
if (fs.existsSync(source)) {
|
|
55
55
|
if (item === 'infrastructure/') {
|
|
56
56
|
this.copyRecursiveExcluding(source, dest, ['scripts']);
|
|
57
|
+
} else if (item === 'bin/') {
|
|
58
|
+
// Exclude wrapper scripts that would cause fork bombs
|
|
59
|
+
this.copyRecursiveExcluding(source, dest, ['session-loader.sh', 'cli.js', 'install.js']);
|
|
57
60
|
} else {
|
|
58
61
|
this.copyRecursive(source, dest);
|
|
59
62
|
}
|
|
@@ -1,5 +1,107 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
2
|
+
# AST Session Loader v5.5.22
|
|
3
|
+
# Runs on IDE startup to initialize AST hooks, show context and check tokens
|
|
4
4
|
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
BLUE='\033[0;34m'
|
|
7
|
+
CYAN='\033[0;36m'
|
|
8
|
+
GREEN='\033[0;32m'
|
|
9
|
+
YELLOW='\033[1;33m'
|
|
10
|
+
MAGENTA='\033[0;35m'
|
|
11
|
+
NC='\033[0m'
|
|
12
|
+
|
|
13
|
+
EVIDENCE_FILE="$REPO_ROOT/.AI_EVIDENCE.json"
|
|
14
|
+
SESSION_FILE="$REPO_ROOT/.AI_SESSION_START.md"
|
|
15
|
+
TOKEN_STATUS="$REPO_ROOT/.audit_tmp/token-status.txt"
|
|
16
|
+
VIOLATIONS_REPORT="$REPO_ROOT/.audit_tmp/intelligent-report.txt"
|
|
17
|
+
|
|
18
|
+
TOKEN_TRACKER="$REPO_ROOT/scripts/hooks-system/infrastructure/watchdog/token-tracker.sh"
|
|
19
|
+
if [ -f "$TOKEN_TRACKER" ]; then
|
|
20
|
+
bash "$TOKEN_TRACKER"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
echo ""
|
|
24
|
+
echo -e "${BLUE}╔══════════════════════════════════════════════════════════╗${NC}"
|
|
25
|
+
echo -e "${BLUE}║ 🤖 AST Intelligence Hooks v5.5.22 ║${NC}"
|
|
26
|
+
echo -e "${BLUE}║ Workspace Opened - Loading Context... ║${NC}"
|
|
27
|
+
echo -e "${BLUE}╚══════════════════════════════════════════════════════════╝${NC}"
|
|
28
|
+
echo ""
|
|
29
|
+
|
|
30
|
+
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
31
|
+
echo -e "${CYAN}📍 Current Branch: ${MAGENTA}$CURRENT_BRANCH${NC}"
|
|
32
|
+
echo ""
|
|
33
|
+
|
|
34
|
+
echo -e "${CYAN}📝 Recent Commits:${NC}"
|
|
35
|
+
git log --oneline -3 2>/dev/null | sed 's/^/ /' || echo " No commits yet"
|
|
36
|
+
echo ""
|
|
37
|
+
|
|
38
|
+
if [[ -f "$EVIDENCE_FILE" ]]; then
|
|
39
|
+
CURRENT_SESSION_ID=$(jq -r '.session_id // empty' "$EVIDENCE_FILE" 2>/dev/null || echo "")
|
|
40
|
+
CURRENT_ACTION=$(jq -r '.action // empty' "$EVIDENCE_FILE" 2>/dev/null || echo "")
|
|
41
|
+
if [[ -n "$CURRENT_SESSION_ID" && "$CURRENT_SESSION_ID" != "null" ]]; then
|
|
42
|
+
echo -e "${CYAN}📖 Session Context:${NC}"
|
|
43
|
+
if [[ -n "$CURRENT_ACTION" && "$CURRENT_ACTION" != "null" ]]; then
|
|
44
|
+
echo " Session: $CURRENT_SESSION_ID - $CURRENT_ACTION"
|
|
45
|
+
else
|
|
46
|
+
echo " Session: $CURRENT_SESSION_ID"
|
|
47
|
+
fi
|
|
48
|
+
echo ""
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if [[ -f "$VIOLATIONS_REPORT" ]]; then
|
|
53
|
+
echo -e "${CYAN}🎯 Top Violations (last audit):${NC}"
|
|
54
|
+
grep -E "CRITICAL|HIGH|MEDIUM|LOW" "$VIOLATIONS_REPORT" 2>/dev/null | head -5 | sed 's/^/ /' || echo " No violations found"
|
|
55
|
+
echo ""
|
|
56
|
+
elif [[ -f "$REPO_ROOT/.audit_tmp/ast-summary.json" ]]; then
|
|
57
|
+
echo -e "${CYAN}🎯 Violations Summary:${NC}"
|
|
58
|
+
CRITICAL=$(jq -r '.levels.CRITICAL // 0' "$REPO_ROOT/.audit_tmp/ast-summary.json" 2>/dev/null || echo "0")
|
|
59
|
+
HIGH=$(jq -r '.levels.HIGH // 0' "$REPO_ROOT/.audit_tmp/ast-summary.json" 2>/dev/null || echo "0")
|
|
60
|
+
MEDIUM=$(jq -r '.levels.MEDIUM // 0' "$REPO_ROOT/.audit_tmp/ast-summary.json" 2>/dev/null || echo "0")
|
|
61
|
+
LOW=$(jq -r '.levels.LOW // 0' "$REPO_ROOT/.audit_tmp/ast-summary.json" 2>/dev/null || echo "0")
|
|
62
|
+
echo " 🔴 CRITICAL: $CRITICAL 🟠 HIGH: $HIGH 🟡 MEDIUM: $MEDIUM 🔵 LOW: $LOW"
|
|
63
|
+
echo ""
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
AGE=0
|
|
67
|
+
if [[ -f "$EVIDENCE_FILE" ]]; then
|
|
68
|
+
EVIDENCE_TS=$(jq -r '.timestamp' "$EVIDENCE_FILE" 2>/dev/null || echo "")
|
|
69
|
+
if [[ -n "$EVIDENCE_TS" ]] && [[ "$EVIDENCE_TS" != "null" ]]; then
|
|
70
|
+
CLEAN_TS=$(echo "$EVIDENCE_TS" | sed -E 's/\.[0-9]+([+-][0-9]{2}:[0-9]{2}|Z)$/\1/')
|
|
71
|
+
|
|
72
|
+
if [[ "$CLEAN_TS" =~ \+[0-9]{2}:[0-9]{2}$ ]] || [[ "$CLEAN_TS" =~ -[0-9]{2}:[0-9]{2}$ ]]; then
|
|
73
|
+
EVIDENCE_EPOCH=$(python3 -c "from datetime import datetime; import sys; dt = datetime.fromisoformat('$CLEAN_TS'); print(int(dt.timestamp()))" 2>/dev/null || echo "0")
|
|
74
|
+
elif [[ "$CLEAN_TS" =~ Z$ ]]; then
|
|
75
|
+
EVIDENCE_EPOCH=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$CLEAN_TS" +%s 2>/dev/null || echo "0")
|
|
76
|
+
else
|
|
77
|
+
EVIDENCE_EPOCH=0
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
if [[ "$EVIDENCE_EPOCH" != "0" ]]; then
|
|
81
|
+
NOW_EPOCH=$(date +%s)
|
|
82
|
+
AGE=$((NOW_EPOCH - EVIDENCE_EPOCH))
|
|
83
|
+
|
|
84
|
+
if [[ $AGE -gt 180 ]]; then
|
|
85
|
+
echo -e "${YELLOW}⚠️ Evidence is stale (${AGE}s old, max 3min)${NC}"
|
|
86
|
+
echo -e "${YELLOW} Run: ai-start${NC}"
|
|
87
|
+
else
|
|
88
|
+
echo -e "${GREEN}✅ Evidence fresh (${AGE}s old)${NC}"
|
|
89
|
+
fi
|
|
90
|
+
echo ""
|
|
91
|
+
fi
|
|
92
|
+
fi
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
96
|
+
echo -e "${CYAN}🚀 Quick Commands:${NC}"
|
|
97
|
+
echo " ai-start → Update evidence & start work"
|
|
98
|
+
echo " bash scripts/hooks-system/infrastructure/shell/orchestrators/audit-orchestrator.sh → Full audit"
|
|
99
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
100
|
+
echo ""
|
|
101
|
+
|
|
102
|
+
if [[ $AGE -gt 180 ]]; then
|
|
103
|
+
echo -e "${YELLOW}⚠️ Run 'ai-start' to refresh evidence before working${NC}"
|
|
104
|
+
else
|
|
105
|
+
echo -e "${GREEN}✅ Session loaded - Ready to work!${NC}"
|
|
106
|
+
fi
|
|
107
|
+
echo ""
|