buildwithnexus 0.8.2 → 0.8.4

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.
Files changed (2) hide show
  1. package/dist/bin.js +27 -15
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -1593,7 +1593,7 @@ init_secrets();
1593
1593
  init_docker();
1594
1594
 
1595
1595
  // src/core/version.ts
1596
- var resolvedVersion = true ? "0.8.2" : pkg.version;
1596
+ var resolvedVersion = true ? "0.8.4" : pkg.version;
1597
1597
 
1598
1598
  // src/cli/interactive.ts
1599
1599
  var appVersion = resolvedVersion;
@@ -1652,7 +1652,19 @@ ${urlCheck.error}`));
1652
1652
  input: process.stdin,
1653
1653
  output: process.stdout
1654
1654
  });
1655
- const ask = (question) => new Promise((resolve) => rl.question(question, resolve));
1655
+ let modeIndicator = "";
1656
+ const ask = (question, currentMode) => new Promise((resolve) => {
1657
+ if (currentMode) {
1658
+ const agentNames = {
1659
+ PLAN: "\u{1F3AF} Planner",
1660
+ BUILD: "\u{1F528} Builder",
1661
+ BRAINSTORM: "\u{1F4A1} Chief of Staff"
1662
+ };
1663
+ modeIndicator = `
1664
+ ${chalk3.dim(`\u2192 ${agentNames[currentMode]}`)}`;
1665
+ }
1666
+ rl.question(question + modeIndicator, resolve);
1667
+ });
1656
1668
  console.clear();
1657
1669
  console.log(chalk3.gray("Welcome! Describe what you want the AI agents to do."));
1658
1670
  console.log(chalk3.gray('Type "exit" to quit.\n'));
@@ -1702,7 +1714,7 @@ async function runModeLoop(mode, task, backendUrl, ask) {
1702
1714
  tui.displayModeBar(currentMode);
1703
1715
  tui.displayModeHeader(currentMode);
1704
1716
  if (currentMode === "PLAN") {
1705
- const next = await planModeLoop(task, backendUrl, ask);
1717
+ const next = await planModeLoop(task, backendUrl, currentMode, ask);
1706
1718
  if (next === "BUILD") {
1707
1719
  currentMode = "BUILD";
1708
1720
  continue;
@@ -1714,7 +1726,7 @@ async function runModeLoop(mode, task, backendUrl, ask) {
1714
1726
  return;
1715
1727
  }
1716
1728
  if (currentMode === "BUILD") {
1717
- const next = await buildModeLoop(task, backendUrl, ask);
1729
+ const next = await buildModeLoop(task, backendUrl, currentMode, ask);
1718
1730
  if (next === "switch") {
1719
1731
  currentMode = await promptModeSwitch(currentMode, ask);
1720
1732
  continue;
@@ -1722,7 +1734,7 @@ async function runModeLoop(mode, task, backendUrl, ask) {
1722
1734
  return;
1723
1735
  }
1724
1736
  if (currentMode === "BRAINSTORM") {
1725
- const next = await brainstormModeLoop(task, backendUrl, ask);
1737
+ const next = await brainstormModeLoop(task, backendUrl, currentMode, ask);
1726
1738
  if (next === "switch") {
1727
1739
  currentMode = await promptModeSwitch(currentMode, ask);
1728
1740
  continue;
@@ -1755,7 +1767,7 @@ async function promptModeSwitch(current, ask) {
1755
1767
  if (n === 2) return others[1];
1756
1768
  return current;
1757
1769
  }
1758
- async function planModeLoop(task, backendUrl, ask) {
1770
+ async function planModeLoop(task, backendUrl, currentMode, ask) {
1759
1771
  console.log(chalk3.bold("Task:"), chalk3.white(task));
1760
1772
  console.log("");
1761
1773
  console.log(chalk3.yellow("\u23F3 Fetching plan from backend..."));
@@ -1823,7 +1835,7 @@ async function planModeLoop(task, backendUrl, ask) {
1823
1835
  displayPlanSteps(steps);
1824
1836
  while (true) {
1825
1837
  console.log(chalk3.gray("Options: ") + chalk3.bold("[Y]") + chalk3.gray(" Execute ") + chalk3.bold("[e]") + chalk3.gray(" Edit step ") + chalk3.bold("[s]") + chalk3.gray(" Switch mode ") + chalk3.bold("[Esc/n]") + chalk3.gray(" Cancel"));
1826
- const answer = (await ask(tui.displayPermissionPrompt("Execute this plan?"))).trim().toLowerCase();
1838
+ const answer = (await ask(tui.displayPermissionPrompt("Execute this plan?"), currentMode)).trim().toLowerCase();
1827
1839
  if (answer === "" || answer === "y") {
1828
1840
  return "BUILD";
1829
1841
  }
@@ -1832,7 +1844,7 @@ async function planModeLoop(task, backendUrl, ask) {
1832
1844
  return "cancel";
1833
1845
  }
1834
1846
  if (answer === "e" || answer === "edit") {
1835
- steps = await editPlanSteps(steps, ask);
1847
+ steps = await editPlanSteps(steps, currentMode, ask);
1836
1848
  displayPlanSteps(steps);
1837
1849
  continue;
1838
1850
  }
@@ -1857,18 +1869,18 @@ function displayPlanSteps(steps) {
1857
1869
  console.log(chalk3.bold.cyan("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"));
1858
1870
  console.log("");
1859
1871
  }
1860
- async function editPlanSteps(steps, ask) {
1872
+ async function editPlanSteps(steps, currentMode, ask) {
1861
1873
  console.log(chalk3.gray("Enter step number to edit, or press Enter to finish editing:"));
1862
- const numStr = await ask(chalk3.bold("Step #: "));
1874
+ const numStr = await ask(chalk3.bold("Step #: "), currentMode);
1863
1875
  const n = parseInt(numStr.trim(), 10);
1864
1876
  if (!isNaN(n) && n >= 1 && n <= steps.length) {
1865
1877
  console.log(chalk3.gray(`Current: ${steps[n - 1]}`));
1866
- const updated = await ask(chalk3.bold("New text: "));
1878
+ const updated = await ask(chalk3.bold("New text: "), currentMode);
1867
1879
  if (updated.trim()) steps[n - 1] = updated.trim();
1868
1880
  }
1869
1881
  return steps;
1870
1882
  }
1871
- async function buildModeLoop(task, backendUrl, ask) {
1883
+ async function buildModeLoop(task, backendUrl, currentMode, ask) {
1872
1884
  console.log(chalk3.bold("Task:"), chalk3.white(task));
1873
1885
  tui.displayConnecting();
1874
1886
  try {
@@ -1938,11 +1950,11 @@ async function buildModeLoop(task, backendUrl, ask) {
1938
1950
  console.log(
1939
1951
  chalk3.gray("Options: ") + chalk3.bold("[Enter]") + chalk3.gray(" Done ") + chalk3.bold("[s]") + chalk3.gray(" Switch mode")
1940
1952
  );
1941
- const answer = (await ask(chalk3.bold("> "))).trim().toLowerCase();
1953
+ const answer = (await ask(chalk3.bold("> "), currentMode)).trim().toLowerCase();
1942
1954
  if (answer === "s" || answer === "switch") return "switch";
1943
1955
  return "done";
1944
1956
  }
1945
- async function brainstormModeLoop(task, backendUrl, ask) {
1957
+ async function brainstormModeLoop(task, backendUrl, currentMode, ask) {
1946
1958
  console.log(chalk3.bold("Starting topic:"), chalk3.white(task));
1947
1959
  console.log(chalk3.gray('Ask follow-up questions. Type "done" to exit, "switch" to change mode.\n'));
1948
1960
  let currentQuestion = task;
@@ -2027,7 +2039,7 @@ async function brainstormModeLoop(task, backendUrl, ask) {
2027
2039
  const msg = err instanceof Error ? err.message : String(err);
2028
2040
  console.error(chalk3.red("Error: " + msg));
2029
2041
  }
2030
- const followUp = await ask(chalk3.bold.blue("\u{1F4AC} You: "));
2042
+ const followUp = await ask(chalk3.bold.blue("\u{1F4AC} You: "), currentMode);
2031
2043
  const lower = followUp.trim().toLowerCase();
2032
2044
  if (lower === "done" || lower === "exit") return "done";
2033
2045
  if (lower === "switch") return "switch";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buildwithnexus",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "Interactive AI agent orchestrator with intent-based planning, execution, and brainstorming modes",
5
5
  "type": "module",
6
6
  "bin": {