@riddledc/riddle-proof 0.8.83 → 0.8.85

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.
Files changed (75) hide show
  1. package/README.md +247 -29
  2. package/capabilities.json +17 -0
  3. package/dist/advanced/engine-harness.js +2 -2
  4. package/dist/advanced/index.d.cts +1 -1
  5. package/dist/advanced/index.d.ts +1 -1
  6. package/dist/advanced/index.js +4 -4
  7. package/dist/advanced/proof-run-engine.d.cts +1 -1
  8. package/dist/advanced/proof-run-engine.d.ts +1 -1
  9. package/dist/advanced/runner.js +2 -2
  10. package/dist/change-proof.cjs +22 -260
  11. package/dist/change-proof.d.cts +1 -1
  12. package/dist/change-proof.d.ts +1 -1
  13. package/dist/change-proof.js +2 -2
  14. package/dist/checked-meaning.cjs +67 -0
  15. package/dist/checked-meaning.d.cts +2 -0
  16. package/dist/checked-meaning.d.ts +2 -0
  17. package/dist/checked-meaning.js +41 -0
  18. package/dist/{chunk-QYZ3GKCP.js → chunk-AFARUBE4.js} +12 -11
  19. package/dist/chunk-J2SIQGQI.js +71 -0
  20. package/dist/{chunk-7OAETQU3.js → chunk-JZKLCY5G.js} +1 -1
  21. package/dist/chunk-KB7FYRBG.js +46 -0
  22. package/dist/chunk-NWLKJ2WI.js +31 -0
  23. package/dist/{chunk-LR4UYJDY.js → chunk-O2AO726C.js} +1 -1
  24. package/dist/chunk-ODLGSEP2.js +43 -0
  25. package/dist/chunk-OHDNCXRM.js +17 -0
  26. package/dist/cli/index.js +7 -7
  27. package/dist/cli.cjs +265 -1122
  28. package/dist/cli.d.cts +0 -1
  29. package/dist/cli.d.ts +0 -1
  30. package/dist/cli.js +7 -7
  31. package/dist/engine-harness.js +2 -2
  32. package/dist/grounded-evidence.cjs +95 -0
  33. package/dist/grounded-evidence.d.cts +2 -0
  34. package/dist/grounded-evidence.d.ts +2 -0
  35. package/dist/grounded-evidence.js +69 -0
  36. package/dist/index.cjs +318 -1539
  37. package/dist/index.d.cts +9 -3
  38. package/dist/index.d.ts +9 -3
  39. package/dist/index.js +136 -16
  40. package/dist/pr-comment.cjs +17 -107
  41. package/dist/pr-comment.d.cts +1 -1
  42. package/dist/pr-comment.d.ts +1 -1
  43. package/dist/pr-comment.js +3 -3
  44. package/dist/{proof-run-engine-MiKZt9oY.d.ts → proof-run-engine-BqRoA3Do.d.ts} +3 -3
  45. package/dist/{proof-run-engine-Baiv6l3A.d.cts → proof-run-engine-DpChFR5H.d.cts} +3 -3
  46. package/dist/proof-run-engine.d.cts +1 -1
  47. package/dist/proof-run-engine.d.ts +1 -1
  48. package/dist/receipts.cjs +10 -255
  49. package/dist/receipts.d.cts +7 -115
  50. package/dist/receipts.d.ts +7 -115
  51. package/dist/receipts.js +1 -1
  52. package/dist/riddle-client.cjs +23 -695
  53. package/dist/riddle-client.d.cts +1 -188
  54. package/dist/riddle-client.d.ts +1 -188
  55. package/dist/riddle-client.js +5 -2
  56. package/dist/runner.js +2 -2
  57. package/dist/runtime/index.cjs +23 -695
  58. package/dist/runtime/index.d.cts +1 -5
  59. package/dist/runtime/index.d.ts +1 -5
  60. package/dist/runtime/index.js +5 -2
  61. package/dist/runtime/riddle-client.cjs +23 -695
  62. package/dist/runtime/riddle-client.d.cts +1 -5
  63. package/dist/runtime/riddle-client.d.ts +1 -5
  64. package/dist/runtime/riddle-client.js +5 -2
  65. package/dist/semantic-certificate.cjs +23 -582
  66. package/dist/semantic-certificate.d.cts +2 -191
  67. package/dist/semantic-certificate.d.ts +2 -191
  68. package/dist/semantic-certificate.js +15 -3
  69. package/package.json +28 -5
  70. package/runtime/lib/riddle_core_call.mjs +3 -806
  71. package/dist/chunk-5IFZSUPF.js +0 -644
  72. package/dist/chunk-DB5ZHRUP.js +0 -585
  73. package/dist/chunk-MEVVL4TI.js +0 -258
  74. package/dist/{chunk-WLUMLHII.js → chunk-BID7CKMM.js} +9 -9
  75. package/dist/{chunk-YH7ADFY4.js → chunk-IVSP24XI.js} +3 -3
