omnius 1.0.227 → 1.0.228
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 -6
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6420,6 +6420,22 @@ function buildCompactDiff(oldStr, newStr, maxLen = 200) {
|
|
|
6420
6420
|
return `- ${oldTrim}
|
|
6421
6421
|
+ ${newTrim}`;
|
|
6422
6422
|
}
|
|
6423
|
+
function buildLineNumberedDiff(oldStr, newStr, oldStartLine = 1, newStartLine = oldStartLine, maxLines = 400) {
|
|
6424
|
+
const oldLines = oldStr.length > 0 ? oldStr.split("\n") : [];
|
|
6425
|
+
const newLines = newStr.length > 0 ? newStr.split("\n") : [];
|
|
6426
|
+
const out = [];
|
|
6427
|
+
const pad = (n2) => String(n2).padStart(4, " ");
|
|
6428
|
+
for (let i2 = 0; i2 < oldLines.length && out.length < maxLines; i2++) {
|
|
6429
|
+
out.push(`${pad(oldStartLine + i2)} - ${oldLines[i2]}`);
|
|
6430
|
+
}
|
|
6431
|
+
for (let i2 = 0; i2 < newLines.length && out.length < maxLines; i2++) {
|
|
6432
|
+
out.push(`${pad(newStartLine + i2)} + ${newLines[i2]}`);
|
|
6433
|
+
}
|
|
6434
|
+
const omitted = oldLines.length + newLines.length - out.length;
|
|
6435
|
+
if (omitted > 0)
|
|
6436
|
+
out.push(` … ${omitted} more diff line(s)`);
|
|
6437
|
+
return out.join("\n");
|
|
6438
|
+
}
|
|
6423
6439
|
var _sessionId, _taskGoal;
|
|
6424
6440
|
var init_change_log = __esm({
|
|
6425
6441
|
"packages/execution/dist/tools/change-log.js"() {
|
|
@@ -12620,13 +12636,15 @@ ${diff}`,
|
|
|
12620
12636
|
diff
|
|
12621
12637
|
});
|
|
12622
12638
|
const linesInfo = editedLines.length === 1 ? `line ${editedLines[0]}` : `${editedLines.length} locations (lines ${editedLines.join(", ")})`;
|
|
12639
|
+
const lineNumberedDiff = buildLineNumberedDiff(oldString, newString, editedLines[0] ?? 1);
|
|
12623
12640
|
return {
|
|
12624
12641
|
success: true,
|
|
12625
|
-
output: `Edited ${filePath} at ${linesInfo} (sha256 ${beforeHash} → ${afterHash})
|
|
12642
|
+
output: `Edited ${filePath} at ${linesInfo} (sha256 ${beforeHash} → ${afterHash})
|
|
12643
|
+
${lineNumberedDiff}`,
|
|
12626
12644
|
durationMs: performance.now() - start2,
|
|
12627
12645
|
mutated: true,
|
|
12628
12646
|
mutatedFiles: [filePath],
|
|
12629
|
-
diff,
|
|
12647
|
+
diff: lineNumberedDiff,
|
|
12630
12648
|
noop: false,
|
|
12631
12649
|
beforeHash,
|
|
12632
12650
|
afterHash
|
|
@@ -25934,10 +25952,10 @@ Re-read the target range and retry with exact current content.`,
|
|
|
25934
25952
|
durationMs: performance.now() - start2
|
|
25935
25953
|
};
|
|
25936
25954
|
}
|
|
25937
|
-
const oldSection = lines.slice(Math.max(0, startIdx - 2), Math.min(totalLines, endIdx + 2)).map((l2, i2) =>
|
|
25955
|
+
const oldSection = lines.slice(Math.max(0, startIdx - 2), Math.min(totalLines, endIdx + 2)).map((l2, i2) => `${String(Math.max(1, startLine - 2) + i2).padStart(4)} - ${l2}`).join("\n");
|
|
25938
25956
|
const newSectionStart = Math.max(0, startIdx - 2);
|
|
25939
25957
|
const newSectionEnd = Math.min(resultLines.length, startIdx + newLines.length + 2);
|
|
25940
|
-
const newSection = resultLines.slice(newSectionStart, newSectionEnd).map((l2, i2) =>
|
|
25958
|
+
const newSection = resultLines.slice(newSectionStart, newSectionEnd).map((l2, i2) => `${String(newSectionStart + 1 + i2).padStart(4)} + ${l2}`).join("\n");
|
|
25941
25959
|
const diff = `${description}
|
|
25942
25960
|
|
|
25943
25961
|
Before:
|
|
@@ -548372,6 +548390,7 @@ __export(dist_exports2, {
|
|
|
548372
548390
|
buildEphemeralSkillPack: () => buildEphemeralSkillPack,
|
|
548373
548391
|
buildGeneratedArtifactProvenance: () => buildGeneratedArtifactProvenance,
|
|
548374
548392
|
buildGraph: () => buildGraph,
|
|
548393
|
+
buildLineNumberedDiff: () => buildLineNumberedDiff,
|
|
548375
548394
|
buildMcpAgentTools: () => buildMcpAgentTools,
|
|
548376
548395
|
buildMcpToolName: () => buildMcpToolName,
|
|
548377
548396
|
buildScaffoldedPrompt: () => buildScaffoldedPrompt,
|
|
@@ -587975,7 +587994,13 @@ function resolveToolOutputMaxLines(verbose) {
|
|
|
587975
587994
|
}
|
|
587976
587995
|
function buildToolResultBody(toolName, success, output, verbose) {
|
|
587977
587996
|
const debug = loadConfig()?.debug ?? false;
|
|
587978
|
-
if (toolName === "
|
|
587997
|
+
if (toolName === "file_edit" || toolName === "file_patch") {
|
|
587998
|
+
if (!success) {
|
|
587999
|
+
return [{ text: extractFirstLine(output, Number.MAX_SAFE_INTEGER), mode: "wrap", kind: "error" }];
|
|
588000
|
+
}
|
|
588001
|
+
return diffBodyLines(output, verbose);
|
|
588002
|
+
}
|
|
588003
|
+
if (toolName === "file_write") {
|
|
587979
588004
|
const summary = extractFirstLine(output, Number.MAX_SAFE_INTEGER);
|
|
587980
588005
|
return [{
|
|
587981
588006
|
text: summary,
|
|
@@ -588028,6 +588053,24 @@ function buildToolResultBody(toolName, success, output, verbose) {
|
|
|
588028
588053
|
}
|
|
588029
588054
|
return shown;
|
|
588030
588055
|
}
|
|
588056
|
+
function diffBodyLines(output, verbose) {
|
|
588057
|
+
const maxLines = resolveToolOutputMaxLines(verbose);
|
|
588058
|
+
const lines = output.split("\n");
|
|
588059
|
+
const body = [];
|
|
588060
|
+
for (const line of lines.slice(0, maxLines)) {
|
|
588061
|
+
const m2 = line.match(DIFF_LINE_RE);
|
|
588062
|
+
if (m2) {
|
|
588063
|
+
const colored = m2[1] === "+" ? c3.green(line) : c3.red(line);
|
|
588064
|
+
body.push({ text: colored, mode: "truncate", kind: "plain" });
|
|
588065
|
+
} else {
|
|
588066
|
+
body.push({ text: line, mode: "wrap", kind: "dim" });
|
|
588067
|
+
}
|
|
588068
|
+
}
|
|
588069
|
+
if (lines.length > maxLines) {
|
|
588070
|
+
body.push({ text: `... ${lines.length - maxLines} more lines`, mode: "wrap", kind: "dim" });
|
|
588071
|
+
}
|
|
588072
|
+
return body;
|
|
588073
|
+
}
|
|
588031
588074
|
function codePreviewLines(output, maxLines) {
|
|
588032
588075
|
const lines = output.split("\n");
|
|
588033
588076
|
let start2 = 0;
|
|
@@ -588444,7 +588487,7 @@ function formatDuration4(ms) {
|
|
|
588444
588487
|
const secs = Math.floor(totalSecs % 60);
|
|
588445
588488
|
return `${mins}m ${secs}s`;
|
|
588446
588489
|
}
|
|
588447
|
-
var c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLOR_CODES, TOOL_ERROR_COLOR_CODE, BOX_TL2, BOX_TR2, BOX_BL2, BOX_BR2, BOX_H2, BOX_V2, BOX_TJ_L2, BOX_TJ_R2, RESET2, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
|
|
588490
|
+
var c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLOR_CODES, TOOL_ERROR_COLOR_CODE, BOX_TL2, BOX_TR2, BOX_BL2, BOX_BR2, BOX_H2, BOX_V2, BOX_TJ_L2, BOX_TJ_R2, RESET2, DIFF_LINE_RE, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
|
|
588448
588491
|
var init_render = __esm({
|
|
588449
588492
|
"packages/cli/src/tui/render.ts"() {
|
|
588450
588493
|
"use strict";
|
|
@@ -588636,6 +588679,7 @@ var init_render = __esm({
|
|
|
588636
588679
|
BOX_TJ_L2 = "├";
|
|
588637
588680
|
BOX_TJ_R2 = "┤";
|
|
588638
588681
|
RESET2 = "\x1B[0m";
|
|
588682
|
+
DIFF_LINE_RE = /^\s*\d+\s([-+])\s/;
|
|
588639
588683
|
_contentWriteHook = null;
|
|
588640
588684
|
HINTS = [
|
|
588641
588685
|
"Ask the agent to connect to the Omnius Nexus for P2P agent networking",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.228",
|
|
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.228",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
|
@@ -2301,9 +2301,9 @@
|
|
|
2301
2301
|
"license": "MIT"
|
|
2302
2302
|
},
|
|
2303
2303
|
"node_modules/axios": {
|
|
2304
|
-
"version": "1.
|
|
2305
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-1.
|
|
2306
|
-
"integrity": "sha512-
|
|
2304
|
+
"version": "1.17.0",
|
|
2305
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz",
|
|
2306
|
+
"integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==",
|
|
2307
2307
|
"license": "MIT",
|
|
2308
2308
|
"dependencies": {
|
|
2309
2309
|
"follow-redirects": "^1.16.0",
|
package/package.json
CHANGED