@riddledc/riddle-proof 0.7.226 → 0.8.1

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.
Files changed (132) hide show
  1. package/dist/adapters/codex-exec-agent.cjs +893 -0
  2. package/dist/adapters/codex-exec-agent.d.cts +3 -0
  3. package/dist/adapters/codex-exec-agent.d.ts +3 -0
  4. package/dist/adapters/codex-exec-agent.js +13 -0
  5. package/dist/adapters/codex.cjs +893 -0
  6. package/dist/adapters/codex.d.cts +3 -0
  7. package/dist/adapters/codex.d.ts +3 -0
  8. package/dist/adapters/codex.js +13 -0
  9. package/dist/adapters/local-agent.cjs +893 -0
  10. package/dist/adapters/local-agent.d.cts +3 -0
  11. package/dist/adapters/local-agent.d.ts +3 -0
  12. package/dist/adapters/local-agent.js +13 -0
  13. package/dist/adapters/openclaw.cjs +213 -0
  14. package/dist/adapters/openclaw.d.cts +2 -0
  15. package/dist/adapters/openclaw.d.ts +2 -0
  16. package/dist/adapters/openclaw.js +17 -0
  17. package/dist/advanced/engine-harness.cjs +5701 -0
  18. package/dist/advanced/engine-harness.d.cts +2 -0
  19. package/dist/advanced/engine-harness.d.ts +2 -0
  20. package/dist/advanced/engine-harness.js +16 -0
  21. package/dist/advanced/index.cjs +6242 -0
  22. package/dist/advanced/index.d.cts +5 -0
  23. package/dist/advanced/index.d.ts +5 -0
  24. package/dist/advanced/index.js +23 -0
  25. package/dist/advanced/proof-run-core.cjs +1085 -0
  26. package/dist/advanced/proof-run-core.d.cts +1 -0
  27. package/dist/advanced/proof-run-core.d.ts +1 -0
  28. package/dist/advanced/proof-run-core.js +59 -0
  29. package/dist/advanced/proof-run-engine.cjs +2905 -0
  30. package/dist/advanced/proof-run-engine.d.cts +2 -0
  31. package/dist/advanced/proof-run-engine.d.ts +2 -0
  32. package/dist/advanced/proof-run-engine.js +10 -0
  33. package/dist/advanced/runner.cjs +833 -0
  34. package/dist/advanced/runner.d.cts +2 -0
  35. package/dist/advanced/runner.d.ts +2 -0
  36. package/dist/advanced/runner.js +12 -0
  37. package/dist/app-contract/index.cjs +24 -0
  38. package/dist/app-contract/index.d.cts +1 -0
  39. package/dist/app-contract/index.d.ts +1 -0
  40. package/dist/app-contract/index.js +2 -0
  41. package/dist/basic-gameplay.js +1 -0
  42. package/dist/checkpoint.js +1 -0
  43. package/dist/chunk-BHL4JSGM.js +1900 -0
  44. package/dist/chunk-BTN76IGW.js +115 -0
  45. package/dist/{chunk-TGHTM66Z.js → chunk-COERZX63.js} +10 -2
  46. package/dist/{chunk-QUAZAMOM.js → chunk-IWLQQ5S5.js} +12 -2
  47. package/dist/chunk-MLKGABMK.js +9 -0
  48. package/dist/chunk-OFSECTSC.js +0 -0
  49. package/dist/{chunk-GBVEQQIM.js → chunk-TJ63IE65.js} +36 -1
  50. package/dist/chunk-VZD5LH7U.js +4138 -0
  51. package/dist/cli/index.cjs +18 -0
  52. package/dist/cli/index.d.cts +2 -0
  53. package/dist/cli/index.d.ts +2 -0
  54. package/dist/cli/index.js +12 -0
  55. package/dist/cli.d.cts +1 -0
  56. package/dist/cli.d.ts +1 -0
  57. package/dist/cli.js +8 -4139
  58. package/dist/codex-exec-agent.d.cts +1 -1
  59. package/dist/codex-exec-agent.d.ts +1 -1
  60. package/dist/codex-exec-agent.js +1 -0
  61. package/dist/diagnostics.js +1 -0
  62. package/dist/engine-harness-CMACHP6A.d.ts +96 -0
  63. package/dist/engine-harness-LBfqbFSe.d.cts +96 -0
  64. package/dist/engine-harness.d.cts +2 -79
  65. package/dist/engine-harness.d.ts +2 -79
  66. package/dist/engine-harness.js +3 -2
  67. package/dist/index.d.cts +2 -2
  68. package/dist/index.d.ts +2 -2
  69. package/dist/index.js +4 -3
  70. package/dist/local-agent.d.cts +1 -1
  71. package/dist/local-agent.d.ts +1 -1
  72. package/dist/local-agent.js +1 -0
  73. package/dist/openclaw.js +8 -107
  74. package/dist/playability.js +1 -0
  75. package/dist/profile/index.cjs +9403 -0
  76. package/dist/profile/index.d.cts +2 -0
  77. package/dist/profile/index.d.ts +2 -0
  78. package/dist/profile/index.js +53 -0
  79. package/dist/profile.js +1 -0
  80. package/dist/proof-run-core-CE0jx7wL.d.cts +359 -0
  81. package/dist/proof-run-core-CE0jx7wL.d.ts +359 -0
  82. package/dist/proof-run-core.d.cts +1 -322
  83. package/dist/proof-run-core.d.ts +1 -322
  84. package/dist/proof-run-core.js +2 -1
  85. package/dist/proof-run-engine-CSSc0mNn.d.ts +764 -0
  86. package/dist/proof-run-engine-HSRpUeBi.d.cts +764 -0
  87. package/dist/proof-run-engine.d.cts +2 -757
  88. package/dist/proof-run-engine.d.ts +2 -757
  89. package/dist/proof-run-engine.js +5 -1885
  90. package/dist/proof-session.js +1 -0
  91. package/dist/result.js +1 -0
  92. package/dist/riddle-client.js +1 -0
  93. package/dist/run-card.js +1 -0
  94. package/dist/runner-4LJ5z0D-.d.cts +29 -0
  95. package/dist/runner-BdQpOkZD.d.ts +29 -0
  96. package/dist/runner.d.cts +2 -22
  97. package/dist/runner.d.ts +2 -22
  98. package/dist/runner.js +3 -2
  99. package/dist/runtime/index.cjs +528 -0
  100. package/dist/runtime/index.d.cts +1 -0
  101. package/dist/runtime/index.d.ts +1 -0
  102. package/dist/runtime/index.js +37 -0
  103. package/dist/runtime/riddle-client.cjs +528 -0
  104. package/dist/runtime/riddle-client.d.cts +1 -0
  105. package/dist/runtime/riddle-client.d.ts +1 -0
  106. package/dist/runtime/riddle-client.js +37 -0
  107. package/dist/spec/checkpoint.cjs +807 -0
  108. package/dist/spec/checkpoint.d.cts +2 -0
  109. package/dist/spec/checkpoint.d.ts +2 -0
  110. package/dist/spec/checkpoint.js +34 -0
  111. package/dist/spec/index.cjs +1510 -0
  112. package/dist/spec/index.d.cts +5 -0
  113. package/dist/spec/index.d.ts +5 -0
  114. package/dist/spec/index.js +80 -0
  115. package/dist/spec/result.cjs +259 -0
  116. package/dist/spec/result.d.cts +2 -0
  117. package/dist/spec/result.d.ts +2 -0
  118. package/dist/spec/result.js +21 -0
  119. package/dist/spec/run-card.cjs +287 -0
  120. package/dist/spec/run-card.d.cts +2 -0
  121. package/dist/spec/run-card.d.ts +2 -0
  122. package/dist/spec/run-card.js +11 -0
  123. package/dist/spec/state.cjs +541 -0
  124. package/dist/spec/state.d.cts +2 -0
  125. package/dist/spec/state.d.ts +2 -0
  126. package/dist/spec/state.js +28 -0
  127. package/dist/spec/types.cjs +18 -0
  128. package/dist/spec/types.d.cts +1 -0
  129. package/dist/spec/types.d.ts +1 -0
  130. package/dist/spec/types.js +1 -0
  131. package/dist/state.js +1 -0
  132. package/package.json +95 -2
