@comfanion/workflow 4.36.8 → 4.36.10

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/bin/cli.js CHANGED
@@ -558,8 +558,7 @@ program
558
558
  spinner.text = 'Reading config.yaml...';
559
559
  const configBackup = await fs.readFile(configPath, 'utf8');
560
560
 
561
- // Check if vectorizer exists
562
- const hasVectorizer = await fs.pathExists(path.join(vectorizerDir, 'node_modules'));
561
+ // Check if vectors exist (we preserve only indexes, reinstall vectorizer fresh)
563
562
  const hasVectors = await fs.pathExists(vectorsDir);
564
563
 
565
564
  // Create full backup (unless --no-backup)
@@ -570,15 +569,8 @@ program
570
569
  });
571
570
  }
572
571
 
573
- // Preserve vectorizer node_modules and vectors by moving them temporarily
574
- const tempNodeModules = path.join(process.cwd(), '.vectorizer-node_modules-temp');
572
+ // Preserve only vector indexes (not node_modules - will reinstall fresh)
575
573
  const tempVectors = path.join(process.cwd(), '.vectors-temp');
576
- const vectorizerNodeModules = path.join(vectorizerDir, 'node_modules');
577
-
578
- if (hasVectorizer) {
579
- spinner.text = 'Preserving vectorizer dependencies...';
580
- await fs.move(vectorizerNodeModules, tempNodeModules, { overwrite: true });
581
- }
582
574
  if (hasVectors) {
583
575
  spinner.text = 'Preserving vector indexes...';
584
576
  await fs.move(vectorsDir, tempVectors, { overwrite: true });
@@ -588,24 +580,31 @@ program
588
580
  spinner.text = 'Removing old files...';
589
581
  await fs.remove(targetDir);
590
582
 
591
- // Copy new files (including updated vectorizer source)
583
+ // Copy new files
592
584
  spinner.text = 'Installing new version...';
593
585
  await fs.copy(OPENCODE_SRC, targetDir);
594
586
 
595
587
  // Copy new vectorizer source files
596
588
  if (await fs.pathExists(VECTORIZER_SRC)) {
597
- spinner.text = 'Updating vectorizer...';
589
+ spinner.text = 'Installing vectorizer...';
598
590
  const newVectorizerDir = path.join(targetDir, 'vectorizer');
599
591
  await fs.ensureDir(newVectorizerDir);
600
592
  await fs.copy(path.join(VECTORIZER_SRC, 'index.js'), path.join(newVectorizerDir, 'index.js'));
601
593
  await fs.copy(path.join(VECTORIZER_SRC, 'package.json'), path.join(newVectorizerDir, 'package.json'));
594
+
595
+ // Always install vectorizer dependencies fresh
596
+ try {
597
+ execSync('npm install --silent', {
598
+ cwd: newVectorizerDir,
599
+ stdio: 'pipe',
600
+ timeout: 120000
601
+ });
602
+ } catch (e) {
603
+ // Non-fatal, will show warning below
604
+ }
602
605
  }
603
606
 
604
- // Restore vectorizer node_modules and vectors
605
- if (hasVectorizer) {
606
- spinner.text = 'Restoring vectorizer dependencies...';
607
- await fs.move(tempNodeModules, path.join(targetDir, 'vectorizer', 'node_modules'), { overwrite: true });
608
- }
607
+ // Restore vector indexes
609
608
  if (hasVectors) {
610
609
  spinner.text = 'Restoring vector indexes...';
611
610
  await fs.move(tempVectors, path.join(targetDir, 'vectors'), { overwrite: true });
@@ -671,22 +670,16 @@ program
671
670
  } else {
672
671
  console.log(chalk.yellow('⚠️ Plugin deps: run `cd .opencode && bun install`'));
673
672
  }
674
- if (hasVectorizer) {
675
- console.log(chalk.green('✅ Vectorizer updated (node_modules preserved).'));
673
+ const vectorizerInstalled = await fs.pathExists(path.join(targetDir, 'vectorizer', 'node_modules'));
674
+ if (vectorizerInstalled) {
675
+ console.log(chalk.green('✅ Vectorizer reinstalled (fresh dependencies).'));
676
+ } else {
677
+ console.log(chalk.yellow('⚠️ Vectorizer: run `npx @comfanion/workflow vectorizer install`'));
676
678
  }
677
679
  if (hasVectors) {
678
680
  console.log(chalk.green('✅ Vector indexes were preserved.'));
679
681
  }
680
682
 
681
- // Option to install/update vectorizer
682
- if (options.vectorizer) {
683
- console.log('');
684
- await installVectorizer(targetDir);
685
- } else if (!hasVectorizer) {
686
- console.log(chalk.yellow('\n💡 Vectorizer not installed. Install with:'));
687
- console.log(chalk.cyan(' npx opencode-workflow vectorizer install\n'));
688
- }
689
-
690
683
  console.log('');
691
684
 
692
685
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/workflow",
3
- "version": "4.36.8",
3
+ "version": "4.36.10",
4
4
  "description": "Initialize OpenCode Workflow system for AI-assisted development with semantic code search",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "3.0.0",
3
- "buildDate": "2026-01-24T15:10:43.480Z",
3
+ "buildDate": "2026-01-24T15:17:56.499Z",
4
4
  "files": [
5
5
  "config.yaml",
6
6
  "FLOW.yaml",
@@ -31,9 +31,9 @@ function logFile(msg: string): void {
31
31
  }
32
32
  }
33
33
 
34
- // Log to console AND file
34
+ // Log to file, console only in debug mode
35
35
  function log(msg: string): void {
36
- console.log(`[file-indexer] ${msg}`)
36
+ if (DEBUG) console.log(`[file-indexer] ${msg}`)
37
37
  logFile(msg)
38
38
  }
39
39
 
@@ -7,6 +7,7 @@
7
7
  "main": "index.js",
8
8
  "dependencies": {
9
9
  "@xenova/transformers": "^2.17.0",
10
+ "glob": "^10.3.10",
10
11
  "vectordb": "^0.4.0"
11
12
  },
12
13
  "engines": {