@cratis/pi 7.170.1 → 7.170.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.
@@ -66,6 +66,8 @@ suffix that follows a slash in it (`$PWD/.cratis/x` and `~+/.cratis/x` are treat
66
66
  directory), without parsing the expansion, and refused if a suffix is protected, which includes a read of a protected path through a variable. This is a
67
67
  best-effort lexical check, not enforcement: a variable holding the whole path still passes.
68
68
 
69
+ Git reflog selectors with unprotected prefixes (`stash@{0}`, `HEAD@{1}`, `branch@{upstream}`) are revisions, not paths.
70
+
69
71
  The shell-write reference scan keeps conservative leading-dot intersections: a tool named `Bash`,
70
72
  `SHELL`, and the hook process's options do not establish the execution shell's options. Globbed writes
71
73
  therefore remain blocked. Read operands under protected paths are not write targets: `rg -n`/`-l`,
@@ -405,6 +405,9 @@ if [ "$reference_mode" = 1 ]; then
405
405
  unset 'candidates[last]'
406
406
  new_content=""
407
407
  for candidate in "${candidates[@]}"; do
408
+ # Reflog selectors name revisions, unless the prefix or the literal path (or its symlink target) is protected.
409
+ if [[ "$candidate" =~ ^[A-Za-z0-9._/-]*@\{(-?[0-9]+|upstream|push|u)\}$ ]] \
410
+ && ! classify_file "${candidate%@*}" && ! classify_file "$candidate"; then continue; fi
408
411
  reference_pattern=0
409
412
  case "$candidate" in *'*'* | *'?'* | *'['* | *'{'* | *'@('* | *'+('* | *'!('*) reference_pattern=1 ;; esac
410
413
  if classify_file "$candidate" "$reference_pattern"; then printf '%s\n' "$candidate"; continue; fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.170.1",
3
+ "version": "7.170.2",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [