@sebastienrousseau/dotfiles 0.2.512 → 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 (34) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +2 -2
  3. package/docs/COPYRIGHT +1 -1
  4. package/docs/manual/00-introduction.md +1 -1
  5. package/docs/manual/01-concepts/02-trust-model.md +2 -1
  6. package/docs/manual/03-reference/03-environment.md +1 -1
  7. package/docs/manual/04-cookbook/03-faq.md +1 -1
  8. package/docs/manual/05-appendices/B-security-checklist.md +2 -1
  9. package/docs/operations/COVERAGE.md +7 -8
  10. package/docs/operations/REGISTRY.md +20 -19
  11. package/docs/reference/POWERSHELL_PARITY.md +28 -27
  12. package/docs/schema/dot-registry-v1.json +33 -0
  13. package/docs/security/SCORECARD.md +1 -1
  14. package/install.sh +20 -11
  15. package/package.json +1 -1
  16. package/scripts/diagnostics/a2a-conformance.sh +0 -0
  17. package/scripts/diagnostics/health.sh +4 -1
  18. package/scripts/diagnostics/mcp-doctor.sh +0 -0
  19. package/scripts/diagnostics/verify_state.sh +0 -0
  20. package/scripts/diagnostics/workstation-attestation.sh +0 -0
  21. package/scripts/dot/commands/ai.sh +3 -1
  22. package/scripts/dot/commands/fleet.sh +1 -1
  23. package/scripts/dot/commands/registry.sh +164 -15
  24. package/scripts/dot/powershell/Dot.psm1 +146 -26
  25. package/scripts/fonts/install-nerd-fonts.sh +16 -10
  26. package/scripts/git-hooks/pre-commit-audit.sh +1 -1
  27. package/scripts/ops/heal-tools.sh +39 -111
  28. package/scripts/ops/post-apply-repair.sh +0 -0
  29. package/scripts/qa/reliability-audit.sh +3 -3
  30. package/scripts/qa/scorecard-snapshot.sh +3 -3
  31. package/scripts/qa/validate-examples.sh +0 -0
  32. package/scripts/qa/wsl-contract.sh +0 -0
  33. package/scripts/tools/detect-collisions.py +0 -0
  34. package/scripts/version-sync.sh +27 -0
@@ -3,6 +3,10 @@
3
3
  # Copyright (c) 2015-2026 Sebastien Rousseau
4
4
  # shellcheck disable=SC2034
5
5
  # =============================================================================
6
+
7
+ HEAL_TOOLS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ # shellcheck source=../../lib/dot/verified-download.sh disable=SC1091
9
+ source "$HEAL_TOOLS_DIR/../../lib/dot/verified-download.sh"
6
10
  # heal-tools.sh — Tool installation helpers for heal.sh
7
11
  # Sourced by heal.sh; inherits set -euo pipefail, ui.sh, and shared variables.
8
12
  # =============================================================================
@@ -123,33 +127,56 @@ get_package_name() {
123
127
  # Usage: _pkg_install "label" completed total command [args...]
124
128
  _pkg_install() { ui_run_cmd "$@"; }
125
129
 
126
- # Resolve latest GitHub release tag for a repo
127
- _gh_latest_tag() {
128
- curl -fsSLI -o /dev/null -w '%{url_effective}' "https://github.com/$1/releases/latest" | sed 's|.*/||'
130
+ _mise_tool_specs() {
131
+ case "$1" in
132
+ nushell) printf '%s\n' 'aqua:nushell/nushell@0.114.1' ;;
133
+ pueue)
134
+ printf '%s\n' 'aqua:Nukesor/pueue/pueue@4.0.4'
135
+ printf '%s\n' 'aqua:Nukesor/pueue/pueued@4.0.4'
136
+ ;;
137
+ wasmtime) printf '%s\n' 'wasmtime@47.0.3' ;;
138
+ sops) printf '%s\n' 'sops@3.13.3' ;;
139
+ yazi) printf '%s\n' 'yazi@26.5.6' ;;
140
+ zellij) printf '%s\n' 'zellij@0.44.3' ;;
141
+ *) return 1 ;;
142
+ esac
143
+ }
144
+
145
+ _install_with_mise() {
146
+ local cmd="$1" spec
147
+ command -v mise >/dev/null 2>&1 || return 1
148
+ while IFS= read -r spec; do
149
+ [[ -n "$spec" ]] || continue
150
+ # --pin writes an exact version to the user's writable global config;
151
+ # aqua/ubi backends verify publisher-provided checksums before install.
152
+ mise use --global --pin "$spec" || return 1
153
+ done < <(_mise_tool_specs "$cmd")
129
154
  }
