@riddledc/riddle-proof 0.7.188 → 0.7.189
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.cjs +76 -0
- package/dist/cli.js +76 -0
- package/dist/proof-run-engine.d.cts +3 -3
- package/dist/proof-run-engine.d.ts +3 -3
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -16424,6 +16424,50 @@ function profileHasOfflineAudioMetricsReceipt(receipts) {
|
|
|
16424
16424
|
return value !== void 0 && value > 0;
|
|
16425
16425
|
}));
|
|
16426
16426
|
}
|
|
16427
|
+
function profileHasActiveRouteLocalProofReceipt(receipts) {
|
|
16428
|
+
return receipts.some((receipt) => {
|
|
16429
|
+
const route = cliString(setupReturnSummaryValue(receipt, ["route", "browserPath", "path"]));
|
|
16430
|
+
if (!route) return false;
|
|
16431
|
+
const proofVersion = cliString(setupReturnSummaryValue(receipt, ["proofVersion", "proof_version", "proofKind", "proof_kind"]));
|
|
16432
|
+
const globalCount = cliFiniteNumber(setupReturnSummaryValue(receipt, ["globalCount", "activeGlobalCount", "activeGlobals.length"]));
|
|
16433
|
+
const globalNames = setupReturnSummaryValue(receipt, ["globalNames", "activeGlobals"]);
|
|
16434
|
+
const enabled = setupReturnSummaryValue(receipt, ["enabled", "proofEnabled", "proof_enabled"]) === true;
|
|
16435
|
+
const ready = setupReturnSummaryValue(receipt, ["ready", "proofReady", "proof_ready"]) === true;
|
|
16436
|
+
const supportsProofFeature = setupReturnSummaryValue(receipt, ["supportsOfflineAudio", "supportsProof", "proofSupported"]) === true;
|
|
16437
|
+
return Boolean(
|
|
16438
|
+
proofVersion || enabled || ready || supportsProofFeature || globalCount !== void 0 && globalCount > 0 || Array.isArray(globalNames) && globalNames.length > 0
|
|
16439
|
+
);
|
|
16440
|
+
});
|
|
16441
|
+
}
|
|
16442
|
+
function profileLowerSummaryValue(receipt, names) {
|
|
16443
|
+
return names.map((name) => cliString(setupReturnSummaryValue(receipt, [name]))?.toLowerCase()).find((value) => Boolean(value)) || "";
|
|
16444
|
+
}
|
|
16445
|
+
function profileHasTerminalLossReceipt(receipts) {
|
|
16446
|
+
return receipts.some((receipt) => {
|
|
16447
|
+
const status = profileLowerSummaryValue(receipt, ["status", "state", "phase"]);
|
|
16448
|
+
const outcome = profileLowerSummaryValue(receipt, ["lastOutcome", "outcome", "terminalOutcome", "terminal"]);
|
|
16449
|
+
const lastFlightLost = setupReturnSummaryValue(receipt, ["lastFlightLost", "lost"]) === true;
|
|
16450
|
+
const outOfBounds = setupReturnSummaryValue(receipt, ["lastFlightOutOfBounds", "outOfBounds"]) === true;
|
|
16451
|
+
const storedTo = cliString(receipt.return_stored_to) || "";
|
|
16452
|
+
const label = cliString(receipt.label) || "";
|
|
16453
|
+
const path7 = cliString(receipt.path) || cliString(receipt.function_name) || "";
|
|
16454
|
+
const haystack = `${storedTo} ${label} ${path7}`.toLowerCase();
|
|
16455
|
+
const labelsLoss = haystack.includes("loss") || haystack.includes("lost") || haystack.includes("terminal");
|
|
16456
|
+
if (!labelsLoss && !lastFlightLost && !outOfBounds) return false;
|
|
16457
|
+
return lastFlightLost || outOfBounds || ["over", "lost", "loss", "failed", "failure", "game_over", "gameover"].includes(status) || ["lost", "loss", "failed", "failure", "game_over", "gameover"].includes(outcome);
|
|
16458
|
+
});
|
|
16459
|
+
}
|
|
16460
|
+
function profileHasControlledLaunchReceipt(receipts, expected) {
|
|
16461
|
+
return receipts.some((receipt) => {
|
|
16462
|
+
const shotKind = profileLowerSummaryValue(receipt, ["lastShotKind", "shotKind", "kind"]);
|
|
16463
|
+
const shotStatus = profileLowerSummaryValue(receipt, ["lastShotStatus", "shotStatus"]);
|
|
16464
|
+
const outcome = profileLowerSummaryValue(receipt, ["lastOutcome", "outcome"]);
|
|
16465
|
+
if (expected === "success") {
|
|
16466
|
+
return shotKind === "success" && (!shotStatus || shotStatus === "success" || outcome === "success");
|
|
16467
|
+
}
|
|
16468
|
+
return ["failure", "failed", "miss", "lost", "loss"].includes(shotKind) || ["failure", "failed", "miss", "lost", "loss"].includes(shotStatus) || ["failure", "failed", "miss", "lost", "loss"].includes(outcome);
|
|
16469
|
+
});
|
|
16470
|
+
}
|
|
16427
16471
|
function profilePackReceiptStatus(result, metadata, receipt) {
|
|
16428
16472
|
const text = receipt.toLowerCase();
|
|
16429
16473
|
const setupSummary = profileSetupSummaryRecord(result);
|
|
@@ -16475,6 +16519,10 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
16475
16519
|
const hasMeasuredStateChange = hasNaturalInput || hasCanvasChange || valueReceipts.some((item) => setupReturnSummaryValue(item, ["changed"]) === true || setupReturnSummaryValue(item, ["nonWhiteDelta", "darkDelta", "pixelDelta", "movementDelta"]) !== void 0);
|
|
16476
16520
|
const hasRouteExitAffordanceReceipt = profileHasRouteExitAffordanceReceipt(valueReceipts);
|
|
16477
16521
|
const hasOfflineAudioMetricsReceipt = profileHasOfflineAudioMetricsReceipt(valueReceipts);
|
|
16522
|
+
const hasActiveRouteLocalProofReceipt = profileHasActiveRouteLocalProofReceipt(valueReceipts);
|
|
16523
|
+
const hasTerminalLossReceipt = profileHasTerminalLossReceipt(valueReceipts);
|
|
16524
|
+
const hasControlledFailureLaunchReceipt = profileHasControlledLaunchReceipt(valueReceipts, "failure");
|
|
16525
|
+
const hasControlledSuccessLaunchReceipt = profileHasControlledLaunchReceipt(valueReceipts, "success");
|
|
16478
16526
|
const failedCleanupInventoryReason = profileFailedCleanupInventoryReason(setupViewports);
|
|
16479
16527
|
if (text.includes("artifact link") || text.includes("artifact path")) {
|
|
16480
16528
|
return profileReceiptSignalStatus(profileResultHasArtifact(result), "artifact references listed", "no artifact references found");
|
|
@@ -16490,6 +16538,13 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
16490
16538
|
if (text.includes("setup action")) {
|
|
16491
16539
|
return profileReceiptSignalStatus(hasSetupReceipts, "setup receipts present", "setup receipts missing");
|
|
16492
16540
|
}
|
|
16541
|
+
if (text.includes("active") && (text.includes("route-local") || text.includes("route local")) && (text.includes("proof helper") || text.includes("proof api") || text.includes("proof state"))) {
|
|
16542
|
+
return profileReceiptSignalStatus(
|
|
16543
|
+
hasActiveRouteLocalProofReceipt,
|
|
16544
|
+
"active route-local proof receipt present",
|
|
16545
|
+
"active route-local proof receipt missing"
|
|
16546
|
+
);
|
|
16547
|
+
}
|
|
16493
16548
|
if (text.includes("declared state contract")) {
|
|
16494
16549
|
return profileReceiptSignalStatus(hasStateContract, "state contract metadata or receipts present", "state contract evidence missing");
|
|
16495
16550
|
}
|
|
@@ -16513,6 +16568,27 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
16513
16568
|
if (text.includes("invalid state")) {
|
|
16514
16569
|
return profileReceiptSignalStatus(hasStateContract || hasInvalidStateReceipt, "invalid-state receipt present", "invalid-state receipt missing");
|
|
16515
16570
|
}
|
|
16571
|
+
if ((text.includes("loss") || text.includes("lost")) && text.includes("terminal")) {
|
|
16572
|
+
return profileReceiptSignalStatus(
|
|
16573
|
+
hasTerminalLossReceipt,
|
|
16574
|
+
"terminal loss receipt present",
|
|
16575
|
+
"terminal loss receipt missing"
|
|
16576
|
+
);
|
|
16577
|
+
}
|
|
16578
|
+
if (text.includes("controlled") && text.includes("launch") && (text.includes("failure") || text.includes("failed") || text.includes("miss"))) {
|
|
16579
|
+
return profileReceiptSignalStatus(
|
|
16580
|
+
hasControlledFailureLaunchReceipt,
|
|
16581
|
+
"controlled failure launch receipt present",
|
|
16582
|
+
"controlled failure launch receipt missing"
|
|
16583
|
+
);
|
|
16584
|
+
}
|
|
16585
|
+
if (text.includes("controlled") && text.includes("launch") && text.includes("success")) {
|
|
16586
|
+
return profileReceiptSignalStatus(
|
|
16587
|
+
hasControlledSuccessLaunchReceipt,
|
|
16588
|
+
"controlled success launch receipt present",
|
|
16589
|
+
"controlled success launch receipt missing"
|
|
16590
|
+
);
|
|
16591
|
+
}
|
|
16516
16592
|
if (text.includes("through visible ui") || text.includes("visible ui action") || text.includes("ui-routed") || text.includes("ui routed") || text.includes("visible") && text.includes("route") && text.includes("exit") && text.includes("action") || text.includes("visible") && text.includes("mode") && text.includes("exit") && text.includes("action")) {
|
|
16517
16593
|
return profileReceiptSignalStatus(
|
|
16518
16594
|
visibleUiActionCount > 0,
|
package/dist/cli.js
CHANGED
|
@@ -629,6 +629,50 @@ function profileHasOfflineAudioMetricsReceipt(receipts) {
|
|
|
629
629
|
return value !== void 0 && value > 0;
|
|
630
630
|
}));
|
|
631
631
|
}
|
|
632
|
+
function profileHasActiveRouteLocalProofReceipt(receipts) {
|
|
633
|
+
return receipts.some((receipt) => {
|
|
634
|
+
const route = cliString(setupReturnSummaryValue(receipt, ["route", "browserPath", "path"]));
|
|
635
|
+
if (!route) return false;
|
|
636
|
+
const proofVersion = cliString(setupReturnSummaryValue(receipt, ["proofVersion", "proof_version", "proofKind", "proof_kind"]));
|
|
637
|
+
const globalCount = cliFiniteNumber(setupReturnSummaryValue(receipt, ["globalCount", "activeGlobalCount", "activeGlobals.length"]));
|
|
638
|
+
const globalNames = setupReturnSummaryValue(receipt, ["globalNames", "activeGlobals"]);
|
|
639
|
+
const enabled = setupReturnSummaryValue(receipt, ["enabled", "proofEnabled", "proof_enabled"]) === true;
|
|
640
|
+
const ready = setupReturnSummaryValue(receipt, ["ready", "proofReady", "proof_ready"]) === true;
|
|
641
|
+
const supportsProofFeature = setupReturnSummaryValue(receipt, ["supportsOfflineAudio", "supportsProof", "proofSupported"]) === true;
|
|
642
|
+
return Boolean(
|
|
643
|
+
proofVersion || enabled || ready || supportsProofFeature || globalCount !== void 0 && globalCount > 0 || Array.isArray(globalNames) && globalNames.length > 0
|
|
644
|
+
);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
function profileLowerSummaryValue(receipt, names) {
|
|
648
|
+
return names.map((name) => cliString(setupReturnSummaryValue(receipt, [name]))?.toLowerCase()).find((value) => Boolean(value)) || "";
|
|
649
|
+
}
|
|
650
|
+
function profileHasTerminalLossReceipt(receipts) {
|
|
651
|
+
return receipts.some((receipt) => {
|
|
652
|
+
const status = profileLowerSummaryValue(receipt, ["status", "state", "phase"]);
|
|
653
|
+
const outcome = profileLowerSummaryValue(receipt, ["lastOutcome", "outcome", "terminalOutcome", "terminal"]);
|
|
654
|
+
const lastFlightLost = setupReturnSummaryValue(receipt, ["lastFlightLost", "lost"]) === true;
|
|
655
|
+
const outOfBounds = setupReturnSummaryValue(receipt, ["lastFlightOutOfBounds", "outOfBounds"]) === true;
|
|
656
|
+
const storedTo = cliString(receipt.return_stored_to) || "";
|
|
657
|
+
const label = cliString(receipt.label) || "";
|
|
658
|
+
const path2 = cliString(receipt.path) || cliString(receipt.function_name) || "";
|
|
659
|
+
const haystack = `${storedTo} ${label} ${path2}`.toLowerCase();
|
|
660
|
+
const labelsLoss = haystack.includes("loss") || haystack.includes("lost") || haystack.includes("terminal");
|
|
661
|
+
if (!labelsLoss && !lastFlightLost && !outOfBounds) return false;
|
|
662
|
+
return lastFlightLost || outOfBounds || ["over", "lost", "loss", "failed", "failure", "game_over", "gameover"].includes(status) || ["lost", "loss", "failed", "failure", "game_over", "gameover"].includes(outcome);
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
function profileHasControlledLaunchReceipt(receipts, expected) {
|
|
666
|
+
return receipts.some((receipt) => {
|
|
667
|
+
const shotKind = profileLowerSummaryValue(receipt, ["lastShotKind", "shotKind", "kind"]);
|
|
668
|
+
const shotStatus = profileLowerSummaryValue(receipt, ["lastShotStatus", "shotStatus"]);
|
|
669
|
+
const outcome = profileLowerSummaryValue(receipt, ["lastOutcome", "outcome"]);
|
|
670
|
+
if (expected === "success") {
|
|
671
|
+
return shotKind === "success" && (!shotStatus || shotStatus === "success" || outcome === "success");
|
|
672
|
+
}
|
|
673
|
+
return ["failure", "failed", "miss", "lost", "loss"].includes(shotKind) || ["failure", "failed", "miss", "lost", "loss"].includes(shotStatus) || ["failure", "failed", "miss", "lost", "loss"].includes(outcome);
|
|
674
|
+
});
|
|
675
|
+
}
|
|
632
676
|
function profilePackReceiptStatus(result, metadata, receipt) {
|
|
633
677
|
const text = receipt.toLowerCase();
|
|
634
678
|
const setupSummary = profileSetupSummaryRecord(result);
|
|
@@ -680,6 +724,10 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
680
724
|
const hasMeasuredStateChange = hasNaturalInput || hasCanvasChange || valueReceipts.some((item) => setupReturnSummaryValue(item, ["changed"]) === true || setupReturnSummaryValue(item, ["nonWhiteDelta", "darkDelta", "pixelDelta", "movementDelta"]) !== void 0);
|
|
681
725
|
const hasRouteExitAffordanceReceipt = profileHasRouteExitAffordanceReceipt(valueReceipts);
|
|
682
726
|
const hasOfflineAudioMetricsReceipt = profileHasOfflineAudioMetricsReceipt(valueReceipts);
|
|
727
|
+
const hasActiveRouteLocalProofReceipt = profileHasActiveRouteLocalProofReceipt(valueReceipts);
|
|
728
|
+
const hasTerminalLossReceipt = profileHasTerminalLossReceipt(valueReceipts);
|
|
729
|
+
const hasControlledFailureLaunchReceipt = profileHasControlledLaunchReceipt(valueReceipts, "failure");
|
|
730
|
+
const hasControlledSuccessLaunchReceipt = profileHasControlledLaunchReceipt(valueReceipts, "success");
|
|
683
731
|
const failedCleanupInventoryReason = profileFailedCleanupInventoryReason(setupViewports);
|
|
684
732
|
if (text.includes("artifact link") || text.includes("artifact path")) {
|
|
685
733
|
return profileReceiptSignalStatus(profileResultHasArtifact(result), "artifact references listed", "no artifact references found");
|
|
@@ -695,6 +743,13 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
695
743
|
if (text.includes("setup action")) {
|
|
696
744
|
return profileReceiptSignalStatus(hasSetupReceipts, "setup receipts present", "setup receipts missing");
|
|
697
745
|
}
|
|
746
|
+
if (text.includes("active") && (text.includes("route-local") || text.includes("route local")) && (text.includes("proof helper") || text.includes("proof api") || text.includes("proof state"))) {
|
|
747
|
+
return profileReceiptSignalStatus(
|
|
748
|
+
hasActiveRouteLocalProofReceipt,
|
|
749
|
+
"active route-local proof receipt present",
|
|
750
|
+
"active route-local proof receipt missing"
|
|
751
|
+
);
|
|
752
|
+
}
|
|
698
753
|
if (text.includes("declared state contract")) {
|
|
699
754
|
return profileReceiptSignalStatus(hasStateContract, "state contract metadata or receipts present", "state contract evidence missing");
|
|
700
755
|
}
|
|
@@ -718,6 +773,27 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
718
773
|
if (text.includes("invalid state")) {
|
|
719
774
|
return profileReceiptSignalStatus(hasStateContract || hasInvalidStateReceipt, "invalid-state receipt present", "invalid-state receipt missing");
|
|
720
775
|
}
|
|
776
|
+
if ((text.includes("loss") || text.includes("lost")) && text.includes("terminal")) {
|
|
777
|
+
return profileReceiptSignalStatus(
|
|
778
|
+
hasTerminalLossReceipt,
|
|
779
|
+
"terminal loss receipt present",
|
|
780
|
+
"terminal loss receipt missing"
|
|
781
|
+
);
|
|
782
|
+
}
|
|
783
|
+
if (text.includes("controlled") && text.includes("launch") && (text.includes("failure") || text.includes("failed") || text.includes("miss"))) {
|
|
784
|
+
return profileReceiptSignalStatus(
|
|
785
|
+
hasControlledFailureLaunchReceipt,
|
|
786
|
+
"controlled failure launch receipt present",
|
|
787
|
+
"controlled failure launch receipt missing"
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
if (text.includes("controlled") && text.includes("launch") && text.includes("success")) {
|
|
791
|
+
return profileReceiptSignalStatus(
|
|
792
|
+
hasControlledSuccessLaunchReceipt,
|
|
793
|
+
"controlled success launch receipt present",
|
|
794
|
+
"controlled success launch receipt missing"
|
|
795
|
+
);
|
|
796
|
+
}
|
|
721
797
|
if (text.includes("through visible ui") || text.includes("visible ui action") || text.includes("ui-routed") || text.includes("ui routed") || text.includes("visible") && text.includes("route") && text.includes("exit") && text.includes("action") || text.includes("visible") && text.includes("mode") && text.includes("exit") && text.includes("action")) {
|
|
722
798
|
return profileReceiptSignalStatus(
|
|
723
799
|
visibleUiActionCount > 0,
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|