buildwithnexus 0.6.5 → 0.6.7
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 +103 -83
- package/dist/nexus-release.tar.gz +0 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -9,6 +9,95 @@ var __export = (target, all) => {
|
|
|
9
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
+
// src/cli/init-command.ts
|
|
13
|
+
var init_command_exports = {};
|
|
14
|
+
__export(init_command_exports, {
|
|
15
|
+
deepAgentsInitCommand: () => deepAgentsInitCommand
|
|
16
|
+
});
|
|
17
|
+
import fs from "fs";
|
|
18
|
+
import path from "path";
|
|
19
|
+
import { input, confirm } from "@inquirer/prompts";
|
|
20
|
+
async function deepAgentsInitCommand() {
|
|
21
|
+
console.log(`
|
|
22
|
+
\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
|
|
23
|
+
\u2551 Deep Agents -- First Time Setup \u2551
|
|
24
|
+
\u255A\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\u255D
|
|
25
|
+
`);
|
|
26
|
+
const envPath = path.join(process.cwd(), ".env.local");
|
|
27
|
+
const hasEnv = fs.existsSync(envPath);
|
|
28
|
+
if (hasEnv) {
|
|
29
|
+
const shouldReset = await confirm({
|
|
30
|
+
message: ".env.local already exists. Reconfigure?",
|
|
31
|
+
default: false
|
|
32
|
+
});
|
|
33
|
+
if (!shouldReset) {
|
|
34
|
+
console.log("Setup complete -- using existing configuration.");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
console.log(
|
|
39
|
+
"Please provide your LLM API keys:\n(You can set these later by editing .env.local)\n"
|
|
40
|
+
);
|
|
41
|
+
const anthropicKey = await input({
|
|
42
|
+
message: "ANTHROPIC_API_KEY (Claude)",
|
|
43
|
+
default: "",
|
|
44
|
+
validate: (val) => {
|
|
45
|
+
if (!val) {
|
|
46
|
+
return "At least one API key is required";
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const openaiKey = await input({
|
|
52
|
+
message: "OPENAI_API_KEY (GPT - optional)",
|
|
53
|
+
default: ""
|
|
54
|
+
});
|
|
55
|
+
const backendUrl = await input({
|
|
56
|
+
message: "Backend URL",
|
|
57
|
+
default: "http://localhost:4200"
|
|
58
|
+
});
|
|
59
|
+
const dashboardPort = await input({
|
|
60
|
+
message: "Dashboard port",
|
|
61
|
+
default: "4201"
|
|
62
|
+
});
|
|
63
|
+
const envContent = `# Deep Agents Configuration
|
|
64
|
+
# Generated by buildwithnexus init
|
|
65
|
+
|
|
66
|
+
# LLM API Keys
|
|
67
|
+
ANTHROPIC_API_KEY=${anthropicKey}
|
|
68
|
+
${openaiKey ? `OPENAI_API_KEY=${openaiKey}` : "# OPENAI_API_KEY="}
|
|
69
|
+
|
|
70
|
+
# Backend
|
|
71
|
+
BACKEND_URL=${backendUrl}
|
|
72
|
+
DASHBOARD_PORT=${dashboardPort}
|
|
73
|
+
|
|
74
|
+
# Optional
|
|
75
|
+
# LOG_LEVEL=debug
|
|
76
|
+
`;
|
|
77
|
+
fs.writeFileSync(envPath, envContent);
|
|
78
|
+
console.log(`
|
|
79
|
+
Configuration saved to .env.local
|
|
80
|
+
|
|
81
|
+
Next steps:
|
|
82
|
+
1. Start the backend:
|
|
83
|
+
cd ~/Projects/nexus && python -m src.deep_agents_server
|
|
84
|
+
|
|
85
|
+
2. Start the dashboard:
|
|
86
|
+
buildwithnexus dashboard
|
|
87
|
+
|
|
88
|
+
3. Run your first task:
|
|
89
|
+
deep-agents run "List files in the current directory"
|
|
90
|
+
|
|
91
|
+
For help, run:
|
|
92
|
+
deep-agents --help
|
|
93
|
+
`);
|
|
94
|
+
}
|
|
95
|
+
var init_init_command = __esm({
|
|
96
|
+
"src/cli/init-command.ts"() {
|
|
97
|
+
"use strict";
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
12
101
|
// src/ui/banner.ts
|
|
13
102
|
var banner_exports = {};
|
|
14
103
|
__export(banner_exports, {
|
|
@@ -28,7 +117,7 @@ function getVersion() {
|
|
|
28
117
|
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
29
118
|
return packageJson.version;
|
|
30
119
|
} catch {
|
|
31
|
-
return true ? "0.6.
|
|
120
|
+
return true ? "0.6.7" : "0.0.0-unknown";
|
|
32
121
|
}
|
|
33
122
|
}
|
|
34
123
|
function showBanner() {
|
|
@@ -102,88 +191,9 @@ var init_banner = __esm({
|
|
|
102
191
|
});
|
|
103
192
|
|
|
104
193
|
// src/bin.ts
|
|
194
|
+
init_init_command();
|
|
105
195
|
import { program } from "commander";
|
|
106
196
|
|
|
107
|
-
// src/cli/init-command.ts
|
|
108
|
-
import fs from "fs";
|
|
109
|
-
import path from "path";
|
|
110
|
-
import { input, confirm } from "@inquirer/prompts";
|
|
111
|
-
async function deepAgentsInitCommand() {
|
|
112
|
-
console.log(`
|
|
113
|
-
\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
|
|
114
|
-
\u2551 Deep Agents -- First Time Setup \u2551
|
|
115
|
-
\u255A\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\u255D
|
|
116
|
-
`);
|
|
117
|
-
const envPath = path.join(process.cwd(), ".env.local");
|
|
118
|
-
const hasEnv = fs.existsSync(envPath);
|
|
119
|
-
if (hasEnv) {
|
|
120
|
-
const shouldReset = await confirm({
|
|
121
|
-
message: ".env.local already exists. Reconfigure?",
|
|
122
|
-
default: false
|
|
123
|
-
});
|
|
124
|
-
if (!shouldReset) {
|
|
125
|
-
console.log("Setup complete -- using existing configuration.");
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
console.log(
|
|
130
|
-
"Please provide your LLM API keys:\n(You can set these later by editing .env.local)\n"
|
|
131
|
-
);
|
|
132
|
-
const anthropicKey = await input({
|
|
133
|
-
message: "ANTHROPIC_API_KEY (Claude)",
|
|
134
|
-
default: "",
|
|
135
|
-
validate: (val) => {
|
|
136
|
-
if (!val) {
|
|
137
|
-
return "At least one API key is required";
|
|
138
|
-
}
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
const openaiKey = await input({
|
|
143
|
-
message: "OPENAI_API_KEY (GPT - optional)",
|
|
144
|
-
default: ""
|
|
145
|
-
});
|
|
146
|
-
const backendUrl = await input({
|
|
147
|
-
message: "Backend URL",
|
|
148
|
-
default: "http://localhost:4200"
|
|
149
|
-
});
|
|
150
|
-
const dashboardPort = await input({
|
|
151
|
-
message: "Dashboard port",
|
|
152
|
-
default: "4201"
|
|
153
|
-
});
|
|
154
|
-
const envContent = `# Deep Agents Configuration
|
|
155
|
-
# Generated by buildwithnexus init
|
|
156
|
-
|
|
157
|
-
# LLM API Keys
|
|
158
|
-
ANTHROPIC_API_KEY=${anthropicKey}
|
|
159
|
-
${openaiKey ? `OPENAI_API_KEY=${openaiKey}` : "# OPENAI_API_KEY="}
|
|
160
|
-
|
|
161
|
-
# Backend
|
|
162
|
-
BACKEND_URL=${backendUrl}
|
|
163
|
-
DASHBOARD_PORT=${dashboardPort}
|
|
164
|
-
|
|
165
|
-
# Optional
|
|
166
|
-
# LOG_LEVEL=debug
|
|
167
|
-
`;
|
|
168
|
-
fs.writeFileSync(envPath, envContent);
|
|
169
|
-
console.log(`
|
|
170
|
-
Configuration saved to .env.local
|
|
171
|
-
|
|
172
|
-
Next steps:
|
|
173
|
-
1. Start the backend:
|
|
174
|
-
cd ~/Projects/nexus && python -m src.deep_agents_server
|
|
175
|
-
|
|
176
|
-
2. Start the dashboard:
|
|
177
|
-
buildwithnexus dashboard
|
|
178
|
-
|
|
179
|
-
3. Run your first task:
|
|
180
|
-
deep-agents run "List files in the current directory"
|
|
181
|
-
|
|
182
|
-
For help, run:
|
|
183
|
-
deep-agents --help
|
|
184
|
-
`);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
197
|
// src/cli/tui.ts
|
|
188
198
|
import chalk from "chalk";
|
|
189
199
|
var TUI = class {
|
|
@@ -574,6 +584,16 @@ function classifyIntent(task) {
|
|
|
574
584
|
// src/cli/interactive.ts
|
|
575
585
|
async function interactiveMode() {
|
|
576
586
|
const backendUrl = process.env.BACKEND_URL || "http://localhost:4200";
|
|
587
|
+
const anthropicKey = process.env.ANTHROPIC_API_KEY;
|
|
588
|
+
if (!anthropicKey) {
|
|
589
|
+
console.log(chalk2.cyan("\n\u{1F527} First-time setup required\n"));
|
|
590
|
+
const { deepAgentsInitCommand: deepAgentsInitCommand2 } = await Promise.resolve().then(() => (init_init_command(), init_command_exports));
|
|
591
|
+
await deepAgentsInitCommand2();
|
|
592
|
+
console.log(chalk2.green("\n\u2713 Setup complete!"));
|
|
593
|
+
console.log(chalk2.gray("\nRestart buildwithnexus to continue:"));
|
|
594
|
+
console.log(chalk2.bold(" buildwithnexus\n"));
|
|
595
|
+
process.exit(0);
|
|
596
|
+
}
|
|
577
597
|
try {
|
|
578
598
|
const response = await fetch(`${backendUrl}/health`);
|
|
579
599
|
if (!response.ok) {
|
|
@@ -3446,7 +3466,7 @@ function getVersionStatic() {
|
|
|
3446
3466
|
const packageJson = JSON.parse(readFileSync2(packagePath, "utf-8"));
|
|
3447
3467
|
return packageJson.version;
|
|
3448
3468
|
} catch {
|
|
3449
|
-
return true ? "0.6.
|
|
3469
|
+
return true ? "0.6.7" : "0.0.0-unknown";
|
|
3450
3470
|
}
|
|
3451
3471
|
}
|
|
3452
3472
|
var cli = new Command15().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version(getVersionStatic());
|
|
@@ -3564,7 +3584,7 @@ function printUpdateBanner(current, latest) {
|
|
|
3564
3584
|
// src/bin.ts
|
|
3565
3585
|
import dotenv from "dotenv";
|
|
3566
3586
|
dotenv.config({ path: ".env.local" });
|
|
3567
|
-
var version = true ? "0.6.
|
|
3587
|
+
var version = true ? "0.6.7" : "0.5.17";
|
|
3568
3588
|
checkForUpdates(version);
|
|
3569
3589
|
program.name("buildwithnexus").description("Deep Agents - AI-Powered Task Execution").version(version);
|
|
3570
3590
|
program.command("da-init").description("Initialize Deep Agents (set up API keys and .env.local)").action(deepAgentsInitCommand);
|
|
Binary file
|