omnius 1.0.354 → 1.0.355

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
@@ -570895,25 +570895,24 @@ Your hypotheses MUST address this specific error, not generic causes.
570895
570895
  return best && best.count >= 3 ? best : null;
570896
570896
  }
570897
570897
  /**
570898
- * Backend adapter for AUXILIARY inference (adversary critiques, branch
570899
- * extraction) — tool-less, think-off, JSON-shaped calls. The main backend's
570900
- * chatCompletion routes to Ollama's /v1/chat/completions, where qwen3-family
570901
- * models IGNORE think:false and /no_think and (with no tools to anchor
570902
- * output) emit a reasoning-only response that gets stripped to EMPTY. The
570903
- * native /api/chat path honors think:false. This adapter prefers it and sets
570904
- * a responseFormat so the native path enforces JSON mode. Falls back to
570905
- * chatCompletion for non-Ollama backends.
570898
+ * Backend adapter for AUXILIARY inference (adversary critiques, resolution
570899
+ * gate, branch extraction) — tool-less, think-off, JSON-shaped calls. Uses the
570900
+ * SAME inference backend the main agent loop uses — whatever provider the user
570901
+ * selected and only ensures a JSON responseFormat for these structured
570902
+ * calls. Provider-specific quirks (e.g. Ollama /v1 + qwen3 returning an empty
570903
+ * reasoning-only response for tool-less think-off calls) are recovered INSIDE
570904
+ * the backend's own chatCompletion (empty-recovery native /api/chat
570905
+ * fallback), so no caller here is Ollama-aware.
570906
570906
  */
570907
570907
  _auxInferenceBackend() {
570908
570908
  const b = this.backend;
570909
- const useNative = typeof b.nativeOllamaChatCompletion === "function";
570910
570909
  return {
570911
570910
  chatCompletion: (req3) => {
570912
570911
  const r2 = {
570913
570912
  ...req3,
570914
570913
  responseFormat: req3.responseFormat ?? { type: "json_object" }
570915
570914
  };
570916
- return useNative ? b.nativeOllamaChatCompletion(r2) : b.chatCompletion(r2);
570915
+ return b.chatCompletion(r2);
570917
570916
  }
570918
570917
  };
570919
570918
  }
@@ -585983,6 +585982,15 @@ ${description}`
585983
585982
  const justSuppressed = this._thinkSuppressed && this._thinkFailStreak === _OllamaAgenticBackend._thinkFailThreshold;
585984
585983
  const shouldRetryThinkGuard = outcome !== null && effectiveThink === true && (justSuppressed || outcome === "empty_after_strip" || outcome === "unclosed_think");
585985
585984
  if (shouldRetryThinkGuard || shouldRecoverFromEmpty) {
585985
+ if (shouldRecoverFromEmpty) {
585986
+ try {
585987
+ const _native = await this.nativeOllamaChatCompletion(request);
585988
+ const _nText = String(_native.choices?.[0]?.message?.content ?? "");
585989
+ if (_nText.trim().length >= 2)
585990
+ return _native;
585991
+ } catch {
585992
+ }
585993
+ }
585986
585994
  const retryMessages = injectNoThinkDirective(requestMessages);
585987
585995
  const retryBody = {
585988
585996
  model: this.model,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.354",
3
+ "version": "1.0.355",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.354",
9
+ "version": "1.0.355",
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.354",
3
+ "version": "1.0.355",
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",