@riddledc/riddle-proof 0.7.72 → 0.7.73

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 CHANGED
@@ -10980,7 +10980,7 @@ function usage() {
10980
10980
  " riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
10981
10981
  " riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
10982
10982
  " riddle-proof-loop status --state-path <path>",
10983
- " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false] [--output <dir>] [--quiet]",
10983
+ " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false] [--poll-attempts n] [--output <dir>] [--quiet]",
10984
10984
  " riddle-proof-loop riddle-preview-deploy <build-dir> <label>",
10985
10985
  " riddle-proof-loop riddle-server-preview <directory> --script-file <file> [--path /route] [--wait-for-selector selector]",
10986
10986
  " riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720] [--strict true|false]",
@@ -11032,6 +11032,13 @@ function optionBoolean(options, key) {
11032
11032
  const flag = key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
11033
11033
  throw new Error(`--${flag} must be true or false.`);
11034
11034
  }
11035
+ function optionNumber(options, ...keys) {
11036
+ for (const key of keys) {
11037
+ const value = optionString(options, key);
11038
+ if (value !== void 0) return Number(value);
11039
+ }
11040
+ return void 0;
11041
+ }
11035
11042
  function readStdin() {
11036
11043
  return (0, import_node_fs6.readFileSync)(0, "utf-8");
11037
11044
  }
@@ -11496,9 +11503,9 @@ async function runProfileForCli(profile, options) {
11496
11503
  }
11497
11504
  const poll = await client.pollJob(jobId, {
11498
11505
  wait: true,
11499
- attempts: optionString(options, "attempts") ? Number(optionString(options, "attempts")) : void 0,
11500
- intervalMs: optionString(options, "intervalMs") ? Number(optionString(options, "intervalMs")) : void 0,
11501
- progressEveryMs: optionString(options, "progressEveryMs") ? Number(optionString(options, "progressEveryMs")) : void 0,
11506
+ attempts: optionNumber(options, "pollAttempts", "attempts"),
11507
+ intervalMs: optionNumber(options, "intervalMs"),
11508
+ progressEveryMs: optionNumber(options, "progressEveryMs"),
11502
11509
  onProgress: options.quiet !== true ? (snapshot) => {
11503
11510
  process.stderr.write(`${riddlePollProgressLine(snapshot)}
11504
11511
  `);
package/dist/cli.js CHANGED
@@ -44,7 +44,7 @@ function usage() {
44
44
  " riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
45
45
  " riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
46
46
  " riddle-proof-loop status --state-path <path>",
47
- " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false] [--output <dir>] [--quiet]",
47
+ " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false] [--poll-attempts n] [--output <dir>] [--quiet]",
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
50
  " riddle-proof-loop riddle-run-script --url <url> --script-file <file> [--viewport 1280x720] [--strict true|false]",
@@ -96,6 +96,13 @@ function optionBoolean(options, key) {
96
96
  const flag = key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
97
97
  throw new Error(`--${flag} must be true or false.`);
98
98
  }
99
+ function optionNumber(options, ...keys) {
100
+ for (const key of keys) {
101
+ const value = optionString(options, key);
102
+ if (value !== void 0) return Number(value);
103
+ }
104
+ return void 0;
105
+ }
99
106
  function readStdin() {
100
107
  return readFileSync(0, "utf-8");
101
108
  }
@@ -560,9 +567,9 @@ async function runProfileForCli(profile, options) {
560
567
  }
561
568
  const poll = await client.pollJob(jobId, {
562
569
  wait: true,
563
- attempts: optionString(options, "attempts") ? Number(optionString(options, "attempts")) : void 0,
564
- intervalMs: optionString(options, "intervalMs") ? Number(optionString(options, "intervalMs")) : void 0,
565
- progressEveryMs: optionString(options, "progressEveryMs") ? Number(optionString(options, "progressEveryMs")) : void 0,
570
+ attempts: optionNumber(options, "pollAttempts", "attempts"),
571
+ intervalMs: optionNumber(options, "intervalMs"),
572
+ progressEveryMs: optionNumber(options, "progressEveryMs"),
566
573
  onProgress: options.quiet !== true ? (snapshot) => {
567
574
  process.stderr.write(`${riddlePollProgressLine(snapshot)}
568
575
  `);
@@ -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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
295
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
385
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
662
+ action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.72",
3
+ "version": "0.7.73",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",