@rulvar/cli 1.22.0 → 1.23.0

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { r as runCli, t as processIo } from "./io-RtHEIn0r.js";
2
+ import { r as runCli, t as processIo } from "./io-Dh-Fa5Nf.js";
3
3
  import { inspect } from "node:util";
4
4
  //#region src/cli.ts
5
5
  /**
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as resumeCommand, c as driveRun, d as renderEventLine, f as DEFAULT_STORE_DIR, g as looksLikeFile, h as loadWorkflowModule, i as inspectCommand, l as reportOutcome, m as loadCliConfig, n as HELP, o as runCommand, p as assembleEngine, r as runCli, s as runsLsCommand, t as processIo, u as attachProgress } from "./io-RtHEIn0r.js";
1
+ import { a as resumeCommand, c as driveRun, d as renderEventLine, f as DEFAULT_STORE_DIR, g as looksLikeFile, h as loadWorkflowModule, i as inspectCommand, l as reportOutcome, m as loadCliConfig, n as HELP, o as runCommand, p as assembleEngine, r as runCli, s as runsLsCommand, t as processIo, u as attachProgress } from "./io-Dh-Fa5Nf.js";
2
2
  import { ConfigError, InvalidResolutionError, JournalCompatibilityError, LeaseHeldError, Replayer, RulvarError, buildDeriverRegistry, costReportFromJournal, maskSecrets, normalizeEntry, scanJournalCompatibility, validateSchemaSpec } from "@rulvar/core";
3
3
  //#region src/server.ts
4
4
  /**
@@ -190,18 +190,21 @@ function renderEventLine(event) {
190
190
  }
191
191
  function rawEventLine(event) {
192
192
  const replayMark = event.replayed === true ? "replay " : "";
193
+ const str = (value) => typeof value === "string" ? value : "";
194
+ const num = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
195
+ const who = str(event.agentType) || "(anon)";
193
196
  switch (event.type) {
194
- case "run:start": return `run ${event.runId} ${event.resumed ? "resumed" : "started"} (workflow ${event.workflow})`;
195
- case "phase:start": return `phase ${event.phase}`;
196
- case "agent:start": return `${replayMark}agent ${event.agentType || "(anon)"}${event.label === void 0 ? "" : ` [${event.label}]`} ${event.role} on ${event.model}`;
197
- case "agent:end": return `${replayMark}agent ${event.agentType || "(anon)"} ${event.status} (${money(event.costUsd)}, ${event.usage.inputTokens + event.usage.outputTokens} tok)`;
198
- case "agent:error": return `agent ${event.agentType || "(anon)"} error: ${event.error.message}${event.willRetry ? " (will retry)" : ""}`;
199
- case "agent:queued": return `agent ${event.agentType || "(anon)"} queued`;
200
- case "tool:start": return `${replayMark}tool ${event.toolName}`;
201
- case "tool:end": return `${replayMark}tool ${event.toolName} ${event.outcome} (${event.durationMs}ms)`;
202
- case "approval:pending": return `approval pending: tool ${event.toolName} (entry ${event.entryRef})`;
203
- case "log": return event.level === "debug" ? void 0 : `${event.level}: ${event.msg}`;
204
- case "run:end": return `run ${event.runId} ${event.status}`;
197
+ case "run:start": return `run ${str(event.runId)} ${event.resumed === true ? "resumed" : "started"} (workflow ${str(event.workflow)})`;
198
+ case "phase:start": return `phase ${str(event.phase)}`;
199
+ case "agent:start": return `${replayMark}agent ${who}${str(event.label) === "" ? "" : ` [${str(event.label)}]`} ${str(event.role)} on ${str(event.model)}`;
200
+ case "agent:end": return `${replayMark}agent ${who} ${str(event.status)} (${money(num(event.costUsd))}, ${String(num(event.usage?.inputTokens) + num(event.usage?.outputTokens))} tok)`;
201
+ case "agent:error": return `agent ${who} error: ${str(event.error?.message)}${event.willRetry === true ? " (will retry)" : ""}`;
202
+ case "agent:queued": return `agent ${who} queued`;
203
+ case "tool:start": return `${replayMark}tool ${str(event.toolName)}`;
204
+ case "tool:end": return `${replayMark}tool ${str(event.toolName)} ${str(event.outcome)} (${String(num(event.durationMs))}ms)`;
205
+ case "approval:pending": return `approval pending: tool ${str(event.toolName)} (entry ${String(num(event.entryRef))})`;
206
+ case "log": return event.level === "debug" ? void 0 : `${str(event.level)}: ${str(event.msg)}`;
207
+ case "run:end": return `run ${str(event.runId)} ${str(event.status)}`;
205
208
  default: return;
206
209
  }
207
210
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/cli",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "description": "Rulvar shell: run/resume/runs/inspect/plan/kb commands, TUI progress, createServer, createWorker, OTel exporter.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -22,17 +22,17 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@rulvar/core": "1.22.0"
25
+ "@rulvar/core": "1.23.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.20.0",
29
29
  "tsdown": "^0.22.3",
30
30
  "typescript": "~6.0.3",
31
- "@rulvar/planner": "1.22.0",
32
- "@rulvar/plan": "1.22.0",
33
- "@rulvar/store-sqlite": "1.22.0",
34
- "@rulvar/evals": "1.22.0",
35
- "@rulvar/testing": "1.22.0"
31
+ "@rulvar/testing": "1.23.0",
32
+ "@rulvar/store-sqlite": "1.23.0",
33
+ "@rulvar/planner": "1.23.0",
34
+ "@rulvar/plan": "1.23.0",
35
+ "@rulvar/evals": "1.23.0"
36
36
  },
37
37
  "bin": {
38
38
  "rulvar": "./dist/cli.js"