@the-bearded-bear/claude-craft 7.32.0 → 7.33.0-next.95a645b

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.
@@ -0,0 +1,134 @@
1
+ #!/usr/bin/env bash
2
+ # pack-repo-fallback.sh — Fallback shell natif pour /common:pack-repo
3
+ # Utilisé quand repomix (npm) n'est pas disponible.
4
+ # Limitations : pas de compression, token count estimé (4 chars ≈ 1 token).
5
+ #
6
+ # Usage: bash pack-repo-fallback.sh [--format=markdown|plain] [--output=<path>] [--include=<glob>] [--exclude=<pattern>]
7
+
8
+ set -euo pipefail
9
+
10
+ FORMAT="markdown"
11
+ OUTPUT="./pack-repo-output.md"
12
+ INCLUDE=""
13
+ EXCLUDE_EXTRA=""
14
+
15
+ # Exclusions par défaut (couvre 95% des cas)
16
+ DEFAULT_EXCLUDES=(
17
+ "node_modules" "vendor" "dist" "build" ".git" "coverage"
18
+ ".next" ".nuxt" ".svelte-kit" "target" "bin" "obj"
19
+ "__pycache__" ".pytest_cache" ".mypy_cache" ".ruff_cache"
20
+ ".claude/scheduled_tasks.lock"
21
+ )
22
+
23
+ # Extensions binaires à exclure
24
+ BINARY_EXTS="jpg|jpeg|png|gif|webp|ico|svg|woff|woff2|ttf|eot|mp3|mp4|mov|avi|pdf|zip|tar|gz|7z|rar|exe|dll|so|dylib|class|jar|war|pyc|pyo|o|a"
25
+
26
+ # Parse args
27
+ for arg in "$@"; do
28
+ case $arg in
29
+ --format=*) FORMAT="${arg#*=}" ;;
30
+ --output=*) OUTPUT="${arg#*=}" ;;
31
+ --include=*) INCLUDE="${arg#*=}" ;;
32
+ --exclude=*) EXCLUDE_EXTRA="${arg#*=}" ;;
33
+ *) echo "Unknown arg: $arg" >&2; exit 1 ;;
34
+ esac
35
+ done
36
+
37
+ if [[ "$FORMAT" != "markdown" && "$FORMAT" != "plain" ]]; then
38
+ echo "❌ Format non supporté en fallback : $FORMAT (markdown|plain uniquement)" >&2
39
+ exit 1
40
+ fi
41
+
42
+ echo "📦 Pack repo (fallback shell) → $OUTPUT"
43
+ echo " Format: $FORMAT | Root: $(pwd)"
44
+
45
+ # Build find excludes
46
+ FIND_EXCLUDES=""
47
+ for excl in "${DEFAULT_EXCLUDES[@]}"; do
48
+ FIND_EXCLUDES+=" -not -path '*/$excl/*' -not -path '*/$excl'"
49
+ done
50
+ if [[ -n "$EXCLUDE_EXTRA" ]]; then
51
+ FIND_EXCLUDES+=" -not -path '*$EXCLUDE_EXTRA*'"
52
+ fi
53
+
54
+ # Collect files — respect .gitignore si disponible
55
+ if command -v git &>/dev/null && git rev-parse --git-dir &>/dev/null; then
56
+ FILES=$(git ls-files --cached --others --exclude-standard 2>/dev/null | grep -Ev "\.($BINARY_EXTS)$" || true)
57
+ else
58
+ FILES=$(eval "find . -type f $FIND_EXCLUDES" | grep -Ev "\.($BINARY_EXTS)$" | sed 's|^\./||')
59
+ fi
60
+
61
+ if [[ -n "$INCLUDE" ]]; then
62
+ FILES=$(echo "$FILES" | grep -E "$INCLUDE" || true)
63
+ fi
64
+
65
+ FILE_COUNT=$(echo "$FILES" | grep -c . || echo 0)
66
+
67
+ if [[ "$FILE_COUNT" == "0" ]]; then
68
+ echo "⚠️ Aucun fichier à packer." >&2
69
+ exit 1
70
+ fi
71
+
72
+ # Generate output
73
+ {
74
+ if [[ "$FORMAT" == "markdown" ]]; then
75
+ echo "# Repository Pack (fallback)"
76
+ echo ""
77
+ echo "- **Generated:** $(date -Iseconds)"
78
+ echo "- **Root:** $(pwd)"
79
+ echo "- **Files included:** $FILE_COUNT"
80
+ echo "- **Tool:** pack-repo-fallback.sh (native bash)"
81
+ echo ""
82
+ echo "---"
83
+ echo ""
84
+ else
85
+ echo "================================================================"
86
+ echo "REPOSITORY PACK — $(date -Iseconds)"
87
+ echo "Files: $FILE_COUNT | Root: $(pwd)"
88
+ echo "================================================================"
89
+ echo ""
90
+ fi
91
+
92
+ while IFS= read -r file; do
93
+ [[ -z "$file" || ! -f "$file" ]] && continue
94
+
95
+ # Skip files > 500KB (likely generated/binary)
96
+ size=$(wc -c < "$file" 2>/dev/null || echo 0)
97
+ [[ "$size" -gt 512000 ]] && continue
98
+
99
+ if [[ "$FORMAT" == "markdown" ]]; then
100
+ ext="${file##*.}"
101
+ echo "## \`$file\`"
102
+ echo ""
103
+ echo "\`\`\`${ext}"
104
+ cat "$file"
105
+ echo ""
106
+ echo "\`\`\`"
107
+ echo ""
108
+ else
109
+ echo "================================================================"
110
+ echo "FILE: $file"
111
+ echo "================================================================"
112
+ cat "$file"
113
+ echo ""
114
+ fi
115
+ done <<< "$FILES"
116
+ } > "$OUTPUT"
117
+
118
+ # Token estimation (4 chars ≈ 1 token for English code, conservative)
119
+ BYTES=$(wc -c < "$OUTPUT")
120
+ EST_TOKENS=$((BYTES / 4))
121
+
122
+ echo "✅ Pack généré : $OUTPUT"
123
+ echo " Files: $FILE_COUNT"
124
+ echo " Size: $BYTES bytes"
125
+ echo " Tokens: ~$EST_TOKENS (estimation 4 chars/token)"
126
+
127
+ if [[ "$EST_TOKENS" -gt 200000 ]]; then
128
+ echo ""
129
+ echo "⚠️ ATTENTION : > 200k tokens estimés. Risque de dépassement contexte LLM."
130
+ echo " Solutions :"
131
+ echo " - Installer repomix (npm) pour compression : npm install -g repomix"
132
+ echo " - Restreindre avec --include=<glob>"
133
+ echo " - Découper par sous-dossier"
134
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-bearded-bear/claude-craft",
3
- "version": "7.32.0",
3
+ "version": "7.33.0-next.95a645b",
4
4
  "description": "A comprehensive framework for AI-assisted development with Claude Code. Install standardized rules, agents, and commands for your projects.",
5
5
  "type": "module",
6
6
  "main": "cli/index.js",