omnius 1.0.246 → 1.0.247

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
@@ -592606,6 +592606,79 @@ function buildToolFooterRows(footer, width, colorCode) {
592606
592606
  }
592607
592607
  return rows;
592608
592608
  }
592609
+ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, width) {
592610
+ const w = Math.max(40, width);
592611
+ const innerWidth = Math.max(1, w - 4);
592612
+ const label = TOOL_LABELS[toolName] ?? toolName;
592613
+ const status = success ? "✔" : "✖";
592614
+ const resultBody = buildToolResultBody(
592615
+ toolName,
592616
+ success,
592617
+ output,
592618
+ opts.verbose
592619
+ );
592620
+ const rawLines = output.split("\n").filter((l2) => l2.trim()).length;
592621
+ const metrics2 = [
592622
+ success ? "ok" : "failed",
592623
+ rawLines > 0 ? `${rawLines} line${rawLines === 1 ? "" : "s"}` : "",
592624
+ output.length > 0 ? `${output.length.toLocaleString()} chars` : "",
592625
+ opts.durationMs && opts.durationMs > 0 ? formatDuration4(opts.durationMs) : ""
592626
+ ].filter(Boolean).join(" · ");
592627
+ const provenance = detectProvenanceAnchors([output]);
592628
+ const artifacts = detectToolArtifacts(output);
592629
+ const footers = [
592630
+ { label: "Artifacts", items: artifacts },
592631
+ { label: "Provenance", items: provenance }
592632
+ ];
592633
+ const colorCode = success ? toolColorCode(toolName) : TOOL_ERROR_COLOR_CODE;
592634
+ const lines = [
592635
+ buildToolTopBorder(
592636
+ `${status} ${label}`,
592637
+ metrics2,
592638
+ w,
592639
+ colorCode,
592640
+ success ? void 0 : TOOL_ERROR_COLOR_CODE
592641
+ )
592642
+ ];
592643
+ const triggerTexts = formatToolArgsForBox(toolName, callArgs, opts.verbose);
592644
+ for (const text2 of triggerTexts) {
592645
+ const chunks = wrapToolTextLine(text2, innerWidth);
592646
+ for (const chunk of chunks) {
592647
+ lines.push(
592648
+ buildToolContentRow(formatToolBoxLine(chunk, "tool"), w, colorCode)
592649
+ );
592650
+ }
592651
+ }
592652
+ lines.push(buildToolDivider(w, colorCode));
592653
+ if (resultBody.length > 0) {
592654
+ for (const bodyLine of resultBody) {
592655
+ const text2 = sanitizeToolBoxContent(bodyLine.text);
592656
+ const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth);
592657
+ for (const chunk of chunks) {
592658
+ lines.push(
592659
+ buildToolContentRow(
592660
+ formatToolBoxLine(chunk, bodyLine.kind),
592661
+ w,
592662
+ colorCode
592663
+ )
592664
+ );
592665
+ }
592666
+ }
592667
+ } else {
592668
+ lines.push(
592669
+ buildToolContentRow(formatToolBoxLine("Done", "dim"), w, colorCode)
592670
+ );
592671
+ }
592672
+ const activeFooters = footers.filter((f2) => f2.items.length > 0);
592673
+ if (activeFooters.length > 0) {
592674
+ lines.push(buildToolDivider(w, colorCode));
592675
+ for (const footer of activeFooters) {
592676
+ lines.push(...buildToolFooterRows(footer, w, colorCode));
592677
+ }
592678
+ }
592679
+ lines.push(buildToolBottom(w, colorCode));
592680
+ return lines;
592681
+ }
592609
592682
  function buildToolBoxLines(data, width) {
592610
592683
  const w = Math.max(40, width);
592611
592684
  const innerWidth = Math.max(1, w - 4);
@@ -592764,24 +592837,6 @@ function renderContextIntakeBox(opts) {
592764
592837
  opts.host === void 0 ? {} : { host: opts.host }
592765
592838
  );
592766
592839
  }
