@ouro.bot/cli 0.1.0-alpha.1475 → 0.1.0-alpha.1476

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.json CHANGED
@@ -2,9 +2,11 @@
2
2
  "_note": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
4
  {
5
- "version": "0.1.0-alpha.1475",
5
+ "version": "0.1.0-alpha.1476",
6
6
  "changes": [
7
- "When a release's verify-npm step still sees the `latest` tag behind the version it published after its 10-minute wait, it now prints read-only diagnostics from several registry read paths (npm view dist-tags, `npm dist-tag ls`, the registry's dist-tags endpoint with its cache headers, and recent publish times) before failing. The wait length and the failure are unchanged; the diagnostics record what each path returned, not a cause."
7
+ "When a release's verify-npm step still sees the `latest` tag behind the version it published after its 10-minute wait, it now prints read-only diagnostics from several registry read paths (npm view dist-tags, `npm dist-tag ls`, the registry's dist-tags endpoint with its cache headers, and recent publish times) before failing. The wait length and the failure are unchanged; the diagnostics record what each path returned, not a cause.",
8
+ "New: `npm run eval:watch -- --agent-root <path>` reads a live agent's nerves logs and prints its turns as counts a day by channel: turns, how they ended, steps, step-budget stops, tool calls and errors, `find_tools` use, provider fallbacks and tokens. It reads only the lines added since its last run, follows log rotation, and stops after 30 seconds of CPU at the lowest priority. A scheduler should run the built file with `nice -n 19 node dist/eval/watch-entry.js`, since the npm script builds first. It keeps private rows under `~/.ouro-eval/watch/<agent>/` (owner-only), naming each turn only by a salted hash. It reads logs and nothing else: it never opens a session, sends nothing, starts no process, makes no model call, and refuses any write under `~/AgentBundles/` or the agent's folder. A summary line with a missing or malformed field is counted as rejected and never copied, and a field it doesn't know is left out. If it fails, it prints only an error code.",
9
+ "`engine.turn_summary` is now written at every log level, so turns on the iMessage, mail and voice senses (which log only warnings and errors) are counted too. It also names the runtime version."
8
10
  ]
9
11
  },
