omnius 1.0.261 → 1.0.263
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 +144 -42
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -565646,6 +565646,12 @@ var init_agenticRunner = __esm({
|
|
|
565646
565646
|
lastKey: ""
|
|
565647
565647
|
};
|
|
565648
565648
|
_completionIncompleteVerification = null;
|
|
565649
|
+
/**
|
|
565650
|
+
* REG-47: when the backward-pass review exhausts its cycle budget but the run
|
|
565651
|
+
* already produced real deliverables, the run completes WITH this caveat
|
|
565652
|
+
* appended to the summary rather than being stranded as incomplete_verification.
|
|
565653
|
+
*/
|
|
565654
|
+
_completionCaveat = null;
|
|
565649
565655
|
_completionLedger = null;
|
|
565650
565656
|
// ── WO-AM-01/04/10: Associative memory stores ──
|
|
565651
565657
|
// Episode store: every tool call → persistent episode with importance + decay
|
|
@@ -567199,8 +567205,40 @@ ${context2 ?? ""}`;
|
|
|
567199
567205
|
}
|
|
567200
567206
|
}
|
|
567201
567207
|
_evaluateCompletionProvenanceGate(input) {
|
|
567202
|
-
|
|
567203
|
-
|
|
567208
|
+
const claimText = `${input.summary ?? ""}
|
|
567209
|
+
${input.answerText ?? ""}`.toLowerCase().trim();
|
|
567210
|
+
if (!claimText)
|
|
567211
|
+
return { proceed: true };
|
|
567212
|
+
const EXECUTION_CLAIM_PATTERNS = [
|
|
567213
|
+
/comput(?:ed|ing)\s+(?:via|with|using|in|by)\s+(?:python|code|a?\s*script|the\s+interpreter|repl|node|bash|shell)/,
|
|
567214
|
+
/(?:via|using)\s+python(?:'s)?\s+(?:arbitrary-precision|arbitrary precision)/,
|
|
567215
|
+
/arbitrary-precision\s+arithmetic/,
|
|
567216
|
+
/\b(?:i\s+)?(?:ran|executed|evaluated)\s+(?:the\s+)?(?:script|code|command|program|python|tests?|calculation|computation)/
|
|
567217
|
+
];
|
|
567218
|
+
const claimsExecution = EXECUTION_CLAIM_PATTERNS.some((re) => re.test(claimText));
|
|
567219
|
+
if (!claimsExecution)
|
|
567220
|
+
return { proceed: true };
|
|
567221
|
+
const EXECUTION_TOOLS = /* @__PURE__ */ new Set([
|
|
567222
|
+
"shell",
|
|
567223
|
+
"bash",
|
|
567224
|
+
"run_shell",
|
|
567225
|
+
"repl_exec",
|
|
567226
|
+
"python",
|
|
567227
|
+
"run_python",
|
|
567228
|
+
"execute",
|
|
567229
|
+
"run_command",
|
|
567230
|
+
"code_exec",
|
|
567231
|
+
"run_code"
|
|
567232
|
+
]);
|
|
567233
|
+
const ranExecution = input.toolCallLog.some((c8) => c8.success === true && EXECUTION_TOOLS.has(c8.name));
|
|
567234
|
+
if (ranExecution)
|
|
567235
|
+
return { proceed: true };
|
|
567236
|
+
const reason = "completion summary claims a computed/executed result but no successful code/command execution is recorded this run";
|
|
567237
|
+
const feedback = [
|
|
567238
|
+
'[FABRICATED PROVENANCE] Your completion claims a result was computed or executed by a tool (e.g. "computed via Python"), but no successful execution tool call (shell/python/repl) is recorded this run.',
|
|
567239
|
+
"Do NOT report a computed value you did not actually obtain from a tool. Run the computation now — call the shell/python tool with the exact expression — then report the tool-backed result and call task_complete again."
|
|
567240
|
+
].join("\n");
|
|
567241
|
+
return { proceed: false, feedback, reason };
|
|
567204
567242
|
}
|
|
567205
567243
|
/**
|
|
567206
567244
|
* REG-47: post-implementation backward-pass review.
|
|
@@ -567247,30 +567285,19 @@ ${context2 ?? ""}`;
|
|
|
567247
567285
|
return { proceed: true };
|
|
567248
567286
|
const maxCycles = parseInt(process.env["OMNIUS_BACKWARD_PASS_MAX_CYCLES"] || "2", 10) || 2;
|
|
567249
567287
|
if (this._backwardPassCyclesUsed >= maxCycles) {
|
|
567250
|
-
const
|
|
567251
|
-
this.
|
|
567252
|
-
|
|
567253
|
-
|
|
567254
|
-
|
|
567255
|
-
|
|
567256
|
-
|
|
567257
|
-
"",
|
|
567258
|
-
"Not verified / blocked:",
|
|
567259
|
-
reason,
|
|
567260
|
-
"",
|
|
567261
|
-
"Evidence:",
|
|
567262
|
-
`Last backward-pass verdict: ${this._lastBackwardPassVerdict || "unknown"}`
|
|
567263
|
-
].join("\n")
|
|
567264
|
-
};
|
|
567288
|
+
const lastCritique2 = this._lastBackwardPassCritique;
|
|
567289
|
+
const concern = lastCritique2?.rationale?.trim() || this._lastBackwardPassVerdict || "unspecified";
|
|
567290
|
+
this._completionCaveat = [
|
|
567291
|
+
`[COMPLETION CAVEAT] Backward-pass review did not fully approve after ${this._backwardPassCyclesUsed}/${maxCycles} cycle(s).`,
|
|
567292
|
+
`Unresolved reviewer concern: ${concern.slice(0, 600)}`,
|
|
567293
|
+
"The work was completed with deliverables present; treat the above as follow-up rather than a blocker."
|
|
567294
|
+
].join("\n");
|
|
567265
567295
|
this.emit({
|
|
567266
567296
|
type: "status",
|
|
567267
|
-
content: `REG-47 backward-pass exhausted ${this._backwardPassCyclesUsed}/${maxCycles} cycles;
|
|
567297
|
+
content: `REG-47 backward-pass exhausted ${this._backwardPassCyclesUsed}/${maxCycles} cycles; completing with unresolved review notes (deliverables present).`,
|
|
567268
567298
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
567269
567299
|
});
|
|
567270
|
-
return {
|
|
567271
|
-
proceed: false,
|
|
567272
|
-
feedback: "Backward-pass review cycle limit was reached before approval. End as incomplete_verification and report the missing verification evidence instead of claiming completion."
|
|
567273
|
-
};
|
|
567300
|
+
return { proceed: true, feedback: this._completionCaveat };
|
|
567274
567301
|
}
|
|
567275
567302
|
const _backend = this.backend;
|
|
567276
567303
|
const _criticTimeoutMs = parseInt(process.env["OMNIUS_BACKWARD_PASS_TIMEOUT_MS"] || "120000", 10) || 12e4;
|
|
@@ -570081,6 +570108,7 @@ Respond with your assessment, then take action.`;
|
|
|
570081
570108
|
this._completionContract = null;
|
|
570082
570109
|
this._completionContractSeedText = "";
|
|
570083
570110
|
this._completionIncompleteVerification = null;
|
|
570111
|
+
this._completionCaveat = null;
|
|
570084
570112
|
this._completionLedger = null;
|
|
570085
570113
|
this._lastWorldStateTurn = -1;
|
|
570086
570114
|
this._fileWritesSinceLastWorldState = 0;
|
|
@@ -575674,6 +575702,11 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
|
|
|
575674
575702
|
if (this._completionIncompleteVerification && !summary) {
|
|
575675
575703
|
summary = this._completionIncompleteVerification.summary;
|
|
575676
575704
|
}
|
|
575705
|
+
if (completed && this._completionCaveat) {
|
|
575706
|
+
summary = summary ? `${summary}
|
|
575707
|
+
|
|
575708
|
+
${this._completionCaveat}` : this._completionCaveat;
|
|
575709
|
+
}
|
|
575677
575710
|
const runStatus = completed ? "completed" : this._completionLedger?.status === "blocked" || this._completionLedger?.status === "request_changes" ? "incomplete_verification" : this._completionIncompleteVerification ? "incomplete_verification" : "incomplete";
|
|
575678
575711
|
this._emitMASTSummary("run-end");
|
|
575679
575712
|
this.emit({
|
|
@@ -595331,20 +595364,29 @@ function truncateAnsiToWidth(text2, width) {
|
|
|
595331
595364
|
}
|
|
595332
595365
|
return `${out}…${hasAnsi ? RESET2 : ""}`;
|
|
595333
595366
|
}
|
|
595334
|
-
function wrapToolTextLine(text2, width) {
|
|
595367
|
+
function wrapToolTextLine(text2, width, prefix = "") {
|
|
595335
595368
|
text2 = sanitizeToolBoxContent(text2);
|
|
595336
|
-
if (width <= 0) return [text2];
|
|
595337
|
-
if (text2.length === 0) return [""];
|
|
595369
|
+
if (width <= 0) return prefix ? [prefix] : [text2];
|
|
595370
|
+
if (text2.length === 0) return prefix ? [prefix] : [""];
|
|
595338
595371
|
const out = [];
|
|
595339
595372
|
const continuationIndent = hangingIndentForPlainLine(text2, width);
|
|
595373
|
+
const prefixLen = visibleLen(prefix);
|
|
595374
|
+
const avail = Math.max(4, width - prefixLen);
|
|
595340
595375
|
let remaining = text2;
|
|
595341
|
-
while (remaining
|
|
595342
|
-
let breakAt = remaining.
|
|
595343
|
-
|
|
595344
|
-
|
|
595345
|
-
|
|
595376
|
+
while (visibleLen(remaining) > avail) {
|
|
595377
|
+
let breakAt = remaining.length;
|
|
595378
|
+
let bestBreak = remaining.lastIndexOf(" ", avail);
|
|
595379
|
+
if (bestBreak > 0) {
|
|
595380
|
+
breakAt = bestBreak;
|
|
595381
|
+
} else {
|
|
595382
|
+
breakAt = findVisibleBreak(remaining, avail);
|
|
595383
|
+
}
|
|
595384
|
+
const line = remaining.slice(0, breakAt).trimEnd();
|
|
595385
|
+
out.push(prefix ? prefix + line : line);
|
|
595386
|
+
remaining = remaining.slice(breakAt).trimStart();
|
|
595346
595387
|
}
|
|
595347
|
-
|
|
595388
|
+
const lastLine = prefix ? prefix + remaining : remaining;
|
|
595389
|
+
out.push(lastLine);
|
|
595348
595390
|
return out;
|
|
595349
595391
|
}
|
|
595350
595392
|
function wrapLinesWithPrefix(content, prefix, maxWidth) {
|
|
@@ -595512,7 +595554,8 @@ function wrapFooterItems(items, width) {
|
|
|
595512
595554
|
}
|
|
595513
595555
|
if (current) lines.push(current);
|
|
595514
595556
|
if (clean5.length > width) {
|
|
595515
|
-
const
|
|
595557
|
+
const pipe3 = "│ ";
|
|
595558
|
+
const chunks = wrapToolTextLine(clean5, width, pipe3);
|
|
595516
595559
|
lines.push(...chunks.slice(0, -1));
|
|
595517
595560
|
current = chunks[chunks.length - 1] ?? "";
|
|
595518
595561
|
} else {
|
|
@@ -595583,7 +595626,8 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
|
|
|
595583
595626
|
];
|
|
595584
595627
|
const triggerTexts = formatToolArgsForBox(toolName, callArgs, opts.verbose);
|
|
595585
595628
|
for (const text2 of triggerTexts) {
|
|
595586
|
-
const
|
|
595629
|
+
const pipe3 = "│ ";
|
|
595630
|
+
const chunks = wrapToolTextLine(text2, innerWidth, pipe3);
|
|
595587
595631
|
for (const chunk of chunks) {
|
|
595588
595632
|
lines.push(
|
|
595589
595633
|
buildToolContentRow(formatToolBoxLine(chunk, "tool"), w, colorCode)
|
|
@@ -595594,7 +595638,8 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
|
|
|
595594
595638
|
if (resultBody.length > 0) {
|
|
595595
595639
|
for (const bodyLine of resultBody) {
|
|
595596
595640
|
const text2 = sanitizeToolBoxContent(bodyLine.text);
|
|
595597
|
-
const
|
|
595641
|
+
const pipe3 = "│ ";
|
|
595642
|
+
const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
|
|
595598
595643
|
for (const chunk of chunks) {
|
|
595599
595644
|
lines.push(
|
|
595600
595645
|
buildToolContentRow(
|
|
@@ -595635,7 +595680,8 @@ function buildToolBoxLines(data, width) {
|
|
|
595635
595680
|
];
|
|
595636
595681
|
for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
|
|
595637
595682
|
const text2 = sanitizeToolBoxContent(bodyLine.text);
|
|
595638
|
-
const
|
|
595683
|
+
const pipe3 = "│ ";
|
|
595684
|
+
const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
|
|
595639
595685
|
for (const chunk of chunks) {
|
|
595640
595686
|
lines.push(
|
|
595641
595687
|
buildToolContentRow(
|
|
@@ -596245,17 +596291,26 @@ function wrapTaskCompleteSummary(summary) {
|
|
|
596245
596291
|
}
|
|
596246
596292
|
return lines.join("\n");
|
|
596247
596293
|
}
|
|
596248
|
-
function wrapPlainLine(line, width) {
|
|
596294
|
+
function wrapPlainLine(line, width, prefix = "") {
|
|
596249
596295
|
const out = [];
|
|
596250
596296
|
const continuationIndent = hangingIndentForPlainLine(line, width);
|
|
596297
|
+
const prefixLen = visibleLen(prefix);
|
|
596298
|
+
const avail = Math.max(4, width - prefixLen);
|
|
596251
596299
|
let remaining = line;
|
|
596252
|
-
while (remaining
|
|
596253
|
-
let breakAt = remaining.
|
|
596254
|
-
|
|
596255
|
-
|
|
596256
|
-
|
|
596300
|
+
while (visibleLen(remaining) > avail) {
|
|
596301
|
+
let breakAt = remaining.length;
|
|
596302
|
+
let bestBreak = remaining.lastIndexOf(" ", avail);
|
|
596303
|
+
if (bestBreak > 0) {
|
|
596304
|
+
breakAt = bestBreak;
|
|
596305
|
+
} else {
|
|
596306
|
+
breakAt = findVisibleBreak(remaining, avail);
|
|
596307
|
+
}
|
|
596308
|
+
const wrappedLine = remaining.slice(0, breakAt).trimEnd();
|
|
596309
|
+
out.push(prefix ? prefix + wrappedLine : wrappedLine);
|
|
596310
|
+
remaining = remaining.slice(breakAt).trimStart();
|
|
596257
596311
|
}
|
|
596258
|
-
|
|
596312
|
+
const lastLine = prefix ? prefix + remaining : remaining;
|
|
596313
|
+
out.push(lastLine);
|
|
596259
596314
|
return out;
|
|
596260
596315
|
}
|
|
596261
596316
|
function hangingIndentForPlainLine(line, width) {
|
|
@@ -701794,8 +701849,47 @@ function getRuntimeToolProfilePolicy(repoRoot) {
|
|
|
701794
701849
|
const profile = resolveRuntimeToolProfile(repoRoot);
|
|
701795
701850
|
return profile ? profilePolicy(profile) : void 0;
|
|
701796
701851
|
}
|
|
701852
|
+
function formatSubAgentEventForView(event) {
|
|
701853
|
+
const truncate3 = (s2, n2) => s2.length > n2 ? `${s2.slice(0, n2)}…` : s2;
|
|
701854
|
+
switch (event.type) {
|
|
701855
|
+
case "tool_call": {
|
|
701856
|
+
let args = "";
|
|
701857
|
+
try {
|
|
701858
|
+
args = event.toolArgs ? truncate3(JSON.stringify(event.toolArgs), 120) : "";
|
|
701859
|
+
} catch {
|
|
701860
|
+
args = "";
|
|
701861
|
+
}
|
|
701862
|
+
return `→ ${event.toolName ?? "tool"}(${args})`;
|
|
701863
|
+
}
|
|
701864
|
+
case "tool_result": {
|
|
701865
|
+
const mark = event.success === false ? "✗" : "✓";
|
|
701866
|
+
const body = (event.content ?? "").split("\n").slice(0, 3).join(" ").trim();
|
|
701867
|
+
return `${mark} ${event.toolName ?? "tool"}${body ? `: ${truncate3(body, 300)}` : ""}`;
|
|
701868
|
+
}
|
|
701869
|
+
case "assistant_text":
|
|
701870
|
+
case "model_response": {
|
|
701871
|
+
const t2 = (event.content ?? "").trim();
|
|
701872
|
+
return t2 ? truncate3(t2, 1e3) : null;
|
|
701873
|
+
}
|
|
701874
|
+
case "status": {
|
|
701875
|
+
const t2 = (event.content ?? "").trim();
|
|
701876
|
+
return t2 ? `· ${truncate3(t2, 300)}` : null;
|
|
701877
|
+
}
|
|
701878
|
+
case "error": {
|
|
701879
|
+
const t2 = (event.content ?? "").trim();
|
|
701880
|
+
return t2 ? `✗ ${truncate3(t2, 400)}` : null;
|
|
701881
|
+
}
|
|
701882
|
+
case "complete": {
|
|
701883
|
+
const t2 = (event.content ?? "").trim();
|
|
701884
|
+
return t2 ? `✓ ${truncate3(t2, 400)}` : null;
|
|
701885
|
+
}
|
|
701886
|
+
default:
|
|
701887
|
+
return null;
|
|
701888
|
+
}
|
|
701889
|
+
}
|
|
701797
701890
|
function createSubAgentTool(config, repoRoot, ctxWindowSize) {
|
|
701798
701891
|
let onViewRegister = null;
|
|
701892
|
+
let onViewWrite = null;
|
|
701799
701893
|
let onViewStatus = null;
|
|
701800
701894
|
let onComplete = null;
|
|
701801
701895
|
const tool = {
|
|
@@ -701879,6 +701973,11 @@ function createSubAgentTool(config, repoRoot, ctxWindowSize) {
|
|
|
701879
701973
|
recursionDepth: parentDepth + 1,
|
|
701880
701974
|
maxRecursionDepth: maxDepth
|
|
701881
701975
|
});
|
|
701976
|
+
subRunner.onEvent((event) => {
|
|
701977
|
+
if (!onViewWrite) return;
|
|
701978
|
+
const line = formatSubAgentEventForView(event);
|
|
701979
|
+
if (line) onViewWrite(agentId, line);
|
|
701980
|
+
});
|
|
701882
701981
|
const subTools = buildSubAgentTools(repoRoot, config);
|
|
701883
701982
|
subRunner.registerTools(subTools.map(adaptTool6));
|
|
701884
701983
|
subRunner.registerTool(createTaskCompleteTool(subTier, repoRoot));
|
|
@@ -701929,6 +702028,7 @@ Use task_status(task_id="${taskId}") or task_output(task_id="${taskId}") to chec
|
|
|
701929
702028
|
},
|
|
701930
702029
|
setCallbacks: (callbacks) => {
|
|
701931
702030
|
if (callbacks.onViewRegister) onViewRegister = callbacks.onViewRegister;
|
|
702031
|
+
if (callbacks.onViewWrite) onViewWrite = callbacks.onViewWrite;
|
|
701932
702032
|
if (callbacks.onViewStatus) onViewStatus = callbacks.onViewStatus;
|
|
701933
702033
|
if (callbacks.onComplete) onComplete = callbacks.onComplete;
|
|
701934
702034
|
}
|
|
@@ -703125,6 +703225,7 @@ ${content}
|
|
|
703125
703225
|
});
|
|
703126
703226
|
statusBar.ensureMonitorTimer();
|
|
703127
703227
|
},
|
|
703228
|
+
onViewWrite: (id, text2) => statusBar.writeToAgentView(id, text2),
|
|
703128
703229
|
onViewStatus: (id, status) => {
|
|
703129
703230
|
statusBar.updateAgentViewStatus(id, status);
|
|
703130
703231
|
const agent = registry2.subAgents.get(id);
|
|
@@ -704932,6 +705033,7 @@ Review its full output via full_sub_agent(action='output', id='${id}')`
|
|
|
704932
705033
|
});
|
|
704933
705034
|
statusBar.ensureMonitorTimer();
|
|
704934
705035
|
},
|
|
705036
|
+
onViewWrite: (id, text2) => statusBar.writeToAgentView(id, text2),
|
|
704935
705037
|
onViewStatus: (id, status) => {
|
|
704936
705038
|
statusBar.updateAgentViewStatus(id, status);
|
|
704937
705039
|
const agent = registry2.subAgents.get(id);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.263",
|
|
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.263",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED