@0perator/operator 0.1.21 → 0.1.22
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 +8 -1
- package/dist/config/settings.js +9 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -16,11 +16,18 @@ 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.
|
|
19
|
+
const VERSION = "0.1.22";
|
|
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).
|
|
23
23
|
process.env.KODE_SANDBOX = settings.sandbox.mode;
|
|
24
|
+
// web_search reads KODE_AUTOPILOT_URL / KODE_SEARXNG_URL from the env at exec; project them from the
|
|
25
|
+
// settings layer so a settings.json backend works without the user exporting anything. applyEnv already
|
|
26
|
+
// folded any real env var into settings.search (env wins), so this never clobbers an explicit export.
|
|
27
|
+
if (settings.search?.autopilotUrl)
|
|
28
|
+
process.env.KODE_AUTOPILOT_URL = settings.search.autopilotUrl;
|
|
29
|
+
if (settings.search?.searxngUrl)
|
|
30
|
+
process.env.KODE_SEARXNG_URL = settings.search.searxngUrl;
|
|
24
31
|
// Computer control (opt-in, macOS embodiment). When enabled: register the control tools into the shared
|
|
25
32
|
// registry and compute permission rules. The FOREGROUND forces each computer_* tool to "ask" so every
|
|
26
33
|
// action prompts the owner via the approve() bridge in <Root>; BACKGROUND sub-agents get them DENIED —
|
package/dist/config/settings.js
CHANGED
|
@@ -25,6 +25,7 @@ const DEFAULTS = {
|
|
|
25
25
|
telemetry: { enabled: true }, // local-only metrics (silent JSONL); remote sink opt-in via KODE_TELEMETRY_URL
|
|
26
26
|
sandbox: { mode: "off" }, // no isolation by default — enterprise turns it on (KODE_SANDBOX / settings)
|
|
27
27
|
computer: { enabled: false }, // computer control OFF by default; enable with KODE_COMPUTER=1 or settings.json
|
|
28
|
+
search: {}, // web_search backend unset by default; set search.searxngUrl / search.autopilotUrl or the env vars
|
|
28
29
|
};
|
|
29
30
|
function settingsPath() {
|
|
30
31
|
return process.env.KODE_TSI_SETTINGS ?? join(homedir(), ".axe", "operator", "settings.json");
|
|
@@ -55,7 +56,7 @@ function readSettingsFile(path) {
|
|
|
55
56
|
/** Fold env vars over the file+default merge — the top layer of the precedence stack. Only an env
|
|
56
57
|
* var that's actually set overrides; an unset one leaves the file/default value alone. */
|
|
57
58
|
function applyEnv(s) {
|
|
58
|
-
const out = { ...s, endpoints: { ...s.endpoints }, memory: { ...s.memory }, permissions: { ...s.permissions }, telemetry: { ...s.telemetry }, sandbox: { ...s.sandbox }, computer: { ...s.computer } };
|
|
59
|
+
const out = { ...s, endpoints: { ...s.endpoints }, memory: { ...s.memory }, permissions: { ...s.permissions }, telemetry: { ...s.telemetry }, sandbox: { ...s.sandbox }, computer: { ...s.computer }, search: { ...s.search } };
|
|
59
60
|
if (process.env.KODE_MODEL)
|
|
60
61
|
out.endpoints = { ...out.endpoints, aurora: { ...out.endpoints.aurora, model: process.env.KODE_MODEL } }; // AI-agnostic quick-swap (keeps failover)
|
|
61
62
|
const base = process.env.KODE_AURORA ?? process.env.KODE_1M; // KODE_1M kept as a back-compat alias for the base override
|
|
@@ -75,6 +76,13 @@ function applyEnv(s) {
|
|
|
75
76
|
out.sandbox = { mode: sb };
|
|
76
77
|
if (process.env.KODE_COMPUTER === "1")
|
|
77
78
|
out.computer = { enabled: true };
|
|
79
|
+
if (process.env.KODE_AUTOPILOT_URL || process.env.KODE_SEARXNG_URL) {
|
|
80
|
+
out.search = {
|
|
81
|
+
...out.search,
|
|
82
|
+
...(process.env.KODE_AUTOPILOT_URL ? { autopilotUrl: process.env.KODE_AUTOPILOT_URL } : {}),
|
|
83
|
+
...(process.env.KODE_SEARXNG_URL ? { searxngUrl: process.env.KODE_SEARXNG_URL } : {}),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
78
86
|
return out;
|
|
79
87
|
}
|
|
80
88
|
/** Load operator settings: built-in defaults <- ~/.axe/operator/settings.json (override path via
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0perator/operator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
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": {
|