@riddledc/riddle-proof 0.7.191 → 0.7.193

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.
@@ -5841,19 +5841,23 @@ async function ensureProfilePageHelpers(context) {
5841
5841
  const existing = window.__riddleProofProfile && typeof window.__riddleProofProfile === "object"
5842
5842
  ? window.__riddleProofProfile
5843
5843
  : {};
5844
- Object.defineProperties(existing, {
5845
- current: { configurable: true, get: currentRoute },
5846
- appPath: { configurable: true, get: () => currentRoute().appPath },
5847
- appRoute: { configurable: true, get: () => currentRoute().appRoute },
5848
- basePath: { configurable: true, get: () => currentRoute().basePath },
5849
- previewMountPrefix: { configurable: true, get: () => currentRoute().previewMountPrefix },
5850
- mountedPath: { configurable: true, get: () => currentRoute().mountedPath },
5851
- mountedRoute: { configurable: true, get: () => currentRoute().mountedRoute },
5852
- });
5844
+ const refreshSnapshot = () => {
5845
+ const route = currentRoute();
5846
+ existing.current = route;
5847
+ existing.appPath = route.appPath;
5848
+ existing.appRoute = route.appRoute;
5849
+ existing.basePath = route.basePath;
5850
+ existing.previewMountPrefix = route.previewMountPrefix;
5851
+ existing.mountedPath = route.mountedPath;
5852
+ existing.mountedRoute = route.mountedRoute;
5853
+ return route;
5854
+ };
5853
5855
  existing.version = "riddle-proof.profile-helper.v1";
5854
5856
  existing.route = currentRoute;
5855
5857
  existing.getRoute = currentRoute;
5858
+ existing.refresh = refreshSnapshot;
5856
5859
  existing.joinRoute = joinRoute;
5860
+ refreshSnapshot();
5857
5861
  window.__riddleProofProfile = existing;
5858
5862
  }, { targetUrl });
5859
5863
  } catch {
package/dist/cli.cjs CHANGED
@@ -12782,19 +12782,23 @@ async function ensureProfilePageHelpers(context) {
12782
12782
  const existing = window.__riddleProofProfile && typeof window.__riddleProofProfile === "object"
12783
12783
  ? window.__riddleProofProfile
12784
12784
  : {};
12785
- Object.defineProperties(existing, {
12786
- current: { configurable: true, get: currentRoute },
12787
- appPath: { configurable: true, get: () => currentRoute().appPath },
12788
- appRoute: { configurable: true, get: () => currentRoute().appRoute },
12789
- basePath: { configurable: true, get: () => currentRoute().basePath },
12790
- previewMountPrefix: { configurable: true, get: () => currentRoute().previewMountPrefix },
12791
- mountedPath: { configurable: true, get: () => currentRoute().mountedPath },
12792
- mountedRoute: { configurable: true, get: () => currentRoute().mountedRoute },
12793
- });
12785
+ const refreshSnapshot = () => {
12786
+ const route = currentRoute();
12787
+ existing.current = route;
12788
+ existing.appPath = route.appPath;
12789
+ existing.appRoute = route.appRoute;
12790
+ existing.basePath = route.basePath;
12791
+ existing.previewMountPrefix = route.previewMountPrefix;
12792
+ existing.mountedPath = route.mountedPath;
12793
+ existing.mountedRoute = route.mountedRoute;
12794
+ return route;
12795
+ };
12794
12796
  existing.version = "riddle-proof.profile-helper.v1";
12795
12797
  existing.route = currentRoute;
12796
12798
  existing.getRoute = currentRoute;
12799
+ existing.refresh = refreshSnapshot;
12797
12800
  existing.joinRoute = joinRoute;
12801
+ refreshSnapshot();
12798
12802
  window.__riddleProofProfile = existing;
12799
12803
  }, { targetUrl });
