claude-flow-novice 2.10.0 → 2.10.1

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.0",
3
+ "version": "2.10.1",
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",
@@ -15,7 +15,26 @@ const mkdirAsync = promisify(fs.mkdir);
15
15
  const existsAsync = promisify(fs.exists);
16
16
 
17
17
  // Find the CFN package root (works both in dev and installed contexts)
18
- const cfnRoot = path.resolve(process.cwd(), 'node_modules', 'claude-flow-novice');
18
+ function findCfnRoot() {
19
+ // During postinstall, we're inside the package being installed
20
+ const packageJsonPath = path.resolve(__dirname, '..', 'package.json');
21
+ if (fs.existsSync(packageJsonPath)) {
22
+ try {
23
+ const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
24
+ if (pkg.name === 'claude-flow-novice') {
25
+ // We're running from within the claude-flow-novice package (postinstall)
26
+ return path.resolve(__dirname, '..');
27
+ }
28
+ } catch (e) {
29
+ // Not a valid package.json, continue
30
+ }
31
+ }
32
+
33
+ // We're running from a project that has installed claude-flow-novice
34
+ return path.resolve(process.cwd(), 'node_modules', 'claude-flow-novice');
35
+ }
36
+
37
+ const cfnRoot = findCfnRoot();
19
38
 
20
39
  // Configuration for CFN initialization paths
21
40
  const CFN_PATHS = {
@@ -66,11 +85,25 @@ async function ensureDirectories() {
66
85
  }
67
86
 
68
87
  async function verifyCfnInstallation() {
69
- const cfnPath = path.resolve(process.cwd(), 'node_modules', 'claude-flow-novice');
70
- if (!fs.existsSync(cfnPath)) {
71
- console.error(chalk.red('❌ claude-flow-novice not installed. Please run: npm install claude-flow-novice'));
88
+ // Check if cfnRoot exists (works during postinstall and after install)
89
+ if (!fs.existsSync(cfnRoot)) {
90
+ console.error(chalk.red('❌ claude-flow-novice package root not found'));
91
+ console.error(chalk.yellow('cfnRoot:', cfnRoot));
72
92
  process.exit(1);
73
93
  }
94
+
95
+ // Verify critical directories exist
96
+ const criticalPaths = [
97
+ path.join(cfnRoot, '.claude/agents/cfn-dev-team'),
98
+ path.join(cfnRoot, '.claude/skills')
99
+ ];
100
+
101
+ for (const p of criticalPaths) {
102
+ if (!fs.existsSync(p)) {
103
+ console.error(chalk.red(`❌ Critical path missing: ${p}`));
104
+ process.exit(1);
105
+ }
106
+ }
74
107
  }
75
108
 
76
109
  async function copyFiles(src, dest, pattern) {