voyageai-cli 1.30.0 → 1.30.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/README.md +4 -4
- package/package.json +1 -1
- package/src/cli.js +8 -0
- package/src/commands/about.js +3 -3
- package/src/commands/chat.js +32 -11
- package/src/commands/code-search.js +751 -0
- package/src/commands/doctor.js +1 -1
- package/src/commands/export.js +124 -0
- package/src/commands/import.js +195 -0
- package/src/commands/index-workspace.js +243 -0
- package/src/commands/mcp-server.js +113 -3
- package/src/commands/playground.js +120 -4
- package/src/commands/quickstart.js +4 -4
- package/src/commands/workflow.js +132 -65
- package/src/lib/catalog.js +4 -2
- package/src/lib/code-search.js +315 -0
- package/src/lib/codegen.js +1 -1
- package/src/lib/explanations.js +3 -3
- package/src/lib/export/contexts/benchmark-export.js +27 -0
- package/src/lib/export/contexts/chat-export.js +41 -0
- package/src/lib/export/contexts/explore-export.js +22 -0
- package/src/lib/export/contexts/search-export.js +54 -0
- package/src/lib/export/contexts/workflow-export.js +80 -0
- package/src/lib/export/formats/clipboard-export.js +29 -0
- package/src/lib/export/formats/csv-export.js +45 -0
- package/src/lib/export/formats/json-export.js +50 -0
- package/src/lib/export/formats/markdown-export.js +189 -0
- package/src/lib/export/formats/mermaid-export.js +274 -0
- package/src/lib/export/formats/pdf-export.js +117 -0
- package/src/lib/export/formats/png-export.js +96 -0
- package/src/lib/export/formats/svg-export.js +116 -0
- package/src/lib/export/index.js +175 -0
- package/src/lib/github.js +226 -0
- package/src/lib/template-engine.js +154 -20
- package/src/lib/workflow-builder.js +753 -0
- package/src/lib/workflow-formatters.js +454 -0
- package/src/lib/workflow-input-cache.js +111 -0
- package/src/lib/workflow-scaffold.js +1 -1
- package/src/lib/workflow.js +297 -28
- package/src/mcp/install.js +280 -7
- package/src/mcp/schemas/index.js +170 -0
- package/src/mcp/server.js +19 -4
- package/src/mcp/tools/authoring.js +662 -0
- package/src/mcp/tools/code-search.js +620 -0
- package/src/mcp/tools/ingest.js +2 -5
- package/src/mcp/tools/retrieval.js +2 -15
- package/src/mcp/tools/workspace.js +452 -0
- package/src/mcp/utils.js +20 -0
- package/src/playground/announcements.md +52 -5
- package/src/playground/help/workflow-nodes.js +127 -2
- package/src/playground/index.html +17109 -12438
- package/src/playground/vendor/mermaid.min.js +2811 -0
- package/src/workflows/code-review.json +110 -0
- package/src/workflows/cost-analysis.json +5 -0
- package/src/workflows/rag-chat.json +165 -0
- package/src/workflows/tests/code-review.fresh-index.test.json +83 -0
- package/src/workflows/tests/code-review.happy-path.test.json +121 -0
- package/src/workflows/tests/code-review.no-question.test.json +70 -0
- package/src/workflows/tests/consistency-check.happy-path.test.json +28 -0
- package/src/workflows/tests/consistency-check.missing-source.test.json +26 -0
- package/src/workflows/tests/cost-analysis.happy-path.test.json +28 -0
- package/src/workflows/tests/enrich-and-ingest.happy-path.test.json +38 -0
- package/src/workflows/tests/enrich-and-ingest.notify-fails.test.json +38 -0
- package/src/workflows/tests/intelligent-ingest.all-filtered.test.json +26 -0
- package/src/workflows/tests/intelligent-ingest.happy-path.test.json +28 -0
- package/src/workflows/tests/kb-health-report.custom-queries.test.json +24 -0
- package/src/workflows/tests/kb-health-report.happy-path.test.json +26 -0
- package/src/workflows/tests/multi-collection-search.happy-path.test.json +40 -0
- package/src/workflows/tests/multi-collection-search.one-empty.test.json +28 -0
- package/src/workflows/tests/rag-chat.happy-path.test.json +26 -0
- package/src/workflows/tests/rag-chat.no-relevant-results.test.json +25 -0
- package/src/workflows/tests/research-and-summarize.happy-path.test.json +33 -0
- package/src/workflows/tests/research-and-summarize.no-results.test.json +29 -0
- package/src/workflows/tests/search-with-fallback.empty-both.test.json +24 -0
- package/src/workflows/tests/search-with-fallback.fallback-branch.test.json +24 -0
- package/src/workflows/tests/search-with-fallback.happy-path.test.json +27 -0
- package/src/workflows/tests/smart-ingest.duplicate-detected.test.json +34 -0
- package/src/workflows/tests/smart-ingest.happy-path.test.json +31 -0
- package/src/playground/assets/announcements/appstore.jpg +0 -0
- package/src/playground/assets/announcements/circuits.jpg +0 -0
- package/src/playground/assets/announcements/csvingest.jpg +0 -0
- package/src/playground/assets/announcements/green-wave.jpg +0 -0
package/README.md
CHANGED
|
@@ -18,11 +18,11 @@ Voyage AI provides **state-of-the-art embedding models** with the best quality-t
|
|
|
18
18
|
|
|
19
19
|
| Advantage | What It Means |
|
|
20
20
|
|-----------|---------------|
|
|
21
|
-
| **🎯 #1 on
|
|
22
|
-
| **💰 Up to 83% Cost Savings** | Asymmetric retrieval: embed docs with `voyage-
|
|
23
|
-
| **🔗 Shared Embedding Space** | All Voyage
|
|
21
|
+
| **🎯 #1 on RTEB** | Voyage 4 ranks first on retrieval benchmarks, outperforming OpenAI, Cohere, and other providers |
|
|
22
|
+
| **💰 Up to 83% Cost Savings** | Asymmetric retrieval: embed docs with `voyage-4-lite`, query with `voyage-4-large`, same quality, fraction of the cost |
|
|
23
|
+
| **🔗 Shared Embedding Space** | All Voyage 4 models produce compatible embeddings, so you can mix and match for optimal cost-quality tradeoffs |
|
|
24
24
|
| **🏢 Domain-Specific Models** | Specialized models for code, finance, law, and multilingual content that beat general-purpose alternatives |
|
|
25
|
-
| **⚡ Two-Stage Retrieval** | Rerank-2 boosts search precision by re-scoring candidates with a powerful cross-encoder |
|
|
25
|
+
| **⚡ Two-Stage Retrieval** | Rerank-2.5 boosts search precision by re-scoring candidates with a powerful cross-encoder |
|
|
26
26
|
|
|
27
27
|
**Get started:**
|
|
28
28
|
```bash
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -38,6 +38,10 @@ const { registerBug } = require('./commands/bug');
|
|
|
38
38
|
const { registerChat } = require('./commands/chat');
|
|
39
39
|
const { registerMcpServer } = require('./commands/mcp-server');
|
|
40
40
|
const { registerWorkflow } = require('./commands/workflow');
|
|
41
|
+
const { registerIndexWorkspace } = require('./commands/index-workspace');
|
|
42
|
+
const { registerExport } = require('./commands/export');
|
|
43
|
+
const { registerImport } = require('./commands/import');
|
|
44
|
+
const { registerCodeSearch } = require('./commands/code-search');
|
|
41
45
|
const { showBanner, showQuickStart, getVersion } = require('./lib/banner');
|
|
42
46
|
|
|
43
47
|
const version = getVersion();
|
|
@@ -80,6 +84,10 @@ registerBug(program);
|
|
|
80
84
|
registerChat(program);
|
|
81
85
|
registerMcpServer(program);
|
|
82
86
|
registerWorkflow(program);
|
|
87
|
+
registerIndexWorkspace(program);
|
|
88
|
+
registerExport(program);
|
|
89
|
+
registerImport(program);
|
|
90
|
+
registerCodeSearch(program);
|
|
83
91
|
|
|
84
92
|
// Append disclaimer to all help output
|
|
85
93
|
program.addHelpText('after', `
|
package/src/commands/about.js
CHANGED
|
@@ -64,10 +64,10 @@ function registerAbout(program) {
|
|
|
64
64
|
console.log('');
|
|
65
65
|
console.log(` ${pc.cyan('💰 Best Value')}`);
|
|
66
66
|
console.log(` Up to 83% cost reduction with asymmetric retrieval: embed`);
|
|
67
|
-
console.log(` documents with voyage-
|
|
67
|
+
console.log(` documents with voyage-4-lite, query with voyage-4-large.`);
|
|
68
68
|
console.log('');
|
|
69
69
|
console.log(` ${pc.cyan('🔗 Shared Embedding Space')}`);
|
|
70
|
-
console.log(` All Voyage
|
|
70
|
+
console.log(` All Voyage 4 models share the same embedding space, so you can mix`);
|
|
71
71
|
console.log(` and match models for optimal cost-quality tradeoffs.`);
|
|
72
72
|
console.log('');
|
|
73
73
|
console.log(` ${pc.cyan('🏢 Domain-Specific Models')}`);
|
|
@@ -75,7 +75,7 @@ function registerAbout(program) {
|
|
|
75
75
|
console.log(` content that outperform general-purpose alternatives.`);
|
|
76
76
|
console.log('');
|
|
77
77
|
console.log(` ${pc.cyan('⚡ Reranking')}`);
|
|
78
|
-
console.log(` Two-stage retrieval with rerank-2 boosts precision by`);
|
|
78
|
+
console.log(` Two-stage retrieval with rerank-2.5 boosts precision by`);
|
|
79
79
|
console.log(` re-scoring candidates with a powerful cross-encoder.`);
|
|
80
80
|
console.log('');
|
|
81
81
|
|
package/src/commands/chat.js
CHANGED
|
@@ -499,7 +499,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
499
499
|
console.log(' /context Show retrieved context from last query');
|
|
500
500
|
console.log(' /clear Clear conversation history');
|
|
501
501
|
console.log(' /model Show or switch LLM model (/model <name>)');
|
|
502
|
-
console.log(' /export
|
|
502
|
+
console.log(' /export [format] [file] Export conversation (markdown, json, pdf)');
|
|
503
503
|
if (isAgent) {
|
|
504
504
|
console.log(' /tools Show tool calls from last response');
|
|
505
505
|
console.log(' /export-workflow Export last tool sequence as workflow');
|
|
@@ -613,17 +613,38 @@ async function handleSlashCommand(input, ctx) {
|
|
|
613
613
|
}
|
|
614
614
|
|
|
615
615
|
case '/export': {
|
|
616
|
-
const format = parts[1] || '
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
console.log(
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
616
|
+
const format = parts[1] || 'markdown';
|
|
617
|
+
const outFile = parts[2] || null;
|
|
618
|
+
const validFormats = ['json', 'markdown', 'md', 'pdf'];
|
|
619
|
+
|
|
620
|
+
if (!validFormats.includes(format)) {
|
|
621
|
+
console.log(pc.dim(` Unknown format: ${format}. Use: ${validFormats.join(', ')}`));
|
|
622
|
+
return true;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
try {
|
|
626
|
+
const { exportArtifact } = require('../lib/export');
|
|
627
|
+
const chatData = history.exportJSON();
|
|
628
|
+
const effectiveFormat = format === 'md' ? 'markdown' : format;
|
|
629
|
+
|
|
630
|
+
const result = await exportArtifact({
|
|
631
|
+
context: 'chat',
|
|
632
|
+
format: effectiveFormat,
|
|
633
|
+
data: chatData,
|
|
634
|
+
options: {},
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
const isBinary = Buffer.isBuffer(result.content);
|
|
638
|
+
const filename = outFile || result.suggestedFilename;
|
|
639
|
+
|
|
640
|
+
if (isBinary) {
|
|
641
|
+
fs.writeFileSync(filename, result.content);
|
|
642
|
+
} else {
|
|
643
|
+
fs.writeFileSync(filename, result.content, 'utf-8');
|
|
644
|
+
}
|
|
626
645
|
console.log(ui.success(`Exported to ${filename}`));
|
|
646
|
+
} catch (err) {
|
|
647
|
+
console.log(pc.red(` Export failed: ${err.message}`));
|
|
627
648
|
}
|
|
628
649
|
return true;
|
|
629
650
|
}
|