package/dist/receipts.cjs CHANGED
@@ -15,272 +15,27 @@ var __copyProps = (to, from, except, desc) => {
15
15
  }
16
16
  return to;
17
17
  };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
20
 
20
21
  // src/receipts.ts
21
22
  var receipts_exports = {};
22
23
  __export(receipts_exports, {
23
- RIDDLE_PREVIEW_RECEIPT_VERSION: () => RIDDLE_PREVIEW_RECEIPT_VERSION,
24
- RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION: () => RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
25
- createRiddleProofObservationReceipt: () => createRiddleProofObservationReceipt,
26
- parseRiddlePreviewReceipt: () => parseRiddlePreviewReceipt,
27
- parseRiddleProofObservationReceipt: () => parseRiddleProofObservationReceipt
24
+ RIDDLE_PREVIEW_RECEIPT_VERSION: () => import_receipts.RIDDLE_PREVIEW_RECEIPT_VERSION,
25
+ RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION: () => import_receipts.RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
26
+ createRiddleProofObservationReceipt: () => import_receipts.createRiddleProofObservationReceipt,
27
+ parseRiddlePreviewReceipt: () => import_receipts.parseRiddlePreviewReceipt,
28
+ parseRiddleProofObservationReceipt: () => import_receipts.parseRiddleProofObservationReceipt
28
29
  });
29
30
  module.exports = __toCommonJS(receipts_exports);