592767
- function buildToolCallBoxLines(toolName, args, verbose, width) {
592768
- const icon = _emojisEnabled ? `${TOOL_ICONS[toolName] ?? "🔧"} ` : "";
592769
- const label = TOOL_LABELS[toolName] ?? toolName;
592770
- const body = formatToolArgsForBox(toolName, args, verbose).map((text2) => ({
592771
- text: text2,
592772
- mode: "wrap",
592773
- kind: "tool"
592774
- }));
592775
- return buildToolBoxLines(
592776
- {
592777
- title: `${icon}${label}`,
592778
- metrics: "call",
592779
- body,
592780
- colorCode: toolColorCode(toolName)
592781
- },
592782
- width
592783
- );
592784
- }
592785
592840
  function formatToolArgsForBox(toolName, args, verbose) {
592786
592841
  switch (toolName) {
592787
592842
  case "shell":
@@ -593083,12 +593138,12 @@ function detectToolArtifacts(output) {
593083
593138
  function renderToolCallStart(toolName, args, verboseOrOpts) {
593084
593139
  breakTelegramCoalesce();
593085
593140
  const opts = normalizeToolOpts(verboseOrOpts);
593086
- const frozenArgs = { ...args ?? {} };
593087
- renderToolDynamicBlock(
593088
- "tool-call",
593089
- (width) => buildToolCallBoxLines(toolName, frozenArgs, opts.verbose, width),
593090
- opts
593091
- );
593141
+ _pendingToolCall = {
593142
+ toolName,
593143
+ args: { ...args ?? {} },
593144
+ verbose: opts.verbose,
593145
+ colorCode: toolColorCode(toolName)
593146
+ };
593092
593147
  }
593093
593148
  function renderToolLine(content, isLast = false) {
593094
593149
  const connector = isLast ? "└" : "├";
@@ -593099,6 +593154,24 @@ function renderToolResult(toolName, success, output, verboseOrOpts) {
593099
593154
  breakTelegramCoalesce();
593100
593155
  const opts = normalizeToolOpts(verboseOrOpts);
593101
593156
  const frozenOutput = String(output ?? "");
593157
+ if (_pendingToolCall && _pendingToolCall.toolName === toolName) {
593158
+ const pending2 = _pendingToolCall;
593159
+ _pendingToolCall = null;
593160
+ renderToolDynamicBlock(
593161
+ "tool-result",
593162
+ (width) => buildCombinedToolBoxLines(
593163
+ toolName,
593164
+ pending2.args,
593165
+ success,
593166
+ frozenOutput,
593167
+ { ...opts, verbose: pending2.verbose ?? opts.verbose },
593168
+ width
593169
+ ),
593170
+ opts
593171
+ );
593172
+ return;
593173
+ }
593174
+ _pendingToolCall = null;
593102
593175
  renderToolDynamicBlock(
593103
593176
  "tool-result",
593104
593177
  (width) => buildToolResultBoxLines(toolName, success, frozenOutput, opts, width),
@@ -593490,7 +593563,7 @@ function formatDuration4(ms) {
593490
593563
  const secs = Math.floor(totalSecs % 60);
593491
593564
  return `${mins}m ${secs}s`;
593492
593565
  }
593493
- 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, _telegramCoalesce, DIFF_LINE_RE, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
593566
+ var c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, 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, _telegramCoalesce, _pendingToolCall, DIFF_LINE_RE, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
593494
593567
  var init_render = __esm({
593495
593568
  "packages/cli/src/tui/render.ts"() {
593496
593569
  "use strict";
@@ -593568,42 +593641,6 @@ var init_render = __esm({
593568
593641
  tableBar: 250
593569
593642
  // readable grey
593570
593643
  };
593571
- TOOL_ICONS = {
593572
- file_read: "📄",
593573
- file_write: "📝",
593574
- file_edit: "✏️ ",
593575
- shell: "⚡",
593576
- grep_search: "🔍",
593577
- find_files: "📁",
593578
- list_directory: "📂",
593579
- web_search: "🌐",
593580
- web_fetch: "🌍",
593581
- memory_read: "🧠",
593582
- memory_write: "💾",
593583
- task_complete: "✅",
593584
- aiwg_setup: "🏗️",
593585
- aiwg_health: "📊",
593586
- aiwg_workflow: "⚙️",
593587
- batch_edit: "✏️ ",
593588
- codebase_map: "🗺️",
593589
- diagnostic: "🩺",
593590
- git_info: "📋",
593591
- // Parallel execution
593592
- background_run: "🔄",
593593
- task_status: "📊",
593594
- task_output: "📜",
593595
- task_stop: "⏹️",
593596
- sub_agent: "🤖",
593597
- // Image tools
593598
- image_read: "🖼️",
593599
- screenshot: "📸",
593600
- ocr: "👁️",
593601
- // Transcription tools
593602
- transcribe_file: "🎙️",
593603
- transcribe_url: "🎙️",
593604
- // User interaction
593605
- ask_user: "❓"
593606
- };
593607
593644
  TOOL_LABELS = {
593608
593645
  file_read: "Read",
593609
593646
  file_write: "Write",
@@ -593683,6 +593720,7 @@ var init_render = __esm({
593683
593720
  BOX_TJ_R2 = "┤";
593684
593721
  RESET2 = "\x1B[0m";
593685
593722
  _telegramCoalesce = null;
593723
+ _pendingToolCall = null;
593686
593724
  DIFF_LINE_RE = /^\s*\d+\s([-+])\s/;
593687
593725
  _contentWriteHook = null;
593688
593726
  HINTS = [
@@ -632329,6 +632367,15 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
632329
632367
  key: "supertonic",
632330
632368
  label: "Supertonic3",
632331
632369
  detail: "fast local 31-language TTS"
632370
+ },
632371
+ {
632372
+ key: "header-misotts",
632373
+ label: selectColors.dim("─── MisoTTS 8B ───")
632374
+ },
632375
+ {
632376
+ key: "misotts",
632377
+ label: "MisoTTS",
632378
+ detail: "voice clone, GPU ≥24GB VRAM"
632332
632379
  }
632333
632380
  ];
632334
632381
  const voiceResult = await tuiSelect({
@@ -632342,7 +632389,8 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
632342
632389
  "header-onnx",
632343
632390
  "header-mlx",
632344
632391
  "header-clone",
632345
- "header-supertonic"
632392
+ "header-supertonic",
632393
+ "header-misotts"
632346
632394
  ]
632347
632395
  });
632348
632396
  if (voiceResult.confirmed && voiceResult.key) {
@@ -632368,6 +632416,11 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
632368
632416
  label: "Supertonic3",
632369
632417
  detail: "local ONNX Runtime TTS, Python venv, 31 languages"
632370
632418
  },
632419
+ {
632420
+ key: "misotts",
632421
+ label: "MisoTTS 8B",
632422
+ detail: "voice clone, 8B CSM, GPU ≥24GB VRAM"
632423
+ },
632371
632424
  { key: "header-import", label: selectColors.dim("─── Import ───") },
632372
632425
  {
632373
632426
  key: "import-onnx",
@@ -632441,7 +632494,8 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
632441
632494
  onnx: "glados",
632442
632495
  mlx: "kokoro:af_heart",
632443
632496
  luxtts: "luxtts",
632444
- supertonic: "supertonic"
632497
+ supertonic: "supertonic",
632498
+ misotts: "misotts"
632445
632499
  };
632446
632500
  const modelId = systemModelMap[sysResult.key] ?? "glados";
632447
632501
  await ctx3.voiceSetModel(modelId);
@@ -632477,6 +632531,10 @@ async function handleVoiceMenu(ctx3, save2, hasLocal) {
632477
632531
  await handleSupertonicMenu(ctx3, save2);
632478
632532
  continue;
632479
632533
  }
632534
+ case "misotts": {
632535
+ await handleMisottsMenu(ctx3, save2);
632536
+ continue;
632537
+ }
632480
632538
  case "list": {
632481
632539
  await handleVoiceList(ctx3);
632482
632540
  continue;
@@ -632700,6 +632758,132 @@ async function handleSupertonicMenu(ctx3, save2) {
632700
632758
  }
632701
632759
  }
632702
632760
  }
632761
+ async function handleMisottsMenu(ctx3, save2) {
632762
+ const temps = ["0.1", "0.3", "0.5", "0.7", "0.9", "1.1", "1.3", "1.5"];
632763
+ const topks = ["10", "25", "50", "100", "150", "200"];
632764
+ const maxlens = ["5000", "10000", "30000", "60000", "90000", "120000"];
632765
+ while (true) {
632766
+ const st = ctx3.voiceGetMisottsSettings?.() ?? {
632767
+ temperature: 0.9,
632768
+ topk: 50,
632769
+ maxAudioLengthMs: 3e4
632770
+ };
632771
+ const items = [
632772
+ {
632773
+ key: "enable",
632774
+ label: "Use MisoTTS 8B",
632775
+ detail: "select model and enable voice"
632776
+ },
632777
+ {
632778
+ key: "temperature",
632779
+ label: "Temperature",
632780
+ detail: String(st.temperature)
632781
+ },
632782
+ {
632783
+ key: "topk",
632784
+ label: "Top-K",
632785
+ detail: String(st.topk)
632786
+ },
632787
+ {
632788
+ key: "maxlen",
632789
+ label: "Max Audio Length",
632790
+ detail: `${st.maxAudioLengthMs}ms`
632791
+ },
632792
+ {
632793
+ key: "preview",
632794
+ label: "Preview",
632795
+ detail: "speak a test phrase with current settings"
632796
+ }
632797
+ ];
632798
+ const result = await tuiSelect({
632799
+ items,
632800
+ title: "MisoTTS 8B",
632801
+ breadcrumbs: ["Voice"],
632802
+ rl: ctx3.rl,
632803
+ availableRows: ctx3.availableContentRows?.()
632804
+ });
632805
+ if (!result.confirmed || !result.key) return;
632806
+ switch (result.key) {
632807
+ case "enable": {
632808
+ await ctx3.voiceSetModel("misotts");
632809
+ save2({ voice: true, voiceModel: "misotts" });
632810
+ continue;
632811
+ }
632812
+ case "temperature": {
632813
+ const tempItems = temps.map((t2) => ({
632814
+ key: t2,
632815
+ label: t2,
632816
+ detail: t2 === String(st.temperature) ? "current" : ""
632817
+ }));
632818
+ const tr = await tuiSelect({
632819
+ items: tempItems,
632820
+ activeKey: String(st.temperature),
632821
+ title: "Temperature",
632822
+ breadcrumbs: ["Voice", "MisoTTS"],
632823
+ rl: ctx3.rl,
632824
+ availableRows: ctx3.availableContentRows?.()
632825
+ });
632826
+ if (tr.confirmed && tr.key) {
632827
+ const next = ctx3.voiceSetMisottsSettings?.({
632828
+ temperature: Number(tr.key)
632829
+ });
632830
+ if (next) save2({ misottsSettings: next });
632831
+ }
632832
+ continue;
632833
+ }
632834
+ case "topk": {
632835
+ const topkItems = topks.map((k) => ({
632836
+ key: k,
632837
+ label: k,
632838
+ detail: k === String(st.topk) ? "current" : ""
632839
+ }));
632840
+ const tr = await tuiSelect({
632841
+ items: topkItems,
632842
+ activeKey: String(st.topk),
632843
+ title: "Top-K",
632844
+ breadcrumbs: ["Voice", "MisoTTS"],
632845
+ rl: ctx3.rl,
632846
+ availableRows: ctx3.availableContentRows?.()
632847
+ });
632848
+ if (tr.confirmed && tr.key) {
632849
+ const next = ctx3.voiceSetMisottsSettings?.({
632850
+ topk: Number(tr.key)
632851
+ });
632852
+ if (next) save2({ misottsSettings: next });
632853
+ }
632854
+ continue;
632855
+ }
632856
+ case "maxlen": {
632857
+ const maxlenItems = maxlens.map((m2) => ({
632858
+ key: m2,
632859
+ label: `${Number(m2).toLocaleString()}ms`,
632860
+ detail: m2 === String(st.maxAudioLengthMs) ? "current" : ""
632861
+ }));
632862
+ const tr = await tuiSelect({
632863
+ items: maxlenItems,
632864
+ activeKey: String(st.maxAudioLengthMs),
632865
+ title: "Max Audio Length",
632866
+ breadcrumbs: ["Voice", "MisoTTS"],
632867
+ rl: ctx3.rl,
632868
+ availableRows: ctx3.availableContentRows?.()
632869
+ });
632870
+ if (tr.confirmed && tr.key) {
632871
+ const next = ctx3.voiceSetMisottsSettings?.({
632872
+ maxAudioLengthMs: Number(tr.key)
632873
+ });
632874
+ if (next) save2({ misottsSettings: next });
632875
+ }
632876
+ continue;
632877
+ }
632878
+ case "preview": {
632879
+ ctx3.voiceSpeak?.(
632880
+ "Testing MisoTTS voice synthesis with current settings."
632881
+ );
632882
+ continue;
632883
+ }
632884
+ }
632885
+ }
632886
+ }
632703
632887
  async function handleVoiceList(ctx3, focusFilename) {
632704
632888
  if (!ctx3.voiceListClones) {
632705
632889
  renderWarning("Voice clone management not available in this context.");
@@ -696740,6 +696924,12 @@ The user pasted a clipboard image saved at ${relPath}. Use the OCR, vision analy
696740
696924
  voiceDeleteSupertonicProfile(name10) {
696741
696925
  return voiceEngine.deleteSupertonicProfile(name10);
696742
696926
  },
696927
+ voiceGetMisottsSettings() {
696928
+ return voiceEngine.getMisottsSettings();
696929
+ },
696930
+ voiceSetMisottsSettings(patch) {
696931
+ return voiceEngine.setMisottsSettings(patch);
696932
+ },
696743
696933
  setOverlayActive(active) {
696744
696934
  if (active) enterOverlay();
696745
696935
  else leaveOverlay();
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.246",
3
+ "version": "1.0.247",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.246",
9
+ "version": "1.0.247",
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.246",
3
+ "version": "1.0.247",
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",