12800
12804
  } catch {
@@ -15952,7 +15956,7 @@ function usage() {
15952
15956
  " riddle-proof-loop respond --state-path <path> --response-json <file|json|->",
15953
15957
  " riddle-proof-loop respond --state-path <path> --decision <decision> --summary <text> [--payload-json <file|json|->]",
15954
15958
  " riddle-proof-loop status --state-path <path>",
15955
- " 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]",
15959
+ " 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|compact-json|summary|none; default json] [--quiet]",
15956
15960
  " riddle-proof-loop profile-body-assertions --artifact <file|url|-> --candidates-json <file|json|-> [--required-json <file|json|->] [--format json|body-contains]",
15957
15961
  " riddle-proof-loop profile-http-status-preflight --profile <file|json|-> --url <base-url> [--format json|summary]",
15958
15962
  " riddle-proof-loop riddle-preview-deploy <build-dir> <label> [--framework spa|static]",
@@ -16031,8 +16035,53 @@ function profileOutputDirOption(options) {
16031
16035
  }
16032
16036
  function runProfileResultFormatOption(options) {
16033
16037
  const format = optionString(options, "resultFormat") ?? "json";
16034
- if (format === "json" || format === "summary" || format === "none") return format;
16035
- throw new Error("--result-format must be json, summary, or none.");
16038
+ if (format === "compact") return "compact-json";
16039
+ if (format === "json" || format === "compact-json" || format === "summary" || format === "none") return format;
16040
+ throw new Error("--result-format must be json, compact-json, summary, or none.");
16041
+ }
16042
+ function compactProfileCheckCounts(result) {
16043
+ return result.checks.reduce((counts, check) => {
16044
+ const status = String(check.status || "unknown");
16045
+ counts[status] = (counts[status] || 0) + 1;
16046
+ counts.total = (counts.total || 0) + 1;
16047
+ return counts;
16048
+ }, { total: 0 });
16049
+ }
16050
+ function compactProfileChecks(result) {
16051
+ return result.checks.map((check) => ({
16052
+ type: check.type,
16053
+ label: check.label,
16054
+ status: check.status,
16055
+ message: check.message
16056
+ }));
16057
+ }
16058
+ function compactRunProfileResult(result, options) {
16059
+ const outputDir = profileOutputDirOption(options);
16060
+ return {
16061
+ version: "riddle-proof.profile-compact-result.v1",
16062
+ profile_name: result.profile_name,
16063
+ runner: result.runner,
16064
+ status: result.status,
16065
+ summary: result.summary,
16066
+ captured_at: result.captured_at,
16067
+ baseline_policy: result.baseline_policy,
16068
+ route: result.route,
16069
+ check_counts: compactProfileCheckCounts(result),
16070
+ checks: compactProfileChecks(result),
16071
+ warnings: result.warnings,
16072
+ environment_blocker: result.environment_blocker,
16073
+ metadata: result.metadata,
16074
+ riddle: result.riddle,
16075
+ artifacts: result.artifacts,
16076
+ output_dir: outputDir,
16077
+ output_files: outputDir ? {
16078
+ profile_result: "profile-result.json",
16079
+ summary: "summary.md",
16080
+ proof_json: result.evidence ? "proof.json" : void 0,
16081
+ console: result.evidence?.console ? "console.json" : void 0,
16082
+ dom_summary: result.evidence?.dom_summary ? "dom-summary.json" : void 0
16083
+ } : void 0
16084
+ };
16036
16085
  }
16037
16086
  function writeRunProfileResult(result, options) {
16038
16087
  const format = runProfileResultFormatOption(options);
@@ -16041,6 +16090,11 @@ function writeRunProfileResult(result, options) {
16041
16090
  process.stdout.write(profileResultMarkdown(result));
16042
16091
  return;
16043
16092
  }
16093
+ if (format === "compact-json") {
16094
+ process.stdout.write(`${JSON.stringify(compactRunProfileResult(result, options), null, 2)}
16095
+ `);
16096
+ return;
16097
+ }
16044
16098
  process.stdout.write(`${JSON.stringify(result, null, 2)}
16045
16099
  `);
16046
16100
  }
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  profileStatusExitCode,
14
14
  resolveRiddleProofProfileTargetUrl,
15
15
  resolveRiddleProofProfileTimeoutSec
16
- } from "./chunk-BG5GVTGM.js";
16
+ } from "./chunk-UKMTTGQ4.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -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>] [--result-format json|summary|none; default json] [--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|compact-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]",
@@ -127,8 +127,53 @@ function profileOutputDirOption(options) {
127
127
  }
128
128
  function runProfileResultFormatOption(options) {
129
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.");
130
+ if (format === "compact") return "compact-json";
131
+ if (format === "json" || format === "compact-json" || format === "summary" || format === "none") return format;
132
+ throw new Error("--result-format must be json, compact-json, summary, or none.");
133
+ }
134
+ function compactProfileCheckCounts(result) {
135
+ return result.checks.reduce((counts, check) => {
136
+ const status = String(check.status || "unknown");
137
+ counts[status] = (counts[status] || 0) + 1;
138
+ counts.total = (counts.total || 0) + 1;
139
+ return counts;
140
+ }, { total: 0 });
141
+ }
142
+ function compactProfileChecks(result) {
143
+ return result.checks.map((check) => ({
144
+ type: check.type,
145
+ label: check.label,
146
+ status: check.status,
147
+ message: check.message
148
+ }));
149
+ }
150
+ function compactRunProfileResult(result, options) {
151
+ const outputDir = profileOutputDirOption(options);
152
+ return {
153
+ version: "riddle-proof.profile-compact-result.v1",
154
+ profile_name: result.profile_name,
155
+ runner: result.runner,
156
+ status: result.status,
157
+ summary: result.summary,
158
+ captured_at: result.captured_at,
159
+ baseline_policy: result.baseline_policy,
160
+ route: result.route,
161
+ check_counts: compactProfileCheckCounts(result),
162
+ checks: compactProfileChecks(result),
163
+ warnings: result.warnings,
164
+ environment_blocker: result.environment_blocker,
165
+ metadata: result.metadata,
166
+ riddle: result.riddle,
167
+ artifacts: result.artifacts,
168
+ output_dir: outputDir,
169
+ output_files: outputDir ? {
170
+ profile_result: "profile-result.json",
171
+ summary: "summary.md",
172
+ proof_json: result.evidence ? "proof.json" : void 0,
173
+ console: result.evidence?.console ? "console.json" : void 0,
174
+ dom_summary: result.evidence?.dom_summary ? "dom-summary.json" : void 0
175
+ } : void 0
176
+ };
132
177
  }
