baro-ai 0.70.0 → 0.70.2
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/cli.mjs +15 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/runner.mjs +2 -2
- package/dist/runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -43227,15 +43227,15 @@ var AgentStreamForwarder = class extends BaseObserver {
|
|
|
43227
43227
|
if (!agentId) return;
|
|
43228
43228
|
const args = parseArgs(item.args);
|
|
43229
43229
|
const tool = item.name;
|
|
43230
|
-
if (tool === "write_file" || tool === "edit_file") {
|
|
43230
|
+
if (tool === "write_file" || tool === "edit_file" || tool === "edit") {
|
|
43231
43231
|
const path6 = strField(args, "path", "file_path", "file") ?? "(file)";
|
|
43232
|
-
const op = tool === "
|
|
43232
|
+
const op = tool === "write_file" ? "create" : "modify";
|
|
43233
43233
|
emit({ type: "activity", id: agentId, kind: "file_change", tool: "write", op, path: path6, text: path6 });
|
|
43234
43234
|
return;
|
|
43235
43235
|
}
|
|
43236
|
-
if (tool === "bash") {
|
|
43237
|
-
const cmd = firstLine(
|
|
43238
|
-
emit({ type: "activity", id: agentId, kind: "tool_call", tool: "bash", text: truncate(cmd ||
|
|
43236
|
+
if (tool === "bash" || tool === "shell") {
|
|
43237
|
+
const cmd = firstLine(cmdText(args));
|
|
43238
|
+
emit({ type: "activity", id: agentId, kind: "tool_call", tool: "bash", text: truncate(cmd || tool, 140) });
|
|
43239
43239
|
return;
|
|
43240
43240
|
}
|
|
43241
43241
|
const target = strField(args, "path", "file_path", "pattern", "query", "file") ?? "";
|
|
@@ -43285,6 +43285,16 @@ function strField(obj, ...keys) {
|
|
|
43285
43285
|
}
|
|
43286
43286
|
return void 0;
|
|
43287
43287
|
}
|
|
43288
|
+
function cmdText(args) {
|
|
43289
|
+
const c = args.command ?? args.cmd ?? args.script;
|
|
43290
|
+
if (Array.isArray(c)) {
|
|
43291
|
+
if (c.length >= 3 && /^(ba)?sh$/.test(String(c[0])) && /^-[lc]+$/.test(String(c[1]))) {
|
|
43292
|
+
return String(c[2]);
|
|
43293
|
+
}
|
|
43294
|
+
return c.map(String).join(" ");
|
|
43295
|
+
}
|
|
43296
|
+
return typeof c === "string" ? c : "";
|
|
43297
|
+
}
|
|
43288
43298
|
function firstLine(s2) {
|
|
43289
43299
|
for (const l of s2.split("\n")) {
|
|
43290
43300
|
const t2 = l.trim();
|