claude-flow-novice 2.10.1 → 2.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "AI agent orchestration framework with namespace-isolated skills, agents, and CFN Loop validation. Safe installation with ~0.01% collision risk.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -106,7 +106,7 @@ async function verifyCfnInstallation() {
106
106
  }
107
107
  }
108
108
 
109
- async function copyFiles(src, dest, pattern) {
109
+ async function copyFiles(src, dest, pattern, forceOverwrite = true) {
110
110
  try {
111
111
  if (!fs.existsSync(src)) {
112
112
  console.warn(chalk.yellow(`⚠️ Source not found: ${src}`));
@@ -121,15 +121,26 @@ async function copyFiles(src, dest, pattern) {
121
121
  for (const item of matched) {
122
122
  const itemSrc = path.join(src, item);
123
123
  const itemDest = path.join(dest, item);
124
+
125
+ // For cfn-prefixed items, remove existing to ensure clean update
126
+ if (forceOverwrite && fs.existsSync(itemDest)) {
127
+ fs.rmSync(itemDest, { recursive: true, force: true });
128
+ }
129
+
124
130
  await mkdirAsync(path.dirname(itemDest), { recursive: true });
125
131
  await cpAsync(itemSrc, itemDest, { recursive: true, force: true });
126
132
  }
127
- console.log(chalk.green(`✅ Copied ${matched.length} ${pattern} items from ${src}`));
133
+ console.log(chalk.green(`✅ Copied ${matched.length} ${pattern} items from ${src} (overwrite: ${forceOverwrite})`));
128
134
  } else {
129
- // Copy entire directory
135
+ // Copy entire directory (e.g., cfn-dev-team)
136
+ // Remove existing destination to ensure clean update
137
+ if (forceOverwrite && fs.existsSync(dest)) {
138
+ fs.rmSync(dest, { recursive: true, force: true });
139
+ }
140
+
130
141
  await mkdirAsync(path.dirname(dest), { recursive: true });
131
142
  await cpAsync(src, dest, { recursive: true, force: true });
132
- console.log(chalk.green(`✅ Copied ${src} → ${dest}`));
143
+ console.log(chalk.green(`✅ Copied ${src} → ${dest} (overwrite: ${forceOverwrite})`));
133
144
  }
134
145
  return true;
135
146
  } catch (error) {