133
178
  function writeRunProfileResult(result, options) {
134
179
  const format = runProfileResultFormatOption(options);
@@ -137,6 +182,11 @@ function writeRunProfileResult(result, options) {
137
182
  process.stdout.write(profileResultMarkdown(result));
138
183
  return;
139
184
  }
185
+ if (format === "compact-json") {
186
+ process.stdout.write(`${JSON.stringify(compactRunProfileResult(result, options), null, 2)}
187
+ `);
188
+ return;
189
+ }
140
190
  process.stdout.write(`${JSON.stringify(result, null, 2)}
141
191
  `);
142
192
  }
package/dist/index.cjs CHANGED
@@ -14574,19 +14574,23 @@ async function ensureProfilePageHelpers(context) {
14574
14574
  const existing = window.__riddleProofProfile && typeof window.__riddleProofProfile === "object"
14575
14575
  ? window.__riddleProofProfile
14576
14576
  : {};
14577
- Object.defineProperties(existing, {
14578
- current: { configurable: true, get: currentRoute },
14579
- appPath: { configurable: true, get: () => currentRoute().appPath },
14580
- appRoute: { configurable: true, get: () => currentRoute().appRoute },
14581
- basePath: { configurable: true, get: () => currentRoute().basePath },
14582
- previewMountPrefix: { configurable: true, get: () => currentRoute().previewMountPrefix },
14583
- mountedPath: { configurable: true, get: () => currentRoute().mountedPath },
14584
- mountedRoute: { configurable: true, get: () => currentRoute().mountedRoute },
14585
- });
14577
+ const refreshSnapshot = () => {
14578
+ const route = currentRoute();
14579
+ existing.current = route;
14580
+ existing.appPath = route.appPath;
14581
+ existing.appRoute = route.appRoute;
14582
+ existing.basePath = route.basePath;
14583
+ existing.previewMountPrefix = route.previewMountPrefix;
14584
+ existing.mountedPath = route.mountedPath;
14585
+ existing.mountedRoute = route.mountedRoute;
14586
+ return route;
14587
+ };
14586
14588
  existing.version = "riddle-proof.profile-helper.v1";
14587
14589
  existing.route = currentRoute;
14588
14590
  existing.getRoute = currentRoute;
14591
+ existing.refresh = refreshSnapshot;
14589
14592
  existing.joinRoute = joinRoute;
14593
+ refreshSnapshot();
14590
14594
  window.__riddleProofProfile = existing;
14591
14595
  }, { targetUrl });
14592
14596
  } catch {
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-BG5GVTGM.js";
65
+ } from "./chunk-UKMTTGQ4.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -5888,19 +5888,23 @@ async function ensureProfilePageHelpers(context) {
5888
5888
  const existing = window.__riddleProofProfile && typeof window.__riddleProofProfile === "object"
5889
5889
  ? window.__riddleProofProfile
5890
5890
  : {};
5891
- Object.defineProperties(existing, {
5892
- current: { configurable: true, get: currentRoute },
5893
- appPath: { configurable: true, get: () => currentRoute().appPath },
5894
- appRoute: { configurable: true, get: () => currentRoute().appRoute },
5895
- basePath: { configurable: true, get: () => currentRoute().basePath },
5896
- previewMountPrefix: { configurable: true, get: () => currentRoute().previewMountPrefix },
5897
- mountedPath: { configurable: true, get: () => currentRoute().mountedPath },
5898
- mountedRoute: { configurable: true, get: () => currentRoute().mountedRoute },
5899
- });
5891
+ const refreshSnapshot = () => {
5892
+ const route = currentRoute();
5893
+ existing.current = route;
5894
+ existing.appPath = route.appPath;
5895
+ existing.appRoute = route.appRoute;
5896
+ existing.basePath = route.basePath;
5897
+ existing.previewMountPrefix = route.previewMountPrefix;
5898
+ existing.mountedPath = route.mountedPath;
5899
+ existing.mountedRoute = route.mountedRoute;
5900
+ return route;
5901
+ };
5900
5902
  existing.version = "riddle-proof.profile-helper.v1";
5901
5903
  existing.route = currentRoute;
5902
5904
  existing.getRoute = currentRoute;
5905
+ existing.refresh = refreshSnapshot;
5903
5906
  existing.joinRoute = joinRoute;
5907
+ refreshSnapshot();
5904
5908
  window.__riddleProofProfile = existing;
5905
5909
  }, { targetUrl });
5906
5910
  } catch {
package/dist/profile.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  resolveRiddleProofProfileTimeoutSec,
24
24
  slugifyRiddleProofProfileName,
25
25
  summarizeRiddleProofProfileResult
26
- } from "./chunk-BG5GVTGM.js";
26
+ } from "./chunk-UKMTTGQ4.js";
27
27
  export {
28
28
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
29
29
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.191",
3
+ "version": "0.7.193",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",