omnius 1.0.70 → 1.0.71

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
@@ -609996,6 +609996,10 @@ function telegramHistoryTime(entry) {
609996
609996
  minute: "2-digit"
609997
609997
  });
609998
609998
  }
609999
+ function formatTelegramIdentitySignals(signals) {
610000
+ const unique = [...new Set(signals.map((signal) => signal.trim()).filter(Boolean))];
610001
+ return unique.length > 0 ? unique.join(", ") : "none";
610002
+ }
609999
610003
  function summarizeTelegramMessageAttachments(msg) {
610000
610004
  const parts = [];
610001
610005
  if (msg.media) {
@@ -611157,12 +611161,12 @@ Public Telegram runs have the full scoped media-analysis stack for media posted
611157
611161
  - These tools are current-chat scoped. Never inspect arbitrary local files, reveal local paths, or claim access to media outside this Telegram chat scope.
611158
611162
  `.trim();
611159
611163
  GROUP_REPLY_DISCRETION_PROMPT = `
611160
- REPLY DISCRETION: You are in a group chat. The live router has already filtered
611161
- most ambient chatter. Continue to be selective:
611162
- 1. Respond when someone directly addresses the bot, replies to the bot, or keeps
611163
- an active bot-involved task moving.
611164
- 2. Stay silent for conversation between other people, third-person commentary
611165
- about the bot, status chatter, or questions clearly meant for someone else.
611164
+ REPLY DISCRETION: You are in a group chat. The live router selected this turn
611165
+ using context, attention, and relationship signals. Continue that same approach:
611166
+ 1. Use the supplied conversation context to decide whether a visible reply is
611167
+ socially appropriate for this specific turn.
611168
+ 2. Treat direct address, replies, ongoing task continuity, and speaker intent as
611169
+ contextual evidence, not automatic triggers.
611166
611170
  3. Do not reply just because you know an answer or could add color.
611167
611171
  4. Peer bots are labeled as bots in context. Do not reflexively answer bot
611168
611172
  chatter; only continue bot-to-bot exchanges when the message is clearly
@@ -611376,6 +611380,7 @@ External acquisition contract:
611376
611380
  state = {
611377
611381
  active: false,
611378
611382
  botUsername: "",
611383
+ botFirstName: void 0,
611379
611384
  supportsGuestQueries: false,
611380
611385
  canReadAllGroupMessages: false,
611381
611386
  interactionMode: "auto",
@@ -614258,21 +614263,12 @@ ${lines.join("\n")}`);
614258
614263
  activeAgent: this.subAgents.has(sessionKey),
614259
614264
  forceAnalyze: daydreamForceCheck
614260
614265
  });
614261
- if (isGroup && !stimulationProbe.shouldAnalyze) {
614262
- return {
614263
- route: forcedRoute ?? "chat",
614264
- shouldReply: false,
614265
- confidence: 0.35,
614266
- reason: `stimulation cadence held analysis (${stimulationProbe.reason}); context retained`,
614267
- source: "attention-gated"
614268
- };
614269
- }
614270
614266
  if (!config) {
614271
614267
  const fallback2 = {
614272
614268
  route: forcedRoute ?? (isGroup ? "action" : "chat"),
614273
- shouldReply: !isGroup || addressesBot,
614269
+ shouldReply: false,
614274
614270
  confidence: 0,
614275
- reason: isGroup ? addressesBot ? "router inference unavailable; Telegram message directly addresses the bot" : "router inference unavailable; public group fails closed without keyword heuristics" : "router inference unavailable; private chat defaults to quick reply",
614271
+ reason: "router inference unavailable; no model-derived reply decision",
614276
614272
  source: "inference-unavailable"
614277
614273
  };
614278
614274
  this.applyTelegramStimulationDecision(sessionKey, fallback2);
@@ -614286,6 +614282,12 @@ ${lines.join("\n")}`);
614286
614282
  const forcedLine = forcedRoute ? `The operator selected Telegram mode "${forcedRoute}". The route field MUST be "${forcedRoute}", but should_reply must still be inferred live from context.` : `The operator selected Telegram mode "auto". Infer route live from context.`;
614287
614283
  const context2 = this.buildTelegramConversationContextStream(sessionKey, msg, isGroup ? 36 : 20);
614288
614284
  const currentReplyContext = this.buildTelegramCurrentReplyContext(sessionKey, msg);
614285
+ const botUsername = this.state.botUsername || "unknown";
614286
+ const botIdentitySignals = [
614287
+ botUsername && botUsername !== "unknown" ? `@${botUsername}` : "",
614288
+ botUsername && botUsername !== "unknown" ? botUsername.replace(/^@/, "") : "",
614289
+ this.state.botFirstName || ""
614290
+ ];
614289
614291
  const userPrompt = [
614290
614292
  `You are the Telegram live routing and reply-discretion model.`,
614291
614293
  `Return JSON only, with no markdown and no explanation outside JSON.`,
@@ -614297,10 +614299,10 @@ ${lines.join("\n")}`);
614297
614299
  `- action: tools, workspace context, media processing, web lookup, delegation, or a multi-step agent loop may be needed.`,
614298
614300
  `Route discipline: greetings, acknowledgements, casual tone/style discussion, and simple conversational questions are chat. Use action only when the message asks you to inspect, create, change, send, remember, search, analyze media, extract text from images/screenshots/forms/scans, name/enroll/identify a person/face/voice from media, or otherwise do tool-backed work.`,
614299
614301
  ``,
614300
- `Reply discretion: infer from the live thread, speaker relationships, direct platform signals, replies, tone, current message, and any private channel daydream artifact supplied in context. Do not use static keyword rules.`,
614301
- `Private chats: should_reply is normally true.`,
614302
- `Group/public chats: default should_reply to false unless the current message clearly addresses the bot, replies to the bot, continues an active bot-involved exchange, assigns the bot work, asks for the bot's view, or is semantically connected to durable memory/current discussion in a way where a concise bot reply is socially useful. Ambient chatter, third-person discussion about the bot, commands meant for a human, or questions among other people are false. Do not set true just because the bot could help.`,
614303
- `Bot-to-bot discipline: sender labels include [bot] or [human]. Treat peer bots as autonomous actors, not human users. Be more conservative with peer-bot messages unless explicitly addressed, and avoid bot loops by preferring no_reply for repetitive bot chatter.`,
614302
+ `Reply discretion: make a human-like attention decision from the full social context. Observe the message, relationship stream, reply graph, conversation momentum, prior bot involvement, speaker intent, and notification-like signals, then decide whether a visible reply would be natural.`,
614303
+ `No hard triggers: direct address, @mentions, name/identity references, private-chat delivery, replies, active threads, and stimulation score are evidence only. They may raise or lower salience, but none guarantees should_reply=true or should_reply=false.`,
614304
+ `No keyword routing: do not use static keyword rules. Infer whether identity references are actually aimed at this bot from syntax, tone, recent turns, and relationships.`,
614305
+ `Bot-to-bot discipline: sender labels include [bot] or [human]. Treat peer bots as autonomous actors, not human users. Avoid bot loops by replying only when the exchange context makes a response socially useful.`,
614304
614306
  `Ingress discipline: this Telegram message has already been retained as chat context. should_reply controls only whether to emit a visible reply.`,
614305
614307
  `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.`,
614306
614308
  `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.`,
@@ -614308,8 +614310,8 @@ ${lines.join("\n")}`);
614308
614310
  forcedLine,
614309
614311
  ``,
614310
614312
  `Tool context: ${toolContext}`,
614311
- `Bot username: ${this.state.botUsername || "unknown"}`,
614312
- `Current message directly addresses this bot: ${addressesBot ? "yes" : "no"}`,
614313
+ `Known self identity signals (context only, not triggers): ${formatTelegramIdentitySignals(botIdentitySignals)}`,
614314
+ `Platform notification/direct-address signal (salience evidence only, not a decision): ${addressesBot ? "yes" : "no"}`,
614313
614315
  `Current chat type: ${msg.chatType}`,
614314
614316
  `Current sender: ${telegramSpeakerLabel(msg)} [${telegramActorKindLabel(msg)}]`,
614315
614317
  msg.replyToMessageId ? `Current message replies to message_id ${msg.replyToMessageId}` : "",
@@ -614318,8 +614320,9 @@ ${lines.join("\n")}`);
614318
614320
  (msg.mentionedUsernames ?? []).length > 0 ? `Current message mentions: ${(msg.mentionedUsernames ?? []).map((name10) => `@${name10}`).join(", ")}` : "",
614319
614321
  msg.media ? `Current message has media: ${summarizeTelegramMessageAttachments(msg)}` : "",
614320
614322
  ``,
614321
- `Current stimulation state before semantic decision:
614323
+ `Current stimulation state before semantic decision (context only; do not treat cadence as a hard reply filter):
614322
614324
  ${stimulationProbe.context}`,
614325
+ `Stimulation analysis cadence says: ${stimulationProbe.shouldAnalyze ? "analyze-now" : `low-priority sample (${stimulationProbe.reason})`}. You must still make the should_reply decision semantically.`,
614323
614326
  ``,
614324
614327
  context2,
614325
614328
  ``,
@@ -614343,7 +614346,7 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
614343
614346
  });
614344
614347
  const text = result.choices[0]?.message?.content ?? "";
614345
614348
  const parsed = parseTelegramInteractionDecision(text, forcedRoute, {
614346
- defaultShouldReply: !isGroup
614349
+ defaultShouldReply: false
614347
614350
  });
614348
614351
  if (parsed) {
614349
614352
  this.applyTelegramStimulationDecision(sessionKey, parsed);
@@ -614353,9 +614356,9 @@ ${this.quoteTelegramContextBlock(msg.text, 1200)}`
614353
614356
  }
614354
614357
  const fallback = {
614355
614358
  route: forcedRoute ?? (isGroup ? "action" : "chat"),
614356
- shouldReply: !isGroup || addressesBot,
614359
+ shouldReply: false,
614357
614360
  confidence: 0,
614358
- reason: isGroup ? addressesBot ? "router inference failed; Telegram message directly addresses the bot" : "router inference failed; public group fails closed without keyword heuristics" : "router inference failed; private chat defaults to quick reply",
614361
+ reason: "router inference failed; no model-derived reply decision",
614359
614362
  source: "inference-unavailable"
614360
614363
  };
614361
614364
  this.applyTelegramStimulationDecision(sessionKey, fallback);
@@ -614707,6 +614710,7 @@ ${TELEGRAM_PUBLIC_ORCHESTRATOR_CONTRACT}`);
614707
614710
  this.state = {
614708
614711
  active: true,
614709
614712
  botUsername: me.result?.username ?? "unknown",
614713
+ botFirstName: typeof me.result?.first_name === "string" ? me.result.first_name : void 0,
614710
614714
  supportsGuestQueries: Boolean(me.result?.supports_guest_queries),
614711
614715
  canReadAllGroupMessages: me.result?.can_read_all_group_messages === true,
614712
614716
  interactionMode: this.interactionMode,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.70",
9
+ "version": "1.0.71",
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.70",
3
+ "version": "1.0.71",
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",