130
155
 
131
156
  # Install a single package (dispatcher for _pkg_install to call in subshell)
132
157
  _do_install() {
133
158
  local cmd="$1"
134
159
  local pkg_mgr="$2"
135
- local bin_dir="$HOME/.local/bin"
136
- mkdir -p "$bin_dir"
160
+
161
+ case "$cmd" in
162
+ nushell | pueue | wasmtime | sops | yazi | zellij)
163
+ if _install_with_mise "$cmd"; then
164
+ return 0
165
+ fi
166
+ log_warn "mise install unavailable for $cmd; trying $pkg_mgr"
167
+ ;;
168
+ esac
137
169
 
138
170
  # Binary/curl installers for tools not in standard apt repos
139
171
  case "$cmd" in
140
172
  starship)
141
173
  local installer
142
174
  installer=$(umask 077 && mktemp)
143
- if ! curl -fsSL -o "$installer" https://starship.rs/install.sh; then
175
+ if ! download_verified_script https://starship.rs/install.sh "$installer"; then
144
176
  rm -f "$installer"
145
177
  log_error "Failed to download starship installer"
146
178
  return 1
147
179
  fi
148
- if ! head -1 "$installer" | grep -q '^#!/'; then
149
- rm -f "$installer"
150
- log_error "starship installer does not look like a shell script"
151
- return 1
152
- fi
153
180
  sh "$installer" --yes
154
181
  local rc=$?
155
182
  rm -f "$installer"
@@ -158,115 +185,16 @@ _do_install() {
158
185
  atuin)
159
186
  local installer
160
187
  installer=$(umask 077 && mktemp)
161
- if ! curl -fsSL -o "$installer" https://setup.atuin.sh; then
188
+ if ! download_verified_script https://setup.atuin.sh "$installer"; then
162
189
  rm -f "$installer"
163
190
  log_error "Failed to download atuin installer"
164
191
  return 1
165
192
  fi
166
- if ! head -1 "$installer" | grep -q '^#!/'; then
167
- rm -f "$installer"
168
- log_error "atuin installer does not look like a shell script"
169
- return 1
170
- fi
171
193
  bash "$installer" --yes
172
194
  local rc=$?
173
195
  rm -f "$installer"
174
196
  return $rc
175
197
  ;;
