@riddledc/riddle-proof 0.5.36 → 0.5.38
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/README.md +28 -8
- package/dist/chunk-NSWT3VSV.js +361 -0
- package/dist/engine-harness.js +2 -2
- package/dist/index.cjs +364 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23 -11
- package/dist/playability.cjs +389 -0
- package/dist/playability.d.cts +44 -0
- package/dist/playability.d.ts +44 -0
- package/dist/playability.js +14 -0
- package/dist/types.d.cts +2 -1
- package/dist/types.d.ts +2 -1
- package/lib/workspace-core.mjs +32 -1
- package/package.json +7 -2
- package/runtime/lib/author.py +2 -1
- package/runtime/lib/setup.py +55 -9
- package/runtime/lib/verify.py +333 -2
- package/dist/{chunk-7R6ZQE3X.js → chunk-GN7HSZ6G.js} +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2735,6 +2735,8 @@ __export(index_exports, {
|
|
|
2735
2735
|
DEFAULT_DIAGNOSTIC_HISTORY_LIMIT: () => DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
|
|
2736
2736
|
DEFAULT_DIAGNOSTIC_STRING_LIMIT: () => DEFAULT_DIAGNOSTIC_STRING_LIMIT,
|
|
2737
2737
|
RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION: () => RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION,
|
|
2738
|
+
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION: () => RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
2739
|
+
RIDDLE_PROOF_PLAYABILITY_VERSION: () => RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
2738
2740
|
RIDDLE_PROOF_RUN_STATE_VERSION: () => RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
2739
2741
|
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION: () => RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
2740
2742
|
RIDDLE_PROOF_VISUAL_SESSION_VERSION: () => RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
@@ -2743,6 +2745,7 @@ __export(index_exports, {
|
|
|
2743
2745
|
appendStageHeartbeat: () => appendStageHeartbeat,
|
|
2744
2746
|
applyPrLifecycleState: () => applyPrLifecycleState,
|
|
2745
2747
|
applyTerminalMetadata: () => applyTerminalMetadata,
|
|
2748
|
+
assessPlayabilityEvidence: () => assessPlayabilityEvidence,
|
|
2746
2749
|
buildVisualProofSession: () => buildVisualProofSession,
|
|
2747
2750
|
compactRecord: () => compactRecord,
|
|
2748
2751
|
compareVisualProofSessionFingerprint: () => compareVisualProofSessionFingerprint,
|
|
@@ -2751,6 +2754,8 @@ __export(index_exports, {
|
|
|
2751
2754
|
createRunResult: () => createRunResult,
|
|
2752
2755
|
createRunState: () => createRunState,
|
|
2753
2756
|
createRunStatusSnapshot: () => createRunStatusSnapshot,
|
|
2757
|
+
extractPlayabilityEvidence: () => extractPlayabilityEvidence,
|
|
2758
|
+
isRiddleProofPlayabilityMode: () => isRiddleProofPlayabilityMode,
|
|
2754
2759
|
isSuccessfulStatus: () => isSuccessfulStatus,
|
|
2755
2760
|
isTerminalStatus: () => isTerminalStatus,
|
|
2756
2761
|
nonEmptyString: () => nonEmptyString,
|
|
@@ -4826,12 +4831,368 @@ function compareVisualProofSessionFingerprint(parent, input) {
|
|
|
4826
4831
|
}
|
|
4827
4832
|
return mismatches;
|
|
4828
4833
|
}
|
|
4834
|
+
|
|
4835
|
+
// src/playability.ts
|
|
4836
|
+
var RIDDLE_PROOF_PLAYABILITY_VERSION = "riddle-proof.playability.v1";
|
|
4837
|
+
var RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION = "riddle-proof.playability.assessment.v1";
|
|
4838
|
+
var PLAYABILITY_MODES = /* @__PURE__ */ new Set(["playable", "gameplay", "game"]);
|
|
4839
|
+
var PLAYABILITY_CONTAINER_KEYS = [
|
|
4840
|
+
"playability",
|
|
4841
|
+
"playability_evidence",
|
|
4842
|
+
"playabilityEvidence",
|
|
4843
|
+
"playable",
|
|
4844
|
+
"gameplay",
|
|
4845
|
+
"gameplay_evidence",
|
|
4846
|
+
"gameplayEvidence"
|
|
4847
|
+
];
|
|
4848
|
+
var INPUT_ASSERTION_KEYS = [
|
|
4849
|
+
"inputAccepted",
|
|
4850
|
+
"inputObserved",
|
|
4851
|
+
"inputReceived",
|
|
4852
|
+
"controlsWorked",
|
|
4853
|
+
"keyboardWorked",
|
|
4854
|
+
"pointerWorked",
|
|
4855
|
+
"touchWorked",
|
|
4856
|
+
"steeringInputAccepted",
|
|
4857
|
+
"userInputObserved"
|
|
4858
|
+
];
|
|
4859
|
+
var STATE_ASSERTION_KEYS = [
|
|
4860
|
+
"stateChanged",
|
|
4861
|
+
"gameStateChanged",
|
|
4862
|
+
"playStarted",
|
|
4863
|
+
"simulationAdvanced",
|
|
4864
|
+
"distanceAdvanced",
|
|
4865
|
+
"scoreChanged",
|
|
4866
|
+
"hudChanged",
|
|
4867
|
+
"positionChanged",
|
|
4868
|
+
"speedChanged"
|
|
4869
|
+
];
|
|
4870
|
+
var MOTION_ASSERTION_KEYS = [
|
|
4871
|
+
"motionObserved",
|
|
4872
|
+
"visualMotion",
|
|
4873
|
+
"canvasChanged",
|
|
4874
|
+
"pixelChanged",
|
|
4875
|
+
"playfieldMoved",
|
|
4876
|
+
"playfieldPixelsChanged",
|
|
4877
|
+
"nonHudPixelsChanged",
|
|
4878
|
+
"animationAdvanced",
|
|
4879
|
+
"frameChanged",
|
|
4880
|
+
"framesChanged"
|
|
4881
|
+
];
|
|
4882
|
+
var TIME_ASSERTION_KEYS = [
|
|
4883
|
+
"timeProgressed",
|
|
4884
|
+
"clockAdvanced",
|
|
4885
|
+
"animationAdvanced",
|
|
4886
|
+
"simulationAdvanced",
|
|
4887
|
+
"playStarted"
|
|
4888
|
+
];
|
|
4889
|
+
var PERCENT_KEYS = [
|
|
4890
|
+
"changed_percent",
|
|
4891
|
+
"change_percent",
|
|
4892
|
+
"percent_changed",
|
|
4893
|
+
"diff_percent",
|
|
4894
|
+
"motion_percent",
|
|
4895
|
+
"pixel_change_percent"
|
|
4896
|
+
];
|
|
4897
|
+
var RATIO_KEYS = [
|
|
4898
|
+
"changed_ratio",
|
|
4899
|
+
"change_ratio",
|
|
4900
|
+
"diff_ratio",
|
|
4901
|
+
"motion_ratio",
|
|
4902
|
+
"pixel_change_ratio"
|
|
4903
|
+
];
|
|
4904
|
+
var PIXEL_KEYS = [
|
|
4905
|
+
"changed_pixels",
|
|
4906
|
+
"changed_pixel_count",
|
|
4907
|
+
"diff_pixels",
|
|
4908
|
+
"motion_pixels",
|
|
4909
|
+
"pixel_delta",
|
|
4910
|
+
"changedPixels"
|
|
4911
|
+
];
|
|
4912
|
+
var AVERAGE_DELTA_KEYS = [
|
|
4913
|
+
"average_delta",
|
|
4914
|
+
"avg_delta",
|
|
4915
|
+
"mean_delta",
|
|
4916
|
+
"avg_abs_delta",
|
|
4917
|
+
"mean_abs_delta"
|
|
4918
|
+
];
|
|
4919
|
+
var TIME_DELTA_KEYS = [
|
|
4920
|
+
"time_delta_ms",
|
|
4921
|
+
"elapsed_ms",
|
|
4922
|
+
"duration_ms",
|
|
4923
|
+
"sample_duration_ms",
|
|
4924
|
+
"animation_delta_ms"
|
|
4925
|
+
];
|
|
4926
|
+
function isRiddleProofPlayabilityMode(mode) {
|
|
4927
|
+
return PLAYABILITY_MODES.has(stringValue3(mode).toLowerCase());
|
|
4928
|
+
}
|
|
4929
|
+
function extractPlayabilityEvidence(...sources) {
|
|
4930
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4931
|
+
for (const source of sources) {
|
|
4932
|
+
const found = findPlayabilityEvidence(source, seen);
|
|
4933
|
+
if (found) return found;
|
|
4934
|
+
}
|
|
4935
|
+
return null;
|
|
4936
|
+
}
|
|
4937
|
+
function assessPlayabilityEvidence(evidence, options = {}) {
|
|
4938
|
+
const thresholds = {
|
|
4939
|
+
minChangedPercent: options.minChangedPercent ?? 0.5,
|
|
4940
|
+
minChangedPixels: options.minChangedPixels ?? 1e3,
|
|
4941
|
+
minAverageDelta: options.minAverageDelta ?? 1,
|
|
4942
|
+
minTimeDeltaMs: options.minTimeDeltaMs ?? 250
|
|
4943
|
+
};
|
|
4944
|
+
const required = {
|
|
4945
|
+
requireInput: options.requireInput ?? true,
|
|
4946
|
+
requireStateChange: options.requireStateChange ?? true,
|
|
4947
|
+
requireMotion: options.requireMotion ?? true,
|
|
4948
|
+
requireTimeProgression: options.requireTimeProgression ?? true
|
|
4949
|
+
};
|
|
4950
|
+
const record = extractPlayabilityEvidence(evidence);
|
|
4951
|
+
const metrics = {};
|
|
4952
|
+
const concerns = [];
|
|
4953
|
+
if (!record) {
|
|
4954
|
+
return {
|
|
4955
|
+
version: RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
4956
|
+
evidence_present: false,
|
|
4957
|
+
passed: false,
|
|
4958
|
+
input_observed: false,
|
|
4959
|
+
state_changed: false,
|
|
4960
|
+
motion_observed: false,
|
|
4961
|
+
time_progressed: false,
|
|
4962
|
+
concerns: ["playability evidence is missing"],
|
|
4963
|
+
metrics,
|
|
4964
|
+
thresholds,
|
|
4965
|
+
required,
|
|
4966
|
+
evidence_keys: []
|
|
4967
|
+
};
|
|
4968
|
+
}
|
|
4969
|
+
const assertions = recordValue2(record.assertions) || record;
|
|
4970
|
+
const inputObserved = inputObservedFrom(record, assertions);
|
|
4971
|
+
const stateChanged = stateChangedFrom(record, assertions, metrics);
|
|
4972
|
+
const motionObserved = motionObservedFrom(record, assertions, thresholds, metrics);
|
|
4973
|
+
const timeProgressed = timeProgressedFrom(record, assertions, thresholds, metrics);
|
|
4974
|
+
const explicitFailure = hasExplicitPlayabilityFailure(record, assertions);
|
|
4975
|
+
if (required.requireInput && !inputObserved) {
|
|
4976
|
+
concerns.push("no accepted player input was observed");
|
|
4977
|
+
}
|
|
4978
|
+
if (required.requireStateChange && !stateChanged) {
|
|
4979
|
+
concerns.push("game state did not measurably change");
|
|
4980
|
+
}
|
|
4981
|
+
if (required.requireMotion && !motionObserved) {
|
|
4982
|
+
concerns.push("playfield/canvas pixels did not measurably change");
|
|
4983
|
+
}
|
|
4984
|
+
if (required.requireTimeProgression && !timeProgressed) {
|
|
4985
|
+
concerns.push("play time or animation time did not measurably progress");
|
|
4986
|
+
}
|
|
4987
|
+
if (explicitFailure) {
|
|
4988
|
+
concerns.push("playability evidence includes an explicit failed assertion");
|
|
4989
|
+
}
|
|
4990
|
+
const passed = Boolean(
|
|
4991
|
+
(!required.requireInput || inputObserved) && (!required.requireStateChange || stateChanged) && (!required.requireMotion || motionObserved) && (!required.requireTimeProgression || timeProgressed) && !explicitFailure
|
|
4992
|
+
);
|
|
4993
|
+
return {
|
|
4994
|
+
version: RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
4995
|
+
evidence_present: true,
|
|
4996
|
+
passed,
|
|
4997
|
+
input_observed: inputObserved,
|
|
4998
|
+
state_changed: stateChanged,
|
|
4999
|
+
motion_observed: motionObserved,
|
|
5000
|
+
time_progressed: timeProgressed,
|
|
5001
|
+
concerns,
|
|
5002
|
+
metrics,
|
|
5003
|
+
thresholds,
|
|
5004
|
+
required,
|
|
5005
|
+
evidence_keys: Object.keys(record)
|
|
5006
|
+
};
|
|
5007
|
+
}
|
|
5008
|
+
function findPlayabilityEvidence(value, seen, depth = 0) {
|
|
5009
|
+
if (depth > 6 || value === null || value === void 0) return null;
|
|
5010
|
+
if (typeof value === "string") {
|
|
5011
|
+
const parsed = parseJson(value);
|
|
5012
|
+
return parsed === null ? null : findPlayabilityEvidence(parsed, seen, depth + 1);
|
|
5013
|
+
}
|
|
5014
|
+
if (Array.isArray(value)) {
|
|
5015
|
+
if (seen.has(value)) return null;
|
|
5016
|
+
seen.add(value);
|
|
5017
|
+
for (const item of value) {
|
|
5018
|
+
const found = findPlayabilityEvidence(item, seen, depth + 1);
|
|
5019
|
+
if (found) return found;
|
|
5020
|
+
}
|
|
5021
|
+
return null;
|
|
5022
|
+
}
|
|
5023
|
+
const record = recordValue2(value);
|
|
5024
|
+
if (!record || seen.has(record)) return null;
|
|
5025
|
+
seen.add(record);
|
|
5026
|
+
if (record.version === RIDDLE_PROOF_PLAYABILITY_VERSION || hasPlayabilityShape(record)) {
|
|
5027
|
+
return record;
|
|
5028
|
+
}
|
|
5029
|
+
for (const key of PLAYABILITY_CONTAINER_KEYS) {
|
|
5030
|
+
if (Object.prototype.hasOwnProperty.call(record, key)) {
|
|
5031
|
+
const nested = findPlayabilityEvidence(record[key], seen, depth + 1);
|
|
5032
|
+
if (nested) return nested;
|
|
5033
|
+
if (typeof record[key] === "boolean") {
|
|
5034
|
+
return { assertions: { [key]: record[key] } };
|
|
5035
|
+
}
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
5038
|
+
for (const item of Object.values(record)) {
|
|
5039
|
+
const found = findPlayabilityEvidence(item, seen, depth + 1);
|
|
5040
|
+
if (found) return found;
|
|
5041
|
+
}
|
|
5042
|
+
return null;
|
|
5043
|
+
}
|
|
5044
|
+
function hasPlayabilityShape(record) {
|
|
5045
|
+
return Boolean(
|
|
5046
|
+
record.input_events || record.state_delta || record.pixel_delta || record.canvas_delta || record.motion_delta || record.playfield_delta || record.time_delta_ms !== void 0 || hasAnyKey(recordValue2(record.assertions) || record, [
|
|
5047
|
+
...INPUT_ASSERTION_KEYS,
|
|
5048
|
+
...STATE_ASSERTION_KEYS,
|
|
5049
|
+
...MOTION_ASSERTION_KEYS,
|
|
5050
|
+
...TIME_ASSERTION_KEYS
|
|
5051
|
+
])
|
|
5052
|
+
);
|
|
5053
|
+
}
|
|
5054
|
+
function inputObservedFrom(record, assertions) {
|
|
5055
|
+
if (trueForAnyKey(assertions, INPUT_ASSERTION_KEYS)) return true;
|
|
5056
|
+
if (listValue(record.input_events).length > 0) return true;
|
|
5057
|
+
if (listValue(record.inputs).length > 0) return true;
|
|
5058
|
+
if (listValue(record.interactions).length > 0) return true;
|
|
5059
|
+
const eventCount = numericFromAnyKey(record, ["input_event_count", "input_count", "interaction_count"]);
|
|
5060
|
+
return eventCount !== null && eventCount > 0;
|
|
5061
|
+
}
|
|
5062
|
+
function stateChangedFrom(record, assertions, metrics) {
|
|
5063
|
+
if (trueForAnyKey(assertions, STATE_ASSERTION_KEYS)) return true;
|
|
5064
|
+
const stateDelta = recordValue2(record.state_delta) || recordValue2(record.stateDelta);
|
|
5065
|
+
if (stateDelta) {
|
|
5066
|
+
const changedKeys = listValue(stateDelta.changed_keys || stateDelta.changedKeys);
|
|
5067
|
+
metrics.state_changed_keys = changedKeys;
|
|
5068
|
+
if (stateDelta.changed === true || changedKeys.length > 0) return true;
|
|
5069
|
+
}
|
|
5070
|
+
const delta = numericFromAnyKey(record, [
|
|
5071
|
+
"distance_delta",
|
|
5072
|
+
"score_delta",
|
|
5073
|
+
"position_delta",
|
|
5074
|
+
"speed_delta",
|
|
5075
|
+
"hud_delta"
|
|
5076
|
+
]);
|
|
5077
|
+
if (delta !== null) {
|
|
5078
|
+
metrics.state_numeric_delta = delta;
|
|
5079
|
+
return Math.abs(delta) > 0;
|
|
5080
|
+
}
|
|
5081
|
+
return false;
|
|
5082
|
+
}
|
|
5083
|
+
function motionObservedFrom(record, assertions, thresholds, metrics) {
|
|
5084
|
+
if (trueForAnyKey(assertions, MOTION_ASSERTION_KEYS)) return true;
|
|
5085
|
+
for (const source of [
|
|
5086
|
+
recordValue2(record.playfield_delta),
|
|
5087
|
+
recordValue2(record.playfieldDelta),
|
|
5088
|
+
recordValue2(record.non_hud_delta),
|
|
5089
|
+
recordValue2(record.nonHudDelta),
|
|
5090
|
+
recordValue2(record.pixel_delta),
|
|
5091
|
+
recordValue2(record.pixelDelta),
|
|
5092
|
+
recordValue2(record.canvas_delta),
|
|
5093
|
+
recordValue2(record.canvasDelta),
|
|
5094
|
+
recordValue2(record.motion_delta),
|
|
5095
|
+
recordValue2(record.motionDelta),
|
|
5096
|
+
recordValue2(record.visual_delta),
|
|
5097
|
+
recordValue2(record.visualDelta),
|
|
5098
|
+
record
|
|
5099
|
+
]) {
|
|
5100
|
+
if (!source) continue;
|
|
5101
|
+
const percent = percentFrom(source);
|
|
5102
|
+
const pixels = numericFromAnyKey(source, PIXEL_KEYS);
|
|
5103
|
+
const averageDelta = numericFromAnyKey(source, AVERAGE_DELTA_KEYS);
|
|
5104
|
+
if (percent !== null) metrics.changed_percent = percent;
|
|
5105
|
+
if (pixels !== null) metrics.changed_pixels = pixels;
|
|
5106
|
+
if (averageDelta !== null) metrics.average_delta = averageDelta;
|
|
5107
|
+
if (percent !== null && percent >= thresholds.minChangedPercent) return true;
|
|
5108
|
+
if (pixels !== null && pixels >= thresholds.minChangedPixels) return true;
|
|
5109
|
+
if (averageDelta !== null && averageDelta >= thresholds.minAverageDelta) return true;
|
|
5110
|
+
}
|
|
5111
|
+
return false;
|
|
5112
|
+
}
|
|
5113
|
+
function timeProgressedFrom(record, assertions, thresholds, metrics) {
|
|
5114
|
+
if (trueForAnyKey(assertions, TIME_ASSERTION_KEYS)) return true;
|
|
5115
|
+
const timeDelta = numericFromAnyKey(record, TIME_DELTA_KEYS);
|
|
5116
|
+
if (timeDelta !== null) {
|
|
5117
|
+
metrics.time_delta_ms = timeDelta;
|
|
5118
|
+
return timeDelta >= thresholds.minTimeDeltaMs;
|
|
5119
|
+
}
|
|
5120
|
+
const stateDelta = recordValue2(record.state_delta) || recordValue2(record.stateDelta);
|
|
5121
|
+
const nestedDelta = numericFromAnyKey(stateDelta || {}, TIME_DELTA_KEYS);
|
|
5122
|
+
if (nestedDelta !== null) {
|
|
5123
|
+
metrics.time_delta_ms = nestedDelta;
|
|
5124
|
+
return nestedDelta >= thresholds.minTimeDeltaMs;
|
|
5125
|
+
}
|
|
5126
|
+
return false;
|
|
5127
|
+
}
|
|
5128
|
+
function hasExplicitPlayabilityFailure(record, assertions) {
|
|
5129
|
+
if (record.passed === false || record.playable === false || assertions.playabilityPassed === false) {
|
|
5130
|
+
return true;
|
|
5131
|
+
}
|
|
5132
|
+
for (const key of [
|
|
5133
|
+
...INPUT_ASSERTION_KEYS,
|
|
5134
|
+
...STATE_ASSERTION_KEYS,
|
|
5135
|
+
...MOTION_ASSERTION_KEYS,
|
|
5136
|
+
...TIME_ASSERTION_KEYS
|
|
5137
|
+
]) {
|
|
5138
|
+
if (assertions[key] === false) return true;
|
|
5139
|
+
}
|
|
5140
|
+
return false;
|
|
5141
|
+
}
|
|
5142
|
+
function trueForAnyKey(record, keys) {
|
|
5143
|
+
return keys.some((key) => record[key] === true);
|
|
5144
|
+
}
|
|
5145
|
+
function hasAnyKey(record, keys) {
|
|
5146
|
+
return keys.some((key) => Object.prototype.hasOwnProperty.call(record, key));
|
|
5147
|
+
}
|
|
5148
|
+
function percentFrom(record) {
|
|
5149
|
+
const percent = numericFromAnyKey(record, PERCENT_KEYS);
|
|
5150
|
+
if (percent !== null) return percent;
|
|
5151
|
+
const ratio = numericFromAnyKey(record, RATIO_KEYS);
|
|
5152
|
+
if (ratio !== null) return ratio <= 1 ? ratio * 100 : ratio;
|
|
5153
|
+
return null;
|
|
5154
|
+
}
|
|
5155
|
+
function numericFromAnyKey(record, keys) {
|
|
5156
|
+
for (const key of keys) {
|
|
5157
|
+
const value = numericValue(record[key]);
|
|
5158
|
+
if (value !== null) return value;
|
|
5159
|
+
}
|
|
5160
|
+
return null;
|
|
5161
|
+
}
|
|
5162
|
+
function recordValue2(value) {
|
|
5163
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
5164
|
+
}
|
|
5165
|
+
function listValue(value) {
|
|
5166
|
+
return Array.isArray(value) ? value : [];
|
|
5167
|
+
}
|
|
5168
|
+
function numericValue(value) {
|
|
5169
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
5170
|
+
if (typeof value === "string" && value.trim()) {
|
|
5171
|
+
const parsed = Number(value);
|
|
5172
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
5173
|
+
}
|
|
5174
|
+
return null;
|
|
5175
|
+
}
|
|
5176
|
+
function stringValue3(value) {
|
|
5177
|
+
return typeof value === "string" && value.trim() ? value.trim() : "";
|
|
5178
|
+
}
|
|
5179
|
+
function parseJson(value) {
|
|
5180
|
+
const trimmed = value.trim();
|
|
5181
|
+
if (!trimmed || !/^[{[]/.test(trimmed)) return null;
|
|
5182
|
+
try {
|
|
5183
|
+
return JSON.parse(trimmed);
|
|
5184
|
+
} catch {
|
|
5185
|
+
return null;
|
|
5186
|
+
}
|
|
5187
|
+
}
|
|
4829
5188
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4830
5189
|
0 && (module.exports = {
|
|
4831
5190
|
DEFAULT_DIAGNOSTIC_ARRAY_LIMIT,
|
|
4832
5191
|
DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
|
|
4833
5192
|
DEFAULT_DIAGNOSTIC_STRING_LIMIT,
|
|
4834
5193
|
RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION,
|
|
5194
|
+
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
5195
|
+
RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
4835
5196
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
4836
5197
|
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
4837
5198
|
RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
@@ -4840,6 +5201,7 @@ function compareVisualProofSessionFingerprint(parent, input) {
|
|
|
4840
5201
|
appendStageHeartbeat,
|
|
4841
5202
|
applyPrLifecycleState,
|
|
4842
5203
|
applyTerminalMetadata,
|
|
5204
|
+
assessPlayabilityEvidence,
|
|
4843
5205
|
buildVisualProofSession,
|
|
4844
5206
|
compactRecord,
|
|
4845
5207
|
compareVisualProofSessionFingerprint,
|
|
@@ -4848,6 +5210,8 @@ function compareVisualProofSessionFingerprint(parent, input) {
|
|
|
4848
5210
|
createRunResult,
|
|
4849
5211
|
createRunState,
|
|
4850
5212
|
createRunStatusSnapshot,
|
|
5213
|
+
extractPlayabilityEvidence,
|
|
5214
|
+
isRiddleProofPlayabilityMode,
|
|
4851
5215
|
isSuccessfulStatus,
|
|
4852
5216
|
isTerminalStatus,
|
|
4853
5217
|
nonEmptyString,
|
package/dist/index.d.cts
CHANGED
|
@@ -5,3 +5,4 @@ export { RiddleProofRunnerAdapters, RunRiddleProofInput, runRiddleProof } from '
|
|
|
5
5
|
export { RiddleProofAgentAdapter, RiddleProofAgentPayload, RiddleProofEngine, RiddleProofEngineHarnessConfig, RiddleProofEngineHarnessContext, RiddleProofEngineResult, RiddleProofShipMode, RiddleProofWorkflowParams, RunRiddleProofEngineHarnessInput, createDisabledRiddleProofAgentAdapter, readRiddleProofRunStatus, runRiddleProofEngineHarness } from './engine-harness.cjs';
|
|
6
6
|
export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_DIAGNOSTIC_HISTORY_LIMIT, DEFAULT_DIAGNOSTIC_STRING_LIMIT, RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION, RiddleProofArtifactSummary, RiddleProofCaptureArtifactSummary, RiddleProofCaptureDiagnostic, RiddleProofDiagnosticRedactionOptions, appendCaptureDiagnostic, createCaptureDiagnostic, redactForProofDiagnostics, summarizeCaptureArtifacts } from './diagnostics.cjs';
|
|
7
7
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.cjs';
|
|
8
|
+
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export { RiddleProofRunnerAdapters, RunRiddleProofInput, runRiddleProof } from '
|
|
|
5
5
|
export { RiddleProofAgentAdapter, RiddleProofAgentPayload, RiddleProofEngine, RiddleProofEngineHarnessConfig, RiddleProofEngineHarnessContext, RiddleProofEngineResult, RiddleProofShipMode, RiddleProofWorkflowParams, RunRiddleProofEngineHarnessInput, createDisabledRiddleProofAgentAdapter, readRiddleProofRunStatus, runRiddleProofEngineHarness } from './engine-harness.js';
|
|
6
6
|
export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_DIAGNOSTIC_HISTORY_LIMIT, DEFAULT_DIAGNOSTIC_STRING_LIMIT, RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION, RiddleProofArtifactSummary, RiddleProofCaptureArtifactSummary, RiddleProofCaptureDiagnostic, RiddleProofDiagnosticRedactionOptions, appendCaptureDiagnostic, createCaptureDiagnostic, redactForProofDiagnostics, summarizeCaptureArtifacts } from './diagnostics.js';
|
|
7
7
|
export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.js';
|
|
8
|
+
export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.js';
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
createDisabledRiddleProofAgentAdapter,
|
|
17
17
|
readRiddleProofRunStatus,
|
|
18
18
|
runRiddleProofEngineHarness
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GN7HSZ6G.js";
|
|
20
20
|
import {
|
|
21
21
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
22
22
|
appendRunEvent,
|
|
@@ -29,16 +29,6 @@ import {
|
|
|
29
29
|
normalizeRunParams,
|
|
30
30
|
setRunStatus
|
|
31
31
|
} from "./chunk-OASB3CYU.js";
|
|
32
|
-
import "./chunk-4YCWZVBN.js";
|
|
33
|
-
import {
|
|
34
|
-
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
35
|
-
RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
36
|
-
buildVisualProofSession,
|
|
37
|
-
compareVisualProofSessionFingerprint,
|
|
38
|
-
parseVisualProofSession,
|
|
39
|
-
visualSessionFingerprint,
|
|
40
|
-
visualSessionFingerprintBasis
|
|
41
|
-
} from "./chunk-ODORKNSO.js";
|
|
42
32
|
import {
|
|
43
33
|
applyTerminalMetadata,
|
|
44
34
|
compactRecord,
|
|
@@ -49,11 +39,30 @@ import {
|
|
|
49
39
|
normalizeTerminalMetadata,
|
|
50
40
|
recordValue
|
|
51
41
|
} from "./chunk-J2MERROF.js";
|
|
42
|
+
import {
|
|
43
|
+
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
44
|
+
RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
45
|
+
assessPlayabilityEvidence,
|
|
46
|
+
extractPlayabilityEvidence,
|
|
47
|
+
isRiddleProofPlayabilityMode
|
|
48
|
+
} from "./chunk-NSWT3VSV.js";
|
|
49
|
+
import "./chunk-4YCWZVBN.js";
|
|
50
|
+
import {
|
|
51
|
+
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
52
|
+
RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
53
|
+
buildVisualProofSession,
|
|
54
|
+
compareVisualProofSessionFingerprint,
|
|
55
|
+
parseVisualProofSession,
|
|
56
|
+
visualSessionFingerprint,
|
|
57
|
+
visualSessionFingerprintBasis
|
|
58
|
+
} from "./chunk-ODORKNSO.js";
|
|
52
59
|
export {
|
|
53
60
|
DEFAULT_DIAGNOSTIC_ARRAY_LIMIT,
|
|
54
61
|
DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
|
|
55
62
|
DEFAULT_DIAGNOSTIC_STRING_LIMIT,
|
|
56
63
|
RIDDLE_PROOF_CAPTURE_DIAGNOSTIC_VERSION,
|
|
64
|
+
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
65
|
+
RIDDLE_PROOF_PLAYABILITY_VERSION,
|
|
57
66
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
58
67
|
RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION,
|
|
59
68
|
RIDDLE_PROOF_VISUAL_SESSION_VERSION,
|
|
@@ -62,6 +71,7 @@ export {
|
|
|
62
71
|
appendStageHeartbeat,
|
|
63
72
|
applyPrLifecycleState,
|
|
64
73
|
applyTerminalMetadata,
|
|
74
|
+
assessPlayabilityEvidence,
|
|
65
75
|
buildVisualProofSession,
|
|
66
76
|
compactRecord,
|
|
67
77
|
compareVisualProofSessionFingerprint,
|
|
@@ -70,6 +80,8 @@ export {
|
|
|
70
80
|
createRunResult,
|
|
71
81
|
createRunState,
|
|
72
82
|
createRunStatusSnapshot,
|
|
83
|
+
extractPlayabilityEvidence,
|
|
84
|
+
isRiddleProofPlayabilityMode,
|
|
73
85
|
isSuccessfulStatus,
|
|
74
86
|
isTerminalStatus,
|
|
75
87
|
nonEmptyString,
|