omnius 1.0.454 → 1.0.455

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
@@ -574783,8 +574783,13 @@ function violatesDirective(directive, input) {
574783
574783
  if (directive.requiredNextAction !== "update_todos") {
574784
574784
  if (directive.forbiddenActionFamilies.includes(family))
574785
574785
  return true;
574786
- if (directive.forbiddenActionFamilies.includes(input.toolName))
574786
+ if (directive.forbiddenActionFamilies.includes(input.toolName)) {
574787
+ if (input.toolName === "shell" && input.isReadLike)
574788
+ return false;
574789
+ if (input.toolName === "shell" && input.shellLikelyMutatesFilesystem)
574790
+ return false;
574787
574791
  return true;
574792
+ }
574788
574793
  }
574789
574794
  switch (directive.requiredNextAction) {
574790
574795
  case "update_todos":
@@ -574812,6 +574817,12 @@ function violatesDirective(directive, input) {
574812
574817
  return false;
574813
574818
  }
574814
574819
  }
574820
+ function forbiddenCachedEvidenceFamilies(input, family) {
574821
+ if (input.cachedResultFailed && input.toolName === "shell") {
574822
+ return uniqueLimited([family, "shell"]);
574823
+ }
574824
+ return [family];
574825
+ }
574815
574826
  function normalizeCompletionStatus(value2) {
574816
574827
  if (typeof value2 !== "string")
574817
574828
  return null;
@@ -575141,7 +575152,7 @@ var init_focusSupervisor = __esm({
575141
575152
  state,
575142
575153
  reason: input.cachedResultFailed ? `cached failed ${input.toolName} evidence already exists` : `duplicate ${input.toolName} call has cached evidence`,
575143
575154
  requiredNextAction: "use_cached_evidence",
575144
- forbiddenActionFamilies: [family]
575155
+ forbiddenActionFamilies: forbiddenCachedEvidenceFamilies(input, family)
575145
575156
  });
575146
575157
  if (strict && !advisoryOnly && (input.cachedResultFailed || duplicateHitCount >= hitLimit)) {
575147
575158
  return this.block(directive, [
@@ -575230,22 +575241,23 @@ var init_focusSupervisor = __esm({
575230
575241
  const forbidden = staleEditFailure ? uniqueLimited([
575231
575242
  actionFamily(input.toolName, input.args),
575232
575243
  input.toolName
575233
- ]) : [actionFamily(input.toolName, input.args)];
575244
+ ]) : input.toolName === "shell" ? uniqueLimited([actionFamily(input.toolName, input.args), "shell"]) : [actionFamily(input.toolName, input.args)];
575234
575245
  this.setDirective({
575235
575246
  turn: input.turn,
575236
575247
  state: "forced_replan",
575237
575248
  reason: `same ${input.toolName} failure family repeated ${next.count} times: ${next.sample}`,
575238
- requiredNextAction: staleEditFailure ? "read_authoritative_target" : input.toolName === "shell" ? "edit_different_target" : "update_todos",
575249
+ requiredNextAction: staleEditFailure ? "read_authoritative_target" : input.toolName === "shell" ? "use_cached_evidence" : "update_todos",
575239
575250
  forbiddenActionFamilies: forbidden
575240
575251
  });
575241
575252
  } else if (next.count === 1 && !this.directive) {
575242
575253
  const staleEditFailure = isEditTool(input.toolName) && next.errorClass.startsWith("stale_");
575254
+ const shellFailure = input.toolName === "shell";
575243
575255
  this.setDirective({
575244
575256
  turn: input.turn,
575245
- state: "warn",
575257
+ state: shellFailure ? "cached_evidence" : "warn",
575246
575258
  reason: `first ${input.toolName} failure (${next.errorClass}): ${next.sample}`,
575247
- requiredNextAction: staleEditFailure ? "read_authoritative_target" : "update_todos",
575248
- forbiddenActionFamilies: [actionFamily(input.toolName, input.args)]
575259
+ requiredNextAction: staleEditFailure ? "read_authoritative_target" : shellFailure ? "use_cached_evidence" : "update_todos",
575260
+ forbiddenActionFamilies: shellFailure ? uniqueLimited([actionFamily(input.toolName, input.args), "shell"]) : [actionFamily(input.toolName, input.args)]
575249
575261
  });
575250
575262
  }
575251
575263
  }
@@ -577767,6 +577779,15 @@ function formatTodoReminderItems(todos, maxRows) {
577767
577779
  rows.push(`... +${todos.length - rows.length} more`);
577768
577780
  return rows.join("\n");
577769
577781
  }
577782
+ function selectHeadTailLines(lines, headCount, tailCount) {
577783
+ if (lines.length <= headCount + tailCount)
577784
+ return lines;
577785
+ return [
577786
+ ...lines.slice(0, headCount),
577787
+ `... [${lines.length - headCount - tailCount} middle line(s) omitted]`,
577788
+ ...lines.slice(-tailCount)
577789
+ ];
577790
+ }
577770
577791
  function stripThinkBlocks(s2) {
577771
577792
  if (!s2)
577772
577793
  return s2;
@@ -582836,13 +582857,11 @@ ${contentPreview}
582836
582857
  for (const f2 of shown) {
582837
582858
  const argsRepr = JSON.stringify(f2.args).slice(0, 120);
582838
582859
  const failureText = [f2.error, f2.output].filter((v) => typeof v === "string" && v.trim().length > 0).join("\n");
582839
- const errFirst = failureText.split(/\n/)[0]?.slice(0, 200) || "(no error message)";
582840
- const errFull = failureText.slice(0, f2.tool === "file_edit" || f2.tool === "batch_edit" || f2.tool === "file_patch" ? 1200 : 600);
582860
+ const excerpt = this._formatRecentFailureExcerpt(f2.tool, failureText);
582841
582861
  lines.push(`• turn ${f2.turn} — ${f2.tool}(${argsRepr})`);
582842
- lines.push(` first line: ${errFirst}`);
582843
- if (errFull && errFull !== errFirst) {
582844
- const indented = errFull.split(/\n/).slice(0, 6).map((l2) => ` ${l2}`).join("\n");
582845
- lines.push(indented);
582862
+ lines.push(` first line: ${excerpt.firstLine}`);
582863
+ if (excerpt.body) {
582864
+ lines.push(excerpt.body);
582846
582865
  }
582847
582866
  }
582848
582867
  if (repeating.length > 0) {
@@ -582852,6 +582871,14 @@ ${contentPreview}
582852
582871
  lines.push(`(turn ${turn} — failures auto-expire after 10 turns; cleared on success or successful retry)`);
582853
582872
  return lines.join("\n");
582854
582873
  }
582874
+ _formatRecentFailureExcerpt(tool, text2) {
582875
+ const lines = String(text2 || "").replace(/\r/g, "").split("\n").map((line) => line.trimEnd());
582876
+ const firstLine = lines.find((line) => line.trim().length > 0)?.slice(0, 220) || "(no error message)";
582877
+ const maxChars = tool === "file_edit" || tool === "batch_edit" || tool === "file_patch" ? 1400 : tool === "shell" ? 2200 : 900;
582878
+ const selected = tool === "shell" ? selectHeadTailLines(lines, 8, 14) : lines.slice(0, 8);
582879
+ const body = selected.filter((line) => line.trim().length > 0).map((line) => ` ${line}`).join("\n").slice(0, maxChars);
582880
+ return { firstLine, body };
582881
+ }
582855
582882
  /**
582856
582883
  * Render a short, local-code-first nudge from the freshest failure signal.
582857
582884
  * This is intentionally not a web-search suggestion: most coding-agent loops
@@ -588378,6 +588405,7 @@ Read the current file if needed, make a different concrete edit, or move to veri
588378
588405
  ].includes(tc.name);
588379
588406
  const isStatefulBrowserTool = this._isStatefulBrowserTool(tc.name);
588380
588407
  const isReadLike = !isStatefulBrowserTool && (baseIsReadLike || tc.name === "shell" && this._isShellCommandReadOnly(tc.arguments?.["command"] ?? tc.arguments?.["cmd"] ?? ""));
588408
+ const shellLikelyMutatesFilesystem = tc.name === "shell" && this._shellCommandLikelyMutatesFilesystem(String(tc.arguments?.["command"] ?? tc.arguments?.["cmd"] ?? ""));
588381
588409
  const adversaryRedundantSignal = this._adversaryRedundantSignals.has(toolFingerprint);
588382
588410
  if (adversaryRedundantSignal) {
588383
588411
  this._adversaryRedundantSignals.delete(toolFingerprint);
@@ -588564,6 +588592,7 @@ ${cachedResult}`,
588564
588592
  completionStatus: completionStatusFromTaskCompleteArgs(tc.arguments),
588565
588593
  fingerprint: toolFingerprint,
588566
588594
  isReadLike,
588595
+ shellLikelyMutatesFilesystem,
588567
588596
  cachedResult: focusCachedEntry?.result,
588568
588597
  cachedResultFailed: tc.name === "shell" && typeof focusCachedEntry?.result === "string" && focusCachedEntry.result.includes("status: failure"),
588569
588598
  duplicateHitCount: focusDuplicateHits,
@@ -589712,7 +589741,7 @@ Respond with EXACTLY this structure before your next tool call:
589712
589741
  fingerprint: toolFingerprint,
589713
589742
  args: tc.arguments,
589714
589743
  error: (result.error ?? "").slice(0, 600),
589715
- output: (result.output ?? "").slice(0, 1500),
589744
+ output: (result.output ?? "").slice(0, tc.name === "shell" ? 4e3 : 1500),
589716
589745
  turn
589717
589746
  });
589718
589747
  if (this._recentFailures.length > 8) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.454",
3
+ "version": "1.0.455",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.454",
9
+ "version": "1.0.455",
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.454",
3
+ "version": "1.0.455",
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",