10
12
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1475",
2
+ "runtimeVersion": "0.1.0-alpha.1476",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1475</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1476</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.watchCli = watchCli;
7
+ exports.lowerPriority = lowerPriority;
8
+ /**
9
+ * The command line of `npm run eval:watch -- --agent-root <path> [--out <folder>]`, kept apart from the entry file so
10
+ * its tests can check exactly what it prints. It prints the report as JSON, or on failure one line naming the error
11
+ * code only, so no path or log text reaches the terminal.
12
+ */
13
+ const node_os_1 = __importDefault(require("node:os"));
14
+ const node_path_1 = __importDefault(require("node:path"));
15
+ const runtime_1 = require("../../nerves/runtime");
16
+ const guarded_fs_1 = require("./guarded-fs");
17
+ const run_watch_1 = require("./run-watch");
18
+ const USAGE = "usage: npm run eval:watch -- --agent-root <path> [--out <folder>]\n";
19
+ function argument(args, name) {
20
+ const index = args.indexOf(name);
21
+ return index >= 0 ? args[index + 1] : undefined;
22
+ }
23
+ /** Runs Watch once and returns the exit code: 0 on success, 2 for bad arguments, 1 for any other failure. */
24
+ function watchCli(args, io, extra = {}) {
25
+ const agentRootArg = argument(args, "--agent-root");
26
+ if (!agentRootArg) {
27
+ io.stderr(USAGE);
28
+ return 2;
29
+ }
30
+ try {
31
+ const agentRoot = node_path_1.default.resolve(agentRootArg);
32
+ const agent = node_path_1.default.basename(agentRoot).replace(/\.ouro$/, "");
33
+ const privateDir = node_path_1.default.resolve(argument(args, "--out") ?? node_path_1.default.join(io.homedir, ".ouro-eval", "watch", agent));
34
+ const gfs = (0, guarded_fs_1.createGuardedFs)({ protectedRoots: [node_path_1.default.join(io.homedir, "AgentBundles"), agentRoot], privateDir });
35
+ const report = (0, run_watch_1.runWatch)({ agentRoot, gfs, ...extra });
36
+ io.stdout(`${JSON.stringify(report, null, 2)}\n`);
37
+ return 0;
38
+ }
39
+ catch (error) {
40
+ const code = error?.code;
41
+ const label = typeof code === "string" && /^[A-Z][A-Z0-9_]{0,31}$/.test(code) ? code : "refused or failed";
42
+ (0, runtime_1.emitNervesEvent)({ level: "error", component: "eval", event: "eval.watch_failed", message: "Watch failed", meta: { code: label } });
43
+ io.stderr(`Watch failed (${label}); nothing was written outside its private folder.\n`);
44
+ return 1;
45
+ }
46
+ }
47
+ /** Lowers this process to the lowest CPU priority; Watch still runs if the system refuses. */
48
+ function lowerPriority(setPriority = node_os_1.default.setPriority) {
49
+ try {
50
+ setPriority(19);
51
+ }
52
+ catch {
53
+ // Lowering one's own priority doesn't fail on macOS or Linux; if it does, Watch still runs.
54
+ }
55
+ }
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.sameName = sameName;
7
+ exports.createGuardedFs = createGuardedFs;
8
+ /**
9
+ * Watch's only way to touch files. It reads anywhere, but writes only into its own private folder (0700, files 0600),
10
+ * and it refuses any write, append, rename or unlink under a protected folder (the agent bundles).
11
+ *
12
+ * How a write is kept out of a protected folder:
13
+ * - A path is protected if any folder on its way up is a protected folder, compared by device and inode, so letter
14
+ * case (macOS names are case-insensitive) and links can't disguise it.
15
+ * - Writes open with `O_NOFOLLOW`, so a link planted in the private folder (even one whose target doesn't exist yet)
16
+ * is refused rather than followed, and the opened file must be a regular file with one name, in the private folder.
17
+ * Reads open the file `O_RDONLY`, so an agent's logs can't be changed through Watch even by mistake.
18
+ */
19
+ const node_fs_1 = __importDefault(require("node:fs"));
20
+ const node_path_1 = __importDefault(require("node:path"));
21
+ const runtime_1 = require("../../nerves/runtime");
22
+ const WRITE_FLAGS = {
23
+ wx: node_fs_1.default.constants.O_WRONLY | node_fs_1.default.constants.O_CREAT | node_fs_1.default.constants.O_EXCL,
24
+ a: node_fs_1.default.constants.O_WRONLY | node_fs_1.default.constants.O_CREAT | node_fs_1.default.constants.O_APPEND,
25
+ };
26
+ const PRIVATE_NAME = /^[a-z][a-z0-9.-]{0,63}$/;
27
+ /** The only names Watch keeps in its private folder; an existing folder holding anything else is refused. */
28
+ const WATCH_FILES = /^(?:cursor\.json|rows\.ndjson|salt)(?:\.tmp)?$/;
29
+ /** The deepest folder on `target`'s way up that exists, with links resolved. */
30
+ function existingAncestor(target) {
31
+ let current = node_path_1.default.resolve(target);
32
+ for (;;) {
33
+ try {
34
+ return node_fs_1.default.realpathSync.native(current);
35
+ }
36
+ catch {
37
+ const parent = node_path_1.default.dirname(current);
38
+ /* v8 ignore next -- the file-system root always resolves @preserve */
39
+ if (parent === current)
40
+ return current;
41
+ current = parent;
42
+ }
43
+ }
44
+ }
45
+ function identity(stats) {
46
+ return `${stats.dev}:${stats.ino}`;
47
+ }
48
+ /** Whether two names are the same folder name; macOS and Windows names ignore letter case. */
49
+ function sameName(a, b, platform = process.platform) {
50
+ return platform === "darwin" || platform === "win32" ? a.toLowerCase() === b.toLowerCase() : a === b;
51
+ }
52
+ function isInsideByName(child, parent) {
53
+ const childParts = node_path_1.default.resolve(child).split(node_path_1.default.sep);
54
+ const parentParts = node_path_1.default.resolve(parent).split(node_path_1.default.sep);
55
+ return parentParts.length <= childParts.length && parentParts.every((part, index) => sameName(part, childParts[index]));
56
+ }
57
+ function createGuardedFs(options) {
58
+ const refuse = (reason) => {
59
+ (0, runtime_1.emitNervesEvent)({ level: "error", component: "eval", event: "eval.watch_write_refused", message: "Watch refused a write", meta: { reason } });
60
+ throw new Error(reason === "protected" ? "Watch never writes in a protected folder" : `Watch writes only in its private folder (${reason})`);
61
+ };
62
+ const protectedIds = new Set();
63
+ for (const root of options.protectedRoots) {
64
+ try {
65
+ protectedIds.add(identity(node_fs_1.default.statSync(root)));
66
+ }
67
+ catch {
68
+ // A protected folder that doesn't exist yet is still caught by name below.
69
+ }
70
+ }
71
+ /** Whether any folder from `target` up is protected, by identity or by name. */
72
+ const isProtected = (target) => {
73
+ if (options.protectedRoots.some((root) => isInsideByName(target, root)))
74
+ return true;
75
+ let current = existingAncestor(target);
76
+ for (;;) {
77
+ if (protectedIds.has(identity(node_fs_1.default.statSync(current))))
78
+ return true;
79
+ const parent = node_path_1.default.dirname(current);
80
+ if (parent === current)
81
+ return false;
82
+ current = parent;
83
+ }
84
+ };
85
+ if (isProtected(options.privateDir))
86
+ refuse("protected");
87
+ node_fs_1.default.mkdirSync(options.privateDir, { recursive: true, mode: 0o700 });
88
+ if (node_fs_1.default.lstatSync(options.privateDir).isSymbolicLink())
89
+ refuse("link");
90
+ // A folder that already holds anything but Watch's own files (such as `--out ~`) is not Watch's to take over.
91
+ if (node_fs_1.default.readdirSync(options.privateDir).some((name) => !WATCH_FILES.test(name)))
92
+ refuse("not-empty");
93
+ node_fs_1.default.chmodSync(options.privateDir, 0o700);
94
+ const privateDir = node_fs_1.default.realpathSync.native(options.privateDir);
95
+ const privateId = identity(node_fs_1.default.statSync(privateDir));
96
+ /** Refuses unless `target` names a file directly in the private folder, outside every protected folder. */
97
+ const checkWritable = (target) => {
98
+ if (isProtected(target))
99
+ refuse("protected");
100
+ const resolved = node_path_1.default.resolve(target);
101
+ let parentId;
102
+ try {
103
+ parentId = identity(node_fs_1.default.statSync(node_path_1.default.dirname(resolved)));
104
+ }
105
+ catch {
106
+ return refuse("outside");
107
+ }
108
+ if (parentId !== privateId)
109
+ refuse("outside");
110
+ return node_path_1.default.join(privateDir, node_path_1.default.basename(resolved));
111
+ };
112
+ const privatePath = (name) => {
113
+ if (!PRIVATE_NAME.test(name))
114
+ refuse("name");
115
+ return checkWritable(node_path_1.default.join(privateDir, name));
116
+ };
117
+ const gfs = {
118
+ withFile(file, use) {
119
+ let fd;
120
+ try {
121
+ fd = node_fs_1.default.openSync(file, "r");
122
+ }
123
+ catch (error) {
124
+ if (error.code === "ENOENT")
125
+ return null;
126
+ throw error;
127
+ }
128
+ try {
129
+ const stats = node_fs_1.default.fstatSync(fd);
130
+ return use({
131
+ ino: stats.ino,
132
+ size: stats.size,
133
+ read(start, limit) {
134
+ const length = Math.min(Math.max(0, stats.size - start), limit ?? Number.MAX_SAFE_INTEGER);
135
+ const buffer = Buffer.alloc(length);
136
+ let done = 0;
137
+ while (done < length) {
138
+ const got = node_fs_1.default.readSync(fd, buffer, done, length - done, start + done);
139
+ /* v8 ignore next -- only when the file shrinks while it is read @preserve */
140
+ if (got === 0)
141
+ break;
142
+ done += got;
143
+ }
144
+ return buffer.subarray(0, done);
145
+ },
146
+ });
147
+ }
148
+ finally {
149
+ node_fs_1.default.closeSync(fd);
150
+ }
151
+ },
152
+ readWhole(file) {
153
+ return gfs.withFile(file, (handle) => handle.read(0));
154
+ },
155
+ exists(file) {
156
+ return node_fs_1.default.existsSync(file);
157
+ },
158
+ list(dir) {
159
+ try {
160
+ return node_fs_1.default.readdirSync(dir).sort();
161
+ }
162
+ catch {
163
+ return [];
164
+ }
165
+ },
166
+ open(file, flags) {
167
+ if (flags === "r")
168
+ return node_fs_1.default.openSync(file, "r");
169
+ const mode = WRITE_FLAGS[flags];
170
+ if (mode === undefined)
171
+ return refuse("flags");
172
+ const target = checkWritable(file);
173
+ let fd;
174
+ try {
175
+ fd = node_fs_1.default.openSync(target, mode | node_fs_1.default.constants.O_NOFOLLOW, 0o600);
176
+ }
177
+ catch (error) {
178
+ if (error.code === "ELOOP")
179
+ return refuse("link");
180
+ throw error;
181
+ }
182
+ const stats = node_fs_1.default.fstatSync(fd);
183
+ if (!stats.isFile() || stats.nlink !== 1) {
184
+ node_fs_1.default.closeSync(fd);
185
+ refuse("link");
186
+ }
187
+ return fd;
188
+ },
189
+ rename(from, to) {
190
+ const source = checkWritable(from);
191
+ const destination = checkWritable(to);
192
+ node_fs_1.default.renameSync(source, destination);
193
+ },
194
+ unlink(file) {
195
+ node_fs_1.default.unlinkSync(checkWritable(file));
196
+ },
197
+ readPrivate(name) {
198
+ const target = privatePath(name);
199
+ let fd;
200
+ try {
201
+ fd = node_fs_1.default.openSync(target, node_fs_1.default.constants.O_RDONLY | node_fs_1.default.constants.O_NOFOLLOW);
202
+ }
203
+ catch (error) {
204
+ if (error.code === "ENOENT")
205
+ return null;
206
+ return refuse("link");
207
+ }
208
+ try {
209
+ if (!node_fs_1.default.fstatSync(fd).isFile())
210
+ refuse("link");
211
+ return node_fs_1.default.readFileSync(fd, "utf8");
212
+ }
213
+ finally {
214
+ node_fs_1.default.closeSync(fd);
215
+ }
216
+ },
217
+ writePrivate(name, text) {
218
+ const target = privatePath(name);
219
+ const temporary = `${target}.tmp`;
220
+ // A leftover temporary file, or a link planted in its place, is removed by its own name (a link's target is
221
+ // never touched), never written through.
222
+ try {
223
+ if (node_fs_1.default.lstatSync(temporary).isSymbolicLink())
224
+ node_fs_1.default.unlinkSync(temporary);
225
+ else
226
+ gfs.unlink(temporary);
227
+ }
228
+ catch (error) {
229
+ if (error.code !== "ENOENT")
230
+ throw error;
231
+ }
232
+ const fd = gfs.open(temporary, "wx");
233
+ try {
234
+ node_fs_1.default.writeSync(fd, text);
235
+ node_fs_1.default.fsyncSync(fd);
236
+ }
237
+ finally {
238
+ node_fs_1.default.closeSync(fd);
239
+ }
240
+ gfs.rename(temporary, target);
241
+ },
242
+ appendPrivate(name, text) {
243
+ const fd = gfs.open(privatePath(name), "a");
244
+ try {
245
+ node_fs_1.default.writeSync(fd, text);
246
+ node_fs_1.default.fsyncSync(fd);
247
+ }
248
+ finally {
249
+ node_fs_1.default.closeSync(fd);
250
+ }
251
+ },
252
+ };
253
+ return gfs;
254
+ }
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DEFAULT_MAX_BYTES = exports.HEAD_BYTES = void 0;
7
+ exports.readNewLines = readNewLines;
8
+ /**
9
+ * Reads the complete lines a nerves log gained since the last run. The cursor is a byte offset plus the file's inode
10
+ * and a hash of its first bytes, so a run can tell its file from one that replaced it.
11
+ *
12
+ * The nerves sink rotates `foo.ndjson` by renaming it to `foo.1.ndjson`, writing `foo.1.ndjson.gz` from it and then
13
+ * removing the plain copy; the next write starts a new `foo.ndjson`. When the active file is no longer the cursor's
14
+ * file, the reader finishes generation 1 from the cursor's offset if its first bytes match (the gzipped copy, or the
15
+ * plain one while the gzip is still being written), then reads the new file from the start. If nothing matches (the
16
+ * file was replaced, or it rotated more than once between runs), the lines in between are lost: the reader says so as
17
+ * a gap and starts the new file from the start.
18
+ *
19
+ * Each file is opened once and read through that one descriptor, so a rotation between two reads can't mix files.
20
+ * A run reads at most `maxBytes` of the active file; the cursor then points part-way in and `more` is true. Generation 1
21
+ * is finished whole (at most the sink's 25 MB rotation size).
22
+ */
23
+ const node_crypto_1 = __importDefault(require("node:crypto"));
24
+ const node_zlib_1 = __importDefault(require("node:zlib"));
25
+ const runtime_1 = require("../../nerves/runtime");
26
+ exports.HEAD_BYTES = 1024;
27
+ exports.DEFAULT_MAX_BYTES = 4 * 1024 * 1024;
28
+ function hashHead(bytes, length) {
29
+ return node_crypto_1.default.createHash("sha256").update(bytes.subarray(0, length)).digest("hex");
30
+ }
31
+ /** Complete lines in `bytes`, and how many bytes they used (a half-written last line waits for the next run). */
32
+ function completeLines(bytes) {
33
+ const end = bytes.lastIndexOf(0x0a);
34
+ if (end < 0)
35
+ return { lines: [], used: 0 };
36
+ const lines = bytes.subarray(0, end).toString("utf8").split("\n").filter((line) => line.length > 0);
37
+ return { lines, used: end + 1 };
38
+ }
39
+ /** The whole of generation 1 of `active` (a `.ndjson` file): the gzipped copy, else the plain one, else null. */
40
+ function readGenerationOne(gfs, active) {
41
+ const base = active.slice(0, -".ndjson".length);
42
+ const gz = gfs.readWhole(`${base}.1.ndjson.gz`);
43
+ if (gz) {
44
+ try {
45
+ return node_zlib_1.default.gunzipSync(gz);
46
+ }
47
+ catch {
48
+ // Still being written, or damaged: the plain copy is still there while a rotation is in progress.
49
+ }
50
+ }
51
+ return gfs.readWhole(`${base}.1.ndjson`);
52
+ }
53
+ function matches(handle, cursor) {
54
+ return handle.ino === cursor.ino && handle.size >= cursor.offset && hashHead(handle.read(0, cursor.headLength), cursor.headLength) === cursor.head;
55
+ }
56
+ /** Reads `handle` from `start`, at most `maxBytes`, appending complete lines to `into`. */
57
+ function readFrom(handle, start, maxBytes, into) {
58
+ const bytes = handle.read(start, maxBytes);
59
+ const { lines, used } = completeLines(bytes);
60
+ into.push(...lines);
61
+ // A line longer than a whole part would stop the log for good: skip it as a gap and go on after it.
62
+ const tooLong = used === 0 && bytes.length >= maxBytes;
63
+ const offset = start + (tooLong ? bytes.length : used);
64
+ // The head covers the first bytes present, a half-written line included (a log only grows), so a cursor can tell
65
+ // its file from a new one that reused the inode even before the file has a whole line.
66
+ const headLength = Math.min(exports.HEAD_BYTES, handle.size);
67
+ const head = hashHead(handle.read(0, headLength), headLength);
68
+ return { cursor: { ino: handle.ino, offset, head, headLength }, more: offset < handle.size && (used > 0 || tooLong), gap: tooLong };
69
+ }
70
+ function readNewLines(gfs, active, cursor, maxBytes = exports.DEFAULT_MAX_BYTES) {
71
+ const lines = [];
72
+ const fromActive = gfs.withFile(active, (handle) => {
73
+ if (cursor && matches(handle, cursor))
74
+ return readFrom(handle, cursor.offset, maxBytes, lines);
75
+ if (!cursor)
76
+ return readFrom(handle, 0, maxBytes, lines);
77
+ // The cursor's file is gone from this name: finish generation 1 if it is the cursor's file.
78
+ const matched = finishGenerationOne(gfs, active, cursor, lines);
79
+ if (!matched) {
80
+ (0, runtime_1.emitNervesEvent)({ level: "warn", component: "eval", event: "eval.watch_log_gap", message: "a watched log was replaced; lines in between are lost", meta: {} });
81
+ }
82
+ const read = readFrom(handle, 0, maxBytes, lines);
83
+ return { ...read, gap: read.gap || !matched };
84
+ });
85
+ if (fromActive)
86
+ return { lines, ...fromActive };
87
+ if (!cursor)
88
+ return { lines, cursor: undefined, gap: false, more: false };
89
+ // Rotated, and the new file doesn't exist yet: once generation 1 is finished, the next run starts the new file from 0.
90
+ return finishGenerationOne(gfs, active, cursor, lines) ? { lines, cursor: undefined, gap: false, more: false } : { lines: [], cursor, gap: false, more: false };
91
+ }
92
+ function finishGenerationOne(gfs, active, cursor, into) {
93
+ const generation = readGenerationOne(gfs, active);
94
+ // A cursor with no head (its file was empty) can't tell one file from another, so it never matches a generation.
95
+ if (generation === null || cursor.headLength === 0 || generation.length < cursor.offset || hashHead(generation, cursor.headLength) !== cursor.head)
96
+ return false;
97
+ into.push(...completeLines(generation.subarray(cursor.offset)).lines);
98
+ return true;
99
+ }
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WATCH_PROVIDERS = void 0;
7
+ exports.rowFromLine = rowFromLine;
8
+ exports.dailyCounts = dailyCounts;
9
+ /**
10
+ * Turns `engine.turn_summary` log lines into Watch's private rows, and rows into counts a day by channel.
11
+ *
12
+ * A line is kept only if its summary has every field of the event's shape: every string from its fixed list or shaped
13
+ * like an id, every count a whole number. Anything else is rejected by reason alone. A row is built field by field from
14
+ * that shape, so a field the event gains later is left out rather than copied, and a summary from before
15
+ * `runtimeVersion` existed is kept with `runtimeVersion: "unknown"`. Tool names come from tool definitions, never from
16
+ * message text; one that isn't shaped like a tool name is kept as `other`. The turn is named only by a salted hash of
17
+ * its trace id; the message and the trace id themselves are never kept. Watch prints only counts, never these names.
18
+ */
19
+ const node_crypto_1 = __importDefault(require("node:crypto"));
20
+ const runtime_1 = require("../../nerves/runtime");
21
+ const turn_summary_1 = require("../../heart/turn-summary");
22
+ const EVENT = "engine.turn_summary";
23
+ const ID = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,79}$/;
24
+ /** The providers an agent can be configured with, plus the tally's labels for none and for a malformed id. */
25
+ exports.WATCH_PROVIDERS = [
26
+ "azure", "minimax", "anthropic", "openai-codex", "github-copilot", "openai-compatible", "openai-compatible-gemini",
27
+ ];
28
+ const PROVIDER_LABELS = [...exports.WATCH_PROVIDERS, "unknown", "other"];
29
+ /** Model ids as providers name them: lowercase, digits, dots and dashes (no spaces, slashes or capitals). */
30
+ const MODEL = /^[a-z0-9][a-z0-9.-]{0,63}$/;
31
+ const TIMESTAMP = /^(\d{4}-\d{2}-\d{2})T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
32
+ const STRING_FIELDS = {
33
+ channel: (value) => turn_summary_1.TURN_SUMMARY_CHANNELS.includes(value),
34
+ outcome: (value) => turn_summary_1.TURN_SUMMARY_OUTCOMES.includes(value),
35
+ errorClass: (value) => turn_summary_1.TURN_SUMMARY_ERROR_CLASSES.includes(value),
36
+ provider: (value) => PROVIDER_LABELS.includes(value),
37
+ model: (value) => MODEL.test(value),
38
+ runtimeVersion: (value) => ID.test(value),
39
+ };
40
+ let summaryKeys;
41
+ /** The summary's field names, taken from the tally itself so the two can't drift. */
42
+ function expectedKeys() {
43
+ summaryKeys ??= Object.keys(new turn_summary_1.TurnTally().summarize({ channel: "cli", outcome: "settled", errorClass: "none" })).sort();
44
+ return summaryKeys;
45
+ }
46
+ const isCount = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
47
+ /** A tool's own name, a whole MCP server's label, or the tally's label for a name the turn didn't offer. */
48
+ const TOOL_LABEL = /^(?:[a-z][a-z0-9_]{0,63}|mcp:[A-Za-z0-9][A-Za-z0-9_.-]{0,47})$/;
49
+ const OTHER_TOOL = "other";
50
+ function toolCounts(value) {
51
+ if (typeof value !== "object" || value === null || Array.isArray(value))
52
+ return null;
53
+ const counts = {};
54
+ for (const [name, count] of Object.entries(value)) {
55
+ if (!isCount(count))
56
+ return null;
57
+ const label = TOOL_LABEL.test(name) ? name : OTHER_TOOL;
58
+ counts[label] = (counts[label] ?? 0) + count;
59
+ }
60
+ return counts;
61
+ }
62
+ /** The summary rebuilt from its known fields only, or null if any is missing or malformed. */
63
+ function cleanMeta(meta) {
64
+ if (typeof meta !== "object" || meta === null || Array.isArray(meta))
65
+ return null;
66
+ const record = { runtimeVersion: "unknown", ...meta };
67
+ const clean = {};
68
+ for (const key of expectedKeys()) {
69
+ const value = record[key];
70
+ const checkString = STRING_FIELDS[key];
71
+ if (checkString) {
72
+ if (typeof value !== "string" || !checkString(value))
73
+ return null;
74
+ clean[key] = value;
75
+ }
76
+ else if (key === "toolCalls") {
77
+ const counts = toolCounts(value);
78
+ if (!counts)
79
+ return null;
80
+ clean[key] = counts;
81
+ }
82
+ else if (isCount(value)) {
83
+ clean[key] = value;
84
+ }
85
+ else {
86
+ return null;
87
+ }
88
+ }
89
+ return clean;
90
+ }
91
+ function rowFromLine(line, context) {
92
+ // Cheap filter first: most lines are other events and are never parsed.
93
+ if (!line.includes(`"${EVENT}"`))
94
+ return { kind: "skip" };
95
+ let parsed;
96
+ try {
97
+ parsed = JSON.parse(line);
98
+ }
99
+ catch {
100
+ return { kind: "rejected", reason: "parse" };
101
+ }
102
+ const entry = parsed;
103
+ if (typeof parsed !== "object" || parsed === null || entry.event !== EVENT)
104
+ return { kind: "skip" };
105
+ const day = typeof entry.ts === "string" ? TIMESTAMP.exec(entry.ts)?.[1] : undefined;
106
+ const meta = cleanMeta(entry.meta);
107
+ if (!day || typeof entry.trace_id !== "string" || !meta)
108
+ return { kind: "rejected", reason: "schema" };
109
+ const turn = node_crypto_1.default.createHash("sha256").update(context.salt).update(entry.trace_id).digest("hex").slice(0, 16);
110
+ return { kind: "row", row: { day, turn, bundleCommitAtWatch: context.bundleCommitAtWatch, ...meta } };
111
+ }
112
+ function emptyCounts() {
113
+ return {
114
+ turns: 0, steps: 0, stepBudgetStops: 0, toolCalls: 0, toolErrors: 0, unknownToolCalls: 0, findToolsCalls: 0,
115
+ findToolsLoaded: 0, loadedThenCalled: 0, providerSwitches: 0, inputTokens: 0, outputTokens: 0, reasoningTokens: 0,
116
+ outcomes: {}, errorClasses: {},
117
+ };
118
+ }
119
+ function dailyCounts(rows) {
120
+ const days = {};
121
+ for (const row of rows) {
122
+ days[row.day] ??= {};
123
+ const counts = (days[row.day][row.channel] ??= emptyCounts());
124
+ counts.turns += 1;
125
+ counts.steps += row.steps;
126
+ counts.stepBudgetStops += row.stepBudgetExhausted;
127
+ counts.toolCalls += Object.values(row.toolCalls).reduce((sum, count) => sum + count, 0);
128
+ counts.toolErrors += row.toolErrors;
129
+ counts.unknownToolCalls += row.unknownToolCalls;
130
+ counts.findToolsCalls += row.findToolsCalls;
131
+ counts.findToolsLoaded += row.findToolsLoaded;
132
+ counts.loadedThenCalled += row.loadedThenCalled;
133
+ counts.providerSwitches += row.providerSwitches;
134
+ counts.inputTokens += row.inputTokens;
135
+ counts.outputTokens += row.outputTokens;
136
+ counts.reasoningTokens += row.reasoningTokens;
137
+ counts.outcomes[row.outcome] = (counts.outcomes[row.outcome] ?? 0) + 1;
138
+ if (row.errorClass !== "none")
139
+ counts.errorClasses[row.errorClass] = (counts.errorClasses[row.errorClass] ?? 0) + 1;
140
+ }
141
+ (0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.watch_counted", message: "Watch counted turn summaries", meta: { rows: rows.length } });
142
+ return days;
143
+ }
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.readBundleCommit = readBundleCommit;
7
+ exports.runWatch = runWatch;
8
+ /**
9
+ * One Watch run over a live agent's logs: read only the lines each nerves log gained since the last run, keep each
10
+ * `engine.turn_summary` as a private row, and return counts a day by channel.
11
+ *
12
+ * Watch reads logs and nothing else. It never opens a session file, sends nothing, starts no process and makes no
13
+ * model call. All its writes go through the guarded file access into its private folder: `cursor.json` (byte offsets,
14
+ * keyed by a salted hash of each log's path), `rows.ndjson` and `salt`. It reads a log in parts of at most `maxBytes`,
15
+ * checks its CPU before each part, stops after `cpuBudgetMs` of CPU and picks up where it stopped on the next run.
16
+ * A log it can't read is counted by error code and skipped; no path or message reaches the report. A failed or refused
17
+ * write to its private folder stops the run with an error.
18
+ */
19
+ const node_crypto_1 = __importDefault(require("node:crypto"));
20
+ const node_path_1 = __importDefault(require("node:path"));
21
+ const runtime_1 = require("../../nerves/runtime");
22
+ const log_reader_1 = require("./log-reader");
23
+ const rows_1 = require("./rows");
24
+ const COMMIT = /^[0-9a-f]{40}$/;
25
+ /** The bundle's checked-out commit, read from `.git` without running git; `unknown` if it can't be read. */
26
+ function readBundleCommit(gfs, agentRoot) {
27
+ const git = node_path_1.default.join(agentRoot, ".git");
28
+ const text = (file) => gfs.readWhole(file)?.toString("utf8") ?? "";
29
+ const head = text(node_path_1.default.join(git, "HEAD")).trim();
30
+ if (COMMIT.test(head))
31
+ return head;
32
+ const ref = /^ref: (refs\/[A-Za-z0-9._/-]+)$/.exec(head)?.[1];
33
+ if (!ref || ref.split("/").includes(".."))
34
+ return "unknown";
35
+ const loose = text(node_path_1.default.join(git, ref)).trim();
36
+ if (COMMIT.test(loose))
37
+ return loose;
38
+ for (const line of text(node_path_1.default.join(git, "packed-refs")).split("\n")) {
39
+ const [sha, name] = line.split(" ");
40
+ if (name === ref && COMMIT.test(sha))
41
+ return sha;
42
+ }
43
+ return "unknown";
44
+ }
45
+ /**
46
+ * Every nerves log of the agent, by its active name: the daemon's process logs and each sense's runtime log. A log
47
+ * that has just rotated may have only its generation 1 for now, so that names it too.
48
+ */
49
+ function activeLogs(gfs, agentRoot) {
50
+ const daemonLogs = node_path_1.default.join(agentRoot, "state", "daemon", "logs");
51
+ const senseLogs = node_path_1.default.join(agentRoot, "state", "logs");
52
+ const activeNames = (dir) => {
53
+ const names = new Set();
54
+ for (const name of gfs.list(dir)) {
55
+ const generationOne = /^(.+)\.1\.ndjson(\.gz)?$/.exec(name);
56
+ if (generationOne)
57
+ names.add(`${generationOne[1]}.ndjson`);
58
+ else if (name.endsWith(".ndjson") && !/\.\d+\.ndjson$/.test(name))
59
+ names.add(name);
60
+ }
61
+ return [...names].sort().map((name) => node_path_1.default.join(dir, name));
62
+ };
63
+ return [daemonLogs, ...gfs.list(senseLogs).map((dir) => node_path_1.default.join(senseLogs, dir))].flatMap(activeNames);
64
+ }
65
+ function loadSalt(gfs) {
66
+ const existing = gfs.readPrivate("salt");
67
+ if (existing && /^[0-9a-f]{64}$/.test(existing))
68
+ return existing;
69
+ const salt = node_crypto_1.default.randomBytes(32).toString("hex");
70
+ gfs.writePrivate("salt", salt);
71
+ return salt;
72
+ }
73
+ function loadCursors(gfs) {
74
+ try {
75
+ const parsed = JSON.parse(gfs.readPrivate("cursor.json") ?? "{}");
76
+ return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : {};
77
+ }
78
+ catch {
79
+ return {};
80
+ }
81
+ }
82
+ function errorCode(error) {
83
+ const code = error?.code;
84
+ return typeof code === "string" && /^[A-Z][A-Z0-9_]{0,31}$/.test(code) ? code : "other";
85
+ }
86
+ function runWatch(options) {
87
+ const { gfs, agentRoot } = options;
88
+ const cpuBudgetMs = options.cpuBudgetMs ?? 30_000;
89
+ const cpuUsedMs = options.cpuUsedMs ?? (() => {
90
+ const usage = process.cpuUsage();
91
+ return (usage.user + usage.system) / 1000;
92
+ });
93
+ const cpuAtStart = cpuUsedMs();
94
+ const salt = loadSalt(gfs);
95
+ const cursors = loadCursors(gfs);
96
+ const bundleCommitAtWatch = readBundleCommit(gfs, agentRoot);
97
+ const report = {
98
+ filesRead: 0, newTurns: 0, rejected: { parse: 0, schema: 0 }, gaps: 0, unreadable: {}, stoppedEarly: false,
99
+ bundleCommitKnown: bundleCommitAtWatch !== "unknown", days: {},
100
+ };
101
+ const rows = [];
102
+ let parts = 0;
103
+ const outOfCpu = () => parts > 0 && cpuUsedMs() - cpuAtStart >= cpuBudgetMs;
104
+ /** Reads one part of `file` and saves its rows and cursor: `more`, `done`, or `unreadable` (counted by code). */
105
+ const readPart = (file, key) => {
106
+ let result;
107
+ try {
108
+ result = (0, log_reader_1.readNewLines)(gfs, file, cursors[key], options.maxBytes);
109
+ }
110
+ catch (error) {
111
+ const code = errorCode(error);
112
+ report.unreadable[code] = (report.unreadable[code] ?? 0) + 1;
113
+ return "unreadable";
114
+ }
115
+ parts += 1;
116
+ const fileRows = [];
117
+ for (const line of result.lines) {
118
+ const parsed = (0, rows_1.rowFromLine)(line, { salt, bundleCommitAtWatch });
119
+ if (parsed.kind === "row")
120
+ fileRows.push(parsed.row);
121
+ else if (parsed.kind === "rejected")
122
+ report.rejected[parsed.reason] += 1;
123
+ }
124
+ // Rows first, then the cursor: a crash in between counts these turns again rather than losing them.
125
+ if (fileRows.length > 0)
126
+ gfs.appendPrivate("rows.ndjson", fileRows.map((row) => `${JSON.stringify(row)}\n`).join(""));
127
+ if (result.cursor)
128
+ cursors[key] = result.cursor;
129
+ else
130
+ delete cursors[key];
131
+ gfs.writePrivate("cursor.json", JSON.stringify(cursors));
132
+ rows.push(...fileRows);
133
+ if (result.gap)
134
+ report.gaps += 1;
135
+ return result.more ? "more" : "done";
136
+ };
137
+ files: for (const file of activeLogs(gfs, agentRoot)) {
138
+ const key = node_crypto_1.default.createHash("sha256").update(salt).update(node_path_1.default.relative(agentRoot, file)).digest("hex").slice(0, 32);
139
+ // Only reading a log is allowed to fail and be counted; a refused or failed private write stops the run.
140
+ let state = "more";
141
+ while (state === "more") {
142
+ if (outOfCpu()) {
143
+ report.stoppedEarly = true;
144
+ break files;
145
+ }
146
+ state = readPart(file, key);
147
+ }
148
+ if (state === "done")
149
+ report.filesRead += 1;
150
+ }
151
+ report.newTurns = rows.length;
152
+ report.days = (0, rows_1.dailyCounts)(rows);
153
+ (0, runtime_1.emitNervesEvent)({
154
+ component: "eval",
155
+ event: "eval.watch_run",
156
+ message: "Watch read an agent's logs",
157
+ meta: { filesRead: report.filesRead, newTurns: report.newTurns, gaps: report.gaps, stoppedEarly: report.stoppedEarly },
158
+ });
159
+ return report;
160
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ /**
7
+ * `npm run eval:watch -- --agent-root <path> [--out <folder>]`: one Watch run over a live agent's logs (see
8
+ * `watch/run-watch.ts` and `watch/cli.ts`). It reads the agent's nerves logs read-only, keeps private rows under
9
+ * `~/.ouro-eval/watch/<agent>/` (or `--out`), and prints counts a day by channel as JSON. It runs at the lowest CPU
10
+ * priority, refuses every write under `~/AgentBundles/` and the agent's folder, sends nothing and makes no model call.
11
+ * A scheduler should run `nice -n 19 node dist/eval/watch-entry.js` on a built tree: the npm script builds first.
12
+ */
13
+ const node_os_1 = __importDefault(require("node:os"));
14
+ const runtime_1 = require("../nerves/runtime");
15
+ const cli_1 = require("./watch/cli");
16
+ (0, cli_1.lowerPriority)();
17
+ const code = (0, cli_1.watchCli)(process.argv.slice(2), {
18
+ stdout: (text) => process.stdout.write(text),
19
+ stderr: (text) => process.stderr.write(text),
20
+ homedir: node_os_1.default.homedir(),
21
+ });
22
+ // stderr's last line names the failure for a script: 2 bad arguments, 1 a run that was refused or failed.
23
+ if (code !== 0)
24
+ process.stderr.write(`code: ${code === 2 ? "usage" : "watch-failed"}\n`);
25
+ (0, runtime_1.emitNervesEvent)({ component: "eval", event: "eval.watch_entry_exit", message: "Watch's command finished", meta: { code } });
26
+ process.exitCode = code;
@@ -155,6 +155,10 @@ exports.ENTRY_POINT_COMMANDS = [
155
155
  { code: "budget-stopped", means: "The study stopped: a session's reservation would pass a cap, or the provider answered 402 or 429. Later sessions are recorded as not run.", fix: "Read the counts on stdout; the study stays stopped, since a session that didn't run counts as ouro not chosen first." },
156
156
  { code: "eval-error", means: "The interviews refused to start (a bad flag, sandbox or target, a host lock already held by another holder or lost mid-run, or a session not allowed or already started) or failed after starting.", fix: "Read the `interviews:` line on stderr; sessions it began are in the started file and can't run again, so name the others with --session." },
157
157
  ] } },