176
- nushell)
177
- local arch tag ver
178
- arch=$(uname -m)
179
- tag=$(_gh_latest_tag "nushell/nushell")
180
- ver="${tag#v}"
181
- local tmp
182
- tmp=$(mktemp -d)
183
- curl -fsSL -o "$tmp/nu.tar.gz" \
184
- "https://github.com/nushell/nushell/releases/download/${tag}/nu-${ver}-${arch}-unknown-linux-musl.tar.gz" &&
185
- tar xzf "$tmp/nu.tar.gz" -C "$tmp" --strip-components=1 &&
186
- install -m 755 "$tmp/nu" "$bin_dir/nu"
187
- local rc=$?
188
- rm -rf "$tmp"
189
- return $rc
190
- ;;
191
- pueue)
192
- local arch
193
- arch=$(uname -m)
194
- curl -fsSL -o "$bin_dir/pueue" \
195
- "https://github.com/Nukesor/pueue/releases/latest/download/pueue-${arch}-unknown-linux-musl" &&
196
- chmod +x "$bin_dir/pueue"
197
- curl -fsSL -o "$bin_dir/pueued" \
198
- "https://github.com/Nukesor/pueue/releases/latest/download/pueued-${arch}-unknown-linux-musl" &&
199
- chmod +x "$bin_dir/pueued"
200
- return $?
201
- ;;
202
- wasmtime)
203
- local arch tag
204
- arch=$(uname -m)
205
- tag=$(_gh_latest_tag "bytecodealliance/wasmtime")
206
- local tmp
207
- tmp=$(mktemp -d)
208
- # xz-utils required for .tar.xz extraction
209
- command -v xz >/dev/null 2>&1 || sudo apt-get install -y -qq xz-utils >/dev/null 2>&1 || true
210
- curl -fsSL -o "$tmp/wasmtime.tar.xz" \
211
- "https://github.com/bytecodealliance/wasmtime/releases/download/${tag}/wasmtime-${tag}-${arch}-linux.tar.xz" &&
212
- tar xJf "$tmp/wasmtime.tar.xz" -C "$tmp" --strip-components=1 &&
213
- install -m 755 "$tmp/wasmtime" "$bin_dir/wasmtime"
214
- local rc=$?
215
- rm -rf "$tmp"
216
- return $rc
217
- ;;
218
- sops)
219
- local arch tag
220
- arch=$(uname -m)
221
- [[ "$arch" == "x86_64" ]] && arch="amd64"
222
- [[ "$arch" == "aarch64" ]] && arch="arm64"
223
- tag=$(_gh_latest_tag "getsops/sops")
224
- curl -fsSL -o "$bin_dir/sops" \
225
- "https://github.com/getsops/sops/releases/download/${tag}/sops-${tag}.linux.${arch}" &&
226
- chmod +x "$bin_dir/sops"
227
- return $?
228
- ;;
229
- hyperfine)
230
- local arch tag
231
- arch=$(uname -m)
232
- tag=$(_gh_latest_tag "sharkdp/hyperfine")
233
- local tmp
234
- tmp=$(mktemp -d)
235
- curl -fsSL -o "$tmp/hyperfine.tar.gz" \
236
- "https://github.com/sharkdp/hyperfine/releases/download/${tag}/hyperfine-${tag}-${arch}-unknown-linux-musl.tar.gz" &&
237
- tar xzf "$tmp/hyperfine.tar.gz" -C "$tmp" --strip-components=1 &&
238
- install -m 755 "$tmp/hyperfine" "$bin_dir/hyperfine"
239
- local rc=$?
240
- rm -rf "$tmp"
241
- return $rc
242
- ;;
243
- yazi)
244
- local arch
245
- arch=$(uname -m)
246
- local url="https://github.com/sxyazi/yazi/releases/latest/download/yazi-${arch}-unknown-linux-musl.zip"
247
- local tmp
248
- tmp=$(mktemp -d)
249
- command -v unzip >/dev/null 2>&1 || sudo apt-get install -y -qq unzip
250
- curl -fsSL -o "$tmp/yazi.zip" "$url" &&
251
- (cd "$tmp" && unzip -oq yazi.zip) &&
252
- install -m 755 "$tmp"/yazi-*/yazi "$bin_dir/yazi"
253
- local rc=$?
254
- rm -rf "$tmp"
255
- return $rc
256
- ;;
257
- zellij)
258
- local arch
259
- arch=$(uname -m)
260
- local url="https://github.com/zellij-org/zellij/releases/latest/download/zellij-${arch}-unknown-linux-musl.tar.gz"
261
- local tmp
262
- tmp=$(mktemp -d)
263
- curl -fsSL -o "$tmp/zellij.tar.gz" "$url" &&
264
- tar xzf "$tmp/zellij.tar.gz" -C "$tmp" &&
265
- install -m 755 "$tmp/zellij" "$bin_dir/zellij"
266
- local rc=$?
267
- rm -rf "$tmp"
268
- return $rc
269
- ;;
270
198
  esac