@@ -0,0 +1,115 @@
1
+ import {
2
+ normalizeIntegrationContext,
3
+ normalizeRunParams
4
+ } from "./chunk-OHJQRDST.js";
5
+ import {
6
+ compactRecord
7
+ } from "./chunk-VY4Y5U57.js";
8
+
9
+ // src/openclaw.ts
10
+ function parseOpenClawAssertions(value) {
11
+ if (value === void 0 || value === null || value === "") return void 0;
12
+ if (typeof value !== "string") return value;
13
+ const trimmed = value.trim();
14
+ if (!trimmed) return void 0;
15
+ try {
16
+ return JSON.parse(trimmed);
17
+ } catch {
18
+ return trimmed;
19
+ }
20
+ }
21
+ function parseOpenClawJsonObjectOrArray(value, name) {
22
+ if (value === void 0 || value === null || value === "") return void 0;
23
+ if (typeof value !== "string") return value;
24
+ const trimmed = value.trim();
25
+ if (!trimmed) return void 0;
26
+ let parsed;
27
+ try {
28
+ parsed = JSON.parse(trimmed);
29
+ } catch (error) {
30
+ const message = error instanceof Error ? error.message : String(error);
31
+ throw new Error(`${name} is not valid JSON: ${message}`);
32
+ }
33
+ if (parsed === null || typeof parsed !== "object" && !Array.isArray(parsed)) {
34
+ throw new Error(`${name} must decode to a JSON object or array.`);
35
+ }
36
+ return parsed;
37
+ }
38
+ function normalizeOpenClawReference(value) {
39
+ if (value !== "prod" && value !== "before" && value !== "both") return void 0;
40
+ return value;
41
+ }
42
+ function ignoredOpenClawReference(value) {
43
+ if (value === void 0 || value === null || value === "") return void 0;
44
+ return normalizeOpenClawReference(value) ? void 0 : String(value);
45
+ }
46
+ function openClawIntegrationContext(params) {
47
+ const hasDiscordContext = Boolean(params.discord_channel || params.discord_thread_id || params.discord_message_id || params.discord_source_url);
48
+ return normalizeIntegrationContext({
49
+ source: hasDiscordContext ? "discord" : "openclaw",
50
+ channel_id: params.discord_channel,
51
+ thread_id: params.discord_thread_id,
52
+ message_id: params.discord_message_id,
53
+ source_url: params.discord_source_url,
54
+ metadata: compactRecord({
55
+ wrapper: "openclaw",
56
+ tool: "riddle_proof_change",
57
+ reference_input_ignored: ignoredOpenClawReference(params.reference)
58
+ })
59
+ }, "openclaw");
60
+ }
61
+ function toRiddleProofRunParams(params) {
62
+ return normalizeRunParams({
63
+ repo: params.repo,
64
+ branch: params.branch,
65
+ change_request: params.change_request,
66
+ commit_message: params.commit_message,
67
+ prod_url: params.prod_url,
68
+ capture_script: params.capture_script,
69
+ success_criteria: params.success_criteria,
70
+ assertions: parseOpenClawAssertions(params.assertions_json),
71
+ verification_mode: params.verification_mode,
72
+ resume_session: params.resume_session,
73
+ target_image_url: params.target_image_url,
74
+ target_image_hash: params.target_image_hash,
75
+ viewport_matrix: parseOpenClawJsonObjectOrArray(params.viewport_matrix_json, "viewport_matrix_json"),
76
+ deterministic_setup: parseOpenClawJsonObjectOrArray(params.deterministic_setup_json, "deterministic_setup_json"),
77
+ reference: normalizeOpenClawReference(params.reference),
78
+ base_branch: params.base_branch,
79
+ before_ref: params.before_ref,
80
+ allow_static_preview_fallback: params.allow_static_preview_fallback,
81
+ context: params.context,
82
+ reviewer: params.reviewer,
83
+ mode: params.mode,
84
+ implementation_mode: params.implementation_mode,
85
+ require_diff: params.require_diff,
86
+ allow_code_changes: params.allow_code_changes,
87
+ build_command: params.build_command,
88
+ build_output: params.build_output,
89
+ server_image: params.server_image,
90
+ server_command: params.server_command,
91
+ server_port: params.server_port,
92
+ server_path: params.server_path,
93
+ use_auth: params.use_auth,
94
+ auth_localStorage_json: params.auth_localStorage_json,
95
+ auth_cookies_json: params.auth_cookies_json,
96
+ auth_headers_json: params.auth_headers_json,
97
+ color_scheme: params.color_scheme,
98
+ wait_for_selector: params.wait_for_selector,
99
+ ship_mode: params.ship_mode || (params.ship_after_verify ? "ship" : void 0),
100
+ leave_draft: params.leave_draft,
101
+ engine_state_path: params.state_path,
102
+ harness_state_path: params.harness_state_path,
103
+ max_iterations: params.max_iterations,
104
+ auto_approve: params.auto_approve,
105
+ dry_run: params.dry_run,
106
+ integration_context: openClawIntegrationContext(params)
107
+ });
108
+ }
109
+
110
+ export {
111
+ parseOpenClawAssertions,
112
+ parseOpenClawJsonObjectOrArray,
113
+ openClawIntegrationContext,
114
+ toRiddleProofRunParams
115
+ };
@@ -6,12 +6,19 @@ import {
6
6
  } from "./chunk-OHJQRDST.js";
