@rulvar/cli 1.228.0 → 1.229.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.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/{io-BhEqrNZg.js → io-gaixYC7a.js} +24 -1
- package/package.json +7 -7
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -240,6 +240,14 @@ declare function reportOutcome(outcome: RunOutcome<unknown>, io: CliIo): number;
|
|
|
240
240
|
* pass through unchanged, so the flag never masks the ordinary status
|
|
241
241
|
* exit and never bites a plain workflow.
|
|
242
242
|
*
|
|
243
|
+
* Completion answers for the CHILDREN, never for the artifact, so
|
|
244
|
+
* strict also reads the deliverable verdict (RV2604): a
|
|
245
|
+
* `deliverableAccepted: false` exits nonzero even under a green
|
|
246
|
+
* completion, the row the twenty-fifth comparison run landed on when
|
|
247
|
+
* its child roster passed and its declared contract refused every
|
|
248
|
+
* synthesis. An ABSENT verdict is left alone, because nothing judged
|
|
249
|
+
* anything and a host that declares no contract is its own judge.
|
|
250
|
+
*
|
|
243
251
|
* Completion is a MECHANICAL verdict, and the eighteenth comparison
|
|
244
252
|
* benchmark showed how easily `completion: 'complete'` reads as
|
|
245
253
|
* semantic green while the claim judge saw 40 of 144 citing sentences.
|
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-gaixYC7a.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
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigError, FileModelKnowledgeStore, INBOX_PROPOSAL_TTL_DAYS, JsonlFileStore, LeaseHeldError, auditRuns, claimCoverageOf, claimExpired, claimExpiry, compilePermissionPreset, costReportFromJournal, createEngine, hashRunArgs, hashRunOutput, invoiceFromJournal, journalPricingSnapshot, lastRunSettle, parseModelRef, preflightEstimate, priceUsdOf, proposalStatement, readRunMeta, reconcileRunMeta, remeasureQueue, resolvePricing, runProfile, sanitizeTerminalText } from "@rulvar/core";
|
|
1
|
+
import { ConfigError, FileModelKnowledgeStore, INBOX_PROPOSAL_TTL_DAYS, JsonlFileStore, LeaseHeldError, auditRuns, claimCoverageOf, claimExpired, claimExpiry, compilePermissionPreset, costReportFromJournal, createEngine, hashRunArgs, hashRunOutput, invoiceFromJournal, journalPricingSnapshot, lastRunSettle, logicalRunTelemetry, parseModelRef, preflightEstimate, priceUsdOf, proposalStatement, readRunMeta, reconcileRunMeta, remeasureQueue, resolvePricing, runProfile, sanitizeTerminalText } from "@rulvar/core";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
3
|
import { existsSync, statSync } from "node:fs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -427,6 +427,14 @@ function coverageGradeOf(value) {
|
|
|
427
427
|
* pass through unchanged, so the flag never masks the ordinary status
|
|
428
428
|
* exit and never bites a plain workflow.
|
|
429
429
|
*
|
|
430
|
+
* Completion answers for the CHILDREN, never for the artifact, so
|
|
431
|
+
* strict also reads the deliverable verdict (RV2604): a
|
|
432
|
+
* `deliverableAccepted: false` exits nonzero even under a green
|
|
433
|
+
* completion, the row the twenty-fifth comparison run landed on when
|
|
434
|
+
* its child roster passed and its declared contract refused every
|
|
435
|
+
* synthesis. An ABSENT verdict is left alone, because nothing judged
|
|
436
|
+
* anything and a host that declares no contract is its own judge.
|
|
437
|
+
*
|
|
430
438
|
* Completion is a MECHANICAL verdict, and the eighteenth comparison
|
|
431
439
|
* benchmark showed how easily `completion: 'complete'` reads as
|
|
432
440
|
* semantic green while the claim judge saw 40 of 144 citing sentences.
|
|
@@ -453,6 +461,10 @@ function strictExitCode(outcome, base, io) {
|
|
|
453
461
|
for (const reason of reasons.filter((entry) => typeof entry === "string")) io.err(` ${sanitizeTerminalText(reason)}`);
|
|
454
462
|
return 1;
|
|
455
463
|
}
|
|
464
|
+
if (outcome.deliverableAccepted === false) {
|
|
465
|
+
io.err("strict: the declared finish contract did not accept the artifact this run settled on" + (outcome.resultAvailable === false ? ", and the terminal carries no artifact at all" : ""));
|
|
466
|
+
return 1;
|
|
467
|
+
}
|
|
456
468
|
const grade = coverageGradeOf(value);
|
|
457
469
|
if (grade === "judge-failed" || grade === "judge-declined" || grade === "critical-uncovered") {
|
|
458
470
|
io.err(`strict: claim coverage '${grade}': ` + (grade === "judge-failed" ? "the claim-consistency judge did not settle ok, so nothing was judged" : grade === "judge-declined" ? "the claim-consistency judge was refused admission and never dispatched, so nothing was judged" : "declared critical anchors got no judged pair"));
|
|
@@ -1209,6 +1221,17 @@ async function inspectCommand(argv, context) {
|
|
|
1209
1221
|
context.io.out(`entries: ${entries.length}`);
|
|
1210
1222
|
for (const [kind, count] of [...byKind.entries()].sort((a, b) => a[0].localeCompare(b[0]))) context.io.out(` ${kind}: ${count}`);
|
|
1211
1223
|
context.io.out(`open suspensions: ${openSuspensions}`);
|
|
1224
|
+
const logical = logicalRunTelemetry(entries);
|
|
1225
|
+
if (logical.segments > 0) {
|
|
1226
|
+
context.io.out(`segments: ${logical.segments} (${logical.statuses.map((status, index) => `${sanitizeTerminalText(status)} after ${String(logical.entriesPerSegment[index] ?? 0)}`).join(", ")})`);
|
|
1227
|
+
if (logical.entriesAfterLastSettle > 0) context.io.out(` entries after the last settle: ${logical.entriesAfterLastSettle}`);
|
|
1228
|
+
}
|
|
1229
|
+
const rejected = lastRunSettle(entries)?.rejectedFinishCandidates ?? [];
|
|
1230
|
+
if (rejected.length > 0) {
|
|
1231
|
+
const distinct = new Set(rejected.map((row) => row.hash)).size;
|
|
1232
|
+
context.io.out(`rejected finish candidates: ${rejected.length}` + (distinct === rejected.length ? "" : ` (${distinct} distinct document(s))`));
|
|
1233
|
+
for (const row of rejected) context.io.out(` ${sanitizeTerminalText(row.verdict)} ${sanitizeTerminalText(row.callId)}: ${row.chars} chars, sha256 ${row.hash.slice(0, 12)}, failed ${row.failed.map((entry) => sanitizeTerminalText(entry.name)).join(", ")}` + (row.ref === void 0 ? "" : ` (bytes at ${sanitizeTerminalText(row.ref)})`));
|
|
1234
|
+
}
|
|
1212
1235
|
const inspectSnapshot = journalPricingSnapshot(entries);
|
|
1213
1236
|
const cost = costReportFromJournal(entries, inspectSnapshot === void 0 ? assembled.priceUsd : inspectSnapshot.composedPriceUsd(assembled.priceUsd));
|
|
1214
1237
|
context.io.out(`cost: $${cost.totalUsd.toFixed(4)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.229.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.229.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/store-sqlite": "1.
|
|
32
|
-
"@rulvar/
|
|
33
|
-
"@rulvar/
|
|
34
|
-
"@rulvar/
|
|
35
|
-
"@rulvar/
|
|
31
|
+
"@rulvar/store-sqlite": "1.229.0",
|
|
32
|
+
"@rulvar/testing": "1.229.0",
|
|
33
|
+
"@rulvar/planner": "1.229.0",
|
|
34
|
+
"@rulvar/plan": "1.229.0",
|
|
35
|
+
"@rulvar/evals": "1.229.0"
|
|
36
36
|
},
|
|
37
37
|
"bin": {
|
|
38
38
|
"rulvar": "./dist/cli.js"
|