omnius 1.0.226 → 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 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) => `- ${String(Math.max(1, startLine - 2) + i2).padStart(4)} | ${l2}`).join("\n");
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) => `+ ${String(newSectionStart + 1 + i2).padStart(4)} | ${l2}`).join("\n");
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,
@@ -587422,6 +587441,7 @@ __export(render_exports, {
587422
587441
  getTermWidth: () => getTermWidth,
587423
587442
  pastel: () => pastel,
587424
587443
  renderAssistantText: () => renderAssistantText,
587444
+ renderBoxedBlock: () => renderBoxedBlock,
587425
587445
  renderCompactHeader: () => renderCompactHeader,
587426
587446
  renderConfig: () => renderConfig,
587427
587447
  renderContextIntakeBox: () => renderContextIntakeBox,
@@ -587967,9 +587987,20 @@ function buildToolResultBoxLines(toolName, success, output, opts, width) {
587967
587987
  metricsColorCode: success ? void 0 : TOOL_ERROR_COLOR_CODE
587968
587988
  }, width);
587969
587989
  }
587990
+ function resolveToolOutputMaxLines(verbose) {
587991
+ const raw = Number(process.env["OMNIUS_TOOL_OUTPUT_MAX_LINES"]);
587992
+ if (Number.isFinite(raw)) return raw <= 0 ? Number.MAX_SAFE_INTEGER : Math.floor(raw);
587993
+ return verbose ? 1e3 : 500;
587994
+ }
587970
587995
  function buildToolResultBody(toolName, success, output, verbose) {
587971
587996
  const debug = loadConfig()?.debug ?? false;
587972
- if (toolName === "file_write" || toolName === "file_edit") {
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") {
587973
588004
  const summary = extractFirstLine(output, Number.MAX_SAFE_INTEGER);
587974
588005
  return [{
587975
588006
  text: summary,
@@ -587981,7 +588012,7 @@ function buildToolResultBody(toolName, success, output, verbose) {
587981
588012
  if (!success) {
587982
588013
  return [{ text: extractFirstLine(output, Number.MAX_SAFE_INTEGER), mode: "wrap", kind: "error" }];
587983
588014
  }
587984
- return codePreviewLines(output, 10);
588015
+ return codePreviewLines(output, resolveToolOutputMaxLines(verbose));
587985
588016
  }
587986
588017
  if (toolName === "task_complete") {
587987
588018
  const summary = output && output.trim() ? output : "Done";
@@ -588000,7 +588031,7 @@ function buildToolResultBody(toolName, success, output, verbose) {
588000
588031
  if (filtered.length === 0) {
588001
588032
  return [{ text: success ? "Done" : "Failed", mode: "wrap", kind: success ? "success" : "error" }];
588002
588033
  }
588003
- const maxLines = verbose ? 200 : toolName === "shell" || toolName === "background_run" || toolName === "grep_search" ? 10 : 6;
588034
+ const maxLines = resolveToolOutputMaxLines(verbose);
588004
588035
  const shown = [];
588005
588036
  for (const line of filtered.slice(0, maxLines)) {
588006
588037
  if (isRawJsonDump(line) && !verbose) {
@@ -588022,6 +588053,24 @@ function buildToolResultBody(toolName, success, output, verbose) {
588022
588053
  }
588023
588054
  return shown;
588024
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
+ }
588025
588074
  function codePreviewLines(output, maxLines) {
588026
588075
  const lines = output.split("\n");
588027
588076
  let start2 = 0;
@@ -588084,18 +588133,35 @@ function renderToolResult(toolName, success, output, verboseOrOpts) {
588084
588133
  opts
588085
588134
  );
588086
588135
  }
588136
+ function renderBoxedBlock(opts) {
588137
+ const mode = opts.mode ?? "wrap";
588138
+ const kind = opts.kind ?? "plain";
588139
+ const body = (opts.lines.length > 0 ? opts.lines : [""]).map((text) => ({
588140
+ text,
588141
+ mode,
588142
+ kind
588143
+ }));
588144
+ renderToolDynamicBlock(
588145
+ "tool-result",
588146
+ (width) => buildToolBoxLines({
588147
+ title: opts.title,
588148
+ metrics: opts.metrics ?? "",
588149
+ body,
588150
+ colorCode: opts.colorCode ?? tuiTextDim(),
588151
+ metricsColorCode: opts.metricsColorCode
588152
+ }, width),
588153
+ opts.host === void 0 ? {} : { host: opts.host }
588154
+ );
588155
+ }
588087
588156
  function renderImageAsciiPreview(title, imagePath, ascii2, renderer) {
588088
- const prefix = ` ${c3.dim("│")} `;
588089
- const maxW = Math.max(getTermWidth() - 10, 40);
588090
- const header = `${title}: ${imagePath} (${renderer})`;
588091
- process.stdout.write(`
588092
- ${prefix}${c3.cyan(c3.bold(header.length > maxW ? header.slice(0, maxW - 3) + "..." : header))}
588093
- `);
588094
- for (const line of ascii2.split("\n")) {
588095
- const renderedLine = /\x1B\[[0-?]*[ -/]*[@-~]/.test(line) ? line : c3.dim(line);
588096
- process.stdout.write(`${prefix}${renderedLine}
588097
- `);
588098
- }
588157
+ renderBoxedBlock({
588158
+ title: `${title} ${imagePath}`,
588159
+ metrics: renderer,
588160
+ lines: ascii2.split("\n").map((line) => /\x1B\[[0-?]*[ -/]*[@-~]/.test(line) ? line : c3.dim(line)),
588161
+ mode: "truncate",
588162
+ colorCode: 44
588163
+ // cyan-ish, matching the prior cyan header
588164
+ });
588099
588165
  }
588100
588166
  function extractFirstLine(output, maxW) {
588101
588167
  const line = output.split("\n").find((l2) => l2.trim()) ?? output;
@@ -588421,7 +588487,7 @@ function formatDuration4(ms) {
588421
588487
  const secs = Math.floor(totalSecs % 60);
588422
588488
  return `${mins}m ${secs}s`;
588423
588489
  }
588424
- 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;
588425
588491
  var init_render = __esm({
588426
588492
  "packages/cli/src/tui/render.ts"() {
588427
588493
  "use strict";
@@ -588613,6 +588679,7 @@ var init_render = __esm({
588613
588679
  BOX_TJ_L2 = "├";
588614
588680
  BOX_TJ_R2 = "┤";
588615
588681
  RESET2 = "\x1B[0m";
588682
+ DIFF_LINE_RE = /^\s*\d+\s([-+])\s/;
588616
588683
  _contentWriteHook = null;
588617
588684
  HINTS = [
588618
588685
  "Ask the agent to connect to the Omnius Nexus for P2P agent networking",
@@ -589394,16 +589461,15 @@ connectPP();
589394
589461
  </html>`;
589395
589462
  }
589396
589463
  function renderVoiceSessionStart(tunnelUrl) {
589397
- process.stdout.write(`
589398
- ${c3.cyan("☁")} ${c3.bold("Live Voice Session")}
589399
- `);
589400
- process.stdout.write(` ${c3.dim("│")} ${c3.cyan(tunnelUrl)}
589401
- `);
589402
- process.stdout.write(` ${c3.dim("│")} Bidirectional PCM audio + live transcription
589403
- `);
589404
- process.stdout.write(` ${c3.dim("│")} /hangup to end session (auto-closes after 1 min idle)
589405
-
589406
- `);
589464
+ renderBoxedBlock({
589465
+ title: "☁ Live Voice Session",
589466
+ lines: [
589467
+ c3.cyan(tunnelUrl),
589468
+ "Bidirectional PCM audio + live transcription",
589469
+ "/hangup to end session (auto-closes after 1 min idle)"
589470
+ ],
589471
+ colorCode: 44
589472
+ });
589407
589473
  }
589408
589474
  function renderVoiceSessionStop(runtime) {
589409
589475
  const mins = Math.floor(runtime / 60);
@@ -589415,13 +589481,13 @@ function renderVoiceSessionStop(runtime) {
589415
589481
  }
589416
589482
  function renderVoiceSessionUser(action, username) {
589417
589483
  const icon = action === "connected" ? c3.green("→") : c3.red("←");
589418
- process.stdout.write(` ${c3.dim("│")} ${c3.cyan("☁")} ${icon} ${username} ${action}
589484
+ process.stdout.write(` ${c3.cyan("☁")} ${icon} ${username} ${action}
589419
589485
  `);
589420
589486
  }
589421
589487
  function renderVoiceSessionTranscript(speaker, text) {
589422
589488
  const label = speaker === "user" ? c3.yellow("user") : c3.cyan("agent");
589423
589489
  const preview = text.length > 80 ? text.slice(0, 77) + "..." : text;
589424
- process.stdout.write(` ${c3.dim("│")} ${c3.cyan("☁")} [${label}] ${preview}
589490
+ process.stdout.write(` ${c3.cyan("☁")} [${label}] ${preview}
589425
589491
  `);
589426
589492
  }
589427
589493
  var VoiceSession;
@@ -644494,23 +644560,40 @@ function renderTelegramSubAgentStart(username, text, isAdmin) {
644494
644560
  `);
644495
644561
  }
644496
644562
  function renderTelegramSubAgentEvent(username, detail) {
644497
- process.stdout.write(` ${c3.dim("│")} ${c3.cyan("✈")} ${c3.dim(`@${username}:`)} ${detail}
644498
- `);
644563
+ renderBoxedBlock({
644564
+ title: `✈ @${username}`,
644565
+ lines: [detail],
644566
+ colorCode: 45
644567
+ });
644499
644568
  }
644500
644569
  function renderTelegramSubAgentToolCall(username, toolName, args) {
644501
644570
  const preview = args.length > 50 ? args.slice(0, 47) + "..." : args;
644502
- process.stdout.write(` ${c3.dim("│")} ${c3.cyan("✈")} ${c3.dim(`@${username}`)} ${c3.bold(toolName)}(${c3.dim(preview)})
644503
- `);
644571
+ renderBoxedBlock({
644572
+ title: `✈ @${username}`,
644573
+ metrics: toolName,
644574
+ lines: [`${c3.bold(toolName)}(${c3.dim(preview)})`],
644575
+ colorCode: 45
644576
+ });
644504
644577
  }
644505
644578
  function renderTelegramSubAgentComplete(username, summary) {
644506
644579
  const preview = summary.length > 80 ? summary.slice(0, 77) + "..." : summary;
644507
- process.stdout.write(` ${c3.dim("│")} ${c3.green("✔")} @${username}: ${c3.dim(preview)}
644508
- `);
644580
+ renderBoxedBlock({
644581
+ title: `✔ @${username}`,
644582
+ lines: [preview],
644583
+ kind: "success",
644584
+ colorCode: 42
644585
+ // green
644586
+ });
644509
644587
  }
644510
644588
  function renderTelegramSubAgentError(username, error) {
644511
644589
  const preview = error.length > 80 ? error.slice(0, 77) + "..." : error;
644512
- process.stdout.write(` ${c3.dim("│")} ${c3.magenta("✘")} @${username}: ${c3.dim(preview)}
644513
- `);
644590
+ renderBoxedBlock({
644591
+ title: `✘ @${username}`,
644592
+ lines: [preview],
644593
+ kind: "error",
644594
+ colorCode: 198
644595
+ // magenta
644596
+ });
644514
644597
  }
644515
644598
  var TELEGRAM_TOOL_ACTION_GROUPS, TELEGRAM_TOOL_ACTION_GROUP, TELEGRAM_TOOL_MUTATING_GROUPS, DEFAULT_TELEGRAM_TOOL_GROUP_POLICY, TELEGRAM_TOOL_BUTTON_LABELS, TELEGRAM_SAFETY_PROMPT, ADMIN_DM_PROMPT, ADMIN_GROUP_PROMPT, TELEGRAM_PUBLIC_SOUL_PROFILE, TELEGRAM_PUBLIC_ORCHESTRATOR_CONTRACT, TELEGRAM_PUBLIC_MEMORY_SCOPE_CONTRACT, TELEGRAM_PUBLIC_VISION_STACK_CONTRACT, GROUP_REPLY_DISCRETION_PROMPT, TELEGRAM_CHAT_MODE_PROMPT, ADMIN_CHAT_PROFILE_PROMPT, TELEGRAM_ACTION_RESPONSE_CONTRACT, TELEGRAM_EXTERNAL_ACQUISITION_CONTRACT, TELEGRAM_LINK_INTEGRITY_CONTRACT, TELEGRAM_INTERACTION_DECISION_RESPONSE_FORMAT, TELEGRAM_INTERACTION_DECISION_MINIMAL_SCHEMA, TELEGRAM_INTERACTION_DECISION_REPAIR_SCHEMA, TELEGRAM_CHAT_REPLY_RESPONSE_FORMAT, TELEGRAM_SPACED_URL_RE, TELEGRAM_HTTP_URL_RE, TELEGRAM_STUCK_SELF_TALK_PREFIXES, TELEGRAM_CHAT_HISTORY_LIMIT, TELEGRAM_CONTEXT_RECENT_DEFAULT, TELEGRAM_CONTEXT_LINE_LIMIT, TELEGRAM_CONTEXT_SAMPLE_LIMIT, TELEGRAM_MEMORY_CARD_LIMIT, TELEGRAM_MEMORY_NOTE_LIMIT, TELEGRAM_ASSOCIATIVE_FACT_LIMIT, TELEGRAM_ASSOCIATIVE_USER_FACT_LIMIT, TELEGRAM_ASSOCIATIVE_ACTION_LIMIT, TELEGRAM_ASSOCIATIVE_RELATION_LIMIT, TELEGRAM_MEMORY_STOPWORDS, TELEGRAM_MEMORY_GENERIC_QUERY_TOKENS, TELEGRAM_SUB_AGENT_BOUNDED_OPTIONS, TELEGRAM_PUBLIC_FAST_OPTIONS, TELEGRAM_ADMIN_EVIDENCE_OPTIONS, TELEGRAM_SUB_AGENT_DEFAULT_LIMIT, TELEGRAM_SUB_AGENT_MAX_LIMIT, TELEGRAM_SUB_AGENT_BURST_CONTEXT_LIMIT, TELEGRAM_ADMIN_LIVE_PANEL_PAGES, TELEGRAM_ADMIN_LIVE_MUTATION_TOOLS, TELEGRAM_PUBLIC_HELP_COMMANDS2, TELEGRAM_REMINDER_SLASH_COMMANDS, TELEGRAM_REFLECTION_SLASH_COMMANDS, TELEGRAM_PUBLIC_BOT_COMMAND_NAMES, TELEGRAM_IMAGE_EXTENSIONS, MEDIA_CACHE_TTL_MS, TELEGRAM_CHANNEL_DMN_SWEEP_MS, TELEGRAM_CHANNEL_DMN_IDLE_AFTER_MS, TELEGRAM_CHANNEL_DMN_MIN_INTERVAL_MS, TELEGRAM_CHANNEL_DMN_MIN_MESSAGES, TELEGRAM_ALLOWED_UPDATES, TELEGRAM_DEFAULT_LONG_POLL_TIMEOUT_SECONDS, TELEGRAM_ROUTER_AUTO_MIN_PARAMETERS_B, TELEGRAM_PUBLIC_TOOL_QUOTAS, TelegramBridge;
644516
644599
  var init_telegram_bridge = __esm({
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.226",
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.226",
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.16.1",
2305
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.1.tgz",
2306
- "integrity": "sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.226",
3
+ "version": "1.0.228",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",