@riddledc/riddle-proof 0.8.79 → 0.8.81

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/index.cjs CHANGED
@@ -3428,6 +3428,7 @@ __export(index_exports, {
3428
3428
  RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION: () => RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION,
3429
3429
  RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: () => RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
3430
3430
  RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION: () => RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
3431
+ RIDDLE_PROOF_ORDERED_TRACE_OPERATORS: () => RIDDLE_PROOF_ORDERED_TRACE_OPERATORS,
3431
3432
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION: () => RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
3432
3433
  RIDDLE_PROOF_PLAYABILITY_VERSION: () => RIDDLE_PROOF_PLAYABILITY_VERSION,
3433
3434
  RIDDLE_PROOF_PROFILE_CHECK_TYPES: () => RIDDLE_PROOF_PROFILE_CHECK_TYPES,
@@ -3458,6 +3459,8 @@ __export(index_exports, {
3458
3459
  assessBasicGameplayRoute: () => assessBasicGameplayRoute,
3459
3460
  assessPlayabilityEvidence: () => assessPlayabilityEvidence,
3460
3461
  assessRiddleProofChange: () => assessRiddleProofChange,
3462
+ assessRiddleProofOrderedTrace: () => assessRiddleProofOrderedTrace,
3463
+ assessRiddleProofOrderedTraceSetupResults: () => assessRiddleProofOrderedTraceSetupResults,
3461
3464
  assessRiddleProofProfileArtifactCompleteness: () => assessRiddleProofProfileArtifactCompleteness,
3462
3465
  assessRiddleProofProfileEvidence: () => assessRiddleProofProfileEvidence,
3463
3466
  attachBasicGameplayArtifactScreenshotHashes: () => attachBasicGameplayArtifactScreenshotHashes,
@@ -10205,6 +10208,7 @@ var RIDDLE_PROOF_PROFILE_CHECK_TYPES = [
10205
10208
  "selector_text_visible",
10206
10209
  "selector_text_absent",
10207
10210
  "selector_text_order",
10211
+ "ordered_trace",
10208
10212
  "observe_within",
10209
10213
  "frame_text_visible",
10210
10214
  "frame_url_equals",
@@ -10268,6 +10272,21 @@ var RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES = [
10268
10272
  "timedout",
10269
10273
  "failed"
10270
10274
  ];
10275
+ var RIDDLE_PROOF_ORDERED_TRACE_OPERATORS = [
10276
+ "exists",
10277
+ "equals",
10278
+ "not_equals",
10279
+ "truthy",
10280
+ "falsy",
10281
+ "gt",
10282
+ "gte",
10283
+ "lt",
10284
+ "lte",
10285
+ "abs_gt",
10286
+ "abs_gte",
10287
+ "abs_lt",
10288
+ "abs_lte"
10289
+ ];
10271
10290
  function uniqueNonEmptyStrings(values) {
10272
10291
  const seen = /* @__PURE__ */ new Set();
10273
10292
  const result = [];
@@ -10559,6 +10578,185 @@ function resolveJsonPath(root, path6) {
10559
10578
  }
10560
10579
  return { exists: true, value: current };
10561
10580
  }
10581
+ function assessRiddleProofOrderedTrace(trace, events) {
10582
+ const insufficient = (reason, traceLength = Array.isArray(trace) ? trace.length : 0, witnesses2 = [], missingEvent, missingPaths) => ({
10583
+ version: "riddle-proof.ordered-trace-assessment.v1",
10584
+ status: "proof_insufficient",
10585
+ trace_length: traceLength,
10586
+ witnesses: witnesses2,
10587
+ missing_event: missingEvent,
10588
+ missing_paths: missingPaths,
10589
+ reason
10590
+ });
10591
+ const parsePath = (path6) => {
10592
+ const segments = [];
10593
+ let token = "";
10594
+ const pushToken = () => {
10595
+ const value = token.trim();
10596
+ if (value) segments.push(value);
10597
+ token = "";
10598
+ };
10599
+ for (let index = 0; index < path6.length; index += 1) {
10600
+ const char = path6[index];
10601
+ if (char === ".") {
10602
+ pushToken();
10603
+ continue;
10604
+ }
10605
+ if (char !== "[") {
10606
+ token += char;
10607
+ continue;
10608
+ }
10609
+ pushToken();
10610
+ const closeIndex = path6.indexOf("]", index + 1);
10611
+ if (closeIndex === -1) throw new Error(`unterminated bracket at ${index}`);
10612
+ const bracket = path6.slice(index + 1, closeIndex).trim();
10613
+ if (!bracket) throw new Error(`empty bracket at ${index}`);
10614
+ if (/^\d+$/.test(bracket)) {
10615
+ segments.push(Number(bracket));
10616
+ } else {
10617
+ segments.push(bracket.replace(/^['"]|['"]$/g, ""));
10618
+ }
10619
+ index = closeIndex;
10620
+ }
10621
+ pushToken();
10622
+ return segments;
10623
+ };
10624
+ const resolve = (root, path6) => {
10625
+ let segments;
10626
+ try {
10627
+ segments = parsePath(path6);
10628
+ } catch {
10629
+ return { exists: false };
10630
+ }
10631
+ let current = root;
10632
+ for (const segment of segments) {
10633
+ if (Array.isArray(current)) {
10634
+ const index = typeof segment === "number" ? segment : /^\d+$/.test(segment) ? Number(segment) : -1;
10635
+ if (index < 0 || index >= current.length) return { exists: false };
10636
+ current = current[index];
10637
+ continue;
10638
+ }
10639
+ if (typeof segment !== "string" || current === null || typeof current !== "object") return { exists: false };
10640
+ if (!Object.hasOwn(current, segment)) return { exists: false };
10641
+ current = current[segment];
10642
+ }
10643
+ return { exists: true, value: current };
10644
+ };
10645
+ const valuesEqual = (left, right) => {
10646
+ if (Object.is(left, right)) return true;
10647
+ if (Array.isArray(left) || Array.isArray(right)) {
10648
+ return Array.isArray(left) && Array.isArray(right) && left.length === right.length && left.every((value, index) => valuesEqual(value, right[index]));
10649
+ }
10650
+ if (left === null || right === null || typeof left !== "object" || typeof right !== "object") return false;
10651
+ const leftRecord = left;
10652
+ const rightRecord = right;
10653
+ const leftKeys = Object.keys(leftRecord).sort();
10654
+ const rightKeys = Object.keys(rightRecord).sort();
10655
+ return leftKeys.length === rightKeys.length && leftKeys.every((key, index) => key === rightKeys[index] && valuesEqual(leftRecord[key], rightRecord[key]));
10656
+ };
10657
+ const numericOperator = (op) => [
10658
+ "gt",
10659
+ "gte",
10660
+ "lt",
10661
+ "lte",
10662
+ "abs_gt",
10663
+ "abs_gte",
10664
+ "abs_lt",
10665
+ "abs_lte"
10666
+ ].includes(op);
10667
+ const matches = (value, predicate) => {
10668
+ if (predicate.op === "exists") return true;
10669
+ if (predicate.op === "equals") return valuesEqual(value, predicate.value);
10670
+ if (predicate.op === "not_equals") return !valuesEqual(value, predicate.value);
10671
+ if (predicate.op === "truthy") return Boolean(value);
10672
+ if (predicate.op === "falsy") return !value;
10673
+ const observed = typeof value === "number" ? value : Number.NaN;
10674
+ const expected = typeof predicate.value === "number" ? predicate.value : Number.NaN;
10675
+ if (!Number.isFinite(observed) || !Number.isFinite(expected)) return false;
10676
+ const candidate = predicate.op.startsWith("abs_") ? Math.abs(observed) : observed;
10677
+ if (predicate.op === "gt" || predicate.op === "abs_gt") return candidate > expected;
10678
+ if (predicate.op === "gte" || predicate.op === "abs_gte") return candidate >= expected;
10679
+ if (predicate.op === "lt" || predicate.op === "abs_lt") return candidate < expected;
10680
+ return candidate <= expected;
10681
+ };
10682
+ if (!Array.isArray(trace) || trace.length === 0) return insufficient("trace_missing_or_empty");
10683
+ if (!Array.isArray(events) || events.length === 0) return insufficient("events_missing", trace.length);
10684
+ for (const event of events) {
10685
+ const missingPaths = event.predicates.filter((predicate) => !trace.some((sample) => {
10686
+ const resolved = resolve(sample, predicate.path);
10687
+ return resolved.exists && (!numericOperator(predicate.op) || typeof resolved.value === "number" && Number.isFinite(resolved.value));
10688
+ })).map((predicate) => predicate.path);
10689
+ if (missingPaths.length) {
10690
+ return insufficient("required_trace_field_missing", trace.length, [], event.label, Array.from(new Set(missingPaths)));
10691
+ }
10692
+ }
10693
+ const witnesses = [];
10694
+ let cursor = 0;
10695
+ for (const event of events) {
10696
+ let witnessIndex = -1;
10697
+ for (let index = cursor; index < trace.length; index += 1) {
10698
+ if (event.predicates.every((predicate) => {
10699
+ const resolved = resolve(trace[index], predicate.path);
10700
+ return resolved.exists && matches(resolved.value, predicate);
10701
+ })) {
10702
+ witnessIndex = index;
10703
+ break;
10704
+ }
10705
+ }
10706
+ if (witnessIndex < 0) {
10707
+ return {
10708
+ version: "riddle-proof.ordered-trace-assessment.v1",
10709
+ status: "failed",
10710
+ trace_length: trace.length,
10711
+ witnesses,
10712
+ missing_event: event.label,
10713
+ reason: "ordered_event_not_observed"
10714
+ };
10715
+ }
10716
+ witnesses.push({
10717
+ label: event.label,
10718
+ index: witnessIndex,
10719
+ observations: event.predicates.map((predicate) => {
10720
+ const observed = resolve(trace[witnessIndex], predicate.path).value;
10721
+ return {
10722
+ path: predicate.path,
10723
+ op: predicate.op,
10724
+ expected: predicate.value,
10725
+ observed
10726
+ };
10727
+ })
10728
+ });
10729
+ cursor = witnessIndex + 1;
10730
+ }
10731
+ return {
10732
+ version: "riddle-proof.ordered-trace-assessment.v1",
10733
+ status: "passed",
10734
+ trace_length: trace.length,
10735
+ witnesses
10736
+ };
10737
+ }
10738
+ function assessRiddleProofOrderedTraceSetupResults(results, setupActionLabel, tracePath, events) {
10739
+ const insufficient = (reason) => ({
10740
+ version: "riddle-proof.ordered-trace-assessment.v1",
10741
+ status: "proof_insufficient",
10742
+ trace_length: 0,
10743
+ witnesses: [],
10744
+ reason
10745
+ });
10746
+ if (!Array.isArray(results)) return insufficient("setup_results_missing");
10747
+ const source = results.find((item) => item && typeof item === "object" && !Array.isArray(item) && item.label === setupActionLabel);
10748
+ if (!source) return insufficient("setup_action_result_missing");
10749
+ if (!Object.hasOwn(source, "returned")) return insufficient("setup_action_return_missing");
10750
+ const segments = tracePath.split(".").map((segment) => segment.trim()).filter(Boolean);
10751
+ let trace = source.returned;
10752
+ for (const segment of segments) {
10753
+ if (trace === null || typeof trace !== "object" || Array.isArray(trace) || !Object.hasOwn(trace, segment)) {
10754
+ return insufficient("trace_path_missing");
10755
+ }
10756
+ trace = trace[segment];
10757
+ }
10758
+ return assessRiddleProofOrderedTrace(trace, events);
10759
+ }
10562
10760
  function evaluateHttpStatusBodyJsonAssertion(root, assertion) {
10563
10761
  const resolved = resolveJsonPath(root, assertion.path);
10564
10762
  const errors = [];
@@ -10665,6 +10863,7 @@ function profileSetupWindowCallReceipts(results) {
10665
10863
  return results.filter((result) => profileSetupResultAction(result) === "window_call").map((result) => {
10666
10864
  const receipt = {
10667
10865
  ordinal: result.ordinal ?? null,
10866
+ label: result.label ?? null,
10668
10867
  ok: result.ok !== false,
10669
10868
  path: result.path ?? null,
10670
10869
  return_captured: result.return_captured ?? null,
@@ -10683,6 +10882,7 @@ function profileSetupWindowEvalReceipts(results) {
10683
10882
  return results.filter((result) => profileSetupResultAction(result) === "window_eval").map((result) => {
10684
10883
  const receipt = {
10685
10884
  ordinal: result.ordinal ?? null,
10885
+ label: result.label ?? null,
10686
10886
  ok: result.ok !== false,
10687
10887
  script_length: result.script_length ?? null,
10688
10888
  return_captured: result.return_captured ?? null,
@@ -11126,10 +11326,14 @@ function normalizeViewport(input, index) {
11126
11326
  if (!width || !height || width < 100 || height < 100) {
11127
11327
  throw new Error(`target.viewports[${index}] requires numeric width and height >= 100.`);
11128
11328
  }
11329
+ const hasTouch = booleanValue2(valueFromOwn(input, "hasTouch", "has_touch"));
11330
+ const isMobile = booleanValue2(valueFromOwn(input, "isMobile", "is_mobile"));
11129
11331
  return {
11130
11332
  name: normalizeName(input.name || input.label, `viewport-${index + 1}`),
11131
11333
  width: Math.round(width),
11132
- height: Math.round(height)
11334
+ height: Math.round(height),
11335
+ ...hasTouch === void 0 ? {} : { hasTouch },
11336
+ ...isMobile === void 0 ? {} : { isMobile }
11133
11337
  };
11134
11338
  }
11135
11339
  function normalizeViewports(value) {
@@ -11955,6 +12159,51 @@ function dialogCountFieldForCheckType(type) {
11955
12159
  if (type === "dialog_dismiss_count_equals") return "dialog_dismiss_count";
11956
12160
  return "dialog_count";
11957
12161
  }
12162
+ function normalizeOrderedTraceEvents(value, label) {
12163
+ if (value === void 0) return void 0;
12164
+ if (!Array.isArray(value) || !value.length) throw new Error(`${label} must be a non-empty array.`);
12165
+ const seenLabels = /* @__PURE__ */ new Set();
12166
+ return value.map((item, eventIndex) => {
12167
+ const eventLabel = `${label}[${eventIndex}]`;
12168
+ if (!isRecord2(item)) throw new Error(`${eventLabel} must be an object.`);
12169
+ const name = stringFromOwn(item, "label", "name", "event");
12170
+ if (!name) throw new Error(`${eventLabel}.label is required.`);
12171
+ if (seenLabels.has(name)) throw new Error(`${eventLabel}.label must be unique.`);
12172
+ seenLabels.add(name);
12173
+ const predicatesInput = item.predicates ?? item.all ?? item.where;
12174
+ if (!Array.isArray(predicatesInput) || !predicatesInput.length) {
12175
+ throw new Error(`${eventLabel}.predicates must be a non-empty array.`);
12176
+ }
12177
+ const predicates = predicatesInput.map((predicateInput, predicateIndex) => {
12178
+ const predicateLabel = `${eventLabel}.predicates[${predicateIndex}]`;
12179
+ if (!isRecord2(predicateInput)) throw new Error(`${predicateLabel} must be an object.`);
12180
+ const path6 = stringFromOwn(predicateInput, "path", "field", "key");
12181
+ if (!path6) throw new Error(`${predicateLabel}.path is required.`);
12182
+ const op = stringFromOwn(predicateInput, "op", "operator");
12183
+ if (!op || !RIDDLE_PROOF_ORDERED_TRACE_OPERATORS.includes(op)) {
12184
+ throw new Error(`${predicateLabel}.op must be one of ${RIDDLE_PROOF_ORDERED_TRACE_OPERATORS.join(", ")}.`);
12185
+ }
12186
+ const requiresValue = !["exists", "truthy", "falsy"].includes(op);
12187
+ const hasValue = hasOwn(predicateInput, "value") || hasOwn(predicateInput, "expected");
12188
+ if (requiresValue && !hasValue) throw new Error(`${predicateLabel}.value is required for ${op}.`);
12189
+ const value2 = hasOwn(predicateInput, "value") ? predicateInput.value : predicateInput.expected;
12190
+ if (["gt", "gte", "lt", "lte", "abs_gt", "abs_gte", "abs_lt", "abs_lte"].includes(op)) {
12191
+ if (typeof value2 !== "number" || !Number.isFinite(value2)) {
12192
+ throw new Error(`${predicateLabel}.value must be a finite number for ${op}.`);
12193
+ }
12194
+ if (op.startsWith("abs_") && value2 < 0) {
12195
+ throw new Error(`${predicateLabel}.value must be non-negative for ${op}.`);
12196
+ }
12197
+ }
12198
+ return {
12199
+ path: path6,
12200
+ op,
12201
+ value: requiresValue ? toJsonValue(value2) : void 0
12202
+ };
12203
+ });
12204
+ return { label: name, predicates };
12205
+ });
12206
+ }
11958
12207
  function normalizeCheck(input, index) {
11959
12208
  if (!isRecord2(input)) throw new Error(`checks[${index}] must be an object.`);
11960
12209
  const type = stringValue6(input.type);
@@ -12005,6 +12254,17 @@ function normalizeCheck(input, index) {
12005
12254
  if (!stringValue6(input.selector)) throw new Error(`checks[${index}] selector_text_order requires selector.`);
12006
12255
  if (!expectedTexts?.length) throw new Error(`checks[${index}] selector_text_order requires expected_texts.`);
12007
12256
  }
12257
+ const setupActionLabel = stringFromOwn(input, "setup_action_label", "setupActionLabel", "source_action_label", "sourceActionLabel");
12258
+ const tracePath = stringFromOwn(input, "trace_path", "tracePath", "path");
12259
+ const orderedTraceEvents = normalizeOrderedTraceEvents(
12260
+ input.events ?? input.sequence ?? input.ordered_events ?? input.orderedEvents,
12261
+ `checks[${index}].events`
12262
+ );
12263
+ if (type === "ordered_trace") {
12264
+ if (!setupActionLabel) throw new Error(`checks[${index}] ordered_trace requires setup_action_label.`);
12265
+ if (!tracePath) throw new Error(`checks[${index}] ordered_trace requires trace_path.`);
12266
+ if (!orderedTraceEvents?.length) throw new Error(`checks[${index}] ordered_trace requires events.`);
12267
+ }
12008
12268
  const expectedRoutes = normalizeRouteInventoryRoutes(input.expected_routes ?? input.expectedRoutes, index);
12009
12269
  if (type === "route_inventory" && !expectedRoutes?.length) {
12010
12270
  throw new Error(`checks[${index}] route_inventory requires expected_routes.`);
@@ -12077,6 +12337,9 @@ function normalizeCheck(input, index) {
12077
12337
  body_not_patterns: bodyNotPatterns,
12078
12338
  body_json_assertions: bodyJsonAssertions,
12079
12339
  expected_texts: expectedTexts,
12340
+ setup_action_label: type === "ordered_trace" ? setupActionLabel : void 0,
12341
+ trace_path: type === "ordered_trace" ? tracePath : void 0,
12342
+ events: type === "ordered_trace" ? orderedTraceEvents : void 0,
12080
12343
  link_selector: stringValue6(input.link_selector) || stringValue6(input.linkSelector),
12081
12344
  source_selector: stringValue6(input.source_selector) || stringValue6(input.sourceSelector),
12082
12345
  route_path_prefix: stringValue6(input.route_path_prefix) || stringValue6(input.routePathPrefix),
@@ -12143,6 +12406,20 @@ function normalizeRiddleProofProfile(input, options = {}) {
12143
12406
  const targetUrl = stringValue6(options.url) || stringValue6(targetInput.url);
12144
12407
  const route = stringValue6(options.route) || stringValue6(targetInput.route);
12145
12408
  if (!targetUrl && !route) throw new Error("profile.target requires url or route, or pass --url.");
12409
+ const setupActions = normalizeSetupActions(targetInput.setup_actions ?? targetInput.setupActions);
12410
+ for (const [index, check] of checks.entries()) {
12411
+ if (check.type !== "ordered_trace") continue;
12412
+ const matches = (setupActions || []).filter((action) => action.label === check.setup_action_label);
12413
+ if (matches.length !== 1) {
12414
+ throw new Error(`checks[${index}] ordered_trace setup_action_label must match exactly one target.setup_actions label.`);
12415
+ }
12416
+ if (!["window_eval", "window_call", "window_call_until"].includes(matches[0].type)) {
12417
+ throw new Error(`checks[${index}] ordered_trace source action must capture a window_eval, window_call, or window_call_until return.`);
12418
+ }
12419
+ if (matches[0].capture_return === false) {
12420
+ throw new Error(`checks[${index}] ordered_trace source action must not set capture_return to false.`);
12421
+ }
12422
+ }
12146
12423
  return {
12147
12424
  version: RIDDLE_PROOF_PROFILE_VERSION,
12148
12425
  name: normalizeName(input.name, "riddle-proof-profile"),
@@ -12155,7 +12432,7 @@ function normalizeRiddleProofProfile(input, options = {}) {
12155
12432
  wait_for_selector: stringValue6(targetInput.wait_for_selector) || stringValue6(targetInput.waitForSelector),
12156
12433
  wait_ms: numberValue4(targetInput.wait_ms) ?? numberValue4(targetInput.waitMs),
12157
12434
  screenshot_full_page: normalizeTargetScreenshotFullPage(targetInput),
12158
- setup_actions: normalizeSetupActions(targetInput.setup_actions ?? targetInput.setupActions),
12435
+ setup_actions: setupActions,
12159
12436
  network_mocks: normalizeNetworkMocks(targetInput.network_mocks ?? targetInput.networkMocks)
12160
12437
  },
12161
12438
  checks,
@@ -13168,6 +13445,32 @@ function assessCheckFromEvidence(check, evidence) {
13168
13445
  message: failed ? `Selector ${key} text order failed in ${failed} viewport(s).` : void 0
13169
13446
  };
13170
13447
  }
13448
+ if (check.type === "ordered_trace") {
13449
+ const assessments = viewports.map((viewport) => ({
13450
+ viewport: viewport.name,
13451
+ assessment: assessRiddleProofOrderedTraceSetupResults(
13452
+ viewport.setup_action_results,
13453
+ check.setup_action_label || "",
13454
+ check.trace_path || "",
13455
+ check.events || []
13456
+ )
13457
+ }));
13458
+ const insufficient = assessments.filter((item) => item.assessment.status === "proof_insufficient");
13459
+ const failed = assessments.filter((item) => item.assessment.status === "failed");
13460
+ const status = insufficient.length ? "proof_insufficient" : failed.length ? "failed" : "passed";
13461
+ return {
13462
+ type: check.type,
13463
+ label: checkLabel(check),
13464
+ status,
13465
+ evidence: {
13466
+ setup_action_label: check.setup_action_label || "",
13467
+ trace_path: check.trace_path || "",
13468
+ events: toJsonValue((check.events || []).map((event) => event.label)),
13469
+ viewports: toJsonValue(assessments)
13470
+ },
13471
+ message: insufficient.length ? `Ordered trace evidence was insufficient in ${insufficient.length} viewport(s).` : failed.length ? `Ordered trace did not contain the required event sequence in ${failed.length} viewport(s).` : void 0
13472
+ };
13473
+ }
13171
13474
  if (check.type === "observe_within") {
13172
13475
  const key = observeWithinKey(check);
13173
13476
  const timeoutMs = observeWithinTimeoutMs(check);
@@ -13667,6 +13970,7 @@ function profileStatusFromEvidence(profile, evidence, checks) {
13667
13970
  if (!viewports.length || !checks.length) return "proof_insufficient";
13668
13971
  if (viewports.some((viewport) => viewport.navigation_error)) return "environment_blocked";
13669
13972
  if (expectedViewportCount && viewports.length < expectedViewportCount) return "proof_insufficient";
13973
+ if (checks.some((check) => check.status === "proof_insufficient")) return "proof_insufficient";
13670
13974
  if (checks.some((check) => check.status === "needs_human_review")) return "needs_human_review";
13671
13975
  if (checks.some((check) => check.status === "failed")) return "product_regression";
13672
13976
  return "passed";
@@ -13996,8 +14300,12 @@ function createRiddleProofProfileInsufficientResult(input) {
13996
14300
  error: message
13997
14301
  };
13998
14302
  }
13999
- function runtimeScriptAssessmentSource() {
14303
+ function runtimeScriptAssessmentSource(includeOrderedTrace = false) {
14304
+ const orderedTraceSource = includeOrderedTrace ? String.raw`
14305
+ const assessRiddleProofOrderedTrace = ${assessRiddleProofOrderedTrace.toString()};
14306
+ const assessRiddleProofOrderedTraceSetupResults = ${assessRiddleProofOrderedTraceSetupResults.toString()};` : "";
14000
14307
  return String.raw`
14308
+ ${orderedTraceSource}
14001
14309
  function normalizeRoutePath(path) {
14002
14310
  const value = path || "/";
14003
14311
  if (value === "/") return "/";
@@ -14827,6 +15135,7 @@ function profileSetupWindowCallReceipts(results) {
14827
15135
  .map((result) => {
14828
15136
  const receipt = {
14829
15137
  ordinal: result.ordinal ?? null,
15138
+ label: result.label ?? null,
14830
15139
  ok: result.ok !== false,
14831
15140
  path: result.path ?? null,
14832
15141
  return_captured: result.return_captured ?? null,
@@ -14847,6 +15156,7 @@ function profileSetupWindowEvalReceipts(results) {
14847
15156
  .map((result) => {
14848
15157
  const receipt = {
14849
15158
  ordinal: result.ordinal ?? null,
15159
+ label: result.label ?? null,
14850
15160
  ok: result.ok !== false,
14851
15161
  script_length: result.script_length ?? null,
14852
15162
  return_captured: result.return_captured ?? null,
@@ -15662,6 +15972,36 @@ function assessProfile(profile, evidence) {
15662
15972
  });
15663
15973
  continue;
15664
15974
  }
15975
+ if (check.type === "ordered_trace") {
15976
+ const assessments = checkViewports.map((viewport) => ({
15977
+ viewport: viewport.name,
15978
+ assessment: assessRiddleProofOrderedTraceSetupResults(
15979
+ viewport.setup_action_results,
15980
+ check.setup_action_label || "",
15981
+ check.trace_path || "",
15982
+ check.events || [],
15983
+ ),
15984
+ }));
15985
+ const insufficient = assessments.filter((item) => item.assessment.status === "proof_insufficient");
15986
+ const failed = assessments.filter((item) => item.assessment.status === "failed");
15987
+ checks.push({
15988
+ type: check.type,
15989
+ label: check.label || check.type,
15990
+ status: insufficient.length ? "proof_insufficient" : failed.length ? "failed" : "passed",
15991
+ evidence: {
15992
+ setup_action_label: check.setup_action_label || "",
15993
+ trace_path: check.trace_path || "",
15994
+ events: (check.events || []).map((event) => event.label),
15995
+ viewports: assessments,
15996
+ },
15997
+ message: insufficient.length
15998
+ ? "Ordered trace evidence was insufficient in " + insufficient.length + " viewport(s)."
15999
+ : failed.length
16000
+ ? "Ordered trace did not contain the required event sequence in " + failed.length + " viewport(s)."
16001
+ : undefined,
16002
+ });
16003
+ continue;
16004
+ }
15665
16005
  if (check.type === "observe_within") {
15666
16006
  const key = observeWithinKey(check);
15667
16007
  const timeoutMs = observeWithinTimeoutMs(check);
@@ -16018,6 +16358,7 @@ function assessProfile(profile, evidence) {
16018
16358
  if (!viewports.length || !checks.length) status = "proof_insufficient";
16019
16359
  else if (viewports.some((viewport) => viewport.navigation_error)) status = "environment_blocked";
16020
16360
  else if (expectedViewportCount && viewports.length < expectedViewportCount) status = "proof_insufficient";
16361
+ else if (checks.some((check) => check.status === "proof_insufficient")) status = "proof_insufficient";
16021
16362
  else if (checks.some((check) => check.status === "needs_human_review")) status = "needs_human_review";
16022
16363
  else if (checks.some((check) => check.status === "failed")) status = "product_regression";
16023
16364
  const screenshotLabels = profileScreenshotLabels(viewports);
@@ -16949,7 +17290,7 @@ let activeViewportName = null;
16949
17290
  async function executeSetupAction(action, ordinal, viewport) {
16950
17291
  const type = setupActionType(action);
16951
17292
  const frameSelector = setupFrameSelector(action);
16952
- const base = { ok: false, action: type || "unknown", ordinal, selector: action.selector || null, frame_selector: frameSelector || null, optional: action.optional === true };
17293
+ const base = { ok: false, action: type || "unknown", ordinal, label: action.label || null, selector: action.selector || null, frame_selector: frameSelector || null, optional: action.optional === true };
16953
17294
  const timeout = setupNumber(action.timeout_ms, 5000);
16954
17295
  try {
16955
17296
  if (type === "wait") {
@@ -19601,7 +19942,7 @@ async function captureViewport(viewport) {
19601
19942
  wait_error: waitError,
19602
19943
  };
19603
19944
  }
19604
- ${runtimeScriptAssessmentSource()}
19945
+ ${runtimeScriptAssessmentSource(profile.checks.some((check) => check.type === "ordered_trace"))}
19605
19946
  const viewports = [];
19606
19947
  function buildProfileEvidence(currentViewports) {
19607
19948
  const expectedViewportCount = (profile.target.viewports || []).length;
@@ -22261,6 +22602,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
22261
22602
  RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION,
22262
22603
  RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
22263
22604
  RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
22605
+ RIDDLE_PROOF_ORDERED_TRACE_OPERATORS,
22264
22606
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
22265
22607
  RIDDLE_PROOF_PLAYABILITY_VERSION,
22266
22608
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
@@ -22291,6 +22633,8 @@ function buildRiddleProofPrCommentMarkdown(input) {
22291
22633
  assessBasicGameplayRoute,
22292
22634
  assessPlayabilityEvidence,
22293
22635
  assessRiddleProofChange,
22636
+ assessRiddleProofOrderedTrace,
22637
+ assessRiddleProofOrderedTraceSetupResults,
22294
22638
  assessRiddleProofProfileArtifactCompleteness,
22295
22639
  assessRiddleProofProfileEvidence,
22296
22640
  attachBasicGameplayArtifactScreenshotHashes,
package/dist/index.d.cts CHANGED
@@ -11,7 +11,7 @@ export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_D
11
11
  export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.cjs';
12
12
  export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.cjs';
13
13
  export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayBoundsOffender, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.cjs';
14
- export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
14
+ export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_ORDERED_TRACE_OPERATORS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofOrderedTraceAssessment, RiddleProofOrderedTraceEvent, RiddleProofOrderedTraceOperator, RiddleProofOrderedTracePredicate, RiddleProofOrderedTraceWitness, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofOrderedTrace, assessRiddleProofOrderedTraceSetupResults, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.cjs';
15
15
  export { RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION, RiddleProofProfileChangedTextInput, RiddleProofProfileSuggestion, RiddleProofProfileSuggestionInput, RiddleProofProfileSuggestionsResult, suggestRiddleProofProfileChecks } from './profile-suggestions.cjs';
16
16
  export { CreateRiddleProofObservationReceiptInput, RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, RiddlePreviewReceipt, RiddleProofComparisonRole, RiddleProofExecutionPhase, RiddleProofExecutionTelemetry, RiddleProofObservationArtifact, RiddleProofObservationArtifactRole, RiddleProofObservationExecutor, RiddleProofObservationExecutorKind, RiddleProofObservationPublication, RiddleProofObservationReceipt, RiddleProofObservationTarget, RiddleProofSourceIdentity, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt } from './receipts.cjs';
17
17
  export { AssessRiddleProofChangeInput, CreateRiddleProofChangeReceiptInput, RIDDLE_PROOF_CHANGE_CONTRACT_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_VERSION, RIDDLE_PROOF_CHANGE_RESULT_VERSION, RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION, RiddleProofChangeContract, RiddleProofChangeDelta, RiddleProofChangeDeltaResult, RiddleProofChangeDeltaStatus, RiddleProofChangeGroupContract, RiddleProofChangeGroupResult, RiddleProofChangeProfileCheckStatus, RiddleProofChangeReceipt, RiddleProofChangeReceiptArtifact, RiddleProofChangeReceiptArtifactKind, RiddleProofChangeReceiptCheckCounts, RiddleProofChangeReceiptDelta, RiddleProofChangeReceiptSide, RiddleProofChangeReceiptVerdict, RiddleProofChangeRecommendation, RiddleProofChangeResult, RiddleProofChangeSide, RiddleProofChangeSourceBindingContract, RiddleProofChangeSourceBindingRequirement, RiddleProofChangeSourceBindingResult, RiddleProofChangeSourceBindingStatus, RiddleProofChangeStatus, RiddleProofCheckStatusTransitionDelta, RiddleProofHandoffReceipt, RiddleProofLegacyChangeReceipt, RiddleProofProfileStatusTransitionDelta, RiddleProofShippingAuthorization, assessRiddleProofChange, createRiddleProofChangeReceipt, createRiddleProofHandoffReceipt, migrateRiddleProofChangeReceipt, parseRiddleProofChangeReceipt, parseRiddleProofHandoffReceipt, riddleProofChangeReceiptHtml, riddleProofChangeReceiptMarkdown } from './change-proof.cjs';
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export { CreateCaptureDiagnosticInput, DEFAULT_DIAGNOSTIC_ARRAY_LIMIT, DEFAULT_D
11
11
  export { BuildVisualProofSessionInput, RIDDLE_PROOF_VISUAL_SESSION_FINGERPRINT_VERSION, RIDDLE_PROOF_VISUAL_SESSION_VERSION, VisualProofSessionMismatch, buildVisualProofSession, compareVisualProofSessionFingerprint, parseVisualProofSession, visualSessionFingerprint, visualSessionFingerprintBasis } from './proof-session.js';
12
12
  export { AssessPlayabilityOptions, RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION, RIDDLE_PROOF_PLAYABILITY_VERSION, RiddleProofPlayabilityAssessment, RiddleProofPlayabilityEvidence, assessPlayabilityEvidence, extractPlayabilityEvidence, isRiddleProofPlayabilityMode } from './playability.js';
13
13
  export { AssessBasicGameplayOptions, AttachBasicGameplayArtifactOptions, BASIC_GAMEPLAY_ACTION_TYPES, BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES, BasicGameplayActionResult, BasicGameplayActionType, BasicGameplayArtifactResolution, BasicGameplayAssessmentSummary, BasicGameplayBoundsOffender, BasicGameplayCanvasState, BasicGameplayCatchRecord, BasicGameplayChangeSummary, BasicGameplayFailureCode, BasicGameplayFixReference, BasicGameplayMetric, BasicGameplayMobileEvidence, BasicGameplayProgressCheckType, BasicGameplayProgressionCheck, BasicGameplayProofArtifact, BasicGameplayResponsiveViewportEvidence, BasicGameplayRouteReference, BasicGameplaySnapshot, BasicGameplaySuiteFailure, BasicGameplayWarningCode, CreateBasicGameplayCatchSummaryInput, RIDDLE_PROOF_BASIC_GAMEPLAY_ASSESSMENT_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_CATCH_VERSION, RIDDLE_PROOF_BASIC_GAMEPLAY_VERSION, RiddleProofBasicGameplayAssessment, RiddleProofBasicGameplayCatchSummary, RiddleProofBasicGameplayEvidence, RiddleProofBasicGameplayRouteAssessment, RiddleProofBasicGameplayRouteEvidence, assessBasicGameplayEvidence, assessBasicGameplayProgressionCheck, assessBasicGameplayProgressionChecks, assessBasicGameplayRoute, attachBasicGameplayArtifactScreenshotHashes, augmentBasicGameplayAssessmentWithProgressionChecks, compactBasicGameplayText, createBasicGameplayCatchRecords, createBasicGameplayCatchSummary, extractBasicGameplayEvidence, resolveBasicGameplayProgressionCheckWithArtifactScreenshots, sanitizeBasicGameplayJsonString } from './basic-gameplay.js';
14
- export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
14
+ export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_ORDERED_TRACE_OPERATORS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofOrderedTraceAssessment, RiddleProofOrderedTraceEvent, RiddleProofOrderedTraceOperator, RiddleProofOrderedTracePredicate, RiddleProofOrderedTraceWitness, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofOrderedTrace, assessRiddleProofOrderedTraceSetupResults, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from './profile.js';
15
15
  export { RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION, RiddleProofProfileChangedTextInput, RiddleProofProfileSuggestion, RiddleProofProfileSuggestionInput, RiddleProofProfileSuggestionsResult, suggestRiddleProofProfileChecks } from './profile-suggestions.js';
16
16
  export { CreateRiddleProofObservationReceiptInput, RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, RiddlePreviewReceipt, RiddleProofComparisonRole, RiddleProofExecutionPhase, RiddleProofExecutionTelemetry, RiddleProofObservationArtifact, RiddleProofObservationArtifactRole, RiddleProofObservationExecutor, RiddleProofObservationExecutorKind, RiddleProofObservationPublication, RiddleProofObservationReceipt, RiddleProofObservationTarget, RiddleProofSourceIdentity, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt } from './receipts.js';
17
17
  export { AssessRiddleProofChangeInput, CreateRiddleProofChangeReceiptInput, RIDDLE_PROOF_CHANGE_CONTRACT_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_VERSION, RIDDLE_PROOF_CHANGE_RESULT_VERSION, RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION, RiddleProofChangeContract, RiddleProofChangeDelta, RiddleProofChangeDeltaResult, RiddleProofChangeDeltaStatus, RiddleProofChangeGroupContract, RiddleProofChangeGroupResult, RiddleProofChangeProfileCheckStatus, RiddleProofChangeReceipt, RiddleProofChangeReceiptArtifact, RiddleProofChangeReceiptArtifactKind, RiddleProofChangeReceiptCheckCounts, RiddleProofChangeReceiptDelta, RiddleProofChangeReceiptSide, RiddleProofChangeReceiptVerdict, RiddleProofChangeRecommendation, RiddleProofChangeResult, RiddleProofChangeSide, RiddleProofChangeSourceBindingContract, RiddleProofChangeSourceBindingRequirement, RiddleProofChangeSourceBindingResult, RiddleProofChangeSourceBindingStatus, RiddleProofChangeStatus, RiddleProofCheckStatusTransitionDelta, RiddleProofHandoffReceipt, RiddleProofLegacyChangeReceipt, RiddleProofProfileStatusTransitionDelta, RiddleProofShippingAuthorization, assessRiddleProofChange, createRiddleProofChangeReceipt, createRiddleProofHandoffReceipt, migrateRiddleProofChangeReceipt, parseRiddleProofChangeReceipt, parseRiddleProofHandoffReceipt, riddleProofChangeReceiptHtml, riddleProofChangeReceiptMarkdown } from './change-proof.js';
package/dist/index.js CHANGED
@@ -63,11 +63,11 @@ import {
63
63
  buildRiddleProofHandoffPrCommentMarkdown,
64
64
  buildRiddleProofPrCommentMarkdown,
65
65
  summarizeRiddleProofPrComment
66
- } from "./chunk-7N6X54WG.js";
66
+ } from "./chunk-7OAETQU3.js";
67
67
  import {
68
68
  RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION,
69
69
  suggestRiddleProofProfileChecks
70
- } from "./chunk-RQPCKRKT.js";
70
+ } from "./chunk-FW7CKARF.js";
71
71
  import {
72
72
  RIDDLE_PROOF_CHANGE_CONTRACT_VERSION,
73
73
  RIDDLE_PROOF_CHANGE_RECEIPT_V1_VERSION,
@@ -82,7 +82,7 @@ import {
82
82
  parseRiddleProofHandoffReceipt,
83
83
  riddleProofChangeReceiptHtml,
84
84
  riddleProofChangeReceiptMarkdown
85
- } from "./chunk-6VFS2JFR.js";
85
+ } from "./chunk-LR4UYJDY.js";
86
86
  import {
87
87
  RIDDLE_PREVIEW_RECEIPT_VERSION,
88
88
  RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
@@ -92,6 +92,7 @@ import {
92
92
  } from "./chunk-MEVVL4TI.js";
93
93
  import {
94
94
  RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
95
+ RIDDLE_PROOF_ORDERED_TRACE_OPERATORS,
95
96
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
96
97
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
97
98
  RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
@@ -100,6 +101,8 @@ import {
100
101
  RIDDLE_PROOF_PROFILE_STATUSES,
101
102
  RIDDLE_PROOF_PROFILE_VERSION,
102
103
  applyRiddleProofProfileArtifactCompleteness,
104
+ assessRiddleProofOrderedTrace,
105
+ assessRiddleProofOrderedTraceSetupResults,
103
106
  assessRiddleProofProfileArtifactCompleteness,
104
107
  assessRiddleProofProfileEvidence,
105
108
  buildRiddleProofProfileScript,
@@ -119,7 +122,7 @@ import {
119
122
  resolveRiddleProofProfileTimeoutSec,
120
123
  slugifyRiddleProofProfileName,
121
124
  summarizeRiddleProofProfileResult
122
- } from "./chunk-FCSJZBC5.js";
125
+ } from "./chunk-2K3DIK7A.js";
123
126
  import {
124
127
  createCodexExecAgentAdapter,
125
128
  createCodexExecJsonRunner,
@@ -221,6 +224,7 @@ export {
221
224
  RIDDLE_PROOF_HANDOFF_RECEIPT_VERSION,
222
225
  RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
223
226
  RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
227
+ RIDDLE_PROOF_ORDERED_TRACE_OPERATORS,
224
228
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
225
229
  RIDDLE_PROOF_PLAYABILITY_VERSION,
226
230
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
@@ -251,6 +255,8 @@ export {
251
255
  assessBasicGameplayRoute,
252
256
  assessPlayabilityEvidence,
253
257
  assessRiddleProofChange,
258
+ assessRiddleProofOrderedTrace,
259
+ assessRiddleProofOrderedTraceSetupResults,
254
260
  assessRiddleProofProfileArtifactCompleteness,
255
261
  assessRiddleProofProfileEvidence,
256
262
  attachBasicGameplayArtifactScreenshotHashes,
@@ -3,10 +3,10 @@ import {
3
3
  buildRiddleProofHandoffPrCommentMarkdown,
4
4
  buildRiddleProofPrCommentMarkdown,
5
5
  summarizeRiddleProofPrComment
6
- } from "./chunk-7N6X54WG.js";
7
- import "./chunk-6VFS2JFR.js";
6
+ } from "./chunk-7OAETQU3.js";
7
+ import "./chunk-LR4UYJDY.js";
8
8
  import "./chunk-MEVVL4TI.js";
9
- import "./chunk-FCSJZBC5.js";
9
+ import "./chunk-2K3DIK7A.js";
10
10
  import "./chunk-ZAR7BWMN.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {