buildwithnexus 0.8.3 → 0.8.5

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 +14 -43
  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.3" : pkg.version;
1596
+ var resolvedVersion = true ? "0.8.5" : pkg.version;
1597
1597
 
1598
1598
  // src/cli/interactive.ts
1599
1599
  var appVersion = resolvedVersion;
@@ -1652,37 +1652,8 @@ ${urlCheck.error}`));
1652
1652
  input: process.stdin,
1653
1653
  output: process.stdout
1654
1654
  });
1655
- let modeIndicator = "";
1656
- let shiftTabPressed = false;
1657
- let requestedModeSwitch = false;
1658
- if (process.stdin.isTTY) {
1659
- process.stdin.setRawMode(true);
1660
- const originalKD = process.stdin._handle?.onread;
1661
- process.stdin.on("data", (data) => {
1662
- if (data.toString() === "\x1B[Z") {
1663
- shiftTabPressed = true;
1664
- requestedModeSwitch = true;
1665
- }
1666
- });
1667
- }
1668
- const ask = (question, currentMode) => new Promise((resolve) => {
1669
- if (currentMode) {
1670
- const agentNames = {
1671
- PLAN: "\u{1F3AF} Planner",
1672
- BUILD: "\u{1F528} Builder",
1673
- BRAINSTORM: "\u{1F4A1} Brainstorm Chief"
1674
- };
1675
- modeIndicator = `
1676
- ${chalk3.dim(`\u2192 ${agentNames[currentMode]}`)}`;
1677
- }
1678
- rl.question(question + modeIndicator, (answer) => {
1679
- if (requestedModeSwitch) {
1680
- requestedModeSwitch = false;
1681
- resolve("__SHIFT_TAB__");
1682
- } else {
1683
- resolve(answer);
1684
- }
1685
- });
1655
+ const ask = (question) => new Promise((resolve) => {
1656
+ rl.question(question, resolve);
1686
1657
  });
1687
1658
  console.clear();
1688
1659
  console.log(chalk3.gray("Welcome! Describe what you want the AI agents to do."));
@@ -1716,7 +1687,7 @@ async function selectMode(suggested, ask) {
1716
1687
  chalk3.gray("Press ") + chalk3.bold("Enter") + chalk3.gray(" to use ") + modeColor[suggested](suggested) + chalk3.gray(" or choose a mode:")
1717
1688
  );
1718
1689
  console.log(
1719
- chalk3.gray(" ") + chalk3.cyan.bold("[1] PLAN") + chalk3.gray(" (p) design & break down steps") + chalk3.gray("\n ") + chalk3.green.bold("[2] BUILD") + chalk3.gray(" (b) execute with live streaming") + chalk3.gray("\n ") + chalk3.blue.bold("[3] BRAINSTORM") + chalk3.gray(" (bs) free-form explore & Q&A")
1690
+ chalk3.gray(" ") + chalk3.cyan.bold("[1] PLAN") + chalk3.gray(" design & break down steps") + chalk3.gray("\n ") + chalk3.green.bold("[2] BUILD") + chalk3.gray(" execute with live streaming") + chalk3.gray("\n ") + chalk3.blue.bold("[3] BRAINSTORM") + chalk3.gray(" free-form explore & Q&A")
1720
1691
  );
1721
1692
  const answer = await ask(chalk3.gray("> "));
1722
1693
  const lower = answer.trim().toLowerCase();
@@ -1853,8 +1824,8 @@ async function planModeLoop(task, backendUrl, currentMode, ask) {
1853
1824
  }
1854
1825
  displayPlanSteps(steps);
1855
1826
  while (true) {
1856
- 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"));
1857
- const answer = (await ask(tui.displayPermissionPrompt("Execute this plan?"), currentMode)).trim().toLowerCase();
1827
+ console.log(chalk3.gray("Options: ") + chalk3.bold("[Y]") + chalk3.gray(" Execute ") + chalk3.bold("[e]") + chalk3.gray(" Edit step ") + chalk3.bold("[n]") + chalk3.gray(" Cancel"));
1828
+ const answer = (await ask(tui.displayPermissionPrompt("Execute this plan?"))).trim().toLowerCase();
1858
1829
  if (answer === "" || answer === "y") {
1859
1830
  return "BUILD";
1860
1831
  }
@@ -1867,7 +1838,7 @@ async function planModeLoop(task, backendUrl, currentMode, ask) {
1867
1838
  displayPlanSteps(steps);
1868
1839
  continue;
1869
1840
  }
1870
- if (answer === "__shift_tab__" || answer === "s" || answer === "switch") {
1841
+ if (answer === "s" || answer === "switch") {
1871
1842
  return "switch";
1872
1843
  }
1873
1844
  }
@@ -1890,11 +1861,11 @@ function displayPlanSteps(steps) {
1890
1861
  }
1891
1862
  async function editPlanSteps(steps, currentMode, ask) {
1892
1863
  console.log(chalk3.gray("Enter step number to edit, or press Enter to finish editing:"));
1893
- const numStr = await ask(chalk3.bold("Step #: "), currentMode);
1864
+ const numStr = await ask(chalk3.bold("Step #: "));
1894
1865
  const n = parseInt(numStr.trim(), 10);
1895
1866
  if (!isNaN(n) && n >= 1 && n <= steps.length) {
1896
1867
  console.log(chalk3.gray(`Current: ${steps[n - 1]}`));
1897
- const updated = await ask(chalk3.bold("New text: "), currentMode);
1868
+ const updated = await ask(chalk3.bold("New text: "));
1898
1869
  if (updated.trim()) steps[n - 1] = updated.trim();
1899
1870
  }
1900
1871
  return steps;
@@ -1967,10 +1938,10 @@ async function buildModeLoop(task, backendUrl, currentMode, ask) {
1967
1938
  }
1968
1939
  console.log("");
1969
1940
  console.log(
1970
- chalk3.gray("Options: ") + chalk3.bold("[Enter]") + chalk3.gray(" Done ") + chalk3.bold("[s]") + chalk3.gray(" Switch mode")
1941
+ chalk3.gray("Options: ") + chalk3.bold("[Enter]") + chalk3.gray(" Done")
1971
1942
  );
1972
- const answer = (await ask(chalk3.bold("> "), currentMode)).trim().toLowerCase();
1973
- if (answer === "__shift_tab__" || answer === "s" || answer === "switch") return "switch";
1943
+ const answer = (await ask(chalk3.bold("> "))).trim().toLowerCase();
1944
+ if (answer === "/switch" || answer === "/mode") return "switch";
1974
1945
  return "done";
1975
1946
  }
1976
1947
  async function brainstormModeLoop(task, backendUrl, currentMode, ask) {
@@ -2058,10 +2029,10 @@ async function brainstormModeLoop(task, backendUrl, currentMode, ask) {
2058
2029
  const msg = err instanceof Error ? err.message : String(err);
2059
2030
  console.error(chalk3.red("Error: " + msg));
2060
2031
  }
2061
- const followUp = await ask(chalk3.bold.blue("\u{1F4AC} You: "), currentMode);
2032
+ const followUp = await ask(chalk3.bold.blue("\u{1F4AC} You: "));
2062
2033
  const lower = followUp.trim().toLowerCase();
2063
2034
  if (lower === "done" || lower === "exit") return "done";
2064
- if (lower === "__shift_tab__" || lower === "switch") return "switch";
2035
+ if (lower === "switch") return "switch";
2065
2036
  if (!followUp.trim()) continue;
2066
2037
  currentQuestion = followUp.trim();
2067
2038
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buildwithnexus",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Interactive AI agent orchestrator with intent-based planning, execution, and brainstorming modes",
5
5
  "type": "module",
6
6
  "bin": {