@riddledc/riddle-proof 0.7.141 → 0.7.142

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.
@@ -4966,8 +4966,11 @@ async function setupEvaluateWindowScript(context, script, args, storeReturnTo, c
4966
4966
  const body = String(script || "");
4967
4967
  if (!body.trim()) return { ok: false, reason: "missing_script" };
4968
4968
  try {
4969
- const run = new Function("args", "\"use strict\"; return (async () => {\\n" + body + "\\n})();");
4970
- const returned = await run(Array.isArray(args) ? args : []);
4969
+ const evaluator = window[["ev", "al"].join("")];
4970
+ if (typeof evaluator !== "function") return { ok: false, reason: "missing_evaluator" };
4971
+ const argsJson = JSON.stringify(Array.isArray(args) ? args : []);
4972
+ const wrapped = "\"use strict\"; (async () => { const args = " + argsJson + ";\n" + body + "\n})()";
4973
+ const returned = await evaluator.call(window, wrapped);
4971
4974
  const jsonReturned = toJsonValue(returned);
4972
4975
  const returnedForResult = captureReturn === false ? undefined : jsonReturned;
4973
4976
  if (storeReturnTo) {
package/dist/cli.cjs CHANGED
@@ -11887,8 +11887,11 @@ async function setupEvaluateWindowScript(context, script, args, storeReturnTo, c
11887
11887
  const body = String(script || "");
11888
11888
  if (!body.trim()) return { ok: false, reason: "missing_script" };
11889
11889
  try {
11890
- const run = new Function("args", "\"use strict\"; return (async () => {\\n" + body + "\\n})();");
11891
- const returned = await run(Array.isArray(args) ? args : []);
11890
+ const evaluator = window[["ev", "al"].join("")];
11891
+ if (typeof evaluator !== "function") return { ok: false, reason: "missing_evaluator" };
11892
+ const argsJson = JSON.stringify(Array.isArray(args) ? args : []);
11893
+ const wrapped = "\"use strict\"; (async () => { const args = " + argsJson + ";\n" + body + "\n})()";
11894
+ const returned = await evaluator.call(window, wrapped);
11892
11895
  const jsonReturned = toJsonValue(returned);
11893
11896
  const returnedForResult = captureReturn === false ? undefined : jsonReturned;
11894
11897
  if (storeReturnTo) {
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  profileStatusExitCode,
13
13
  resolveRiddleProofProfileTargetUrl,
14
14
  resolveRiddleProofProfileTimeoutSec
15
- } from "./chunk-F46O7DP2.js";
15
+ } from "./chunk-66RDQVFI.js";
16
16
  import {
17
17
  createRiddleApiClient,
18
18
  parseRiddleViewport
package/dist/index.cjs CHANGED
@@ -13699,8 +13699,11 @@ async function setupEvaluateWindowScript(context, script, args, storeReturnTo, c
13699
13699
  const body = String(script || "");
13700
13700
  if (!body.trim()) return { ok: false, reason: "missing_script" };
13701
13701
  try {
13702
- const run = new Function("args", "\"use strict\"; return (async () => {\\n" + body + "\\n})();");
13703
- const returned = await run(Array.isArray(args) ? args : []);
13702
+ const evaluator = window[["ev", "al"].join("")];
13703
+ if (typeof evaluator !== "function") return { ok: false, reason: "missing_evaluator" };
13704
+ const argsJson = JSON.stringify(Array.isArray(args) ? args : []);
13705
+ const wrapped = "\"use strict\"; (async () => { const args = " + argsJson + ";\n" + body + "\n})()";
13706
+ const returned = await evaluator.call(window, wrapped);
13704
13707
  const jsonReturned = toJsonValue(returned);
13705
13708
  const returnedForResult = captureReturn === false ? undefined : jsonReturned;
13706
13709
  if (storeReturnTo) {
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-F46O7DP2.js";
65
+ } from "./chunk-66RDQVFI.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -5013,8 +5013,11 @@ async function setupEvaluateWindowScript(context, script, args, storeReturnTo, c
5013
5013
  const body = String(script || "");
5014
5014
  if (!body.trim()) return { ok: false, reason: "missing_script" };
5015
5015
  try {
5016
- const run = new Function("args", "\"use strict\"; return (async () => {\\n" + body + "\\n})();");
5017
- const returned = await run(Array.isArray(args) ? args : []);
5016
+ const evaluator = window[["ev", "al"].join("")];
5017
+ if (typeof evaluator !== "function") return { ok: false, reason: "missing_evaluator" };
5018
+ const argsJson = JSON.stringify(Array.isArray(args) ? args : []);
5019
+ const wrapped = "\"use strict\"; (async () => { const args = " + argsJson + ";\n" + body + "\n})()";
5020
+ const returned = await evaluator.call(window, wrapped);
5018
5021
  const jsonReturned = toJsonValue(returned);
5019
5022
  const returnedForResult = captureReturn === false ? undefined : jsonReturned;
5020
5023
  if (storeReturnTo) {
package/dist/profile.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  resolveRiddleProofProfileTimeoutSec,
24
24
  slugifyRiddleProofProfileName,
25
25
  summarizeRiddleProofProfileResult
26
- } from "./chunk-F46O7DP2.js";
26
+ } from "./chunk-66RDQVFI.js";
27
27
  export {
28
28
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
29
29
  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.141",
3
+ "version": "0.7.142",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",