@0perator/operator 0.1.24 → 0.1.25

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/cli.js CHANGED
@@ -16,7 +16,7 @@ import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
16
16
  import { join } from "node:path";
17
17
  import { homedir } from "node:os";
18
18
  import { createHash } from "node:crypto";
19
- const VERSION = "0.1.24";
19
+ const VERSION = "0.1.25";
20
20
  // operator/settings.json (override path via KODE_TSI_SETTINGS), env vars still win — see config/settings.ts.
21
21
  const settings = loadSettings();
22
22
  // Propagate the resolved sandbox mode to the tool layer (registry reads KODE_SANDBOX at exec time).
@@ -28,6 +28,8 @@ if (settings.search?.autopilotUrl)
28
28
  process.env.KODE_AUTOPILOT_URL = settings.search.autopilotUrl;
29
29
  if (settings.search?.searxngUrl)
30
30
  process.env.KODE_SEARXNG_URL = settings.search.searxngUrl;
31
+ if (settings.search?.searxngEngines)
32
+ process.env.KODE_SEARXNG_ENGINES = settings.search.searxngEngines;
31
33
  const sd = settings.search?.docker;
32
34
  if (sd) {
33
35
  if (sd.enabled === false)
@@ -270,10 +270,14 @@ async function webSearch(args) {
270
270
  // never yields "(no results)" when the other could answer.
271
271
  // SearXNG: an explicit KODE_SEARXNG_URL if reachable, else a container Operator stands up on demand
272
272
  // and tears down when idle / at exit (ensureSearxng handles both; null = unavailable here).
273
+ // Pin SearXNG to independent, non-Microsoft indexes by default (Brave + Mojeek are own-crawler; Google
274
+ // + Startpage are non-MS). Deliberately excludes Bing and DuckDuckGo (DDG is Bing-syndicated). Microsoft
275
+ // is only ever reached via the autopilot fallback below, and only when SearXNG is entirely unavailable.
276
+ const searxEngines = process.env.KODE_SEARXNG_ENGINES ?? "brave,mojeek,google,startpage";
273
277
  const searx = await ensureSearxng();
274
278
  if (searx) {
275
279
  try {
276
- const res = await fetch(`${searx.replace(/\/$/, "")}/search?q=${encodeURIComponent(q)}&format=json`, { signal: ctrl.signal, headers: { "User-Agent": "operator/kode-tsi" } });
280
+ const res = await fetch(`${searx.replace(/\/$/, "")}/search?q=${encodeURIComponent(q)}&format=json&engines=${encodeURIComponent(searxEngines)}`, { signal: ctrl.signal, headers: { "User-Agent": "operator/kode-tsi" } });
277
281
  if (res.ok) {
278
282
  const j = await res.json().catch(() => ({}));
279
283
  const rows = j.results ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0perator/operator",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Operator (KODE) — TypeScript + Ink terminal coding agent. Full-frame render, single-engine core shared across CLI/web/mobile; runs against a local Aurora model.",
5
5
  "type": "module",
6
6
  "bin": {