omnius 1.0.180 → 1.0.181
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 +56 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -637014,6 +637014,25 @@ ${TELEGRAM_PUBLIC_ORCHESTRATOR_CONTRACT}`);
|
|
|
637014
637014
|
subAgent.liveMessageId = state.messageId ?? null;
|
|
637015
637015
|
return state.messageId ?? null;
|
|
637016
637016
|
}
|
|
637017
|
+
telegramAdminRunCompleted(subAgent) {
|
|
637018
|
+
return subAgent.runnerCompleted === true || subAgent.completionBoundarySeen;
|
|
637019
|
+
}
|
|
637020
|
+
telegramAdminIncompleteRunText(subAgent, finalText) {
|
|
637021
|
+
const stats = [
|
|
637022
|
+
typeof subAgent.runnerTurns === "number" ? `${subAgent.runnerTurns} turn(s)` : "",
|
|
637023
|
+
typeof subAgent.runnerToolCalls === "number" ? `${subAgent.runnerToolCalls} tool call(s)` : ""
|
|
637024
|
+
].filter(Boolean).join(", ");
|
|
637025
|
+
const summary = cleanTelegramVisibleReply(subAgent.runnerSummary || "");
|
|
637026
|
+
const parts = [
|
|
637027
|
+
`INCOMPLETE: admin run exited before task_complete${stats ? ` after ${stats}` : ""}.`,
|
|
637028
|
+
"This is not a completed task. The run should be resumed or retried; no successful completion boundary was observed.",
|
|
637029
|
+
finalText ? `Last visible draft:
|
|
637030
|
+
${finalText}` : "",
|
|
637031
|
+
summary ? `Runner summary:
|
|
637032
|
+
${summary}` : ""
|
|
637033
|
+
].filter(Boolean);
|
|
637034
|
+
return parts.join("\n\n");
|
|
637035
|
+
}
|
|
637017
637036
|
async sendOrEditFinalTelegramHTML(msg, html, liveMessageId) {
|
|
637018
637037
|
const chunks = splitTelegramMessageText(html, 3900);
|
|
637019
637038
|
if (chunks.length === 0) return null;
|
|
@@ -637350,6 +637369,18 @@ Join: ${newUrl}`);
|
|
|
637350
637369
|
subAgent.typingInterval = null;
|
|
637351
637370
|
}
|
|
637352
637371
|
const finalText = cleanTelegramVisibleReply(result || "");
|
|
637372
|
+
if (isAdminDM && !this.telegramAdminRunCompleted(subAgent)) {
|
|
637373
|
+
const incompleteText = this.telegramAdminIncompleteRunText(subAgent, finalText);
|
|
637374
|
+
this.subAgentViewCallbacks?.onWrite(subAgent.viewId, incompleteText);
|
|
637375
|
+
this.subAgentViewCallbacks?.onStatus(subAgent.viewId, "failed");
|
|
637376
|
+
if (!msg.guestQueryId) {
|
|
637377
|
+
await this.finalizeTelegramAdminLivePanel(subAgent, msg, incompleteText, "failed");
|
|
637378
|
+
} else if (subAgent.liveMessageId) {
|
|
637379
|
+
await this.deleteLiveMessage(msg.chatId, subAgent.liveMessageId).catch(() => {
|
|
637380
|
+
});
|
|
637381
|
+
}
|
|
637382
|
+
return;
|
|
637383
|
+
}
|
|
637353
637384
|
if (!finalText) {
|
|
637354
637385
|
if (msg.chatType !== "private") {
|
|
637355
637386
|
this.maybeLogTelegramGroupSkip(msg, "discretion: skipped reply");
|
|
@@ -637492,6 +637523,18 @@ Join: ${newUrl}`);
|
|
|
637492
637523
|
await subAgent.liveMessagePromise.catch(() => {
|
|
637493
637524
|
});
|
|
637494
637525
|
}
|
|
637526
|
+
if (!this.telegramAdminRunCompleted(subAgent)) {
|
|
637527
|
+
const incompleteText = this.telegramAdminIncompleteRunText(subAgent, finalText);
|
|
637528
|
+
this.subAgentViewCallbacks?.onWrite(subAgent.viewId, incompleteText);
|
|
637529
|
+
this.subAgentViewCallbacks?.onStatus(subAgent.viewId, "failed");
|
|
637530
|
+
if (!msg.guestQueryId) {
|
|
637531
|
+
await this.finalizeTelegramAdminLivePanel(subAgent, msg, incompleteText, "failed");
|
|
637532
|
+
} else if (subAgent.liveMessageId) {
|
|
637533
|
+
await this.deleteLiveMessage(msg.chatId, subAgent.liveMessageId).catch(() => {
|
|
637534
|
+
});
|
|
637535
|
+
}
|
|
637536
|
+
return;
|
|
637537
|
+
}
|
|
637495
637538
|
if (!finalText) {
|
|
637496
637539
|
if (!msg.guestQueryId) {
|
|
637497
637540
|
await this.finalizeTelegramAdminLivePanel(subAgent, msg, "", "completed");
|
|
@@ -637864,12 +637907,16 @@ ${conversationStream}`
|
|
|
637864
637907
|
config.model,
|
|
637865
637908
|
config.apiKey
|
|
637866
637909
|
);
|
|
637910
|
+
const requestTimeoutMs = config.timeoutMs ?? 3e5;
|
|
637867
637911
|
const runner = new AgenticRunner(backend, {
|
|
637868
|
-
|
|
637869
|
-
|
|
637912
|
+
// Admin DMs are operator-directed work sessions. A hard turn cap turns
|
|
637913
|
+
// active tool progress into a false "completed" Telegram panel when the
|
|
637914
|
+
// model has not reached task_complete yet. Public/group runs stay bounded.
|
|
637915
|
+
maxTurns: isAdminDM ? 0 : isAdminGroup ? 12 : 8,
|
|
637916
|
+
maxTokens: isAdminDM ? 8192 : 2048,
|
|
637870
637917
|
temperature: 0.3,
|
|
637871
|
-
requestTimeoutMs
|
|
637872
|
-
taskTimeoutMs: isAdminDM ?
|
|
637918
|
+
requestTimeoutMs,
|
|
637919
|
+
taskTimeoutMs: isAdminDM ? Math.max(requestTimeoutMs * 3, 9e5) : requestTimeoutMs,
|
|
637873
637920
|
compactionThreshold: this.telegramFallbackCompactionThreshold(modelTier),
|
|
637874
637921
|
contextWindowSize,
|
|
637875
637922
|
modelTier,
|
|
@@ -638096,6 +638143,11 @@ Telegram ${isGroup ? "group" : "public"} chat. Respond concisely. Safety filter:
|
|
|
638096
638143
|
|
|
638097
638144
|
${creativeWorkspace}` : ""}`;
|
|
638098
638145
|
const result = await runner.run(userPrompt, systemCtx);
|
|
638146
|
+
subAgent.runnerCompleted = result.completed;
|
|
638147
|
+
subAgent.runnerTurns = result.turns;
|
|
638148
|
+
subAgent.runnerToolCalls = result.toolCalls;
|
|
638149
|
+
subAgent.runnerSummary = result.summary;
|
|
638150
|
+
if (result.completed) subAgent.completionBoundarySeen = true;
|
|
638099
638151
|
return selectTelegramFinalResponse({
|
|
638100
638152
|
visibleReplyText: subAgent.visibleReplyText,
|
|
638101
638153
|
assistantText: subAgent.assistantText,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.181",
|
|
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.181",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED