omnius 1.0.480 → 1.0.481
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 +140 -42
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -576512,16 +576512,16 @@ var init_focusSupervisor = __esm({
|
|
|
576512
576512
|
if (prior.requiredNextAction === "read_authoritative_target" && input.cachedResult && (input.duplicateHitCount ?? 0) >= Math.max(1, this.repeatGateMax - 1)) {
|
|
576513
576513
|
const deadlockDirective = this.setDirective({
|
|
576514
576514
|
turn: input.turn,
|
|
576515
|
-
state: "
|
|
576516
|
-
reason: `read target is repeat-gated (${input.duplicateHitCount} hits); directive ${prior.id} cannot be satisfied without fresh reads;
|
|
576517
|
-
requiredNextAction: "
|
|
576515
|
+
state: "forced_replan",
|
|
576516
|
+
reason: `read target is repeat-gated (${input.duplicateHitCount} hits); directive ${prior.id} cannot be satisfied without fresh reads; TRIAGE instead of stalling — pivot approach or web_search the blocker`,
|
|
576517
|
+
requiredNextAction: "creative_pivot_or_research",
|
|
576518
576518
|
forbiddenActionFamilies: []
|
|
576519
576519
|
});
|
|
576520
576520
|
return this.block(deadlockDirective, [
|
|
576521
|
-
"[FOCUS SUPERVISOR: DEADLOCK]",
|
|
576521
|
+
"[FOCUS SUPERVISOR: DEADLOCK — TRIAGE]",
|
|
576522
576522
|
`Directive ${prior.id} (${prior.requiredNextAction}) requires reading evidence that is repeat-gated (${input.duplicateHitCount} identical reads).`,
|
|
576523
|
-
"
|
|
576524
|
-
"
|
|
576523
|
+
"This exact path is blocked, but the task is NOT over. Do not report incomplete.",
|
|
576524
|
+
"TRIAGE: pivot to a fundamentally different approach, or web_search the exact blocker to find another route, then act on it."
|
|
576525
576525
|
].join("\n"), false);
|
|
576526
576526
|
}
|
|
576527
576527
|
if (strict && prior.ignoredCount >= 1) {
|
|
@@ -576533,9 +576533,11 @@ var init_focusSupervisor = __esm({
|
|
|
576533
576533
|
}
|
|
576534
576534
|
const directive = this.setDirective({
|
|
576535
576535
|
turn: input.turn,
|
|
576536
|
-
|
|
576537
|
-
|
|
576538
|
-
|
|
576536
|
+
// TRIAGE replaces terminal: after many ignored directives the model is
|
|
576537
|
+
// stuck on ONE approach — steer it to pivot/research, never to abandon.
|
|
576538
|
+
state: terminal ? "forced_replan" : ignoredManyTimes ? "verify_or_block" : "single_next_action",
|
|
576539
|
+
reason: terminal ? `model ignored ${this.ignoredDirectiveStreak} focus directives; this approach is exhausted — TRIAGE: pivot to a fundamentally different method or web_search the exact blocker, do NOT report incomplete` : ignoredManyTimes ? `model ignored ${this.ignoredDirectiveStreak} focus directives; take the required recovery action before trying another variant` : `model ignored prior directive ${prior.id}; ${prior.reason}`,
|
|
576540
|
+
requiredNextAction: terminal ? "creative_pivot_or_research" : prior.requiredNextAction,
|
|
576539
576541
|
forbiddenActionFamilies: uniqueLimited(accumulatedFamilies)
|
|
576540
576542
|
});
|
|
576541
576543
|
this.lastIgnoredDirectiveTurn = input.turn;
|
|
@@ -576544,7 +576546,7 @@ var init_focusSupervisor = __esm({
|
|
|
576544
576546
|
`Required next action: ${directive.requiredNextAction}.`,
|
|
576545
576547
|
`Blocked action family: ${family}.`,
|
|
576546
576548
|
actionReasonSummary(input.actionReason),
|
|
576547
|
-
directive.requiredNextAction === "
|
|
576549
|
+
directive.requiredNextAction === "creative_pivot_or_research" ? "Stop trying variants of what failed. The task is NOT over — pivot to a fundamentally different approach or web_search the exact blocker, then act." : "Take the required next action before trying another variant."
|
|
576548
576550
|
].filter(Boolean).join("\n"), false);
|
|
576549
576551
|
}
|
|
576550
576552
|
}
|
|
@@ -576759,14 +576761,21 @@ var init_focusSupervisor = __esm({
|
|
|
576759
576761
|
forbiddenActionFamilies: ["task_complete"]
|
|
576760
576762
|
});
|
|
576761
576763
|
}
|
|
576764
|
+
/**
|
|
576765
|
+
* TRIAGE (replaces terminal-incomplete). A task is never abandoned. At the
|
|
576766
|
+
* inflection where the old design would report incomplete, steer the model to
|
|
576767
|
+
* a creative pivot or online research instead: the trajectory that failed is
|
|
576768
|
+
* dead, but the TASK is not. The turn cap remains the ultimate backstop, so
|
|
576769
|
+
* this cannot loop forever. Kept the method name so all callers are unchanged.
|
|
576770
|
+
*/
|
|
576762
576771
|
markTerminalIncomplete(reason, turn) {
|
|
576763
576772
|
if (!this.enabled)
|
|
576764
576773
|
return;
|
|
576765
576774
|
this.setDirective({
|
|
576766
576775
|
turn,
|
|
576767
|
-
state: "
|
|
576768
|
-
reason,
|
|
576769
|
-
requiredNextAction: "
|
|
576776
|
+
state: "forced_replan",
|
|
576777
|
+
reason: `${reason} — do NOT report incomplete and do NOT repeat a variant of what failed. TRIAGE: web_search the exact error/blocker to find how it is solved, OR pivot to a fundamentally different approach you have not tried, then act on it.`,
|
|
576778
|
+
requiredNextAction: "creative_pivot_or_research",
|
|
576770
576779
|
forbiddenActionFamilies: ["brute_force"]
|
|
576771
576780
|
});
|
|
576772
576781
|
}
|
|
@@ -576989,8 +576998,8 @@ var init_convergence_breaker = __esm({
|
|
|
576989
576998
|
tripped: true,
|
|
576990
576999
|
totalRounds,
|
|
576991
577000
|
family,
|
|
576992
|
-
reason: `failure family "${family}" has not converged after ${totalRounds} rounds (>= ${this.abandonRound}); this trajectory is dead —
|
|
576993
|
-
recommendedAction: "
|
|
577001
|
+
reason: `failure family "${family}" has not converged after ${totalRounds} rounds (>= ${this.abandonRound}); this trajectory is dead — do NOT report incomplete and do NOT repeat it. TRIAGE: pivot to a fundamentally different approach, or web_search the exact failure to find another route, then act on it${suffix}`,
|
|
577002
|
+
recommendedAction: "creative_pivot_or_research"
|
|
576994
577003
|
};
|
|
576995
577004
|
case "stalled":
|
|
576996
577005
|
return {
|
|
@@ -577587,6 +577596,37 @@ The sub-agent works in its own small context; when it folds back, run the build
|
|
|
577587
577596
|
return null;
|
|
577588
577597
|
}
|
|
577589
577598
|
}
|
|
577599
|
+
/**
|
|
577600
|
+
* B/auto-delegation: the STRUCTURED form of buildDelegationDirective. Returns
|
|
577601
|
+
* the exact args for a `sub_agent(fixer)` call scoped to the top diagnostic, so
|
|
577602
|
+
* the orchestrator can dispatch the delegation ITSELF when the model refuses to
|
|
577603
|
+
* (measured: 0 sub_agent calls across 89 frames of a live run despite the
|
|
577604
|
+
* directive firing). Returns null when the output names no concrete unit.
|
|
577605
|
+
*/
|
|
577606
|
+
buildDelegationCall(output) {
|
|
577607
|
+
try {
|
|
577608
|
+
const diags = parseCompilerDiagnostics(String(output || ""));
|
|
577609
|
+
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");
|
|
577610
|
+
const top = structural.find((d2) => d2.file && d2.symbol) ?? structural.find((d2) => d2.file) ?? diags.find((d2) => d2.file) ?? structural[0] ?? diags[0];
|
|
577611
|
+
if (!top || !top.file)
|
|
577612
|
+
return null;
|
|
577613
|
+
const file = top.file;
|
|
577614
|
+
const symbol3 = top.symbol;
|
|
577615
|
+
const kind = top.kind.replace(/_/g, " ");
|
|
577616
|
+
const declSrc = symbol3 ? this.lockedSource.get(symbol3) : void 0;
|
|
577617
|
+
const focusFiles = [file, ...declSrc && declSrc !== file ? [declSrc] : []];
|
|
577618
|
+
const prompt = `In ${file}, resolve the ${kind}${symbol3 ? ` for \`${symbol3}\`` : ""}. Read ONLY ${focusFiles.join(" and ")}. Make the minimal edit to satisfy the contract. Build once to verify the error is gone. Report a one-line outcome.` + (declSrc ? ` The contract for \`${symbol3}\` lives in ${declSrc} — match it exactly.` : "");
|
|
577619
|
+
return {
|
|
577620
|
+
description: `fix ${symbol3 ?? file}`,
|
|
577621
|
+
prompt,
|
|
577622
|
+
focusFiles,
|
|
577623
|
+
exitCriterion: `${file} compiles${symbol3 ? ` and \`${symbol3}\` matches the contract` : ""}.`,
|
|
577624
|
+
symbol: symbol3
|
|
577625
|
+
};
|
|
577626
|
+
} catch {
|
|
577627
|
+
return null;
|
|
577628
|
+
}
|
|
577629
|
+
}
|
|
577590
577630
|
diagnosticGuidance(output) {
|
|
577591
577631
|
try {
|
|
577592
577632
|
const diags = parseCompilerDiagnostics(String(output || ""));
|
|
@@ -581074,6 +581114,10 @@ var init_agenticRunner = __esm({
|
|
|
581074
581114
|
_longHaul = null;
|
|
581075
581115
|
/** WO-11: decomposition modules (files) stashed for contract-enriched todo trees. */
|
|
581076
581116
|
_decompModules = [];
|
|
581117
|
+
/** Auto-delegation: last failing build/verify output, for parsing the top unit. */
|
|
581118
|
+
_lastBuildOutput = null;
|
|
581119
|
+
/** Auto-delegation: directive ids we've already auto-delegated for (once each). */
|
|
581120
|
+
_autoDelegatedDirectiveIds = /* @__PURE__ */ new Set();
|
|
581077
581121
|
_focusTerminalLedgerRecorded = false;
|
|
581078
581122
|
// Generic, cross-session failure→resolution learning: learns the token-level
|
|
581079
581123
|
// change that turned a failed command into a working one (e.g. python→python3)
|
|
@@ -581457,9 +581501,13 @@ ${parts.join("\n")}
|
|
|
581457
581501
|
return "file_patch, batch_edit, file_edit, or hash-guarded file_write on a different supported target";
|
|
581458
581502
|
case "run_verification":
|
|
581459
581503
|
return "shell running the verification/runtime command";
|
|
581504
|
+
case "delegate_isolated_fix":
|
|
581505
|
+
return "sub_agent(subagent_type='fixer', ...) delegating the top diagnostic to an isolated worker";
|
|
581506
|
+
case "creative_pivot_or_research":
|
|
581507
|
+
return "a FUNDAMENTALLY different approach: web_search the exact error/blocker to find how it is solved, or pivot to a method you have NOT tried — not a variant of what failed, and NOT task_complete";
|
|
581460
581508
|
case "report_blocked":
|
|
581461
581509
|
case "report_incomplete":
|
|
581462
|
-
return "
|
|
581510
|
+
return "a fundamentally different approach or web_search the blocker — do not report incomplete";
|
|
581463
581511
|
default:
|
|
581464
581512
|
return "choose the narrowest tool that advances the current card";
|
|
581465
581513
|
}
|
|
@@ -588573,41 +588621,27 @@ TASK: ${scrubbedTask}` : scrubbedTask;
|
|
|
588573
588621
|
"Evidence:",
|
|
588574
588622
|
evidenceFeedback
|
|
588575
588623
|
].join("\n");
|
|
588576
|
-
|
|
588577
|
-
reason,
|
|
588578
|
-
summary: incompleteSummary
|
|
588579
|
-
};
|
|
588624
|
+
void incompleteSummary;
|
|
588580
588625
|
this._focusSupervisor?.markTerminalIncomplete(reason, turn);
|
|
588581
|
-
const
|
|
588582
|
-
if (
|
|
588626
|
+
const triageDirective = this._focusSupervisor?.snapshot().directive;
|
|
588627
|
+
if (triageDirective) {
|
|
588583
588628
|
this._emitFocusSupervisorEvent({
|
|
588584
|
-
decision:
|
|
588585
|
-
state:
|
|
588586
|
-
directiveId:
|
|
588587
|
-
reason:
|
|
588588
|
-
requiredNextAction:
|
|
588629
|
+
decision: triageDirective.state,
|
|
588630
|
+
state: triageDirective.state,
|
|
588631
|
+
directiveId: triageDirective.id,
|
|
588632
|
+
reason: triageDirective.reason,
|
|
588633
|
+
requiredNextAction: triageDirective.requiredNextAction,
|
|
588589
588634
|
blockedTool: "task_complete",
|
|
588590
588635
|
turn
|
|
588591
588636
|
});
|
|
588592
588637
|
}
|
|
588593
588638
|
messages2.push({
|
|
588594
588639
|
role: "system",
|
|
588595
|
-
content: `[
|
|
588640
|
+
content: `[TRIAGE] task_complete was held ${this._completionHoldState.count} times without new evidence — you keep claiming done but cannot prove it. Do NOT report incomplete. The task is not over: get the missing evidence a DIFFERENT way — web_search the exact blocker (${reason.slice(0, 160)}), or pivot to an approach you have not tried, then produce the concrete proof and only THEN call task_complete.`
|
|
588596
588641
|
});
|
|
588597
588642
|
this.emit({
|
|
588598
588643
|
type: "status",
|
|
588599
|
-
content: `completion
|
|
588600
|
-
turn,
|
|
588601
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
588602
|
-
});
|
|
588603
|
-
this.emit({
|
|
588604
|
-
type: "adversary_reaction",
|
|
588605
|
-
adversary: {
|
|
588606
|
-
class: "guidance",
|
|
588607
|
-
shortText: "Completion gate terminal incomplete",
|
|
588608
|
-
confidence: 0.9,
|
|
588609
|
-
details: `Same completion gate held task_complete ${this._completionHoldState.count}x; ending incomplete_verification instead of completing.`
|
|
588610
|
-
},
|
|
588644
|
+
content: `[TRIAGE] completion gate held task_complete ${this._completionHoldState.count}x without evidence — steering to pivot/research instead of ending incomplete: ${reason.slice(0, 120)}`,
|
|
588611
588645
|
turn,
|
|
588612
588646
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
588613
588647
|
});
|
|
@@ -591488,7 +591522,8 @@ ${cachedResult}`,
|
|
|
591488
591522
|
blockedTool: focusDecision.kind === "block_tool_call" ? tc.name : void 0,
|
|
591489
591523
|
turn
|
|
591490
591524
|
});
|
|
591491
|
-
if (focusDecision.kind === "
|
|
591525
|
+
if (focusDecision.kind === "block_tool_call" && this._maybeAutoDelegate(tc, focusDecision.directive, messages2, turn)) {
|
|
591526
|
+
} else if (focusDecision.kind === "inject_guidance") {
|
|
591492
591527
|
pushSoftInjection("system", focusDecision.message);
|
|
591493
591528
|
} else if (!repeatShortCircuit) {
|
|
591494
591529
|
repeatShortCircuit = {
|
|
@@ -593041,6 +593076,15 @@ Evidence: ${evidencePreview}`.slice(0, 500);
|
|
|
593041
593076
|
});
|
|
593042
593077
|
}
|
|
593043
593078
|
}
|
|
593079
|
+
if ((tc.name === "sub_agent" || tc.name === "agent") && result.success) {
|
|
593080
|
+
const foldRaw = String(result.output ?? "").replace(/\s+/g, " ").trim();
|
|
593081
|
+
this.emit({
|
|
593082
|
+
type: "status",
|
|
593083
|
+
content: `[CONVERGE] isolated worker folded back${foldRaw ? `: ${foldRaw.slice(0, 200)}` : ""} — orchestrator resumes trajectory (verify with a build).`,
|
|
593084
|
+
turn,
|
|
593085
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
593086
|
+
});
|
|
593087
|
+
}
|
|
593044
593088
|
try {
|
|
593045
593089
|
const lh = this._longHaul;
|
|
593046
593090
|
if (lh) {
|
|
@@ -593080,6 +593124,9 @@ ${specDir}` : specDir;
|
|
|
593080
593124
|
}
|
|
593081
593125
|
}
|
|
593082
593126
|
if (!result.success) {
|
|
593127
|
+
if (isVerificationCommand(tc.name, result.output ?? result.error ?? "")) {
|
|
593128
|
+
this._lastBuildOutput = result.output ?? result.error ?? "";
|
|
593129
|
+
}
|
|
593083
593130
|
const diag = lh.diagnosticGuidance(result.output ?? result.error ?? "");
|
|
593084
593131
|
if (diag) {
|
|
593085
593132
|
runtimeSystemGuidance = runtimeSystemGuidance ? `${runtimeSystemGuidance}
|
|
@@ -596838,6 +596885,57 @@ Actions: (1) list_directory on the parent directory to see what's there, (2) Che
|
|
|
596838
596885
|
* Replaces both assistant messages AND their associated tool-result
|
|
596839
596886
|
* messages in the turn range [startTurn, currentTurn].
|
|
596840
596887
|
*/
|
|
596888
|
+
/**
|
|
596889
|
+
* AUTO-DELEGATION — make the fan-out actually happen.
|
|
596890
|
+
*
|
|
596891
|
+
* The model will not emit `sub_agent` on its own even when the focus supervisor
|
|
596892
|
+
* requires delegation: on a live run we measured 0 sub_agent calls across 89
|
|
596893
|
+
* frames while the `delegate_isolated_fix` directive was firing every stuck
|
|
596894
|
+
* build. A directive TELLS; it does not DO. So when a delegate directive blocks
|
|
596895
|
+
* the model's call, the ORCHESTRATOR dispatches the fixer itself: it rewrites
|
|
596896
|
+
* the blocked call into the synthesized `sub_agent(fixer)` for the top
|
|
596897
|
+
* diagnostic, which then executes through the normal path — the isolated child
|
|
596898
|
+
* runs in its own small curated frame and folds a one-line result back. Guarded
|
|
596899
|
+
* to once per directive id, so one stuck build produces exactly one delegation,
|
|
596900
|
+
* never a spawn storm.
|
|
596901
|
+
*
|
|
596902
|
+
* Emits a [FAN-OUT] status marking the context switch (main frame size -> the
|
|
596903
|
+
* curated worker frame) so the operator can observe the isolation boundary.
|
|
596904
|
+
*
|
|
596905
|
+
* Returns true if it rewrote `tc` (the caller must let it EXECUTE, not noop it).
|
|
596906
|
+
*/
|
|
596907
|
+
_maybeAutoDelegate(tc, directive, messages2, turn) {
|
|
596908
|
+
if (directive.requiredNextAction !== "delegate_isolated_fix")
|
|
596909
|
+
return false;
|
|
596910
|
+
if (tc.name === "sub_agent" || tc.name === "agent")
|
|
596911
|
+
return false;
|
|
596912
|
+
if (!this._longHaul || !this._lastBuildOutput)
|
|
596913
|
+
return false;
|
|
596914
|
+
if (this._autoDelegatedDirectiveIds.has(directive.id))
|
|
596915
|
+
return false;
|
|
596916
|
+
if (!this.tools.has("sub_agent"))
|
|
596917
|
+
return false;
|
|
596918
|
+
const call = this._longHaul.buildDelegationCall(this._lastBuildOutput);
|
|
596919
|
+
if (!call)
|
|
596920
|
+
return false;
|
|
596921
|
+
this._autoDelegatedDirectiveIds.add(directive.id);
|
|
596922
|
+
const parentTok = estimateMessagesTokens2(messages2);
|
|
596923
|
+
this.emit({
|
|
596924
|
+
type: "status",
|
|
596925
|
+
content: `[FAN-OUT] model did not delegate — orchestrator auto-dispatching an isolated fixer for "${call.description}". Main context ~${parentTok.toLocaleString()} tok -> curated worker frame (${call.focusFiles.length} focus file(s): ${call.focusFiles.join(", ")}).`,
|
|
596926
|
+
turn,
|
|
596927
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
596928
|
+
});
|
|
596929
|
+
tc.name = "sub_agent";
|
|
596930
|
+
tc.arguments = {
|
|
596931
|
+
subagent_type: "fixer",
|
|
596932
|
+
description: call.description,
|
|
596933
|
+
prompt: call.prompt,
|
|
596934
|
+
relevant_files: call.focusFiles,
|
|
596935
|
+
exit_criterion: call.exitCriterion
|
|
596936
|
+
};
|
|
596937
|
+
return true;
|
|
596938
|
+
}
|
|
596841
596939
|
/**
|
|
596842
596940
|
* Staleness-based evidence retirement (WO-4 realized; operator's microcompaction
|
|
596843
596941
|
* goal). The sibling `_evictCompletedTodoMessages` only fires when a todo
|
|
@@ -596864,7 +596962,7 @@ Actions: (1) list_directory on the parent directory to see what's there, (2) Che
|
|
|
596864
596962
|
* evidence remains on disk (`.omnius/tool-results/`) and re-materialisable.
|
|
596865
596963
|
*/
|
|
596866
596964
|
_retireStaleEvidenceInPlace(messages2, currentTurn) {
|
|
596867
|
-
if (process.env["
|
|
596965
|
+
if (process.env["OMNIUS_DISABLE_EVIDENCE_RETIREMENT"] === "1")
|
|
596868
596966
|
return;
|
|
596869
596967
|
const keepRecent = Math.max(0, Number(process.env["OMNIUS_EVIDENCE_KEEP_TURNS"] ?? 2));
|
|
596870
596968
|
const minChars = Math.max(512, Number(process.env["OMNIUS_EVIDENCE_MIN_CHARS"] ?? 2e3));
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.481",
|
|
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.481",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED