@0perator/operator 0.1.54 → 0.1.55
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/CHANGELOG.md +10 -0
- package/dist/cli.js +13 -1
- package/dist/engine/aurora.js +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ Operator is AXE's terminal coding agent (npm `@0perator/operator`), running on t
|
|
|
4
4
|
Newest first. Every release bumps `src/cli.tsx` VERSION + `package.json`, adds an entry here, and ships to
|
|
5
5
|
npm + both git remotes (memjar/kode, axetechnologies/kode). Test counts are the full suite at that release.
|
|
6
6
|
|
|
7
|
+
## 0.1.55 — 2026-09-22
|
|
8
|
+
- **Remote-engine auth — Operator now runs against a REMOTE engine.** The model call sent no
|
|
9
|
+
Authorization header, so it only worked against a local `:8097`; a thin client pointed at the
|
|
10
|
+
authed `api.axe.onl` gateway got 401. `aurora.ts` now injects the operator bearer for a non-loopback
|
|
11
|
+
base (never for local `:8097`), loaded once at boot from the keychain. Verified E2E: `chat()` →
|
|
12
|
+
`https://api.axe.onl` with the operator token returned a real completion. This is what lets a 4 GB
|
|
13
|
+
MacBook run Operator against JL1's Aurora (`KODE_AURORA=https://api.axe.onl` + `operator auth login`).
|
|
14
|
+
- Relay: `ownerSub` now read from the AuthGate's `account.external_id` for real per-owner session scoping.
|
|
15
|
+
- Tests: 365/365.
|
|
16
|
+
|
|
7
17
|
## 0.1.54 — 2026-09-22
|
|
8
18
|
- **Fixed the mobile/JSCore purity gate (CI was red on main).** The persistent-shell bash tool imported
|
|
9
19
|
`node:child_process` via a string-literal `import("node:...")`, which esbuild `--platform=neutral`
|
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ import { homedir, hostname } from "node:os";
|
|
|
24
24
|
import { createHash } from "node:crypto";
|
|
25
25
|
// RELEASE CHECKLIST (every bump): update this + package.json "version", ADD A CHANGELOG.md ENTRY
|
|
26
26
|
// (improvements / fixes / tests), run the suite, then publish to npm + push both remotes.
|
|
27
|
-
const VERSION = "0.1.
|
|
27
|
+
const VERSION = "0.1.55";
|
|
28
28
|
// operator/settings.json (override path via KODE_TSI_SETTINGS), env vars still win — see config/settings.ts.
|
|
29
29
|
const settings = loadSettings();
|
|
30
30
|
// Propagate the resolved sandbox mode to the tool layer (registry reads KODE_SANDBOX at exec time).
|
|
@@ -52,6 +52,18 @@ if (sd) {
|
|
|
52
52
|
// The searxng module reads this env flag in its own sync exit hook; project the setting so it applies.
|
|
53
53
|
if (settings.services?.stopOnExit?.searxng === false)
|
|
54
54
|
process.env.KODE_STOP_SEARXNG_ON_EXIT = "0";
|
|
55
|
+
// Remote-engine auth. When this Operator points at a REMOTE engine (KODE_AURORA=https://api.axe.onl),
|
|
56
|
+
// the gateway fronts the model with operator-token auth, so the model call must carry the bearer. Load
|
|
57
|
+
// it once at boot from the keychain (or KODE_OPERATOR_TOKEN) and hand it to the engine; a local :8097
|
|
58
|
+
// never receives it (aurora.ts only sends to a non-loopback base), so this is safe on JL1 and costs
|
|
59
|
+
// nothing there. This is what lets a thin client (a 4 GB MacBook) run Operator against JL1's Aurora.
|
|
60
|
+
try {
|
|
61
|
+
const { loadCredentials } = await import("./auth/store.js");
|
|
62
|
+
const { setOperatorToken } = await import("./engine/aurora.js");
|
|
63
|
+
const creds = await loadCredentials().catch(() => null);
|
|
64
|
+
setOperatorToken(process.env.KODE_OPERATOR_TOKEN || creds?.token || undefined);
|
|
65
|
+
}
|
|
66
|
+
catch { /* auth is optional — a local engine needs none */ }
|
|
55
67
|
// Computer control (opt-in, macOS embodiment). When enabled: register the control tools into the shared
|
|
56
68
|
// registry and compute permission rules. The FOREGROUND forces each computer_* tool to "ask" so every
|
|
57
69
|
// action prompts the owner via the approve() bridge in <Root>; BACKGROUND sub-agents get them DENIED —
|
package/dist/engine/aurora.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// A remote engine (api.axe.onl) fronts the model with gateway auth; a local :8097 does not. Only a
|
|
2
|
+
// non-loopback base needs (and should ever receive) the operator bearer, so a token is never sent to
|
|
3
|
+
// a local llama-server and the header is omitted entirely when there is nothing to send.
|
|
4
|
+
function isRemoteBase(base) {
|
|
5
|
+
return !/^https?:\/\/(127\.0\.0\.1|localhost|\[::1\])(:\d+)?(\/|$)/.test(base);
|
|
6
|
+
}
|
|
7
|
+
// One operator identity per process. The node CLI sets this at boot from the keychain
|
|
8
|
+
// (setOperatorToken); browser/JSCore hosts inject per-call via AuroraOpts.token or not at all.
|
|
9
|
+
// A local :8097 never receives it (isRemoteBase gate), so it is safe to set unconditionally.
|
|
10
|
+
let _operatorToken;
|
|
11
|
+
export function setOperatorToken(token) { _operatorToken = token || undefined; }
|
|
12
|
+
function authHeaders(o) {
|
|
13
|
+
const token = o.token ?? _operatorToken;
|
|
14
|
+
return token && isRemoteBase(o.base) ? { Authorization: `Bearer ${token}` } : {};
|
|
15
|
+
}
|
|
1
16
|
// ---------------------------------------------------------------------------
|
|
2
17
|
// Decode-time degeneration guard (SPEC §1). This is NOT a sampling penalty — it changes no
|
|
3
18
|
// logits and touches no request knob, so a healthy model is completely unaffected. It only
|
|
@@ -71,7 +86,7 @@ function requestBody(messages, o, stream) {
|
|
|
71
86
|
async function* streamDeltas(messages, o) {
|
|
72
87
|
const res = await fetch(`${o.base}/v1/chat/completions`, {
|
|
73
88
|
method: "POST",
|
|
74
|
-
headers: { "Content-Type": "application/json" },
|
|
89
|
+
headers: { "Content-Type": "application/json", ...authHeaders(o) },
|
|
75
90
|
body: requestBody(messages, o, true),
|
|
76
91
|
signal: o.signal, // SPEC §9 interrupt parity: tears down the in-flight stream on abort, not at the next loop boundary
|
|
77
92
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0perator/operator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
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": {
|