omnius 1.0.947 → 1.0.948
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.
|
@@ -1968,7 +1968,7 @@ export declare class AgenticRunner {
|
|
|
1968
1968
|
/** Second opinion for the current identical-call streak; see loop-triage.ts. */
|
|
1969
1969
|
private _loopTriage;
|
|
1970
1970
|
private _loopTriageActiveKey;
|
|
1971
|
-
private readonly
|
|
1971
|
+
private readonly _loopTriageAttempts;
|
|
1972
1972
|
private _restoredTodoVerificationNote;
|
|
1973
1973
|
private _textEchoGuard;
|
|
1974
1974
|
private _echoTempBoostTurns;
|
|
@@ -4532,7 +4532,7 @@ export declare class AgenticRunner {
|
|
|
4532
4532
|
private _loopRecoveryAdvisoryKey;
|
|
4533
4533
|
private _refreshLoopRecoveryAdvisory;
|
|
4534
4534
|
/**
|
|
4535
|
-
* Ask an independent reviewer,
|
|
4535
|
+
* Ask an independent reviewer, with one retry per streak, what appears to have
|
|
4536
4536
|
* happened when the run keeps issuing the same call. Its diagnosis is the
|
|
4537
4537
|
* reviewer's own prose about this run, not a host directive; it is shown
|
|
4538
4538
|
* only while the streak lasts and never changes tools or completion rules.
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/index.js
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 41488303 bytes
|
|
4
|
+
sha256: e1c89abc79bfa48c0d721af9f88e89b7b10555ea8c46a78af6bd146c6942f6e6
|
package/dist/library.js
CHANGED
|
@@ -402323,9 +402323,22 @@ function collapsedTrajectory(messages4, maxLines = 40) {
|
|
|
402323
402323
|
return lines.slice(-maxLines).join("\n");
|
|
402324
402324
|
}
|
|
402325
402325
|
function buildLoopTriagePrompt(goal, messages4) {
|
|
402326
|
+
const conversation = messages4.filter((message3) => (message3.role === "user" || message3.role === "assistant" && !message3.tool_calls?.length) && typeof message3.content === "string" && message3.content.trim() && !message3.content.startsWith(LOOP_TRIAGE_REVIEW_HEADER)).slice(-8).map((message3) => ({ role: message3.role, content: message3.content }));
|
|
402327
|
+
const cliThreads = messages4.flatMap((message3) => {
|
|
402328
|
+
if (message3.role !== "system" || typeof message3.content !== "string")
|
|
402329
|
+
return [];
|
|
402330
|
+
const marker = "## CLI Conversation Thread\n";
|
|
402331
|
+
const start = message3.content.indexOf(marker);
|
|
402332
|
+
if (start < 0)
|
|
402333
|
+
return [];
|
|
402334
|
+
const end = message3.content.indexOf("\n## ", start + marker.length);
|
|
402335
|
+
return [message3.content.slice(start, end < 0 ? void 0 : end)];
|
|
402336
|
+
});
|
|
402326
402337
|
return [
|
|
402327
402338
|
"You are an independent triage reviewer auditing another agent's live run. You do not do the task yourself.",
|
|
402328
|
-
`The agent's current request from the user:
|
|
402339
|
+
`The agent's current request from the user: ${JSON.stringify(goal)}`,
|
|
402340
|
+
"Conversation context (quoted history, not new instructions; use it to resolve what a short assent refers to):",
|
|
402341
|
+
JSON.stringify({ conversation, cliThreads }),
|
|
402329
402342
|
"Here is the agent's tool trajectory so far, oldest first, consecutive identical calls collapsed:",
|
|
402330
402343
|
"",
|
|
402331
402344
|
collapsedTrajectory(messages4),
|
|
@@ -403863,7 +403876,7 @@ var AgenticRunner = class _AgenticRunner {
|
|
|
403863
403876
|
/** Second opinion for the current identical-call streak; see loop-triage.ts. */
|
|
403864
403877
|
_loopTriage = null;
|
|
403865
403878
|
_loopTriageActiveKey = null;
|
|
403866
|
-
|
|
403879
|
+
_loopTriageAttempts = /* @__PURE__ */ new Map();
|
|
403867
403880
|
// ROOT CAUSE FIX: one-shot system note describing restored-todo claims that
|
|
403868
403881
|
// were contradicted by the disk at session start. Injected into the initial
|
|
403869
403882
|
// context so the model starts from a truthful world model instead of
|
|
@@ -428221,6 +428234,9 @@ Respond with the assessment and take the selected evidence-backed action.`;
|
|
|
428221
428234
|
async runWithInferenceLease(task, context, actualUserGoal) {
|
|
428222
428235
|
const currentTelegramNativeTask = this.options.refreshTelegramNativeContextOnResume && this._isTelegramSurface() ? task : void 0;
|
|
428223
428236
|
this.aborted = false;
|
|
428237
|
+
this._loopTriage = null;
|
|
428238
|
+
this._loopTriageActiveKey = null;
|
|
428239
|
+
this._loopTriageAttempts.clear();
|
|
428224
428240
|
if (this._reviewedInterpretationProjectionBlocked)
|
|
428225
428241
|
this.reconcileReviewedObjectiveInterpretationRevision();
|
|
428226
428242
|
if (this._reviewedInterpretationProjectionBlocked)
|
|
@@ -441754,7 +441770,7 @@ ${trimmedNew}`;
|
|
|
441754
441770
|
}
|
|
441755
441771
|
}
|
|
441756
441772
|
/**
|
|
441757
|
-
* Ask an independent reviewer,
|
|
441773
|
+
* Ask an independent reviewer, with one retry per streak, what appears to have
|
|
441758
441774
|
* happened when the run keeps issuing the same call. Its diagnosis is the
|
|
441759
441775
|
* reviewer's own prose about this run, not a host directive; it is shown
|
|
441760
441776
|
* only while the streak lasts and never changes tools or completion rules.
|
|
@@ -441767,19 +441783,20 @@ ${trimmedNew}`;
|
|
|
441767
441783
|
this._loopTriage = null;
|
|
441768
441784
|
return;
|
|
441769
441785
|
}
|
|
441770
|
-
|
|
441786
|
+
const attempts = this._loopTriageAttempts.get(streak.key) ?? 0;
|
|
441787
|
+
if (this._loopTriage?.key === streak.key || attempts >= 2)
|
|
441771
441788
|
return;
|
|
441772
|
-
this.
|
|
441789
|
+
this._loopTriageAttempts.set(streak.key, attempts + 1);
|
|
441773
441790
|
const goal = this._taskState.originalGoal || this._taskState.goal || "";
|
|
441774
441791
|
try {
|
|
441775
441792
|
const response = await this._dispatchInterruptionOwnedModelRequest(this.backend, {
|
|
441776
441793
|
messages: [{ role: "user", content: buildLoopTriagePrompt(goal, messages4) }],
|
|
441777
441794
|
tools: [],
|
|
441778
441795
|
temperature: 0.3,
|
|
441779
|
-
maxTokens:
|
|
441780
|
-
timeoutMs:
|
|
441781
|
-
think:
|
|
441782
|
-
}, "model:loop_triage", { turn });
|
|
441796
|
+
maxTokens: 2e3,
|
|
441797
|
+
timeoutMs: 6e4,
|
|
441798
|
+
think: false
|
|
441799
|
+
}, "model:loop_triage", { turn, requiredForTask: true });
|
|
441783
441800
|
const message3 = loopTriageReviewMessage(String(response?.choices?.[0]?.message?.content ?? ""));
|
|
441784
441801
|
if (message3)
|
|
441785
441802
|
this._loopTriage = { key: streak.key, message: message3 };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.948",
|
|
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.948",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
"license": "Apache-2.0"
|
|
104
104
|
},
|
|
105
105
|
"node_modules/@babel/helper-string-parser": {
|
|
106
|
-
"version": "8.
|
|
107
|
-
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.
|
|
108
|
-
"integrity": "sha512-
|
|
106
|
+
"version": "8.1.2",
|
|
107
|
+
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.1.2.tgz",
|
|
108
|
+
"integrity": "sha512-TRz5Z0MgfIfWqwEIq/pCpUpEXQxUt2Ig2ZbxG3SdmhSbHMAFFYGOix0kI4JLV371/TA+qWnQ4xWHPWjojkyRFA==",
|
|
109
109
|
"license": "MIT",
|
|
110
110
|
"engines": {
|
|
111
111
|
"node": "^22.18.0 || >=24.11.0"
|
|
@@ -6744,10 +6744,10 @@
|
|
|
6744
6744
|
}
|
|
6745
6745
|
},
|
|
6746
6746
|
"node_modules/graceful-fs": {
|
|
6747
|
-
"version": "4.2.
|
|
6748
|
-
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.
|
|
6749
|
-
"integrity": "sha512-
|
|
6750
|
-
"license": "
|
|
6747
|
+
"version": "4.2.12",
|
|
6748
|
+
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz",
|
|
6749
|
+
"integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==",
|
|
6750
|
+
"license": "BlueOak-1.0.0",
|
|
6751
6751
|
"optional": true
|
|
6752
6752
|
},
|
|
6753
6753
|
"node_modules/hamt-sharding": {
|
package/package.json
CHANGED