gaia-framework 1.50.0 → 1.52.0

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.50.0"
463
+ framework_version: "1.52.0"
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.50.0"
9
+ readonly VERSION="1.52.0"
10
10
  readonly GITHUB_REPO="https://github.com/jlouage/Gaia-framework.git"
11
11
  readonly MANIFEST_REL="_gaia/_config/manifest.yaml"
12
12
 
@@ -182,6 +182,77 @@ copy_with_backup() {
182
182
  [[ "$OPT_VERBOSE" == true ]] && detail "Updated (backed up): $dst" || true
183
183
  }
184
184
 
185
+ # Remove .resolved/*.yaml files from target _gaia/ directory.
186
+ # Called after cp/tar copy to replicate rsync's --exclude behavior.
187
+ # Only .resolved/*.yaml is relevant to the _gaia/ subtree; the other rsync
188
+ # --exclude patterns target _memory/ paths outside _gaia/ and never match.
189
+ clean_resolved_yaml() {
190
+ local target_gaia="$1"
191
+ find "$target_gaia" -path '*/.resolved/*.yaml' -delete 2>/dev/null || true
192
+ }
193
+
194
+ # Copy _gaia/ directory from source to target using a fallback chain:
195
+ # rsync → cp -rp → tar
196
+ # Tries each tool in order. If a tool is found but fails at runtime (e.g.,
197
+ # broken rsync stub on Windows), falls through to the next tool. Exits with
198
+ # a diagnostic error if all tools fail or none are available.
199
+ #
200
+ # Excludes .resolved/*.yaml files from the final output (rsync handles this
201
+ # natively via --exclude; cp and tar do a post-copy cleanup).
202
+ #
203
+ # Note: No symlinks currently exist in _gaia/. If symlinks are introduced
204
+ # in the future, verify that cp -rp behavior matches rsync -a on all
205
+ # target platforms (ADR-004).
206
+ copy_gaia_files() {
207
+ local src="$1" dst="$2"
208
+ local copy_done=false
209
+
210
+ # Try rsync first (preferred — handles excludes natively)
211
+ if command -v rsync >/dev/null 2>&1; then
212
+ if rsync -a \
213
+ --exclude='_memory/checkpoints/*.yaml' \
214
+ --exclude='_memory/checkpoints/completed/*.yaml' \
215
+ --exclude='.resolved/*.yaml' \
216
+ --exclude='_memory/*-sidecar/*.md' \
217
+ --exclude='_memory/*-sidecar/*.yaml' \
218
+ "$src/_gaia/" "$dst/_gaia/" 2>/dev/null; then
219
+ detail "Copied framework files using rsync"
220
+ copy_done=true
221
+ else
222
+ detail "rsync found but failed — trying fallback methods"
223
+ fi
224
+ fi
225
+
226
+ # Fallback: cp -rp (preserves permissions like rsync -a)
227
+ if [[ "$copy_done" == false ]] && command -v cp >/dev/null 2>&1; then
228
+ if cp -rp "$src/_gaia/" "$dst/_gaia/" 2>/dev/null; then
229
+ clean_resolved_yaml "$dst/_gaia"
230
+ detail "Copied framework files using cp -rp (rsync unavailable)"
231
+ copy_done=true
232
+ else
233
+ error "cp failed to copy framework files — check permissions and disk space"
234
+ exit 1
235
+ fi
236
+ fi
237
+
238
+ # Fallback: tar (last resort — available on virtually all POSIX systems)
239
+ if [[ "$copy_done" == false ]] && command -v tar >/dev/null 2>&1; then
240
+ if (tar -cf - -C "$src" _gaia | tar -xf - -C "$dst") 2>/dev/null; then
241
+ clean_resolved_yaml "$dst/_gaia"
242
+ detail "Copied framework files using tar (rsync and cp unavailable)"
243
+ copy_done=true
244
+ else
245
+ error "tar failed to copy framework files — check permissions and disk space"
246
+ exit 1
247
+ fi
248
+ fi
249
+
250
+ if [[ "$copy_done" == false ]]; then
251
+ error "No suitable copy tool found (tried rsync, cp, tar). Cannot copy framework files."
252
+ exit 1
253
+ fi
254
+ }
255
+
185
256
  append_if_missing() {
186
257
  local file="$1" marker="$2" content="$3"
187
258
  if [[ -f "$file" ]] && grep -qF "$marker" "$file"; then
@@ -261,18 +332,22 @@ cmd_init() {
261
332
  done
262
333
 
263
334
  # Step 2: Copy _gaia/ recursively (excluding checkpoints and .resolved/*.yaml)
335
+ # Uses rsync if available, falls back to cp -rp, then tar (ADR-004: Windows best-effort)
264
336
  step "Copying framework files..."
265
337
  if [[ "$OPT_DRY_RUN" == true ]]; then
266
- detail "[dry-run] Would copy _gaia/ (excluding checkpoints and .resolved/*.yaml)"
338
+ if command -v rsync >/dev/null 2>&1; then
339
+ detail "[dry-run] Would copy _gaia/ using rsync (excluding checkpoints and .resolved/*.yaml)"
340
+ elif command -v cp >/dev/null 2>&1; then
341
+ detail "[dry-run] Would copy _gaia/ using cp -rp (rsync unavailable)"
342
+ elif command -v tar >/dev/null 2>&1; then
343
+ detail "[dry-run] Would copy _gaia/ using tar (rsync and cp unavailable)"
344
+ else
345
+ error "No suitable copy tool found (tried rsync, cp, tar)"
346
+ exit 1
347
+ fi
267
348
  else
268
349
  mkdir -p "$TARGET/_gaia"
269
- rsync -a \
270
- --exclude='_memory/checkpoints/*.yaml' \
271
- --exclude='_memory/checkpoints/completed/*.yaml' \
272
- --exclude='.resolved/*.yaml' \
273
- --exclude='_memory/*-sidecar/*.md' \
274
- --exclude='_memory/*-sidecar/*.yaml' \
275
- "$source/_gaia/" "$TARGET/_gaia/"
350
+ copy_gaia_files "$source" "$TARGET"
276
351
  fi
277
352
 
278
353
  # Step 3: Create _memory/ directory tree at project root (ADR-013)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaia-framework",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "description": "GAIA — Generative Agile Intelligence Architecture installer",
5
5
  "bin": {
6
6
  "gaia-framework": "./bin/gaia-framework.js"