@riddledc/riddle-proof 0.5.53 → 0.5.54
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/checkpoint.cjs +2 -2
- package/dist/checkpoint.js +1 -1
- package/dist/{chunk-T5RHGGQ2.js → chunk-33XO42CY.js} +2 -2
- package/dist/{chunk-53UPEUVU.js → chunk-3UHWI3FO.js} +1 -1
- package/dist/{chunk-KYGWIA7A.js → chunk-A2AWRZ5B.js} +4 -4
- package/dist/{chunk-PVUZZ2P6.js → chunk-MO24D3PY.js} +2 -1
- package/dist/{chunk-4ASMX4R6.js → chunk-RFJ5BQF6.js} +1 -0
- package/dist/{chunk-QBOKV3ES.js → chunk-RXFKKYWA.js} +1 -1
- package/dist/chunk-UR6ADV4Y.js +163 -0
- package/dist/cli.cjs +217 -12
- package/dist/cli.js +65 -8
- package/dist/engine-harness.cjs +4 -2
- package/dist/engine-harness.js +5 -5
- package/dist/index.cjs +179 -5
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +30 -6
- package/dist/openclaw.cjs +1 -0
- package/dist/openclaw.js +3 -3
- package/dist/proof-run-core.cjs +1 -0
- package/dist/proof-run-core.js +1 -1
- package/dist/proof-run-engine.cjs +1 -0
- package/dist/proof-run-engine.js +1 -1
- package/dist/riddle-client.cjs +207 -0
- package/dist/riddle-client.d.cts +71 -0
- package/dist/riddle-client.d.ts +71 -0
- package/dist/riddle-client.js +26 -0
- package/dist/run-card.js +2 -2
- package/dist/runner.cjs +1 -0
- package/dist/runner.js +4 -4
- package/dist/state.cjs +1 -0
- package/dist/state.js +3 -3
- package/dist/types.d.cts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +7 -2
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/riddle-client.ts
|
|
31
|
+
var riddle_client_exports = {};
|
|
32
|
+
__export(riddle_client_exports, {
|
|
33
|
+
DEFAULT_RIDDLE_API_BASE_URL: () => DEFAULT_RIDDLE_API_BASE_URL,
|
|
34
|
+
DEFAULT_RIDDLE_API_KEY_FILE: () => DEFAULT_RIDDLE_API_KEY_FILE,
|
|
35
|
+
RiddleApiError: () => RiddleApiError,
|
|
36
|
+
createRiddleApiClient: () => createRiddleApiClient,
|
|
37
|
+
deployRiddleStaticPreview: () => deployRiddleStaticPreview,
|
|
38
|
+
isTerminalRiddleJobStatus: () => isTerminalRiddleJobStatus,
|
|
39
|
+
parseRiddleViewport: () => parseRiddleViewport,
|
|
40
|
+
pollRiddleJob: () => pollRiddleJob,
|
|
41
|
+
resolveRiddleApiKey: () => resolveRiddleApiKey,
|
|
42
|
+
riddleRequestJson: () => riddleRequestJson,
|
|
43
|
+
runRiddleScript: () => runRiddleScript
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(riddle_client_exports);
|
|
46
|
+
var import_node_child_process = require("child_process");
|
|
47
|
+
var import_node_fs = require("fs");
|
|
48
|
+
var import_node_os = require("os");
|
|
49
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
50
|
+
var DEFAULT_RIDDLE_API_BASE_URL = "https://api.riddledc.com";
|
|
51
|
+
var DEFAULT_RIDDLE_API_KEY_FILE = "/tmp/riddle-api-key";
|
|
52
|
+
var RiddleApiError = class extends Error {
|
|
53
|
+
constructor(pathname, status, body) {
|
|
54
|
+
super(`Riddle API ${pathname} failed HTTP ${status}: ${body}`);
|
|
55
|
+
this.name = "RiddleApiError";
|
|
56
|
+
this.status = status;
|
|
57
|
+
this.body = body;
|
|
58
|
+
this.path = pathname;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function normalizeBaseUrl(value) {
|
|
62
|
+
return (value || DEFAULT_RIDDLE_API_BASE_URL).replace(/\/$/, "");
|
|
63
|
+
}
|
|
64
|
+
function fetchFor(config = {}) {
|
|
65
|
+
return config.fetchImpl || fetch;
|
|
66
|
+
}
|
|
67
|
+
function resolveRiddleApiKey(config = {}) {
|
|
68
|
+
if (config.apiKey?.trim()) return config.apiKey.trim();
|
|
69
|
+
if (process.env.RIDDLE_API_KEY?.trim()) return process.env.RIDDLE_API_KEY.trim();
|
|
70
|
+
const keyFile = config.apiKeyFile || process.env.RIDDLE_API_KEY_FILE || DEFAULT_RIDDLE_API_KEY_FILE;
|
|
71
|
+
if ((0, import_node_fs.existsSync)(keyFile)) {
|
|
72
|
+
const key = (0, import_node_fs.readFileSync)(keyFile, "utf8").trim();
|
|
73
|
+
if (key) return key;
|
|
74
|
+
}
|
|
75
|
+
throw new Error(`Riddle API key missing. Set RIDDLE_API_KEY or write ${DEFAULT_RIDDLE_API_KEY_FILE}.`);
|
|
76
|
+
}
|
|
77
|
+
async function riddleRequestJson(config, pathname, init = {}) {
|
|
78
|
+
const response = await fetchFor(config)(`${normalizeBaseUrl(config.apiBaseUrl)}${pathname}`, {
|
|
79
|
+
...init,
|
|
80
|
+
headers: {
|
|
81
|
+
Authorization: `Bearer ${resolveRiddleApiKey(config)}`,
|
|
82
|
+
"Content-Type": "application/json",
|
|
83
|
+
...init.headers || {}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const text = await response.text();
|
|
87
|
+
let json = null;
|
|
88
|
+
try {
|
|
89
|
+
json = JSON.parse(text);
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
if (!response.ok) throw new RiddleApiError(pathname, response.status, text);
|
|
93
|
+
return json ?? text;
|
|
94
|
+
}
|
|
95
|
+
async function deployRiddleStaticPreview(config, directory, label) {
|
|
96
|
+
if (!directory?.trim()) throw new Error("directory is required");
|
|
97
|
+
if (!label?.trim()) throw new Error("label is required");
|
|
98
|
+
const created = await riddleRequestJson(config, "/v1/preview", {
|
|
99
|
+
method: "POST",
|
|
100
|
+
body: JSON.stringify({ framework: "spa", label })
|
|
101
|
+
});
|
|
102
|
+
const id = String(created.id || "");
|
|
103
|
+
const uploadUrl = String(created.upload_url || "");
|
|
104
|
+
if (!id || !uploadUrl) throw new Error("Riddle preview create response was missing id or upload_url.");
|
|
105
|
+
const scratch = (0, import_node_fs.mkdtempSync)(import_node_path.default.join((0, import_node_os.tmpdir)(), "riddle-preview-upload-"));
|
|
106
|
+
const tarball = import_node_path.default.join(scratch, `${id}.tar.gz`);
|
|
107
|
+
try {
|
|
108
|
+
(0, import_node_child_process.execFileSync)("tar", ["czf", tarball, "-C", directory, "."], { stdio: "pipe" });
|
|
109
|
+
const upload = await fetchFor(config)(uploadUrl, {
|
|
110
|
+
method: "PUT",
|
|
111
|
+
headers: { "Content-Type": "application/gzip" },
|
|
112
|
+
body: (0, import_node_fs.readFileSync)(tarball)
|
|
113
|
+
});
|
|
114
|
+
if (!upload.ok) {
|
|
115
|
+
throw new RiddleApiError(uploadUrl, upload.status, await upload.text());
|
|
116
|
+
}
|
|
117
|
+
} finally {
|
|
118
|
+
(0, import_node_fs.rmSync)(scratch, { recursive: true, force: true });
|
|
119
|
+
}
|
|
120
|
+
const published = await riddleRequestJson(config, `/v1/preview/${id}/publish`, {
|
|
121
|
+
method: "POST"
|
|
122
|
+
});
|
|
123
|
+
return {
|
|
124
|
+
ok: true,
|
|
125
|
+
id: String(published.id || id),
|
|
126
|
+
label,
|
|
127
|
+
preview_url: String(published.preview_url || ""),
|
|
128
|
+
file_count: typeof published.file_count === "number" ? published.file_count : void 0,
|
|
129
|
+
total_bytes: typeof published.total_bytes === "number" ? published.total_bytes : void 0,
|
|
130
|
+
expires_at: typeof created.expires_at === "string" ? created.expires_at : void 0,
|
|
131
|
+
raw: published
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function parseRiddleViewport(value) {
|
|
135
|
+
if (!value) return void 0;
|
|
136
|
+
const match = /^(\d+)x(\d+)$/.exec(value.trim());
|
|
137
|
+
if (!match) throw new Error("viewport must look like 1280x720");
|
|
138
|
+
return { width: Number(match[1]), height: Number(match[2]) };
|
|
139
|
+
}
|
|
140
|
+
async function runRiddleScript(config, input) {
|
|
141
|
+
if (!input.url?.trim()) throw new Error("url is required");
|
|
142
|
+
if (!input.script?.trim()) throw new Error("script is required");
|
|
143
|
+
const payload = {
|
|
144
|
+
url: input.url,
|
|
145
|
+
script: input.script,
|
|
146
|
+
sync: input.sync ?? false,
|
|
147
|
+
timeout_sec: input.timeoutSec || 120
|
|
148
|
+
};
|
|
149
|
+
if (input.viewport) payload.viewport = input.viewport;
|
|
150
|
+
if (input.include) payload.include = input.include;
|
|
151
|
+
if (input.options) payload.options = input.options;
|
|
152
|
+
return riddleRequestJson(config, "/v1/run", {
|
|
153
|
+
method: "POST",
|
|
154
|
+
body: JSON.stringify(payload)
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function isTerminalRiddleJobStatus(status) {
|
|
158
|
+
return ["completed", "complete", "completed_error", "completed_timeout", "failed"].includes(String(status || ""));
|
|
159
|
+
}
|
|
160
|
+
async function pollRiddleJob(config, jobId, options = {}) {
|
|
161
|
+
if (!jobId?.trim()) throw new Error("jobId is required");
|
|
162
|
+
const attempts = options.attempts || (options.wait ? 60 : 1);
|
|
163
|
+
const intervalMs = options.intervalMs || 2e3;
|
|
164
|
+
let job = null;
|
|
165
|
+
for (let index = 0; index < attempts; index += 1) {
|
|
166
|
+
job = await riddleRequestJson(config, `/v1/jobs/${jobId}`);
|
|
167
|
+
if (isTerminalRiddleJobStatus(job.status)) break;
|
|
168
|
+
if (index + 1 < attempts) {
|
|
169
|
+
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const status = job?.status ? String(job.status) : null;
|
|
173
|
+
if (!isTerminalRiddleJobStatus(status)) {
|
|
174
|
+
return { ok: true, job_id: jobId, status, terminal: false, job };
|
|
175
|
+
}
|
|
176
|
+
const artifacts = await riddleRequestJson(config, `/v1/jobs/${jobId}/artifacts`);
|
|
177
|
+
return {
|
|
178
|
+
ok: status === "completed" || status === "complete",
|
|
179
|
+
job_id: jobId,
|
|
180
|
+
status,
|
|
181
|
+
terminal: true,
|
|
182
|
+
job,
|
|
183
|
+
artifacts
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function createRiddleApiClient(config = {}) {
|
|
187
|
+
return {
|
|
188
|
+
requestJson: (pathname, init) => riddleRequestJson(config, pathname, init),
|
|
189
|
+
deployStaticPreview: (directory, label) => deployRiddleStaticPreview(config, directory, label),
|
|
190
|
+
runScript: (input) => runRiddleScript(config, input),
|
|
191
|
+
pollJob: (jobId, options) => pollRiddleJob(config, jobId, options)
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
195
|
+
0 && (module.exports = {
|
|
196
|
+
DEFAULT_RIDDLE_API_BASE_URL,
|
|
197
|
+
DEFAULT_RIDDLE_API_KEY_FILE,
|
|
198
|
+
RiddleApiError,
|
|
199
|
+
createRiddleApiClient,
|
|
200
|
+
deployRiddleStaticPreview,
|
|
201
|
+
isTerminalRiddleJobStatus,
|
|
202
|
+
parseRiddleViewport,
|
|
203
|
+
pollRiddleJob,
|
|
204
|
+
resolveRiddleApiKey,
|
|
205
|
+
riddleRequestJson,
|
|
206
|
+
runRiddleScript
|
|
207
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const DEFAULT_RIDDLE_API_BASE_URL = "https://api.riddledc.com";
|
|
2
|
+
declare const DEFAULT_RIDDLE_API_KEY_FILE = "/tmp/riddle-api-key";
|
|
3
|
+
type RiddleFetch = typeof fetch;
|
|
4
|
+
interface RiddleClientConfig {
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
apiKeyFile?: string;
|
|
7
|
+
apiBaseUrl?: string;
|
|
8
|
+
fetchImpl?: RiddleFetch;
|
|
9
|
+
}
|
|
10
|
+
interface RiddlePreviewDeployResult {
|
|
11
|
+
ok: true;
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
preview_url: string;
|
|
15
|
+
file_count?: number;
|
|
16
|
+
total_bytes?: number;
|
|
17
|
+
expires_at?: string;
|
|
18
|
+
raw?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
interface RiddleRunScriptInput {
|
|
21
|
+
url: string;
|
|
22
|
+
script: string;
|
|
23
|
+
viewport?: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
timeoutSec?: number;
|
|
28
|
+
sync?: boolean;
|
|
29
|
+
include?: string[];
|
|
30
|
+
options?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
interface RiddlePollJobResult {
|
|
33
|
+
ok: boolean;
|
|
34
|
+
job_id: string;
|
|
35
|
+
status: string | null;
|
|
36
|
+
terminal: boolean;
|
|
37
|
+
job: Record<string, unknown> | null;
|
|
38
|
+
artifacts?: Record<string, unknown> | null;
|
|
39
|
+
}
|
|
40
|
+
declare class RiddleApiError extends Error {
|
|
41
|
+
readonly status: number;
|
|
42
|
+
readonly body: string;
|
|
43
|
+
readonly path: string;
|
|
44
|
+
constructor(pathname: string, status: number, body: string);
|
|
45
|
+
}
|
|
46
|
+
declare function resolveRiddleApiKey(config?: RiddleClientConfig): string;
|
|
47
|
+
declare function riddleRequestJson<T = unknown>(config: RiddleClientConfig, pathname: string, init?: RequestInit): Promise<T>;
|
|
48
|
+
declare function deployRiddleStaticPreview(config: RiddleClientConfig, directory: string, label: string): Promise<RiddlePreviewDeployResult>;
|
|
49
|
+
declare function parseRiddleViewport(value?: string): {
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
} | undefined;
|
|
53
|
+
declare function runRiddleScript(config: RiddleClientConfig, input: RiddleRunScriptInput): Promise<Record<string, unknown>>;
|
|
54
|
+
declare function isTerminalRiddleJobStatus(status: unknown): boolean;
|
|
55
|
+
declare function pollRiddleJob(config: RiddleClientConfig, jobId: string, options?: {
|
|
56
|
+
wait?: boolean;
|
|
57
|
+
attempts?: number;
|
|
58
|
+
intervalMs?: number;
|
|
59
|
+
}): Promise<RiddlePollJobResult>;
|
|
60
|
+
declare function createRiddleApiClient(config?: RiddleClientConfig): {
|
|
61
|
+
requestJson: <T = unknown>(pathname: string, init?: RequestInit) => Promise<T>;
|
|
62
|
+
deployStaticPreview: (directory: string, label: string) => Promise<RiddlePreviewDeployResult>;
|
|
63
|
+
runScript: (input: RiddleRunScriptInput) => Promise<Record<string, unknown>>;
|
|
64
|
+
pollJob: (jobId: string, options?: {
|
|
65
|
+
wait?: boolean;
|
|
66
|
+
attempts?: number;
|
|
67
|
+
intervalMs?: number;
|
|
68
|
+
}) => Promise<RiddlePollJobResult>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, type RiddleClientConfig, type RiddleFetch, type RiddlePollJobResult, type RiddlePreviewDeployResult, type RiddleRunScriptInput, createRiddleApiClient, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const DEFAULT_RIDDLE_API_BASE_URL = "https://api.riddledc.com";
|
|
2
|
+
declare const DEFAULT_RIDDLE_API_KEY_FILE = "/tmp/riddle-api-key";
|
|
3
|
+
type RiddleFetch = typeof fetch;
|
|
4
|
+
interface RiddleClientConfig {
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
apiKeyFile?: string;
|
|
7
|
+
apiBaseUrl?: string;
|
|
8
|
+
fetchImpl?: RiddleFetch;
|
|
9
|
+
}
|
|
10
|
+
interface RiddlePreviewDeployResult {
|
|
11
|
+
ok: true;
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
preview_url: string;
|
|
15
|
+
file_count?: number;
|
|
16
|
+
total_bytes?: number;
|
|
17
|
+
expires_at?: string;
|
|
18
|
+
raw?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
interface RiddleRunScriptInput {
|
|
21
|
+
url: string;
|
|
22
|
+
script: string;
|
|
23
|
+
viewport?: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
timeoutSec?: number;
|
|
28
|
+
sync?: boolean;
|
|
29
|
+
include?: string[];
|
|
30
|
+
options?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
interface RiddlePollJobResult {
|
|
33
|
+
ok: boolean;
|
|
34
|
+
job_id: string;
|
|
35
|
+
status: string | null;
|
|
36
|
+
terminal: boolean;
|
|
37
|
+
job: Record<string, unknown> | null;
|
|
38
|
+
artifacts?: Record<string, unknown> | null;
|
|
39
|
+
}
|
|
40
|
+
declare class RiddleApiError extends Error {
|
|
41
|
+
readonly status: number;
|
|
42
|
+
readonly body: string;
|
|
43
|
+
readonly path: string;
|
|
44
|
+
constructor(pathname: string, status: number, body: string);
|
|
45
|
+
}
|
|
46
|
+
declare function resolveRiddleApiKey(config?: RiddleClientConfig): string;
|
|
47
|
+
declare function riddleRequestJson<T = unknown>(config: RiddleClientConfig, pathname: string, init?: RequestInit): Promise<T>;
|
|
48
|
+
declare function deployRiddleStaticPreview(config: RiddleClientConfig, directory: string, label: string): Promise<RiddlePreviewDeployResult>;
|
|
49
|
+
declare function parseRiddleViewport(value?: string): {
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
} | undefined;
|
|
53
|
+
declare function runRiddleScript(config: RiddleClientConfig, input: RiddleRunScriptInput): Promise<Record<string, unknown>>;
|
|
54
|
+
declare function isTerminalRiddleJobStatus(status: unknown): boolean;
|
|
55
|
+
declare function pollRiddleJob(config: RiddleClientConfig, jobId: string, options?: {
|
|
56
|
+
wait?: boolean;
|
|
57
|
+
attempts?: number;
|
|
58
|
+
intervalMs?: number;
|
|
59
|
+
}): Promise<RiddlePollJobResult>;
|
|
60
|
+
declare function createRiddleApiClient(config?: RiddleClientConfig): {
|
|
61
|
+
requestJson: <T = unknown>(pathname: string, init?: RequestInit) => Promise<T>;
|
|
62
|
+
deployStaticPreview: (directory: string, label: string) => Promise<RiddlePreviewDeployResult>;
|
|
63
|
+
runScript: (input: RiddleRunScriptInput) => Promise<Record<string, unknown>>;
|
|
64
|
+
pollJob: (jobId: string, options?: {
|
|
65
|
+
wait?: boolean;
|
|
66
|
+
attempts?: number;
|
|
67
|
+
intervalMs?: number;
|
|
68
|
+
}) => Promise<RiddlePollJobResult>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { DEFAULT_RIDDLE_API_BASE_URL, DEFAULT_RIDDLE_API_KEY_FILE, RiddleApiError, type RiddleClientConfig, type RiddleFetch, type RiddlePollJobResult, type RiddlePreviewDeployResult, type RiddleRunScriptInput, createRiddleApiClient, deployRiddleStaticPreview, isTerminalRiddleJobStatus, parseRiddleViewport, pollRiddleJob, resolveRiddleApiKey, riddleRequestJson, runRiddleScript };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_RIDDLE_API_BASE_URL,
|
|
3
|
+
DEFAULT_RIDDLE_API_KEY_FILE,
|
|
4
|
+
RiddleApiError,
|
|
5
|
+
createRiddleApiClient,
|
|
6
|
+
deployRiddleStaticPreview,
|
|
7
|
+
isTerminalRiddleJobStatus,
|
|
8
|
+
parseRiddleViewport,
|
|
9
|
+
pollRiddleJob,
|
|
10
|
+
resolveRiddleApiKey,
|
|
11
|
+
riddleRequestJson,
|
|
12
|
+
runRiddleScript
|
|
13
|
+
} from "./chunk-UR6ADV4Y.js";
|
|
14
|
+
export {
|
|
15
|
+
DEFAULT_RIDDLE_API_BASE_URL,
|
|
16
|
+
DEFAULT_RIDDLE_API_KEY_FILE,
|
|
17
|
+
RiddleApiError,
|
|
18
|
+
createRiddleApiClient,
|
|
19
|
+
deployRiddleStaticPreview,
|
|
20
|
+
isTerminalRiddleJobStatus,
|
|
21
|
+
parseRiddleViewport,
|
|
22
|
+
pollRiddleJob,
|
|
23
|
+
resolveRiddleApiKey,
|
|
24
|
+
riddleRequestJson,
|
|
25
|
+
runRiddleScript
|
|
26
|
+
};
|
package/dist/run-card.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
3
3
|
createRiddleProofRunCard
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-3UHWI3FO.js";
|
|
5
|
+
import "./chunk-33XO42CY.js";
|
|
6
6
|
import "./chunk-DUFDZJOF.js";
|
|
7
7
|
export {
|
|
8
8
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
package/dist/runner.cjs
CHANGED
|
@@ -204,6 +204,7 @@ function normalizeRunParams(input) {
|
|
|
204
204
|
leave_draft: input.leave_draft,
|
|
205
205
|
engine_state_path: input.engine_state_path,
|
|
206
206
|
harness_state_path: input.harness_state_path,
|
|
207
|
+
riddle_engine_module_url: input.riddle_engine_module_url,
|
|
207
208
|
max_iterations: input.max_iterations,
|
|
208
209
|
auto_approve: input.auto_approve,
|
|
209
210
|
dry_run: input.dry_run,
|
package/dist/runner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RXFKKYWA.js";
|
|
4
|
+
import "./chunk-MO24D3PY.js";
|
|
5
|
+
import "./chunk-3UHWI3FO.js";
|
|
6
|
+
import "./chunk-33XO42CY.js";
|
|
7
7
|
import "./chunk-DUFDZJOF.js";
|
|
8
8
|
export {
|
|
9
9
|
runRiddleProof
|
package/dist/state.cjs
CHANGED
|
@@ -377,6 +377,7 @@ function normalizeRunParams(input) {
|
|
|
377
377
|
leave_draft: input.leave_draft,
|
|
378
378
|
engine_state_path: input.engine_state_path,
|
|
379
379
|
harness_state_path: input.harness_state_path,
|
|
380
|
+
riddle_engine_module_url: input.riddle_engine_module_url,
|
|
380
381
|
max_iterations: input.max_iterations,
|
|
381
382
|
auto_approve: input.auto_approve,
|
|
382
383
|
dry_run: input.dry_run,
|
package/dist/state.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
normalizePrLifecycleState,
|
|
10
10
|
normalizeRunParams,
|
|
11
11
|
setRunStatus
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-MO24D3PY.js";
|
|
13
|
+
import "./chunk-3UHWI3FO.js";
|
|
14
|
+
import "./chunk-33XO42CY.js";
|
|
15
15
|
import "./chunk-DUFDZJOF.js";
|
|
16
16
|
export {
|
|
17
17
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
package/dist/types.d.cts
CHANGED
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riddledc/riddle-proof",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.54",
|
|
4
4
|
"description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RiddleDC",
|
|
@@ -93,6 +93,11 @@
|
|
|
93
93
|
"types": "./dist/proof-run-engine.d.ts",
|
|
94
94
|
"import": "./dist/proof-run-engine.js",
|
|
95
95
|
"require": "./dist/proof-run-engine.cjs"
|
|
96
|
+
},
|
|
97
|
+
"./riddle-client": {
|
|
98
|
+
"types": "./dist/riddle-client.d.ts",
|
|
99
|
+
"import": "./dist/riddle-client.js",
|
|
100
|
+
"require": "./dist/riddle-client.cjs"
|
|
96
101
|
}
|
|
97
102
|
},
|
|
98
103
|
"bin": {
|
|
@@ -115,7 +120,7 @@
|
|
|
115
120
|
"typescript": "^5.4.5"
|
|
116
121
|
},
|
|
117
122
|
"scripts": {
|
|
118
|
-
"build": "tsup src/index.ts src/types.ts src/result.ts src/state.ts src/checkpoint.ts src/run-card.ts src/runner.ts src/engine-harness.ts src/codex-exec-agent.ts src/local-agent.ts src/cli.ts src/diagnostics.ts src/proof-session.ts src/playability.ts src/openclaw.ts src/proof-run-core.ts src/proof-run-engine.ts --format cjs,esm --dts --out-dir dist --clean",
|
|
123
|
+
"build": "tsup src/index.ts src/types.ts src/result.ts src/state.ts src/checkpoint.ts src/run-card.ts src/runner.ts src/engine-harness.ts src/codex-exec-agent.ts src/local-agent.ts src/cli.ts src/diagnostics.ts src/proof-session.ts src/playability.ts src/openclaw.ts src/proof-run-core.ts src/proof-run-engine.ts src/riddle-client.ts --format cjs,esm --dts --out-dir dist --clean",
|
|
119
124
|
"clean": "rm -rf dist",
|
|
120
125
|
"lint": "echo 'lint: (not configured)'",
|
|
121
126
|
"test": "npm run build && node test.js && node proof-run.test.js"
|