30
- var RIDDLE_PREVIEW_RECEIPT_VERSION = "riddle.preview-receipt.v1";
31
- var RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION = "riddle-proof.observation-receipt.v1";
32
- function isRecord(value) {
33
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
34
- }
35
- function requiredString(record, key, context) {
36
- const value = record[key];
37
- if (typeof value !== "string" || !value.trim()) {
38
- throw new Error(`${context}.${key} must be a non-empty string.`);
39
- }
40
- return value.trim();
41
- }
42
- function normalizedSourceIdentity(value) {
43
- if (!isRecord(value)) return {};
44
- return {
45
- git_revision: typeof value.git_revision === "string" && value.git_revision.trim() ? value.git_revision.trim() : void 0,
46
- repository: typeof value.repository === "string" && value.repository.trim() ? value.repository.trim() : void 0,
47
- dirty: typeof value.dirty === "boolean" ? value.dirty : void 0,
48
- label: typeof value.label === "string" && value.label.trim() ? value.label.trim() : void 0
49
- };
50
- }
51
- function parseRiddlePreviewReceipt(value) {
52
- if (!isRecord(value)) throw new Error("Preview receipt must be an object.");
53
- if (value.version !== RIDDLE_PREVIEW_RECEIPT_VERSION) {
54
- throw new Error(`Unsupported Preview receipt version ${String(value.version || "missing")}.`);
55
- }
56
- if (!isRecord(value.source)) throw new Error("Preview receipt source must be an object.");
57
- const expiresAt = requiredString(value, "expires_at", "preview receipt");
58
- const publishedAt = requiredString(value, "published_at", "preview receipt");
59
- const contentDigest = requiredString(value, "content_digest", "preview receipt");
60
- if (!contentDigest.startsWith("sha256:") || contentDigest.length <= "sha256:".length) {
61
- throw new Error("preview receipt.content_digest must be a sha256 digest.");
62
- }
63
- if (!Number.isFinite(Date.parse(expiresAt)) || !Number.isFinite(Date.parse(publishedAt))) {
64
- throw new Error("Preview receipt timestamps must be valid ISO date strings.");
65
- }
66
- return {
67
- version: RIDDLE_PREVIEW_RECEIPT_VERSION,
68
- preview_id: requiredString(value, "preview_id", "preview receipt"),
69
- url: requiredString(value, "url", "preview receipt"),
70
- expires_at: expiresAt,
71
- content_digest: contentDigest,
72
- source: normalizedSourceIdentity(value.source),
73
- published_at: publishedAt
74
- };
75
- }
76
- function comparableArtifactName(value) {
77
- return (value || "").split(/[/?#]/).pop()?.toLowerCase().replace(/\.(png|jpe?g|gif|webp|avif|svg)$/u, "").replace(/[^a-z0-9_-]+/gu, "-").replace(/^-+|-+$/g, "") || "";
78
- }
79
- function artifactMatchesLabel(artifact, label) {
80
- const expected = comparableArtifactName(label);
81
- if (!expected) return false;
82
- return [artifact.name, artifact.url, artifact.path].map(comparableArtifactName).some((name) => name === expected || name.endsWith(`-${expected}`));
83
- }
84
- function artifactLooksLikeScreenshot(ref) {
85
- const text = [ref.name, ref.url, ref.path, ref.kind, ref.content_type].filter(Boolean).join(" ").toLowerCase();
86
- return /screenshot|\bimage\b/.test(text) || /\.(png|jpe?g|gif|webp|avif|svg)(\?|#|$)/.test(text);
87
- }
88
- function finalScreenshotLabels(result) {
89
- const explicit = result.artifacts.canonical_screenshots || [];
90
- if (explicit.length) return explicit;
91
- const fromEvidence = (result.evidence?.viewports || []).map((viewport) => viewport.screenshot_label).filter((label) => typeof label === "string" && Boolean(label.trim()));
92
- if (fromEvidence.length) return fromEvidence;
93
- return (result.artifacts.screenshots || []).slice(0, 1);
94
- }
95
- function setupScreenshotLabels(result) {
96
- const explicit = result.artifacts.setup_screenshots || [];
97
- if (explicit.length) return explicit;
98
- return (result.evidence?.viewports || []).flatMap(
99
- (viewport) => (viewport.setup_action_results || []).filter((action) => action.action === "screenshot" && action.ok !== false && typeof action.screenshot_label === "string").map((action) => String(action.screenshot_label))
100
- );
101
- }
102
- function observationArtifactFromRef(ref, canonicalLabels, setupLabels) {
103
- const base = {
104
- name: ref.name,
105
- role: ref.role || "artifact",
106
- url: ref.url,
107
- path: ref.path,
108
- kind: ref.kind,
109
- content_type: ref.content_type,
110
- source: ref.source
111
- };
112
- if (!artifactLooksLikeScreenshot(ref)) return base;
113
- if (canonicalLabels.some((label) => artifactMatchesLabel(base, label))) {
114
- return { ...base, role: "canonical_screenshot" };
115
- }
116
- if (setupLabels.some((label) => artifactMatchesLabel(base, label))) {
117
- return { ...base, role: "setup_screenshot" };
118
- }
119
- return { ...base, role: "diagnostic" };
120
- }
121
- function profileObservationArtifacts(result) {
122
- const canonicalLabels = finalScreenshotLabels(result);
123
- const setupLabels = setupScreenshotLabels(result);
124
- const artifacts = [];
125
- const seen = /* @__PURE__ */ new Set();
126
- const add = (artifact) => {
127
- const key = artifact.url || artifact.path || `${artifact.role}:${artifact.name}`;
128
- if (!artifact.name || seen.has(key)) return;
129
- seen.add(key);
130
- artifacts.push(artifact);
131
- };
132
- for (const ref of result.artifacts.riddle_artifacts || []) {
133
- add(observationArtifactFromRef(ref, canonicalLabels, setupLabels));
134
- }
135
- for (const label of canonicalLabels) {
136
- if (!artifacts.some((artifact) => artifactMatchesLabel(artifact, label))) {
137
- add({ name: label, path: label, role: "canonical_screenshot", kind: "image" });
138
- }
139
- }
140
- for (const label of setupLabels) {
141
- if (!artifacts.some((artifact) => artifactMatchesLabel(artifact, label))) {
142
- add({ name: label, path: label, role: "setup_screenshot", kind: "image" });
143
- }
144
- }
145
- for (const label of result.artifacts.screenshots || []) {
146
- if (!artifacts.some((artifact) => artifactMatchesLabel(artifact, label))) {
147
- add({ name: label, path: label, role: "diagnostic", kind: "image" });
148
- }
149
- }
150
- return artifacts;
151
- }
152
- function mergeObservationArtifacts(profileArtifacts, suppliedArtifacts) {
153
- const artifacts = [...profileArtifacts];
154
- for (const supplied of suppliedArtifacts) {
155
- const suppliedNames = [supplied.name, supplied.url, supplied.path].map(comparableArtifactName).filter(Boolean);
156
- const existingIndex = artifacts.findIndex((artifact) => {
157
- if (supplied.url && artifact.url === supplied.url) return true;
158
- if (supplied.path && artifact.path === supplied.path) return true;
159
- return [artifact.name, artifact.url, artifact.path].map(comparableArtifactName).some((name) => name && suppliedNames.includes(name));
160
- });
161
- if (existingIndex < 0) {
162
- artifacts.push(supplied);
163
- continue;
164
- }
165
- const existing = artifacts[existingIndex];
166
- const role = supplied.role === "canonical_screenshot" || supplied.role === "setup_screenshot" ? supplied.role : existing.role === "canonical_screenshot" || existing.role === "setup_screenshot" ? existing.role : supplied.role === "artifact" ? existing.role : supplied.role;
167
- artifacts[existingIndex] = {
168
- ...existing,
169
- ...supplied,
170
- role
171
- };
172
- }
173
- return artifacts;
174
- }
175
- function defaultObservationId(role, capturedAt) {
176
- return `obs_${role}_${capturedAt.replace(/[^0-9]/g, "").slice(0, 17) || "unknown"}`;
177
- }
178
- function profileCheckCounts(result) {
179
- const counts = { total: result.checks.length, passed: 0, failed: 0, skipped: 0, needs_human_review: 0 };
180
- for (const check of result.checks) {
181
- if (check.status === "passed") counts.passed += 1;
182
- if (check.status === "failed") counts.failed += 1;
183
- if (check.status === "skipped") counts.skipped += 1;
184
- if (check.status === "needs_human_review") counts.needs_human_review += 1;
185
- }
186
- return counts;
187
- }
188
- function createRiddleProofObservationReceipt(input) {
189
- const capturedAt = input.captured_at || input.profile_result?.captured_at || (/* @__PURE__ */ new Date()).toISOString();
190
- const profileArtifacts = input.profile_result ? profileObservationArtifacts(input.profile_result) : [];
191
- const requestedCanonical = input.canonical_screenshot ? { ...input.canonical_screenshot, role: "canonical_screenshot" } : void 0;
192
- const artifacts = mergeObservationArtifacts(
193
- profileArtifacts,
194
- [...input.artifacts || [], ...requestedCanonical ? [requestedCanonical] : []]
195
- );
196
- const canonicalScreenshot = requestedCanonical ? artifacts.find((artifact) => artifact.role === "canonical_screenshot" && artifactMatchesLabel(artifact, requestedCanonical.name)) || requestedCanonical : artifacts.find((artifact) => artifact.role === "canonical_screenshot");
197
- const target = input.target.kind === "preview" && input.target.preview ? { ...input.target, preview: parseRiddlePreviewReceipt(input.target.preview) } : input.target;
198
- return {
199
- version: RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
200
- observation_id: input.observation_id || defaultObservationId(input.comparison_role, capturedAt),
201
- comparison_role: input.comparison_role,
202
- executor: input.executor,
203
- target,
204
- source: normalizedSourceIdentity(input.source || input.target.preview?.source),
205
- captured_at: capturedAt,
206
- artifacts,
207
- canonical_screenshot: canonicalScreenshot,
208
- profile_summary: input.profile_result ? {
209
- profile_name: input.profile_result.profile_name,
210
- status: input.profile_result.status,
211
- summary: input.profile_result.summary,
212
- route: input.profile_result.route,
213
- checks: profileCheckCounts(input.profile_result)
214
- } : void 0,
215
- proof: input.profile_result ? {
216
- profile_name: input.profile_result.profile_name,
217
- result: input.profile_result
218
- } : void 0,
219
- publication: input.publication,
220
- execution: input.execution,
221
- metadata: input.metadata
222
- };
223
- }
224
- function parseRiddleProofObservationReceipt(value) {
225
- if (!isRecord(value)) throw new Error("Observation receipt must be an object.");
226
- if (value.version !== RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION) {
227
- throw new Error(`Unsupported Observation receipt version ${String(value.version || "missing")}.`);
228
- }
229
- if (!isRecord(value.executor)) throw new Error("Observation receipt executor must be an object.");
230
- if (!isRecord(value.target)) throw new Error("Observation receipt target must be an object.");
231
- if (!isRecord(value.source)) throw new Error("Observation receipt source must be an object.");
232
- requiredString(value, "observation_id", "observation receipt");
233
- requiredString(value, "captured_at", "observation receipt");
234
- const executorKind = requiredString(value.executor, "kind", "observation receipt executor");
235
- if (!"local_playwright,riddle_hosted,browser_api,other".split(",").includes(executorKind)) {
236
- throw new Error(`Unsupported observation executor kind ${executorKind}.`);
237
- }
238
- if (value.executor.runner !== void 0) {
239
- requiredString(value.executor, "runner", "observation receipt executor");
240
- }
241
- const role = requiredString(value, "comparison_role", "observation receipt");
242
- if (!["before", "after", "standalone"].includes(role)) {
243
- throw new Error(`Unsupported observation comparison role ${role}.`);
244
- }
245
- const targetKind = requiredString(value.target, "kind", "observation receipt target");
246
- if (targetKind !== "url" && targetKind !== "preview") {
247
- throw new Error(`Unsupported observation target kind ${targetKind}.`);
248
- }
249
- requiredString(value.target, "url", "observation receipt target");
250
- if (targetKind === "preview") {
251
- if (value.target.preview === void 0) {
252
- throw new Error("Preview Observation target must include its Preview receipt.");
253
- }
254
- parseRiddlePreviewReceipt(value.target.preview);
255
- }
256
- if (!Array.isArray(value.artifacts)) throw new Error("Observation receipt artifacts must be an array.");
257
- const artifactRoles = /* @__PURE__ */ new Set(["canonical_screenshot", "setup_screenshot", "data", "diagnostic", "artifact"]);
258
- const artifacts = value.artifacts.map((artifact, index) => {
259
- if (!isRecord(artifact)) throw new Error(`Observation receipt artifact ${index} must be an object.`);
260
- requiredString(artifact, "name", `observation receipt artifact ${index}`);
261
- const artifactRole = requiredString(artifact, "role", `observation receipt artifact ${index}`);
262
- if (!artifactRoles.has(artifactRole)) {
263
- throw new Error(`Unsupported observation artifact role ${artifactRole}.`);
264
- }
265
- return artifact;
266
- });
267
- if (value.canonical_screenshot !== void 0) {
268
- if (!isRecord(value.canonical_screenshot) || value.canonical_screenshot.role !== "canonical_screenshot") {
269
- throw new Error("Observation canonical_screenshot must have the canonical_screenshot role.");
270
- }
271
- const canonical = value.canonical_screenshot;
272
- const included = artifacts.some((artifact) => artifact.role === "canonical_screenshot" && artifact.name === canonical.name && artifact.url === canonical.url && artifact.path === canonical.path);
273
- if (!included) {
274
- throw new Error("Observation canonical_screenshot must reference an artifact in the receipt.");
275
- }
276
- }
277
- return value;
278
- }
31
+ __reExport(receipts_exports, require("@riddledc/riddle-proof-core/receipts"), module.exports);
32
+ var import_receipts = require("@riddledc/riddle-proof-core/receipts");
279
33
  // Annotate the CommonJS export names for ESM import in node:
280
34
  0 && (module.exports = {
281
35
  RIDDLE_PREVIEW_RECEIPT_VERSION,
282
36
  RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION,
283
37
  createRiddleProofObservationReceipt,
284
38
  parseRiddlePreviewReceipt,
285
- parseRiddleProofObservationReceipt
39
+ parseRiddleProofObservationReceipt,
40
+ ...require("@riddledc/riddle-proof-core/receipts")
286
41
  });
@@ -1,115 +1,7 @@
1
- import { RiddleProofProfileResult } from './profile.cjs';
2
- import { JsonValue } from './types.cjs';
3
- import './public-state.cjs';
4
-
5
- declare const RIDDLE_PREVIEW_RECEIPT_VERSION: "riddle.preview-receipt.v1";
6
- declare const RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION: "riddle-proof.observation-receipt.v1";
7
- type RiddleProofComparisonRole = "before" | "after" | "standalone";
8
- interface RiddleProofSourceIdentity {
9
- git_revision?: string;
10
- repository?: string;
11
- dirty?: boolean;
12
- label?: string;
13
- }
14
- interface RiddlePreviewReceipt {
15
- version: typeof RIDDLE_PREVIEW_RECEIPT_VERSION;
16
- preview_id: string;
17
- url: string;
18
- expires_at: string;
19
- content_digest: string;
20
- source: RiddleProofSourceIdentity;
21
- published_at: string;
22
- }
23
- type RiddleProofObservationExecutorKind = "local_playwright" | "riddle_hosted" | "browser_api" | "other";
24
- interface RiddleProofObservationExecutor {
25
- kind: RiddleProofObservationExecutorKind;
26
- runner?: string;
27
- job_id?: string;
28
- worker_id?: string;
29
- }
30
- interface RiddleProofExecutionPhase {
31
- phase: string;
32
- at: string;
33
- }
34
- interface RiddleProofExecutionTelemetry {
35
- enqueued_at?: string;
36
- wake_requested_at?: string;
37
- claimed_at?: string;
38
- browser_started_at?: string;
39
- artifacts_ready_at?: string;
40
- completed_at?: string;
41
- worker_id?: string;
42
- cold_start?: boolean;
43
- phases?: RiddleProofExecutionPhase[];
44
- metadata?: Record<string, JsonValue>;
45
- }
46
- interface RiddleProofObservationTarget {
47
- kind: "url" | "preview";
48
- url: string;
49
- preview?: RiddlePreviewReceipt;
50
- }
51
- type RiddleProofObservationArtifactRole = "canonical_screenshot" | "setup_screenshot" | "data" | "diagnostic" | "artifact";
52
- interface RiddleProofObservationArtifact {
53
- name: string;
54
- role: RiddleProofObservationArtifactRole;
55
- url?: string;
56
- path?: string;
57
- kind?: string;
58
- content_type?: string;
59
- source?: string;
60
- }
61
- interface RiddleProofObservationPublication {
62
- kind: "local" | "riddle_cdn" | "github" | "other";
63
- url?: string;
64
- path?: string;
65
- }
66
- interface RiddleProofObservationReceipt {
67
- version: typeof RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION;
68
- observation_id: string;
69
- comparison_role: RiddleProofComparisonRole;
70
- executor: RiddleProofObservationExecutor;
71
- target: RiddleProofObservationTarget;
72
- source: RiddleProofSourceIdentity;
73
- captured_at: string;
74
- artifacts: RiddleProofObservationArtifact[];
75
- canonical_screenshot?: RiddleProofObservationArtifact;
76
- profile_summary?: {
77
- profile_name: string;
78
- status: string;
79
- summary: string;
80
- route?: JsonValue;
81
- checks: {
82
- total: number;
83
- passed: number;
84
- failed: number;
85
- skipped: number;
86
- needs_human_review: number;
87
- };
88
- };
89
- proof?: {
90
- profile_name: string;
91
- result: RiddleProofProfileResult;
92
- };
93
- publication?: RiddleProofObservationPublication;
94
- execution?: RiddleProofExecutionTelemetry;
95
- metadata?: Record<string, JsonValue>;
96
- }
97
- interface CreateRiddleProofObservationReceiptInput {
98
- observation_id?: string;
99
- comparison_role: RiddleProofComparisonRole;
100
- executor: RiddleProofObservationExecutor;
101
- target: RiddleProofObservationTarget;
102
- source?: RiddleProofSourceIdentity;
103
- profile_result?: RiddleProofProfileResult;
104
- artifacts?: RiddleProofObservationArtifact[];
105
- canonical_screenshot?: RiddleProofObservationArtifact;
106
- publication?: RiddleProofObservationPublication;
107
- execution?: RiddleProofExecutionTelemetry;
108
- captured_at?: string;
109
- metadata?: Record<string, JsonValue>;
110
- }
111
- declare function parseRiddlePreviewReceipt(value: unknown): RiddlePreviewReceipt;
112
- declare function createRiddleProofObservationReceipt(input: CreateRiddleProofObservationReceiptInput): RiddleProofObservationReceipt;
113
- declare function parseRiddleProofObservationReceipt(value: unknown): RiddleProofObservationReceipt;
114
-
115
- export { type CreateRiddleProofObservationReceiptInput, RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, type RiddlePreviewReceipt, type RiddleProofComparisonRole, type RiddleProofExecutionPhase, type RiddleProofExecutionTelemetry, type RiddleProofObservationArtifact, type RiddleProofObservationArtifactRole, type RiddleProofObservationExecutor, type RiddleProofObservationExecutorKind, type RiddleProofObservationPublication, type RiddleProofObservationReceipt, type RiddleProofObservationTarget, type RiddleProofSourceIdentity, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt };
1
+ export * from '@riddledc/riddle-proof-core/receipts';
2
+ export { RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt } from '@riddledc/riddle-proof-core/receipts';
3
+ import '@riddledc/riddle-proof-core/checked-meaning';
4
+ import '@riddledc/riddle-proof-core/grounded-evidence';
5
+ import '@riddledc/riddle-proof-core/semantic-certificate';
6
+ import '@riddledc/riddle-proof-riddle-client/client';
7
+ import '@riddledc/riddle-proof-app-contract';
@@ -1,115 +1,7 @@
1
- import { RiddleProofProfileResult } from './profile.js';
2
- import { JsonValue } from './types.js';
3
- import './public-state.js';
4
-
5
- declare const RIDDLE_PREVIEW_RECEIPT_VERSION: "riddle.preview-receipt.v1";
6
- declare const RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION: "riddle-proof.observation-receipt.v1";
7
- type RiddleProofComparisonRole = "before" | "after" | "standalone";
8
- interface RiddleProofSourceIdentity {
9
- git_revision?: string;
10
- repository?: string;
11
- dirty?: boolean;
12
- label?: string;
13
- }
14
- interface RiddlePreviewReceipt {
15
- version: typeof RIDDLE_PREVIEW_RECEIPT_VERSION;
16
- preview_id: string;
17
- url: string;
18
- expires_at: string;
19
- content_digest: string;
20
- source: RiddleProofSourceIdentity;
21
- published_at: string;
22
- }
23
- type RiddleProofObservationExecutorKind = "local_playwright" | "riddle_hosted" | "browser_api" | "other";
24
- interface RiddleProofObservationExecutor {
25
- kind: RiddleProofObservationExecutorKind;
26
- runner?: string;
27
- job_id?: string;
28
- worker_id?: string;
29
- }
30
- interface RiddleProofExecutionPhase {
31
- phase: string;
32
- at: string;
33
- }
34
- interface RiddleProofExecutionTelemetry {
35
- enqueued_at?: string;
36
- wake_requested_at?: string;
37
- claimed_at?: string;
38
- browser_started_at?: string;
39
- artifacts_ready_at?: string;
40
- completed_at?: string;
41
- worker_id?: string;
42
- cold_start?: boolean;
43
- phases?: RiddleProofExecutionPhase[];
44
- metadata?: Record<string, JsonValue>;
45
- }
46
- interface RiddleProofObservationTarget {
47
- kind: "url" | "preview";
48
- url: string;
49
- preview?: RiddlePreviewReceipt;
50
- }
51
- type RiddleProofObservationArtifactRole = "canonical_screenshot" | "setup_screenshot" | "data" | "diagnostic" | "artifact";
52
- interface RiddleProofObservationArtifact {
53
- name: string;
54
- role: RiddleProofObservationArtifactRole;
55
- url?: string;
56
- path?: string;
57
- kind?: string;
58
- content_type?: string;
59
- source?: string;
60
- }
61
- interface RiddleProofObservationPublication {
62
- kind: "local" | "riddle_cdn" | "github" | "other";
63
- url?: string;
64
- path?: string;
65
- }
66
- interface RiddleProofObservationReceipt {
67
- version: typeof RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION;
68
- observation_id: string;
69
- comparison_role: RiddleProofComparisonRole;
70
- executor: RiddleProofObservationExecutor;
71
- target: RiddleProofObservationTarget;
72
- source: RiddleProofSourceIdentity;
73
- captured_at: string;
74
- artifacts: RiddleProofObservationArtifact[];
75
- canonical_screenshot?: RiddleProofObservationArtifact;
76
- profile_summary?: {
77
- profile_name: string;
78
- status: string;
79
- summary: string;
80
- route?: JsonValue;
81
- checks: {
82
- total: number;
83
- passed: number;
84
- failed: number;
85
- skipped: number;
86
- needs_human_review: number;
87
- };
88
- };
89
- proof?: {
90
- profile_name: string;
91
- result: RiddleProofProfileResult;
92
- };
93
- publication?: RiddleProofObservationPublication;
94
- execution?: RiddleProofExecutionTelemetry;
95
- metadata?: Record<string, JsonValue>;
96
- }
97
- interface CreateRiddleProofObservationReceiptInput {
98
- observation_id?: string;
99
- comparison_role: RiddleProofComparisonRole;
100
- executor: RiddleProofObservationExecutor;
101
- target: RiddleProofObservationTarget;
102
- source?: RiddleProofSourceIdentity;
103
- profile_result?: RiddleProofProfileResult;
104
- artifacts?: RiddleProofObservationArtifact[];
105
- canonical_screenshot?: RiddleProofObservationArtifact;
106
- publication?: RiddleProofObservationPublication;
107
- execution?: RiddleProofExecutionTelemetry;
108
- captured_at?: string;
109
- metadata?: Record<string, JsonValue>;
110
- }
111
- declare function parseRiddlePreviewReceipt(value: unknown): RiddlePreviewReceipt;
112
- declare function createRiddleProofObservationReceipt(input: CreateRiddleProofObservationReceiptInput): RiddleProofObservationReceipt;
113
- declare function parseRiddleProofObservationReceipt(value: unknown): RiddleProofObservationReceipt;
114
-
115
- export { type CreateRiddleProofObservationReceiptInput, RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, type RiddlePreviewReceipt, type RiddleProofComparisonRole, type RiddleProofExecutionPhase, type RiddleProofExecutionTelemetry, type RiddleProofObservationArtifact, type RiddleProofObservationArtifactRole, type RiddleProofObservationExecutor, type RiddleProofObservationExecutorKind, type RiddleProofObservationPublication, type RiddleProofObservationReceipt, type RiddleProofObservationTarget, type RiddleProofSourceIdentity, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt };
1
+ export * from '@riddledc/riddle-proof-core/receipts';
2
+ export { RIDDLE_PREVIEW_RECEIPT_VERSION, RIDDLE_PROOF_OBSERVATION_RECEIPT_VERSION, createRiddleProofObservationReceipt, parseRiddlePreviewReceipt, parseRiddleProofObservationReceipt } from '@riddledc/riddle-proof-core/receipts';
3
+ import '@riddledc/riddle-proof-core/checked-meaning';
4
+ import '@riddledc/riddle-proof-core/grounded-evidence';
5
+ import '@riddledc/riddle-proof-core/semantic-certificate';
6
+ import '@riddledc/riddle-proof-riddle-client/client';
7
+ import '@riddledc/riddle-proof-app-contract';
package/dist/receipts.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  createRiddleProofObservationReceipt,
5
5
  parseRiddlePreviewReceipt,
6
6
  parseRiddleProofObservationReceipt
7
- } from "./chunk-MEVVL4TI.js";
7
+ } from "./chunk-OHDNCXRM.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
  export {
10
10
  RIDDLE_PREVIEW_RECEIPT_VERSION,