7
7
  import {
8
8
  noImplementationModeFor
9
- } from "./chunk-GBVEQQIM.js";
9
+ } from "./chunk-TJ63IE65.js";
10
10
  import {
11
11
  createRunResult
12
12
  } from "./chunk-VY4Y5U57.js";
13
+ import {
14
+ __export
15
+ } from "./chunk-MLKGABMK.js";
13
16
 
14
17
  // src/runner.ts
18
+ var runner_exports = {};
19
+ __export(runner_exports, {
20
+ runRiddleProof: () => runRiddleProof
21
+ });
15
22
  function errorDetails(error) {
16
23
  if (error instanceof Error) {
17
24
  return {
@@ -506,5 +513,6 @@ async function runRiddleProof(input) {
506
513
  }
507
514
 
508
515
  export {
509
- runRiddleProof
516
+ runRiddleProof,
517
+ runner_exports
510
518
  };
@@ -14,7 +14,7 @@ import {
14
14
  visualDeltaForState,
15
15
  visualDeltaRequiredForState,
16
16
  visualDeltaShipGateReason
17
- } from "./chunk-GBVEQQIM.js";
17
+ } from "./chunk-TJ63IE65.js";
18
18
  import {
19
19
  authorPacketPayloadFromCheckpointResponse,
20
20
  buildCheckpointPacketForEngineResult,
@@ -33,8 +33,17 @@ import {
33
33
  normalizeTerminalMetadata,
34
34
  recordValue
35
35
  } from "./chunk-VY4Y5U57.js";
36
+ import {
37
+ __export
38
+ } from "./chunk-MLKGABMK.js";
36
39
 
37
40
  // src/engine-harness.ts
41
+ var engine_harness_exports = {};
42
+ __export(engine_harness_exports, {
43
+ createDisabledRiddleProofAgentAdapter: () => createDisabledRiddleProofAgentAdapter,
44
+ readRiddleProofRunStatus: () => readRiddleProofRunStatus,
45
+ runRiddleProofEngineHarness: () => runRiddleProofEngineHarness
46
+ });
38
47
  import { execFileSync } from "child_process";
39
48
  import {
40
49
  existsSync,
@@ -1532,5 +1541,6 @@ async function runRiddleProofEngineHarness(input) {
1532
1541
  export {
1533
1542
  createDisabledRiddleProofAgentAdapter,
1534
1543
  readRiddleProofRunStatus,
1535
- runRiddleProofEngineHarness
1544
+ runRiddleProofEngineHarness,
1545
+ engine_harness_exports
1536
1546
  };
@@ -0,0 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
File without changes
@@ -1,4 +1,38 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-MLKGABMK.js";
4
+
1
5
  // src/proof-run-core.ts
6
+ var proof_run_core_exports = {};
7
+ __export(proof_run_core_exports, {
8
+ BUNDLED_RIDDLE_PROOF_DIR: () => BUNDLED_RIDDLE_PROOF_DIR,
9
+ CHECKPOINT_CONTRACT_VERSION: () => CHECKPOINT_CONTRACT_VERSION,
10
+ RIDDLE_PROOF_DIR_CANDIDATES: () => RIDDLE_PROOF_DIR_CANDIDATES,
11
+ WORKFLOW_STAGE_ORDER: () => WORKFLOW_STAGE_ORDER,
12
+ buildCheckpointContract: () => buildCheckpointContract,
13
+ buildSetupArgs: () => buildSetupArgs,
14
+ checkpointContinueStage: () => checkpointContinueStage,
15
+ clearStageDecisionRequest: () => clearStageDecisionRequest,
16
+ ensureAction: () => ensureAction,
17
+ ensureStageLoopState: () => ensureStageLoopState,
18
+ invalidateVerifyEvidence: () => invalidateVerifyEvidence,
19
+ mergeStateFromParams: () => mergeStateFromParams,
20
+ noImplementationModeFor: () => noImplementationModeFor,
21
+ previewModeFromWorkflowMode: () => previewModeFromWorkflowMode,
22
+ readState: () => readState,
23
+ recordStageAttempt: () => recordStageAttempt,
24
+ requiredBaselineLabelsForState: () => requiredBaselineLabelsForState,
25
+ resolveConfig: () => resolveConfig,
26
+ resolveRiddleProofDir: () => resolveRiddleProofDir,
27
+ setStageDecisionRequest: () => setStageDecisionRequest,
28
+ summarizeState: () => summarizeState,
29
+ validateShipGate: () => validateShipGate,
30
+ visualDeltaForState: () => visualDeltaForState,
31
+ visualDeltaRequiredForState: () => visualDeltaRequiredForState,
32
+ visualDeltaShipGateReason: () => visualDeltaShipGateReason,
33
+ workflowFile: () => workflowFile,
34
+ writeState: () => writeState
35
+ });
2
36
  import { readFileSync, existsSync, writeFileSync } from "fs";
3
37
  import { randomUUID } from "crypto";
4
38
  import path from "path";
@@ -1018,5 +1052,6 @@ export {
1018
1052
  validateShipGate,
1019
1053
  buildCheckpointContract,
1020
1054
  mergeStateFromParams,
1021
- summarizeState
1055
+ summarizeState,
1056
+ proof_run_core_exports
1022
1057
  };