omnius 1.0.482 → 1.0.484
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 +109 -9
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -559128,10 +559128,55 @@ function parseCompilerDiagnostics(text2, language = "unknown") {
|
|
|
559128
559128
|
const out = [];
|
|
559129
559129
|
if (!text2)
|
|
559130
559130
|
return out;
|
|
559131
|
-
|
|
559131
|
+
const allLines = text2.split(/\r?\n/);
|
|
559132
|
+
let pyFile;
|
|
559133
|
+
let pyLine;
|
|
559134
|
+
for (let i2 = 0; i2 < allLines.length; i2++) {
|
|
559135
|
+
const trimmed = allLines[i2].trim();
|
|
559136
|
+
const tbMatch = trimmed.match(/^File\s+"([^"]+)",\s*line\s+(\d+)/);
|
|
559137
|
+
if (tbMatch) {
|
|
559138
|
+
pyFile = tbMatch[1];
|
|
559139
|
+
pyLine = Number(tbMatch[2]);
|
|
559140
|
+
}
|
|
559141
|
+
const excMatch = trimmed.match(/^(\w+(?:\.\w+)*Error):\s*(.*)/);
|
|
559142
|
+
if (excMatch && pyFile && !out.some((d2) => d2.file === pyFile && d2.line === pyLine && d2.message === (excMatch[2] ?? excMatch[0]))) {
|
|
559143
|
+
const kind = /^(?:ModuleNotFound|Import)\w*Error$/.test(excMatch[1]) ? "import_error" : "type_error";
|
|
559144
|
+
out.push({
|
|
559145
|
+
file: pyFile,
|
|
559146
|
+
line: pyLine,
|
|
559147
|
+
kind,
|
|
559148
|
+
symbol: excMatch[1],
|
|
559149
|
+
message: excMatch[2] ?? excMatch[0]
|
|
559150
|
+
});
|
|
559151
|
+
}
|
|
559152
|
+
}
|
|
559153
|
+
for (const raw of allLines) {
|
|
559132
559154
|
const line = raw.trim();
|
|
559133
|
-
if (!line
|
|
559155
|
+
if (!line)
|
|
559156
|
+
continue;
|
|
559157
|
+
const pytestMatch = line.match(/^FAILED\s+(.+?)(?:::(\w+))?(?:\s+-\s+(.+))?$/);
|
|
559158
|
+
if (pytestMatch) {
|
|
559159
|
+
out.push({
|
|
559160
|
+
file: pytestMatch[1],
|
|
559161
|
+
kind: "test_failure",
|
|
559162
|
+
symbol: pytestMatch[2],
|
|
559163
|
+
message: pytestMatch[3] ?? line
|
|
559164
|
+
});
|
|
559165
|
+
continue;
|
|
559166
|
+
}
|
|
559167
|
+
if (!/error|FAILED|unrecognized|Traceback|Warning|warning/i.test(line))
|
|
559134
559168
|
continue;
|
|
559169
|
+
if (/unrecognized\s+(element|attribute)/i.test(line) || /not\s+allowed\s+here/i.test(line)) {
|
|
559170
|
+
const fileMatch = line.match(/^(.+?):/);
|
|
559171
|
+
const lnMatch = line.match(/:(\d+):/);
|
|
559172
|
+
out.push({
|
|
559173
|
+
file: fileMatch?.[1] ?? "unknown.xml",
|
|
559174
|
+
line: lnMatch ? Number(lnMatch[1]) : void 0,
|
|
559175
|
+
kind: "schema_error",
|
|
559176
|
+
message: line
|
|
559177
|
+
});
|
|
559178
|
+
continue;
|
|
559179
|
+
}
|
|
559135
559180
|
const loc = line.match(/^(.+?):(\d+):(?:\d+:)?\s*(?:fatal\s+)?error:\s*(.*)$/i);
|
|
559136
559181
|
const file = loc?.[1];
|
|
559137
559182
|
const lineNo = loc ? Number(loc[2]) : void 0;
|
|
@@ -576236,7 +576281,7 @@ function failureProgressSignal(text2) {
|
|
|
576236
576281
|
if (!s2.trim())
|
|
576237
576282
|
return void 0;
|
|
576238
576283
|
let explicit;
|
|
576239
|
-
for (const m2 of s2.matchAll(/(\d+)\s+(?:errors?|failures?|failed|problems?)\b/gi)) {
|
|
576284
|
+
for (const m2 of s2.matchAll(/(\d+)\s+(?:errors?|failures?|failed|problems?|warnings?)\b/gi)) {
|
|
576240
576285
|
const n2 = Number(m2[1]);
|
|
576241
576286
|
if (Number.isFinite(n2))
|
|
576242
576287
|
explicit = Math.max(explicit ?? 0, n2);
|
|
@@ -576245,7 +576290,11 @@ function failureProgressSignal(text2) {
|
|
|
576245
576290
|
return explicit;
|
|
576246
576291
|
let lines = 0;
|
|
576247
576292
|
for (const line of s2.split(/\r?\n/)) {
|
|
576248
|
-
if (/\b(errors?|fail(?:ed|ure|ures|s)
|
|
576293
|
+
if (/\b(errors?|fail(?:ed|ure|ures|s)?|warnings?|unrecognized)\b/i.test(line))
|
|
576294
|
+
lines++;
|
|
576295
|
+
else if (/\b\w+Error\b/.test(line))
|
|
576296
|
+
lines++;
|
|
576297
|
+
else if (/\bTraceback\b/i.test(line))
|
|
576249
576298
|
lines++;
|
|
576250
576299
|
}
|
|
576251
576300
|
return lines > 0 ? lines : void 0;
|
|
@@ -576387,13 +576436,14 @@ function uniqueLimited(values) {
|
|
|
576387
576436
|
return uniqueValues;
|
|
576388
576437
|
return uniqueValues.slice(-MAX_FORBIDDEN_FAMILIES);
|
|
576389
576438
|
}
|
|
576390
|
-
var directiveCounter, TERMINAL_INCOMPLETE_IGNORE_THRESHOLD, MAX_FORBIDDEN_FAMILIES, FocusSupervisor;
|
|
576439
|
+
var directiveCounter, TERMINAL_INCOMPLETE_IGNORE_THRESHOLD, MAX_FORBIDDEN_FAMILIES, REPEATED_FAMILY_VIOLATION_LIMIT, FocusSupervisor;
|
|
576391
576440
|
var init_focusSupervisor = __esm({
|
|
576392
576441
|
"packages/orchestrator/dist/focusSupervisor.js"() {
|
|
576393
576442
|
"use strict";
|
|
576394
576443
|
directiveCounter = 0;
|
|
576395
576444
|
TERMINAL_INCOMPLETE_IGNORE_THRESHOLD = 8;
|
|
576396
576445
|
MAX_FORBIDDEN_FAMILIES = 12;
|
|
576446
|
+
REPEATED_FAMILY_VIOLATION_LIMIT = 3;
|
|
576397
576447
|
FocusSupervisor = class {
|
|
576398
576448
|
mode;
|
|
576399
576449
|
modelTier;
|
|
@@ -576413,6 +576463,7 @@ var init_focusSupervisor = __esm({
|
|
|
576413
576463
|
convergenceFamilyCounts = /* @__PURE__ */ new Map();
|
|
576414
576464
|
ignoredDirectiveStreak = 0;
|
|
576415
576465
|
lastIgnoredDirectiveTurn = null;
|
|
576466
|
+
repeatedViolationCounts = /* @__PURE__ */ new Map();
|
|
576416
576467
|
availableTools = null;
|
|
576417
576468
|
constructor(options2 = {}) {
|
|
576418
576469
|
this.mode = options2.mode ?? "auto";
|
|
@@ -576509,6 +576560,28 @@ var init_focusSupervisor = __esm({
|
|
|
576509
576560
|
prior.ignoredCount++;
|
|
576510
576561
|
this.ignoredDirectiveStreak++;
|
|
576511
576562
|
this.lastIgnoredDirectiveTurn = input.turn;
|
|
576563
|
+
const familyViolationKey = `${prior.id}|${family}`;
|
|
576564
|
+
const familyViolationCount = (this.repeatedViolationCounts.get(familyViolationKey) ?? 0) + 1;
|
|
576565
|
+
this.repeatedViolationCounts.set(familyViolationKey, familyViolationCount);
|
|
576566
|
+
if (prior.requiredNextAction !== "creative_pivot_or_research" && familyViolationCount >= REPEATED_FAMILY_VIOLATION_LIMIT) {
|
|
576567
|
+
const directive = this.setDirective({
|
|
576568
|
+
turn: input.turn,
|
|
576569
|
+
state: "forced_replan",
|
|
576570
|
+
reason: `model repeatedly retried the same blocked action family (${family}) ${familyViolationCount} times for directive ${prior.id}`,
|
|
576571
|
+
requiredNextAction: "creative_pivot_or_research",
|
|
576572
|
+
forbiddenActionFamilies: uniqueLimited([
|
|
576573
|
+
...prior.forbiddenActionFamilies,
|
|
576574
|
+
family
|
|
576575
|
+
])
|
|
576576
|
+
});
|
|
576577
|
+
return this.block(directive, [
|
|
576578
|
+
"[FOCUS SUPERVISOR BLOCK: LOOP CONTROL]",
|
|
576579
|
+
`Directive ${prior.id} was repeatedly ignored with ${family}.`,
|
|
576580
|
+
`Required next action: ${directive.requiredNextAction}.`,
|
|
576581
|
+
actionReasonSummary(input.actionReason),
|
|
576582
|
+
"Stop trying this action-family repeatedly. Pivot to a materially different approach or web_search the blocker, then continue."
|
|
576583
|
+
].filter(Boolean).join("\n"), false);
|
|
576584
|
+
}
|
|
576512
576585
|
if (prior.requiredNextAction === "read_authoritative_target" && input.cachedResult && (input.duplicateHitCount ?? 0) >= Math.max(1, this.repeatGateMax - 1)) {
|
|
576513
576586
|
const deadlockDirective = this.setDirective({
|
|
576514
576587
|
turn: input.turn,
|
|
@@ -576745,7 +576818,9 @@ var init_focusSupervisor = __esm({
|
|
|
576745
576818
|
state: "forced_replan",
|
|
576746
576819
|
reason: verdict.reason,
|
|
576747
576820
|
requiredNextAction: this.resolveRequiredNextAction("run_verification"),
|
|
576748
|
-
forbiddenActionFamilies: [
|
|
576821
|
+
forbiddenActionFamilies: [
|
|
576822
|
+
actionFamily(input.toolName, input.args, this.familyCwd)
|
|
576823
|
+
]
|
|
576749
576824
|
});
|
|
576750
576825
|
}
|
|
576751
576826
|
}
|
|
@@ -576821,6 +576896,9 @@ var init_focusSupervisor = __esm({
|
|
|
576821
576896
|
createdTurn: input.turn,
|
|
576822
576897
|
ignoredCount: 0
|
|
576823
576898
|
};
|
|
576899
|
+
if (!stable) {
|
|
576900
|
+
this.repeatedViolationCounts.clear();
|
|
576901
|
+
}
|
|
576824
576902
|
this.directive = directive;
|
|
576825
576903
|
this.state = directive.state;
|
|
576826
576904
|
this.lastReason = directive.reason;
|
|
@@ -576837,6 +576915,7 @@ var init_focusSupervisor = __esm({
|
|
|
576837
576915
|
this.state = "observe";
|
|
576838
576916
|
this.ignoredDirectiveStreak = 0;
|
|
576839
576917
|
this.lastIgnoredDirectiveTurn = null;
|
|
576918
|
+
this.repeatedViolationCounts.clear();
|
|
576840
576919
|
}
|
|
576841
576920
|
pass() {
|
|
576842
576921
|
return {
|
|
@@ -577628,11 +577707,20 @@ The sub-agent works in its own small context; when it folds back, run the build
|
|
|
577628
577707
|
buildDelegationCall(output) {
|
|
577629
577708
|
try {
|
|
577630
577709
|
const diags = parseCompilerDiagnostics(String(output || ""));
|
|
577631
|
-
const structural = diags.filter((d2) => d2.kind === "signature_mismatch" || d2.kind === "duplicate_definition" || d2.kind === "unknown_member" || d2.kind === "unknown_symbol" || d2.kind === "type_error");
|
|
577710
|
+
const structural = diags.filter((d2) => d2.kind === "signature_mismatch" || d2.kind === "duplicate_definition" || d2.kind === "unknown_member" || d2.kind === "unknown_symbol" || d2.kind === "type_error" || d2.kind === "test_failure" || d2.kind === "import_error" || d2.kind === "schema_error");
|
|
577632
577711
|
const top = structural.find((d2) => d2.file && d2.symbol) ?? structural.find((d2) => d2.file) ?? diags.find((d2) => d2.file) ?? structural[0] ?? diags[0];
|
|
577633
|
-
if (!top
|
|
577712
|
+
if (!top)
|
|
577634
577713
|
return null;
|
|
577635
|
-
|
|
577714
|
+
let file = top.file;
|
|
577715
|
+
if (!file && top.symbol && this.lockedSource.has(top.symbol)) {
|
|
577716
|
+
file = this.lockedSource.get(top.symbol);
|
|
577717
|
+
}
|
|
577718
|
+
if (!file)
|
|
577719
|
+
return null;
|
|
577720
|
+
if (top.kind === "test_failure") {
|
|
577721
|
+
file = file.replace(/::.*$/, "");
|
|
577722
|
+
}
|
|
577723
|
+
const cleanFile = file;
|
|
577636
577724
|
const symbol3 = top.symbol;
|
|
577637
577725
|
const kind = top.kind.replace(/_/g, " ");
|
|
577638
577726
|
const declSrc = symbol3 ? this.lockedSource.get(symbol3) : void 0;
|
|
@@ -591687,6 +591775,18 @@ ${cachedResult}`,
|
|
|
591687
591775
|
} catch {
|
|
591688
591776
|
}
|
|
591689
591777
|
}
|
|
591778
|
+
if ((tc.name === "sub_agent" || tc.name === "agent") && this._preFoldErrorCount === null && (tc.arguments?.subagent_type === "fixer" || finalArgs?.subagent_type === "fixer") && this._lastBuildOutput !== null) {
|
|
591779
|
+
this._preFoldErrorCount = failureProgressSignal(this._lastBuildOutput) ?? null;
|
|
591780
|
+
this._preFoldFixerDescription = tc.arguments?.description || finalArgs?.description || "voluntary fixer";
|
|
591781
|
+
try {
|
|
591782
|
+
_execSync('git stash push -m "pre-fixer" --include-untracked', {
|
|
591783
|
+
cwd: this.authoritativeWorkingDirectory(),
|
|
591784
|
+
stdio: "pipe",
|
|
591785
|
+
timeout: 1e4
|
|
591786
|
+
});
|
|
591787
|
+
} catch {
|
|
591788
|
+
}
|
|
591789
|
+
}
|
|
591690
591790
|
try {
|
|
591691
591791
|
if (typeof tool.executeStream === "function") {
|
|
591692
591792
|
const gen = tool.executeStream(finalArgs);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.484",
|
|
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.484",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
|
@@ -4096,9 +4096,9 @@
|
|
|
4096
4096
|
}
|
|
4097
4097
|
},
|
|
4098
4098
|
"node_modules/hono": {
|
|
4099
|
-
"version": "4.12.
|
|
4100
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.
|
|
4101
|
-
"integrity": "sha512-
|
|
4099
|
+
"version": "4.12.28",
|
|
4100
|
+
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.28.tgz",
|
|
4101
|
+
"integrity": "sha512-YwUvVpSF7m1yOblFPrU3Hbo8XhPheBoiyfGuII6z19LnOr6JpDnyyp7LFNrfV56wS8tpvtBFGRISHN02pDdLOA==",
|
|
4102
4102
|
"license": "MIT",
|
|
4103
4103
|
"engines": {
|
|
4104
4104
|
"node": ">=16.9.0"
|
package/package.json
CHANGED