omnius 1.0.165 → 1.0.166

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
@@ -584502,6 +584502,17 @@ var init_status_bar = __esm({
584502
584502
  this.repaintContent();
584503
584503
  this.renderAgentTabs();
584504
584504
  }
584505
+ cycleAgentView(direction) {
584506
+ if (this._agentViews.size <= 1) return;
584507
+ const ids = Array.from(this._agentViews.keys());
584508
+ const currentIdx = Math.max(0, ids.indexOf(this._activeViewId));
584509
+ const delta = direction === "next" ? 1 : -1;
584510
+ const nextIdx = (currentIdx + delta + ids.length) % ids.length;
584511
+ const nextId2 = ids[nextIdx];
584512
+ if (!nextId2 || nextId2 === this._activeViewId) return;
584513
+ this.switchToView(nextId2);
584514
+ this.refreshHeaderContent();
584515
+ }
584505
584516
  /** Write content to a specific agent's buffer (called from sub-agent event handler) */
584506
584517
  writeToAgentView(id, text) {
584507
584518
  const view = this._agentViews.get(id);
@@ -586377,6 +586388,8 @@ ${CONTENT_BG_SEQ}`);
586377
586388
  if (onCtrlO) di.on("ctrl-o", () => onCtrlO());
586378
586389
  if (onCtrlL) di.on("ctrl-l", () => onCtrlL());
586379
586390
  di.on("ctrl-i", () => self2.toggleFooterMetrics());
586391
+ di.on("ctrl-left", () => self2.cycleAgentView("prev"));
586392
+ di.on("ctrl-right", () => self2.cycleAgentView("next"));
586380
586393
  di.on("pageup", () => self2.pageUpContent());
586381
586394
  di.on("pagedown", () => self2.pageDownContent());
586382
586395
  di.on("shiftup", () => self2.scrollContentUp(3));
@@ -624846,10 +624859,11 @@ function iso(ts) {
624846
624859
  return "";
624847
624860
  }
624848
624861
  }
624849
- var TELEGRAM_SOCIAL_LIMITS;
624862
+ var DEFAULT_TELEGRAM_REPLY_MODE, TELEGRAM_SOCIAL_LIMITS;
624850
624863
  var init_telegram_social_state_types = __esm({
624851
624864
  "packages/cli/src/tui/telegram-social-state-types.ts"() {
624852
624865
  "use strict";
624866
+ DEFAULT_TELEGRAM_REPLY_MODE = "reply_then_notes";
624853
624867
  TELEGRAM_SOCIAL_LIMITS = {
624854
624868
  relationships: 240,
624855
624869
  salience: 180,
@@ -624894,7 +624908,7 @@ function formatTelegramSocialStateContext(state, input) {
624894
624908
  `Current actor node: ${senderKey3} [${participant?.actorKind || telegramSocialActorKind(input)}] messages=${participant?.messageCount ?? 0}${participant?.lastText ? ` last=${jsonLine(participant.lastText, 140)}` : ""}`,
624895
624909
  thread ? `Active channel/thread: ${thread.key}; messages=${thread.messageCount}; participants=${thread.participantKeys.slice(-8).join(", ") || "none"}; last_outcomes=${thread.lastOutcomeIds.slice(-5).join(", ") || "none"}` : "",
624896
624910
  delivery ? `Telegram text delivery raw warning stream: ${delivery.status}; key=${telegramTextDeliveryCapabilityKey({ chatId: input.chatId, messageThreadId: input.messageThreadId })}${delivery.reason ? `; raw=${jsonLine(delivery.reason, 180)}` : ""}` : "Telegram text delivery raw warning stream: none recorded",
624897
- resolvedReplyMode ? `Resolved reply mode: ${resolvedReplyMode.item.mode} from ${resolvedReplyMode.item.scope} (${resolvedReplyMode.key}); confidence=${resolvedReplyMode.item.confidence.toFixed(2)}${resolvedReplyMode.item.note ? ` note=${jsonLine(resolvedReplyMode.item.note, 120)}` : ""}` : "Resolved reply mode: notes_then_reply (system default)",
624911
+ resolvedReplyMode ? `Resolved reply mode: ${resolvedReplyMode.item.mode} from ${resolvedReplyMode.item.scope} (${resolvedReplyMode.key}); confidence=${resolvedReplyMode.item.confidence.toFixed(2)}${resolvedReplyMode.item.note ? ` note=${jsonLine(resolvedReplyMode.item.note, 120)}` : ""}` : `Resolved reply mode: ${DEFAULT_TELEGRAM_REPLY_MODE} (system default)`,
624898
624912
  preferences.length ? `Relevant preference vector for ${senderKey3}:
624899
624913
  ${preferences.join("\n")}` : `Relevant preference vector for ${senderKey3}: no durable preferences yet`,
624900
624914
  scopedPreferences.length ? `Scoped reply preferences:
@@ -625779,6 +625793,11 @@ function telegramDecisionNumber(parsed, keys, nestedKeys = ["internal_notes", "i
625779
625793
  function parseTelegramReplyMode(raw) {
625780
625794
  return raw === "reply_then_notes" || raw === "notes_then_reply" || raw === "reply_only" ? raw : void 0;
625781
625795
  }
625796
+ function formatTelegramPipelineDuration(ms) {
625797
+ if (!Number.isFinite(ms) || ms < 0) return "?";
625798
+ if (ms < 1e3) return `${Math.round(ms)}ms`;
625799
+ return `${(ms / 1e3).toFixed(1)}s`;
625800
+ }
625782
625801
  function parseTelegramReplyPreferenceToolScope(raw) {
625783
625802
  return raw === "current_user_in_chat" || raw === "current_user_global" || raw === "current_group" ? raw : void 0;
625784
625803
  }
@@ -628355,6 +628374,7 @@ External acquisition contract:
628355
628374
  ].filter(Boolean).join(" or ");
628356
628375
  const lines = [
628357
628376
  `decision: ${route} (${decision2.source}, confidence ${decision2.confidence.toFixed(2)})`,
628377
+ decision2.routerLatencyMs !== void 0 ? `timing: ${decision2.routerMode ?? "router"} attention pipeline ${formatTelegramPipelineDuration(decision2.routerLatencyMs)}` : "",
628358
628378
  attention ? `attention: ${attention}` : "",
628359
628379
  `reason: ${decision2.reason}`,
628360
628380
  decision2.diagnosticNote ? `router diagnostic: ${decision2.diagnosticNote}` : "",
@@ -629705,9 +629725,9 @@ ${mediaContext}` : ""
629705
629725
  return resolveTelegramReplyModePreference(this.telegramSocialStateForSession(sessionKey), {
629706
629726
  chatId: msg.chatId,
629707
629727
  actor: this.telegramMessageSocialActorInput(msg)
629708
- })?.mode ?? "notes_then_reply";
629728
+ })?.mode ?? DEFAULT_TELEGRAM_REPLY_MODE;
629709
629729
  } catch {
629710
- return "notes_then_reply";
629730
+ return DEFAULT_TELEGRAM_REPLY_MODE;
629711
629731
  }
629712
629732
  }
629713
629733
  stripTelegramDecisionNotes(decision2) {
@@ -632635,9 +632655,14 @@ ${stimulationProbe.context}`,
632635
632655
  "",
632636
632656
  context2
632637
632657
  ].filter(Boolean).join("\n");
632638
- const brokerSnap = getModelBroker().snapshot();
632639
- const idleSlotRatio = brokerSnap.slots.capacity > 0 ? 1 - brokerSnap.slots.inUse / brokerSnap.slots.capacity : 1;
632640
- const consolidatedMode = idleSlotRatio < 0.5 || process.env["OMNIUS_TG_FORCE_CONSOLIDATED"] === "1";
632658
+ const routerPipelineStartMs = Date.now();
632659
+ const consolidatedMode = process.env["OMNIUS_TG_DELIBERATIVE_ROUTER"] !== "1";
632660
+ const routerMode = consolidatedMode ? "consolidated" : "deliberative";
632661
+ const withRouterTelemetry = (decision2) => ({
632662
+ ...decision2,
632663
+ routerMode,
632664
+ routerLatencyMs: Date.now() - routerPipelineStartMs
632665
+ });
632641
632666
  let reflectionNotes;
632642
632667
  let reflectionContext;
632643
632668
  if (consolidatedMode) {
@@ -632793,7 +632818,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
632793
632818
  defaultShouldReply: false
632794
632819
  });
632795
632820
  if (parsed) {
632796
- return this.applyTelegramSilentReflectionNotes(parsed, reflectionNotes);
632821
+ return withRouterTelemetry(this.applyTelegramSilentReflectionNotes(parsed, reflectionNotes));
632797
632822
  }
632798
632823
  if (isLikelyTruncatedRouterJson(text)) {
632799
632824
  if (diagnostics) diagnostics.repairStatus = "skipped-truncation-rerun";
@@ -632817,7 +632842,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
632817
632842
  defaultShouldReply: false
632818
632843
  });
632819
632844
  if (reparsed) {
632820
- return this.applyTelegramSilentReflectionNotes(reparsed, reflectionNotes);
632845
+ return withRouterTelemetry(this.applyTelegramSilentReflectionNotes(reparsed, reflectionNotes));
632821
632846
  }
632822
632847
  } catch {
632823
632848
  }
