claude-flow-novice 2.18.17 → 2.18.18

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.
@@ -29,8 +29,8 @@ sqlite3 ~/.local/share/ruvector/index_v2.db "SELECT file_path, line_number FROM
29
29
  /codebase-search "authentication middleware pattern"
30
30
  /cfn-ruvector-search "error handling in API routes"
31
31
 
32
- # CLI direct
33
- ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector query --pattern "user login flow"
32
+ # CLI direct (note: query text is positional, use --max-results not --limit)
33
+ ./.claude/skills/cfn-local-ruvector-accelerator/target/release/local-ruvector query "user login flow" --max-results 5
34
34
  ```
35
35
 
36
36
  ### Structural Search (V2 - SQL on AST)
@@ -48,6 +48,27 @@ sqlite3 ~/.local/share/ruvector/index_v2.db \
48
48
  "SELECT COUNT(*) FROM entities WHERE project_root = '/path/to/project';"
49
49
  ```
50
50
 
51
+ ## Prerequisites
52
+
53
+ **OPENAI_API_KEY is REQUIRED for indexing.** Indexing will fail without a valid key.
54
+
55
+ ```bash
56
+ # Option 1: Export before running
57
+ export OPENAI_API_KEY="sk-..."
58
+
59
+ # Option 2: Add to shell profile (~/.bashrc or ~/.zshrc)
60
+ echo 'export OPENAI_API_KEY="sk-..."' >> ~/.bashrc
61
+ source ~/.bashrc
62
+
63
+ # Option 3: Inline with command
64
+ OPENAI_API_KEY="sk-..." ./local-ruvector index --path /project
65
+ ```
66
+
67
+ **Verify key is set:**
68
+ ```bash
69
+ echo $OPENAI_API_KEY # Should show your key (not empty)
70
+ ```
71
+
51
72
  ## Index Management
52
73
 
53
74
  ```bash
@@ -78,8 +99,10 @@ sqlite3 ~/.local/share/ruvector/index_v2.db "SELECT project_root, COUNT(*) FROM
78
99
 
79
100
  Before implementing changes, ALWAYS query RuVector first:
80
101
  ```bash
81
- # Find similar patterns
102
+ # Find similar patterns (slash command uses --top, CLI uses --max-results)
82
103
  /codebase-search "relevant search terms" --top 5
104
+ # Or via CLI:
105
+ ./local-ruvector query "relevant search terms" --max-results 5
83
106
 
84
107
  # Query past errors
85
108
  ./.claude/skills/cfn-ruvector-codebase-index/query-error-patterns.sh --task-description "description"
@@ -46,7 +46,7 @@ use anyhow::{Result, Context, anyhow};
46
46
  use std::fs;
47
47
  use std::path::{Path, PathBuf};
48
48
  use walkdir::{WalkDir, DirEntry};
49
- use tracing::{info, debug, warn};
49
+ use tracing::{info, debug, warn, error};
50
50
  use regex::Regex;
51
51
  use std::sync::Arc;
52
52
  use std::sync::RwLock;
@@ -286,6 +286,15 @@ impl IndexCommand {
286
286
  }
287
287
 
288
288
  pub fn execute(&mut self) -> Result<IndexStats> {
289
+ // Fail early if OPENAI_API_KEY is not set
290
+ if std::env::var("OPENAI_API_KEY").is_err() {
291
+ error!("OPENAI_API_KEY environment variable is required for indexing");
292
+ return Err(anyhow!(
293
+ "OPENAI_API_KEY not found. Set it with: export OPENAI_API_KEY=\"sk-...\"\n\
294
+ Indexing requires a valid OpenAI API key for generating embeddings."
295
+ ));
296
+ }
297
+
289
298
  info!("Starting index process");
290
299
  info!("File types: {:?}", self.file_types);
291
300
  if let Some(ref patterns) = self.patterns {
@@ -99,6 +99,15 @@ impl AstIndexCommand {
99
99
  }
100
100
 
101
101
  pub fn execute(&mut self) -> Result<IndexStats> {
102
+ // Fail early if OPENAI_API_KEY is not set
103
+ if std::env::var("OPENAI_API_KEY").is_err() {
104
+ error!("OPENAI_API_KEY environment variable is required for indexing");
105
+ return Err(anyhow!(
106
+ "OPENAI_API_KEY not found. Set it with: export OPENAI_API_KEY=\"sk-...\"\n\
107
+ Indexing requires a valid OpenAI API key for generating embeddings."
108
+ ));
109
+ }
110
+
102
111
  let start_time = std::time::Instant::now();
103
112
 
104
113
  info!("Starting AST-based index process");
@@ -101,13 +101,10 @@ impl EmbeddingsManager {
101
101
  debug!("Generating embeddings for {} texts", texts.len());
102
102
 
103
103
  if self.config.api_key.is_none() {
104
- warn!("OpenAI API key not found, falling back to dummy embeddings");
105
- let mut embeddings = Vec::with_capacity(texts.len());
106
- for text in texts {
107
- embeddings.push(self.generate_dummy_embedding(text));
108
- }
109
- info!("Generated {} dummy embeddings", embeddings.len());
110
- return Ok(embeddings);
104
+ error!("OPENAI_API_KEY environment variable not set");
105
+ return Err(anyhow!(
106
+ "OPENAI_API_KEY not found. Set it with: export OPENAI_API_KEY=\"sk-...\""
107
+ ));
111
108
  }
112
109
 
113
110
  let mut all_embeddings = Vec::with_capacity(texts.len());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "2.18.17",
3
+ "version": "2.18.18",
4
4
  "description": "Claude Flow Novice - Advanced orchestration platform for multi-agent AI workflows with CFN Loop architecture\n\nIncludes Local RuVector Accelerator and all CFN skills for complete functionality.",
5
5
  "main": "index.js",
6
6
  "type": "module",