@codebehind/agent-workflow 1.1.10 → 1.1.11

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebehind/agent-workflow",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Scaffold the agent-workflow spec-driven delivery framework into any repo",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,12 +26,29 @@ DEFAULT_BRANCH="$(${REPO_ROOT}/scripts/agent/git-detect-default-branch.sh origin
26
26
 
27
27
  mkdir -p "${RUN_ROOT}/worktrees"
28
28
 
29
+ copy_local_overrides() {
30
+ if [[ -f "${REPO_ROOT}/.mcp.json" ]]; then
31
+ cp "${REPO_ROOT}/.mcp.json" "${WORKTREE_DIR}/.mcp.json"
32
+ fi
33
+
34
+ while IFS= read -r src; do
35
+ rel="${src#${REPO_ROOT}/}"
36
+ dst="${WORKTREE_DIR}/${rel}"
37
+ mkdir -p "$(dirname "$dst")"
38
+ cp "$src" "$dst"
39
+ done < <(find "$REPO_ROOT" \
40
+ -path "$REPO_ROOT/.git" -prune -o \
41
+ -path "$REPO_ROOT/node_modules" -prune -o \
42
+ \( -name ".env" -o -name ".env.*" \) -print)
43
+ }
44
+
29
45
  git fetch origin --prune
30
46
 
31
47
  if git worktree list --porcelain | awk '/^worktree /{print $2}' | grep -Fxq "$WORKTREE_DIR"; then
32
48
  if [[ -d "$WORKTREE_DIR" ]]; then
33
49
  echo "Syncing existing worktree with origin/${DEFAULT_BRANCH}..." >&2
34
50
  git -C "$WORKTREE_DIR" rebase "origin/${DEFAULT_BRANCH}"
51
+ copy_local_overrides
35
52
  echo "WORKTREE_DIR=${WORKTREE_DIR}"
36
53
  exit 0
37
54
  else
@@ -45,6 +62,7 @@ fi
45
62
 
46
63
  rm -rf "$WORKTREE_DIR"
47
64
  git worktree add "$WORKTREE_DIR" -b "$BRANCH" "origin/${DEFAULT_BRANCH}"
65
+ copy_local_overrides
48
66
 
49
67
  cat <<OUT
50
68
  WORKTREE_DIR=${WORKTREE_DIR}