@0perator/operator 0.1.43 → 0.1.44
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 +1 -1
- package/dist/ui/ToolStep.js +34 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import { expandFileMentions } from "./util/mentions.js";
|
|
|
19
19
|
import { join } from "node:path";
|
|
20
20
|
import { homedir, hostname } from "node:os";
|
|
21
21
|
import { createHash } from "node:crypto";
|
|
22
|
-
const VERSION = "0.1.
|
|
22
|
+
const VERSION = "0.1.44";
|
|
23
23
|
// operator/settings.json (override path via KODE_TSI_SETTINGS), env vars still win — see config/settings.ts.
|
|
24
24
|
const settings = loadSettings();
|
|
25
25
|
// Propagate the resolved sandbox mode to the tool layer (registry reads KODE_SANDBOX at exec time).
|
package/dist/ui/ToolStep.js
CHANGED
|
@@ -6,13 +6,42 @@ import { Box, Text } from "ink";
|
|
|
6
6
|
import { formatDuration } from "./format.js";
|
|
7
7
|
const GLYPH = { selected: "○", running: "◐", done: "✓", error: "✗" };
|
|
8
8
|
const COLOR = { selected: "gray", running: "#e8a33d", done: "green", error: "red" };
|
|
9
|
-
|
|
9
|
+
// Args that identify WHAT a tool acted on — a path, a command, a URL. These are shown FIRST and IN FULL
|
|
10
|
+
// (never truncated), so you can always read the exact file name / path a tool wrote or read. Order matters:
|
|
11
|
+
// path-like keys first.
|
|
12
|
+
const KEY_ARGS = ["path", "file", "filename", "command", "cmd", "pattern", "url", "query", "workspace", "cwd", "name"];
|
|
13
|
+
// Bulky payloads — never dumped (they'd bury the path and blow up the line); shown as a size instead.
|
|
14
|
+
const BULK_ARGS = ["content", "text", "body", "data", "new_string", "old_string", "diff", "message"];
|
|
15
|
+
export function argsPreview(args) {
|
|
10
16
|
if (!args)
|
|
11
17
|
return "";
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
const parts = [];
|
|
19
|
+
const seen = new Set();
|
|
20
|
+
// 1) identifying keys, in full — the file name/path is the point, so it is NEVER clipped.
|
|
21
|
+
for (const k of KEY_ARGS) {
|
|
22
|
+
const v = args[k];
|
|
23
|
+
if (v != null && (typeof v === "string" || typeof v === "number")) {
|
|
24
|
+
parts.push(`${k}: ${v}`);
|
|
25
|
+
seen.add(k);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// 2) bulky payloads → just a length, never the content.
|
|
29
|
+
for (const k of BULK_ARGS) {
|
|
30
|
+
if (typeof args[k] === "string") {
|
|
31
|
+
parts.push(`${k}: ${args[k].length} chars`);
|
|
32
|
+
seen.add(k);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// 3) any remaining scalar args, each individually trimmed (never at the cost of the path above).
|
|
36
|
+
for (const [k, v] of Object.entries(args)) {
|
|
37
|
+
if (seen.has(k))
|
|
38
|
+
continue;
|
|
39
|
+
const s = typeof v === "string" ? v : JSON.stringify(v);
|
|
40
|
+
if (s == null)
|
|
41
|
+
continue;
|
|
42
|
+
parts.push(`${k}=${s.length > 40 ? `${s.slice(0, 37)}...` : s}`);
|
|
43
|
+
}
|
|
44
|
+
return parts.join(", ");
|
|
16
45
|
}
|
|
17
46
|
export function ToolStep({ step }) {
|
|
18
47
|
const [now, setNow] = useState(() => Date.now());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0perator/operator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
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": {
|