@tritard/waterbrother 0.6.4 → 0.6.6
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 +31 -16
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -4244,6 +4244,9 @@ async function promptLoop(agent, session, context) {
|
|
|
4244
4244
|
|
|
4245
4245
|
try {
|
|
4246
4246
|
if (routed.kind === "start-work") {
|
|
4247
|
+
// Only auto-create tasks in expert mode. Standard/guide = CC mode (straight to model).
|
|
4248
|
+
const mode = agent.getExperienceMode();
|
|
4249
|
+
if (mode !== "expert") return false;
|
|
4247
4250
|
const task = await ensureTaskFromNaturalInput(line);
|
|
4248
4251
|
await runNaturalDecision({ task, goal: line, invent: false });
|
|
4249
4252
|
return true;
|
|
@@ -5893,22 +5896,34 @@ async function promptLoop(agent, session, context) {
|
|
|
5893
5896
|
continue;
|
|
5894
5897
|
}
|
|
5895
5898
|
|
|
5896
|
-
//
|
|
5897
|
-
const
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5899
|
+
// Fallback: no active task = CC mode (tools on), active task = chat (tools off for safety)
|
|
5900
|
+
const hasTask = Boolean(context.runtime.activeTask);
|
|
5901
|
+
const isCasual = /^(hey|hi|hello|sup|yo|what'?s ?up|thanks|thank you|thx|bye|goodbye|lol|haha|ok|okay|sure|nah|nope|yep|cool|nice|bruh|dude|how are you|good morning|good night|i feel|i think|i like|i love|i hate|i want|i need|i wish|that'?s? (great|cool|nice|interesting|funny|weird|sad|good|bad|awesome))\b/i.test(line.trim());
|
|
5902
|
+
if (isCasual) {
|
|
5903
|
+
const prevTools = agent.enableTools;
|
|
5904
|
+
agent.enableTools = false;
|
|
5905
|
+
try {
|
|
5906
|
+
await runTextTurnInteractive({
|
|
5907
|
+
agent, currentSession, context,
|
|
5908
|
+
promptText: line, pendingInput: line,
|
|
5909
|
+
spinnerLabel: "thinking..."
|
|
5910
|
+
});
|
|
5911
|
+
} catch (error) {
|
|
5912
|
+
console.log(`request failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5913
|
+
} finally {
|
|
5914
|
+
agent.enableTools = prevTools;
|
|
5915
|
+
}
|
|
5916
|
+
} else {
|
|
5917
|
+
// Full tool access — CC mode
|
|
5918
|
+
try {
|
|
5919
|
+
await runTextTurnInteractive({
|
|
5920
|
+
agent, currentSession, context,
|
|
5921
|
+
promptText: line, pendingInput: line,
|
|
5922
|
+
spinnerLabel: "thinking..."
|
|
5923
|
+
});
|
|
5924
|
+
} catch (error) {
|
|
5925
|
+
console.log(`request failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5926
|
+
}
|
|
5912
5927
|
}
|
|
5913
5928
|
}
|
|
5914
5929
|
|