omnius 1.0.516 → 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 +19 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -687851,7 +687851,9 @@ var init_stimulation = __esm({
|
|
|
687851
687851
|
const state = this.stateFor(input.channelId, now2);
|
|
687852
687852
|
state.lastStimulusAtMs = now2;
|
|
687853
687853
|
state.updatedAtMs = now2;
|
|
687854
|
-
|
|
687854
|
+
if (!input.fromSelf) {
|
|
687855
|
+
state.messagesSinceAnalysis += 1;
|
|
687856
|
+
}
|
|
687855
687857
|
state.messagesSinceAgentOutput += 1;
|
|
687856
687858
|
const metadataStimulus = input.privateChannel || input.directSignal || input.replyToAgent || input.activeAgent || input.forceAnalyze;
|
|
687857
687859
|
if (input.privateChannel) state.attention = Math.max(state.attention, 0.82);
|
|
@@ -687860,7 +687862,9 @@ var init_stimulation = __esm({
|
|
|
687860
687862
|
if (input.activeAgent) state.attention = Math.max(state.attention, 0.68);
|
|
687861
687863
|
state.phase = phaseFromAttention(state.attention);
|
|
687862
687864
|
const messageBudget = state.nextAnalysisAfterMessages ?? PHASE_MESSAGE_BUDGETS[state.phase];
|
|
687863
|
-
const
|
|
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;
|
|
687864
687868
|
let reason = "cadence-hold";
|
|
687865
687869
|
if (!state.lastAnalysisAtMs) reason = "initial-analysis";
|
|
687866
687870
|
else if (input.privateChannel) reason = "private-channel";
|
|
@@ -700878,7 +700882,19 @@ ${retryText}`,
|
|
|
700878
700882
|
directSignal: addressesBot,
|
|
700879
700883
|
replyToAgent: this.telegramMessageRepliesToBot(msg),
|
|
700880
700884
|
activeAgent: this.subAgents.has(sessionKey) || this.telegramActiveWorkSessions.has(sessionKey),
|
|
700881
|
-
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
|
+
})()
|
|
700882
700898
|
});
|
|
700883
700899
|
if (!config) {
|
|
700884
700900
|
const fallback = {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
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.
|
|
9
|
+
"version": "1.0.517",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED