@riddledc/riddle-proof 0.7.50 → 0.7.51

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
@@ -239,15 +239,18 @@ appears only after a picker, tab, login stub, storage seed, form fill,
239
239
  transport control, or other bounded interaction. Supported setup actions are
240
240
  `click`, `fill`, `set_input_value`, `assert_text_visible`,
241
241
  `assert_text_absent`, `assert_selector_count`, `local_storage`,
242
- `session_storage`, `clear_storage`, `wait`, `wait_for_selector`, and
243
- `wait_for_text`; a failed setup action is recorded as a failed
242
+ `session_storage`, `clear_storage`, `wait`, `wait_for_selector`,
243
+ `wait_for_text`, and `window_call`; a failed setup action is recorded as a failed
244
244
  `setup_actions_succeeded` check so the profile cannot pass without reaching
245
245
  the intended state. Text-matched `click` actions prefer visible matching
246
246
  elements, which keeps responsive layouts from selecting hidden desktop or
247
- mobile-only links. Use setup assertions when the pre-click or pre-navigation
248
- state is part of the contract, for example a fresh row must be present, stale
249
- copy must be absent, or exactly one source link must exist before clicking into
250
- the final route. `assert_selector_count` accepts `expected_count`.
247
+ mobile-only links. Add `force: true` to a click action only when the matched
248
+ visible element is intentionally animated or otherwise never becomes stable
249
+ enough for Playwright's default click actionability checks. Use setup
250
+ assertions when the pre-click or pre-navigation state is part of the contract,
251
+ for example a fresh row must be present, stale copy must be absent, or exactly
252
+ one source link must exist before clicking into the final route.
253
+ `assert_selector_count` accepts `expected_count`.
251
254
  `local_storage` and `session_storage` accept a `key` plus string `value` or
252
255
  JSON `json` / `value_json`, and can reload the page with `reload: true`.
253
256
  `clear_storage` clears `local`, `session`, or `both` browser storage scopes,
