@sebastienrousseau/dotfiles 0.2.511 → 0.2.513

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +2 -2
  3. package/docs/AI.md +2 -1
  4. package/docs/COPYRIGHT +1 -1
  5. package/docs/architecture/AI_COST_OPTIMIZATION.md +1 -0
  6. package/docs/archive/LEGACY_ROADMAP.md +4 -158
  7. package/docs/manual/00-introduction.md +1 -1
  8. package/docs/manual/01-concepts/02-trust-model.md +2 -1
  9. package/docs/manual/02-tutorials/02-add-wallpaper.md +6 -6
  10. package/docs/manual/02-tutorials/03-create-profile.md +1 -1
  11. package/docs/manual/02-tutorials/05-deploy-fleet.md +1 -1
  12. package/docs/manual/03-reference/02-config-files.md +1 -1
  13. package/docs/manual/03-reference/03-environment.md +1 -1
  14. package/docs/manual/04-cookbook/03-faq.md +1 -1
  15. package/docs/manual/05-appendices/B-security-checklist.md +2 -1
  16. package/docs/manual/command-index.md +1 -0
  17. package/docs/operations/ARCHITECTURE_ROADMAP.md +5 -143
  18. package/docs/operations/COVERAGE.md +30 -8
  19. package/docs/operations/REGISTRY.md +20 -19
  20. package/docs/operations/ROADMAP.md +3 -159
  21. package/docs/operations/ROADMAP_2026.md +5 -663
  22. package/docs/operations/ROADMAP_V0_2_503.md +5 -129
  23. package/docs/reference/POWERSHELL_PARITY.md +28 -27
  24. package/docs/reference/THEMES.md +1 -1
  25. package/docs/reference/TOOLS.md +1 -0
  26. package/docs/reference/UTILS.md +1 -0
  27. package/docs/schema/dot-registry-v1.json +33 -0
  28. package/docs/security/SCORECARD.md +1 -1
  29. package/install.sh +20 -11
  30. package/package.json +1 -1
  31. package/scripts/diagnostics/a2a-conformance.sh +0 -0
  32. package/scripts/diagnostics/aliases-manifest.sh +33 -6
  33. package/scripts/diagnostics/benchmark.sh +27 -1
  34. package/scripts/diagnostics/doctor.sh +18 -11
  35. package/scripts/diagnostics/health.sh +12 -4
  36. package/scripts/diagnostics/mcp-doctor.sh +3 -0
  37. package/scripts/diagnostics/secret-governance.sh +7 -1
  38. package/scripts/diagnostics/security-score.sh +14 -5
  39. package/scripts/diagnostics/verify_state.sh +9 -1
  40. package/scripts/diagnostics/workstation-attestation.sh +0 -0
  41. package/scripts/dot/commands/ai.sh +40 -31
  42. package/scripts/dot/commands/aliases.sh +28 -4
  43. package/scripts/dot/commands/appearance.sh +16 -0
  44. package/scripts/dot/commands/core.sh +17 -0
  45. package/scripts/dot/commands/diagnostics.sh +19 -0
  46. package/scripts/dot/commands/fleet.sh +1 -1
  47. package/scripts/dot/commands/manual.sh +4 -4
  48. package/scripts/dot/commands/meta.sh +87 -12
  49. package/scripts/dot/commands/registry.sh +164 -15
  50. package/scripts/dot/commands/secrets.sh +17 -0
  51. package/scripts/dot/commands/security.sh +17 -0
  52. package/scripts/dot/commands/tools.sh +19 -0
  53. package/scripts/dot/powershell/Dot.psm1 +146 -26
  54. package/scripts/fonts/install-nerd-fonts.sh +16 -10
  55. package/scripts/git-hooks/pre-commit-audit.sh +1 -1
  56. package/scripts/ops/ai-setup.sh +13 -6
  57. package/scripts/ops/bundle.sh +31 -5
  58. package/scripts/ops/chezmoi-apply.sh +5 -0
  59. package/scripts/ops/heal-tools.sh +39 -111
  60. package/scripts/ops/post-apply-repair.sh +0 -0
  61. package/scripts/ops/release.sh +14 -5
  62. package/scripts/qa/docs-coverage.sh +1 -1
  63. package/scripts/qa/reliability-audit.sh +4 -4
  64. package/scripts/qa/scorecard-snapshot.sh +3 -3
  65. package/scripts/qa/validate-examples.sh +0 -0
  66. package/scripts/qa/wsl-contract.sh +0 -0
  67. package/scripts/secrets/age-init.sh +15 -4
  68. package/scripts/theme/apply-gnome-theme.sh +6 -2
  69. package/scripts/theme/extract-theme.py +97 -33
  70. package/scripts/theme/rebuild-themes.sh +240 -35
  71. package/scripts/theme/switch.sh +26 -16
  72. package/scripts/theme/wallpaper-sync.sh +95 -7
  73. package/scripts/tools/detect-collisions.py +0 -0
  74. package/scripts/version-sync.sh +108 -44
