@tiens.nguyen/gonext-local-worker 1.0.284 → 1.0.285

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.
@@ -749,6 +749,19 @@ def _web_search_impl(query, max_results=5, searxng_url="",
749
749
  order += 1
750
750
  ranked = sorted(merged.values(), key=lambda e: (-e["hits"], e["order"]))[:max_results]
751
751
 
752
+ # Backend attribution (diagnostics): which engines actually returned results this call,
753
+ # so the worker log shows whether SearXNG contributed. searxng=off means GONEXT_SEARXNG_URL
754
+ # wasn't seen by python; searxng=on(0) means it was reached but returned nothing.
755
+ _log(
756
+ "web_search backends → "
757
+ f"searxng={'on' if searxng else 'off'}"
758
+ + (f"({len(results_by.get('searxng', []))})" if searxng else "")
759
+ + f" ddg({len(results_by.get('ddg', []))})"
760
+ + (f" wikipedia({len(results_by.get('wikipedia', []))})" if not searxng else "")
761
+ + f" answers({len(answers)}) → {len(ranked)} ranked"
762
+ + (f" [searxng={searxng}]" if searxng else "")
763
+ )
764
+
752
765
  if not summary and not ranked and not answers:
753
766
  return (
754
767
  f"No results found for '{q}'. Tell the user you couldn't find this — "
@@ -3161,6 +3174,12 @@ def run_agent_chat(cfg):
3161
3174
  f"start model={agent_model_id!r} base={agent_base_url!r} "
3162
3175
  f"codeModel={coding_model_id!r} codeBase={coding_base_url!r} maxSteps={max_steps}"
3163
3176
  )
3177
+ # SearXNG (task #103): diagnostics — confirms python SEES the URL (from cfg.searxngUrl or
3178
+ # the GONEXT_SEARXNG_URL env). If this logs 'none', web_search falls back to keyless DDG.
3179
+ import os as _os
3180
+ _searxng_url = ((cfg.get("searxngUrl") or "").strip()
3181
+ or (_os.environ.get("GONEXT_SEARXNG_URL") or "").strip())
3182
+ _log(f"searxng: {_searxng_url or 'none (keyless DDG + Wikipedia only)'}")
3164
3183
  # Search model (#105): diagnostics only — the web_search tool reads it from cfg directly.
3165
3184
  _search_base = (cfg.get("searchBaseURL") or "").strip()
3166
3185
  _search_model = (cfg.get("searchModelId") or "").strip()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gonext-local-worker",
3
- "version": "1.0.284",
3
+ "version": "1.0.285",
4
4
  "description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
5
5
  "type": "module",
6
6
  "license": "MIT",