buildwithnexus 0.6.13 → 0.6.14
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/dist/bin.js +38 -25
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -41,7 +41,20 @@ __export(init_command_exports, {
|
|
|
41
41
|
import fs from "fs";
|
|
42
42
|
import path2 from "path";
|
|
43
43
|
import os2 from "os";
|
|
44
|
-
import
|
|
44
|
+
import * as readline from "readline";
|
|
45
|
+
import { input, confirm } from "@inquirer/prompts";
|
|
46
|
+
async function readFromStdin(prompt) {
|
|
47
|
+
const rl = readline.createInterface({
|
|
48
|
+
input: process.stdin,
|
|
49
|
+
output: process.stdout
|
|
50
|
+
});
|
|
51
|
+
return new Promise((resolve) => {
|
|
52
|
+
rl.question(prompt, (answer) => {
|
|
53
|
+
rl.close();
|
|
54
|
+
resolve(answer);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
45
58
|
async function deepAgentsInitCommand() {
|
|
46
59
|
console.log(`
|
|
47
60
|
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
@@ -63,15 +76,15 @@ async function deepAgentsInitCommand() {
|
|
|
63
76
|
console.log(
|
|
64
77
|
"Please provide your LLM API keys:\n(You can set these later by editing .env.local)\n"
|
|
65
78
|
);
|
|
66
|
-
const anthropicKey = await
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const openaiKey = await
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const googleKey = await
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
const anthropicKey = await readFromStdin(
|
|
80
|
+
"ANTHROPIC_API_KEY (Claude - optional, press Enter to skip): "
|
|
81
|
+
);
|
|
82
|
+
const openaiKey = await readFromStdin(
|
|
83
|
+
"OPENAI_API_KEY (GPT - optional, press Enter to skip): "
|
|
84
|
+
);
|
|
85
|
+
const googleKey = await readFromStdin(
|
|
86
|
+
"GOOGLE_API_KEY (Gemini - optional, press Enter to skip): "
|
|
87
|
+
);
|
|
75
88
|
if (!anthropicKey && !openaiKey && !googleKey) {
|
|
76
89
|
console.log("Error: At least one API key must be provided.");
|
|
77
90
|
return;
|
|
@@ -129,7 +142,7 @@ function getVersion() {
|
|
|
129
142
|
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
130
143
|
return packageJson.version;
|
|
131
144
|
} catch {
|
|
132
|
-
return true ? "0.6.
|
|
145
|
+
return true ? "0.6.14" : "0.0.0-unknown";
|
|
133
146
|
}
|
|
134
147
|
}
|
|
135
148
|
function showBanner() {
|
|
@@ -515,7 +528,7 @@ async function dashboardCommand(options) {
|
|
|
515
528
|
}
|
|
516
529
|
|
|
517
530
|
// src/cli/interactive.ts
|
|
518
|
-
import * as
|
|
531
|
+
import * as readline2 from "readline";
|
|
519
532
|
import chalk2 from "chalk";
|
|
520
533
|
|
|
521
534
|
// src/cli/intent-classifier.ts
|
|
@@ -629,7 +642,7 @@ async function interactiveMode() {
|
|
|
629
642
|
console.error(chalk2.red("\u274C Cannot connect to backend at " + backendUrl));
|
|
630
643
|
process.exit(1);
|
|
631
644
|
}
|
|
632
|
-
const rl =
|
|
645
|
+
const rl = readline2.createInterface({
|
|
633
646
|
input: process.stdin,
|
|
634
647
|
output: process.stdout
|
|
635
648
|
});
|
|
@@ -1508,7 +1521,7 @@ import { Command as Command2 } from "commander";
|
|
|
1508
1521
|
import chalk7 from "chalk";
|
|
1509
1522
|
|
|
1510
1523
|
// src/ui/prompts.ts
|
|
1511
|
-
import { confirm as confirm2, password
|
|
1524
|
+
import { confirm as confirm2, password } from "@inquirer/prompts";
|
|
1512
1525
|
import chalk6 from "chalk";
|
|
1513
1526
|
|
|
1514
1527
|
// src/core/dlp.ts
|
|
@@ -1654,7 +1667,7 @@ function audit(event, detail = "") {
|
|
|
1654
1667
|
// src/ui/prompts.ts
|
|
1655
1668
|
async function promptInitConfig() {
|
|
1656
1669
|
console.log(chalk6.bold("\n API Keys\n"));
|
|
1657
|
-
const anthropicKey = await
|
|
1670
|
+
const anthropicKey = await password({
|
|
1658
1671
|
message: "Anthropic API key (required):",
|
|
1659
1672
|
mask: "*",
|
|
1660
1673
|
validate: (val) => {
|
|
@@ -1668,7 +1681,7 @@ async function promptInitConfig() {
|
|
|
1668
1681
|
return true;
|
|
1669
1682
|
}
|
|
1670
1683
|
});
|
|
1671
|
-
const openaiKey = await
|
|
1684
|
+
const openaiKey = await password({
|
|
1672
1685
|
message: "OpenAI API key (optional, press Enter to skip):",
|
|
1673
1686
|
mask: "*",
|
|
1674
1687
|
validate: (val) => {
|
|
@@ -1681,7 +1694,7 @@ async function promptInitConfig() {
|
|
|
1681
1694
|
return true;
|
|
1682
1695
|
}
|
|
1683
1696
|
});
|
|
1684
|
-
const googleKey = await
|
|
1697
|
+
const googleKey = await password({
|
|
1685
1698
|
message: "Google AI API key (optional, press Enter to skip):",
|
|
1686
1699
|
mask: "*",
|
|
1687
1700
|
validate: (val) => {
|
|
@@ -2429,7 +2442,7 @@ var destroyCommand = new Command9("destroy").description("Remove NEXUS VM and al
|
|
|
2429
2442
|
|
|
2430
2443
|
// src/commands/keys.ts
|
|
2431
2444
|
import { Command as Command10 } from "commander";
|
|
2432
|
-
import { password as
|
|
2445
|
+
import { password as password2 } from "@inquirer/prompts";
|
|
2433
2446
|
import chalk11 from "chalk";
|
|
2434
2447
|
var keysCommand = new Command10("keys").description("Manage API keys");
|
|
2435
2448
|
keysCommand.command("list").description("Show configured API keys (masked)").action(() => {
|
|
@@ -2464,7 +2477,7 @@ keysCommand.command("set <key>").description("Set or update an API key (e.g. ANT
|
|
|
2464
2477
|
log.dim(`Valid keys: ${validKeys.join(", ")}`);
|
|
2465
2478
|
process.exit(1);
|
|
2466
2479
|
}
|
|
2467
|
-
const value = await
|
|
2480
|
+
const value = await password2({ message: `Enter value for ${upper}:`, mask: "*" });
|
|
2468
2481
|
if (!value) {
|
|
2469
2482
|
log.warn("Empty value \u2014 key not changed");
|
|
2470
2483
|
return;
|
|
@@ -2814,7 +2827,7 @@ import { Command as Command14 } from "commander";
|
|
|
2814
2827
|
import chalk16 from "chalk";
|
|
2815
2828
|
|
|
2816
2829
|
// src/ui/repl.ts
|
|
2817
|
-
import
|
|
2830
|
+
import readline3 from "readline";
|
|
2818
2831
|
import fs7 from "fs";
|
|
2819
2832
|
import path9 from "path";
|
|
2820
2833
|
import chalk14 from "chalk";
|
|
@@ -2849,7 +2862,7 @@ var Repl = class {
|
|
|
2849
2862
|
}
|
|
2850
2863
|
}
|
|
2851
2864
|
async start() {
|
|
2852
|
-
this.rl =
|
|
2865
|
+
this.rl = readline3.createInterface({
|
|
2853
2866
|
input: process.stdin,
|
|
2854
2867
|
output: process.stdout,
|
|
2855
2868
|
prompt: chalk14.bold.cyan("nexus") + chalk14.dim(" \u276F "),
|
|
@@ -2922,8 +2935,8 @@ var Repl = class {
|
|
|
2922
2935
|
}
|
|
2923
2936
|
write(text) {
|
|
2924
2937
|
if (this.rl) {
|
|
2925
|
-
|
|
2926
|
-
|
|
2938
|
+
readline3.clearLine(process.stdout, 0);
|
|
2939
|
+
readline3.cursorTo(process.stdout, 0);
|
|
2927
2940
|
console.log(text);
|
|
2928
2941
|
this.rl.prompt(true);
|
|
2929
2942
|
} else {
|
|
@@ -3497,7 +3510,7 @@ function getVersionStatic() {
|
|
|
3497
3510
|
const packageJson = JSON.parse(readFileSync2(packagePath, "utf-8"));
|
|
3498
3511
|
return packageJson.version;
|
|
3499
3512
|
} catch {
|
|
3500
|
-
return true ? "0.6.
|
|
3513
|
+
return true ? "0.6.14" : "0.0.0-unknown";
|
|
3501
3514
|
}
|
|
3502
3515
|
}
|
|
3503
3516
|
var cli = new Command15().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version(getVersionStatic());
|
|
@@ -3618,7 +3631,7 @@ import os5 from "os";
|
|
|
3618
3631
|
import path11 from "path";
|
|
3619
3632
|
var homeEnvPath = path11.join(os5.homedir(), ".env.local");
|
|
3620
3633
|
dotenv2.config({ path: homeEnvPath });
|
|
3621
|
-
var version = true ? "0.6.
|
|
3634
|
+
var version = true ? "0.6.14" : "0.5.17";
|
|
3622
3635
|
checkForUpdates(version);
|
|
3623
3636
|
program.name("buildwithnexus").description("Deep Agents - AI-Powered Task Execution").version(version);
|
|
3624
3637
|
program.command("da-init").description("Initialize Deep Agents (set up API keys and .env.local)").action(deepAgentsInitCommand);
|