@riddledc/riddle-proof 0.7.25 → 0.7.26
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/cli.cjs +20 -2
- package/dist/cli.js +20 -2
- package/dist/proof-run-engine.d.cts +3 -3
- package/dist/proof-run-engine.d.ts +3 -3
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -8248,7 +8248,7 @@ function usage() {
|
|
|
8248
8248
|
" riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--output <dir>]",
|
|
8249
8249
|
" riddle-proof-loop riddle-preview-deploy <build-dir> <label>",
|
|
8250
8250
|
" riddle-proof-loop riddle-server-preview <directory> --script-file <file> [--path /route] [--wait-for-selector selector]",
|
|
8251
|
-
" riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720]",
|
|
8251
|
+
" riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720] [--strict true|false]",
|
|
8252
8252
|
" riddle-proof-loop riddle-poll <job-id> [--wait] [--attempts n] [--quiet]",
|
|
8253
8253
|
" riddle-proof-loop doctor local [--codex-command <path>]",
|
|
8254
8254
|
"",
|
|
@@ -8265,7 +8265,14 @@ function parseArgs(argv) {
|
|
|
8265
8265
|
positional.push(arg);
|
|
8266
8266
|
continue;
|
|
8267
8267
|
}
|
|
8268
|
-
const
|
|
8268
|
+
const raw = arg.slice(2);
|
|
8269
|
+
const equalIndex = raw.indexOf("=");
|
|
8270
|
+
const rawKey = equalIndex >= 0 ? raw.slice(0, equalIndex) : raw;
|
|
8271
|
+
const key = rawKey.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
8272
|
+
if (equalIndex >= 0) {
|
|
8273
|
+
options[key] = raw.slice(equalIndex + 1);
|
|
8274
|
+
continue;
|
|
8275
|
+
}
|
|
8269
8276
|
const next = argv[index + 1];
|
|
8270
8277
|
if (!next || next.startsWith("--")) {
|
|
8271
8278
|
options[key] = true;
|
|
@@ -8280,6 +8287,16 @@ function optionString(options, key) {
|
|
|
8280
8287
|
const value = options[key];
|
|
8281
8288
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
8282
8289
|
}
|
|
8290
|
+
function optionBoolean(options, key) {
|
|
8291
|
+
const value = options[key];
|
|
8292
|
+
if (typeof value === "undefined") return void 0;
|
|
8293
|
+
if (typeof value === "boolean") return value;
|
|
8294
|
+
const normalized = value.trim().toLowerCase();
|
|
8295
|
+
if (["true", "1", "yes", "y"].includes(normalized)) return true;
|
|
8296
|
+
if (["false", "0", "no", "n"].includes(normalized)) return false;
|
|
8297
|
+
const flag = key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
8298
|
+
throw new Error(`--${flag} must be true or false.`);
|
|
8299
|
+
}
|
|
8283
8300
|
function readStdin() {
|
|
8284
8301
|
return (0, import_node_fs6.readFileSync)(0, "utf-8");
|
|
8285
8302
|
}
|
|
@@ -8725,6 +8742,7 @@ async function main() {
|
|
|
8725
8742
|
script: (0, import_node_fs6.readFileSync)(scriptFile, "utf-8"),
|
|
8726
8743
|
viewport: parseRiddleViewport(optionString(options, "viewport")),
|
|
8727
8744
|
timeoutSec: optionString(options, "timeout") ? Number(optionString(options, "timeout")) : void 0,
|
|
8745
|
+
strict: optionBoolean(options, "strict"),
|
|
8728
8746
|
sync: options.sync === true ? true : void 0
|
|
8729
8747
|
});
|
|
8730
8748
|
process.stdout.write(`${JSON.stringify(result, null, 2)}
|
package/dist/cli.js
CHANGED
|
@@ -47,7 +47,7 @@ function usage() {
|
|
|
47
47
|
" riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--output <dir>]",
|
|
48
48
|
" riddle-proof-loop riddle-preview-deploy <build-dir> <label>",
|
|
49
49
|
" riddle-proof-loop riddle-server-preview <directory> --script-file <file> [--path /route] [--wait-for-selector selector]",
|
|
50
|
-
" riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720]",
|
|
50
|
+
" riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720] [--strict true|false]",
|
|
51
51
|
" riddle-proof-loop riddle-poll <job-id> [--wait] [--attempts n] [--quiet]",
|
|
52
52
|
" riddle-proof-loop doctor local [--codex-command <path>]",
|
|
53
53
|
"",
|
|
@@ -64,7 +64,14 @@ function parseArgs(argv) {
|
|
|
64
64
|
positional.push(arg);
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const raw = arg.slice(2);
|
|
68
|
+
const equalIndex = raw.indexOf("=");
|
|
69
|
+
const rawKey = equalIndex >= 0 ? raw.slice(0, equalIndex) : raw;
|
|
70
|
+
const key = rawKey.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
71
|
+
if (equalIndex >= 0) {
|
|
72
|
+
options[key] = raw.slice(equalIndex + 1);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
68
75
|
const next = argv[index + 1];
|
|
69
76
|
if (!next || next.startsWith("--")) {
|
|
70
77
|
options[key] = true;
|
|
@@ -79,6 +86,16 @@ function optionString(options, key) {
|
|
|
79
86
|
const value = options[key];
|
|
80
87
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
81
88
|
}
|
|
89
|
+
function optionBoolean(options, key) {
|
|
90
|
+
const value = options[key];
|
|
91
|
+
if (typeof value === "undefined") return void 0;
|
|
92
|
+
if (typeof value === "boolean") return value;
|
|
93
|
+
const normalized = value.trim().toLowerCase();
|
|
94
|
+
if (["true", "1", "yes", "y"].includes(normalized)) return true;
|
|
95
|
+
if (["false", "0", "no", "n"].includes(normalized)) return false;
|
|
96
|
+
const flag = key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
97
|
+
throw new Error(`--${flag} must be true or false.`);
|
|
98
|
+
}
|
|
82
99
|
function readStdin() {
|
|
83
100
|
return readFileSync(0, "utf-8");
|
|
84
101
|
}
|
|
@@ -524,6 +541,7 @@ async function main() {
|
|
|
524
541
|
script: readFileSync(scriptFile, "utf-8"),
|
|
525
542
|
viewport: parseRiddleViewport(optionString(options, "viewport")),
|
|
526
543
|
timeoutSec: optionString(options, "timeout") ? Number(optionString(options, "timeout")) : void 0,
|
|
544
|
+
strict: optionBoolean(options, "strict"),
|
|
527
545
|
sync: options.sync === true ? true : void 0
|
|
528
546
|
});
|
|
529
547
|
process.stdout.write(`${JSON.stringify(result, null, 2)}
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|