@riddledc/riddle-proof 0.7.179 → 0.7.180

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/README.md CHANGED
@@ -192,6 +192,10 @@ riddle-proof-loop run-profile \
192
192
  Hosted profile runs emit Riddle poll progress to stderr while waiting. Use
193
193
  `--quiet` to suppress progress lines, or `--progress-every-ms` to tune the
194
194
  heartbeat cadence for long route-inventory or workflow profiles.
195
+ By default, `run-profile` writes the full JSON result to stdout for automation.
196
+ For agent loops where the saved artifacts are the source of truth, use
197
+ `--result-format summary` to print the same compact Markdown summary that is
198
+ written to `summary.md`, or `--result-format none` to leave stdout empty.
195
199
  Hosted `run-profile` submits package-generated profile scripts with
196
200
  `strict=false` by default because the generated runner is larger than Riddle's
197
201
  generic inline-script warning threshold. Use `--strict=true` when you
package/dist/cli.cjs CHANGED
@@ -15765,7 +15765,7 @@ function usage() {
15765
15765
  " riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
15766
15766
  " riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
15767
15767
  " riddle-proof-loop status --state-path <path>",
15768
- " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false; default false] [--split-viewports true|false; default false] [--poll-attempts n] [--output <dir>|--output-dir <dir>] [--quiet]",
15768
+ " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false; default false] [--split-viewports true|false; default false] [--poll-attempts n] [--output <dir>|--output-dir <dir>] [--result-format json|summary|none; default json] [--quiet]",
15769
15769
  " riddle-proof-loop profile-body-assertions --artifact <file|url|-> --candidates-json <file|json|-> [--required-json <file|json|->] [--format json|body-contains]",
15770
15770
  " riddle-proof-loop profile-http-status-preflight --profile <file|json|-> --url <base-url> [--format json|summary]",
15771
15771
  " riddle-proof-loop riddle-preview-deploy <build-dir> <label> [--framework spa|static]",
@@ -15842,6 +15842,21 @@ function optionInteger(options, fallback, ...keys) {
15842
15842
  function profileOutputDirOption(options) {
15843
15843
  return optionString(options, "output") ?? optionString(options, "outputDir");
15844
15844
  }
15845
+ function runProfileResultFormatOption(options) {
15846
+ const format = optionString(options, "resultFormat") ?? "json";
15847
+ if (format === "json" || format === "summary" || format === "none") return format;
15848
+ throw new Error("--result-format must be json, summary, or none.");
15849
+ }
15850
+ function writeRunProfileResult(result, options) {
15851
+ const format = runProfileResultFormatOption(options);
15852
+ if (format === "none") return;
15853
+ if (format === "summary") {
15854
+ process.stdout.write(profileResultMarkdown(result));
15855
+ return;
15856
+ }
15857
+ process.stdout.write(`${JSON.stringify(result, null, 2)}
15858
+ `);
15859
+ }
15845
15860
  function previewFrameworkOption(options) {
15846
15861
  const framework = optionString(options, "framework") ?? "static";
15847
15862
  if (framework === "spa" || framework === "static") return framework;
@@ -17600,8 +17615,7 @@ async function main() {
17600
17615
  process.stderr.write(`${diagnosticLine}
17601
17616
  `);
17602
17617
  }
17603
- process.stdout.write(`${JSON.stringify(result, null, 2)}
17604
- `);
17618
+ writeRunProfileResult(result, options);
17605
17619
  process.exitCode = profileStatusExitCode(profile, result.status);
17606
17620
  return;
17607
17621
  }
package/dist/cli.js CHANGED
@@ -48,7 +48,7 @@ function usage() {
48
48
  " riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
49
49
  " riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
50
50
  " riddle-proof-loop status --state-path <path>",
51
- " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false; default false] [--split-viewports true|false; default false] [--poll-attempts n] [--output <dir>|--output-dir <dir>] [--quiet]",
51
+ " riddle-proof-loop run-profile --profile <file|json|-> --url <base-url> [--runner riddle] [--strict true|false; default false] [--split-viewports true|false; default false] [--poll-attempts n] [--output <dir>|--output-dir <dir>] [--result-format json|summary|none; default json] [--quiet]",
52
52
  " riddle-proof-loop profile-body-assertions --artifact <file|url|-> --candidates-json <file|json|-> [--required-json <file|json|->] [--format json|body-contains]",
53
53
  " riddle-proof-loop profile-http-status-preflight --profile <file|json|-> --url <base-url> [--format json|summary]",
54
54
  " riddle-proof-loop riddle-preview-deploy <build-dir> <label> [--framework spa|static]",
@@ -125,6 +125,21 @@ function optionInteger(options, fallback, ...keys) {
125
125
  function profileOutputDirOption(options) {
126
126
  return optionString(options, "output") ?? optionString(options, "outputDir");
127
127
  }
128
+ function runProfileResultFormatOption(options) {
129
+ const format = optionString(options, "resultFormat") ?? "json";
130
+ if (format === "json" || format === "summary" || format === "none") return format;
131
+ throw new Error("--result-format must be json, summary, or none.");
132
+ }
133
+ function writeRunProfileResult(result, options) {
134
+ const format = runProfileResultFormatOption(options);
135
+ if (format === "none") return;
136
+ if (format === "summary") {
137
+ process.stdout.write(profileResultMarkdown(result));
138
+ return;
139
+ }
140
+ process.stdout.write(`${JSON.stringify(result, null, 2)}
141
+ `);
142
+ }
128
143
  function previewFrameworkOption(options) {
129
144
  const framework = optionString(options, "framework") ?? "static";
130
145
  if (framework === "spa" || framework === "static") return framework;
@@ -1883,8 +1898,7 @@ async function main() {
1883
1898
  process.stderr.write(`${diagnosticLine}
1884
1899
  `);
1885
1900
  }
1886
- process.stdout.write(`${JSON.stringify(result, null, 2)}
1887
- `);
1901
+ writeRunProfileResult(result, options);
1888
1902
  process.exitCode = profileStatusExitCode(profile, result.status);
1889
1903
  return;
1890
1904
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.179",
3
+ "version": "0.7.180",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",