@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.
- package/package.json +1 -1
- package/src/cli.js +28 -6
package/package.json
CHANGED
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:
|
|
5783
|
+
// Product builder intake: detect creation intent, ask permission before oneshotting
|
|
5784
5784
|
const currentMode = agent.getExperienceMode();
|
|
5785
|
-
if (detectProductRequest(line)
|
|
5786
|
-
|
|
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
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
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");
|