omnius 1.0.240 → 1.0.242

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
@@ -6469,7 +6469,7 @@ var init_file_write = __esm({
6469
6469
  });
6470
6470
  return {
6471
6471
  success: true,
6472
- output: `${isNew ? "Created" : "Overwrote"} ${content.length} bytes at ${fullPath} (sha256 ${newHash})`,
6472
+ output: isNew ? `Created ${content.length} bytes at ${fullPath} (sha256 ${newHash})` : `Overwrote ${content.length} bytes at ${fullPath} (sha256 ${beforeHash ?? "?"} → ${newHash})`,
6473
6473
  durationMs: performance.now() - start2,
6474
6474
  mutated: true,
6475
6475
  mutatedFiles: [filePath],
@@ -591473,12 +591473,41 @@ function buildToolResultBody(toolName, success, output, verbose) {
591473
591473
  if (!success) {
591474
591474
  return [{ text: extractFirstLine(output, Number.MAX_SAFE_INTEGER), mode: "wrap", kind: "error" }];
591475
591475
  }
591476
- return diffBodyLines(output, verbose);
591476
+ const firstNewline = output.indexOf("\n");
591477
+ const body = firstNewline >= 0 ? diffBodyLines(output.slice(firstNewline + 1), verbose) : diffBodyLines(output, verbose);
591478
+ const shaHeader = firstNewline >= 0 ? output.slice(0, firstNewline) : output;
591479
+ const shaMatch = shaHeader.match(/^(Edited\s+\S+)\s+at\s+(.+?)\s+\(sha256\s+(\S+)/);
591480
+ if (shaMatch) {
591481
+ body.unshift({
591482
+ text: c3.dim(`${shaMatch[1]} — ${shaMatch[2]} · sha256 ${shaMatch[3].slice(0, 12)}…`),
591483
+ mode: "wrap",
591484
+ kind: "plain"
591485
+ });
591486
+ }
591487
+ return body;
591477
591488
  }
591478
591489
  if (toolName === "file_write") {
591479
591490
  if (!success) {
591480
591491
  return [{ text: extractFirstLine(output, Number.MAX_SAFE_INTEGER), mode: "wrap", kind: "error" }];
591481
591492
  }
591493
+ const createdMatch = output.match(/^Created\s+(\d+)\s+bytes\s+at\s+(.+?)\s+\(sha256\s+(\S+)\)/);
591494
+ const overwroteMatch = output.match(/^Overwrote\s+(\d+)\s+bytes\s+at\s+(.+?)\s+\(sha256\s+(\S+)\s*→\s*(\S+)\)/);
591495
+ if (createdMatch) {
591496
+ const [, bytes, filePath, hash] = createdMatch;
591497
+ return [{
591498
+ text: c3.dim(`Created ${filePath} — ${Number(bytes).toLocaleString()}B · sha256 ${hash.slice(0, 12)}…`),
591499
+ mode: "wrap",
591500
+ kind: "plain"
591501
+ }];
591502
+ }
591503
+ if (overwroteMatch) {
591504
+ const [, bytes, filePath, oldHash, newHash] = overwroteMatch;
591505
+ return [{
591506
+ text: c3.dim(`Overwrote ${filePath} — ${Number(bytes).toLocaleString()}B · sha256 ${oldHash.slice(0, 12)}… → ${newHash.slice(0, 12)}…`),
591507
+ mode: "wrap",
591508
+ kind: "plain"
591509
+ }];
591510
+ }
591482
591511
  const writeLines = output.split("\n").filter((l2) => l2.trim());
591483
591512
  if (writeLines.length === 0) {
591484
591513
  return [{ text: "Done", mode: "wrap", kind: "success" }];
@@ -591573,7 +591602,8 @@ function codePreviewLines(output, maxLines) {
591573
591602
  const body = shown.map((line) => ({
591574
591603
  text: line,
591575
591604
  mode: "truncate",
591576
- kind: "dim"
591605
+ kind: "plain"
591606
+ // show content in default terminal color, not dim
591577
591607
  }));
591578
591608
  const remaining = lines.length - start2 - shown.length;
591579
591609
  if (remaining > 0) {
@@ -597464,7 +597494,7 @@ var init_call_agent = __esm({
597464
597494
  ts: Date.now(),
597465
597495
  source: "call",
597466
597496
  sourceId: clientId,
597467
- summary: `Responded: ${summary.slice(0, 100)}`
597497
+ summary: `Responded: ${summary}`
597468
597498
  });
597469
597499
  return { success: true, output: summary };
597470
597500
  }
@@ -597485,7 +597515,7 @@ var init_call_agent = __esm({
597485
597515
  if (event.type === "tool_result") {
597486
597516
  const toolName = event.toolName ?? "unknown";
597487
597517
  const success = event.success ?? false;
597488
- const content = String(event.content ?? "").slice(0, 100);
597518
+ const content = String(event.content ?? "");
597489
597519
  this.emit("toolResult", toolName, success, content);
597490
597520
  feed.push({
597491
597521
  ts: Date.now(),
@@ -616691,7 +616721,7 @@ function describeToolCall(toolName, args, personality = 2, emotion, stark = fals
616691
616721
  }
616692
616722
  function extractResultDigest(toolName, content) {
616693
616723
  if (!content || content.length < 5) return "";
616694
- const text2 = content.slice(0, 2e3);
616724
+ const text2 = content.slice(0, 8e3);
616695
616725
  const nuggets = [];
616696
616726
  const ethMatch = text2.match(/([\d.]+)\s*ETH/i);
616697
616727
  if (ethMatch) nuggets.push(`${ethMatch[1]} ETH`);
@@ -616735,8 +616765,8 @@ function extractResultDigest(toolName, content) {
616735
616765
  const contentDigest = extractContentSummary(text2, toolName);
616736
616766
  if (contentDigest) nuggets.push(contentDigest);
616737
616767
  }
616738
- const digest3 = nuggets.slice(0, 3).join(", ");
616739
- return digest3.length > 100 ? digest3.slice(0, 97) + "..." : digest3;
616768
+ const digest3 = nuggets.slice(0, 5).join(", ");
616769
+ return digest3.length > 400 ? digest3.slice(0, 397) + "..." : digest3;
616740
616770
  }
616741
616771
  function extractContentSummary(text2, toolName) {
616742
616772
  let cleaned = text2.replace(/^\s*\d+[│|:→]\s*/gm, "").replace(/\d{4}-\d{2}-\d{2}T[\d:.]+Z?\s*/g, "").replace(/^[\s*#=-]+$/gm, "").replace(/```[\s\S]*?```/g, "").replace(
@@ -616750,9 +616780,9 @@ function extractContentSummary(text2, toolName) {
616750
616780
  if (/^(\/|\.\/)/.test(line)) continue;
616751
616781
  if (/^\s*[{<]/.test(line)) continue;
616752
616782
  let summary = line;
616753
- if (summary.length > 80) {
616754
- const cut = summary.lastIndexOf(" ", 80);
616755
- summary = summary.slice(0, cut > 20 ? cut : 80);
616783
+ if (summary.length > 400) {
616784
+ const cut = summary.lastIndexOf(" ", 400);
616785
+ summary = summary.slice(0, cut > 20 ? cut : 400);
616756
616786
  }
616757
616787
  if (summary.length > 0 && !(summary.length > 1 && summary[0] === summary[0].toUpperCase() && summary[1] === summary[1].toUpperCase())) {
616758
616788
  summary = summary.charAt(0).toLowerCase() + summary.slice(1);
@@ -616838,15 +616868,14 @@ function describeToolResult(toolName, success, personality = 2, resultContent, e
616838
616868
  }
616839
616869
  function describeTaskComplete(summary, completed, personality = 2, _stark = false) {
616840
616870
  const tier = getTier(personality);
616841
- const truncated = summary.length > 200 ? summary.slice(0, 200) + "..." : summary;
616842
616871
  if (!completed) {
616843
- if (truncated) {
616844
- return tier === "terse" ? `Incomplete: ${truncated}` : `Could not finish. ${truncated}`;
616872
+ if (summary) {
616873
+ return tier === "terse" ? `Incomplete: ${summary}` : `Could not finish. ${summary}`;
616845
616874
  }
616846
616875
  return `Task ended without completion, no summary was provided`;
616847
616876
  }
616848
- if (truncated) {
616849
- return truncated;
616877
+ if (summary) {
616878
+ return summary;
616850
616879
  }
616851
616880
  return `Task completed, but no summary was generated to describe the outcome`;
616852
616881
  }
@@ -617635,16 +617664,19 @@ except Exception as exc:
617635
617664
  /**
617636
617665
  * Split long text into sentence-sized chunks suitable for ONNX TTS.
617637
617666
  * Splits on: newlines (list items, paragraphs), then sentence-ending
617638
- * punctuation (.!?). Short text (<= 200 chars) passes through unchanged.
617667
+ * punctuation (.!?). If no split point is found the full text is kept
617668
+ * as a single chunk — no data is ever silently dropped.
617639
617669
  */
617640
617670
  chunkText(text2) {
617641
- if (text2.length <= 200) return [text2];
617671
+ if (!text2) return [];
617672
+ const MAX_CHUNK = 800;
617673
+ if (text2.length <= MAX_CHUNK) return [text2];
617642
617674
  const chunks = [];
617643
617675
  const lines = text2.split(/\n+/);
617644
617676
  for (const line of lines) {
617645
617677
  const trimmed = line.replace(/^[\s\-*•]+/, "").trim();
617646
617678
  if (!trimmed) continue;
617647
- if (trimmed.length <= 200) {
617679
+ if (trimmed.length <= MAX_CHUNK) {
617648
617680
  chunks.push(trimmed);
617649
617681
  } else {
617650
617682
  const sentences = trimmed.split(/(?<=[.!?])\s+/);
@@ -617654,7 +617686,7 @@ except Exception as exc:
617654
617686
  }
617655
617687
  }
617656
617688
  }
617657
- return chunks.length > 0 ? chunks : [text2.slice(0, 200)];
617689
+ return chunks.length > 0 ? chunks : [text2];
617658
617690
  }
617659
617691
  // -------------------------------------------------------------------------
617660
617692
  // Queue drain
@@ -694427,7 +694459,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
694427
694459
  },
694428
694460
  onAgentSpeech(text2) {
694429
694461
  writeContent(
694430
- () => renderInfo(`\x1B[38;5;37m[agent]\x1B[0m ${text2.slice(0, 120)}`)
694462
+ () => renderInfo(`\x1B[38;5;37m[agent]\x1B[0m ${truncateByLines(text2, 5, 600)}`)
694431
694463
  );
694432
694464
  },
694433
694465
  // Keep state changes silent
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.240",
3
+ "version": "1.0.242",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.240",
9
+ "version": "1.0.242",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.240",
3
+ "version": "1.0.242",
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",