@@ -257,6 +257,7 @@ function normalizeSetupAction(input, index) {
257
257
  return {
258
258
  type,
259
259
  selector,
260
+ force: type === "click" && (input.force === true || input.force_click === true || input.forceClick === true),
260
261
  key,
261
262
  value,
262
263
  value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
@@ -2253,8 +2254,11 @@ async function executeSetupAction(action, ordinal) {
2253
2254
  if (targetIndex < 0) return { ...base, reason: "text_not_found", count };
2254
2255
  }
2255
2256
  if (targetIndex < 0 || targetIndex >= count) return { ...base, reason: "index_out_of_range", count, target_index: targetIndex };
2256
- await locator.nth(targetIndex).click({ timeout, noWaitAfter: true });
2257
- return { ...base, ok: true, count, target_index: targetIndex, text: matchedText };
2257
+ const clickOptions = action.force === true
2258
+ ? { timeout, noWaitAfter: true, force: true }
2259
+ : { timeout, noWaitAfter: true };
2260
+ await locator.nth(targetIndex).click(clickOptions);
2261
+ return { ...base, ok: true, count, target_index: targetIndex, text: matchedText, force: action.force === true || undefined };
2258
2262
  }
2259
2263
  if (type === "fill" || type === "set_input_value") {
2260
2264
  const locator = page.locator(action.selector);
package/dist/cli.cjs CHANGED
@@ -7130,6 +7130,7 @@ function normalizeSetupAction(input, index) {
7130
7130
  return {
7131
7131
  type,
7132
7132
  selector,
7133
+ force: type === "click" && (input.force === true || input.force_click === true || input.forceClick === true),
7133
7134
  key,
7134
7135
  value,
7135
7136
  value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
@@ -9110,8 +9111,11 @@ async function executeSetupAction(action, ordinal) {
9110
9111
  if (targetIndex < 0) return { ...base, reason: "text_not_found", count };
9111
9112
  }
9112
9113
  if (targetIndex < 0 || targetIndex >= count) return { ...base, reason: "index_out_of_range", count, target_index: targetIndex };
9113
- await locator.nth(targetIndex).click({ timeout, noWaitAfter: true });
9114
- return { ...base, ok: true, count, target_index: targetIndex, text: matchedText };
9114
+ const clickOptions = action.force === true
9115
+ ? { timeout, noWaitAfter: true, force: true }
9116
+ : { timeout, noWaitAfter: true };
9117
+ await locator.nth(targetIndex).click(clickOptions);
9118
+ return { ...base, ok: true, count, target_index: targetIndex, text: matchedText, force: action.force === true || undefined };
9115
9119
  }
9116
9120
  if (type === "fill" || type === "set_input_value") {
9117
9121
  const locator = page.locator(action.selector);
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  profileStatusExitCode,
11
11
  resolveRiddleProofProfileTargetUrl,
12
12
  resolveRiddleProofProfileTimeoutSec
13
- } from "./chunk-5FHHNCX4.js";
13
+ } from "./chunk-ZC4C52ZC.js";
14
14
  import {
15
15
  createRiddleApiClient,
16
16
  parseRiddleViewport
package/dist/index.cjs CHANGED
@@ -8971,6 +8971,7 @@ function normalizeSetupAction(input, index) {
8971
8971
  return {
8972
8972
  type,
8973
8973
  selector,
8974
+ force: type === "click" && (input.force === true || input.force_click === true || input.forceClick === true),
8974
8975
  key,
8975
8976
  value,
8976
8977
  value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
@@ -10967,8 +10968,11 @@ async function executeSetupAction(action, ordinal) {
10967
10968
  if (targetIndex < 0) return { ...base, reason: "text_not_found", count };
10968
10969
  }
10969
10970
  if (targetIndex < 0 || targetIndex >= count) return { ...base, reason: "index_out_of_range", count, target_index: targetIndex };
10970
- await locator.nth(targetIndex).click({ timeout, noWaitAfter: true });
10971
- return { ...base, ok: true, count, target_index: targetIndex, text: matchedText };
10971
+ const clickOptions = action.force === true
10972
+ ? { timeout, noWaitAfter: true, force: true }
10973
+ : { timeout, noWaitAfter: true };
10974
+ await locator.nth(targetIndex).click(clickOptions);
10975
+ return { ...base, ok: true, count, target_index: targetIndex, text: matchedText, force: action.force === true || undefined };
10972
10976
  }
10973
10977
  if (type === "fill" || type === "set_input_value") {
10974
10978
  const locator = page.locator(action.selector);
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  resolveRiddleProofProfileTimeoutSec,
59
59
  slugifyRiddleProofProfileName,
60
60
  summarizeRiddleProofProfileResult
61
- } from "./chunk-5FHHNCX4.js";
61
+ } from "./chunk-ZC4C52ZC.js";
62
62
  import {
63
63
  DEFAULT_RIDDLE_API_BASE_URL,
64
64
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -300,6 +300,7 @@ function normalizeSetupAction(input, index) {
300
300
  return {
301
301
  type,
302
302
  selector,
303
+ force: type === "click" && (input.force === true || input.force_click === true || input.forceClick === true),
303
304
  key,
304
305
  value,
305
306
  value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
@@ -2296,8 +2297,11 @@ async function executeSetupAction(action, ordinal) {
2296
2297
  if (targetIndex < 0) return { ...base, reason: "text_not_found", count };
2297
2298
  }
2298
2299
  if (targetIndex < 0 || targetIndex >= count) return { ...base, reason: "index_out_of_range", count, target_index: targetIndex };
2299
- await locator.nth(targetIndex).click({ timeout, noWaitAfter: true });
2300
- return { ...base, ok: true, count, target_index: targetIndex, text: matchedText };
2300
+ const clickOptions = action.force === true
2301
+ ? { timeout, noWaitAfter: true, force: true }
2302
+ : { timeout, noWaitAfter: true };
2303
+ await locator.nth(targetIndex).click(clickOptions);
2304
+ return { ...base, ok: true, count, target_index: targetIndex, text: matchedText, force: action.force === true || undefined };
2301
2305
  }
2302
2306
  if (type === "fill" || type === "set_input_value") {
2303
2307
  const locator = page.locator(action.selector);
@@ -20,6 +20,7 @@ interface RiddleProofProfileViewport {
20
20
  interface RiddleProofProfileSetupAction {
21
21
  type: RiddleProofProfileSetupActionType;
22
22
  selector?: string;
23
+ force?: boolean;
23
24
  key?: string;
24
25
  value?: string;
25
26
  value_json?: JsonValue;
package/dist/profile.d.ts CHANGED
@@ -20,6 +20,7 @@ interface RiddleProofProfileViewport {
20
20
  interface RiddleProofProfileSetupAction {
21
21
  type: RiddleProofProfileSetupActionType;
22
22
  selector?: string;
23
+ force?: boolean;
23
24
  key?: string;
24
25
  value?: string;
25
26
  value_json?: JsonValue;
package/dist/profile.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  resolveRiddleProofProfileTimeoutSec,
20
20
  slugifyRiddleProofProfileName,
21
21
  summarizeRiddleProofProfileResult
22
- } from "./chunk-5FHHNCX4.js";
22
+ } from "./chunk-ZC4C52ZC.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.50",
3
+ "version": "0.7.51",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",