@0perator/operator 0.1.59 → 0.1.61

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 CHANGED
@@ -4,6 +4,34 @@ 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.61 — 2026-09-22
8
+ - **Fix: search glob honored without ripgrep (CI red).** 's glob (e.g. "*.ts") is now enforced by a JS post-filter on the result lines (basename fnmatch) in BOTH the ripgrep and grep-fallback paths — grep's --include / rg's -g have platform-varying semantics (GNU grep on CI let "*.ts" through), so the tool no longer trusts the flag alone. Fixes the 0.1.60 CI failure (ubuntu has no rg → grep fallback). Verified on the grep path with rg hidden.
9
+ - Tests: 379/379 (search glob now green on the no-rg path).
10
+
11
+ ## 0.1.61 — 2026-09-22
12
+ - **Fix: `search` glob honored without ripgrep (CI red on 0.1.60).** The glob (e.g. "*.ts") is now enforced
13
+ by a JS post-filter over the result lines (basename fnmatch) in BOTH the ripgrep and grep-fallback paths.
14
+ grep's `--include` and rg's `-g` have platform-varying semantics — GNU grep on CI (ubuntu, no rg) let
15
+ "*.ts" through — so the tool no longer trusts the underlying flag alone. Verified on the grep path with rg
16
+ hidden. Tests: 379/379.
17
+
18
+ ## 0.1.60 — 2026-09-22
19
+ - **`http_request` tool (capability #5).** A real HTTP client beyond `web_fetch`'s GET-and-scrape: any method
20
+ (GET/POST/PUT/PATCH/DELETE/HEAD), custom headers, a JSON (`json`) or raw (`body`) payload, bearer/basic auth,
21
+ redirects, timeout. Returns status + response headers + the capped body verbatim (no HTML stripping) — for
22
+ authenticated REST/GraphQL/webhook calls. safe:false (can mutate → gated when the policy is on).
23
+ - **`file_upload` tool (capability #7).** The push side Operator lacked: POST multipart/form-data (default,
24
+ `field` names the part) or PUT raw bytes (S3 presigned-PUT style), same bearer/basic auth as http_request.
25
+ safe:false (exfiltrates a file → gated; confirm the destination). btoa (not node Buffer) keeps both tools
26
+ neutral-bundle-safe; resolved auth secrets are never echoed into the result.
27
+ - **Drivable operating mode across host + web** (folds in the landed remote-control commit): `/mode
28
+ [plan|manual|auto]` (autonomous→auto, gated→manual); single `applyMode()` path for Shift+Tab / /mode / /plan
29
+ / follower frame keeps policy + plan flag + badge + capabilities in lockstep; `RemoteCapabilities.mode` is the
30
+ live 3-state ("gated" back-compat alias); "mode" in REMOTE_SAFE_COMMANDS. Web (0perator.co/remote) drives it.
31
+ - Capability roadmap (`docs/capabilities/`): #5 and #7 now SHIPPED; cloud/docker/ssh/monitoring/media-processing
32
+ are reachable via the fleet MCP gateway (`mcp:true`); webhook receiver (#8) + super daemon (#9) remain to build.
33
+ - Tests: 379/379 (5 new: http_request GET/POST-json/basic-auth, file_upload multipart + raw PUT).
34
+
7
35
  ## 0.1.59 — 2026-09-22
8
36
  Efficiency fixes for the failure the live screenshot caught: a filesystem-hunt task ran ~40 rounds of
9
37
  `find ~/ | grep | grep`, hit the per-command timeout, killed + reset the persistent shell (losing cwd/env)
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.59";
27
+ const VERSION = "0.1.61";
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).
@@ -262,6 +262,7 @@ const HELP = [
262
262
  " /audit [n] recent tool + control-plane events from the audit trail (default 15)",
263
263
  " /dashboard launch the live swarm console (watches every Operator session)",
264
264
  " /plan plan mode: read-only research + propose a plan (/plan again to execute)",
265
+ " /mode [plan|manual|auto] set operating mode (plan · manual · autonomous); also Shift+Tab to cycle",
265
266
  " /think extended reasoning: Aurora thinks before answering (/think again = off)",
266
267
  " /ultrathink deep, exhaustive reasoning for hard problems (/ultrathink again = off)",
267
268
  " /compact force-compact the conversation now",
@@ -293,6 +294,7 @@ const REMOTE_SAFE_COMMANDS = [
293
294
  { name: "audit", description: "recent tool + control-plane events from the audit trail", args: "[n]" },
294
295
  { name: "dashboard", description: "launch the live swarm console" },
295
296
  { name: "plan", description: "toggle plan mode (read-only research + propose a plan)" },
297
+ { name: "mode", description: "set operating mode: plan · manual · autonomous", args: "[plan|manual|auto]" },
296
298
  { name: "think", description: "toggle extended reasoning" },
297
299
  { name: "ultrathink", description: "toggle deep, exhaustive reasoning" },
298
300
  { name: "compact", description: "force-compact the conversation now" },
@@ -336,6 +338,9 @@ function Root() {
336
338
  // Operating mode, cycled with Shift+Tab (like Claude Code): auto (no gate) → manual (approve mutations)
337
339
  // → plan (read-only + propose) → auto. Auto=bypass policy, Manual=gated policy, Plan=session plan mode.
338
340
  const [opMode, setOpMode] = useState(settings.permissions.mode === "gated" ? "manual" : "auto");
341
+ // Ref mirror of opMode so buildCapabilities() reflects the LIVE mode synchronously (a follower's mode
342
+ // selector must light up the instant it changes, before React flushes the setOpMode state update).
343
+ const opModeRef = useRef(opMode);
339
344
  const [thinkMode, setThinkMode] = useState("off"); // /think, /ultrathink badge
340
345
  const [elapsed, setElapsed] = useState(0); // live seconds since the current turn started (ticked by a
341
346
  const turnStartRef = useRef(0); // timer, so the clock advances even during a long reasoning
@@ -478,7 +483,7 @@ function Root() {
478
483
  skills: [...skillsRef.current.entries()].map(([name, description]) => ({ name, description })),
479
484
  mcpServers: session.mcpServers().map((s) => ({ name: s.name, toolCount: s.tools.length, tools: s.tools })),
480
485
  models: session.modelRegistry().map((m) => ({ id: m.id, label: m.label, ctx: m.ctx ?? 0, kind: m.kind })),
481
- mode: settings.permissions.mode === "gated" ? "gated" : "auto", // "bypass"/"audit" both drive with no approval gate from a follower's POV
486
+ mode: opModeRef.current, // live operating mode (Plan/Manual/Autonomous) — a follower can read + drive it via /mode
482
487
  cwd: process.cwd(),
483
488
  model: session.currentModel(),
484
489
  });
@@ -703,6 +708,29 @@ function Root() {
703
708
  push({ kind: "message", message: { id: nextId(), role: "system", content: text } });
704
709
  remoteRef.current?.system(text);
705
710
  }, []);
711
+ // Single code path for a mode change — Shift+Tab (onCycleMode), the /mode slash command (local or
712
+ // driven by a remote follower), and /plan all funnel here so the policy, the plan flag, the status
713
+ // badge, and the follower-facing capabilities stay in lockstep. auto=Autonomous (bypass policy, no
714
+ // approvals), manual=gated (mutations ask), plan=read-only research (session plan mode).
715
+ const applyMode = useCallback((next, quiet) => {
716
+ if (next === "plan") {
717
+ session.setPlanMode(true);
718
+ }
719
+ else {
720
+ session.setPlanMode(false);
721
+ session.setPermissionMode(next === "auto" ? "bypass" : "gated");
722
+ }
723
+ opModeRef.current = next;
724
+ setPlanMode(next === "plan");
725
+ setOpMode(next);
726
+ if (!quiet)
727
+ sys(next === "auto"
728
+ ? "◆ mode → AUTONOMOUS — I execute without asking (shift+tab to cycle)"
729
+ : next === "manual"
730
+ ? "◈ mode → MANUAL — I ask before mutating (writes/edits/shell) (shift+tab to cycle)"
731
+ : "◔ mode → PLAN — read-only research + a proposed plan; nothing runs (shift+tab to cycle)");
732
+ remoteRef.current?.setCapabilities(buildCapabilities()); // re-sync attached followers' mode selector
733
+ }, [sys]);
706
734
  const handleSlash = useCallback(async (cmd) => {
707
735
  const [name, ...rest] = cmd.slice(1).split(/\s+/);
708
736
  const arg = rest.join(" ").trim();
@@ -849,13 +877,27 @@ function Root() {
849
877
  }
850
878
  case "plan": {
851
879
  const on = !s.inPlanMode();
852
- s.setPlanMode(on);
853
- setPlanMode(on);
880
+ applyMode(on ? "plan" : "auto", true); // policy + follower caps sync; custom message below
854
881
  sys(on
855
882
  ? "◔ plan mode ON — I'll research read-only and propose a plan; writes/edits/shell mutations are blocked. /plan again to approve + execute."
856
883
  : "plan mode OFF — back to normal execution.");
857
884
  break;
858
885
  }
886
+ case "mode": {
887
+ // Set the operating mode by name (owner OR a remote follower via a `command` frame). Mirrors
888
+ // Shift+Tab's cycle but addressable: /mode plan | manual | autonomous. No arg → report current.
889
+ const a = arg.toLowerCase();
890
+ const target = a === "plan" ? "plan"
891
+ : (a === "manual" || a === "gated") ? "manual"
892
+ : (a === "auto" || a === "autonomous" || a === "bypass") ? "auto"
893
+ : null;
894
+ if (!target) {
895
+ sys(`mode is ${opModeRef.current === "auto" ? "AUTONOMOUS" : opModeRef.current.toUpperCase()} — usage: /mode plan | manual | autonomous`);
896
+ break;
897
+ }
898
+ applyMode(target);
899
+ break;
900
+ }
859
901
  case "think": {
860
902
  const on = s.currentThinkMode() !== "think";
861
903
  s.setThinkMode(on ? "think" : "off");
@@ -1034,7 +1076,7 @@ function Root() {
1034
1076
  }
1035
1077
  default: sys(`unknown command /${name} — try /help`);
1036
1078
  }
1037
- }, [exit, sys, bg, authUser, approval, settleApproval, settleQuestion]);
1079
+ }, [exit, sys, bg, authUser, approval, settleApproval, settleQuestion, applyMode]);
1038
1080
  const onSubmit = useCallback((text) => {
1039
1081
  const t = text.trim();
1040
1082
  if (t.startsWith("/")) {
@@ -1048,22 +1090,10 @@ function Root() {
1048
1090
  // Shift+Tab cycles the operating mode (Claude-Code parity). auto→manual→plan→auto. Auto drives with
1049
1091
  // no approval gate; Manual gates mutating tools through the approve() bridge; Plan is read-only research.
1050
1092
  const onCycleMode = useCallback(() => {
1051
- setOpMode((cur) => {
1052
- const next = cur === "auto" ? "manual" : cur === "manual" ? "plan" : "auto";
1053
- if (next === "plan") {
1054
- session.setPlanMode(true);
1055
- }
1056
- else {
1057
- session.setPlanMode(false);
1058
- session.setPermissionMode(next === "auto" ? "bypass" : "gated");
1059
- }
1060
- setPlanMode(next === "plan");
1061
- sys(next === "auto" ? "◆ mode → AUTO — I execute without asking (shift+tab to cycle)"
1062
- : next === "manual" ? "◈ mode → MANUAL — I ask before mutating (writes/edits/shell) (shift+tab to cycle)"
1063
- : "◔ mode → PLAN — read-only research + a proposed plan; nothing runs (shift+tab to cycle)");
1064
- return next;
1065
- });
1066
- }, [sys]);
1093
+ const cur = opModeRef.current;
1094
+ const next = cur === "auto" ? "manual" : cur === "manual" ? "plan" : "auto";
1095
+ applyMode(next);
1096
+ }, [applyMode]);
1067
1097
  const onInterrupt = useCallback(() => {
1068
1098
  if (statusRef.current === "idle") {
1069
1099
  bg.dispose();
@@ -243,6 +243,27 @@ function capMatches(stdout) {
243
243
  out += `\n…[${lines.length - GREP_MAXLINES} more matching lines — narrow the pattern or pass a path/glob]`;
244
244
  return out;
245
245
  }
246
+ // A tiny fnmatch over a filename: `*` → any run, `?` → one char. Used to POST-FILTER search results by
247
+ // `glob` in JS so the filter is honored regardless of the underlying tool: ripgrep's -g and grep's
248
+ // --include have different (and platform-varying) semantics — notably GNU grep on CI let "*.ts" through —
249
+ // so we never trust the tool's flag alone.
250
+ function globToRegExp(glob) {
251
+ const re = glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
252
+ return new RegExp(`^${re}$`);
253
+ }
254
+ function filterLinesByGlob(stdout, glob) {
255
+ if (!glob)
256
+ return stdout;
257
+ const re = globToRegExp(glob);
258
+ return stdout.split("\n").filter((line) => {
259
+ if (!line.trim())
260
+ return false;
261
+ // content line "path:lineno:…" or files-only "path"; the file path is up to the first ":".
262
+ const p = line.includes(":") ? line.slice(0, line.indexOf(":")) : line;
263
+ const base = p.split("/").pop() ?? p;
264
+ return re.test(base);
265
+ }).join("\n");
266
+ }
246
267
  // Fast search backed by ripgrep — parallel, .gitignore-aware, skips binaries/hidden files, so it stays
247
268
  // scoped and quick instead of `find ~/ | grep | grep` over the whole home tree. Falls back to grep with
248
269
  // the SAME scoping + caps when rg isn't installed, so the tool always works. `files_with_matches` returns
@@ -254,6 +275,8 @@ async function ripgrepSearch(args) {
254
275
  return "error: no pattern given";
255
276
  const filesOnly = !!args.files_with_matches;
256
277
  const glob = args.glob ? str(args.glob) : "";
278
+ // Belt-and-suspenders over rg -g / grep --include: always JS-filter the output by the glob too.
279
+ const capG = (s) => capMatches(filterLinesByGlob(s, glob));
257
280
  const grepFallback = async () => {
258
281
  // rg absent — same intent via grep: recursive, skip .git/node_modules, honor glob + files-only.
259
282
  const gflags = ["-rns", "-I", "--exclude-dir=.git", "--exclude-dir=node_modules", "--exclude=.operator-session.json"];
@@ -263,11 +286,11 @@ async function ripgrepSearch(args) {
263
286
  gflags.push(`--include=${glob}`);
264
287
  try {
265
288
  const { stdout } = await pexecFile("grep", [...gflags, "-E", pattern, path], { maxBuffer: 10 * 1024 * 1024, timeout: 20_000, killSignal: "SIGKILL" });
266
- return capMatches(stdout);
289
+ return capG(stdout);
267
290
  }
268
291
  catch (ge) {
269
292
  if (ge.stdout && String(ge.stdout).trim())
270
- return capMatches(String(ge.stdout));
293
+ return capG(String(ge.stdout));
271
294
  if (ge.code === 1)
272
295
  return "(no matches)";
273
296
  if (ge.killed)
@@ -282,13 +305,13 @@ async function ripgrepSearch(args) {
282
305
  rgArgs.push("-e", pattern, path);
283
306
  try {
284
307
  const { stdout } = await pexecFile("rg", rgArgs, { maxBuffer: 10 * 1024 * 1024, timeout: 20_000, killSignal: "SIGKILL" });
285
- return capMatches(stdout);
308
+ return capG(stdout);
286
309
  }
287
310
  catch (e) {
288
311
  if (e.code === "ENOENT")
289
312
  return grepFallback(); // ripgrep not installed → grep
290
313
  if (e.stdout && String(e.stdout).trim())
291
- return capMatches(String(e.stdout));
314
+ return capG(String(e.stdout));
292
315
  if (e.code === 1)
293
316
  return "(no matches)";
294
317
  if (e.killed)
@@ -469,6 +492,116 @@ async function webFetch(args) {
469
492
  clearTimeout(timer);
470
493
  }
471
494
  }
495
+ // Shared auth-header builder for the HTTP tools. `bearer` → Authorization: Bearer; `basic` {user,pass} →
496
+ // Authorization: Basic base64. btoa (not node Buffer) keeps this neutral-bundle-safe. The resolved secret
497
+ // is set on the outgoing request only — never returned in the tool result.
498
+ function authHeaders(args) {
499
+ const h = {};
500
+ if (args.bearer)
501
+ h["Authorization"] = `Bearer ${str(args.bearer)}`;
502
+ else if (args.basic && typeof args.basic === "object") {
503
+ const b = args.basic;
504
+ h["Authorization"] = "Basic " + btoa(`${str(b.user)}:${str(b.pass)}`);
505
+ }
506
+ return h;
507
+ }
508
+ const HTTP_BODY_CAP = 200_000; // cap a response body so one huge payload can't balloon the model's context
509
+ // Real HTTP client — the capability gap beyond web_fetch's dumb GET-and-scrape. Any method, custom
510
+ // headers, JSON or raw body, bearer/basic auth, follow redirects, timeout. Returns status + headers +
511
+ // (capped) body verbatim (no HTML-stripping — this is for APIs, not pages). safe:false: it can POST/PUT/
512
+ // DELETE (mutation), so it's gated when the permission policy is on.
513
+ async function httpRequest(args) {
514
+ const url = str(args.url);
515
+ if (!/^https?:\/\//i.test(url))
516
+ return "error: http_request needs an http(s) URL";
517
+ const method = str(args.method, "GET").toUpperCase();
518
+ const headers = { "User-Agent": "operator/kode-tsi", ...authHeaders(args) };
519
+ if (args.headers && typeof args.headers === "object") {
520
+ for (const [k, v] of Object.entries(args.headers))
521
+ headers[k] = String(v);
522
+ }
523
+ let body;
524
+ if (args.json !== undefined) {
525
+ body = JSON.stringify(args.json);
526
+ if (!Object.keys(headers).some((k) => k.toLowerCase() === "content-type"))
527
+ headers["Content-Type"] = "application/json";
528
+ }
529
+ else if (args.body !== undefined) {
530
+ body = str(args.body);
531
+ }
532
+ const noBody = method === "GET" || method === "HEAD";
533
+ const timeoutMs = Number(args.timeout_ms ?? 30_000);
534
+ const ctrl = new AbortController();
535
+ const timer = setTimeout(() => ctrl.abort(), timeoutMs);
536
+ try {
537
+ const res = await fetch(url, { method, headers, body: noBody ? undefined : body, signal: ctrl.signal, redirect: "follow" });
538
+ const text = await res.text().catch(() => "");
539
+ const hdrs = [...res.headers.entries()].map(([k, v]) => `${k}: ${v}`).slice(0, 50).join("\n");
540
+ const capped = text.length > HTTP_BODY_CAP ? `${text.slice(0, HTTP_BODY_CAP)}\n…[body truncated, ${text.length - HTTP_BODY_CAP} more chars]` : text;
541
+ return `HTTP ${res.status} ${res.statusText}\n${hdrs}\n\n${capped}`.trim();
542
+ }
543
+ catch (e) {
544
+ const m = e instanceof Error ? e.message : String(e);
545
+ return `error: http_request ${method} ${url}: ${/abort/i.test(m) ? `timed out after ${timeoutMs}ms` : m}`;
546
+ }
547
+ finally {
548
+ clearTimeout(timer);
549
+ }
550
+ }
551
+ // Upload a local file to a URL — the missing push side (Operator could download, never upload). POST
552
+ // multipart/form-data (default, the common upload contract) or PUT raw bytes. Supports the same
553
+ // bearer/basic auth + custom headers as http_request. safe:false: it exfiltrates a file to an external
554
+ // service, so it's gated when the policy is on and should confirm the destination.
555
+ async function fileUpload(args) {
556
+ const path = expandPath(str(args.path));
557
+ const url = str(args.url);
558
+ if (!path)
559
+ return "error: file_upload needs a path";
560
+ if (!/^https?:\/\//i.test(url))
561
+ return "error: file_upload needs an http(s) url";
562
+ const method = str(args.method, "POST").toUpperCase();
563
+ const field = str(args.field, "file");
564
+ const headers = { ...authHeaders(args) };
565
+ if (args.headers && typeof args.headers === "object") {
566
+ for (const [k, v] of Object.entries(args.headers))
567
+ headers[k] = String(v);
568
+ }
569
+ const { readFile } = await nodeImport("node:fs/promises");
570
+ const { basename } = await nodeImport("node:path");
571
+ let data;
572
+ try {
573
+ data = await readFile(path);
574
+ }
575
+ catch (e) {
576
+ return `error: cannot read ${path}: ${e.message}`;
577
+ }
578
+ const timeoutMs = Number(args.timeout_ms ?? 120_000); // uploads can be large — generous default
579
+ const ctrl = new AbortController();
580
+ const timer = setTimeout(() => ctrl.abort(), timeoutMs);
581
+ try {
582
+ let bodyInit;
583
+ if (method === "PUT") {
584
+ bodyInit = data; // raw bytes (S3 presigned-PUT style); node accepts Uint8Array
585
+ if (!Object.keys(headers).some((k) => k.toLowerCase() === "content-type"))
586
+ headers["Content-Type"] = "application/octet-stream";
587
+ }
588
+ else {
589
+ const form = new FormData();
590
+ form.append(field, new Blob([data]), basename(path));
591
+ bodyInit = form; // multipart; fetch sets the Content-Type boundary itself
592
+ }
593
+ const res = await fetch(url, { method, headers, body: bodyInit, signal: ctrl.signal, redirect: "follow" });
594
+ const text = (await res.text().catch(() => "")).slice(0, HTTP_BODY_CAP);
595
+ return `HTTP ${res.status} ${res.statusText} — uploaded ${basename(path)} (${data.byteLength} bytes)${text ? `\n\n${text}` : ""}`.trim();
596
+ }
597
+ catch (e) {
598
+ const m = e instanceof Error ? e.message : String(e);
599
+ return `error: file_upload ${method} ${url}: ${/abort/i.test(m) ? `timed out after ${timeoutMs}ms` : m}`;
600
+ }
601
+ finally {
602
+ clearTimeout(timer);
603
+ }
604
+ }
472
605
  const bgJobs = new Map();
473
606
  let bgSeq = 0;
474
607
  const BG_MAX_RUNNING = 8; // cap concurrent live jobs — a background tool must never let the agent fork-bomb the host
@@ -727,6 +860,34 @@ const TOOLS = [
727
860
  }, required: ["url"] },
728
861
  run: webFetch,
729
862
  },
863
+ {
864
+ name: "http_request", safe: false,
865
+ description: "Make a real HTTP request to any API — full control beyond web_fetch's dumb GET. Any method (GET/POST/PUT/PATCH/DELETE/HEAD), custom headers, a JSON body (`json`) or raw `body`, and bearer/basic auth. Returns status + response headers + the (capped) body verbatim (no HTML stripping). Use for authenticated REST/GraphQL calls, webhooks, and service integrations.",
866
+ parameters: { type: "object", properties: {
867
+ url: { type: "string", description: "the http(s) URL" },
868
+ method: { type: "string", description: "HTTP method (default GET)" },
869
+ headers: { type: "object", description: "request headers as a flat object" },
870
+ json: { description: "a JSON-serializable body (sets Content-Type: application/json)" },
871
+ body: { type: "string", description: "raw request body (ignored if `json` is set)" },
872
+ bearer: { type: "string", description: "convenience: sets Authorization: Bearer <token>" },
873
+ basic: { type: "object", description: "convenience: {user, pass} → Authorization: Basic" },
874
+ timeout_ms: { type: "number", description: "default 30000" },
875
+ }, required: ["url"] },
876
+ run: httpRequest,
877
+ },
878
+ {
879
+ name: "file_upload", safe: false,
880
+ description: "Upload a local file to a URL — the push side web_fetch/download lacks. POST multipart/form-data (default; set `field` for the form field name) or PUT raw bytes (S3 presigned-PUT style). Supports the same bearer/basic auth + custom headers as http_request. Confirm the destination — this sends your file to an external service.",
881
+ parameters: { type: "object", properties: {
882
+ path: { type: "string", description: "local file path to upload" },
883
+ url: { type: "string", description: "destination http(s) URL" },
884
+ method: { type: "string", enum: ["POST", "PUT"], description: "POST=multipart (default), PUT=raw bytes" },
885
+ field: { type: "string", description: "multipart form field name (default \"file\")" },
886
+ headers: { type: "object" }, bearer: { type: "string" }, basic: { type: "object" },
887
+ timeout_ms: { type: "number", description: "default 120000" },
888
+ }, required: ["path", "url"] },
889
+ run: fileUpload,
890
+ },
730
891
  {
731
892
  name: "web_search", safe: true,
732
893
  description: "Search the web (via the AXE autopilot SERP service, or a self-hosted SearXNG) and return ranked title/url/snippet results. Read-only. Follow up with web_fetch to read a result.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0perator/operator",
3
- "version": "0.1.59",
3
+ "version": "0.1.61",
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": {