@riddledc/riddle-proof 0.7.6 → 0.7.8

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 CHANGED
@@ -301,9 +301,10 @@ const catches = createBasicGameplayCatchRecords(assessment, evidence);
301
301
  ```
302
302
 
303
303
  The package owns generic contracts such as `state_path`, `state_call`,
304
- `property_path`, `number_unchanged`, held-key/window-call/evaluate action type
305
- constants, and JSON-safe text compaction. Site-specific manifests, selectors,
306
- and deterministic game scripts should stay in the caller.
304
+ `property_path`, `number_unchanged`, held-key, canvas-click,
305
+ canvas-pointer-down/move/up, window-call/evaluate action type constants, and
306
+ JSON-safe text compaction. Site-specific manifests, selectors, and
307
+ deterministic game scripts should stay in the caller.
307
308
 
308
309
  ### Server Preview Usage
309
310
 
@@ -51,6 +51,10 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
51
51
  "repeat",
52
52
  "click",
53
53
  "click-by-text",
54
+ "canvas-click",
55
+ "canvas-pointer-down",
56
+ "canvas-pointer-move",
57
+ "canvas-pointer-up",
54
58
  "wait-for-text",
55
59
  "window-call",
56
60
  "evaluate"
@@ -144,16 +148,20 @@ function assessBasicGameplayRoute(route, options = {}) {
144
148
  const initial = route.initial || {};
145
149
  const timed = route.timed || {};
146
150
  const afterAction = route.after_action || route.afterAction || {};
151
+ const afterContinue = route.after_continue || route.afterContinue || {};
147
152
  const mobile = route.mobile || {};
148
153
  const timedChange = changed(initial, timed);
149
154
  const actionChange = changed(timed, afterAction);
155
+ const continuedActionChange = changed(afterAction, afterContinue);
150
156
  const surfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
151
157
  const actionResults = listValue(route.action_results || route.actionResults);
158
+ const continuedActionResults = listValue(route.continued_action_results || route.continuedActionResults);
152
159
  const restartActionResults = listValue(route.restart_action_results || route.restartActionResults);
153
- const actionAttempted = actionResults.some((result) => result.ok === true && result.action !== "wait");
154
- const actionFailed = actionResults.some((result) => result.ok === false && result.action !== "wait");
160
+ const primaryActionResults = [...actionResults, ...continuedActionResults];
161
+ const actionAttempted = primaryActionResults.some((result) => result.ok === true && result.action !== "wait");
162
+ const actionFailed = primaryActionResults.some((result) => result.ok === false && result.action !== "wait");
155
163
  const restartActionAttempted = restartActionResults.some((result) => result.ok === true && result.action !== "wait");
156
- const stateChangeObserved = actionChange.changed || timedChange.changed;
164
+ const stateChangeObserved = actionChange.changed || continuedActionChange.changed || timedChange.changed;
157
165
  const resetPathPresent = numberValue(initial.reset_control_count) > 0 || numberValue(timed.reset_control_count) > 0 || numberValue(afterAction.reset_control_count) > 0 || restartActionAttempted;
158
166
  const responseStatus = firstNumber(route.http_status, route.response_status, route.status);
159
167
  const pageErrorCount = numberValue(route.page_error_count);
@@ -188,7 +196,7 @@ function assessBasicGameplayRoute(route, options = {}) {
188
196
  surface_visible: surfaceVisible,
189
197
  action_attempted: actionAttempted,
190
198
  timed_progression_observed: timedChange.changed,
191
- first_interaction_observed: actionChange.changed,
199
+ first_interaction_observed: actionChange.changed || continuedActionChange.changed,
192
200
  state_change_observed: stateChangeObserved,
193
201
  mobile_overflow_absent: mobileOverflowPx <= maxMobileOverflowPx,
194
202
  reset_path_present: resetPathPresent,
@@ -196,7 +204,8 @@ function assessBasicGameplayRoute(route, options = {}) {
196
204
  },
197
205
  diffs: {
198
206
  timed: timedChange,
199
- after_action: actionChange
207
+ after_action: actionChange,
208
+ after_continue: continuedActionChange
200
209
  }
201
210
  };
202
211
  }
@@ -36,7 +36,7 @@ interface BasicGameplayActionResult {
36
36
  action?: string;
37
37
  [key: string]: unknown;
38
38
  }
39
- declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "wait-for-text", "window-call", "evaluate"];
39
+ declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "canvas-click", "canvas-pointer-down", "canvas-pointer-move", "canvas-pointer-up", "wait-for-text", "window-call", "evaluate"];
40
40
  declare const BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES: readonly ["selector_count_increases", "selector_count_at_least", "selector_absent", "selector_text_matches", "number_increases", "number_decreases", "number_at_least", "number_gte", "number_unchanged", "number_stays_equal", "number_equals", "canvas_hash_changes", "screenshot_hash_changes", "visual_hash_changes", "state_changes"];
41
41
  type BasicGameplayActionType = typeof BASIC_GAMEPLAY_ACTION_TYPES[number] | (string & {});
42
42
  type BasicGameplayProgressCheckType = typeof BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES[number] | (string & {});
@@ -118,10 +118,13 @@ interface RiddleProofBasicGameplayRouteEvidence {
118
118
  timed?: BasicGameplaySnapshot;
119
119
  after_action?: BasicGameplaySnapshot;
120
120
  afterAction?: BasicGameplaySnapshot;
121
+ after_continue?: BasicGameplaySnapshot;
122
+ afterContinue?: BasicGameplaySnapshot;
121
123
  mobile?: BasicGameplayMobileEvidence;
122
124
  action_results?: BasicGameplayActionResult[];
123
125
  actionResults?: BasicGameplayActionResult[];
124
126
  continued_action_results?: BasicGameplayActionResult[];
127
+ continuedActionResults?: BasicGameplayActionResult[];
125
128
  restart_action_results?: BasicGameplayActionResult[];
126
129
  restartActionResults?: BasicGameplayActionResult[];
127
130
  progression_checks?: BasicGameplayProgressionCheck[];
@@ -172,6 +175,7 @@ interface RiddleProofBasicGameplayRouteAssessment {
172
175
  diffs: {
173
176
  timed: BasicGameplayChangeSummary;
174
177
  after_action: BasicGameplayChangeSummary;
178
+ after_continue?: BasicGameplayChangeSummary;
175
179
  };
176
180
  }
177
181
  interface RiddleProofBasicGameplayAssessment {
@@ -36,7 +36,7 @@ interface BasicGameplayActionResult {
36
36
  action?: string;
37
37
  [key: string]: unknown;
38
38
  }
39
- declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "wait-for-text", "window-call", "evaluate"];
39
+ declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "canvas-click", "canvas-pointer-down", "canvas-pointer-move", "canvas-pointer-up", "wait-for-text", "window-call", "evaluate"];
40
40
  declare const BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES: readonly ["selector_count_increases", "selector_count_at_least", "selector_absent", "selector_text_matches", "number_increases", "number_decreases", "number_at_least", "number_gte", "number_unchanged", "number_stays_equal", "number_equals", "canvas_hash_changes", "screenshot_hash_changes", "visual_hash_changes", "state_changes"];
41
41
  type BasicGameplayActionType = typeof BASIC_GAMEPLAY_ACTION_TYPES[number] | (string & {});
42
42
  type BasicGameplayProgressCheckType = typeof BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES[number] | (string & {});
@@ -118,10 +118,13 @@ interface RiddleProofBasicGameplayRouteEvidence {
118
118
  timed?: BasicGameplaySnapshot;
119
119
  after_action?: BasicGameplaySnapshot;
120
120
  afterAction?: BasicGameplaySnapshot;
121
+ after_continue?: BasicGameplaySnapshot;
122
+ afterContinue?: BasicGameplaySnapshot;
121
123
  mobile?: BasicGameplayMobileEvidence;
122
124
  action_results?: BasicGameplayActionResult[];
123
125
  actionResults?: BasicGameplayActionResult[];
124
126
  continued_action_results?: BasicGameplayActionResult[];
127
+ continuedActionResults?: BasicGameplayActionResult[];
125
128
  restart_action_results?: BasicGameplayActionResult[];
126
129
  restartActionResults?: BasicGameplayActionResult[];
127
130
  progression_checks?: BasicGameplayProgressionCheck[];
@@ -172,6 +175,7 @@ interface RiddleProofBasicGameplayRouteAssessment {
172
175
  diffs: {
173
176
  timed: BasicGameplayChangeSummary;
174
177
  after_action: BasicGameplayChangeSummary;
178
+ after_continue?: BasicGameplayChangeSummary;
175
179
  };
176
180
  }
177
181
  interface RiddleProofBasicGameplayAssessment {
@@ -16,7 +16,7 @@ import {
16
16
  extractBasicGameplayEvidence,
17
17
  resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
18
18
  sanitizeBasicGameplayJsonString
19
- } from "./chunk-LHS7ZV2T.js";
19
+ } from "./chunk-5A4SL6CX.js";
20
20
  export {
21
21
  BASIC_GAMEPLAY_ACTION_TYPES,
22
22
  BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES,
@@ -11,6 +11,10 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
11
11
  "repeat",
12
12
  "click",
13
13
  "click-by-text",
14
+ "canvas-click",
15
+ "canvas-pointer-down",
16
+ "canvas-pointer-move",
17
+ "canvas-pointer-up",
14
18
  "wait-for-text",
15
19
  "window-call",
16
20
  "evaluate"
@@ -104,16 +108,20 @@ function assessBasicGameplayRoute(route, options = {}) {
104
108
  const initial = route.initial || {};
105
109
  const timed = route.timed || {};
106
110
  const afterAction = route.after_action || route.afterAction || {};
111
+ const afterContinue = route.after_continue || route.afterContinue || {};
107
112
  const mobile = route.mobile || {};
108
113
  const timedChange = changed(initial, timed);
109
114
  const actionChange = changed(timed, afterAction);
115
+ const continuedActionChange = changed(afterAction, afterContinue);
110
116
  const surfaceVisible = numberValue(initial.visible_canvas_count) > 0 || numberValue(initial.enabled_clickable_count) > 0 || numberValue(initial.visible_large_node_count) >= minSurfaceLargeNodes;
111
117
  const actionResults = listValue(route.action_results || route.actionResults);
118
+ const continuedActionResults = listValue(route.continued_action_results || route.continuedActionResults);
112
119
  const restartActionResults = listValue(route.restart_action_results || route.restartActionResults);
113
- const actionAttempted = actionResults.some((result) => result.ok === true && result.action !== "wait");
114
- const actionFailed = actionResults.some((result) => result.ok === false && result.action !== "wait");
120
+ const primaryActionResults = [...actionResults, ...continuedActionResults];
121
+ const actionAttempted = primaryActionResults.some((result) => result.ok === true && result.action !== "wait");
122
+ const actionFailed = primaryActionResults.some((result) => result.ok === false && result.action !== "wait");
115
123
  const restartActionAttempted = restartActionResults.some((result) => result.ok === true && result.action !== "wait");
116
- const stateChangeObserved = actionChange.changed || timedChange.changed;
124
+ const stateChangeObserved = actionChange.changed || continuedActionChange.changed || timedChange.changed;
117
125
  const resetPathPresent = numberValue(initial.reset_control_count) > 0 || numberValue(timed.reset_control_count) > 0 || numberValue(afterAction.reset_control_count) > 0 || restartActionAttempted;
118
126
  const responseStatus = firstNumber(route.http_status, route.response_status, route.status);
119
127
  const pageErrorCount = numberValue(route.page_error_count);
@@ -148,7 +156,7 @@ function assessBasicGameplayRoute(route, options = {}) {
148
156
  surface_visible: surfaceVisible,
149
157
  action_attempted: actionAttempted,
150
158
  timed_progression_observed: timedChange.changed,
151
- first_interaction_observed: actionChange.changed,
159
+ first_interaction_observed: actionChange.changed || continuedActionChange.changed,
152
160
  state_change_observed: stateChangeObserved,
153
161
  mobile_overflow_absent: mobileOverflowPx <= maxMobileOverflowPx,
154
162
  reset_path_present: resetPathPresent,
@@ -156,7 +164,8 @@ function assessBasicGameplayRoute(route, options = {}) {
156
164
  },
157
165
  diffs: {
158
166
  timed: timedChange,
159
- after_action: actionChange
167
+ after_action: actionChange,
168
+ after_continue: continuedActionChange
160
169
  }
161
170
  };
162
171
  }
package/dist/index.cjs CHANGED
@@ -7818,6 +7818,10 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
7818
7818
  "repeat",
7819
7819
  "click",
7820
7820
  "click-by-text",
7821
+ "canvas-click",
7822
+ "canvas-pointer-down",
7823
+ "canvas-pointer-move",
7824
+ "canvas-pointer-up",
7821
7825
  "wait-for-text",
7822
7826
  "window-call",
7823
7827
  "evaluate"
@@ -7911,16 +7915,20 @@ function assessBasicGameplayRoute(route, options = {}) {
7911
7915
  const initial = route.initial || {};
7912
7916
  const timed = route.timed || {};
7913
7917
  const afterAction = route.after_action || route.afterAction || {};
7918
+ const afterContinue = route.after_continue || route.afterContinue || {};
7914
7919
  const mobile = route.mobile || {};
7915
7920
  const timedChange = changed(initial, timed);
7916
7921
  const actionChange = changed(timed, afterAction);
7922
+ const continuedActionChange = changed(afterAction, afterContinue);
7917
7923
  const surfaceVisible = numberValue2(initial.visible_canvas_count) > 0 || numberValue2(initial.enabled_clickable_count) > 0 || numberValue2(initial.visible_large_node_count) >= minSurfaceLargeNodes;
7918
7924
  const actionResults = listValue2(route.action_results || route.actionResults);
7925
+ const continuedActionResults = listValue2(route.continued_action_results || route.continuedActionResults);
7919
7926
  const restartActionResults = listValue2(route.restart_action_results || route.restartActionResults);
7920
- const actionAttempted = actionResults.some((result) => result.ok === true && result.action !== "wait");
7921
- const actionFailed = actionResults.some((result) => result.ok === false && result.action !== "wait");
7927
+ const primaryActionResults = [...actionResults, ...continuedActionResults];
7928
+ const actionAttempted = primaryActionResults.some((result) => result.ok === true && result.action !== "wait");
7929
+ const actionFailed = primaryActionResults.some((result) => result.ok === false && result.action !== "wait");
7922
7930
  const restartActionAttempted = restartActionResults.some((result) => result.ok === true && result.action !== "wait");
7923
- const stateChangeObserved = actionChange.changed || timedChange.changed;
7931
+ const stateChangeObserved = actionChange.changed || continuedActionChange.changed || timedChange.changed;
7924
7932
  const resetPathPresent = numberValue2(initial.reset_control_count) > 0 || numberValue2(timed.reset_control_count) > 0 || numberValue2(afterAction.reset_control_count) > 0 || restartActionAttempted;
7925
7933
  const responseStatus = firstNumber(route.http_status, route.response_status, route.status);
7926
7934
  const pageErrorCount = numberValue2(route.page_error_count);
@@ -7955,7 +7963,7 @@ function assessBasicGameplayRoute(route, options = {}) {
7955
7963
  surface_visible: surfaceVisible,
7956
7964
  action_attempted: actionAttempted,
7957
7965
  timed_progression_observed: timedChange.changed,
7958
- first_interaction_observed: actionChange.changed,
7966
+ first_interaction_observed: actionChange.changed || continuedActionChange.changed,
7959
7967
  state_change_observed: stateChangeObserved,
7960
7968
  mobile_overflow_absent: mobileOverflowPx <= maxMobileOverflowPx,
7961
7969
  reset_path_present: resetPathPresent,
@@ -7963,7 +7971,8 @@ function assessBasicGameplayRoute(route, options = {}) {
7963
7971
  },
7964
7972
  diffs: {
7965
7973
  timed: timedChange,
7966
- after_action: actionChange
7974
+ after_action: actionChange,
7975
+ after_continue: continuedActionChange
7967
7976
  }
7968
7977
  };
7969
7978
  }
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  extractBasicGameplayEvidence,
37
37
  resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
38
38
  sanitizeBasicGameplayJsonString
39
- } from "./chunk-LHS7ZV2T.js";
39
+ } from "./chunk-5A4SL6CX.js";
40
40
  import {
41
41
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
42
42
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",