gaia-framework 1.49.0 → 1.49.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/README.md +2 -2
- package/gaia-install.sh +42 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GAIA — Generative Agile Intelligence Architecture
|
|
2
2
|
|
|
3
|
-
[]()
|
|
4
4
|
[]()
|
|
5
5
|
[]()
|
|
6
6
|
[]()
|
|
@@ -460,7 +460,7 @@ The single source of truth is `_gaia/_config/global.yaml`:
|
|
|
460
460
|
|
|
461
461
|
```yaml
|
|
462
462
|
framework_name: "GAIA"
|
|
463
|
-
framework_version: "1.49.
|
|
463
|
+
framework_version: "1.49.2"
|
|
464
464
|
user_name: "your-name"
|
|
465
465
|
project_name: "your-project"
|
|
466
466
|
```
|
package/gaia-install.sh
CHANGED
|
@@ -6,7 +6,7 @@ set -euo pipefail
|
|
|
6
6
|
# Installs, updates, validates, and reports on GAIA installations.
|
|
7
7
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
8
8
|
|
|
9
|
-
readonly VERSION="1.49.
|
|
9
|
+
readonly VERSION="1.49.2"
|
|
10
10
|
readonly GITHUB_REPO="https://github.com/jlouage/Gaia-framework.git"
|
|
11
11
|
readonly MANIFEST_REL="_gaia/_config/manifest.yaml"
|
|
12
12
|
|
|
@@ -105,6 +105,11 @@ clone_from_github() {
|
|
|
105
105
|
echo "$TEMP_CLONE_DIR"
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
normalize_path() {
|
|
109
|
+
local p="${1//\\//}"
|
|
110
|
+
echo "$p"
|
|
111
|
+
}
|
|
112
|
+
|
|
108
113
|
resolve_source() {
|
|
109
114
|
local resolved=""
|
|
110
115
|
|
|
@@ -116,10 +121,14 @@ resolve_source() {
|
|
|
116
121
|
elif [[ -n "${GAIA_SOURCE:-}" ]]; then
|
|
117
122
|
resolved="$GAIA_SOURCE"
|
|
118
123
|
[[ "$OPT_VERBOSE" == true ]] && detail "Source from \$GAIA_SOURCE: $resolved" >&2
|
|
119
|
-
# 3. Self-detect: script's own directory
|
|
120
|
-
elif [[ -d "$(dirname "$(realpath "$0")")/_gaia" ]]; then
|
|
124
|
+
# 3. Self-detect: script's own directory (guard realpath for Git Bash compatibility)
|
|
125
|
+
elif command -v realpath &>/dev/null && [[ -d "$(dirname "$(realpath "$0")")/_gaia" ]]; then
|
|
121
126
|
resolved="$(dirname "$(realpath "$0")")"
|
|
122
127
|
[[ "$OPT_VERBOSE" == true ]] && detail "Source from script location: $resolved" >&2
|
|
128
|
+
# 3b. Fallback when realpath is unavailable (e.g., Git Bash without MSYS2 extras)
|
|
129
|
+
elif [[ -d "$(cd "$(dirname "$0")" && pwd)/_gaia" ]]; then
|
|
130
|
+
resolved="$(cd "$(dirname "$0")" && pwd)"
|
|
131
|
+
[[ "$OPT_VERBOSE" == true ]] && detail "Source from script location (cd fallback): $resolved" >&2
|
|
123
132
|
# 4. GitHub clone
|
|
124
133
|
else
|
|
125
134
|
resolved="$(clone_from_github)"
|
|
@@ -351,7 +360,10 @@ cmd_init() {
|
|
|
351
360
|
else
|
|
352
361
|
local global_file="$TARGET/_gaia/_config/global.yaml"
|
|
353
362
|
if [[ -f "$global_file" ]]; then
|
|
354
|
-
# Use portable sed for both macOS and Linux
|
|
363
|
+
# Use portable sed for both macOS and Linux.
|
|
364
|
+
# macOS (Darwin) requires sed -i '' (empty extension). Linux/GNU sed uses sed -i (no arg).
|
|
365
|
+
# Git Bash on Windows: uname returns "MINGW64_NT-*", which falls into the else branch
|
|
366
|
+
# (GNU sed), which is correct — Git for Windows ships GNU sed.
|
|
355
367
|
if [[ "$(uname)" == "Darwin" ]]; then
|
|
356
368
|
sed -i '' "s|^project_name:.*|project_name: \"$project_name\"|" "$global_file"
|
|
357
369
|
sed -i '' "s|^user_name:.*|user_name: \"$user_name\"|" "$global_file"
|
|
@@ -600,6 +612,12 @@ cmd_update() {
|
|
|
600
612
|
# ─── cmd_validate ───────────────────────────────────────────────────────────
|
|
601
613
|
|
|
602
614
|
cmd_validate() {
|
|
615
|
+
# Guard: reject empty, unset, or whitespace-only TARGET
|
|
616
|
+
if [[ -z "${TARGET:-}" || "${TARGET}" =~ ^[[:space:]]+$ ]]; then
|
|
617
|
+
error "TARGET path is empty or whitespace-only"
|
|
618
|
+
exit 1
|
|
619
|
+
fi
|
|
620
|
+
|
|
603
621
|
if [[ ! -d "$TARGET/_gaia" ]]; then
|
|
604
622
|
error "No GAIA installation found at $TARGET"
|
|
605
623
|
exit 1
|
|
@@ -610,9 +628,12 @@ cmd_validate() {
|
|
|
610
628
|
|
|
611
629
|
local pass=0 fail=0
|
|
612
630
|
|
|
631
|
+
# check: accepts a label and the exit status ($?) of a preceding test command.
|
|
632
|
+
# The test command runs inline before calling check, passing $? as the result.
|
|
633
|
+
# This avoids eval entirely — conditions execute directly via [[ ]] or grep.
|
|
613
634
|
check() {
|
|
614
|
-
local label="$1"
|
|
615
|
-
if
|
|
635
|
+
local label="$1" result="$2"
|
|
636
|
+
if [[ "$result" -eq 0 ]]; then
|
|
616
637
|
printf " ${GREEN}✔${RESET} %s\n" "$label"
|
|
617
638
|
pass=$((pass + 1))
|
|
618
639
|
else
|
|
@@ -622,47 +643,47 @@ cmd_validate() {
|
|
|
622
643
|
}
|
|
623
644
|
|
|
624
645
|
# Manifest
|
|
625
|
-
|
|
646
|
+
[[ -f "$TARGET/$MANIFEST_REL" ]]; check "manifest.yaml exists" $?
|
|
626
647
|
|
|
627
648
|
# Global config fields
|
|
628
649
|
local global="$TARGET/_gaia/_config/global.yaml"
|
|
629
|
-
|
|
650
|
+
[[ -f "$global" ]]; check "global.yaml exists" $?
|
|
630
651
|
if [[ -f "$global" ]]; then
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
652
|
+
local grc=0; grep -q '^project_name:' "$global" || grc=$?; check "global.yaml has project_name" $grc
|
|
653
|
+
grc=0; grep -q '^user_name:' "$global" || grc=$?; check "global.yaml has user_name" $grc
|
|
654
|
+
grc=0; grep -q '^framework_version:' "$global" || grc=$?; check "global.yaml has framework_version" $grc
|
|
634
655
|
fi
|
|
635
656
|
|
|
636
657
|
# Module directories
|
|
637
658
|
for mod in core lifecycle dev creative testing; do
|
|
638
|
-
|
|
659
|
+
[[ -d "$TARGET/_gaia/$mod" ]]; check "Module: $mod" $?
|
|
639
660
|
done
|
|
640
661
|
|
|
641
662
|
# .resolved directories
|
|
642
663
|
for mod in core lifecycle creative testing; do
|
|
643
|
-
|
|
664
|
+
[[ -d "$TARGET/_gaia/$mod/.resolved" ]]; check ".resolved: $mod" $?
|
|
644
665
|
done
|
|
645
666
|
|
|
646
667
|
# Memory directory at project root (ADR-013)
|
|
647
|
-
|
|
668
|
+
[[ -d "$TARGET/_memory" ]]; check "_memory/ directory" $?
|
|
648
669
|
for dir in "${MEMORY_DIRS[@]}"; do
|
|
649
|
-
|
|
670
|
+
[[ -d "$TARGET/_memory/$dir" ]]; check "Memory: $dir" $?
|
|
650
671
|
done
|
|
651
672
|
|
|
652
673
|
# CLAUDE.md
|
|
653
|
-
|
|
674
|
+
[[ -f "$TARGET/CLAUDE.md" ]]; check "CLAUDE.md exists" $?
|
|
654
675
|
|
|
655
676
|
# Slash commands
|
|
656
|
-
|
|
677
|
+
[[ -d "$TARGET/.claude/commands" ]]; check "Slash commands directory" $?
|
|
657
678
|
if [[ -d "$TARGET/.claude/commands" ]]; then
|
|
658
679
|
local cmd_count
|
|
659
680
|
cmd_count="$(find "$TARGET/.claude/commands" -name 'gaia*.md' -type f 2>/dev/null | wc -l | tr -d ' ')"
|
|
660
|
-
check "Slash commands present (found: $cmd_count)"
|
|
681
|
+
[[ "$cmd_count" -gt 0 ]]; check "Slash commands present (found: $cmd_count)" $?
|
|
661
682
|
fi
|
|
662
683
|
|
|
663
684
|
# Docs directories
|
|
664
685
|
for dir in planning-artifacts implementation-artifacts test-artifacts creative-artifacts; do
|
|
665
|
-
|
|
686
|
+
[[ -d "$TARGET/docs/$dir" ]]; check "Docs: $dir" $?
|
|
666
687
|
done
|
|
667
688
|
|
|
668
689
|
# Version
|
|
@@ -821,7 +842,7 @@ parse_args() {
|
|
|
821
842
|
error "--source requires a path argument"
|
|
822
843
|
exit 1
|
|
823
844
|
fi
|
|
824
|
-
SOURCE_FLAG="$2"
|
|
845
|
+
SOURCE_FLAG="$(normalize_path "$2")"
|
|
825
846
|
shift 2
|
|
826
847
|
;;
|
|
827
848
|
--yes|-y)
|
|
@@ -849,7 +870,7 @@ parse_args() {
|
|
|
849
870
|
error "Unexpected argument: $1"
|
|
850
871
|
exit 1
|
|
851
872
|
fi
|
|
852
|
-
TARGET="$1"
|
|
873
|
+
TARGET="$(normalize_path "$1")"
|
|
853
874
|
shift
|
|
854
875
|
;;
|
|
855
876
|
esac
|