@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.
- package/dist/adapters/codex-exec-agent.cjs +893 -0
- package/dist/adapters/codex-exec-agent.d.cts +3 -0
- package/dist/adapters/codex-exec-agent.d.ts +3 -0
- package/dist/adapters/codex-exec-agent.js +13 -0
- package/dist/adapters/codex.cjs +893 -0
- package/dist/adapters/codex.d.cts +3 -0
- package/dist/adapters/codex.d.ts +3 -0
- package/dist/adapters/codex.js +13 -0
- package/dist/adapters/local-agent.cjs +893 -0
- package/dist/adapters/local-agent.d.cts +3 -0
- package/dist/adapters/local-agent.d.ts +3 -0
- package/dist/adapters/local-agent.js +13 -0
- package/dist/adapters/openclaw.cjs +213 -0
- package/dist/adapters/openclaw.d.cts +2 -0
- package/dist/adapters/openclaw.d.ts +2 -0
- package/dist/adapters/openclaw.js +17 -0
- package/dist/advanced/engine-harness.cjs +5701 -0
- package/dist/advanced/engine-harness.d.cts +2 -0
- package/dist/advanced/engine-harness.d.ts +2 -0
- package/dist/advanced/engine-harness.js +16 -0
- package/dist/advanced/index.cjs +6242 -0
- package/dist/advanced/index.d.cts +5 -0
- package/dist/advanced/index.d.ts +5 -0
- package/dist/advanced/index.js +23 -0
- package/dist/advanced/proof-run-core.cjs +1085 -0
- package/dist/advanced/proof-run-core.d.cts +1 -0
- package/dist/advanced/proof-run-core.d.ts +1 -0
- package/dist/advanced/proof-run-core.js +59 -0
- package/dist/advanced/proof-run-engine.cjs +2905 -0
- package/dist/advanced/proof-run-engine.d.cts +2 -0
- package/dist/advanced/proof-run-engine.d.ts +2 -0
- package/dist/advanced/proof-run-engine.js +10 -0
- package/dist/advanced/runner.cjs +833 -0
- package/dist/advanced/runner.d.cts +2 -0
- package/dist/advanced/runner.d.ts +2 -0
- package/dist/advanced/runner.js +12 -0
- package/dist/app-contract/index.cjs +24 -0
- package/dist/app-contract/index.d.cts +1 -0
- package/dist/app-contract/index.d.ts +1 -0
- package/dist/app-contract/index.js +2 -0
- package/dist/basic-gameplay.js +1 -0
- package/dist/checkpoint.js +1 -0
- package/dist/chunk-BHL4JSGM.js +1900 -0
- package/dist/chunk-BTN76IGW.js +115 -0
- package/dist/{chunk-TGHTM66Z.js → chunk-COERZX63.js} +10 -2
- package/dist/{chunk-QUAZAMOM.js → chunk-IWLQQ5S5.js} +12 -2
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-OFSECTSC.js +0 -0
- package/dist/{chunk-GBVEQQIM.js → chunk-TJ63IE65.js} +36 -1
- package/dist/chunk-VZD5LH7U.js +4138 -0
- package/dist/cli/index.cjs +18 -0
- package/dist/cli/index.d.cts +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +12 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +8 -4139
- package/dist/codex-exec-agent.d.cts +1 -1
- package/dist/codex-exec-agent.d.ts +1 -1
- package/dist/codex-exec-agent.js +1 -0
- package/dist/diagnostics.js +1 -0
- package/dist/engine-harness-CMACHP6A.d.ts +96 -0
- package/dist/engine-harness-LBfqbFSe.d.cts +96 -0
- package/dist/engine-harness.d.cts +2 -79
- package/dist/engine-harness.d.ts +2 -79
- package/dist/engine-harness.js +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/local-agent.d.cts +1 -1
- package/dist/local-agent.d.ts +1 -1
- package/dist/local-agent.js +1 -0
- package/dist/openclaw.js +8 -107
- package/dist/playability.js +1 -0
- package/dist/profile/index.cjs +9403 -0
- package/dist/profile/index.d.cts +2 -0
- package/dist/profile/index.d.ts +2 -0
- package/dist/profile/index.js +53 -0
- package/dist/profile.js +1 -0
- package/dist/proof-run-core-CE0jx7wL.d.cts +359 -0
- package/dist/proof-run-core-CE0jx7wL.d.ts +359 -0
- package/dist/proof-run-core.d.cts +1 -322
- package/dist/proof-run-core.d.ts +1 -322
- package/dist/proof-run-core.js +2 -1
- package/dist/proof-run-engine-CSSc0mNn.d.ts +764 -0
- package/dist/proof-run-engine-HSRpUeBi.d.cts +764 -0
- package/dist/proof-run-engine.d.cts +2 -757
- package/dist/proof-run-engine.d.ts +2 -757
- package/dist/proof-run-engine.js +5 -1885
- package/dist/proof-session.js +1 -0
- package/dist/result.js +1 -0
- package/dist/riddle-client.js +1 -0
- package/dist/run-card.js +1 -0
- package/dist/runner-4LJ5z0D-.d.cts +29 -0
- package/dist/runner-BdQpOkZD.d.ts +29 -0
- package/dist/runner.d.cts +2 -22
- package/dist/runner.d.ts +2 -22
- package/dist/runner.js +3 -2
- package/dist/runtime/index.cjs +528 -0
- package/dist/runtime/index.d.cts +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +37 -0
- package/dist/runtime/riddle-client.cjs +528 -0
- package/dist/runtime/riddle-client.d.cts +1 -0
- package/dist/runtime/riddle-client.d.ts +1 -0
- package/dist/runtime/riddle-client.js +37 -0
- package/dist/spec/checkpoint.cjs +807 -0
- package/dist/spec/checkpoint.d.cts +2 -0
- package/dist/spec/checkpoint.d.ts +2 -0
- package/dist/spec/checkpoint.js +34 -0
- package/dist/spec/index.cjs +1510 -0
- package/dist/spec/index.d.cts +5 -0
- package/dist/spec/index.d.ts +5 -0
- package/dist/spec/index.js +80 -0
- package/dist/spec/result.cjs +259 -0
- package/dist/spec/result.d.cts +2 -0
- package/dist/spec/result.d.ts +2 -0
- package/dist/spec/result.js +21 -0
- package/dist/spec/run-card.cjs +287 -0
- package/dist/spec/run-card.d.cts +2 -0
- package/dist/spec/run-card.d.ts +2 -0
- package/dist/spec/run-card.js +11 -0
- package/dist/spec/state.cjs +541 -0
- package/dist/spec/state.d.cts +2 -0
- package/dist/spec/state.d.ts +2 -0
- package/dist/spec/state.js +28 -0
- package/dist/spec/types.cjs +18 -0
- package/dist/spec/types.d.cts +1 -0
- package/dist/spec/types.d.ts +1 -0
- package/dist/spec/types.js +1 -0
- package/dist/state.js +1 -0
- package/package.json +95 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor as runLocalAgentDoctor } from '../codex-exec-agent.cjs';
|
|
2
|
+
import '../engine-harness-LBfqbFSe.cjs';
|
|
3
|
+
import '../types.cjs';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor as runLocalAgentDoctor } from '../codex-exec-agent.js';
|
|
2
|
+
import '../engine-harness-CMACHP6A.js';
|
|
3
|
+
import '../types.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../chunk-JFQXAJH2.js";
|
|
2
|
+
import {
|
|
3
|
+
createCodexExecAgentAdapter,
|
|
4
|
+
createCodexExecJsonRunner,
|
|
5
|
+
runCodexExecAgentDoctor
|
|
6
|
+
} from "../chunk-7F5LNUGR.js";
|
|
7
|
+
import "../chunk-VY4Y5U57.js";
|
|
8
|
+
import "../chunk-MLKGABMK.js";
|
|
9
|
+
export {
|
|
10
|
+
createCodexExecAgentAdapter as createLocalAgentAdapter,
|
|
11
|
+
createCodexExecJsonRunner as createLocalAgentJsonRunner,
|
|
12
|
+
runCodexExecAgentDoctor as runLocalAgentDoctor
|
|
13
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/adapters/openclaw.ts
|
|
21
|
+
var openclaw_exports = {};
|
|
22
|
+
__export(openclaw_exports, {
|
|
23
|
+
openClawIntegrationContext: () => openClawIntegrationContext,
|
|
24
|
+
parseOpenClawAssertions: () => parseOpenClawAssertions,
|
|
25
|
+
parseOpenClawJsonObjectOrArray: () => parseOpenClawJsonObjectOrArray,
|
|
26
|
+
toRiddleProofRunParams: () => toRiddleProofRunParams
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(openclaw_exports);
|
|
29
|
+
|
|
30
|
+
// src/result.ts
|
|
31
|
+
function compactRecord(input) {
|
|
32
|
+
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0 && value !== null && value !== ""));
|
|
33
|
+
}
|
|
34
|
+
function nonEmptyString(value) {
|
|
35
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
36
|
+
}
|
|
37
|
+
function recordValue(value) {
|
|
38
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// src/state.ts
|
|
42
|
+
function normalizeIntegrationContext(input, fallbackSource) {
|
|
43
|
+
const value = recordValue(input);
|
|
44
|
+
if (!value) {
|
|
45
|
+
return fallbackSource ? { source: fallbackSource } : void 0;
|
|
46
|
+
}
|
|
47
|
+
const metadata = recordValue(value.metadata);
|
|
48
|
+
return compactRecord({
|
|
49
|
+
source: nonEmptyString(value.source) || fallbackSource,
|
|
50
|
+
channel_id: nonEmptyString(value.channel_id),
|
|
51
|
+
thread_id: nonEmptyString(value.thread_id),
|
|
52
|
+
message_id: nonEmptyString(value.message_id),
|
|
53
|
+
source_url: nonEmptyString(value.source_url),
|
|
54
|
+
metadata: metadata && Object.keys(metadata).length ? metadata : void 0
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function normalizeRunParams(input) {
|
|
58
|
+
return compactRecord({
|
|
59
|
+
repo: input.repo,
|
|
60
|
+
branch: input.branch,
|
|
61
|
+
change_request: input.change_request,
|
|
62
|
+
commit_message: input.commit_message,
|
|
63
|
+
prod_url: input.prod_url,
|
|
64
|
+
capture_script: input.capture_script,
|
|
65
|
+
success_criteria: input.success_criteria,
|
|
66
|
+
assertions: input.assertions,
|
|
67
|
+
verification_mode: input.verification_mode,
|
|
68
|
+
resume_session: input.resume_session,
|
|
69
|
+
target_image_url: input.target_image_url,
|
|
70
|
+
target_image_hash: input.target_image_hash,
|
|
71
|
+
viewport_matrix: input.viewport_matrix,
|
|
72
|
+
deterministic_setup: input.deterministic_setup,
|
|
73
|
+
reference: input.reference,
|
|
74
|
+
base_branch: input.base_branch,
|
|
75
|
+
before_ref: input.before_ref,
|
|
76
|
+
allow_static_preview_fallback: input.allow_static_preview_fallback,
|
|
77
|
+
context: input.context,
|
|
78
|
+
reviewer: input.reviewer,
|
|
79
|
+
mode: input.mode,
|
|
80
|
+
implementation_mode: input.implementation_mode,
|
|
81
|
+
require_diff: input.require_diff,
|
|
82
|
+
allow_code_changes: input.allow_code_changes,
|
|
83
|
+
build_command: input.build_command,
|
|
84
|
+
build_output: input.build_output,
|
|
85
|
+
server_image: input.server_image,
|
|
86
|
+
server_command: input.server_command,
|
|
87
|
+
server_port: input.server_port,
|
|
88
|
+
server_path: input.server_path,
|
|
89
|
+
use_auth: input.use_auth,
|
|
90
|
+
auth_localStorage_json: input.auth_localStorage_json,
|
|
91
|
+
auth_cookies_json: input.auth_cookies_json,
|
|
92
|
+
auth_headers_json: input.auth_headers_json,
|
|
93
|
+
color_scheme: input.color_scheme,
|
|
94
|
+
wait_for_selector: input.wait_for_selector,
|
|
95
|
+
ship_mode: input.ship_mode,
|
|
96
|
+
leave_draft: input.leave_draft,
|
|
97
|
+
engine_state_path: input.engine_state_path,
|
|
98
|
+
harness_state_path: input.harness_state_path,
|
|
99
|
+
riddle_engine_module_url: input.riddle_engine_module_url,
|
|
100
|
+
max_iterations: input.max_iterations,
|
|
101
|
+
auto_approve: input.auto_approve,
|
|
102
|
+
dry_run: input.dry_run,
|
|
103
|
+
integration_context: normalizeIntegrationContext(input.integration_context)
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/openclaw.ts
|
|
108
|
+
function parseOpenClawAssertions(value) {
|
|
109
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
110
|
+
if (typeof value !== "string") return value;
|
|
111
|
+
const trimmed = value.trim();
|
|
112
|
+
if (!trimmed) return void 0;
|
|
113
|
+
try {
|
|
114
|
+
return JSON.parse(trimmed);
|
|
115
|
+
} catch {
|
|
116
|
+
return trimmed;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function parseOpenClawJsonObjectOrArray(value, name) {
|
|
120
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
121
|
+
if (typeof value !== "string") return value;
|
|
122
|
+
const trimmed = value.trim();
|
|
123
|
+
if (!trimmed) return void 0;
|
|
124
|
+
let parsed;
|
|
125
|
+
try {
|
|
126
|
+
parsed = JSON.parse(trimmed);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
129
|
+
throw new Error(`${name} is not valid JSON: ${message}`);
|
|
130
|
+
}
|
|
131
|
+
if (parsed === null || typeof parsed !== "object" && !Array.isArray(parsed)) {
|
|
132
|
+
throw new Error(`${name} must decode to a JSON object or array.`);
|
|
133
|
+
}
|
|
134
|
+
return parsed;
|
|
135
|
+
}
|
|
136
|
+
function normalizeOpenClawReference(value) {
|
|
137
|
+
if (value !== "prod" && value !== "before" && value !== "both") return void 0;
|
|
138
|
+
return value;
|
|
139
|
+
}
|
|
140
|
+
function ignoredOpenClawReference(value) {
|
|
141
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
142
|
+
return normalizeOpenClawReference(value) ? void 0 : String(value);
|
|
143
|
+
}
|
|
144
|
+
function openClawIntegrationContext(params) {
|
|
145
|
+
const hasDiscordContext = Boolean(params.discord_channel || params.discord_thread_id || params.discord_message_id || params.discord_source_url);
|
|
146
|
+
return normalizeIntegrationContext({
|
|
147
|
+
source: hasDiscordContext ? "discord" : "openclaw",
|
|
148
|
+
channel_id: params.discord_channel,
|
|
149
|
+
thread_id: params.discord_thread_id,
|
|
150
|
+
message_id: params.discord_message_id,
|
|
151
|
+
source_url: params.discord_source_url,
|
|
152
|
+
metadata: compactRecord({
|
|
153
|
+
wrapper: "openclaw",
|
|
154
|
+
tool: "riddle_proof_change",
|
|
155
|
+
reference_input_ignored: ignoredOpenClawReference(params.reference)
|
|
156
|
+
})
|
|
157
|
+
}, "openclaw");
|
|
158
|
+
}
|
|
159
|
+
function toRiddleProofRunParams(params) {
|
|
160
|
+
return normalizeRunParams({
|
|
161
|
+
repo: params.repo,
|
|
162
|
+
branch: params.branch,
|
|
163
|
+
change_request: params.change_request,
|
|
164
|
+
commit_message: params.commit_message,
|
|
165
|
+
prod_url: params.prod_url,
|
|
166
|
+
capture_script: params.capture_script,
|
|
167
|
+
success_criteria: params.success_criteria,
|
|
168
|
+
assertions: parseOpenClawAssertions(params.assertions_json),
|
|
169
|
+
verification_mode: params.verification_mode,
|
|
170
|
+
resume_session: params.resume_session,
|
|
171
|
+
target_image_url: params.target_image_url,
|
|
172
|
+
target_image_hash: params.target_image_hash,
|
|
173
|
+
viewport_matrix: parseOpenClawJsonObjectOrArray(params.viewport_matrix_json, "viewport_matrix_json"),
|
|
174
|
+
deterministic_setup: parseOpenClawJsonObjectOrArray(params.deterministic_setup_json, "deterministic_setup_json"),
|
|
175
|
+
reference: normalizeOpenClawReference(params.reference),
|
|
176
|
+
base_branch: params.base_branch,
|
|
177
|
+
before_ref: params.before_ref,
|
|
178
|
+
allow_static_preview_fallback: params.allow_static_preview_fallback,
|
|
179
|
+
context: params.context,
|
|
180
|
+
reviewer: params.reviewer,
|
|
181
|
+
mode: params.mode,
|
|
182
|
+
implementation_mode: params.implementation_mode,
|
|
183
|
+
require_diff: params.require_diff,
|
|
184
|
+
allow_code_changes: params.allow_code_changes,
|
|
185
|
+
build_command: params.build_command,
|
|
186
|
+
build_output: params.build_output,
|
|
187
|
+
server_image: params.server_image,
|
|
188
|
+
server_command: params.server_command,
|
|
189
|
+
server_port: params.server_port,
|
|
190
|
+
server_path: params.server_path,
|
|
191
|
+
use_auth: params.use_auth,
|
|
192
|
+
auth_localStorage_json: params.auth_localStorage_json,
|
|
193
|
+
auth_cookies_json: params.auth_cookies_json,
|
|
194
|
+
auth_headers_json: params.auth_headers_json,
|
|
195
|
+
color_scheme: params.color_scheme,
|
|
196
|
+
wait_for_selector: params.wait_for_selector,
|
|
197
|
+
ship_mode: params.ship_mode || (params.ship_after_verify ? "ship" : void 0),
|
|
198
|
+
leave_draft: params.leave_draft,
|
|
199
|
+
engine_state_path: params.state_path,
|
|
200
|
+
harness_state_path: params.harness_state_path,
|
|
201
|
+
max_iterations: params.max_iterations,
|
|
202
|
+
auto_approve: params.auto_approve,
|
|
203
|
+
dry_run: params.dry_run,
|
|
204
|
+
integration_context: openClawIntegrationContext(params)
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
208
|
+
0 && (module.exports = {
|
|
209
|
+
openClawIntegrationContext,
|
|
210
|
+
parseOpenClawAssertions,
|
|
211
|
+
parseOpenClawJsonObjectOrArray,
|
|
212
|
+
toRiddleProofRunParams
|
|
213
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openClawIntegrationContext,
|
|
3
|
+
parseOpenClawAssertions,
|
|
4
|
+
parseOpenClawJsonObjectOrArray,
|
|
5
|
+
toRiddleProofRunParams
|
|
6
|
+
} from "../chunk-BTN76IGW.js";
|
|
7
|
+
import "../chunk-OHJQRDST.js";
|
|
8
|
+
import "../chunk-Y2KTBACQ.js";
|
|
9
|
+
import "../chunk-2CFVREFI.js";
|
|
10
|
+
import "../chunk-VY4Y5U57.js";
|
|
11
|
+
import "../chunk-MLKGABMK.js";
|
|
12
|
+
export {
|
|
13
|
+
openClawIntegrationContext,
|
|
14
|
+
parseOpenClawAssertions,
|
|
15
|
+
parseOpenClawJsonObjectOrArray,
|
|
16
|
+
toRiddleProofRunParams
|
|
17
|
+
};
|