omnius 1.0.80 → 1.0.81

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
@@ -608034,7 +608034,7 @@ function phaseFromAttention(attention) {
608034
608034
  function parseStimulationPhase(value2) {
608035
608035
  return normalizePhase(value2);
608036
608036
  }
608037
- var DEFAULT_STATE, PHASE_DEFAULTS, PHASE_FLOORS, StimulationController;
608037
+ var DEFAULT_STATE, PHASE_MESSAGE_BUDGETS, PHASE_FLOORS, StimulationController;
608038
608038
  var init_stimulation = __esm({
608039
608039
  "packages/cli/src/tui/stimulation.ts"() {
608040
608040
  "use strict";
@@ -608047,11 +608047,11 @@ var init_stimulation = __esm({
608047
608047
  consecutiveNoReply: 0,
608048
608048
  updatedAtMs: 0
608049
608049
  };
608050
- PHASE_DEFAULTS = {
608051
- idle: { messages: 6, ms: 10 * 6e4 },
608052
- cooldown: { messages: 4, ms: 5 * 6e4 },
608053
- observing: { messages: 2, ms: 2 * 6e4 },
608054
- engaged: { messages: 1, ms: 45e3 }
608050
+ PHASE_MESSAGE_BUDGETS = {
608051
+ idle: 6,
608052
+ cooldown: 4,
608053
+ observing: 2,
608054
+ engaged: 1
608055
608055
  };
608056
608056
  PHASE_FLOORS = {
608057
608057
  idle: 0,
@@ -608082,7 +608082,6 @@ var init_stimulation = __esm({
608082
608082
  observe(input) {
608083
608083
  const now = input.nowMs ?? Date.now();
608084
608084
  const state = this.stateFor(input.channelId, now);
608085
- this.applyTimeDecay(state, now);
608086
608085
  state.lastStimulusAtMs = now;
608087
608086
  state.updatedAtMs = now;
608088
608087
  state.messagesSinceAnalysis += 1;
@@ -608093,22 +608092,15 @@ var init_stimulation = __esm({
608093
608092
  if (input.replyToAgent) state.attention = Math.max(state.attention, 0.84);
608094
608093
  if (input.activeAgent) state.attention = Math.max(state.attention, 0.68);
608095
608094
  state.phase = phaseFromAttention(state.attention);
608096
- const cadence = PHASE_DEFAULTS[state.phase];
608097
- const messageBudget = state.nextAnalysisAfterMessages ?? cadence.messages;
608098
- const timeDue = state.nextAnalysisAtMs !== void 0 ? now >= state.nextAnalysisAtMs : state.lastAnalysisAtMs !== void 0 && now - state.lastAnalysisAtMs >= cadence.ms;
608099
- const shouldAnalyze = !state.lastAnalysisAtMs || metadataStimulus || state.messagesSinceAnalysis >= messageBudget || timeDue;
608095
+ const messageBudget = state.nextAnalysisAfterMessages ?? PHASE_MESSAGE_BUDGETS[state.phase];
608096
+ const shouldAnalyze = !state.lastAnalysisAtMs || metadataStimulus || state.messagesSinceAnalysis >= messageBudget;
608100
608097
  let reason = "cadence-hold";
608101
608098
  if (!state.lastAnalysisAtMs) reason = "initial-analysis";
608102
608099
  else if (input.privateChannel) reason = "private-channel";
608103
608100
  else if (input.replyToAgent) reason = "reply-to-agent";
608104
608101
  else if (input.directSignal) reason = "direct-platform-signal";
608105
608102
  else if (input.activeAgent) reason = "active-agent-thread";
608106
- else if (state.messagesSinceAnalysis >= messageBudget) reason = "chronological-sample";
608107
- else if (timeDue) reason = "time-sample";
608108
- if (shouldAnalyze) {
608109
- state.lastAnalysisAtMs = now;
608110
- state.messagesSinceAnalysis = 0;
608111
- }
608103
+ else if (state.messagesSinceAnalysis >= messageBudget) reason = "message-sample";
608112
608104
  this.states.set(input.channelId, cloneState(state));
608113
608105
  return {
608114
608106
  shouldAnalyze,
@@ -608119,7 +608111,6 @@ var init_stimulation = __esm({
608119
608111
  }
608120
608112
  applyAgentDecision(channelId, decision, nowMs = Date.now()) {
608121
608113
  const state = this.stateFor(channelId, nowMs);
608122
- this.applyTimeDecay(state, nowMs);
608123
608114
  if (Number.isFinite(decision.attentionScore)) {
608124
608115
  state.attention = clamp017(Number(decision.attentionScore));
608125
608116
  } else if (Number.isFinite(decision.attentionDelta)) {
@@ -608135,14 +608126,14 @@ var init_stimulation = __esm({
608135
608126
  }
608136
608127
  state.consecutiveNoReply = decision.shouldReply ? 0 : state.consecutiveNoReply + 1;
608137
608128
  state.nextAnalysisAfterMessages = Number.isFinite(decision.nextAnalysisAfterMessages) ? Math.max(1, Math.floor(Number(decision.nextAnalysisAfterMessages))) : void 0;
608138
- state.nextAnalysisAtMs = Number.isFinite(decision.nextAnalysisAfterMs) ? nowMs + Math.max(0, Number(decision.nextAnalysisAfterMs)) : void 0;
608129
+ state.lastAnalysisAtMs = nowMs;
608130
+ state.messagesSinceAnalysis = 0;
608139
608131
  state.updatedAtMs = nowMs;
608140
608132
  this.states.set(channelId, cloneState(state));
608141
608133
  return cloneState(state);
608142
608134
  }
608143
608135
  recordAgentOutput(channelId, nowMs = Date.now()) {
608144
608136
  const state = this.stateFor(channelId, nowMs);
608145
- this.applyTimeDecay(state, nowMs);
608146
608137
  state.phase = "engaged";
608147
608138
  state.attention = Math.max(state.attention, 0.78);
608148
608139
  state.lastAgentOutputAtMs = nowMs;
@@ -608164,8 +608155,7 @@ var init_stimulation = __esm({
608164
608155
  `Consecutive no-reply decisions: ${state.consecutiveNoReply}`,
608165
608156
  `Last analysis: ${sinceAnalysis}`,
608166
608157
  `Last agent output: ${sinceAgent}`,
608167
- state.nextAnalysisAfterMessages ? `Agent-requested next check after messages: ${state.nextAnalysisAfterMessages}` : "",
608168
- state.nextAnalysisAtMs ? `Agent-requested next check at: ${new Date(state.nextAnalysisAtMs).toISOString()}` : ""
608158
+ state.nextAnalysisAfterMessages ? `Agent-requested next check after messages: ${state.nextAnalysisAfterMessages}` : ""
608169
608159
  ].filter(Boolean).join("\n");
608170
608160
  }
608171
608161
  stateFor(channelId, nowMs) {
@@ -608177,15 +608167,6 @@ var init_stimulation = __esm({
608177
608167
  updatedAtMs: nowMs
608178
608168
  };
608179
608169
  }
608180
- applyTimeDecay(state, nowMs) {
608181
- const elapsedMs2 = Math.max(0, nowMs - (state.updatedAtMs || nowMs));
608182
- if (elapsedMs2 <= 0) return;
608183
- const halfLives = elapsedMs2 / (12 * 6e4);
608184
- state.attention = clamp017(state.attention * Math.pow(0.5, halfLives));
608185
- if (state.phase !== "engaged" || elapsedMs2 > 4 * 6e4) {
608186
- state.phase = phaseFromAttention(state.attention);
608187
- }
608188
- }
608189
608170
  };
608190
608171
  }
608191
608172
  });
@@ -610420,6 +610401,9 @@ function telegramDecisionRecoverableFlag(text) {
610420
610401
  }
610421
610402
  return void 0;
610422
610403
  }
610404
+ function telegramRouterTimeoutMs(configTimeoutMs, minMs = 15e3, maxMs = 6e4) {
610405
+ return Math.min(Math.max(configTimeoutMs ?? 3e4, minMs), maxMs);
610406
+ }
610423
610407
  function parseTelegramInteractionDecision(text, forcedRoute, options2 = {}) {
610424
610408
  for (const jsonText of telegramDecisionJsonCandidates(text)) {
610425
610409
  try {
@@ -610436,7 +610420,6 @@ function parseTelegramInteractionDecision(text, forcedRoute, options2 = {}) {
610436
610420
  const attentionDeltaRaw = Number(parsed["attention_delta"] ?? parsed["attentionDelta"]);
610437
610421
  const attentionScoreRaw = Number(parsed["attention_score"] ?? parsed["attentionScore"]);
610438
610422
  const nextMessagesRaw = Number(parsed["next_check_after_messages"] ?? parsed["nextCheckAfterMessages"]);
610439
- const nextMsRaw = Number(parsed["next_check_after_ms"] ?? parsed["nextCheckAfterMs"]);
610440
610423
  return {
610441
610424
  route,
610442
610425
  shouldReply,
@@ -610448,7 +610431,6 @@ function parseTelegramInteractionDecision(text, forcedRoute, options2 = {}) {
610448
610431
  attentionDelta: Number.isFinite(attentionDeltaRaw) ? Math.max(-1, Math.min(1, attentionDeltaRaw)) : void 0,
610449
610432
  attentionScore: Number.isFinite(attentionScoreRaw) ? Math.max(0, Math.min(1, attentionScoreRaw)) : void 0,
610450
610433
  nextCheckAfterMessages: Number.isFinite(nextMessagesRaw) ? Math.max(1, Math.floor(nextMessagesRaw)) : void 0,
610451
- nextCheckAfterMs: Number.isFinite(nextMsRaw) ? Math.max(0, Math.floor(nextMsRaw)) : void 0,
610452
610434
  silentDisposition: telegramDecisionNote(parsed, ["silent_disposition", "silentDisposition", "disposition"]),
610453
610435
  mentalNote: telegramDecisionNote(parsed, ["mental_note", "mentalNote", "observation", "insight"]),
610454
610436
  memoryNote: telegramDecisionNote(parsed, ["memory_note", "memoryNote", "memory"]),
@@ -612267,7 +612249,7 @@ External acquisition contract:
612267
612249
  chatAssociativeMemory = /* @__PURE__ */ new Map();
612268
612250
  /** Durable social cognition state by scoped Telegram chat key. */
612269
612251
  chatSocialState = /* @__PURE__ */ new Map();
612270
- /** Generic chronological attention cadence shared by live surfaces. */
612252
+ /** Generic deliverable/message attention cadence shared by live surfaces. */
612271
612253
  stimulation = new StimulationController();
612272
612254
  /** Throttles noisy "skipped group chatter" waterfall logs */
612273
612255
  groupSkipLogAt = /* @__PURE__ */ new Map();
@@ -612505,13 +612487,13 @@ External acquisition contract:
612505
612487
  decision.attentionScore !== void 0 ? `score=${decision.attentionScore.toFixed(2)}` : ""
612506
612488
  ].filter(Boolean).join(", ");
612507
612489
  const cadence = [
612508
- decision.nextCheckAfterMessages !== void 0 ? `after ${decision.nextCheckAfterMessages} message(s)` : "",
612509
- decision.nextCheckAfterMs !== void 0 ? `after ${Math.round(decision.nextCheckAfterMs / 1e3)}s` : ""
612490
+ decision.nextCheckAfterMessages !== void 0 ? `after ${decision.nextCheckAfterMessages} message(s)` : ""
612510
612491
  ].filter(Boolean).join(" or ");
612511
612492
  const lines = [
612512
612493
  `decision: ${route} (${decision.source}, confidence ${decision.confidence.toFixed(2)})`,
612513
612494
  attention ? `attention: ${attention}` : "",
612514
612495
  `reason: ${decision.reason}`,
612496
+ decision.diagnosticNote ? `router diagnostic: ${decision.diagnosticNote}` : "",
612515
612497
  decision.silentDisposition ? `silent disposition: ${decision.silentDisposition}` : "",
612516
612498
  decision.mentalNote ? `mental note: ${decision.mentalNote}` : "",
612517
612499
  decision.memoryNote ? `memory note: ${decision.memoryNote}` : "",
@@ -612528,6 +612510,7 @@ External acquisition contract:
612528
612510
  const route = decision.shouldReply ? `reply via ${decision.route}` : "silent";
612529
612511
  const primary = `attention decision: ${route} (${decision.source}, confidence ${decision.confidence.toFixed(2)}) - ${decision.reason}`;
612530
612512
  const notes2 = [
612513
+ decision.diagnosticNote ? `router diagnostic: ${decision.diagnosticNote}` : "",
612531
612514
  decision.silentDisposition ? `silent reflection: ${decision.silentDisposition}` : "",
612532
612515
  decision.mentalNote ? `mental note: ${decision.mentalNote}` : "",
612533
612516
  decision.memoryNote ? `memory note: ${decision.memoryNote}` : "",
@@ -612535,11 +612518,23 @@ External acquisition contract:
612535
612518
  ].filter(Boolean);
612536
612519
  this.tuiWrite(() => {
612537
612520
  renderTelegramSubAgentEvent(msg.username, primary);
612538
- for (const note of notes2.slice(0, 4)) {
612521
+ for (const note of notes2.slice(0, 5)) {
612539
612522
  renderTelegramSubAgentEvent(msg.username, note);
612540
612523
  }
612541
612524
  });
612542
612525
  }
612526
+ deliverTelegramAttentionDecision(sessionKey, msg, viewId, decision, salienceSignals, daydreamOpportunities = this.latestTelegramDaydreamOpportunityInputs(sessionKey)) {
612527
+ this.writeTelegramAttentionDecision(viewId, decision);
612528
+ this.mirrorTelegramAttentionDecision(msg, decision);
612529
+ this.commitTelegramSocialDecision(
612530
+ sessionKey,
612531
+ msg,
612532
+ decision,
612533
+ salienceSignals,
612534
+ daydreamOpportunities
612535
+ );
612536
+ this.applyTelegramStimulationDecision(sessionKey, decision);
612537
+ }
612543
612538
  normalizeTelegramCommandText(input) {
612544
612539
  const trimmed = input.trim();
612545
612540
  if (!trimmed.startsWith("/")) return input;
@@ -615408,8 +615403,7 @@ ${lines.join("\n")}`);
615408
615403
  phase: decision.attentionState,
615409
615404
  attentionDelta: decision.attentionDelta,
615410
615405
  attentionScore: decision.attentionScore,
615411
- nextAnalysisAfterMessages: decision.nextCheckAfterMessages,
615412
- nextAnalysisAfterMs: decision.nextCheckAfterMs
615406
+ nextAnalysisAfterMessages: decision.nextCheckAfterMessages
615413
615407
  });
615414
615408
  }
615415
615409
  async telegramRouterJsonCompletion(backend, request, diagnostics) {
@@ -615489,7 +615483,7 @@ ${lines.join("\n")}`);
615489
615483
  tools: [],
615490
615484
  temperature: 0,
615491
615485
  maxTokens: 500,
615492
- timeoutMs: Math.min(Math.max(timeoutMs, 3e3), 8e3),
615486
+ timeoutMs: telegramRouterTimeoutMs(timeoutMs, 8e3, 2e4),
615493
615487
  think: false
615494
615488
  });
615495
615489
  const repairedText = result.choices[0]?.message?.content ?? "";
@@ -615512,8 +615506,8 @@ ${lines.join("\n")}`);
615512
615506
 
615513
615507
  [repaired router decision]
615514
615508
  ${repairedText}`,
615515
- mentalNote: parsed.mentalNote ?? "router decision recovered from non-JSON model output",
615516
- memoryNote: parsed.memoryNote ?? "router repair preserved the model-derived attention decision"
615509
+ mentalNote: parsed.mentalNote,
615510
+ memoryNote: parsed.memoryNote
615517
615511
  };
615518
615512
  } catch (err) {
615519
615513
  if (diagnostics) {
@@ -615556,7 +615550,7 @@ ${userPrompt.slice(-4e3)}` : userPrompt;
615556
615550
  tools: [],
615557
615551
  temperature: 0,
615558
615552
  maxTokens: 1200,
615559
- timeoutMs: Math.min(Math.max(timeoutMs, 5e3), 15e3),
615553
+ timeoutMs: telegramRouterTimeoutMs(timeoutMs, 1e4, 3e4),
615560
615554
  think: false
615561
615555
  });
615562
615556
  const retryText = result.choices[0]?.message?.content ?? "";
@@ -615579,7 +615573,7 @@ ${userPrompt.slice(-4e3)}` : userPrompt;
615579
615573
 
615580
615574
  [strict router retry]
615581
615575
  ${retryText}`,
615582
- mentalNote: parsed.mentalNote ?? "strict router retry produced a valid attention decision"
615576
+ mentalNote: parsed.mentalNote
615583
615577
  };
615584
615578
  } catch (err) {
615585
615579
  if (diagnostics) {
@@ -615613,9 +615607,8 @@ ${retryText}`,
615613
615607
  reason: "router inference unavailable; no model-derived reply decision",
615614
615608
  source: "inference-unavailable",
615615
615609
  silentDisposition: "retained as context without replying",
615616
- mentalNote: "router unavailable, so no model-derived attention note was produced"
615610
+ diagnosticNote: "router unavailable; live mental, memory, and relationship notes were not generated"
615617
615611
  };
615618
- this.applyTelegramStimulationDecision(sessionKey, fallback);
615619
615612
  return fallback;
615620
615613
  }
615621
615614
  const backend = new OllamaAgenticBackend(
@@ -615647,7 +615640,7 @@ ${retryText}`,
615647
615640
  `Ingress discipline: this Telegram message has already been retained as chat context. should_reply controls only whether to emit a visible reply.`,
615648
615641
  `Memory discipline: use durable associative user memory, relationships, prior actions, and recent context to infer whether this speaker is continuing a bot-related thread. A mention is not required when the semantic target is clearly the bot or an ongoing bot-mediated discussion.`,
615649
615642
  `Channel daydream discipline: a daydream artifact may highlight relationship signals, unresolved questions, or possible reply opportunities from idle reflection. It can justify analyzing this turn, but it does not force a reply. Reply only if the current user entry makes the intervention timely and socially appropriate.`,
615650
- `Stimulation discipline: also set attention_state, attention_delta, and optional next_check_after_messages/next_check_after_ms. These control future analysis cadence only; they do not force a reply. Use engaged for active back-and-forth, observing for likely relevant context, cooldown for recently irrelevant context, and idle for ambient chatter.`,
615643
+ `Stimulation discipline: also set attention_state, attention_delta, and optional next_check_after_messages. This is a message-deliverable cadence only; do not use elapsed time as an analysis trigger. Use engaged for active back-and-forth, observing for likely relevant context, cooldown for recently irrelevant context, and idle for ambient chatter.`,
615651
615644
  forcedLine,
615652
615645
  ``,
615653
615646
  `Tool context: ${toolContext}`,
@@ -615683,8 +615676,8 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615683
615676
  ],
615684
615677
  tools: [],
615685
615678
  temperature: 0,
615686
- maxTokens: 700,
615687
- timeoutMs: Math.min(Math.max(config.timeoutMs ?? 3e4, 5e3), 15e3),
615679
+ maxTokens: 1e3,
615680
+ timeoutMs: telegramRouterTimeoutMs(config.timeoutMs),
615688
615681
  think: false
615689
615682
  }, diagnostics);
615690
615683
  const text = result.choices[0]?.message?.content ?? "";
@@ -615692,7 +615685,6 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615692
615685
  defaultShouldReply: false
615693
615686
  });
615694
615687
  if (parsed) {
615695
- this.applyTelegramStimulationDecision(sessionKey, parsed);
615696
615688
  return parsed;
615697
615689
  }
615698
615690
  const repaired = await this.repairTelegramInteractionDecision(
@@ -615703,7 +615695,6 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615703
615695
  diagnostics
615704
615696
  );
615705
615697
  if (repaired) {
615706
- this.applyTelegramStimulationDecision(sessionKey, repaired);
615707
615698
  return repaired;
615708
615699
  }
615709
615700
  const strictRetry = await this.retryTelegramInteractionDecisionStrict(
@@ -615715,7 +615706,6 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615715
615706
  diagnostics
615716
615707
  );
615717
615708
  if (strictRetry) {
615718
- this.applyTelegramStimulationDecision(sessionKey, strictRetry);
615719
615709
  return strictRetry;
615720
615710
  }
615721
615711
  const invalidRouterPreview = telegramRouterRawPreview(text);
@@ -615727,15 +615717,13 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615727
615717
  reason: "router output was not valid decision JSON after repair/retry; no model-derived reply decision",
615728
615718
  source: "inference-unavailable",
615729
615719
  silentDisposition: "retained as context without replying because the router decision could not be parsed",
615730
- // Preserve the well-known mental-note strings (existing tests rely
615731
- // on them) but append the per-step diagnostic so operators get a
615732
- // real explanation of what actually failed.
615733
- mentalNote: (invalidRouterPreview ? "router produced an invalid attention decision payload; repair and strict retry did not recover it" : "router produced an empty attention decision payload; strict retry did not recover it") + (failureNarrative.summary ? ` — ${failureNarrative.summary}` : ""),
615734
- memoryNote: this.composeTelegramRouterMemoryNote(invalidRouterPreview, failureNarrative.detail),
615735
- relationshipNote: failureNarrative.relationshipHint,
615720
+ diagnosticNote: this.composeTelegramRouterDiagnosticNote(
615721
+ invalidRouterPreview,
615722
+ failureNarrative,
615723
+ invalidRouterPreview ? "router produced an invalid attention decision payload; repair and strict retry did not recover it" : "router produced an empty attention decision payload; strict retry did not recover it"
615724
+ ),
615736
615725
  raw: text
615737
615726
  };
615738
- this.applyTelegramStimulationDecision(sessionKey, fallback);
615739
615727
  return fallback;
615740
615728
  } catch (err) {
615741
615729
  const failureNarrative = this.summarizeTelegramRouterFailure(diagnostics);
@@ -615747,19 +615735,20 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615747
615735
  reason: `router inference failed; no model-derived reply decision (${errMsg.slice(0, 160)})`,
615748
615736
  source: "inference-unavailable",
615749
615737
  silentDisposition: "retained as context without replying",
615750
- mentalNote: `router failed, so no model-derived attention note was produced` + (failureNarrative.summary ? ` — ${failureNarrative.summary}` : ` — ${errMsg.slice(0, 160)}`),
615751
- memoryNote: failureNarrative.detail ? `router-failure trace: ${failureNarrative.detail}` : `router-failure trace: ${errMsg.slice(0, 240)}`,
615752
- relationshipNote: failureNarrative.relationshipHint
615738
+ diagnosticNote: this.composeTelegramRouterDiagnosticNote(
615739
+ void 0,
615740
+ failureNarrative,
615741
+ `router failed before live notes were generated: ${errMsg.slice(0, 160)}`
615742
+ )
615753
615743
  };
615754
- this.applyTelegramStimulationDecision(sessionKey, fallback);
615755
615744
  return fallback;
615756
615745
  }
615757
615746
  }
615758
615747
  /**
615759
615748
  * Reduce captured per-step diagnostics into:
615760
- * - `summary`: a short outcome-level line for the mental note
615761
- * - `detail`: a longer ordered trace for the memory note
615762
- * - `relationshipHint`: an operational hint (e.g. "ollama backend appears to be injecting <think> tags despite think:false")
615749
+ * - `summary`: a short outcome-level diagnostic
615750
+ * - `detail`: a longer ordered trace for operator debugging
615751
+ * - `operatorHint`: an operational hint (e.g. "ollama backend appears to be injecting <think> tags despite think:false")
615763
615752
  */
615764
615753
  summarizeTelegramRouterFailure(diag) {
615765
615754
  const parts = [];
@@ -615809,24 +615798,26 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
615809
615798
  } else if (diag.strictRetryStatus === "recovered") {
615810
615799
  detailParts.push(`strict-retry: recovered`);
615811
615800
  }
615812
- let relationshipHint;
615801
+ let operatorHint;
615813
615802
  if (networkErrorSeen) {
615814
- relationshipHint = "router backend appears unreachable or rate-limited; continued conversation depends on recovery";
615803
+ operatorHint = "router backend appears unreachable or rate-limited; continued conversation depends on recovery";
615815
615804
  } else if (thinkInjectionSuspected) {
615816
- relationshipHint = "router model emitted <think>-only or unclosed-think output; conversation continuity preserved but inference is degraded";
615805
+ operatorHint = "router model emitted <think>-only or unclosed-think output; conversation continuity preserved but inference is degraded";
615817
615806
  }
615818
615807
  return {
615819
615808
  summary: parts.join("; "),
615820
615809
  detail: detailParts.join("; "),
615821
- relationshipHint
615810
+ operatorHint
615822
615811
  };
615823
615812
  }
615824
- composeTelegramRouterMemoryNote(invalidRouterPreview, detail) {
615813
+ composeTelegramRouterDiagnosticNote(invalidRouterPreview, failureNarrative, headline) {
615825
615814
  const segments = [];
615815
+ segments.push(headline);
615816
+ if (failureNarrative.summary) segments.push(failureNarrative.summary);
615826
615817
  if (invalidRouterPreview) segments.push(`invalid router output preview: ${invalidRouterPreview}`);
615827
- if (detail) segments.push(`router-failure trace: ${detail}`);
615828
- if (segments.length === 0) return void 0;
615829
- return segments.join(" | ");
615818
+ if (failureNarrative.detail) segments.push(`router-failure trace: ${failureNarrative.detail}`);
615819
+ if (failureNarrative.operatorHint) segments.push(failureNarrative.operatorHint);
615820
+ return segments.join(" | ").slice(0, 900);
615830
615821
  }
615831
615822
  buildTelegramWorkspaceContext(modelTier, budget = 14e3) {
615832
615823
  if (!this.repoRoot) return "";
@@ -616592,11 +616583,10 @@ Join: ${newUrl}`);
616592
616583
  if (isGroup) {
616593
616584
  const attentionViewId2 = this.registerTelegramAttentionView(msg, existing.toolContext || toolContext, "active Telegram thread");
616594
616585
  const decision2 = await this.inferTelegramInteractionDecision(msg, existing.toolContext || toolContext);
616595
- this.writeTelegramAttentionDecision(attentionViewId2, decision2);
616596
- this.mirrorTelegramAttentionDecision(msg, decision2);
616597
- this.commitTelegramSocialDecision(
616586
+ this.deliverTelegramAttentionDecision(
616598
616587
  sessionKey,
616599
616588
  msg,
616589
+ attentionViewId2,
616600
616590
  decision2,
616601
616591
  this.telegramMessageIdentitySalienceSignals(msg),
616602
616592
  this.markLatestTelegramDaydreamOpportunitiesConsidered(sessionKey, msg)
@@ -616637,11 +616627,10 @@ Join: ${newUrl}`);
616637
616627
  }
616638
616628
  const attentionViewId = this.registerTelegramAttentionView(msg, toolContext);
616639
616629
  const decision = await this.inferTelegramInteractionDecision(msg, toolContext);
616640
- this.writeTelegramAttentionDecision(attentionViewId, decision);
616641
- this.mirrorTelegramAttentionDecision(msg, decision);
616642
- this.commitTelegramSocialDecision(
616630
+ this.deliverTelegramAttentionDecision(
616643
616631
  sessionKey,
616644
616632
  msg,
616633
+ attentionViewId,
616645
616634
  decision,
616646
616635
  this.telegramMessageIdentitySalienceSignals(msg),
616647
616636
  this.markLatestTelegramDaydreamOpportunitiesConsidered(sessionKey, msg)
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.80",
9
+ "version": "1.0.81",
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.80",
3
+ "version": "1.0.81",
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",