gaia-framework 1.49.1 → 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 CHANGED
@@ -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.1"
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.1"
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"
@@ -430,21 +442,6 @@ GITIGNORE
430
442
  echo ""
431
443
  }
432
444
 
433
- # ─── find_files_in_dir ──────────────────────────────────────────────────────
434
- # Lists all files in a directory tree. Uses null-delimited output (find -print0)
435
- # when supported, falls back to newline-delimited output on systems where -print0
436
- # is unavailable (e.g., Windows Git Bash with busybox find).
437
- # GAIA file paths never contain newlines, so the newline-delimited fallback is safe.
438
-
439
- find_files_in_dir() {
440
- local dir="$1"
441
- if find /dev/null -maxdepth 0 -print0 2>/dev/null | head -c0 2>/dev/null; then
442
- find "$dir" -type f -print0
443
- else
444
- find "$dir" -type f
445
- fi
446
- }
447
-
448
445
  # ─── cmd_update ─────────────────────────────────────────────────────────────
449
446
 
450
447
  cmd_update() {
@@ -512,12 +509,6 @@ cmd_update() {
512
509
  step "Updating framework files..."
513
510
  local updated=0 skipped=0 changed=0
514
511
 
515
- # Feature-detect find -print0 support once before the loop (E6-S2)
516
- local use_print0=false
517
- if find /dev/null -maxdepth 0 -print0 2>/dev/null | head -c0 2>/dev/null; then
518
- use_print0=true
519
- fi
520
-
521
512
  for entry in "${update_targets[@]}"; do
522
513
  local src_path="$source/_gaia/$entry"
523
514
  local dst_path="$TARGET/_gaia/$entry"
@@ -536,24 +527,12 @@ cmd_update() {
536
527
  copy_with_backup "$src_path" "$dst_path" "$backup_dir"
537
528
  updated=$((updated + 1))
538
529
  elif [[ -d "$src_path" ]]; then
539
- # Directory — update each file via find_files_in_dir helper
540
- if [[ "$use_print0" == true ]]; then
541
- # Null-delimited path (macOS/Linux with GNU or BSD find)
542
- while IFS= read -r -d '' file; do
543
- local rel="${file#$src_path/}"
544
- copy_with_backup "$file" "$dst_path/$rel" "$backup_dir"
545
- updated=$((updated + 1))
546
- done < <(find_files_in_dir "$src_path") || true
547
- else
548
- # Newline-delimited fallback (Windows Git Bash / busybox find)
549
- # Safe because GAIA file paths never contain newlines
550
- while IFS= read -r file; do
551
- [[ -z "$file" ]] && continue
552
- local rel="${file#$src_path/}"
553
- copy_with_backup "$file" "$dst_path/$rel" "$backup_dir"
554
- updated=$((updated + 1))
555
- done < <(find_files_in_dir "$src_path") || true
556
- fi
530
+ # Directory — update each file
531
+ while IFS= read -r -d '' file; do
532
+ local rel="${file#$src_path/}"
533
+ copy_with_backup "$file" "$dst_path/$rel" "$backup_dir"
534
+ updated=$((updated + 1))
535
+ done < <(find "$src_path" -type f -print0) || true
557
536
  fi
558
537
  done
559
538
 
@@ -863,7 +842,7 @@ parse_args() {
863
842
  error "--source requires a path argument"
864
843
  exit 1
865
844
  fi
866
- SOURCE_FLAG="$2"
845
+ SOURCE_FLAG="$(normalize_path "$2")"
867
846
  shift 2
868
847
  ;;
869
848
  --yes|-y)
@@ -891,7 +870,7 @@ parse_args() {
891
870
  error "Unexpected argument: $1"
892
871
  exit 1
893
872
  fi
894
- TARGET="$1"
873
+ TARGET="$(normalize_path "$1")"
895
874
  shift
896
875
  ;;
897
876
  esac
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaia-framework",
3
- "version": "1.49.1",
3
+ "version": "1.49.2",
4
4
  "description": "GAIA — Generative Agile Intelligence Architecture installer",
5
5
  "bin": {
6
6
  "gaia-framework": "./bin/gaia-framework.js"