claude-dev-kit 2.1.5 → 2.1.7

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/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "claude-dev-kit",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "Transform Claude Code into a fully autonomous development team — orchestrated sub-agents for planning, implementation, testing, and review.",
5
5
  "bin": {
6
6
  "claude-dev-kit": "./bin/claude-dev-kit.js"
7
7
  },
8
+ "scripts": {
9
+ "test:installer": "bash scripts/test-installer-smoke.sh"
10
+ },
8
11
  "files": [
9
12
  "bin/",
10
13
  ".claude/agents/",
@@ -101,10 +101,14 @@ mcp_add() {
101
101
  # ─── Main ─────────────────────────────────────────────────────────────────────
102
102
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
103
103
  KIT_ROOT="$(dirname "$SCRIPT_DIR")"
104
- TARGET="${1:-${TARGET:-$(pwd)}}"
105
104
  MCP_ONLY=false
106
105
 
107
- [[ "${1:-}" == "--mcp-only" ]] && MCP_ONLY=true && TARGET="${TARGET:-$(pwd)}"
106
+ if [[ "${1:-}" == "--mcp-only" ]]; then
107
+ MCP_ONLY=true
108
+ TARGET="${TARGET:-$(pwd)}"
109
+ else
110
+ TARGET="${1:-${TARGET:-$(pwd)}}"
111
+ fi
108
112
 
109
113
  # Install log — all subprocess output goes here instead of being suppressed
110
114
  LOG_FILE="$TARGET/.claude/install.log"
@@ -198,7 +202,10 @@ header "Phase 2: Configure Claude MCP integrations"
198
202
  echo -e " ${DIM}MCPs extend Claude with tools for your Git platform, ticket system, and design tools.${NC}"
199
203
  echo ""
200
204
 
201
- if ! command -v claude &>/dev/null; then
205
+ if [[ "${CI:-}" == "true" ]]; then
206
+ info "CI mode detected — skipping MCP setup"
207
+ echo ""
208
+ elif ! command -v claude &>/dev/null; then
202
209
  warn "Claude CLI not found — cannot configure MCPs."
203
210
  info "Install the Claude CLI: https://claude.ai/code"
204
211
  info "Then re-run: bash $0 --mcp-only"
@@ -438,7 +445,7 @@ echo -e " 2. ${CYAN}Update CLAUDE.md${NC} with your project's stack and convent
438
445
  echo -e " ${DIM}(Or run /init in Claude Code to auto-generate it)${NC}"
439
446
  echo ""
440
447
  echo -e " 3. ${CYAN}Add tool permissions${NC} to .claude/settings.json for your build commands:"
441
- echo -e ' ${DIM}e.g. "Bash(npm run:*)", "Bash(pytest:*)", "Bash(cargo:*)"${NC}'
448
+ echo -e " ${DIM}e.g. \"Bash(npm run:*)\", \"Bash(pytest:*)\", \"Bash(cargo:*)\"${NC}"
442
449
  echo ""
443
450
  echo -e " 4. ${CYAN}Open Claude Code${NC} in your project and run:"
444
451
  echo -e " ${BOLD}/init${NC} — auto-detect stack and configure agents"
@@ -10,7 +10,9 @@
10
10
  #
11
11
  # Safe to run standalone. Exit codes: 0 = success, 1 = aborted/error.
12
12
 
13
- set -euo pipefail
13
+ # Bash 3.x treats empty arrays as unbound under `set -u`, which breaks
14
+ # migration on stock macOS shells. Keep `-e` and `pipefail`, but avoid `-u`.
15
+ set -eo pipefail
14
16
 
15
17
  # ─── Args ─────────────────────────────────────────────────────────────────────
16
18
  KIT_ROOT="${1:-}"
@@ -45,7 +47,6 @@ dim() { echo -e "${DIM}$*${NC}"; }
45
47
  CI_MODE="${CI:-false}"
46
48
 
47
49
  # ─── Section 1: Load existing manifest ────────────────────────────────────────
48
- declare -A manifest_set
49
50
  IS_FIRST_INSTALL=false
50
51
 
51
52
  mkdir -p "$TGT_CLAUDE"
@@ -54,7 +55,6 @@ if [[ -f "$MANIFEST" ]]; then
54
55
  while IFS= read -r line; do
55
56
  [[ "$line" =~ ^# ]] && continue
56
57
  [[ -z "$line" ]] && continue
57
- manifest_set["$line"]=1
58
58
  done < "$MANIFEST"
59
59
  else
60
60
  IS_FIRST_INSTALL=true
@@ -175,14 +175,41 @@ if [[ "$CI_MODE" != "true" && ${#cat_modified[@]} -eq 0 ]]; then
175
175
  fi
176
176
 
177
177
  # ─── Section 6: Resolve MODIFIED files interactively ──────────────────────────
178
- declare -A resolutions
178
+ declare -a resolution_files=()
179
+ declare -a resolution_actions=()
180
+
181
+ set_resolution() {
182
+ local file="$1"
183
+ local action="$2"
184
+ local i
185
+ for (( i=0; i<${#resolution_files[@]}; i++ )); do
186
+ if [[ "${resolution_files[$i]}" == "$file" ]]; then
187
+ resolution_actions[$i]="$action"
188
+ return
189
+ fi
190
+ done
191
+ resolution_files+=("$file")
192
+ resolution_actions+=("$action")
193
+ }
194
+
195
+ get_resolution() {
196
+ local file="$1"
197
+ local i
198
+ for (( i=0; i<${#resolution_files[@]}; i++ )); do
199
+ if [[ "${resolution_files[$i]}" == "$file" ]]; then
200
+ printf '%s\n' "${resolution_actions[$i]}"
201
+ return
202
+ fi
203
+ done
204
+ printf 'keep\n'
205
+ }
179
206
 
180
207
  if [[ ${#cat_modified[@]} -gt 0 ]]; then
181
208
  if [[ "$CI_MODE" == "true" ]]; then
182
209
  warn "CI mode — all ${#cat_modified[@]} modified file(s) will be preserved (keeping your versions)"
183
210
  warn "To update them: run scripts/migrate.sh manually and choose [u] for each"
184
211
  for rel in "${cat_modified[@]}"; do
185
- resolutions["$rel"]="keep"
212
+ set_resolution "$rel" "keep"
186
213
  done
187
214
  else
188
215
  header "Resolving modified files"
@@ -202,12 +229,12 @@ if [[ ${#cat_modified[@]} -gt 0 ]]; then
202
229
 
203
230
  case "$choice" in
204
231
  k|K)
205
- resolutions["$rel"]="keep"
232
+ set_resolution "$rel" "keep"
206
233
  info "Keeping your version"
207
234
  break
208
235
  ;;
209
236
  u|U)
210
- resolutions["$rel"]="cdk"
237
+ set_resolution "$rel" "cdk"
211
238
  info "Will use CDK version"
212
239
  break
213
240
  ;;
@@ -264,7 +291,7 @@ done
264
291
 
265
292
  # Apply MODIFIED based on user decisions
266
293
  for rel in "${cat_modified[@]}"; do
267
- case "${resolutions[$rel]:-keep}" in
294
+ case "$(get_resolution "$rel")" in
268
295
  cdk)
269
296
  mkdir -p "$(dirname "$TGT_CLAUDE/$rel")"
270
297
  cp "$CDK_CLAUDE/$rel" "$TGT_CLAUDE/$rel"
@@ -287,6 +314,10 @@ merge_settings() {
287
314
  local cdk_settings="$CDK_CLAUDE/settings.json"
288
315
  local merge_script="$KIT_ROOT/scripts/lib/merge-settings.js"
289
316
 
317
+ if [[ ! -f "$cdk_settings" ]]; then
318
+ cdk_settings="$CDK_CLAUDE/settings.json.example"
319
+ fi
320
+
290
321
  if [[ ! -f "$cdk_settings" ]]; then
291
322
  warn "settings.json: CDK source not found — skipping"
292
323
  return