@rulvar/cli 1.209.0 → 1.210.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 +1 -1
- package/dist/{io-CAD1flsO.js → io-BatQdCln.js} +28 -0
- package/package.json +7 -7
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as assembleEngine, a as inspectCommand, b as looksLikeFile, c as resumeCommand, d as driveRun, f as reportOutcome, g as DEFAULT_STORE_DIR, h as renderEventLine, i as costAuditCommand, l as runCommand, m as attachProgress, n as HELP, o as invoiceCommand, p as strictExitCode, r as runCli, s as preflightCommand, t as processIo, u as runsLsCommand, v as loadCliConfig, y as loadWorkflowModule } from "./io-
|
|
1
|
+
import { _ as assembleEngine, a as inspectCommand, b as looksLikeFile, c as resumeCommand, d as driveRun, f as reportOutcome, g as DEFAULT_STORE_DIR, h as renderEventLine, i as costAuditCommand, l as runCommand, m as attachProgress, n as HELP, o as invoiceCommand, p as strictExitCode, r as runCli, s as preflightCommand, t as processIo, u as runsLsCommand, v as loadCliConfig, y as loadWorkflowModule } from "./io-BatQdCln.js";
|
|
2
2
|
import { ConfigError, JournalCompatibilityError, LeaseHeldError, Replayer, RulvarError, buildDeriverRegistry, compileSecretMasker, costReportFromJournal, journalPricingSnapshot, maskSecrets, normalizeEntry, persistedTerminalEnvelope, readRunMeta, scanJournalCompatibility, validateDetachedResolution } from "@rulvar/core";
|
|
3
3
|
//#region src/server.ts
|
|
4
4
|
/**
|
|
@@ -1316,6 +1316,29 @@ async function costAuditCommand(argv, context) {
|
|
|
1316
1316
|
const settle = [...entries].reverse().find((entry) => entry.kind === "decision" && entry.value?.decisionType === "run_settle");
|
|
1317
1317
|
const agentsAfterSettle = settle === void 0 ? [] : entries.filter((entry) => entry.kind === "agent" && entry.seq > settle.seq);
|
|
1318
1318
|
const grossDelta = Math.abs(report.grossUsd - invoice.totalUsd);
|
|
1319
|
+
const usageKey = (usage) => [
|
|
1320
|
+
usage.inputTokens,
|
|
1321
|
+
usage.outputTokens,
|
|
1322
|
+
usage.cacheReadTokens,
|
|
1323
|
+
usage.cacheWriteTokens
|
|
1324
|
+
].join(":");
|
|
1325
|
+
const incrementalByAgent = /* @__PURE__ */ new Map();
|
|
1326
|
+
for (const entry of entries) {
|
|
1327
|
+
if (entry.kind !== "decision") continue;
|
|
1328
|
+
const value = entry.value;
|
|
1329
|
+
if (value?.decisionType !== "provider-call" || typeof value.agentRef !== "number" || typeof value.record?.ordinal !== "number" || value.record.usage === void 0) continue;
|
|
1330
|
+
const byOrdinal = incrementalByAgent.get(value.agentRef) ?? /* @__PURE__ */ new Map();
|
|
1331
|
+
byOrdinal.set(value.record.ordinal, usageKey(value.record.usage));
|
|
1332
|
+
incrementalByAgent.set(value.agentRef, byOrdinal);
|
|
1333
|
+
}
|
|
1334
|
+
const incrementalMismatches = [];
|
|
1335
|
+
for (const terminal of entries) {
|
|
1336
|
+
if (terminal.kind !== "agent" || terminal.status === "running" || terminal.ref === void 0) continue;
|
|
1337
|
+
const incremental = incrementalByAgent.get(terminal.ref);
|
|
1338
|
+
if (incremental === void 0 || incremental.size === 0) continue;
|
|
1339
|
+
const records = terminal.providerCalls ?? [];
|
|
1340
|
+
if (!(records.length === incremental.size && records.every((record) => incremental.get(record.ordinal) === usageKey(record.usage)))) incrementalMismatches.push(terminal.ref);
|
|
1341
|
+
}
|
|
1319
1342
|
const checks = [
|
|
1320
1343
|
{
|
|
1321
1344
|
name: "roster-closed",
|
|
@@ -1341,6 +1364,11 @@ async function costAuditCommand(argv, context) {
|
|
|
1341
1364
|
name: "wires-match",
|
|
1342
1365
|
pass: (report.wireRequests ?? -1) === invoice.cardinality.wireRequests,
|
|
1343
1366
|
detail: `fold wires ${String(report.wireRequests ?? "absent")} vs invoice wires ${String(invoice.cardinality.wireRequests)}`
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
name: "incremental-rows-match",
|
|
1370
|
+
pass: incrementalMismatches.length === 0,
|
|
1371
|
+
detail: incrementalMismatches.length === 0 ? "every terminal dispatch set equals its incremental rows (RV2008; absent rows pass)" : `terminal dispatch sets diverge from the incremental rows for agent seq ${incrementalMismatches.join(", ")}`
|
|
1344
1372
|
}
|
|
1345
1373
|
];
|
|
1346
1374
|
const failed = checks.filter((check) => !check.pass);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.210.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.210.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.20.1",
|
|
29
29
|
"tsdown": "^0.22.14",
|
|
30
30
|
"typescript": "~6.0.3",
|
|
31
|
-
"@rulvar/
|
|
32
|
-
"@rulvar/
|
|
33
|
-
"@rulvar/
|
|
34
|
-
"@rulvar/
|
|
35
|
-
"@rulvar/
|
|
31
|
+
"@rulvar/testing": "1.210.0",
|
|
32
|
+
"@rulvar/store-sqlite": "1.210.0",
|
|
33
|
+
"@rulvar/plan": "1.210.0",
|
|
34
|
+
"@rulvar/planner": "1.210.0",
|
|
35
|
+
"@rulvar/evals": "1.210.0"
|
|
36
36
|
},
|
|
37
37
|
"bin": {
|
|
38
38
|
"rulvar": "./dist/cli.js"
|