buildwithnexus 0.6.7 → 0.6.8
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 +13 -7
- package/dist/nexus-release.tar.gz +0 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -117,7 +117,7 @@ function getVersion() {
|
|
|
117
117
|
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
118
118
|
return packageJson.version;
|
|
119
119
|
} catch {
|
|
120
|
-
return true ? "0.6.
|
|
120
|
+
return true ? "0.6.8" : "0.0.0-unknown";
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
function showBanner() {
|
|
@@ -409,13 +409,15 @@ async function runCommand(task, options) {
|
|
|
409
409
|
);
|
|
410
410
|
process.exit(1);
|
|
411
411
|
}
|
|
412
|
+
const apiKey = process.env.ANTHROPIC_API_KEY || "";
|
|
412
413
|
const response = await fetch(`${backendUrl}/api/run`, {
|
|
413
414
|
method: "POST",
|
|
414
415
|
headers: { "Content-Type": "application/json" },
|
|
415
416
|
body: JSON.stringify({
|
|
416
417
|
task,
|
|
417
418
|
agent_role: options.agent,
|
|
418
|
-
agent_goal: options.goal || ""
|
|
419
|
+
agent_goal: options.goal || "",
|
|
420
|
+
api_key: apiKey
|
|
419
421
|
})
|
|
420
422
|
});
|
|
421
423
|
if (!response.ok) {
|
|
@@ -715,11 +717,12 @@ async function planModeLoop(task, backendUrl, rl, ask) {
|
|
|
715
717
|
console.log("");
|
|
716
718
|
console.log(chalk2.yellow("\u23F3 Fetching plan from backend..."));
|
|
717
719
|
let steps = [];
|
|
720
|
+
const apiKey = process.env.ANTHROPIC_API_KEY || "";
|
|
718
721
|
try {
|
|
719
722
|
const response = await fetch(`${backendUrl}/api/run`, {
|
|
720
723
|
method: "POST",
|
|
721
724
|
headers: { "Content-Type": "application/json" },
|
|
722
|
-
body: JSON.stringify({ task, agent_role: "engineer", agent_goal: "" })
|
|
725
|
+
body: JSON.stringify({ task, agent_role: "engineer", agent_goal: "", api_key: apiKey })
|
|
723
726
|
});
|
|
724
727
|
if (!response.ok) {
|
|
725
728
|
console.error(chalk2.red("Backend error \u2014 cannot fetch plan."));
|
|
@@ -817,11 +820,12 @@ async function editPlanSteps(steps, ask) {
|
|
|
817
820
|
async function buildModeLoop(task, backendUrl, rl, ask) {
|
|
818
821
|
console.log(chalk2.bold("Task:"), chalk2.white(task));
|
|
819
822
|
tui.displayConnecting();
|
|
823
|
+
const apiKey = process.env.ANTHROPIC_API_KEY || "";
|
|
820
824
|
try {
|
|
821
825
|
const response = await fetch(`${backendUrl}/api/run`, {
|
|
822
826
|
method: "POST",
|
|
823
827
|
headers: { "Content-Type": "application/json" },
|
|
824
|
-
body: JSON.stringify({ task, agent_role: "engineer", agent_goal: "" })
|
|
828
|
+
body: JSON.stringify({ task, agent_role: "engineer", agent_goal: "", api_key: apiKey })
|
|
825
829
|
});
|
|
826
830
|
if (!response.ok) {
|
|
827
831
|
console.error(chalk2.red("Backend error"));
|
|
@@ -887,13 +891,15 @@ async function brainstormModeLoop(task, backendUrl, rl, ask) {
|
|
|
887
891
|
while (true) {
|
|
888
892
|
console.log(chalk2.bold.blue("\u{1F4A1} Thinking..."));
|
|
889
893
|
try {
|
|
894
|
+
const apiKey = process.env.ANTHROPIC_API_KEY || "";
|
|
890
895
|
const response = await fetch(`${backendUrl}/api/run`, {
|
|
891
896
|
method: "POST",
|
|
892
897
|
headers: { "Content-Type": "application/json" },
|
|
893
898
|
body: JSON.stringify({
|
|
894
899
|
task: currentQuestion,
|
|
895
900
|
agent_role: "brainstorm",
|
|
896
|
-
agent_goal: "Generate ideas, considerations, and suggestions. Be concise and helpful."
|
|
901
|
+
agent_goal: "Generate ideas, considerations, and suggestions. Be concise and helpful.",
|
|
902
|
+
api_key: apiKey
|
|
897
903
|
})
|
|
898
904
|
});
|
|
899
905
|
if (response.ok) {
|
|
@@ -3466,7 +3472,7 @@ function getVersionStatic() {
|
|
|
3466
3472
|
const packageJson = JSON.parse(readFileSync2(packagePath, "utf-8"));
|
|
3467
3473
|
return packageJson.version;
|
|
3468
3474
|
} catch {
|
|
3469
|
-
return true ? "0.6.
|
|
3475
|
+
return true ? "0.6.8" : "0.0.0-unknown";
|
|
3470
3476
|
}
|
|
3471
3477
|
}
|
|
3472
3478
|
var cli = new Command15().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version(getVersionStatic());
|
|
@@ -3584,7 +3590,7 @@ function printUpdateBanner(current, latest) {
|
|
|
3584
3590
|
// src/bin.ts
|
|
3585
3591
|
import dotenv from "dotenv";
|
|
3586
3592
|
dotenv.config({ path: ".env.local" });
|
|
3587
|
-
var version = true ? "0.6.
|
|
3593
|
+
var version = true ? "0.6.8" : "0.5.17";
|
|
3588
3594
|
checkForUpdates(version);
|
|
3589
3595
|
program.name("buildwithnexus").description("Deep Agents - AI-Powered Task Execution").version(version);
|
|
3590
3596
|
program.command("da-init").description("Initialize Deep Agents (set up API keys and .env.local)").action(deepAgentsInitCommand);
|
|
Binary file
|