@@ -632831,7 +632856,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
632831
632856
  sessionKey
632832
632857
  );
632833
632858
  if (repaired) {
632834
- return this.applyTelegramSilentReflectionNotes(repaired, reflectionNotes);
632859
+ return withRouterTelemetry(this.applyTelegramSilentReflectionNotes(repaired, reflectionNotes));
632835
632860
  }
632836
632861
  const strictRetry = await this.retryTelegramInteractionDecisionStrict(
632837
632862
  backend,
@@ -632843,7 +632868,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
632843
632868
  sessionKey
632844
632869
  );
632845
632870
  if (strictRetry) {
632846
- return this.applyTelegramSilentReflectionNotes(strictRetry, reflectionNotes);
632871
+ return withRouterTelemetry(this.applyTelegramSilentReflectionNotes(strictRetry, reflectionNotes));
632847
632872
  }
632848
632873
  const invalidRouterPreview = telegramRouterRawPreview(text);
632849
632874
  const failureNarrative = this.summarizeTelegramRouterFailure(diagnostics);
@@ -632861,7 +632886,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
632861
632886
  ),
632862
632887
  raw: text
632863
632888
  }, reflectionNotes);
632864
- return fallback;
632889
+ return withRouterTelemetry(fallback);
632865
632890
  } catch (err) {
632866
632891
  const failureNarrative = this.summarizeTelegramRouterFailure(diagnostics);
632867
632892
  const errMsg = err instanceof Error ? err.message : String(err);
@@ -632878,7 +632903,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
632878
632903
  `router failed before live notes were generated: ${errMsg.slice(0, 160)}`
632879
632904
  )
