omnius 1.0.515 → 1.0.517

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
@@ -642902,11 +642902,25 @@ ${CONTENT_BG_SEQ}`);
642902
642902
  }
642903
642903
  this._enhanceConfirmZones = null;
642904
642904
  const label = "enhance";
642905
- const totalPad = ENHANCE_SEG_INNER - label.length;
642906
- const left = Math.floor(totalPad / 2);
642907
- const chip = " ".repeat(left) + label + " ".repeat(totalPad - left);
642908
642905
  const pressed = this._enhancePressed === "enhance";
642909
- const body = pressed ? `\x1B[7m${HEADER_BUTTON_BG}${HEADER_BUTTON_FG}${chip}${RESET4}` : `${HEADER_BUTTON_BG}${HEADER_BUTTON_FG}${chip}${RESET4}`;
642906
+ const ramp = [0, 0.25, 0.5, 0.75, 0.9, 1, 0.9, 0.75, 0.5, 0.25, 0];
642907
+ const center = Math.floor(ENHANCE_SEG_INNER / 2);
642908
+ const labelStart = center - Math.floor(label.length / 2);
642909
+ let body = "";
642910
+ for (let i2 = 0; i2 < ENHANCE_SEG_INNER; i2++) {
642911
+ const t2 = ramp[i2] ?? 0;
642912
+ if (t2 <= 0) {
642913
+ body += " ";
642914
+ continue;
642915
+ }
642916
+ const faded = Math.max(0, Math.round(tuiAccent() * t2));
642917
+ const bg = pressed ? `\x1B[48;5;${faded}m` : `\x1B[48;5;${faded}m`;
642918
+ if (i2 >= labelStart && i2 < labelStart + label.length) {
642919
+ body += `${bg}${HEADER_BUTTON_FG}${label[i2 - labelStart]}${RESET4}`;
642920
+ } else {
642921
+ body += `${bg} ${RESET4}`;
642922
+ }
642923
+ }
642910
642924
  return `${cup}${body}${PANEL_BG_SEQ}`;
642911
642925
  }
642912
642926
  // ── "enhance" public API + lifecycle ─────────────────────────────────
@@ -687837,7 +687851,9 @@ var init_stimulation = __esm({
687837
687851
  const state = this.stateFor(input.channelId, now2);
687838
687852
  state.lastStimulusAtMs = now2;
687839
687853
  state.updatedAtMs = now2;
687840
- state.messagesSinceAnalysis += 1;
687854
+ if (!input.fromSelf) {
687855
+ state.messagesSinceAnalysis += 1;
687856
+ }
687841
687857
  state.messagesSinceAgentOutput += 1;
687842
687858
  const metadataStimulus = input.privateChannel || input.directSignal || input.replyToAgent || input.activeAgent || input.forceAnalyze;
687843
687859
  if (input.privateChannel) state.attention = Math.max(state.attention, 0.82);
@@ -687846,7 +687862,9 @@ var init_stimulation = __esm({
687846
687862
  if (input.activeAgent) state.attention = Math.max(state.attention, 0.68);
687847
687863
  state.phase = phaseFromAttention(state.attention);
687848
687864
  const messageBudget = state.nextAnalysisAfterMessages ?? PHASE_MESSAGE_BUDGETS[state.phase];
687849
- const shouldAnalyze = !state.lastAnalysisAtMs || metadataStimulus || state.messagesSinceAnalysis >= messageBudget;
687865
+ const ANALYSIS_MIN_INTERVAL_MS = 6e4;
687866
+ const analysisBackoffActive = state.lastAnalysisAtMs != null && now2 - state.lastAnalysisAtMs < ANALYSIS_MIN_INTERVAL_MS;
687867
+ const shouldAnalyze = !state.lastAnalysisAtMs && !analysisBackoffActive || metadataStimulus || state.messagesSinceAnalysis >= messageBudget && !analysisBackoffActive;
687850
687868
  let reason = "cadence-hold";
687851
687869
  if (!state.lastAnalysisAtMs) reason = "initial-analysis";
687852
687870
  else if (input.privateChannel) reason = "private-channel";
@@ -700864,7 +700882,19 @@ ${retryText}`,
700864
700882
  directSignal: addressesBot,
700865
700883
  replyToAgent: this.telegramMessageRepliesToBot(msg),
700866
700884
  activeAgent: this.subAgents.has(sessionKey) || this.telegramActiveWorkSessions.has(sessionKey),
700867
- forceAnalyze: daydreamForceCheck
700885
+ forceAnalyze: daydreamForceCheck,
700886
+ // REG-61-style death-spiral guard: when the inbound message is the
700887
+ // agent's own outbound message re-ingested (Telegram echo), flag it so
700888
+ // the stimulation controller does not advance the analysis cadence.
700889
+ // REG-61-style death-spiral guard: only the agent's OWN outbound message
700890
+ // re-ingested (Telegram echo) should be excluded from the analysis
700891
+ // cadence. A third-party bot in a group is a separate participant and
700892
+ // must still stimulate analysis, so we compare against this bot's id
700893
+ // rather than the generic isBot flag.
700894
+ fromSelf: (() => {
700895
+ const botUserId = this.currentTelegramBotUserId();
700896
+ return Boolean(botUserId != null && msg.fromUserId === botUserId);
700897
+ })()
700868
700898
  });
700869
700899
  if (!config) {
700870
700900
  const fallback = {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.515",
3
+ "version": "1.0.517",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.515",
9
+ "version": "1.0.517",
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.515",
3
+ "version": "1.0.517",
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",