@@ -24,6 +24,7 @@ EXCLUDE_FILES=(
24
24
  "docs/reference/FONTS.md"
25
25
  "docs/archive/LEGACY_ROADMAP.md"
26
26
  "docs/archive/PLAN.md"
27
+ "ROADMAP.md"
27
28
 
28
29
  # Roadmap + audit narratives — describe per-version work; refs to
29
30
  # prior versions are intentional and historical.
@@ -86,7 +87,7 @@ EXCLUDE_FILES=(
86
87
  "docs/operations/ARCHITECTURE_ROADMAP.md"
87
88
 
88
89
  # Dated release write-ups: each article records the release it
89
- # shipped in (e.g. "shipped in v0.2.510" + a link to that release
90
+ # shipped in (e.g. "shipped in vX.Y.Z" + a link to that release
90
91
  # tag). Those refs are historical fact, not current-version claims —
91
92
  # bumping them would falsify the history.
92
93
  "docs/articles/2026-07-05-fish-startup-abbr.md"
@@ -156,7 +157,11 @@ get_package_version() {
156
157
  fi
157
158
 
158
159
  local version
159
- version=$(jq -r '.version' "$package_file" 2>/dev/null)
160
+ if command -v jq &>/dev/null; then
161
+ version=$(jq -r '.version' "$package_file" 2>/dev/null)
162
+ else
163
+ version=$(sed -nE 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/p' "$package_file" | head -n 1)
164
+ fi
160
165
  if [[ "$version" == "null" || -z "$version" ]]; then
161
166
  log_error "Could not extract version from package.json"
162
167
  exit 1
@@ -186,22 +191,32 @@ find_version_files() {
186
191
  # the paths match the EXCLUDE_FILES entries (which have no "./"),
187
192
  # otherwise excluded historical docs get rewritten.
188
193
  cd "$PROJECT_ROOT"
189
- rg -l "v?$VERSION_PATTERN" --type md . 2>/dev/null | sed 's|^\./||' >"$temp_file" || true
194
+ if command -v rg &>/dev/null; then
195
+ rg -l "v?$VERSION_PATTERN" --type md . 2>/dev/null | sed 's|^\./||' >"$temp_file" || true
196
+ else
197
+ {
198
+ while IFS= read -r file; do
199
+ if grep -Eq "v?$VERSION_PATTERN" "$file" 2>/dev/null; then
200
+ printf '%s\n' "${file#./}"
201
+ fi
202
+ done < <(find . -type f -name '*.md' -print)
203
+ } >"$temp_file"
204
+ fi
190
205
 
191
206
  # Add known files that should be checked even if they don't have versions yet
192
- echo "README.md" >>"$temp_file"
193
- echo "docs/reference/FEATURES.md" >>"$temp_file"
194
- echo "docs/COPYRIGHT" >>"$temp_file"
195
-
196
207
  # Non-markdown and hidden-directory surfaces rg's `--type md` scan above
197
208
  # cannot reach: a shell script, and READMEs under the dotfile-hidden
198
209
  # `.chezmoitemplates/` tree (rg skips dot-dirs without --hidden). These
199
210
  # carry "current version" stamps that check-version-consistency.sh and
200
211
  # the test_version_consistency unit test enforce, so keep them in sync.
201
- echo "scripts/git-hooks/pre-commit-audit.sh" >>"$temp_file"
202
- echo "defaults/.chezmoitemplates/README.md" >>"$temp_file"
203
- echo "defaults/.chezmoitemplates/functions/README.md" >>"$temp_file"
204
- echo "defaults/.chezmoitemplates/aliases/README.md" >>"$temp_file"
212
+ printf '%s\n' \
213
+ "README.md" \
214
+ "docs/reference/FEATURES.md" \
215
+ "docs/COPYRIGHT" \
216
+ "scripts/git-hooks/pre-commit-audit.sh" \
217
+ "defaults/.chezmoitemplates/README.md" \
218
+ "defaults/.chezmoitemplates/functions/README.md" \
219
+ "defaults/.chezmoitemplates/aliases/README.md" >>"$temp_file"
205
220
 
206
221
  # Remove duplicates and filter existing files
207
222
  sort -u "$temp_file" | while IFS= read -r file; do
@@ -268,6 +283,7 @@ update_version_references() {
268
283
  log_warning "File not found: $file"
269
284
  continue
270
285
  fi
286
+ files_processed=$((files_processed + 1))
271
287
 
272
288
  # Skip milestone and other historical files
273
289
  if [[ "$(basename "$file")" == MILESTONE_* ]]; then
@@ -300,6 +316,10 @@ update_version_references() {
300
316
  sed_in_place "$temp_file" \
301
317
  -e "s|v$SED_VERSION_PATTERN standards maintained|v$target_version standards maintained|g"
302
318
  ;;
319
+ "docs/manual/00-introduction.md")
320
+ sed_in_place "$temp_file" \
321
+ -e "s|\.dotfiles\` v$SED_VERSION_PATTERN|.dotfiles\` v$target_version|g"
322
+ ;;
303
323
  *)
304
324
  # Update explicit markdown version labels, backticks, and parentheses.
305
325
  # Skip lines containing MILESTONE.
@@ -328,6 +348,7 @@ update_version_references() {
328
348
  cat "$temp_file" >"$file"
329
349
  log_success "Updated: $file"
330
350
  fi
351
+ rm -f "$temp_file"
331
352
  changes_made=$((changes_made + 1))
332
353
  else
333
354
  log_info "No changes needed: $file"
@@ -367,26 +388,49 @@ verify_version_consistency() {
367
388
 
368
389
  # Extract only dotfiles-targeted version references (ignore unrelated tool versions).
369
390
  local versions_in_file=()
370
- while IFS= read -r match; do
371
- while IFS= read -r version; do
372
- versions_in_file+=("$version")
373
- done < <(printf "%s\n" "$match" | rg -o "v?$VERSION_PATTERN" || true)
374
- done < <(
375
- rg -v "MILESTONE" "$file" 2>/dev/null | rg -o \
376
- -e "Version-v$VERSION_PATTERN" \
377
- -e "/releases/tag/v$VERSION_PATTERN" \
378
- -e "/dotfiles/v$VERSION_PATTERN/" \
379
- -e "\\*\\*Version\\*\\*:[[:space:]]*v?$VERSION_PATTERN" \
380
- -e "\\*\\*Dotfiles Version\\*\\*:[[:space:]]*v?$VERSION_PATTERN" \
381
- -e "(^|[[:space:]])Version:[[:space:]]*v?$VERSION_PATTERN" \
382
- -e "(^|[[:space:]])Dotfiles Version:[[:space:]]*v?$VERSION_PATTERN" \
383
- -e "Version[[:space:]]*\`v?$VERSION_PATTERN\`" \
384
- -e "\\(v$VERSION_PATTERN\\)" \
385
- -e "/v$VERSION_PATTERN/" \
386
- -e "v$VERSION_PATTERN\\b" \
387
- -e "dotfiles:v?$VERSION_PATTERN" \
388
- -e "notes — v$VERSION_PATTERN" || true
389
- )
391
+ if command -v rg &>/dev/null; then
392
+ while IFS= read -r match; do
393
+ while IFS= read -r version; do
394
+ versions_in_file+=("$version")
395
+ done < <(printf "%s\n" "$match" | rg -o "v?$VERSION_PATTERN" || true)
396
+ done < <(
397
+ rg -v "MILESTONE" "$file" 2>/dev/null | rg -o \
398
+ -e "Version-v$VERSION_PATTERN" \
399
+ -e "/releases/tag/v$VERSION_PATTERN" \
400
+ -e "/dotfiles/v$VERSION_PATTERN/" \
401
+ -e "\\*\\*Version\\*\\*:[[:space:]]*v?$VERSION_PATTERN" \
402
+ -e "\\*\\*Dotfiles Version\\*\\*:[[:space:]]*v?$VERSION_PATTERN" \
403
+ -e "(^|[[:space:]])Version:[[:space:]]*v?$VERSION_PATTERN" \
404
+ -e "(^|[[:space:]])Dotfiles Version:[[:space:]]*v?$VERSION_PATTERN" \
405
+ -e "Version[[:space:]]*\`v?$VERSION_PATTERN\`" \
406
+ -e "\\(v$VERSION_PATTERN\\)" \
407
+ -e "/v$VERSION_PATTERN/" \
408
+ -e "v$VERSION_PATTERN\\b" \
409
+ -e "dotfiles:v?$VERSION_PATTERN" \
410
+ -e "notes — v$VERSION_PATTERN" || true
411
+ )
412
+ else
413
+ while IFS= read -r match; do
414
+ while IFS= read -r version; do
415
+ versions_in_file+=("$version")
416
+ done < <(printf "%s\n" "$match" | grep -Eo "v?$VERSION_PATTERN" || true)
417
+ done < <(
418
+ grep -Ev "MILESTONE" "$file" 2>/dev/null | grep -Eo \
419
+ -e "Version-v$VERSION_PATTERN" \
420
+ -e "/releases/tag/v$VERSION_PATTERN" \
421
+ -e "/dotfiles/v$VERSION_PATTERN/" \
422
+ -e "\\*\\*Version\\*\\*:[[:space:]]*v?$VERSION_PATTERN" \
423
+ -e "\\*\\*Dotfiles Version\\*\\*:[[:space:]]*v?$VERSION_PATTERN" \
424
+ -e "(^|[[:space:]])Version:[[:space:]]*v?$VERSION_PATTERN" \
425
+ -e "(^|[[:space:]])Dotfiles Version:[[:space:]]*v?$VERSION_PATTERN" \
426
+ -e "Version[[:space:]]*\`v?$VERSION_PATTERN\`" \
427
+ -e "\\(v$VERSION_PATTERN\\)" \
428
+ -e "/v$VERSION_PATTERN/" \
429
+ -e "v$VERSION_PATTERN([^0-9.]|$)" \
430
+ -e "dotfiles:v?$VERSION_PATTERN" \
431
+ -e "notes — v$VERSION_PATTERN" || true
432
+ )
433
+ fi
390
434
 
391
435
  if [[ ${#versions_in_file[@]} -eq 0 ]]; then
392
436
  continue
@@ -457,6 +501,12 @@ main() {
457
501
  esac
458
502
  done
459
503
 
504
+ if [[ -n "${DOTFILES_COV_TMPDIR:-}" && "${DOTFILES_ALLOW_COVERAGE_WRITES:-0}" != "1" ]]; then
505
+ dry_run="true"
506
+ create_backup_flag="false"
507
+ log_info "Coverage sandbox detected; forcing --dry-run"
508
+ fi
509
+
460
510
  # Change to project root
461
511
  cd "$PROJECT_ROOT"
462
512
 
@@ -470,8 +520,11 @@ main() {
470
520
  fi
471
521
 
472
522
  # Find files with version references
473
- local version_files
474
- readarray -t version_files < <(find_version_files)
523
+ local version_files=()
524
+ local version_file
525
+ while IFS= read -r version_file; do
526
+ version_files+=("$version_file")
527
+ done < <(find_version_files)
475
528
 
476
529
  if [[ ${#version_files[@]} -eq 0 ]]; then
477
530
  log_warning "No files with version references found"
@@ -509,11 +562,33 @@ main() {
509
562
  fi
510
563
  fi
511
564
 
565
+ # package.json is the release-tooling source used when VERSION is omitted.
566
+ # A caller-supplied target must update it atomically before downstream
567
+ # verification, otherwise the repository immediately contains two versions.
568
+ local package_json="$PROJECT_ROOT/package.json"
569
+ if [[ "$dry_run" == "true" ]]; then
570
+ log_info "Would update package.json: version = \"$target_version\""
571
+ else
572
+ local package_tmp
573
+ package_tmp=$(umask 077 && mktemp)
574
+ if command -v jq >/dev/null 2>&1; then
575
+ jq --arg version "$target_version" '.version = $version' "$package_json" >"$package_tmp"
576
+ else
577
+ cp "$package_json" "$package_tmp"
578
+ sed_in_place "$package_tmp" "s|\"version\": \"$SED_VERSION_PATTERN\"|\"version\": \"$target_version\"|"
579
+ fi
580
+ cat "$package_tmp" >"$package_json"
581
+ rm -f "$package_tmp"
582
+ log_success "Updated package.json"
583
+ fi
584
+
512
585
  # Sync non-template script files that embed the version
513
586
  local script_files=(
514
587
  "bin/dot"
515
588
  "dot_local/bin/executable_tour"
516
589
  "install.sh"
590
+ "lib/dot/bento.sh"
591
+ "share/man/man1/dot.1"
517
592
  )
518
593
  for script_file in "${script_files[@]}"; do
519
594
  local full_path="$PROJECT_ROOT/$script_file"
@@ -574,16 +649,5 @@ EOF
574
649
  fi
575
650
  }
576
651
 
577
- # Ensure we have required tools
578
- if ! command -v jq &>/dev/null; then
579
- log_warning "jq is not installed — skipping version sync"
580
- exit 0
581
- fi
582
-
583
- if ! command -v rg &>/dev/null; then
584
- log_warning "ripgrep (rg) is not installed — skipping version sync"
585
- exit 0
586
- fi
587
-
588
652
  # Run main function
589
653
  main "$@"