omnius 1.0.265 → 1.0.266
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 +50 -31
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -595366,26 +595366,29 @@ function truncateAnsiToWidth(text2, width) {
|
|
|
595366
595366
|
}
|
|
595367
595367
|
function wrapToolTextLine(text2, width, prefix = "") {
|
|
595368
595368
|
text2 = sanitizeToolBoxContent(text2);
|
|
595369
|
-
if (width <= 0) return
|
|
595370
|
-
if (text2.length === 0) return
|
|
595369
|
+
if (width <= 0) return [text2];
|
|
595370
|
+
if (text2.length === 0) return [""];
|
|
595371
595371
|
const out = [];
|
|
595372
|
-
const continuationIndent = hangingIndentForPlainLine(text2, width);
|
|
595373
595372
|
const prefixLen = visibleLen(prefix);
|
|
595374
|
-
const avail = Math.max(4, width - prefixLen);
|
|
595375
595373
|
let remaining = text2;
|
|
595376
|
-
|
|
595374
|
+
let first2 = true;
|
|
595375
|
+
while (true) {
|
|
595376
|
+
const avail = Math.max(4, first2 ? width : width - prefixLen);
|
|
595377
|
+
if (visibleLen(remaining) <= avail) {
|
|
595378
|
+
out.push(first2 ? remaining : prefix + remaining);
|
|
595379
|
+
break;
|
|
595380
|
+
}
|
|
595377
595381
|
const breakOffset = findVisibleBreak(remaining, avail);
|
|
595378
595382
|
let breakAt = breakOffset;
|
|
595379
|
-
|
|
595383
|
+
const bestBreak = remaining.lastIndexOf(" ", breakOffset);
|
|
595380
595384
|
if (bestBreak > 0) {
|
|
595381
595385
|
breakAt = bestBreak;
|
|
595382
595386
|
}
|
|
595383
595387
|
const line = remaining.slice(0, breakAt).trimEnd();
|
|
595384
|
-
out.push(
|
|
595388
|
+
out.push(first2 ? line : prefix + line);
|
|
595385
595389
|
remaining = remaining.slice(breakAt).trimStart();
|
|
595390
|
+
first2 = false;
|
|
595386
595391
|
}
|
|
595387
|
-
const lastLine = prefix ? prefix + remaining : remaining;
|
|
595388
|
-
out.push(lastLine);
|
|
595389
595392
|
return out;
|
|
595390
595393
|
}
|
|
595391
595394
|
function wrapLinesWithPrefix(content, prefix, maxWidth) {
|
|
@@ -595552,7 +595555,7 @@ function wrapFooterItems(items, width) {
|
|
|
595552
595555
|
}
|
|
595553
595556
|
if (current) lines.push(current);
|
|
595554
595557
|
if (clean5.length > width) {
|
|
595555
|
-
const pipe3 = "
|
|
595558
|
+
const pipe3 = " ";
|
|
595556
595559
|
const chunks = wrapToolTextLine(clean5, width, pipe3);
|
|
595557
595560
|
lines.push(...chunks.slice(0, -1));
|
|
595558
595561
|
current = chunks[chunks.length - 1] ?? "";
|
|
@@ -595624,7 +595627,7 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
|
|
|
595624
595627
|
];
|
|
595625
595628
|
const triggerTexts = formatToolArgsForBox(toolName, callArgs, opts.verbose);
|
|
595626
595629
|
for (const text2 of triggerTexts) {
|
|
595627
|
-
const pipe3 = "
|
|
595630
|
+
const pipe3 = " ";
|
|
595628
595631
|
const chunks = wrapToolTextLine(text2, innerWidth, pipe3);
|
|
595629
595632
|
for (const chunk of chunks) {
|
|
595630
595633
|
lines.push(
|
|
@@ -595636,7 +595639,7 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
|
|
|
595636
595639
|
if (resultBody.length > 0) {
|
|
595637
595640
|
for (const bodyLine of resultBody) {
|
|
595638
595641
|
const text2 = sanitizeToolBoxContent(bodyLine.text);
|
|
595639
|
-
const pipe3 = "
|
|
595642
|
+
const pipe3 = " ";
|
|
595640
595643
|
const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
|
|
595641
595644
|
for (const chunk of chunks) {
|
|
595642
595645
|
lines.push(
|
|
@@ -595678,7 +595681,7 @@ function buildToolBoxLines(data, width) {
|
|
|
595678
595681
|
];
|
|
595679
595682
|
for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
|
|
595680
595683
|
const text2 = sanitizeToolBoxContent(bodyLine.text);
|
|
595681
|
-
const pipe3 = "
|
|
595684
|
+
const pipe3 = " ";
|
|
595682
595685
|
const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
|
|
595683
595686
|
for (const chunk of chunks) {
|
|
595684
595687
|
lines.push(
|
|
@@ -673079,7 +673082,7 @@ function buildShellLiveBlockLines(state, width) {
|
|
|
673079
673082
|
const elapsed = Math.max(0, Date.now() - state.startedAt);
|
|
673080
673083
|
const status = state.status === "running" ? `live ${formatElapsed2(elapsed)}` : state.status;
|
|
673081
673084
|
const title = ` Shell ${status} `;
|
|
673082
|
-
const top =
|
|
673085
|
+
const top = `╭─┤${title}├${"─".repeat(Math.max(0, w - 5 - title.length))}╮`;
|
|
673083
673086
|
const bottom = `╰${"─".repeat(w - 2)}╯`;
|
|
673084
673087
|
const visibleLines = [...state.lines];
|
|
673085
673088
|
if (state.currentLine) visibleLines.push(state.currentLine);
|
|
@@ -673090,7 +673093,10 @@ function buildShellLiveBlockLines(state, width) {
|
|
|
673090
673093
|
contentRow(`$ ${state.command}`, inner),
|
|
673091
673094
|
contentRow("", inner)
|
|
673092
673095
|
];
|
|
673093
|
-
if (hidden > 0)
|
|
673096
|
+
if (hidden > 0)
|
|
673097
|
+
rows.push(
|
|
673098
|
+
contentRow(`... ${hidden} earlier line${hidden === 1 ? "" : "s"}`, inner)
|
|
673099
|
+
);
|
|
673094
673100
|
if (body.length === 0) {
|
|
673095
673101
|
rows.push(contentRow("(waiting for output)", inner));
|
|
673096
673102
|
} else {
|
|
@@ -673117,11 +673123,6 @@ function fit2(value2, width) {
|
|
|
673117
673123
|
}
|
|
673118
673124
|
return plain + " ".repeat(width - chars.length);
|
|
673119
673125
|
}
|
|
673120
|
-
function fitWithFill(value2, width, fill) {
|
|
673121
|
-
const chars = Array.from(value2);
|
|
673122
|
-
if (chars.length > width) return chars.slice(0, width).join("");
|
|
673123
|
-
return value2 + fill.repeat(width - chars.length);
|
|
673124
|
-
}
|
|
673125
673126
|
function formatElapsed2(ms) {
|
|
673126
673127
|
const seconds = Math.floor(ms / 1e3);
|
|
673127
673128
|
if (seconds < 60) return `${seconds}s`;
|
|
@@ -704302,20 +704303,32 @@ ${entry.fullContent}`
|
|
|
704302
704303
|
case "debug_adversary":
|
|
704303
704304
|
if (event.adversaryAction) {
|
|
704304
704305
|
const lm = event.adversaryAction;
|
|
704305
|
-
if (lm.intervention) {
|
|
704306
|
-
const simple = `⚠ ${lm.intervention}`;
|
|
704307
|
-
contentWrite(() => renderInfo(simple));
|
|
704308
|
-
}
|
|
704309
704306
|
if (lm.details) {
|
|
704310
704307
|
adversaryBuffer.push(lm.details);
|
|
704311
704308
|
if (adversaryBuffer.length > 50)
|
|
704312
704309
|
adversaryBuffer.splice(0, adversaryBuffer.length - 50);
|
|
704313
|
-
|
|
704314
|
-
|
|
704315
|
-
|
|
704316
|
-
|
|
704310
|
+
}
|
|
704311
|
+
if (lm.intervention) {
|
|
704312
|
+
contentWrite(() => {
|
|
704313
|
+
const lines = [`⚠ ${lm.intervention}`];
|
|
704314
|
+
if (lm.details && showAdversary) {
|
|
704315
|
+
const det = String(lm.details);
|
|
704316
|
+
lines.push(...det.split("\n").filter(Boolean));
|
|
704317
|
+
}
|
|
704318
|
+
renderBoxedBlock({
|
|
704319
|
+
title: "Adversary",
|
|
704320
|
+
lines,
|
|
704321
|
+
kind: "plain"
|
|
704317
704322
|
});
|
|
704318
|
-
}
|
|
704323
|
+
});
|
|
704324
|
+
} else if (lm.details && showAdversary) {
|
|
704325
|
+
contentWrite(() => {
|
|
704326
|
+
renderBoxedBlock({
|
|
704327
|
+
title: "Adversary",
|
|
704328
|
+
lines: String(lm.details).split("\n").filter(Boolean),
|
|
704329
|
+
kind: "dim"
|
|
704330
|
+
});
|
|
704331
|
+
});
|
|
704319
704332
|
}
|
|
704320
704333
|
}
|
|
704321
704334
|
break;
|
|
@@ -705285,8 +705298,14 @@ Review its full output via sub_agent(action='output', id='${id}')`
|
|
|
705285
705298
|
subToolInstances.push(new TodoReadTool());
|
|
705286
705299
|
subRunner.registerTools(subToolInstances.map(adaptTool6));
|
|
705287
705300
|
const subAgentId = opts.id || `sub-${Date.now()}`;
|
|
705288
|
-
statusBar.registerAgentView(
|
|
705289
|
-
|
|
705301
|
+
statusBar.registerAgentView(
|
|
705302
|
+
subAgentId,
|
|
705303
|
+
`Sub-agent ${subAgentId}`,
|
|
705304
|
+
"sub"
|
|
705305
|
+
);
|
|
705306
|
+
subRunner.registerTool(
|
|
705307
|
+
createTaskCompleteTool(subTier, repoRoot, true)
|
|
705308
|
+
);
|
|
705290
705309
|
const systemCtx = opts.systemPromptAddition ? `Working directory: ${repoRoot}
|
|
705291
705310
|
|
|
705292
705311
|
${opts.systemPromptAddition}` : `Working directory: ${repoRoot}`;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.266",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.266",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED