nexus-agents 2.46.0 → 2.48.0
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/{chunk-KCOGC24K.js → chunk-CH722DBX.js} +2 -2
- package/dist/{chunk-5Y7QBD2H.js → chunk-M53BBBCB.js} +3 -3
- package/dist/{chunk-GVK2Z7PV.js → chunk-UXRR7M6E.js} +293 -10
- package/dist/chunk-UXRR7M6E.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +25 -0
- package/dist/index.js +2 -2
- package/dist/{setup-command-OF4QXTBF.js → setup-command-PLGFVKLM.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-GVK2Z7PV.js.map +0 -1
- /package/dist/{chunk-KCOGC24K.js.map → chunk-CH722DBX.js.map} +0 -0
- /package/dist/{chunk-5Y7QBD2H.js.map → chunk-M53BBBCB.js.map} +0 -0
- /package/dist/{setup-command-OF4QXTBF.js.map → setup-command-PLGFVKLM.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
VERSION,
|
|
6
6
|
initDataDirectories
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M53BBBCB.js";
|
|
8
8
|
import {
|
|
9
9
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
10
10
|
createLogger,
|
|
@@ -1580,4 +1580,4 @@ export {
|
|
|
1580
1580
|
setupCommand,
|
|
1581
1581
|
setupCommandAsync
|
|
1582
1582
|
};
|
|
1583
|
-
//# sourceMappingURL=chunk-
|
|
1583
|
+
//# sourceMappingURL=chunk-CH722DBX.js.map
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-CLYZ7FWP.js";
|
|
25
25
|
|
|
26
26
|
// src/version.ts
|
|
27
|
-
var VERSION = true ? "2.
|
|
27
|
+
var VERSION = true ? "2.48.0" : "dev";
|
|
28
28
|
|
|
29
29
|
// src/cli/setup-data-dir.ts
|
|
30
30
|
import { mkdirSync, existsSync as existsSync2 } from "fs";
|
|
@@ -758,7 +758,7 @@ async function runDoctorFix(result) {
|
|
|
758
758
|
writeLine2("\u2500".repeat(40));
|
|
759
759
|
let fixCount = 0;
|
|
760
760
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
761
|
-
const { runSetup } = await import("./setup-command-
|
|
761
|
+
const { runSetup } = await import("./setup-command-PLGFVKLM.js");
|
|
762
762
|
const setupResult = runSetup({
|
|
763
763
|
skipMcp: true,
|
|
764
764
|
skipRules: true,
|
|
@@ -836,4 +836,4 @@ export {
|
|
|
836
836
|
startStdioServer,
|
|
837
837
|
closeServer
|
|
838
838
|
};
|
|
839
|
-
//# sourceMappingURL=chunk-
|
|
839
|
+
//# sourceMappingURL=chunk-M53BBBCB.js.map
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_TASK_TTL_MS,
|
|
68
68
|
clampTaskTtl
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-M53BBBCB.js";
|
|
70
70
|
import {
|
|
71
71
|
createSessionMemory
|
|
72
72
|
} from "./chunk-ULDKSIS7.js";
|
|
@@ -31387,6 +31387,109 @@ function planAgentTeam(analysis, taskDescription, options) {
|
|
|
31387
31387
|
};
|
|
31388
31388
|
}
|
|
31389
31389
|
|
|
31390
|
+
// src/orchestration/aorchestra/topological-wave.ts
|
|
31391
|
+
var CycleError = class extends Error {
|
|
31392
|
+
constructor(message, cycleRoles) {
|
|
31393
|
+
super(message);
|
|
31394
|
+
this.cycleRoles = cycleRoles;
|
|
31395
|
+
}
|
|
31396
|
+
name = "CycleError";
|
|
31397
|
+
};
|
|
31398
|
+
var MissingDependencyError = class extends Error {
|
|
31399
|
+
constructor(message, sourceRole, missingRole) {
|
|
31400
|
+
super(message);
|
|
31401
|
+
this.sourceRole = sourceRole;
|
|
31402
|
+
this.missingRole = missingRole;
|
|
31403
|
+
}
|
|
31404
|
+
name = "MissingDependencyError";
|
|
31405
|
+
};
|
|
31406
|
+
function topologicalWaveAssign(entries) {
|
|
31407
|
+
if (entries.length === 0) return ok([]);
|
|
31408
|
+
const byRole = buildRoleIndex(entries);
|
|
31409
|
+
const missing = findMissingDependency(entries, byRole);
|
|
31410
|
+
if (missing !== null) return err(missing);
|
|
31411
|
+
const cycle = detectCycle(entries, byRole);
|
|
31412
|
+
if (cycle !== null) return err(cycle);
|
|
31413
|
+
const waveByRole = computeWaves(entries, byRole);
|
|
31414
|
+
return ok(entries.map((e) => ({ ...e, wave: waveByRole.get(e.role) ?? e.wave })));
|
|
31415
|
+
}
|
|
31416
|
+
function buildRoleIndex(entries) {
|
|
31417
|
+
const byRole = /* @__PURE__ */ new Map();
|
|
31418
|
+
for (const e of entries) byRole.set(e.role, e);
|
|
31419
|
+
return byRole;
|
|
31420
|
+
}
|
|
31421
|
+
function findMissingDependency(entries, byRole) {
|
|
31422
|
+
for (const e of entries) {
|
|
31423
|
+
if (e.dependsOn === void 0) continue;
|
|
31424
|
+
for (const dep of e.dependsOn) {
|
|
31425
|
+
if (!byRole.has(dep)) {
|
|
31426
|
+
return new MissingDependencyError(
|
|
31427
|
+
`Entry for role "${e.role}" depends on unknown role "${dep}"`,
|
|
31428
|
+
e.role,
|
|
31429
|
+
dep
|
|
31430
|
+
);
|
|
31431
|
+
}
|
|
31432
|
+
}
|
|
31433
|
+
}
|
|
31434
|
+
return null;
|
|
31435
|
+
}
|
|
31436
|
+
function detectCycle(entries, byRole) {
|
|
31437
|
+
const WHITE = 0;
|
|
31438
|
+
const GRAY = 1;
|
|
31439
|
+
const BLACK = 2;
|
|
31440
|
+
const color = /* @__PURE__ */ new Map();
|
|
31441
|
+
for (const e of entries) color.set(e.role, WHITE);
|
|
31442
|
+
function visit(role, stack) {
|
|
31443
|
+
const c = color.get(role);
|
|
31444
|
+
if (c === BLACK) return null;
|
|
31445
|
+
if (c === GRAY) {
|
|
31446
|
+
const cycleStart = stack.indexOf(role);
|
|
31447
|
+
return cycleStart >= 0 ? stack.slice(cycleStart).concat(role) : [role];
|
|
31448
|
+
}
|
|
31449
|
+
color.set(role, GRAY);
|
|
31450
|
+
stack.push(role);
|
|
31451
|
+
const entry = byRole.get(role);
|
|
31452
|
+
if (entry?.dependsOn !== void 0) {
|
|
31453
|
+
for (const dep of entry.dependsOn) {
|
|
31454
|
+
const found = visit(dep, stack);
|
|
31455
|
+
if (found !== null) return found;
|
|
31456
|
+
}
|
|
31457
|
+
}
|
|
31458
|
+
stack.pop();
|
|
31459
|
+
color.set(role, BLACK);
|
|
31460
|
+
return null;
|
|
31461
|
+
}
|
|
31462
|
+
for (const e of entries) {
|
|
31463
|
+
const found = visit(e.role, []);
|
|
31464
|
+
if (found !== null) {
|
|
31465
|
+
return new CycleError(`Dependency cycle detected: ${found.join(" \u2192 ")}`, found);
|
|
31466
|
+
}
|
|
31467
|
+
}
|
|
31468
|
+
return null;
|
|
31469
|
+
}
|
|
31470
|
+
function computeWaves(entries, byRole) {
|
|
31471
|
+
const computed = /* @__PURE__ */ new Map();
|
|
31472
|
+
function waveOf(role) {
|
|
31473
|
+
const cached = computed.get(role);
|
|
31474
|
+
if (cached !== void 0) return cached;
|
|
31475
|
+
const entry = byRole.get(role);
|
|
31476
|
+
if (entry === void 0) return 1;
|
|
31477
|
+
if (entry.dependsOn === void 0 || entry.dependsOn.length === 0) {
|
|
31478
|
+
computed.set(role, entry.wave);
|
|
31479
|
+
return entry.wave;
|
|
31480
|
+
}
|
|
31481
|
+
let maxDepWave = 0;
|
|
31482
|
+
for (const dep of entry.dependsOn) {
|
|
31483
|
+
maxDepWave = Math.max(maxDepWave, waveOf(dep));
|
|
31484
|
+
}
|
|
31485
|
+
const newWave = maxDepWave + 1;
|
|
31486
|
+
computed.set(role, newWave);
|
|
31487
|
+
return newWave;
|
|
31488
|
+
}
|
|
31489
|
+
for (const e of entries) waveOf(e.role);
|
|
31490
|
+
return computed;
|
|
31491
|
+
}
|
|
31492
|
+
|
|
31390
31493
|
// src/orchestration/aorchestra/watchdog.ts
|
|
31391
31494
|
var logger22 = createLogger({ component: "worker-watchdog" });
|
|
31392
31495
|
var WATCHDOG_THRESHOLDS = {
|
|
@@ -31629,6 +31732,18 @@ var CONSECUTIVE_FAILURE_THRESHOLD = 3;
|
|
|
31629
31732
|
var RECOVERY_COOLDOWN_MS = 3e4;
|
|
31630
31733
|
var MAX_COOLDOWN_MS = 3e5;
|
|
31631
31734
|
var RATE_LIMIT_SPACING_MS = 2e3;
|
|
31735
|
+
function applyDependencyWaves(entries) {
|
|
31736
|
+
const hasDeps = entries.some((e) => e.dependsOn !== void 0 && e.dependsOn.length > 0);
|
|
31737
|
+
if (!hasDeps) return entries;
|
|
31738
|
+
const result = topologicalWaveAssign(entries);
|
|
31739
|
+
if (!result.ok) {
|
|
31740
|
+
logger24.warn("Topological wave assignment failed, falling back to priority-only", {
|
|
31741
|
+
error: result.error.message
|
|
31742
|
+
});
|
|
31743
|
+
return entries;
|
|
31744
|
+
}
|
|
31745
|
+
return result.value;
|
|
31746
|
+
}
|
|
31632
31747
|
function groupByWave(entries) {
|
|
31633
31748
|
if (entries.length === 0) return [];
|
|
31634
31749
|
const waveMap = /* @__PURE__ */ new Map();
|
|
@@ -31765,7 +31880,8 @@ async function executeWithConcurrencyLimit(tasks, limit) {
|
|
|
31765
31880
|
async function dispatchWorkers(entries, options) {
|
|
31766
31881
|
if (entries.length === 0) return [];
|
|
31767
31882
|
const maxConcurrency = options.maxConcurrency ?? MAX_WORKERS_PER_WAVE;
|
|
31768
|
-
const
|
|
31883
|
+
const effectiveEntries = applyDependencyWaves(entries);
|
|
31884
|
+
const waves = groupByWave(effectiveEntries);
|
|
31769
31885
|
const allResults = [];
|
|
31770
31886
|
const failureTracker = new RoleFailureTracker(
|
|
31771
31887
|
options.consecutiveFailureThreshold ?? CONSECUTIVE_FAILURE_THRESHOLD
|
|
@@ -49338,6 +49454,124 @@ function buildSuccessResult(instance2, patch, modelName, startTime, state) {
|
|
|
49338
49454
|
};
|
|
49339
49455
|
}
|
|
49340
49456
|
|
|
49457
|
+
// src/swe-bench/verify-loop.ts
|
|
49458
|
+
var DEFAULT_MAX_VERIFY_RETRIES = 2;
|
|
49459
|
+
var FAILURE_PATTERNS = [
|
|
49460
|
+
{
|
|
49461
|
+
category: "patch_not_applicable",
|
|
49462
|
+
regex: /patch .*?does not apply|hunk #\d+ FAILED|Reversed .*patch detected/i,
|
|
49463
|
+
summarizer: (m) => `Patch did not apply cleanly: ${m[0]}`
|
|
49464
|
+
},
|
|
49465
|
+
{
|
|
49466
|
+
category: "syntax_error",
|
|
49467
|
+
regex: /SyntaxError: (.*?)(?:\n|$)|IndentationError: (.*?)(?:\n|$)/,
|
|
49468
|
+
summarizer: (m) => `Syntax error in generated patch: ${m[1] ?? m[2] ?? m[0]}`.trim()
|
|
49469
|
+
},
|
|
49470
|
+
{
|
|
49471
|
+
category: "timeout",
|
|
49472
|
+
regex: /Timeout\b|timed out after \d+\s?s\b|TIMEOUT_EXCEEDED/i,
|
|
49473
|
+
summarizer: (m) => `Test run exceeded timeout: ${m[0]}`
|
|
49474
|
+
},
|
|
49475
|
+
{
|
|
49476
|
+
category: "missing_dependency",
|
|
49477
|
+
regex: /ModuleNotFoundError: No module named '([^']+)'|ImportError: cannot import name '([^']+)'|No module named "([^"]+)"/,
|
|
49478
|
+
summarizer: (m) => `Missing dependency: ${m[1] ?? m[2] ?? m[3] ?? "unknown"}. Patch may need an import.`
|
|
49479
|
+
},
|
|
49480
|
+
{
|
|
49481
|
+
category: "runtime_error",
|
|
49482
|
+
regex: /([A-Z][a-zA-Z]+Error): (.*?)(?:\n|$)/,
|
|
49483
|
+
summarizer: (m) => `Runtime error ${m[1] ?? ""}: ${m[2] ?? ""}`.trim()
|
|
49484
|
+
},
|
|
49485
|
+
{
|
|
49486
|
+
category: "test_failure",
|
|
49487
|
+
regex: /FAILED .*?::(\S+)|AssertionError|FAIL: (\S+)/,
|
|
49488
|
+
summarizer: (_m, stderr, stdout) => {
|
|
49489
|
+
const failed = extractFailedTests(stderr, stdout);
|
|
49490
|
+
return failed.length > 0 ? `Tests still failing: ${failed.slice(0, 5).join(", ")}` : "One or more tests failed after patch";
|
|
49491
|
+
}
|
|
49492
|
+
}
|
|
49493
|
+
];
|
|
49494
|
+
function classifyPatchFailure(stderr, stdout) {
|
|
49495
|
+
const haystack = `${stderr}
|
|
49496
|
+
${stdout}`;
|
|
49497
|
+
for (const pattern of FAILURE_PATTERNS) {
|
|
49498
|
+
const match = pattern.regex.exec(haystack);
|
|
49499
|
+
if (match !== null) {
|
|
49500
|
+
return {
|
|
49501
|
+
category: pattern.category,
|
|
49502
|
+
summary: pattern.summarizer(match, stderr, stdout),
|
|
49503
|
+
affectedTests: extractFailedTests(stderr, stdout)
|
|
49504
|
+
};
|
|
49505
|
+
}
|
|
49506
|
+
}
|
|
49507
|
+
return {
|
|
49508
|
+
category: "unknown",
|
|
49509
|
+
summary: haystack.trim().slice(0, 200) || "No failure details captured",
|
|
49510
|
+
affectedTests: extractFailedTests(stderr, stdout)
|
|
49511
|
+
};
|
|
49512
|
+
}
|
|
49513
|
+
function extractFailedTests(stderr, stdout) {
|
|
49514
|
+
const combined = `${stderr}
|
|
49515
|
+
${stdout}`;
|
|
49516
|
+
const results = /* @__PURE__ */ new Set();
|
|
49517
|
+
const pytestPattern = /FAILED (\S+::\S+)/g;
|
|
49518
|
+
let match;
|
|
49519
|
+
while ((match = pytestPattern.exec(combined)) !== null) {
|
|
49520
|
+
if (match[1] !== void 0) results.add(match[1]);
|
|
49521
|
+
}
|
|
49522
|
+
const unittestPattern = /FAIL: (\S+) \(/g;
|
|
49523
|
+
while ((match = unittestPattern.exec(combined)) !== null) {
|
|
49524
|
+
if (match[1] !== void 0) results.add(match[1]);
|
|
49525
|
+
}
|
|
49526
|
+
return Array.from(results);
|
|
49527
|
+
}
|
|
49528
|
+
var ALWAYS_RETRYABLE = /* @__PURE__ */ new Set([
|
|
49529
|
+
"patch_not_applicable",
|
|
49530
|
+
"syntax_error",
|
|
49531
|
+
"missing_dependency",
|
|
49532
|
+
"test_failure",
|
|
49533
|
+
"runtime_error",
|
|
49534
|
+
"incomplete_fix"
|
|
49535
|
+
]);
|
|
49536
|
+
var NEVER_RETRYABLE = /* @__PURE__ */ new Set(["timeout"]);
|
|
49537
|
+
function shouldRetry(category, iteration, maxRetries = DEFAULT_MAX_VERIFY_RETRIES) {
|
|
49538
|
+
if (iteration >= maxRetries) return false;
|
|
49539
|
+
if (NEVER_RETRYABLE.has(category)) return false;
|
|
49540
|
+
if (ALWAYS_RETRYABLE.has(category)) return true;
|
|
49541
|
+
return iteration < 1;
|
|
49542
|
+
}
|
|
49543
|
+
function buildRetryHint(classification, iteration, maxRetries = DEFAULT_MAX_VERIFY_RETRIES) {
|
|
49544
|
+
const header = `Verification attempt ${String(iteration + 1)}/${String(maxRetries + 1)} failed.`;
|
|
49545
|
+
const bodyLines = [
|
|
49546
|
+
header,
|
|
49547
|
+
`Category: ${classification.category}`,
|
|
49548
|
+
`Summary: ${classification.summary}`
|
|
49549
|
+
];
|
|
49550
|
+
if (classification.affectedTests.length > 0) {
|
|
49551
|
+
const count = String(classification.affectedTests.length);
|
|
49552
|
+
const names = classification.affectedTests.slice(0, 5).join(", ");
|
|
49553
|
+
const overflow = classification.affectedTests.length > 5 ? ", ..." : "";
|
|
49554
|
+
bodyLines.push(`Affected tests (${count}): ${names}${overflow}`);
|
|
49555
|
+
}
|
|
49556
|
+
bodyLines.push("Fix the root cause, not the symptom. Re-emit the full patch.");
|
|
49557
|
+
return bodyLines.join("\n");
|
|
49558
|
+
}
|
|
49559
|
+
function buildVerifyOutcome(params) {
|
|
49560
|
+
const maxRetries = params.maxRetries ?? DEFAULT_MAX_VERIFY_RETRIES;
|
|
49561
|
+
if (params.passed) {
|
|
49562
|
+
return { ok: true, iteration: params.iteration, willRetry: false };
|
|
49563
|
+
}
|
|
49564
|
+
const classification = classifyPatchFailure(params.stderr, params.stdout);
|
|
49565
|
+
const willRetry = shouldRetry(classification.category, params.iteration, maxRetries);
|
|
49566
|
+
return {
|
|
49567
|
+
ok: false,
|
|
49568
|
+
iteration: params.iteration,
|
|
49569
|
+
classification,
|
|
49570
|
+
retryHint: buildRetryHint(classification, params.iteration, maxRetries),
|
|
49571
|
+
willRetry
|
|
49572
|
+
};
|
|
49573
|
+
}
|
|
49574
|
+
|
|
49341
49575
|
// src/swe-bench/agent-runner.ts
|
|
49342
49576
|
async function runIteration(opts) {
|
|
49343
49577
|
const { executor, context, previousError, previousPatch, systemPromptOverride, contextSummary } = opts;
|
|
@@ -49442,7 +49676,10 @@ async function runAgentOnInstance(instance2, options) {
|
|
|
49442
49676
|
startTime,
|
|
49443
49677
|
onMessage,
|
|
49444
49678
|
systemPrompt: options.systemPrompt,
|
|
49445
|
-
iterationContext: createEmptyContext()
|
|
49679
|
+
iterationContext: createEmptyContext(),
|
|
49680
|
+
verifyAttempts: 0,
|
|
49681
|
+
...options.verifyAdapter !== void 0 ? { verifyAdapter: options.verifyAdapter } : {},
|
|
49682
|
+
...options.maxVerifyRetries !== void 0 ? { maxVerifyRetries: options.maxVerifyRetries } : {}
|
|
49446
49683
|
};
|
|
49447
49684
|
const result = await runIterationLoop(executor, context, state, loopOptions);
|
|
49448
49685
|
return { ok: true, value: result };
|
|
@@ -49493,6 +49730,54 @@ function buildDuplicateResult(instanceId, startTime, state, onMessage) {
|
|
|
49493
49730
|
onMessage?.("Duplicate patch detected, terminating early");
|
|
49494
49731
|
return buildFailedResult(instanceId, "Duplicate patch \u2014 agent is stuck", startTime, state);
|
|
49495
49732
|
}
|
|
49733
|
+
async function invokeVerifyAdapter(adapter, patch, context, options) {
|
|
49734
|
+
const { passed, stderr, stdout } = await adapter.verify(context.instance, patch, context.workDir);
|
|
49735
|
+
return buildVerifyOutcome({
|
|
49736
|
+
passed,
|
|
49737
|
+
iteration: options.verifyAttempts - 1,
|
|
49738
|
+
stderr,
|
|
49739
|
+
stdout,
|
|
49740
|
+
...options.maxVerifyRetries !== void 0 ? { maxRetries: options.maxVerifyRetries } : {}
|
|
49741
|
+
});
|
|
49742
|
+
}
|
|
49743
|
+
function applyVerifyRetry(outcome, state, onMessage) {
|
|
49744
|
+
const category = outcome.classification?.category ?? "unknown";
|
|
49745
|
+
onMessage?.(`Verify failed (${category}); retrying with hint`);
|
|
49746
|
+
state.lastError = outcome.retryHint ?? "Verification failed; re-emit the patch";
|
|
49747
|
+
state.lastPatch = state.finalPatch;
|
|
49748
|
+
state.finalPatch = void 0;
|
|
49749
|
+
}
|
|
49750
|
+
async function runPostPatchVerify(context, state, options) {
|
|
49751
|
+
const adapter = options.verifyAdapter;
|
|
49752
|
+
if (adapter === void 0 || state.finalPatch === void 0) return true;
|
|
49753
|
+
options.verifyAttempts += 1;
|
|
49754
|
+
options.onMessage?.(`Verifying patch (attempt ${String(options.verifyAttempts)})`);
|
|
49755
|
+
const outcome = await invokeVerifyAdapter(adapter, state.finalPatch, context, options);
|
|
49756
|
+
if (outcome.ok) return true;
|
|
49757
|
+
if (!outcome.willRetry) {
|
|
49758
|
+
const category = outcome.classification?.category ?? "unknown";
|
|
49759
|
+
options.onMessage?.(`Verify failed (${category}); no more retries`);
|
|
49760
|
+
return true;
|
|
49761
|
+
}
|
|
49762
|
+
applyVerifyRetry(outcome, state, options.onMessage);
|
|
49763
|
+
return false;
|
|
49764
|
+
}
|
|
49765
|
+
async function handleIterationDone(context, state, options, seenPatches) {
|
|
49766
|
+
if (isDuplicatePatch(state.finalPatch, seenPatches)) {
|
|
49767
|
+
state.finalPatch = void 0;
|
|
49768
|
+
return {
|
|
49769
|
+
result: buildDuplicateResult(
|
|
49770
|
+
context.instance.instance_id,
|
|
49771
|
+
options.startTime,
|
|
49772
|
+
state,
|
|
49773
|
+
options.onMessage
|
|
49774
|
+
)
|
|
49775
|
+
};
|
|
49776
|
+
}
|
|
49777
|
+
options.onMessage?.("Patch applies successfully");
|
|
49778
|
+
const verifyOk = await runPostPatchVerify(context, state, options);
|
|
49779
|
+
return verifyOk ? "break" : "continue";
|
|
49780
|
+
}
|
|
49496
49781
|
async function runIterationLoop(executor, context, state, options) {
|
|
49497
49782
|
const { config, startTime, onMessage } = options;
|
|
49498
49783
|
const seenPatches = /* @__PURE__ */ new Set();
|
|
@@ -49503,12 +49788,10 @@ async function runIterationLoop(executor, context, state, options) {
|
|
|
49503
49788
|
onMessage?.(`Iteration ${state.iterations.toString()}/${config.max_iterations.toString()}`);
|
|
49504
49789
|
const done = await executeOneIteration(executor, context, state, options);
|
|
49505
49790
|
if (done) {
|
|
49506
|
-
|
|
49507
|
-
|
|
49508
|
-
|
|
49509
|
-
|
|
49510
|
-
onMessage?.("Patch applies successfully");
|
|
49511
|
-
break;
|
|
49791
|
+
const control = await handleIterationDone(context, state, options, seenPatches);
|
|
49792
|
+
if (control === "break") break;
|
|
49793
|
+
if (control === "continue") continue;
|
|
49794
|
+
return control.result;
|
|
49512
49795
|
}
|
|
49513
49796
|
if (isDuplicatePatch(state.lastPatch, seenPatches)) {
|
|
49514
49797
|
return buildDuplicateResult(context.instance.instance_id, startTime, state, onMessage);
|
|
@@ -54144,4 +54427,4 @@ export {
|
|
|
54144
54427
|
detectBackend,
|
|
54145
54428
|
createTaskTracker
|
|
54146
54429
|
};
|
|
54147
|
-
//# sourceMappingURL=chunk-
|
|
54430
|
+
//# sourceMappingURL=chunk-UXRR7M6E.js.map
|