632880
632905
  }, reflectionNotes);
632881
- return fallback;
632906
+ return withRouterTelemetry(fallback);
632882
632907
  }
632883
632908
  }
632884
632909
  /**
@@ -633772,6 +633797,10 @@ Join: ${newUrl}`);
633772
633797
  }
633773
633798
  const rapidContext = this.formatTelegramQueuedSessionContext(work);
633774
633799
  const attentionViewId = this.registerTelegramAttentionView(msg, toolContext);
633800
+ this.subAgentViewCallbacks?.onWrite(
633801
+ attentionViewId || this.viewIdForMessage(msg),
633802
+ `pipeline: queued ${formatTelegramPipelineDuration(Date.now() - work.enqueuedAtMs)}; bundled ${work.messageCount} message${work.messageCount === 1 ? "" : "s"}; entering attention router`
633803
+ );
633775
633804
  let decision2;
633776
633805
  try {
633777
633806
  decision2 = await this.inferTelegramInteractionDecisionCoalesced(msg, toolContext);
@@ -639485,14 +639514,14 @@ var init_direct_input = __esm({
639485
639514
  return;
639486
639515
  case "C":
639487
639516
  if (params === "1;5") {
639488
- this._wordRight();
639517
+ this.emit("ctrl-right");
639489
639518
  return;
639490
639519
  }
639491
639520
  if (this.cursor < this.line.length) this.cursor++;
639492
639521
  return;
639493
639522
  case "D":
639494
639523
  if (params === "1;5") {
639495
- this._wordLeft();
639524
+ this.emit("ctrl-left");
639496
639525
  return;
639497
639526
  }
639498
639527
  if (this.cursor > 0) this.cursor--;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.165",
3
+ "version": "1.0.166",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.165",
9
+ "version": "1.0.166",
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.165",
3
+ "version": "1.0.166",
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",