buildwithnexus 0.6.24 → 0.7.0
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 +143 -99
- package/dist/deep-agents-bin.js +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -156,7 +156,7 @@ function getVersion() {
|
|
|
156
156
|
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
157
157
|
return packageJson.version;
|
|
158
158
|
} catch {
|
|
159
|
-
return true ? "0.
|
|
159
|
+
return true ? "0.7.0" : "0.0.0-unknown";
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
function showBanner() {
|
|
@@ -223,7 +223,7 @@ var init_banner = __esm({
|
|
|
223
223
|
\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\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
224
224
|
\u2551 ${chalk5.bold.cyan("B U I L D W I T H N E X U S")} \u2551
|
|
225
225
|
\u2551 \u2551
|
|
226
|
-
\u2551
|
|
226
|
+
\u2551 Autonomous Agent Orchestration \u2551
|
|
227
227
|
\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\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
228
228
|
`;
|
|
229
229
|
}
|
|
@@ -235,46 +235,69 @@ import { program } from "commander";
|
|
|
235
235
|
|
|
236
236
|
// src/cli/tui.ts
|
|
237
237
|
import chalk from "chalk";
|
|
238
|
+
var colors = {
|
|
239
|
+
accent: chalk.hex("#7D56F4"),
|
|
240
|
+
// Brand purple
|
|
241
|
+
success: chalk.hex("#00FF87"),
|
|
242
|
+
// Bright green
|
|
243
|
+
warning: chalk.hex("#FFB86C"),
|
|
244
|
+
// Amber
|
|
245
|
+
info: chalk.hex("#8BE9FD"),
|
|
246
|
+
// Cyan
|
|
247
|
+
muted: chalk.gray,
|
|
248
|
+
// Adaptive gray
|
|
249
|
+
error: chalk.red
|
|
250
|
+
};
|
|
251
|
+
var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
252
|
+
var STATUS_SYMBOLS = {
|
|
253
|
+
done: colors.success("\u2714"),
|
|
254
|
+
active: colors.info("\u25C9"),
|
|
255
|
+
pending: colors.muted("\u25CB"),
|
|
256
|
+
error: colors.error("\u2716")
|
|
257
|
+
};
|
|
238
258
|
var TUI = class {
|
|
239
259
|
taskStartTime = 0;
|
|
240
260
|
eventCount = 0;
|
|
261
|
+
spinnerIndex = 0;
|
|
262
|
+
getSpinner() {
|
|
263
|
+
const frame = SPINNER_FRAMES[this.spinnerIndex % SPINNER_FRAMES.length];
|
|
264
|
+
this.spinnerIndex++;
|
|
265
|
+
return frame;
|
|
266
|
+
}
|
|
241
267
|
displayHeader(task, agent) {
|
|
242
268
|
console.clear();
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
chalk.cyan("\u2551") + chalk.bold.white(" \u{1F680} Nexus - Autonomous Agent Orchestration ") + chalk.cyan("\u2551")
|
|
248
|
-
);
|
|
249
|
-
console.log(
|
|
250
|
-
chalk.cyan("\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")
|
|
269
|
+
const headerBox = this.makeRoundedBox(
|
|
270
|
+
colors.accent("\u{1F680} NEXUS - Autonomous Agent Orchestration"),
|
|
271
|
+
62,
|
|
272
|
+
colors.accent
|
|
251
273
|
);
|
|
274
|
+
console.log(headerBox);
|
|
252
275
|
console.log("");
|
|
253
|
-
console.log(
|
|
254
|
-
console.log(
|
|
255
|
-
console.log(chalk.gray("\u2500".repeat(60)));
|
|
276
|
+
console.log(colors.muted("Task") + colors.muted(": ") + chalk.white(task));
|
|
277
|
+
console.log(colors.muted("Agent") + colors.muted(": ") + colors.info(agent));
|
|
256
278
|
console.log("");
|
|
257
279
|
this.taskStartTime = Date.now();
|
|
258
280
|
}
|
|
259
281
|
displayConnecting() {
|
|
260
|
-
console.log(
|
|
282
|
+
console.log(`${this.getSpinner()} ${colors.warning("Connecting to backend...")}`);
|
|
261
283
|
}
|
|
262
284
|
displayConnected(runId) {
|
|
263
|
-
console.log(
|
|
264
|
-
console.log(chalk.gray("\u2500".repeat(60)));
|
|
285
|
+
console.log(`${STATUS_SYMBOLS.done} Connected \u2022 ${colors.muted(`run: ${runId}`)}`);
|
|
265
286
|
console.log("");
|
|
266
287
|
}
|
|
267
288
|
displayStreamStart() {
|
|
268
|
-
console.log(chalk.bold.
|
|
289
|
+
console.log(chalk.bold(colors.accent("\u{1F4E1} Streaming Events")));
|
|
269
290
|
console.log("");
|
|
270
291
|
}
|
|
271
292
|
displayPlan(task, steps) {
|
|
272
293
|
console.log("");
|
|
273
|
-
|
|
274
|
-
|
|
294
|
+
const planHeader = colors.accent("Plan Breakdown");
|
|
295
|
+
const planLines = [];
|
|
275
296
|
steps.forEach((step, i) => {
|
|
276
|
-
|
|
297
|
+
planLines.push(` ${STATUS_SYMBOLS.pending} ${chalk.white(`Step ${i + 1}:`)} ${step}`);
|
|
277
298
|
});
|
|
299
|
+
const planBox = this.makeDoubleBox(planHeader, planLines.join("\n"), 62, colors.accent);
|
|
300
|
+
console.log(planBox);
|
|
278
301
|
console.log("");
|
|
279
302
|
}
|
|
280
303
|
displayEvent(type, data) {
|
|
@@ -284,83 +307,69 @@ var TUI = class {
|
|
|
284
307
|
const agent = data["agent"] || "Agent";
|
|
285
308
|
const agentTask = data["task"] || "";
|
|
286
309
|
console.log("");
|
|
287
|
-
console.log(` ${
|
|
310
|
+
console.log(` ${colors.info("\u{1F464}")} ${colors.info(chalk.bold(agent))}`);
|
|
311
|
+
console.log(` ${colors.muted("\u2192")} ${agentTask}`);
|
|
288
312
|
return;
|
|
289
313
|
}
|
|
290
314
|
if (type === "agent_result") {
|
|
291
315
|
const result = data["result"] || "";
|
|
292
316
|
let displayResult = result;
|
|
293
|
-
if (displayResult.length >
|
|
294
|
-
displayResult = displayResult.substring(0,
|
|
317
|
+
if (displayResult.length > 100) {
|
|
318
|
+
displayResult = displayResult.substring(0, 97) + "...";
|
|
295
319
|
}
|
|
296
|
-
console.log(`
|
|
320
|
+
console.log(` ${STATUS_SYMBOLS.done} ${chalk.white(displayResult)}`);
|
|
297
321
|
return;
|
|
298
322
|
}
|
|
299
|
-
const
|
|
300
|
-
thought: "\u{1F4AD}",
|
|
301
|
-
action: "\
|
|
302
|
-
observation: "\u2713",
|
|
303
|
-
started: "\u25B6
|
|
304
|
-
done: "\u2728",
|
|
305
|
-
execution_complete: "\u2728",
|
|
306
|
-
error: "\
|
|
307
|
-
};
|
|
308
|
-
const color = {
|
|
309
|
-
thought: chalk.cyan,
|
|
310
|
-
action: chalk.yellow,
|
|
311
|
-
observation: chalk.green,
|
|
312
|
-
started: chalk.blue,
|
|
313
|
-
done: chalk.magenta,
|
|
314
|
-
execution_complete: chalk.magenta,
|
|
315
|
-
error: chalk.red
|
|
323
|
+
const eventConfig = {
|
|
324
|
+
thought: { icon: "\u{1F4AD}", color: colors.info },
|
|
325
|
+
action: { icon: "\u26A1", color: colors.warning },
|
|
326
|
+
observation: { icon: "\u2713", color: colors.success },
|
|
327
|
+
started: { icon: "\u25B6", color: colors.info },
|
|
328
|
+
done: { icon: "\u2728", color: colors.success },
|
|
329
|
+
execution_complete: { icon: "\u2728", color: colors.success },
|
|
330
|
+
error: { icon: "\u2716", color: colors.error }
|
|
316
331
|
};
|
|
317
|
-
const
|
|
318
|
-
const colorFn = color[type] || chalk.white;
|
|
332
|
+
const config = eventConfig[type] || { icon: "\u25CF", color: colors.muted };
|
|
319
333
|
let displayContent = content;
|
|
320
|
-
if (displayContent.length >
|
|
321
|
-
displayContent = displayContent.substring(0,
|
|
334
|
+
if (displayContent.length > 100) {
|
|
335
|
+
displayContent = displayContent.substring(0, 97) + "...";
|
|
322
336
|
}
|
|
323
|
-
console.log(` ${icon} ${
|
|
337
|
+
console.log(` ${config.icon} ${config.color(displayContent)}`);
|
|
324
338
|
}
|
|
325
339
|
displayResults(summary, todosCompleted) {
|
|
326
340
|
console.log("");
|
|
327
|
-
console.log(
|
|
328
|
-
console.log(
|
|
341
|
+
console.log(colors.success("\u2501".repeat(60)));
|
|
342
|
+
console.log(colors.success.bold("\u2728 Execution Complete"));
|
|
343
|
+
console.log("");
|
|
329
344
|
const lines = summary.split("\n");
|
|
330
345
|
for (const line of lines) {
|
|
331
|
-
console.log(` ${chalk.white(line)}`);
|
|
346
|
+
console.log(` ${colors.success("\u2502")} ${chalk.white(line)}`);
|
|
332
347
|
}
|
|
333
|
-
console.log(
|
|
348
|
+
console.log("");
|
|
349
|
+
console.log(` ${colors.muted(`${todosCompleted} subtask(s) completed`)}`);
|
|
334
350
|
console.log("");
|
|
335
351
|
}
|
|
336
352
|
displayError(error) {
|
|
337
353
|
console.log("");
|
|
338
|
-
console.log(
|
|
339
|
-
console.log(
|
|
354
|
+
console.log(colors.error("\u274C Error"));
|
|
355
|
+
console.log(colors.error(error));
|
|
340
356
|
console.log("");
|
|
341
357
|
}
|
|
342
358
|
displayComplete(duration) {
|
|
359
|
+
const seconds = (duration / 1e3).toFixed(1);
|
|
343
360
|
console.log("");
|
|
344
|
-
console.log(
|
|
345
|
-
console.log(
|
|
346
|
-
chalk.green.bold("\u2728 Workflow Complete!") + chalk.gray(` (${duration}ms, ${this.eventCount} events)`)
|
|
347
|
-
);
|
|
361
|
+
console.log(colors.success.bold(`\u2728 Complete in ${seconds}s`));
|
|
362
|
+
console.log(colors.muted(`${this.eventCount} event(s) streamed`));
|
|
348
363
|
console.log("");
|
|
349
364
|
}
|
|
350
365
|
displayBox(title, content) {
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
console.log(borderColor("\u250C" + "\u2500".repeat(width - 2) + "\u2510"));
|
|
354
|
-
console.log(
|
|
355
|
-
borderColor("\u2502") + chalk.bold.white(` ${title}`.padEnd(width - 3)) + borderColor("\u2502")
|
|
356
|
-
);
|
|
357
|
-
console.log(borderColor("\u251C" + "\u2500".repeat(width - 2) + "\u2524"));
|
|
366
|
+
const box = this.makeRoundedBox(title, 60, colors.accent);
|
|
367
|
+
console.log(box);
|
|
358
368
|
const lines = content.split("\n");
|
|
359
369
|
for (const line of lines) {
|
|
360
|
-
const padded = line.substring(0,
|
|
361
|
-
console.log(
|
|
370
|
+
const padded = line.substring(0, 56).padEnd(56);
|
|
371
|
+
console.log(` ${padded}`);
|
|
362
372
|
}
|
|
363
|
-
console.log(borderColor("\u2514" + "\u2500".repeat(width - 2) + "\u2518"));
|
|
364
373
|
console.log("");
|
|
365
374
|
}
|
|
366
375
|
getElapsedTime() {
|
|
@@ -368,64 +377,99 @@ var TUI = class {
|
|
|
368
377
|
}
|
|
369
378
|
displayModeBar(current) {
|
|
370
379
|
const modes = ["PLAN", "BUILD", "BRAINSTORM"];
|
|
371
|
-
const
|
|
372
|
-
PLAN:
|
|
373
|
-
BUILD:
|
|
374
|
-
BRAINSTORM: chalk.
|
|
380
|
+
const modeConfig = {
|
|
381
|
+
PLAN: { icon: "\u{1F4CB}", color: colors.info },
|
|
382
|
+
BUILD: { icon: "\u2699\uFE0F", color: colors.success },
|
|
383
|
+
BRAINSTORM: { icon: "\u{1F4A1}", color: chalk.blue }
|
|
375
384
|
};
|
|
376
385
|
const parts = modes.map((m) => {
|
|
386
|
+
const config = modeConfig[m];
|
|
387
|
+
const label = `${config.icon} ${m}`;
|
|
377
388
|
if (m === current) {
|
|
378
|
-
return
|
|
389
|
+
return config.color.bold(label);
|
|
379
390
|
}
|
|
380
|
-
return
|
|
391
|
+
return colors.muted(label);
|
|
381
392
|
});
|
|
382
|
-
console.log(
|
|
383
|
-
console.log(
|
|
384
|
-
console.log(
|
|
393
|
+
console.log(parts.join(colors.muted(" \u2022 ")));
|
|
394
|
+
console.log(colors.muted("[s] switch mode"));
|
|
395
|
+
console.log("");
|
|
385
396
|
}
|
|
386
397
|
displayModeHeader(mode) {
|
|
387
|
-
const
|
|
388
|
-
PLAN:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
398
|
+
const config = {
|
|
399
|
+
PLAN: {
|
|
400
|
+
icon: "\u{1F4CB}",
|
|
401
|
+
desc: "Break down and review steps",
|
|
402
|
+
color: colors.info
|
|
403
|
+
},
|
|
404
|
+
BUILD: {
|
|
405
|
+
icon: "\u2699\uFE0F",
|
|
406
|
+
desc: "Execute with live streaming",
|
|
407
|
+
color: colors.success
|
|
408
|
+
},
|
|
409
|
+
BRAINSTORM: {
|
|
410
|
+
icon: "\u{1F4A1}",
|
|
411
|
+
desc: "Free-form Q&A and exploration",
|
|
412
|
+
color: chalk.blue
|
|
413
|
+
}
|
|
401
414
|
};
|
|
415
|
+
const c = config[mode];
|
|
402
416
|
console.log("");
|
|
403
|
-
console.log(
|
|
404
|
-
console.log(
|
|
417
|
+
console.log(c.color.bold(`${c.icon} ${mode}`));
|
|
418
|
+
console.log(colors.muted(c.desc));
|
|
405
419
|
console.log("");
|
|
406
420
|
}
|
|
407
421
|
displaySuggestedMode(mode, task) {
|
|
408
422
|
const modeColor = {
|
|
409
|
-
PLAN:
|
|
410
|
-
BUILD:
|
|
423
|
+
PLAN: colors.info,
|
|
424
|
+
BUILD: colors.success,
|
|
411
425
|
BRAINSTORM: chalk.blue
|
|
412
426
|
};
|
|
427
|
+
const taskPreview = task.length > 45 ? task.substring(0, 42) + "..." : task;
|
|
413
428
|
console.log("");
|
|
414
429
|
console.log(
|
|
415
|
-
|
|
430
|
+
colors.muted("Suggested: ") + modeColor[mode].bold(mode) + colors.muted(` for "${taskPreview}"`)
|
|
416
431
|
);
|
|
417
432
|
}
|
|
418
433
|
displayBrainstormResponse(response) {
|
|
419
434
|
console.log("");
|
|
420
|
-
console.log(chalk.bold
|
|
435
|
+
console.log(chalk.blue.bold("\u{1F4A1} Ideas & Analysis"));
|
|
436
|
+
console.log("");
|
|
421
437
|
const lines = response.split("\n");
|
|
422
438
|
for (const line of lines) {
|
|
423
|
-
|
|
439
|
+
if (line.trim()) {
|
|
440
|
+
console.log(` ${chalk.white(line)}`);
|
|
441
|
+
} else {
|
|
442
|
+
console.log("");
|
|
443
|
+
}
|
|
424
444
|
}
|
|
425
445
|
console.log("");
|
|
426
446
|
}
|
|
427
447
|
displayPermissionPrompt(message) {
|
|
428
|
-
return
|
|
448
|
+
return colors.accent.bold(message) + colors.muted(" (y/n) ");
|
|
449
|
+
}
|
|
450
|
+
makeRoundedBox(title, width, borderColor) {
|
|
451
|
+
const lines = [];
|
|
452
|
+
const innerWidth = width - 4;
|
|
453
|
+
const titlePadded = ` ${title} `.padEnd(innerWidth).substring(0, innerWidth);
|
|
454
|
+
lines.push(borderColor("\u256D" + "\u2500".repeat(innerWidth) + "\u256E"));
|
|
455
|
+
lines.push(borderColor("\u2502") + chalk.bold(titlePadded) + borderColor("\u2502"));
|
|
456
|
+
lines.push(borderColor("\u2570" + "\u2500".repeat(innerWidth) + "\u256F"));
|
|
457
|
+
return lines.join("\n");
|
|
458
|
+
}
|
|
459
|
+
makeDoubleBox(title, content, width, borderColor) {
|
|
460
|
+
const lines = [];
|
|
461
|
+
const innerWidth = width - 4;
|
|
462
|
+
const titlePadded = ` ${title} `.padEnd(innerWidth).substring(0, innerWidth);
|
|
463
|
+
lines.push(borderColor("\u2554" + "\u2550".repeat(innerWidth) + "\u2557"));
|
|
464
|
+
lines.push(borderColor("\u2551") + chalk.bold(titlePadded) + borderColor("\u2551"));
|
|
465
|
+
lines.push(borderColor("\u2560" + "\u2550".repeat(innerWidth) + "\u2563"));
|
|
466
|
+
const contentLines = content.split("\n");
|
|
467
|
+
for (const line of contentLines) {
|
|
468
|
+
const padded = line.substring(0, innerWidth - 2).padEnd(innerWidth - 2);
|
|
469
|
+
lines.push(borderColor("\u2551") + " " + padded + borderColor("\u2551"));
|
|
470
|
+
}
|
|
471
|
+
lines.push(borderColor("\u255A" + "\u2550".repeat(innerWidth) + "\u255D"));
|
|
472
|
+
return lines.join("\n");
|
|
429
473
|
}
|
|
430
474
|
};
|
|
431
475
|
var tui = new TUI();
|
|
@@ -3515,7 +3559,7 @@ function getVersionStatic() {
|
|
|
3515
3559
|
const packageJson = JSON.parse(readFileSync2(packagePath, "utf-8"));
|
|
3516
3560
|
return packageJson.version;
|
|
3517
3561
|
} catch {
|
|
3518
|
-
return true ? "0.
|
|
3562
|
+
return true ? "0.7.0" : "0.0.0-unknown";
|
|
3519
3563
|
}
|
|
3520
3564
|
}
|
|
3521
3565
|
var cli = new Command15().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version(getVersionStatic());
|
|
@@ -3636,7 +3680,7 @@ import os5 from "os";
|
|
|
3636
3680
|
import path11 from "path";
|
|
3637
3681
|
var homeEnvPath = path11.join(os5.homedir(), ".env.local");
|
|
3638
3682
|
dotenv2.config({ path: homeEnvPath });
|
|
3639
|
-
var version = true ? "0.
|
|
3683
|
+
var version = true ? "0.7.0" : "0.5.17";
|
|
3640
3684
|
checkForUpdates(version);
|
|
3641
3685
|
program.name("buildwithnexus").description("Nexus - AI-Powered Task Execution").version(version);
|
|
3642
3686
|
program.command("da-init").description("Initialize Nexus (set up API keys and .env.local)").action(deepAgentsInitCommand);
|
package/dist/deep-agents-bin.js
CHANGED
|
@@ -226,7 +226,7 @@ async function runCommand(task, options) {
|
|
|
226
226
|
const repl = new PlanningREPL();
|
|
227
227
|
const formatter = new StreamFormatter();
|
|
228
228
|
console.log(`
|
|
229
|
-
Starting
|
|
229
|
+
Starting Nexus Workflow
|
|
230
230
|
`);
|
|
231
231
|
console.log(` Task: ${task}`);
|
|
232
232
|
console.log(` Agent: ${options.agent}`);
|