omnius 1.0.516 → 1.0.518
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 +66 -5
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -566060,9 +566060,54 @@ function detectPeerOmniusOllamaPool() {
|
|
|
566060
566060
|
}
|
|
566061
566061
|
return false;
|
|
566062
566062
|
}
|
|
566063
|
+
async function isJetsonSystem() {
|
|
566064
|
+
try {
|
|
566065
|
+
const { existsSync: existsSync174 } = await import("node:fs");
|
|
566066
|
+
const jetsonIndicators = [
|
|
566067
|
+
"/sys/devices/platform/tegra-gr2d",
|
|
566068
|
+
"/sys/devices/platform/tegra-fb",
|
|
566069
|
+
"/sys/devices/soc0/soc_id"
|
|
566070
|
+
];
|
|
566071
|
+
return jetsonIndicators.some((p2) => existsSync174(p2));
|
|
566072
|
+
} catch {
|
|
566073
|
+
return false;
|
|
566074
|
+
}
|
|
566075
|
+
}
|
|
566076
|
+
async function detectGpusViaJtop() {
|
|
566077
|
+
try {
|
|
566078
|
+
const { execSync: execSync41 } = await import("node:child_process");
|
|
566079
|
+
const output = execSync41("jtop -c 1 -j", {
|
|
566080
|
+
encoding: "utf-8",
|
|
566081
|
+
timeout: 3e3,
|
|
566082
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
566083
|
+
});
|
|
566084
|
+
const data = JSON.parse(output);
|
|
566085
|
+
if (data?.gpu && Array.isArray(data.gpu)) {
|
|
566086
|
+
return data.gpu.map((g, i2) => ({
|
|
566087
|
+
index: i2,
|
|
566088
|
+
uuid: `jetson-gpu-${i2}`,
|
|
566089
|
+
name: g.name || "NVIDIA Jetson GPU",
|
|
566090
|
+
memoryTotalMB: g.memory_total || 0,
|
|
566091
|
+
memoryFreeMB: g.memory_free || 0,
|
|
566092
|
+
utilization: g.utilization || 0,
|
|
566093
|
+
computeCap: g.compute_cap || "7.2"
|
|
566094
|
+
// Jetson Xavier: 7.2, Orin: 8.7
|
|
566095
|
+
}));
|
|
566096
|
+
}
|
|
566097
|
+
return [];
|
|
566098
|
+
} catch {
|
|
566099
|
+
return [];
|
|
566100
|
+
}
|
|
566101
|
+
}
|
|
566063
566102
|
async function detectGpus() {
|
|
566064
|
-
if (_nvidiaSmiAvailable === false)
|
|
566103
|
+
if (_nvidiaSmiAvailable === false) {
|
|
566104
|
+
if (await isJetsonSystem()) {
|
|
566105
|
+
const jtopGpus = await detectGpusViaJtop();
|
|
566106
|
+
if (jtopGpus.length > 0)
|
|
566107
|
+
return jtopGpus;
|
|
566108
|
+
}
|
|
566065
566109
|
return [];
|
|
566110
|
+
}
|
|
566066
566111
|
return new Promise((resolve78) => {
|
|
566067
566112
|
const queryFields = "index,uuid,name,memory.total,memory.free,utilization.gpu,compute_cap";
|
|
566068
566113
|
exec2(`nvidia-smi --query-gpu=${queryFields} --format=csv,noheader,nounits 2>/dev/null`, { encoding: "utf8", timeout: 3e3 }, (err, stdout) => {
|
|
@@ -680855,7 +680900,7 @@ var init_stream_renderer = __esm({
|
|
|
680855
680900
|
if (!text3) return;
|
|
680856
680901
|
}
|
|
680857
680902
|
}
|
|
680858
|
-
const usePrefix = this.lineStarted ? "" : prefix;
|
|
680903
|
+
const usePrefix = this.lineStarted && this._cursorCol > 0 ? "" : prefix;
|
|
680859
680904
|
const usableW = this.lineStarted ? maxW : Math.max(1, maxW - usePrefix.length);
|
|
680860
680905
|
const lines = text3.length > usableW ? this.wordWrap(text3, usableW) : [text3];
|
|
680861
680906
|
const isBlockquote = kind === "content" && /^>\s/.test(text3);
|
|
@@ -687851,7 +687896,9 @@ var init_stimulation = __esm({
|
|
|
687851
687896
|
const state = this.stateFor(input.channelId, now2);
|
|
687852
687897
|
state.lastStimulusAtMs = now2;
|
|
687853
687898
|
state.updatedAtMs = now2;
|
|
687854
|
-
|
|
687899
|
+
if (!input.fromSelf) {
|
|
687900
|
+
state.messagesSinceAnalysis += 1;
|
|
687901
|
+
}
|
|
687855
687902
|
state.messagesSinceAgentOutput += 1;
|
|
687856
687903
|
const metadataStimulus = input.privateChannel || input.directSignal || input.replyToAgent || input.activeAgent || input.forceAnalyze;
|
|
687857
687904
|
if (input.privateChannel) state.attention = Math.max(state.attention, 0.82);
|
|
@@ -687860,7 +687907,9 @@ var init_stimulation = __esm({
|
|
|
687860
687907
|
if (input.activeAgent) state.attention = Math.max(state.attention, 0.68);
|
|
687861
687908
|
state.phase = phaseFromAttention(state.attention);
|
|
687862
687909
|
const messageBudget = state.nextAnalysisAfterMessages ?? PHASE_MESSAGE_BUDGETS[state.phase];
|
|
687863
|
-
const
|
|
687910
|
+
const ANALYSIS_MIN_INTERVAL_MS = 6e4;
|
|
687911
|
+
const analysisBackoffActive = state.lastAnalysisAtMs != null && now2 - state.lastAnalysisAtMs < ANALYSIS_MIN_INTERVAL_MS;
|
|
687912
|
+
const shouldAnalyze = !state.lastAnalysisAtMs && !analysisBackoffActive || metadataStimulus || state.messagesSinceAnalysis >= messageBudget && !analysisBackoffActive;
|
|
687864
687913
|
let reason = "cadence-hold";
|
|
687865
687914
|
if (!state.lastAnalysisAtMs) reason = "initial-analysis";
|
|
687866
687915
|
else if (input.privateChannel) reason = "private-channel";
|
|
@@ -700878,7 +700927,19 @@ ${retryText}`,
|
|
|
700878
700927
|
directSignal: addressesBot,
|
|
700879
700928
|
replyToAgent: this.telegramMessageRepliesToBot(msg),
|
|
700880
700929
|
activeAgent: this.subAgents.has(sessionKey) || this.telegramActiveWorkSessions.has(sessionKey),
|
|
700881
|
-
forceAnalyze: daydreamForceCheck
|
|
700930
|
+
forceAnalyze: daydreamForceCheck,
|
|
700931
|
+
// REG-61-style death-spiral guard: when the inbound message is the
|
|
700932
|
+
// agent's own outbound message re-ingested (Telegram echo), flag it so
|
|
700933
|
+
// the stimulation controller does not advance the analysis cadence.
|
|
700934
|
+
// REG-61-style death-spiral guard: only the agent's OWN outbound message
|
|
700935
|
+
// re-ingested (Telegram echo) should be excluded from the analysis
|
|
700936
|
+
// cadence. A third-party bot in a group is a separate participant and
|
|
700937
|
+
// must still stimulate analysis, so we compare against this bot's id
|
|
700938
|
+
// rather than the generic isBot flag.
|
|
700939
|
+
fromSelf: (() => {
|
|
700940
|
+
const botUserId = this.currentTelegramBotUserId();
|
|
700941
|
+
return Boolean(botUserId != null && msg.fromUserId === botUserId);
|
|
700942
|
+
})()
|
|
700882
700943
|
});
|
|
700883
700944
|
if (!config) {
|
|
700884
700945
|
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.518",
|
|
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.518",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED