omnius 1.0.478 → 1.0.479

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 CHANGED
@@ -552586,7 +552586,7 @@ var init_agent_tool = __esm({
552586
552586
  },
552587
552587
  subagent_type: {
552588
552588
  type: "string",
552589
- enum: ["general", "explore", "plan", "coordinator"],
552589
+ enum: ["general", "explore", "plan", "coordinator", "fixer"],
552590
552590
  description: "Agent type determining tool access and behavior (default: general)"
552591
552591
  },
552592
552592
  deployment_pattern: {
@@ -576243,6 +576243,13 @@ function failureProgressSignal(text2) {
576243
576243
  }
576244
576244
  return lines > 0 ? lines : void 0;
576245
576245
  }
576246
+ function isVerificationCommand(toolName, output) {
576247
+ if (isEditTool(toolName))
576248
+ return false;
576249
+ if (toolName !== "shell" && toolName !== "background_run")
576250
+ return false;
576251
+ return failureProgressSignal(output) != null;
576252
+ }
576246
576253
  function actionFamily(toolName, args, cwd4) {
576247
576254
  if (isEditTool(toolName)) {
576248
576255
  const path13 = primaryPath(args);
@@ -576704,10 +576711,24 @@ var init_focusSupervisor = __esm({
576704
576711
  // Root fix: progress = the action's error count dropped, not that an
576705
576712
  // edit happened. Extract the signal from the action's own output so a
576706
576713
  // futile edit loop (rebuilding with the same error count) escalates.
576707
- failureSignal: failureProgressSignal(input.output || input.error)
576714
+ failureSignal: failureProgressSignal(input.output || input.error),
576715
+ // Build-as-feedback: a build/test command is the verification oracle,
576716
+ // never a failing action to abandon. When set, the breaker caps this
576717
+ // family below terminal abandon and escalates to decompose-and-delegate.
576718
+ isVerificationFeedback: isVerificationCommand(input.toolName, input.output || input.error)
576708
576719
  });
576709
576720
  this.sawMutationSinceFailure = false;
576710
- if (verdict.tier === "abandon") {
576721
+ if (verdict.recommendedAction === "decompose_and_delegate") {
576722
+ this.setDirective({
576723
+ turn: input.turn,
576724
+ state: "forced_replan",
576725
+ reason: verdict.reason,
576726
+ requiredNextAction: this.resolveRequiredNextAction("delegate_isolated_fix"),
576727
+ forbiddenActionFamilies: [
576728
+ actionFamily(input.toolName, input.args, this.familyCwd)
576729
+ ]
576730
+ });
576731
+ } else if (verdict.tier === "abandon") {
576711
576732
  this.markTerminalIncomplete(verdict.reason, input.turn);
576712
576733
  } else if (verdict.tier === "stalled") {
576713
576734
  this.setDirective({
@@ -576902,7 +576923,10 @@ var init_convergence_breaker = __esm({
576902
576923
  }
576903
576924
  const sessionCount = Math.max(1, obs.sessionCount);
576904
576925
  const totalRounds = Math.max(1, base3 + sessionCount - dec);
576905
- const tier = this.tierFor(totalRounds);
576926
+ let tier = this.tierFor(totalRounds);
576927
+ if (obs.isVerificationFeedback && tier === "abandon") {
576928
+ tier = "stalled";
576929
+ }
576906
576930
  this.live.set(obs.family, { totalRounds, tier });
576907
576931
  const carry = this.store.load(obs.family);
576908
576932
  this.store.save({
@@ -576911,7 +576935,7 @@ var init_convergence_breaker = __esm({
576911
576935
  lastSample: obs.sample ?? carry?.lastSample,
576912
576936
  updatedAtMs: Date.now()
576913
576937
  });
576914
- return this.verdict(obs.family, totalRounds, tier, obs.sample);
576938
+ return this.verdict(obs.family, totalRounds, tier, obs.sample, obs.isVerificationFeedback ?? false);
576915
576939
  }
576916
576940
  /** Clear a family's carry when its underlying work is verified/complete. */
576917
576941
  resolve(family) {
@@ -576939,8 +576963,18 @@ var init_convergence_breaker = __esm({
576939
576963
  return "converging_warn";
576940
576964
  return "healthy";
576941
576965
  }
576942
- verdict(family, totalRounds, tier, sample) {
576966
+ verdict(family, totalRounds, tier, sample, verificationFeedback = false) {
576943
576967
  const suffix = sample ? `: ${sample}` : "";
576968
+ if (verificationFeedback && (tier === "stalled" || tier === "abandon")) {
576969
+ return {
576970
+ tier: "stalled",
576971
+ tripped: true,
576972
+ totalRounds,
576973
+ family,
576974
+ reason: `verification command "${family}" has reported the same diagnostic set for ${totalRounds} rounds without shrinking. The build is FEEDBACK, not a failing action — do NOT abandon and do NOT re-run it blindly. Decompose its diagnostics: pick the single top implicated file/symbol, delegate an isolated investigate→fix sub-task for it (sub_agent), then re-run the build to test. Repeat until the diagnostic count drops${suffix}`,
576975
+ recommendedAction: "decompose_and_delegate"
576976
+ };
576977
+ }
576944
576978
  switch (tier) {
576945
576979
  case "abandon":
576946
576980
  return {
@@ -577513,6 +577547,39 @@ var init_longhaul_integration = __esm({
577513
577547
  * Uses the model's own compiler output — no separate compiler run. Generic
577514
577548
  * across gcc/clang/tsc; returns null when there's nothing structural.
577515
577549
  */
577550
+ /**
577551
+ * B (delegation): turn a stuck build's diagnostics into an ACTIONABLE isolated
577552
+ * sub-task. The main loop is the orchestrator — it holds trajectory and
577553
+ * delegates; it must not keep re-running the build in a saturating context.
577554
+ * This picks the single top structural diagnostic (a file+symbol the compiler
577555
+ * named) and returns the exact `sub_agent` call to spawn an isolated,
577556
+ * small-context worker that fixes JUST that unit, then folds a one-line result
577557
+ * back. Generic: symbols/files come from the compiler's own output, no
577558
+ * toolchain literals. Returns null when the output has no nameable structural
577559
+ * unit (nothing concrete to delegate).
577560
+ */
577561
+ buildDelegationDirective(output) {
577562
+ try {
577563
+ const diags = parseCompilerDiagnostics(String(output || ""));
577564
+ 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");
577565
+ const top = structural.find((d2) => d2.file && d2.symbol) ?? structural.find((d2) => d2.file) ?? diags.find((d2) => d2.file) ?? structural[0] ?? diags[0];
577566
+ if (!top)
577567
+ return null;
577568
+ const file = top.file ?? "the top implicated file";
577569
+ const symbol3 = top.symbol ? ` symbol \`${top.symbol}\`` : "";
577570
+ const kind = top.kind.replace(/_/g, " ");
577571
+ const contractHint = top.symbol && this.lockedSource.has(top.symbol) ? ` The locked contract for \`${top.symbol}\` lives in ${this.lockedSource.get(top.symbol)} — match it exactly.` : "";
577572
+ return `[DELEGATE — build is feedback, not the task] The build reported a stable diagnostic set. Do NOT re-run the build and do NOT keep editing in this context. Delegate ONE isolated fix to a seeded sub-agent, then re-run the build to test:
577573
+ sub_agent({
577574
+ subagent_type: "fixer",
577575
+ description: "fix ${top.symbol ?? file}",
577576
+ prompt: "In ${file}, resolve the ${kind}${symbol3}. Read ONLY ${file} (and the file that declares${symbol3 || " the offending symbol"}). Make the minimal edit to satisfy the contract. Do not touch unrelated files. Report a one-line outcome.${contractHint}"
577577
+ })
577578
+ The sub-agent works in its own small context; when it folds back, run the build once to verify the diagnostic count dropped, then delegate the next one. This is fan-out/converge — keep THIS context on trajectory, not on the raw fix.`;
577579
+ } catch {
577580
+ return null;
577581
+ }
577582
+ }
577516
577583
  diagnosticGuidance(output) {
577517
577584
  try {
577518
577585
  const diags = parseCompilerDiagnostics(String(output || ""));
@@ -593012,6 +593079,16 @@ ${specDir}` : specDir;
593012
593079
 
593013
593080
  ${diag}` : diag;
593014
593081
  }
593082
+ const focusDir = this._focusSupervisor?.snapshot().directive;
593083
+ const wantsDelegation = focusDir?.requiredNextAction === "delegate_isolated_fix" || this._decomp2GateActive;
593084
+ if (wantsDelegation) {
593085
+ const delegateDir = lh.buildDelegationDirective(result.output ?? result.error ?? "");
593086
+ if (delegateDir) {
593087
+ runtimeSystemGuidance = runtimeSystemGuidance ? `${runtimeSystemGuidance}
593088
+
593089
+ ${delegateDir}` : delegateDir;
593090
+ }
593091
+ }
593015
593092
  }
593016
593093
  }
593017
593094
  } catch {
@@ -603393,7 +603470,7 @@ function resolveAgentTools(type, availableTools) {
603393
603470
  function buildAgentTypeSummary() {
603394
603471
  return _registry2.buildTypeSummary();
603395
603472
  }
603396
- var CORE_TOOLS2, READ_ONLY_TOOLS, COORDINATOR_TOOLS, AGENT_DISALLOWED_TOOLS, GENERAL_AGENT, EXPLORE_AGENT, PLAN_AGENT, COORDINATOR_AGENT, AgentTypeRegistry, _registry2;
603473
+ var CORE_TOOLS2, READ_ONLY_TOOLS, COORDINATOR_TOOLS, AGENT_DISALLOWED_TOOLS, GENERAL_AGENT, EXPLORE_AGENT, PLAN_AGENT, COORDINATOR_AGENT, FIXER_TOOLS, FIXER_AGENT, AgentTypeRegistry, _registry2;
603397
603474
  var init_agent_types = __esm({
603398
603475
  "packages/orchestrator/dist/agent-types.js"() {
603399
603476
  "use strict";
@@ -603516,6 +603593,34 @@ var init_agent_types = __esm({
603516
603593
  canSpawnAgents: true,
603517
603594
  systemPromptAddition: "You are a coordinator agent. Your role is to break down complex tasks into sub-tasks and delegate them to worker agents. You CANNOT edit files directly — you must spawn agents to do the work. Monitor their progress via task notifications and coordinate their efforts."
603518
603595
  };
603596
+ FIXER_TOOLS = [
603597
+ "file_read",
603598
+ "file_edit",
603599
+ "file_patch",
603600
+ "shell",
603601
+ // run the build/test to verify its own fix
603602
+ "grep",
603603
+ "glob",
603604
+ "task_complete"
603605
+ ];
603606
+ FIXER_AGENT = {
603607
+ type: "fixer",
603608
+ description: "Isolated single-unit fix worker. Minimal tools (read/edit/build/locate). Dispatched to resolve ONE named diagnostic in ONE file against the locked contract, then report a one-line outcome. Use for delegated build-diagnostic fixes in the fan-out/converge loop.",
603609
+ allowedTools: [...FIXER_TOOLS],
603610
+ disallowedTools: [
603611
+ "file_write",
603612
+ // prefer targeted edit/patch over whole-file writes
603613
+ "agent",
603614
+ "send_message",
603615
+ ...AGENT_DISALLOWED_TOOLS
603616
+ ],
603617
+ maxTurns: 0,
603618
+ // unlimited; halt only on task_complete or abort
603619
+ model: "inherit",
603620
+ isolation: "none",
603621
+ canSpawnAgents: false,
603622
+ systemPromptAddition: "You are an isolated FIX worker with a deliberately small context and tool set. You were given ONE specific diagnostic to resolve in ONE file. Read ONLY that file and the file that declares the offending symbol; make the MINIMAL edit to satisfy the locked contract; run the build once to confirm your change reduced the error; then call task_complete with a single-line outcome (what you changed and whether it verified). Do NOT refactor, do NOT touch unrelated files, do NOT expand scope. Fold back fast."
603623
+ };
603519
603624
  AgentTypeRegistry = class {
603520
603625
  types = /* @__PURE__ */ new Map();
603521
603626
  constructor() {
@@ -603523,6 +603628,7 @@ var init_agent_types = __esm({
603523
603628
  this.register(EXPLORE_AGENT);
603524
603629
  this.register(PLAN_AGENT);
603525
603630
  this.register(COORDINATOR_AGENT);
603631
+ this.register(FIXER_AGENT);
603526
603632
  }
603527
603633
  /** Register a new agent type (or override existing) */
603528
603634
  register(def) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.478",
3
+ "version": "1.0.479",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.478",
9
+ "version": "1.0.479",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.478",
3
+ "version": "1.0.479",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",