hostwares-cli 2.4.2 → 2.4.3
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/dist/index.js +14 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1980,7 +1980,7 @@ ${opts.message}` : opts.message;
|
|
|
1980
1980
|
if (seen > MAX_IDENTICAL_CALLS && isReadOnlyTool(call.name)) {
|
|
1981
1981
|
shortCircuited.push({
|
|
1982
1982
|
id: call.id,
|
|
1983
|
-
result: `[loop guard] You already ran ${call.name}(${compactArgs(call.input)}) and nothing has changed since. This call was NOT executed.
|
|
1983
|
+
result: `[loop guard] You already ran ${call.name}(${compactArgs(call.input)}) and nothing has changed since \u2014 re-reading it will keep returning the same thing. This call was NOT executed. STOP re-inspecting and DECIDE from what you already know: if a file the task needs does not exist yet, WRITE it now (write_file) \u2014 an empty or missing directory means the file has not been created, not that you should look again. If every file the task needs already exists and has been run/verified, give your final answer now (what you built + how to run it) and end. Do NOT read or list again.`
|
|
1984
1984
|
});
|
|
1985
1985
|
emit({ type: "tool:end", id: call.id, tool: call.name, ok: false, durationMs: 0, summary: "loop guard: repeated read skipped" });
|
|
1986
1986
|
} else if (WRITE_TOOLS.has(call.name) && path && (writeCounts.get(path) ?? 0) >= MAX_WRITES_PER_FILE) {
|
|
@@ -1998,9 +1998,16 @@ ${opts.message}` : opts.message;
|
|
|
1998
1998
|
stalledHops++;
|
|
1999
1999
|
else
|
|
2000
2000
|
stalledHops = 0;
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2001
|
+
const wroteThisHop = toRun.some((c2) => WRITE_TOOLS.has(c2.name));
|
|
2002
|
+
if (wroteThisHop) {
|
|
2003
|
+
stalledHops = 0;
|
|
2004
|
+
}
|
|
2005
|
+
const filesWritten = writeCounts.size;
|
|
2006
|
+
const guardHitCeiling = 6 + filesWritten * 3;
|
|
2007
|
+
const stallCeiling = filesWritten > 0 ? 4 : 2;
|
|
2008
|
+
if (stalledHops >= stallCeiling || totalGuardHits >= guardHitCeiling) {
|
|
2009
|
+
const wroteSomething = filesWritten > 0;
|
|
2010
|
+
emit({ type: "error", message: wroteSomething ? `Stopping: I kept re-reading the same files without making new progress. What I built so far is saved. Tell me the specific next change (e.g. "write the UI file" / "start it") and I'll do it directly.` : `Stopping: I kept re-reading the same files without writing anything. I have enough context now \u2014 tell me the specific change you want and I'll make it directly.` });
|
|
2004
2011
|
return finish({ conversationId, turnCredits, balance, text, aborted: false });
|
|
2005
2012
|
}
|
|
2006
2013
|
for (const c2 of toRun) {
|
|
@@ -3321,6 +3328,9 @@ async function runCliTurn(opts) {
|
|
|
3321
3328
|
spinner.stop();
|
|
3322
3329
|
error(e.message);
|
|
3323
3330
|
break;
|
|
3331
|
+
case "tool:pending":
|
|
3332
|
+
spinner.stop();
|
|
3333
|
+
break;
|
|
3324
3334
|
}
|
|
3325
3335
|
}
|
|
3326
3336
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hostwares-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Hostwares CLI - AI DevOps in your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"url": "https://github.com/Hostwares/hostwares-cli/issues"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@hostwares/agent-client": "github:Hostwares/hostwares-agent-client#v1",
|
|
44
45
|
"@types/node": "^20.0.0",
|
|
45
|
-
"typescript": "^5.5.0",
|
|
46
46
|
"esbuild": "^0.28.2",
|
|
47
|
-
"
|
|
47
|
+
"typescript": "^5.5.0"
|
|
48
48
|
}
|
|
49
49
|
}
|