@tritard/waterbrother 0.15.13 → 0.15.14

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/package.json +1 -1
  2. package/src/cli.js +28 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.15.13",
3
+ "version": "0.15.14",
4
4
  "description": "Waterbrother: bring-your-own-model coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -5780,14 +5780,36 @@ async function promptLoop(agent, session, context) {
5780
5780
  }
5781
5781
 
5782
5782
  async function handleNaturalInput(line) {
5783
- // Product builder intake: only in standard/guide mode. Expert mode uses cockpit.
5783
+ // Product builder intake: detect creation intent, ask permission before oneshotting
5784
5784
  const currentMode = agent.getExperienceMode();
5785
- if (detectProductRequest(line) && currentMode !== "expert") {
5786
- const intent = parseProductIntent(line);
5785
+ if (detectProductRequest(line)) {
5786
+ // Ask: oneshot or work through it?
5787
+ console.log(dim(" oneshot it → blueprint + build in one go"));
5788
+ console.log(dim(" work through it → start coding naturally"));
5789
+ let choice = "";
5790
+ try {
5791
+ choice = await readInteractiveLine({
5792
+ getFooterText() { return "oneshot · work through it"; }
5793
+ });
5794
+ choice = (choice || "").trim().toLowerCase().replace(/[.!?,;:]+$/, "");
5795
+ } catch {
5796
+ return false;
5797
+ }
5787
5798
 
5788
- // Extract everything from the request — no interactive prompts (stdin is unreliable on Windows)
5789
- // Users can be specific: "I want a mobile recipe app, clean style, deploy to vercel"
5790
- // Or minimal: "I want a recipe app" — LLM infers the rest
5799
+ const isOneshot = /^(oneshot|one.?shot|blueprint|yes|go|build|do it|sure|yep|ok|okay|1)$/.test(choice);
5800
+ if (!isOneshot) {
5801
+ // User chose to work through it
5802
+ if (currentMode === "expert") {
5803
+ // Expert: route to cockpit (decide → choose → build)
5804
+ const task = await ensureTaskFromNaturalInput(line);
5805
+ await runNaturalDecision({ task, goal: line, invent: false });
5806
+ return true;
5807
+ }
5808
+ // Standard/guide: fall through to CC mode
5809
+ return false;
5810
+ }
5811
+
5812
+ const intent = parseProductIntent(line);
5791
5813
  const spinner = createProgressSpinner("building your blueprint...");
5792
5814
  try {
5793
5815
  const { createJsonCompletion } = await import("./model-client.js");