158
+ { name: "node dist/eval/watch-entry.js", effect: "private", summary: "Count a live agent's turns from its logs.", ax: { id: "cli:node dist/eval/watch-entry.js", group: "diagnostics", effect: "write", when: "See how a running agent's turns went by day and channel; it reads only new log lines and keeps its private rows outside the bundle.", errors: [
159
+ { code: "usage", means: "Watch was started without --agent-root.", fix: "Pass --agent-root with the agent's bundle folder, such as ~/AgentBundles/<agent>.ouro." },
160
+ { code: "watch-failed", means: "Watch refused or failed: its --out folder is inside a bundle or holds other files, a private file is a link, or a private write failed. The line above names only an error code.", fix: "Point --out at an empty folder outside ~/AgentBundles, or remove the link from the private folder, and run again." },
161
+ ] } },
158
162
  { name: "node dist/senses/shepherd/judge-evaluation-entry.js", effect: "private", summary: "Evaluate Shepherd's judge on its cases.", ax: { id: "cli:node dist/senses/shepherd/judge-evaluation-entry.js", group: "diagnostics", effect: "write", when: "Measure how Shepherd's judge classifies its evaluation cases, writing a report; it never qualifies v1 on its own.", errors: [
159
163
  { code: "not-passed", means: "The Shepherd judge evaluation finished, but its classification didn't pass or closing its report threw.", fix: "Read the JSON summary on stdout and the report for the failing cases." },
160
164
  { code: "evaluation-error", means: "The Shepherd judge evaluation stopped before running a case (bad arguments, an output that exists already, no judge for the agent, or a bad case corpus), or writing its report threw.", fix: "Read the error in the JSON on stdout, fix it, and run again with a new --output path." },
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.TurnTally = exports.UNKNOWN_TOOL = exports.TURN_SUMMARY_CHANNELS = exports.ERROR_CLASSES_COVERED = exports.TURN_SUMMARY_ERROR_CLASSES = exports.RUN_AGENT_OUTCOMES_COVERED = exports.TURN_SUMMARY_OUTCOMES = void 0;
4
7
  exports.tallyToolEnds = tallyToolEnds;
8
+ exports.readRuntimeVersion = readRuntimeVersion;
5
9
  exports.emitTurnSummary = emitTurnSummary;
10
+ const node_fs_1 = __importDefault(require("node:fs"));
11
+ const node_path_1 = __importDefault(require("node:path"));
6
12
  const runtime_1 = require("../nerves/runtime");
7
13
  const tool_catalog_1 = require("../repertoire/tool-catalog");
8
14
  /** Every value `runAgent` can end with; `RunAgentOutcome` in core.ts must stay a subset (a test pins it). */
@@ -126,6 +132,7 @@ class TurnTally {
126
132
  errorClass,
127
133
  provider: safeLabel(this.provider),
128
134
  model: safeLabel(this.model),
135
+ runtimeVersion: runtimeVersion(),
129
136
  providerSwitches: this.switches,
130
137
  steps: this.steps,
131
138
  stepBudgetExhausted: this.budgetStops,
@@ -170,6 +177,21 @@ function tallyToolEnds(callbacks, tally) {
170
177
  },
171
178
  });
172
179
  }
180
+ /** The harness's version from its package.json, `unknown` if it can't be read. */
181
+ function readRuntimeVersion(read = () => node_fs_1.default.readFileSync(node_path_1.default.resolve(__dirname, "../../package.json"), "utf8")) {
182
+ try {
183
+ const version = JSON.parse(read()).version;
184
+ return typeof version === "string" ? safeLabel(version) : "unknown";
185
+ }
186
+ catch {
187
+ return "unknown";
188
+ }
189
+ }
190
+ let cachedRuntimeVersion;
191
+ function runtimeVersion() {
192
+ cachedRuntimeVersion ??= readRuntimeVersion();
193
+ return cachedRuntimeVersion;
194
+ }
173
195
  /** Provider and model ids come from configuration; anything that doesn't look like an id is replaced. */
174
196
  function safeLabel(value) {
175
197
  return /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,79}$/.test(value) ? value : "other";
@@ -184,6 +206,7 @@ function emitTurnSummary(tally, input) {
184
206
  trace_id: input.traceId,
185
207
  component: "engine",
186
208
  message: "turn summary (counts only)",
209
+ alwaysLog: true,
187
210
  meta: tally.summarize(input),
188
211
  });
