omnius 1.0.261 → 1.0.262

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
@@ -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
- void input;
567203
- return { proceed: true };
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 reason = `backward-pass review exhausted ${this._backwardPassCyclesUsed}/${maxCycles} cycle(s) without approval`;
567251
- this._completionIncompleteVerification = {
567252
- reason,
567253
- summary: [
567254
- "INCOMPLETE_VERIFICATION: backward-pass review did not approve completion before the review cycle limit.",
567255
- "",
567256
- `Attempted summary: ${proposedSummary || "(no summary)"}`,
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; ending as incomplete_verification instead of completing.`,
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({
@@ -701794,8 +701827,47 @@ function getRuntimeToolProfilePolicy(repoRoot) {
701794
701827
  const profile = resolveRuntimeToolProfile(repoRoot);
701795
701828
  return profile ? profilePolicy(profile) : void 0;
701796
701829
  }
701830
+ function formatSubAgentEventForView(event) {
701831
+ const truncate3 = (s2, n2) => s2.length > n2 ? `${s2.slice(0, n2)}…` : s2;
701832
+ switch (event.type) {
701833
+ case "tool_call": {
701834
+ let args = "";
701835
+ try {
701836
+ args = event.toolArgs ? truncate3(JSON.stringify(event.toolArgs), 120) : "";
701837
+ } catch {
701838
+ args = "";
701839
+ }
701840
+ return `→ ${event.toolName ?? "tool"}(${args})`;
701841
+ }
701842
+ case "tool_result": {
701843
+ const mark = event.success === false ? "✗" : "✓";
701844
+ const body = (event.content ?? "").split("\n").slice(0, 3).join(" ").trim();
701845
+ return `${mark} ${event.toolName ?? "tool"}${body ? `: ${truncate3(body, 300)}` : ""}`;
701846
+ }
701847
+ case "assistant_text":
701848
+ case "model_response": {
701849
+ const t2 = (event.content ?? "").trim();
701850
+ return t2 ? truncate3(t2, 1e3) : null;
701851
+ }
701852
+ case "status": {
701853
+ const t2 = (event.content ?? "").trim();
701854
+ return t2 ? `· ${truncate3(t2, 300)}` : null;
701855
+ }
701856
+ case "error": {
701857
+ const t2 = (event.content ?? "").trim();
701858
+ return t2 ? `✗ ${truncate3(t2, 400)}` : null;
701859
+ }
701860
+ case "complete": {
701861
+ const t2 = (event.content ?? "").trim();
701862
+ return t2 ? `✓ ${truncate3(t2, 400)}` : null;
701863
+ }
701864
+ default:
701865
+ return null;
701866
+ }
701867
+ }
701797
701868
  function createSubAgentTool(config, repoRoot, ctxWindowSize) {
701798
701869
  let onViewRegister = null;
701870
+ let onViewWrite = null;
701799
701871
  let onViewStatus = null;
701800
701872
  let onComplete = null;
701801
701873
  const tool = {
@@ -701879,6 +701951,11 @@ function createSubAgentTool(config, repoRoot, ctxWindowSize) {
701879
701951
  recursionDepth: parentDepth + 1,
701880
701952
  maxRecursionDepth: maxDepth
701881
701953
  });
701954
+ subRunner.onEvent((event) => {
701955
+ if (!onViewWrite) return;
701956
+ const line = formatSubAgentEventForView(event);
701957
+ if (line) onViewWrite(agentId, line);
701958
+ });
701882
701959
  const subTools = buildSubAgentTools(repoRoot, config);
701883
701960
  subRunner.registerTools(subTools.map(adaptTool6));
701884
701961
  subRunner.registerTool(createTaskCompleteTool(subTier, repoRoot));
@@ -701929,6 +702006,7 @@ Use task_status(task_id="${taskId}") or task_output(task_id="${taskId}") to chec
701929
702006
  },
701930
702007
  setCallbacks: (callbacks) => {
701931
702008
  if (callbacks.onViewRegister) onViewRegister = callbacks.onViewRegister;
702009
+ if (callbacks.onViewWrite) onViewWrite = callbacks.onViewWrite;
701932
702010
  if (callbacks.onViewStatus) onViewStatus = callbacks.onViewStatus;
701933
702011
  if (callbacks.onComplete) onComplete = callbacks.onComplete;
701934
702012
  }
@@ -703125,6 +703203,7 @@ ${content}
703125
703203
  });
703126
703204
  statusBar.ensureMonitorTimer();
703127
703205
  },
703206
+ onViewWrite: (id, text2) => statusBar.writeToAgentView(id, text2),
703128
703207
  onViewStatus: (id, status) => {
703129
703208
  statusBar.updateAgentViewStatus(id, status);
703130
703209
  const agent = registry2.subAgents.get(id);
@@ -704932,6 +705011,7 @@ Review its full output via full_sub_agent(action='output', id='${id}')`
704932
705011
  });
704933
705012
  statusBar.ensureMonitorTimer();
704934
705013
  },
705014
+ onViewWrite: (id, text2) => statusBar.writeToAgentView(id, text2),
704935
705015
  onViewStatus: (id, status) => {
704936
705016
  statusBar.updateAgentViewStatus(id, status);
704937
705017
  const agent = registry2.subAgents.get(id);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.261",
3
+ "version": "1.0.262",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.261",
9
+ "version": "1.0.262",
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.261",
3
+ "version": "1.0.262",
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",