@rulvar/cli 1.39.0 → 1.40.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 +1 -1
- package/dist/index.js +3 -2
- package/dist/{io-Dubf-yvE.js → io-C2rsgBE4.js} +3 -3
- package/package.json +7 -7
package/dist/cli.js
CHANGED
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-
|
|
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-C2rsgBE4.js";
|
|
2
2
|
import { ConfigError, InvalidResolutionError, JournalCompatibilityError, LeaseHeldError, Replayer, RulvarError, buildDeriverRegistry, costReportFromJournal, maskSecrets, normalizeEntry, readRunMeta, scanJournalCompatibility, validateSchemaSpec } from "@rulvar/core";
|
|
3
3
|
//#region src/server.ts
|
|
4
4
|
/**
|
|
@@ -416,7 +416,8 @@ function createServer(options) {
|
|
|
416
416
|
runId,
|
|
417
417
|
store: journal,
|
|
418
418
|
now: wallClock,
|
|
419
|
-
priorEntries: entries
|
|
419
|
+
priorEntries: entries,
|
|
420
|
+
...lease === void 0 ? {} : { lease }
|
|
420
421
|
});
|
|
421
422
|
const target = entries.find((entry) => suspensionKeyOf(entry) === key);
|
|
422
423
|
if (target === void 0) return json(404, { error: {
|
|
@@ -197,14 +197,14 @@ function rawEventLine(event) {
|
|
|
197
197
|
case "run:start": return `run ${str(event.runId)} ${event.resumed === true ? "resumed" : "started"} (workflow ${str(event.workflow)})`;
|
|
198
198
|
case "phase:start": return `phase ${str(event.phase)}`;
|
|
199
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)`;
|
|
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)${event.usageApprox === true ? " approx" : ""}`;
|
|
201
201
|
case "agent:error": return `agent ${who} error: ${str(event.error?.message)}${event.willRetry === true ? " (will retry)" : ""}`;
|
|
202
202
|
case "agent:queued": return `agent ${who} queued`;
|
|
203
203
|
case "tool:start": return `${replayMark}tool ${str(event.toolName)}`;
|
|
204
204
|
case "tool:end": return `${replayMark}tool ${str(event.toolName)} ${str(event.outcome)} (${String(num(event.durationMs))}ms)`;
|
|
205
205
|
case "approval:pending": return `approval pending: tool ${str(event.toolName)} (entry ${String(num(event.entryRef))})`;
|
|
206
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)}`;
|
|
207
|
+
case "run:end": return `run ${str(event.runId)} ${str(event.status)}${event.usageApprox === true ? " (cost approx)" : ""}`;
|
|
208
208
|
default: return;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
@@ -353,7 +353,7 @@ function reportOutcome(outcome, io) {
|
|
|
353
353
|
if (outcome.error !== void 0) io.err(`error: ${sanitizeTerminalText(outcome.error.message)}`);
|
|
354
354
|
if (outcome.dropped.length > 0) io.err(`dropped: ${outcome.dropped.length} item(s)`);
|
|
355
355
|
for (const pending of outcome.pending) io.err(`pending: ${sanitizeTerminalText(pending.key)} (entry ${pending.entryRef})`);
|
|
356
|
-
io.err(`cost: $${outcome.cost.totalUsd.toFixed(4)}`);
|
|
356
|
+
io.err(`cost: $${outcome.cost.totalUsd.toFixed(4)}${outcome.cost.usageApprox === true ? " (approximate: some usage was estimated, not reported by the provider)" : ""}`);
|
|
357
357
|
for (const [model, usd] of Object.entries(outcome.cost.byModel)) io.err(` by model ${sanitizeTerminalText(model)}: $${usd.toFixed(4)}`);
|
|
358
358
|
for (const [phase, usd] of Object.entries(outcome.cost.byPhase)) if (phase !== "") io.err(` by phase ${sanitizeTerminalText(phase)}: $${usd.toFixed(4)}`);
|
|
359
359
|
if (outcome.cost.unpriced.length > 0) io.err(`unpriced models: ${outcome.cost.unpriced.map((u) => sanitizeTerminalText(u.model)).join(", ")}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.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.
|
|
25
|
+
"@rulvar/core": "1.40.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/
|
|
32
|
-
"@rulvar/
|
|
33
|
-
"@rulvar/
|
|
34
|
-
"@rulvar/
|
|
35
|
-
"@rulvar/evals": "1.
|
|
31
|
+
"@rulvar/testing": "1.40.0",
|
|
32
|
+
"@rulvar/store-sqlite": "1.40.0",
|
|
33
|
+
"@rulvar/planner": "1.40.0",
|
|
34
|
+
"@rulvar/plan": "1.40.0",
|
|
35
|
+
"@rulvar/evals": "1.40.0"
|
|
36
36
|
},
|
|
37
37
|
"bin": {
|
|
38
38
|
"rulvar": "./dist/cli.js"
|