@riddledc/riddle-proof 0.7.19 → 0.7.21

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.
@@ -124,6 +124,7 @@ function assessBasicGameplayEvidence(evidence, options = {}) {
124
124
  const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
125
125
  name: result.name,
126
126
  path: result.path,
127
+ assessment_mode: result.assessment_mode,
127
128
  failures: result.failures,
128
129
  warnings: result.warnings,
129
130
  suite_failures: result.suite_failures
@@ -150,6 +151,8 @@ function assessBasicGameplayRoute(route, options = {}) {
150
151
  const failOnConsoleError = options.failOnConsoleError ?? false;
151
152
  const failures = [];
152
153
  const warnings = [];
154
+ const assessmentMode = routeAssessmentMode(route);
155
+ const auditAssessment = isAuditAssessmentRoute(route);
153
156
  const initial = route.initial || {};
154
157
  const timed = route.timed || {};
155
158
  const afterAction = route.after_action || route.afterAction || {};
@@ -161,7 +164,9 @@ function assessBasicGameplayRoute(route, options = {}) {
161
164
  const continuedActionChange = changed(afterAction, afterContinue);
162
165
  const cleanupBase = route.after_continue || route.afterContinue ? afterContinue : afterAction;
163
166
  const cleanupActionChange = changed(cleanupBase, afterCleanup);
164
- const surfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
167
+ const interactiveSurfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
168
+ const auditSurfaceVisible = numberValue(initial.body_text_length) >= minBodyTextLength || numberValue(initial.visible_large_node_count) >= minVisibleLargeNodes || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_canvas_count) > 0;
169
+ const surfaceVisible = auditAssessment ? auditSurfaceVisible : interactiveSurfaceVisible;
165
170
  const actionResults = listValue(route.action_results || route.actionResults);
166
171
  const continuedActionResults = listValue(route.continued_action_results || route.continuedActionResults);
167
172
  const continuedCleanupActionResults = listValue(route.continued_cleanup_action_results || route.continuedCleanupActionResults);
@@ -183,20 +188,21 @@ function assessBasicGameplayRoute(route, options = {}) {
183
188
  }
184
189
  if (!surfaceVisible) failures.push("no_game_surface");
185
190
  if (mobileOverflowPx > maxMobileOverflowPx) failures.push("mobile_horizontal_overflow");
186
- if (!actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
187
- if (actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
191
+ if (!auditAssessment && !actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
192
+ if (!auditAssessment && actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
188
193
  if (failOnConsoleError && consoleErrorCount > 0) failures.push("fatal_page_error");
189
194
  if (numberValue(initial.visible_canvas_count) > 0 && actionAttempted && !timedChange.canvas_changed && !actionChange.canvas_changed && !actionChange.screenshot_changed) {
190
195
  warnings.push("canvas_inert");
191
196
  }
192
197
  if (actionFailed) warnings.push("some_actions_failed");
193
- if (warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
198
+ if (!auditAssessment && warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
194
199
  warnings.push("missing_reset_path");
195
200
  }
196
201
  if (warnOnConsoleError && consoleErrorCount > 0) warnings.push("critical_console_error");
197
202
  return {
198
203
  name: route.name,
199
204
  path: route.path,
205
+ assessment_mode: assessmentMode,
200
206
  ok: failures.length === 0,
201
207
  failures,
202
208
  warnings,
@@ -326,6 +332,7 @@ function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidenc
326
332
  const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
327
333
  name: result.name,
328
334
  path: result.path,
335
+ assessment_mode: result.assessment_mode,
329
336
  failures: result.failures,
330
337
  warnings: result.warnings,
331
338
  suite_failures: result.suite_failures
@@ -760,6 +767,24 @@ function countCodes(codes) {
760
767
  for (const code of codes) counts[code] = (counts[code] || 0) + 1;
761
768
  return counts;
762
769
  }
770
+ function routeAssessmentMode(route) {
771
+ const raw = route.assessment_mode ?? route.assessmentMode ?? route.proof_mode ?? route.proofMode ?? null;
772
+ if (raw === null || raw === void 0) return route.audit === true ? "audit" : null;
773
+ const mode = String(raw).trim().toLowerCase().replace(/_/g, "-");
774
+ return mode || (route.audit === true ? "audit" : null);
775
+ }
776
+ function isAuditAssessmentRoute(route) {
777
+ const mode = routeAssessmentMode(route);
778
+ return route.audit === true || [
779
+ "audit",
780
+ "audit-only",
781
+ "no-diff",
782
+ "not-required",
783
+ "profile",
784
+ "report-only",
785
+ "static"
786
+ ].includes(String(mode || ""));
787
+ }
763
788
  function firstNumber(...values) {
764
789
  for (const value of values) {
765
790
  const number = numericValue(value);
@@ -126,6 +126,11 @@ interface BasicGameplayMobileEvidence {
126
126
  interface RiddleProofBasicGameplayRouteEvidence {
127
127
  name?: string;
128
128
  path?: string;
129
+ assessment_mode?: string | null;
130
+ assessmentMode?: string | null;
131
+ proof_mode?: string | null;
132
+ proofMode?: string | null;
133
+ audit?: boolean;
129
134
  http_status?: number | null;
130
135
  response_status?: number | null;
131
136
  status?: number | null;
@@ -180,6 +185,7 @@ interface BasicGameplayChangeSummary {
180
185
  interface RiddleProofBasicGameplayRouteAssessment {
181
186
  name?: string;
182
187
  path?: string;
188
+ assessment_mode?: string | null;
183
189
  ok: boolean;
184
190
  failures: BasicGameplayFailureCode[];
185
191
  warnings: BasicGameplayWarningCode[];
@@ -211,6 +217,7 @@ interface RiddleProofBasicGameplayAssessment {
211
217
  failing_routes: Array<{
212
218
  name?: string;
213
219
  path?: string;
220
+ assessment_mode?: string | null;
214
221
  failures: BasicGameplayFailureCode[];
215
222
  warnings: BasicGameplayWarningCode[];
216
223
  suite_failures?: BasicGameplaySuiteFailure[];
@@ -126,6 +126,11 @@ interface BasicGameplayMobileEvidence {
126
126
  interface RiddleProofBasicGameplayRouteEvidence {
127
127
  name?: string;
128
128
  path?: string;
129
+ assessment_mode?: string | null;
130
+ assessmentMode?: string | null;
131
+ proof_mode?: string | null;
132
+ proofMode?: string | null;
133
+ audit?: boolean;
129
134
  http_status?: number | null;
130
135
  response_status?: number | null;
131
136
  status?: number | null;
@@ -180,6 +185,7 @@ interface BasicGameplayChangeSummary {
180
185
  interface RiddleProofBasicGameplayRouteAssessment {
181
186
  name?: string;
182
187
  path?: string;
188
+ assessment_mode?: string | null;
183
189
  ok: boolean;
184
190
  failures: BasicGameplayFailureCode[];
185
191
  warnings: BasicGameplayWarningCode[];
@@ -211,6 +217,7 @@ interface RiddleProofBasicGameplayAssessment {
211
217
  failing_routes: Array<{
212
218
  name?: string;
213
219
  path?: string;
220
+ assessment_mode?: string | null;
214
221
  failures: BasicGameplayFailureCode[];
215
222
  warnings: BasicGameplayWarningCode[];
216
223
  suite_failures?: BasicGameplaySuiteFailure[];
@@ -16,7 +16,7 @@ import {
16
16
  extractBasicGameplayEvidence,
17
17
  resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
18
18
  sanitizeBasicGameplayJsonString
19
- } from "./chunk-6H742VFJ.js";
19
+ } from "./chunk-E6O3EOEI.js";
20
20
  export {
21
21
  BASIC_GAMEPLAY_ACTION_TYPES,
22
22
  BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES,
@@ -84,6 +84,7 @@ function assessBasicGameplayEvidence(evidence, options = {}) {
84
84
  const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
85
85
  name: result.name,
86
86
  path: result.path,
87
+ assessment_mode: result.assessment_mode,
87
88
  failures: result.failures,
88
89
  warnings: result.warnings,
89
90
  suite_failures: result.suite_failures
@@ -110,6 +111,8 @@ function assessBasicGameplayRoute(route, options = {}) {
110
111
  const failOnConsoleError = options.failOnConsoleError ?? false;
111
112
  const failures = [];
112
113
  const warnings = [];
114
+ const assessmentMode = routeAssessmentMode(route);
115
+ const auditAssessment = isAuditAssessmentRoute(route);
113
116
  const initial = route.initial || {};
114
117
  const timed = route.timed || {};
115
118
  const afterAction = route.after_action || route.afterAction || {};
@@ -121,7 +124,9 @@ function assessBasicGameplayRoute(route, options = {}) {
121
124
  const continuedActionChange = changed(afterAction, afterContinue);
122
125
  const cleanupBase = route.after_continue || route.afterContinue ? afterContinue : afterAction;
123
126
  const cleanupActionChange = changed(cleanupBase, afterCleanup);
124
- const surfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
127
+ const interactiveSurfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
128
+ const auditSurfaceVisible = numberValue(initial.body_text_length) >= minBodyTextLength || numberValue(initial.visible_large_node_count) >= minVisibleLargeNodes || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_canvas_count) > 0;
129
+ const surfaceVisible = auditAssessment ? auditSurfaceVisible : interactiveSurfaceVisible;
125
130
  const actionResults = listValue(route.action_results || route.actionResults);
126
131
  const continuedActionResults = listValue(route.continued_action_results || route.continuedActionResults);
127
132
  const continuedCleanupActionResults = listValue(route.continued_cleanup_action_results || route.continuedCleanupActionResults);
@@ -143,20 +148,21 @@ function assessBasicGameplayRoute(route, options = {}) {
143
148
  }
144
149
  if (!surfaceVisible) failures.push("no_game_surface");
145
150
  if (mobileOverflowPx > maxMobileOverflowPx) failures.push("mobile_horizontal_overflow");
146
- if (!actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
147
- if (actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
151
+ if (!auditAssessment && !actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
152
+ if (!auditAssessment && actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
148
153
  if (failOnConsoleError && consoleErrorCount > 0) failures.push("fatal_page_error");
149
154
  if (numberValue(initial.visible_canvas_count) > 0 && actionAttempted && !timedChange.canvas_changed && !actionChange.canvas_changed && !actionChange.screenshot_changed) {
150
155
  warnings.push("canvas_inert");
151
156
  }
152
157
  if (actionFailed) warnings.push("some_actions_failed");
153
- if (warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
158
+ if (!auditAssessment && warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
154
159
  warnings.push("missing_reset_path");
155
160
  }
156
161
  if (warnOnConsoleError && consoleErrorCount > 0) warnings.push("critical_console_error");
157
162
  return {
158
163
  name: route.name,
159
164
  path: route.path,
165
+ assessment_mode: assessmentMode,
160
166
  ok: failures.length === 0,
161
167
  failures,
162
168
  warnings,
@@ -286,6 +292,7 @@ function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidenc
286
292
  const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
287
293
  name: result.name,
288
294
  path: result.path,
295
+ assessment_mode: result.assessment_mode,
289
296
  failures: result.failures,
290
297
  warnings: result.warnings,
291
298
  suite_failures: result.suite_failures
@@ -720,6 +727,24 @@ function countCodes(codes) {
720
727
  for (const code of codes) counts[code] = (counts[code] || 0) + 1;
721
728
  return counts;
722
729
  }
730
+ function routeAssessmentMode(route) {
731
+ const raw = route.assessment_mode ?? route.assessmentMode ?? route.proof_mode ?? route.proofMode ?? null;
732
+ if (raw === null || raw === void 0) return route.audit === true ? "audit" : null;
733
+ const mode = String(raw).trim().toLowerCase().replace(/_/g, "-");
734
+ return mode || (route.audit === true ? "audit" : null);
735
+ }
736
+ function isAuditAssessmentRoute(route) {
737
+ const mode = routeAssessmentMode(route);
738
+ return route.audit === true || [
739
+ "audit",
740
+ "audit-only",
741
+ "no-diff",
742
+ "not-required",
743
+ "profile",
744
+ "report-only",
745
+ "static"
746
+ ].includes(String(mode || ""));
747
+ }
723
748
  function firstNumber(...values) {
724
749
  for (const value of values) {
725
750
  const number = numericValue(value);
@@ -836,6 +836,11 @@ function setupTextMatches(sample, action) {
836
836
  async function setupLocatorText(locator, index) {
837
837
  return await locator.nth(index).textContent({ timeout: 1000 }).catch(() => "");
838
838
  }
839
+ function compactSetupResultText(value) {
840
+ const text = String(value || "").replace(/\s+/g, " ").trim();
841
+ if (text.length <= 500) return text;
842
+ return text.slice(0, 500) + "... (" + text.length + " chars)";
843
+ }
839
844
  async function setupLocatorVisible(locator, index) {
840
845
  return await locator.nth(index).isVisible({ timeout: 1000 }).catch(() => false);
841
846
  }
@@ -869,12 +874,12 @@ async function executeSetupAction(action, ordinal) {
869
874
  const visible = await setupLocatorVisible(locator, index);
870
875
  if (visible) {
871
876
  targetIndex = index;
872
- matchedText = text;
877
+ matchedText = compactSetupResultText(text);
873
878
  break;
874
879
  }
875
880
  if (hiddenMatchIndex < 0) {
876
881
  hiddenMatchIndex = index;
877
- hiddenMatchedText = text;
882
+ hiddenMatchedText = compactSetupResultText(text);
878
883
  }
879
884
  }
880
885
  }
@@ -895,12 +900,12 @@ async function executeSetupAction(action, ordinal) {
895
900
  const text = await setupLocatorText(locator, index);
896
901
  lastText = text || lastText;
897
902
  if (setupTextMatches(text, action)) {
898
- return { ...base, ok: true, text, target_index: index, timeout_ms: timeout };
903
+ return { ...base, ok: true, text: compactSetupResultText(text), target_index: index, timeout_ms: timeout };
899
904
  }
900
905
  }
901
906
  await page.waitForTimeout(100);
902
907
  }
903
- return { ...base, reason: "text_not_found", text: lastText, timeout_ms: timeout };
908
+ return { ...base, reason: "text_not_found", text: compactSetupResultText(lastText), timeout_ms: timeout };
904
909
  }
905
910
  return { ...base, reason: "unsupported_action" };
906
911
  } catch (error) {
package/dist/cli.cjs CHANGED
@@ -7600,6 +7600,11 @@ function setupTextMatches(sample, action) {
7600
7600
  async function setupLocatorText(locator, index) {
7601
7601
  return await locator.nth(index).textContent({ timeout: 1000 }).catch(() => "");
7602
7602
  }
7603
+ function compactSetupResultText(value) {
7604
+ const text = String(value || "").replace(/\s+/g, " ").trim();
7605
+ if (text.length <= 500) return text;
7606
+ return text.slice(0, 500) + "... (" + text.length + " chars)";
7607
+ }
7603
7608
  async function setupLocatorVisible(locator, index) {
7604
7609
  return await locator.nth(index).isVisible({ timeout: 1000 }).catch(() => false);
7605
7610
  }
@@ -7633,12 +7638,12 @@ async function executeSetupAction(action, ordinal) {
7633
7638
  const visible = await setupLocatorVisible(locator, index);
7634
7639
  if (visible) {
7635
7640
  targetIndex = index;
7636
- matchedText = text;
7641
+ matchedText = compactSetupResultText(text);
7637
7642
  break;
7638
7643
  }
7639
7644
  if (hiddenMatchIndex < 0) {
7640
7645
  hiddenMatchIndex = index;
7641
- hiddenMatchedText = text;
7646
+ hiddenMatchedText = compactSetupResultText(text);
7642
7647
  }
7643
7648
  }
7644
7649
  }
@@ -7659,12 +7664,12 @@ async function executeSetupAction(action, ordinal) {
7659
7664
  const text = await setupLocatorText(locator, index);
7660
7665
  lastText = text || lastText;
7661
7666
  if (setupTextMatches(text, action)) {
7662
- return { ...base, ok: true, text, target_index: index, timeout_ms: timeout };
7667
+ return { ...base, ok: true, text: compactSetupResultText(text), target_index: index, timeout_ms: timeout };
7663
7668
  }
7664
7669
  }
7665
7670
  await page.waitForTimeout(100);
7666
7671
  }
7667
- return { ...base, reason: "text_not_found", text: lastText, timeout_ms: timeout };
7672
+ return { ...base, reason: "text_not_found", text: compactSetupResultText(lastText), timeout_ms: timeout };
7668
7673
  }
7669
7674
  return { ...base, reason: "unsupported_action" };
7670
7675
  } catch (error) {
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  profileStatusExitCode,
11
11
  resolveRiddleProofProfileTargetUrl,
12
12
  resolveRiddleProofProfileTimeoutSec
13
- } from "./chunk-ZGSAXSBW.js";
13
+ } from "./chunk-TPUR67H5.js";
14
14
  import {
15
15
  createRiddleApiClient,
16
16
  parseRiddleViewport
package/dist/index.cjs CHANGED
@@ -7894,6 +7894,7 @@ function assessBasicGameplayEvidence(evidence, options = {}) {
7894
7894
  const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
7895
7895
  name: result.name,
7896
7896
  path: result.path,
7897
+ assessment_mode: result.assessment_mode,
7897
7898
  failures: result.failures,
7898
7899
  warnings: result.warnings,
7899
7900
  suite_failures: result.suite_failures
@@ -7920,6 +7921,8 @@ function assessBasicGameplayRoute(route, options = {}) {
7920
7921
  const failOnConsoleError = options.failOnConsoleError ?? false;
7921
7922
  const failures = [];
7922
7923
  const warnings = [];
7924
+ const assessmentMode = routeAssessmentMode(route);
7925
+ const auditAssessment = isAuditAssessmentRoute(route);
7923
7926
  const initial = route.initial || {};
7924
7927
  const timed = route.timed || {};
7925
7928
  const afterAction = route.after_action || route.afterAction || {};
@@ -7931,7 +7934,9 @@ function assessBasicGameplayRoute(route, options = {}) {
7931
7934
  const continuedActionChange = changed(afterAction, afterContinue);
7932
7935
  const cleanupBase = route.after_continue || route.afterContinue ? afterContinue : afterAction;
7933
7936
  const cleanupActionChange = changed(cleanupBase, afterCleanup);
7934
- const surfaceVisible = numberValue2(initial.visible_canvas_count) > 0 || numberValue2(initial.enabled_clickable_count) > 0 || numberValue2(initial.visible_large_node_count) >= minSurfaceLargeNodes;
7937
+ const interactiveSurfaceVisible = numberValue2(initial.visible_canvas_count) > 0 || numberValue2(initial.enabled_clickable_count) > 0 || numberValue2(initial.visible_large_node_count) >= minSurfaceLargeNodes;
7938
+ const auditSurfaceVisible = numberValue2(initial.body_text_length) >= minBodyTextLength || numberValue2(initial.visible_large_node_count) >= minVisibleLargeNodes || numberValue2(initial.enabled_clickable_count) > 0 || numberValue2(initial.visible_canvas_count) > 0;
7939
+ const surfaceVisible = auditAssessment ? auditSurfaceVisible : interactiveSurfaceVisible;
7935
7940
  const actionResults = listValue2(route.action_results || route.actionResults);
7936
7941
  const continuedActionResults = listValue2(route.continued_action_results || route.continuedActionResults);
7937
7942
  const continuedCleanupActionResults = listValue2(route.continued_cleanup_action_results || route.continuedCleanupActionResults);
@@ -7953,20 +7958,21 @@ function assessBasicGameplayRoute(route, options = {}) {
7953
7958
  }
7954
7959
  if (!surfaceVisible) failures.push("no_game_surface");
7955
7960
  if (mobileOverflowPx > maxMobileOverflowPx) failures.push("mobile_horizontal_overflow");
7956
- if (!actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
7957
- if (actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
7961
+ if (!auditAssessment && !actionAttempted && !timedChange.changed) failures.push("primary_control_missing");
7962
+ if (!auditAssessment && actionAttempted && !stateChangeObserved) failures.push("primary_control_inert");
7958
7963
  if (failOnConsoleError && consoleErrorCount > 0) failures.push("fatal_page_error");
7959
7964
  if (numberValue2(initial.visible_canvas_count) > 0 && actionAttempted && !timedChange.canvas_changed && !actionChange.canvas_changed && !actionChange.screenshot_changed) {
7960
7965
  warnings.push("canvas_inert");
7961
7966
  }
7962
7967
  if (actionFailed) warnings.push("some_actions_failed");
7963
- if (warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
7968
+ if (!auditAssessment && warnOnMissingResetPath && !resetPathPresent && route.requires_reset !== false && actionAttempted && stateChangeObserved) {
7964
7969
  warnings.push("missing_reset_path");
7965
7970
  }
7966
7971
  if (warnOnConsoleError && consoleErrorCount > 0) warnings.push("critical_console_error");
7967
7972
  return {
7968
7973
  name: route.name,
7969
7974
  path: route.path,
7975
+ assessment_mode: assessmentMode,
7970
7976
  ok: failures.length === 0,
7971
7977
  failures,
7972
7978
  warnings,
@@ -8096,6 +8102,7 @@ function augmentBasicGameplayAssessmentWithProgressionChecks(assessment, evidenc
8096
8102
  const failingRoutes = routeResults.filter((result) => !result.ok).map((result) => ({
8097
8103
  name: result.name,
8098
8104
  path: result.path,
8105
+ assessment_mode: result.assessment_mode,
8099
8106
  failures: result.failures,
8100
8107
  warnings: result.warnings,
8101
8108
  suite_failures: result.suite_failures
@@ -8530,6 +8537,24 @@ function countCodes(codes) {
8530
8537
  for (const code of codes) counts[code] = (counts[code] || 0) + 1;
8531
8538
  return counts;
8532
8539
  }
8540
+ function routeAssessmentMode(route) {
8541
+ const raw = route.assessment_mode ?? route.assessmentMode ?? route.proof_mode ?? route.proofMode ?? null;
8542
+ if (raw === null || raw === void 0) return route.audit === true ? "audit" : null;
8543
+ const mode = String(raw).trim().toLowerCase().replace(/_/g, "-");
8544
+ return mode || (route.audit === true ? "audit" : null);
8545
+ }
8546
+ function isAuditAssessmentRoute(route) {
8547
+ const mode = routeAssessmentMode(route);
8548
+ return route.audit === true || [
8549
+ "audit",
8550
+ "audit-only",
8551
+ "no-diff",
8552
+ "not-required",
8553
+ "profile",
8554
+ "report-only",
8555
+ "static"
8556
+ ].includes(String(mode || ""));
8557
+ }
8533
8558
  function firstNumber(...values) {
8534
8559
  for (const value of values) {
8535
8560
  const number = numericValue3(value);
@@ -9405,6 +9430,11 @@ function setupTextMatches(sample, action) {
9405
9430
  async function setupLocatorText(locator, index) {
9406
9431
  return await locator.nth(index).textContent({ timeout: 1000 }).catch(() => "");
9407
9432
  }
9433
+ function compactSetupResultText(value) {
9434
+ const text = String(value || "").replace(/\s+/g, " ").trim();
9435
+ if (text.length <= 500) return text;
9436
+ return text.slice(0, 500) + "... (" + text.length + " chars)";
9437
+ }
9408
9438
  async function setupLocatorVisible(locator, index) {
9409
9439
  return await locator.nth(index).isVisible({ timeout: 1000 }).catch(() => false);
9410
9440
  }
@@ -9438,12 +9468,12 @@ async function executeSetupAction(action, ordinal) {
9438
9468
  const visible = await setupLocatorVisible(locator, index);
9439
9469
  if (visible) {
9440
9470
  targetIndex = index;
9441
- matchedText = text;
9471
+ matchedText = compactSetupResultText(text);
9442
9472
  break;
9443
9473
  }
9444
9474
  if (hiddenMatchIndex < 0) {
9445
9475
  hiddenMatchIndex = index;
9446
- hiddenMatchedText = text;
9476
+ hiddenMatchedText = compactSetupResultText(text);
9447
9477
  }
9448
9478
  }
9449
9479
  }
@@ -9464,12 +9494,12 @@ async function executeSetupAction(action, ordinal) {
9464
9494
  const text = await setupLocatorText(locator, index);
9465
9495
  lastText = text || lastText;
9466
9496
  if (setupTextMatches(text, action)) {
9467
- return { ...base, ok: true, text, target_index: index, timeout_ms: timeout };
9497
+ return { ...base, ok: true, text: compactSetupResultText(text), target_index: index, timeout_ms: timeout };
9468
9498
  }
9469
9499
  }
9470
9500
  await page.waitForTimeout(100);
9471
9501
  }
9472
- return { ...base, reason: "text_not_found", text: lastText, timeout_ms: timeout };
9502
+ return { ...base, reason: "text_not_found", text: compactSetupResultText(lastText), timeout_ms: timeout };
9473
9503
  }
9474
9504
  return { ...base, reason: "unsupported_action" };
9475
9505
  } catch (error) {
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  extractBasicGameplayEvidence,
37
37
  resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
38
38
  sanitizeBasicGameplayJsonString
39
- } from "./chunk-6H742VFJ.js";
39
+ } from "./chunk-E6O3EOEI.js";
40
40
  import {
41
41
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
42
42
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
@@ -58,7 +58,7 @@ import {
58
58
  resolveRiddleProofProfileTimeoutSec,
59
59
  slugifyRiddleProofProfileName,
60
60
  summarizeRiddleProofProfileResult
61
- } from "./chunk-ZGSAXSBW.js";
61
+ } from "./chunk-TPUR67H5.js";
62
62
  import {
63
63
  DEFAULT_RIDDLE_API_BASE_URL,
64
64
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -879,6 +879,11 @@ function setupTextMatches(sample, action) {
879
879
  async function setupLocatorText(locator, index) {
880
880
  return await locator.nth(index).textContent({ timeout: 1000 }).catch(() => "");
881
881
  }
882
+ function compactSetupResultText(value) {
883
+ const text = String(value || "").replace(/\s+/g, " ").trim();
884
+ if (text.length <= 500) return text;
885
+ return text.slice(0, 500) + "... (" + text.length + " chars)";
886
+ }
882
887
  async function setupLocatorVisible(locator, index) {
883
888
  return await locator.nth(index).isVisible({ timeout: 1000 }).catch(() => false);
884
889
  }
@@ -912,12 +917,12 @@ async function executeSetupAction(action, ordinal) {
912
917
  const visible = await setupLocatorVisible(locator, index);
913
918
  if (visible) {
914
919
  targetIndex = index;
915
- matchedText = text;
920
+ matchedText = compactSetupResultText(text);
916
921
  break;
917
922
  }
918
923
  if (hiddenMatchIndex < 0) {
919
924
  hiddenMatchIndex = index;
920
- hiddenMatchedText = text;
925
+ hiddenMatchedText = compactSetupResultText(text);
921
926
  }
922
927
  }
923
928
  }
@@ -938,12 +943,12 @@ async function executeSetupAction(action, ordinal) {
938
943
  const text = await setupLocatorText(locator, index);
939
944
  lastText = text || lastText;
940
945
  if (setupTextMatches(text, action)) {
941
- return { ...base, ok: true, text, target_index: index, timeout_ms: timeout };
946
+ return { ...base, ok: true, text: compactSetupResultText(text), target_index: index, timeout_ms: timeout };
942
947
  }
943
948
  }
944
949
  await page.waitForTimeout(100);
945
950
  }
946
- return { ...base, reason: "text_not_found", text: lastText, timeout_ms: timeout };
951
+ return { ...base, reason: "text_not_found", text: compactSetupResultText(lastText), timeout_ms: timeout };
947
952
  }
948
953
  return { ...base, reason: "unsupported_action" };
949
954
  } catch (error) {
package/dist/profile.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  resolveRiddleProofProfileTimeoutSec,
20
20
  slugifyRiddleProofProfileName,
21
21
  summarizeRiddleProofProfileResult
22
- } from "./chunk-ZGSAXSBW.js";
22
+ } from "./chunk-TPUR67H5.js";
23
23
  export {
24
24
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
25
25
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.19",
3
+ "version": "0.7.21",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",