189
212
  }
@@ -28,7 +28,10 @@ function emitNervesEvent(event) {
28
28
  meta: event.meta ?? {},
29
29
  };
30
30
  const level = event.level ?? "info";
31
- if (level === "debug") {
31
+ if (event.alwaysLog && typeof logger.emitDurable === "function") {
32
+ logger.emitDurable(level, payload);
33
+ }
34
+ else if (level === "debug") {
32
35
  logger.debug(payload);
33
36
  }
34
37
  else if (level === "warn") {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1475",
3
+ "version": "0.1.0-alpha.1476",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1475",
9
+ "version": "0.1.0-alpha.1476",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1475",
3
+ "version": "0.1.0-alpha.1476",
4
4
  "description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
5
5
  "homepage": "https://ouroboros.bot/",
6
6
  "engines": {
@@ -41,6 +41,7 @@
41
41
  "test": "vitest run",
42
42
  "test:integration": "npm run build && vitest run --config vitest.integration.config.ts",
43
43
  "eval": "npm run build && node dist/eval/run-entry.js",
44
+ "eval:watch": "npm run build && node dist/eval/watch-entry.js",
44
45
  "interviews": "npm run build && node dist/eval/interview-entry.js",
45
46
  "test:eval-sandbox": "npm run build && vitest run --config vitest.eval.config.ts",
46
47
  "test:e2e:package": "npm run build && node scripts/package-e2e.cjs",