271
199
 
272
200
  # System package manager
File without changes
@@ -70,7 +70,7 @@ unit_tests() {
70
70
 
71
71
  integration_tests() {
72
72
  cd "$REPO_ROOT"
73
- RUN_INTEGRATION=1 ./tests/framework/test_runner.sh --jobs auto -i
73
+ ./tests/framework/test_runner.sh --jobs auto --integration-only
74
74
  }
75
75
 
76
76
  coverage_gate() {
@@ -123,11 +123,11 @@ fi
123
123
 
124
124
  printf 'Reliability Audit\n'
125
125
  printf 'Platform: %s\n' "$(platform_name)"
126
- printf 'Coverage floor: %s%%\n' "$min_coverage"
126
+ printf 'Executable module-mapping floor: %s%%\n' "$min_coverage"
127
127
 
128
128
  run_step "Shell syntax" shell_syntax
129
129
  run_step "Unit suite" unit_tests
130
- run_step "Module coverage" coverage_gate
130
+ run_step "Executable module mapping" coverage_gate
131
131
  run_step "Docs coverage" docs_coverage_gate
132
132
  run_step "Traceability coverage" traceability_gate
133
133
  run_step "Executable examples" example_gate
@@ -20,7 +20,7 @@
20
20
 
21
21
  set -euo pipefail
22
22
 
23
- REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
23
+ REPO_ROOT="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
24
24
  cd "$REPO_ROOT"
25
25
 
26
26
  mode="write"
@@ -51,7 +51,7 @@ if ! command -v jq >/dev/null 2>&1; then
51
51
  exit 2
52
52
  fi
53
53
 
54
- payload="$(curl -sSfL "$api")" || {
54
+ payload="$(curl --proto '=https' --tlsv1.2 -fsSL --connect-timeout 10 --max-time 30 "$api")" || {
55
55
  echo "Scorecard API unreachable: $api" >&2
56
56
  exit 2
57
57
  }
@@ -75,7 +75,7 @@ trap 'rm -f "$block"' EXIT
75
75
  | [.name, (.score|tostring), ((.reason // "") | gsub("\\|"; "\\|") | .[0:100])]
76
76
  | "| " + (. | join(" | ")) + " |"'
77
77
  # shellcheck disable=SC2016 # backticks here are markdown code-spans, not subshells
78
- printf '\n_Refresh: `scripts/qa/scorecard-snapshot.sh` · CI check: `lint/scorecard-snapshot` (planned)._\n'
78
+ printf '\n_Refresh: `scripts/qa/scorecard-snapshot.sh` · Monitoring: `.github/workflows/scorecard.yml`._\n'
79
79
  printf '<!-- END scorecard-snapshot -->\n'
80
80
  } >"$block"
81
81
 
File without changes
File without changes
File without changes
@@ -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.
@@ -315,6 +316,10 @@ update_version_references() {
315
316
  sed_in_place "$temp_file" \
316
317
  -e "s|v$SED_VERSION_PATTERN standards maintained|v$target_version standards maintained|g"
317
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
+ ;;
318
323
  *)
319
324
  # Update explicit markdown version labels, backticks, and parentheses.
320
325
  # Skip lines containing MILESTONE.
@@ -557,11 +562,33 @@ main() {
557
562
  fi
558
563
  fi
559
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
+
560
585
  # Sync non-template script files that embed the version
561
586
  local script_files=(
562
587
  "bin/dot"
563
588
  "dot_local/bin/executable_tour"
564
589
  "install.sh"
590
+ "lib/dot/bento.sh"
591
+ "share/man/man1/dot.1"
565
592
  )
566
593
  for script_file in "${script_files[@]}"; do
567
594
  local full_path="$PROJECT_ROOT/$script_file"