@slicedearth/whoisleuth-cli 1.47.4 → 2.0.0

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 (235) hide show
  1. package/README.md +74 -177
  2. package/SECURITY.md +6 -3
  3. package/bin/whoisleuth.mjs +2 -1
  4. package/cli/archive-inspect.mjs +28 -10
  5. package/cli/arguments.mjs +204 -174
  6. package/cli/artifact-structure.mjs +837 -163
  7. package/cli/artifact-verify.mjs +90 -61
  8. package/cli/bounded-json.mjs +1 -1
  9. package/cli/bulk-checkpoint.mjs +33 -20
  10. package/cli/bulk.mjs +9 -2
  11. package/cli/case-pack.mjs +180 -576
  12. package/cli/ci-report.mjs +6 -1
  13. package/cli/collection-preflight.mjs +2 -2
  14. package/cli/command-catalogue.mjs +12 -3
  15. package/cli/command-reference.mjs +910 -92
  16. package/cli/completion.mjs +504 -226
  17. package/cli/config-profile.mjs +13 -3
  18. package/cli/discover.mjs +7 -1
  19. package/cli/discovery-observation-snapshot.mjs +24 -28
  20. package/cli/discovery-scan-command-runner.mjs +9 -9
  21. package/cli/discovery-scan.mjs +17 -3
  22. package/cli/discovery-snapshot.mjs +15 -7
  23. package/cli/domain-control-monitor.mjs +203 -30
  24. package/cli/domain-control-observations.mjs +15 -21
  25. package/cli/errors.mjs +8 -3
  26. package/cli/evidence-signing.mjs +10 -20
  27. package/cli/external-observation-mapping.mjs +3 -3
  28. package/cli/formatters/json.mjs +20 -32
  29. package/cli/formatters/terminal.mjs +583 -22
  30. package/cli/input.mjs +7 -2
  31. package/cli/interactive-launcher.mjs +226 -0
  32. package/cli/interchange-report.mjs +19 -19
  33. package/cli/investigation-manifest.mjs +1 -1
  34. package/cli/investigation-plan.mjs +167 -16
  35. package/cli/investigation-run.mjs +9 -1
  36. package/cli/lookalike-calibration.mjs +3 -1
  37. package/cli/lookup-brief.mjs +13 -8
  38. package/cli/lookup-browser.mjs +844 -0
  39. package/cli/lookup-command-runner.mjs +94 -31
  40. package/cli/lookup-diff.mjs +2 -2
  41. package/cli/lookup-plan.mjs +1 -0
  42. package/cli/mail-review.mjs +206 -94
  43. package/cli/manual.mjs +5 -5
  44. package/cli/offline-evidence-review.mjs +18 -7
  45. package/cli/open-asset-model-bridge.mjs +1 -1
  46. package/cli/output-file.mjs +70 -14
  47. package/cli/page-compare.mjs +11 -6
  48. package/cli/progress-events.mjs +2 -1
  49. package/cli/progress.mjs +3 -3
  50. package/cli/registry-cohort.mjs +9 -51
  51. package/cli/registry-doctor.mjs +67 -28
  52. package/cli/retained-artifact-diff.mjs +7 -8
  53. package/cli/risk-calibration.mjs +85 -38
  54. package/cli/runner.mjs +189 -75
  55. package/cli/saved-lookup.mjs +424 -57
  56. package/cli/sharing-review.mjs +6 -1
  57. package/cli/source-reliability.mjs +75 -36
  58. package/cli/terminal-presentation.mjs +43 -18
  59. package/docs/cli-reference.md +125 -1708
  60. package/docs/cli.md +86 -254
  61. package/frontend/src/lib/analysis/domain-control-manifest-core.js +3 -145
  62. package/frontend/src/lib/analysis/domain-control-records.js +3 -88
  63. package/lib/availability.mjs +58 -40
  64. package/lib/bounded-contract-normalizers.mjs +2 -4
  65. package/lib/bounded-file.mjs +78 -4
  66. package/lib/bounded-json.mjs +51 -13
  67. package/lib/browser-library-profile.mjs +1 -1
  68. package/lib/classify.mjs +56 -5
  69. package/lib/client-behavior-profile.mjs +1 -1
  70. package/lib/credential-surface-profile.mjs +1 -1
  71. package/lib/cryptographic-assurance.mjs +35 -17
  72. package/lib/ct-query.mjs +3 -3
  73. package/lib/ct-search.mjs +37 -21
  74. package/lib/distributed-operation-budget.mjs +4 -2
  75. package/lib/dns-delegation-health.mjs +9 -6
  76. package/lib/dns-intelligence.mjs +1 -1
  77. package/lib/dnssec-chain-validation.mjs +2 -3
  78. package/lib/dnssec-evidence-validation.mjs +13 -7
  79. package/lib/domain-assurance.mjs +12 -12
  80. package/lib/domain-change-packet.mjs +1 -1
  81. package/lib/domain-control-flight-recorder.mjs +442 -78
  82. package/lib/domain-control-manifest.mjs +314 -59
  83. package/lib/domain-posture-analysis.mjs +5 -2
  84. package/lib/encrypted-dns-contract.mjs +2 -3
  85. package/lib/evidence-export.mjs +518 -36
  86. package/lib/external-intelligence-risk.mjs +26 -10
  87. package/lib/feature-policy.mjs +1 -1
  88. package/lib/homepage-metadata-contract.mjs +290 -0
  89. package/lib/hostname.mjs +1 -1
  90. package/lib/html-signals.mjs +89 -5
  91. package/lib/http-intelligence.mjs +331 -2
  92. package/lib/interchange-fidelity-registry.mjs +28 -26
  93. package/lib/lookup-cache.mjs +6 -4
  94. package/lib/lookup.mjs +25 -2
  95. package/lib/observed-network-context.mjs +1 -1
  96. package/lib/page-fingerprints.mjs +2 -2
  97. package/lib/page-role-profile.mjs +1 -1
  98. package/lib/portable-generator.mjs +8 -0
  99. package/lib/provider-policy-admission.mjs +3 -1
  100. package/lib/rdap-bootstrap.mjs +76 -16
  101. package/lib/rdap-client.mjs +20 -12
  102. package/lib/rdap-normalization.mjs +306 -75
  103. package/lib/rdap-transport.mjs +2 -2
  104. package/lib/rdap-validation.mjs +65 -14
  105. package/lib/rdap.mjs +2 -2
  106. package/lib/registrable-domain.mjs +36 -0
  107. package/lib/registry-insights.mjs +7 -0
  108. package/lib/response-policy.mjs +27 -4
  109. package/lib/risk-calibration-summary.mjs +35 -33
  110. package/lib/risk-scoring.mjs +4 -3
  111. package/lib/safe-fetch.mjs +62 -40
  112. package/lib/security-txt.mjs +1 -1
  113. package/lib/smtp-transport-review.mjs +8 -5
  114. package/lib/sslbl-intelligence.mjs +6 -8
  115. package/lib/static-html-analysis.mjs +301 -4
  116. package/lib/structured-data-identity.mjs +51 -19
  117. package/lib/threat-intelligence-fixtures.mjs +2 -4
  118. package/lib/threat-intelligence-manifests.mjs +2 -7
  119. package/lib/threat-intelligence-runtime.mjs +3 -5
  120. package/lib/threat-intelligence-types.mjs +3 -0
  121. package/lib/threatfox-intelligence.mjs +7 -3
  122. package/lib/tls-intelligence.mjs +4 -4
  123. package/lib/urlhaus-intelligence.mjs +4 -2
  124. package/lib/urlscan-intelligence.mjs +6 -5
  125. package/lib/website-security-posture.mjs +1 -1
  126. package/lib/website-technology.mjs +1 -1
  127. package/lib/whois-authority.mjs +43 -8
  128. package/lib/whois-chain.mjs +25 -3
  129. package/lib/whois-normalization.mjs +3 -1
  130. package/lib/whois-transport.mjs +12 -3
  131. package/lib/zone-intent-review.mjs +1 -1
  132. package/package.json +12 -4
  133. package/{frontend/src/lib/analysis/case-brand-profile-references.js → packages/cases/case-brand-profile-references.mjs} +2 -2
  134. package/{frontend/src/lib/analysis/case-evidence-model.js → packages/cases/case-evidence-model.mjs} +35 -14
  135. package/{frontend/src/lib/analysis/case-investigation-branch-model.js → packages/cases/case-investigation-branch-model.mjs} +10 -12
  136. package/packages/cases/case-migration-model.mjs +476 -0
  137. package/{frontend/src/lib/analysis/case-model.js → packages/cases/case-model.mjs} +3 -3
  138. package/{frontend/src/lib/analysis/case-record-contracts.js → packages/cases/case-record-contracts.mjs} +3 -21
  139. package/{frontend/src/lib/analysis/case-record-core.js → packages/cases/case-record-core.mjs} +58 -31
  140. package/packages/cases/case-record-model.mjs +9 -0
  141. package/{frontend/src/lib/analysis/case-record-operations.js → packages/cases/case-record-operations.mjs} +72 -29
  142. package/{frontend/src/lib/analysis/case-report.js → packages/cases/case-report.mjs} +108 -14
  143. package/packages/cases/case-response-model.mjs +1604 -0
  144. package/packages/cases/case-response-packet.mjs +1312 -0
  145. package/{frontend/src/lib/analysis/case-storage-model.js → packages/cases/case-storage-model.mjs} +2 -2
  146. package/{frontend/src/lib/analysis/http-summary.js → packages/cases/http-summary.mjs} +1 -1
  147. package/{frontend/src/lib/analysis/comparison-ledger-bulk.js → packages/comparison/comparison-ledger-bulk.mjs} +2 -2
  148. package/{frontend/src/lib/analysis/comparison-ledger-contract.js → packages/comparison/comparison-ledger-contract.mjs} +4 -4
  149. package/{frontend/src/lib/analysis/comparison-ledger-json.js → packages/comparison/comparison-ledger-json.mjs} +1 -0
  150. package/{frontend/src/lib/analysis/comparison-ledger-serialization.js → packages/comparison/comparison-ledger-serialization.mjs} +1 -0
  151. package/packages/comparison/favicon-similarity.mjs +78 -0
  152. package/{frontend/src/lib/analysis/page-similarity.js → packages/comparison/page-similarity.mjs} +4 -3
  153. package/{frontend/src/lib/analysis/relationship-evidence.js → packages/comparison/relationship-evidence.mjs} +6 -7
  154. package/packages/contracts/analyst-review-state-contract.mjs +61 -0
  155. package/packages/contracts/analyst-review-state.mjs +50 -0
  156. package/packages/contracts/case-portability.mjs +1310 -0
  157. package/packages/contracts/cli-command-catalogue.mjs +2 -0
  158. package/packages/contracts/cli-lookup.mjs +394 -0
  159. package/packages/contracts/domain-control-flight-recorder.mjs +461 -0
  160. package/packages/contracts/domain-control-manifest.mjs +1027 -0
  161. package/packages/contracts/domain-control-monitor.mjs +310 -0
  162. package/packages/contracts/domain-control-review.mjs +828 -0
  163. package/packages/contracts/domain-name.mjs +4 -0
  164. package/packages/contracts/external-observation-interchange.mjs +224 -0
  165. package/packages/contracts/extracted-domain-lifecycle.mjs +218 -0
  166. package/packages/contracts/investigation-portability.mjs +331 -0
  167. package/packages/contracts/offline-comparison.mjs +160 -0
  168. package/packages/contracts/risk-calibration.mjs +1288 -0
  169. package/packages/contracts/schema-compatibility.mjs +71 -0
  170. package/packages/contracts/schema-lifecycle.mjs +1702 -0
  171. package/packages/contracts/sslbl-snapshot.mjs +17 -0
  172. package/packages/contracts/workspace-portability.mjs +1347 -0
  173. package/{frontend/src/lib/analysis/artifact-integrity.js → packages/evidence/artifact-integrity.mjs} +13 -11
  174. package/packages/evidence/decision-fact.mjs +735 -0
  175. package/packages/evidence/domain-control-runtime.mjs +547 -0
  176. package/packages/evidence/domain-name.mjs +41 -0
  177. package/packages/evidence/observation.mjs +384 -0
  178. package/{frontend/src/lib/analysis/external-findings-import.js → packages/interchange/external-findings-import.mjs} +24 -22
  179. package/packages/interchange/retained-text.mjs +8 -0
  180. package/{frontend/src/lib/analysis/acquisition-decision-packet.js → packages/investigation/acquisition-decision-packet.mjs} +9 -6
  181. package/{frontend/src/lib/analysis/bulk-domain-comparison.js → packages/investigation/bulk-domain-comparison.mjs} +5 -6
  182. package/{frontend/src/lib/analysis/bulk-mail-exposure.js → packages/investigation/bulk-mail-exposure.mjs} +4 -6
  183. package/{frontend/src/lib/analysis/bulk-review-export.js → packages/investigation/bulk-review-export.mjs} +5 -5
  184. package/packages/investigation/bulk-review-policy.mjs +1 -0
  185. package/{frontend/src/lib/analysis/investigation-capsule.js → packages/investigation/investigation-capsule.mjs} +30 -32
  186. package/packages/investigation/lookup-artefact-inputs.mjs +1 -0
  187. package/{frontend/src/lib/analysis/lookup-asset-graph.js → packages/investigation/lookup-asset-graph.mjs} +4 -2
  188. package/{frontend/src/lib/analysis/lookup-claim-passport.js → packages/investigation/lookup-claim-passport.mjs} +6 -10
  189. package/{frontend/src/lib/analysis/lookup-claim-readiness.js → packages/investigation/lookup-claim-readiness.mjs} +9 -2
  190. package/packages/investigation/lookup-investigation-brief.mjs +172 -0
  191. package/packages/monitoring/analyst-review-state.mjs +680 -0
  192. package/{frontend/src/lib/analysis/brand-profile-model.js → packages/workspace/brand-profile-model.mjs} +70 -47
  193. package/{frontend/src/lib/analysis/bulk-review-model.js → packages/workspace/bulk-review-model.mjs} +13 -14
  194. package/{frontend/src/lib/analysis/bulk-session-model.js → packages/workspace/bulk-session-model.mjs} +33 -59
  195. package/{frontend/src/lib/analysis/bulk-sort.js → packages/workspace/bulk-sort.mjs} +8 -5
  196. package/{frontend/src/lib/analysis/campaign-model.js → packages/workspace/campaign-model.mjs} +20 -22
  197. package/{frontend/src/lib/analysis/detection-rule-model.js → packages/workspace/detection-rule-model.mjs} +15 -17
  198. package/packages/workspace/hostile-input.mjs +172 -0
  199. package/{frontend/src/lib/analysis/investigation-guide.js → packages/workspace/investigation-guide.mjs} +8 -45
  200. package/{frontend/src/lib/analysis/investigation-template-model.js → packages/workspace/investigation-template-model.mjs} +18 -21
  201. package/{frontend/src/lib/analysis/page-baseline.js → packages/workspace/page-baseline.mjs} +6 -13
  202. package/{frontend/src/lib/analysis/relationship-observation-model.js → packages/workspace/relationship-observation-model.mjs} +13 -17
  203. package/{frontend/src/lib/analysis/shortlist-model.js → packages/workspace/shortlist-model.mjs} +20 -18
  204. package/{frontend/src/lib/analysis/watchlist-history.js → packages/workspace/watchlist-history.mjs} +9 -16
  205. package/{frontend/src/lib/analysis/watchlist-store.js → packages/workspace/watchlist-store.mjs} +24 -17
  206. package/{frontend/src/lib/analysis/website-snapshot-model.js → packages/workspace/website-snapshot-model.mjs} +13 -13
  207. package/{frontend/src/lib/analysis/workspace-archive-crypto.js → packages/workspace/workspace-archive-crypto.mjs} +49 -19
  208. package/{frontend/src/lib/analysis/workspace-archive.js → packages/workspace/workspace-archive.mjs} +110 -89
  209. package/third-party-notices.txt +14 -14
  210. package/frontend/src/lib/analysis/bulk-retry-plan.js +0 -79
  211. package/frontend/src/lib/analysis/bulk-source-coverage.js +0 -76
  212. package/frontend/src/lib/analysis/case-migration-model.js +0 -305
  213. package/frontend/src/lib/analysis/case-record-model.js +0 -9
  214. package/frontend/src/lib/analysis/case-response-model.js +0 -728
  215. package/frontend/src/lib/analysis/case-response-packet.js +0 -583
  216. package/frontend/src/lib/analysis/lookup-decision-support.js +0 -542
  217. package/frontend/src/lib/analysis/lookup-investigation-brief.js +0 -153
  218. package/frontend/src/lib/analysis/lookup-presentation.js +0 -120
  219. package/frontend/src/lib/analysis/lookup-response.js +0 -2
  220. package/frontend/src/lib/analysis/lookup-source-refresh.js +0 -277
  221. package/frontend/src/lib/analysis/lookup-summary-model.js +0 -398
  222. package/frontend/src/lib/analysis/scoring.js +0 -55
  223. package/frontend/src/lib/analysis/utils.js +0 -255
  224. package/frontend/src/lib/analysis/visualization-bounds.js +0 -26
  225. package/frontend/src/lib/analysis/visualization-force-graph.js +0 -352
  226. package/frontend/src/lib/analysis/visualization-matrix.js +0 -131
  227. package/frontend/src/lib/analysis/visualization-models.js +0 -338
  228. package/frontend/src/lib/analysis/visualization-time-series.js +0 -185
  229. package/lib/bounded-json-response.mjs +0 -170
  230. package/lib/lookup-response-contract.mjs +0 -1034
  231. package/lib/observation.mjs +0 -115
  232. /package/{frontend/src/lib/analysis/opaque-reference-id.js → packages/cases/opaque-reference-id.mjs} +0 -0
  233. /package/{frontend/src/lib/analysis/acquisition-due-diligence.js → packages/investigation/acquisition-due-diligence.mjs} +0 -0
  234. /package/{frontend/src/lib/analysis/evidence-coverage-ledger.js → packages/investigation/evidence-coverage-ledger.mjs} +0 -0
  235. /package/{frontend/src/lib/analysis/dns-record-normalization.js → packages/workspace/dns-record-normalization.mjs} +0 -0
@@ -0,0 +1,331 @@
1
+ import { defineSchemaCompatibility } from "./schema-compatibility.mjs";
2
+ import { defineSchemaLifecycleFamily } from "./schema-lifecycle.mjs";
3
+ export const INVESTIGATION_PORTABILITY_CONTRACT_OWNER = 'packages/contracts/investigation-portability.mts';
4
+ export const MAX_INVESTIGATION_PORTABLE_BYTES = 15 * 1024 * 1024;
5
+ export const ACQUISITION_DECISION_PACKET_SCHEMA = 'whoisleuth.acquisition-decision';
6
+ export const ACQUISITION_DECISION_PACKET_VERSION = 2;
7
+ export const SUPPORTED_ACQUISITION_DECISION_PACKET_VERSIONS = Object.freeze([ACQUISITION_DECISION_PACKET_VERSION]);
8
+ export const LOOKUP_CLAIM_READINESS_VERSION = 2;
9
+ export const LOOKUP_CLAIM_PASSPORT_SCHEMA = 'whoisleuth.lookup-claim-passport';
10
+ export const LOOKUP_CLAIM_PASSPORT_VERSION = 1;
11
+ export const MAX_LOOKUP_CLAIM_PASSPORT_BYTES = 64 * 1024;
12
+ export const MAX_LOOKUP_CLAIM_PASSPORT_REQUIREMENTS = 16;
13
+ export const MAX_LOOKUP_CLAIM_PASSPORT_LIMITATIONS = 16;
14
+ export const LOOKUP_CLAIM_PASSPORT_TARGET_TYPES = Object.freeze(['domain', 'ipv4', 'ipv6', 'asn']);
15
+ export const BULK_DOMAIN_COMPARISON_SCHEMA = 'whoisleuth.domain-comparison';
16
+ export const BULK_DOMAIN_COMPARISON_VERSION = 3;
17
+ export const BULK_DOMAIN_COMPARISON_EXPORT_VERSION = 4;
18
+ export const SUPPORTED_BULK_DOMAIN_COMPARISON_EXPORT_VERSIONS = Object.freeze([BULK_DOMAIN_COMPARISON_EXPORT_VERSION]);
19
+ export const BULK_MAIL_EXPOSURE_SCHEMA = 'whoisleuth.bulk-mail-exposure';
20
+ export const BULK_MAIL_EXPOSURE_VERSION = 1;
21
+ export const BULK_MAIL_EXPOSURE_EXPORT_VERSION = 2;
22
+ export const SUPPORTED_BULK_MAIL_EXPOSURE_EXPORT_VERSIONS = Object.freeze([BULK_MAIL_EXPOSURE_EXPORT_VERSION]);
23
+ export const MAX_BULK_MAIL_EXPOSURE_ROWS = 2_000;
24
+ export const BULK_REVIEW_MANIFEST_SCHEMA = 'whoisleuth.bulk-review-manifest';
25
+ export const BULK_REVIEW_MANIFEST_VERSION = 2;
26
+ export const SUPPORTED_BULK_REVIEW_MANIFEST_VERSIONS = Object.freeze([BULK_REVIEW_MANIFEST_VERSION]);
27
+ export const INVESTIGATION_CAPSULE_SCHEMA = 'whoisleuth.investigation-capsule';
28
+ export const INVESTIGATION_CAPSULE_VERSION = 3;
29
+ export const PUBLIC_INVESTIGATION_CAPSULE_VERSION = 2;
30
+ export const SUPPORTED_INVESTIGATION_CAPSULE_VERSIONS = Object.freeze([
31
+ PUBLIC_INVESTIGATION_CAPSULE_VERSION,
32
+ INVESTIGATION_CAPSULE_VERSION,
33
+ ]);
34
+ export const INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA = 'whoisleuth.case-analyst-records';
35
+ export const INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION = 1;
36
+ export const LOOKUP_INVESTIGATION_BRIEF_SCHEMA = 'whoisleuth.investigation-brief';
37
+ export const LOOKUP_INVESTIGATION_BRIEF_VERSION = 2;
38
+ export const PUBLIC_LOOKUP_INVESTIGATION_BRIEF_VERSION = 1;
39
+ export const SUPPORTED_LOOKUP_INVESTIGATION_BRIEF_VERSIONS = Object.freeze([
40
+ PUBLIC_LOOKUP_INVESTIGATION_BRIEF_VERSION,
41
+ LOOKUP_INVESTIGATION_BRIEF_VERSION,
42
+ ]);
43
+ export const MAX_LOOKUP_INVESTIGATION_BRIEF_BYTES = 128 * 1024;
44
+ export const LOOKUP_ASSET_GRAPH_SCHEMA = 'whoisleuth.lookup-asset-graph';
45
+ export const LOOKUP_ASSET_GRAPH_VERSION = 2;
46
+ export const INVESTIGATION_DOMAIN_COMPATIBILITY_FACADES = Object.freeze([
47
+ ['frontend/src/lib/analysis/acquisition-decision-packet.ts', 'packages/investigation/acquisition-decision-packet.mts'],
48
+ ['frontend/src/lib/analysis/acquisition-due-diligence.ts', 'packages/investigation/acquisition-due-diligence.mts'],
49
+ ['frontend/src/lib/analysis/bulk-domain-comparison.ts', 'packages/investigation/bulk-domain-comparison.mts'],
50
+ ['frontend/src/lib/analysis/bulk-mail-exposure.ts', 'packages/investigation/bulk-mail-exposure.mts'],
51
+ ['frontend/src/lib/analysis/bulk-review-export.ts', 'packages/investigation/bulk-review-export.mts'],
52
+ ['frontend/src/lib/analysis/evidence-coverage-ledger.ts', 'packages/investigation/evidence-coverage-ledger.mts'],
53
+ ['frontend/src/lib/analysis/investigation-capsule.ts', 'packages/investigation/investigation-capsule.mts'],
54
+ ['frontend/src/lib/analysis/lookup-asset-graph.ts', 'packages/investigation/lookup-asset-graph.mts'],
55
+ ['frontend/src/lib/analysis/lookup-claim-passport.ts', 'packages/investigation/lookup-claim-passport.mts'],
56
+ ['frontend/src/lib/analysis/lookup-claim-readiness.ts', 'packages/investigation/lookup-claim-readiness.mts'],
57
+ ['frontend/src/lib/analysis/lookup-investigation-brief.ts', 'packages/investigation/lookup-investigation-brief.mts'],
58
+ ]);
59
+ export const ACQUISITION_DECISION_PACKET_COMPATIBILITY = defineSchemaCompatibility({
60
+ id: 'export.acquisition-decision', kind: 'export', schema: ACQUISITION_DECISION_PACKET_SCHEMA,
61
+ currentVersion: ACQUISITION_DECISION_PACKET_VERSION, supportedVersions: SUPPORTED_ACQUISITION_DECISION_PACKET_VERSIONS,
62
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
63
+ byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
64
+ note: 'The v1.47.4 current writer and v2 both use version 2 with deterministic sorted-json-v2 integrity for a bounded acquisition review without making an availability, eligibility, ownership, valuation, or purchase determination.',
65
+ });
66
+ export const LOOKUP_CLAIM_PASSPORT_COMPATIBILITY = defineSchemaCompatibility({
67
+ id: 'export.lookup-claim-passport', kind: 'export', schema: LOOKUP_CLAIM_PASSPORT_SCHEMA,
68
+ currentVersion: LOOKUP_CLAIM_PASSPORT_VERSION, supportedVersions: [LOOKUP_CLAIM_PASSPORT_VERSION],
69
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
70
+ byteBudget: MAX_LOOKUP_CLAIM_PASSPORT_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
71
+ note: 'Explicit local export of one typed Evidence Readiness projection with exact evidence requirement IDs, retained source states, bounded limitations, and deterministic sorted-json-v2 integrity; raw source payloads and browser-local records are excluded.',
72
+ });
73
+ export const BULK_DOMAIN_COMPARISON_COMPATIBILITY = defineSchemaCompatibility({
74
+ id: 'export.domain-comparison', kind: 'export', schema: BULK_DOMAIN_COMPARISON_SCHEMA,
75
+ currentVersion: BULK_DOMAIN_COMPARISON_EXPORT_VERSION, supportedVersions: SUPPORTED_BULK_DOMAIN_COMPARISON_EXPORT_VERSIONS,
76
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
77
+ byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
78
+ note: 'Export version 4 uses deterministic sorted-json-v2 integrity while its nested comparison remains version 3 and preserves distinct evidence states.',
79
+ });
80
+ export const BULK_MAIL_EXPOSURE_COMPATIBILITY = defineSchemaCompatibility({
81
+ id: 'export.bulk-mail-exposure', kind: 'export', schema: BULK_MAIL_EXPOSURE_SCHEMA,
82
+ currentVersion: BULK_MAIL_EXPOSURE_EXPORT_VERSION, supportedVersions: SUPPORTED_BULK_MAIL_EXPOSURE_EXPORT_VERSIONS,
83
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
84
+ byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
85
+ note: 'Export version 2 uses deterministic sorted-json-v2 integrity while its nested report remains version 1 and incomplete DNS evidence remains inconclusive.',
86
+ });
87
+ export const BULK_REVIEW_MANIFEST_COMPATIBILITY = defineSchemaCompatibility({
88
+ id: 'export.bulk-review-manifest', kind: 'export', schema: BULK_REVIEW_MANIFEST_SCHEMA,
89
+ currentVersion: BULK_REVIEW_MANIFEST_VERSION, supportedVersions: SUPPORTED_BULK_REVIEW_MANIFEST_VERSIONS,
90
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
91
+ byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
92
+ note: 'Version 2 uses deterministic sorted-json-v2 integrity for one bounded Bulk review selection while excluding raw payloads, contacts, notes, and transient request state.',
93
+ });
94
+ export const INVESTIGATION_CAPSULE_COMPATIBILITY = defineSchemaCompatibility({
95
+ id: 'export.investigation-capsule', kind: 'export', schema: INVESTIGATION_CAPSULE_SCHEMA,
96
+ currentVersion: INVESTIGATION_CAPSULE_VERSION, supportedVersions: SUPPORTED_INVESTIGATION_CAPSULE_VERSIONS,
97
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
98
+ byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
99
+ note: 'Version 3 embeds investigation brief v2 with canonical Decision Facts; the v1.47.4 version 2 and v2 version 3 retain whole-capsule sorted-json-v2 integrity.',
100
+ });
101
+ export const LOOKUP_ASSET_GRAPH_COMPATIBILITY = defineSchemaCompatibility({
102
+ id: 'derived.lookup-asset-graph', kind: 'derived', schema: LOOKUP_ASSET_GRAPH_SCHEMA,
103
+ tier: 'durable_interchange',
104
+ currentVersion: LOOKUP_ASSET_GRAPH_VERSION, supportedVersions: [LOOKUP_ASSET_GRAPH_VERSION],
105
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'exact_current_only', writeSemantics: 'read_only',
106
+ byteBudget: null, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
107
+ note: 'Bounded relationship projection embedded in investigation capsules; source attribution and incomplete evidence remain explicit.',
108
+ });
109
+ export const INVESTIGATION_CAPSULE_ANALYST_RECORDS_COMPATIBILITY = defineSchemaCompatibility({
110
+ id: 'derived.case-analyst-records', kind: 'derived', schema: INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA,
111
+ tier: 'durable_interchange',
112
+ currentVersion: INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION, supportedVersions: [INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION],
113
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'exact_current_only', writeSemantics: 'read_only',
114
+ byteBudget: null, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
115
+ note: 'Optional bounded analyst-decision and assertion projection embedded only after deliberate selection for an investigation capsule.',
116
+ });
117
+ export const LOOKUP_INVESTIGATION_BRIEF_COMPATIBILITY = defineSchemaCompatibility({
118
+ id: 'derived.lookup-investigation-brief', kind: 'derived', schema: LOOKUP_INVESTIGATION_BRIEF_SCHEMA,
119
+ tier: 'durable_interchange',
120
+ currentVersion: LOOKUP_INVESTIGATION_BRIEF_VERSION, supportedVersions: SUPPORTED_LOOKUP_INVESTIGATION_BRIEF_VERSIONS,
121
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'none',
122
+ byteBudget: MAX_LOOKUP_INVESTIGATION_BRIEF_BYTES, owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
123
+ note: 'Version 2 replaces the public version-1 summary and decision-entry arrays with one bounded canonical Decision Fact projection; public version 1 remains structurally verified when embedded in supported capsule versions.',
124
+ });
125
+ export const INVESTIGATION_PORTABILITY_COMPATIBILITY = Object.freeze([
126
+ ACQUISITION_DECISION_PACKET_COMPATIBILITY,
127
+ LOOKUP_CLAIM_PASSPORT_COMPATIBILITY,
128
+ BULK_DOMAIN_COMPARISON_COMPATIBILITY,
129
+ BULK_MAIL_EXPOSURE_COMPATIBILITY,
130
+ BULK_REVIEW_MANIFEST_COMPATIBILITY,
131
+ INVESTIGATION_CAPSULE_COMPATIBILITY,
132
+ LOOKUP_ASSET_GRAPH_COMPATIBILITY,
133
+ INVESTIGATION_CAPSULE_ANALYST_RECORDS_COMPATIBILITY,
134
+ LOOKUP_INVESTIGATION_BRIEF_COMPATIBILITY,
135
+ ]);
136
+ const INVESTIGATION_FIXTURES = Object.freeze([
137
+ { id: 'acquisition-decision-v2', path: 'test/fixtures/investigation-portability/acquisition-decision-v2.json', bytes: 6_278, sha256: '1c1b5c2fcea2886dae5661085f605d95317b89bb6d9774cb8967a754ef8165bf', schema: ACQUISITION_DECISION_PACKET_SCHEMA, version: 2, role: 'current' },
138
+ { id: 'lookup-claim-passport-v1', path: 'test/fixtures/investigation-portability/lookup-claim-passport-v1.json', bytes: 2_011, sha256: 'dbf1c3975282e340b6639162a0555aeaed42c06abe92ed3b354409ce73c284a4', schema: LOOKUP_CLAIM_PASSPORT_SCHEMA, version: 1, role: 'current' },
139
+ { id: 'bulk-domain-comparison-v4', path: 'test/fixtures/investigation-portability/bulk-domain-comparison-v4.json', bytes: 17_079, sha256: 'b718af34c8f5f1ba4427807cd149561bc1b7e605a6e74206a694beaee078cc2d', schema: BULK_DOMAIN_COMPARISON_SCHEMA, version: 4, role: 'current' },
140
+ { id: 'bulk-mail-exposure-v2', path: 'test/fixtures/investigation-portability/bulk-mail-exposure-v2.json', bytes: 2_582, sha256: '9ff6c4c9f2dda4c5451daf8fb11e36a3ee15b513a09ad3c93515cc37df5d6660', schema: BULK_MAIL_EXPOSURE_SCHEMA, version: 2, role: 'current' },
141
+ { id: 'bulk-review-manifest-v2', path: 'test/fixtures/investigation-portability/bulk-review-manifest-v2.json', bytes: 1_657, sha256: '1c90f4d0661357fc277360cc924f2464e463f9c8bd815a6b45408e95e1caf7d3', schema: BULK_REVIEW_MANIFEST_SCHEMA, version: 2, role: 'current' },
142
+ { id: 'investigation-capsule-v2', path: 'test/fixtures/investigation-capsule-v2.json', bytes: 3_286, sha256: 'fb71cb243020d401e3653bb714f9de07a71b81622fcf83c0027599b763dda070', schema: INVESTIGATION_CAPSULE_SCHEMA, version: 2, role: 'historical' },
143
+ { id: 'investigation-capsule-v3', path: 'test/fixtures/investigation-portability/investigation-capsule-v3.json', bytes: 6_132, sha256: '685123c8bd152ee1a8074441bcd56bbde9fb0304aa4a320ee9b37d02061ed82a', schema: INVESTIGATION_CAPSULE_SCHEMA, version: 3, role: 'current' },
144
+ { id: 'lookup-asset-graph-v2', path: 'test/fixtures/investigation-portability/lookup-asset-graph-v2.json', bytes: 1_157, sha256: '455397a2b2987180d54657199e76c4dc175e01aed0fa83d945a6f3ec30bdcd49', schema: LOOKUP_ASSET_GRAPH_SCHEMA, version: 2, role: 'current' },
145
+ { id: 'investigation-analyst-records-v1', path: 'test/fixtures/investigation-portability/investigation-analyst-records-v1.json', bytes: 624, sha256: '0730116afef29e52b448e150f6755e89ec1189c2fbc6ec4ef8cfc4b41f677456', schema: INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA, version: 1, role: 'current' },
146
+ { id: 'lookup-investigation-brief-v1', path: 'test/fixtures/investigation-portability/lookup-investigation-brief-v1.json', bytes: 1_651, sha256: 'bc21c886671370659149c3e494c7e6061302569308823c69ef96f0c601dadbab', schema: LOOKUP_INVESTIGATION_BRIEF_SCHEMA, version: 1, role: 'historical' },
147
+ { id: 'lookup-investigation-brief-v2', path: 'test/fixtures/investigation-portability/lookup-investigation-brief-v2.json', bytes: 1_724, sha256: '25d0133318df8daa00848e6a2c03913478beb30818a4959298ec1500b6aaa0fd', schema: LOOKUP_INVESTIGATION_BRIEF_SCHEMA, version: 2, role: 'current' },
148
+ ].map((fixture) => Object.freeze({
149
+ ...fixture,
150
+ contentDigestSha256: null,
151
+ expectation: 'accepted_exact',
152
+ expectedOutputFixtureId: null,
153
+ scope: 'repository',
154
+ })));
155
+ function investigationFixtureIds(schema, version) {
156
+ return Object.freeze(INVESTIGATION_FIXTURES
157
+ .filter((fixture) => fixture.schema === schema && fixture.version === version)
158
+ .map((fixture) => fixture.id));
159
+ }
160
+ function investigationContract(input) {
161
+ return Object.freeze({
162
+ compatibilityId: input.compatibilityId,
163
+ schema: input.schema,
164
+ version: input.version,
165
+ role: 'document',
166
+ lifecycle: input.version === input.currentVersion ? 'current' : 'legacy',
167
+ readable: true,
168
+ emitted: input.version === input.currentVersion,
169
+ exactKeys: true,
170
+ extensionPolicy: 'reject',
171
+ futureVersionBehaviour: 'reject',
172
+ migrationTarget: null,
173
+ canonicalisation: input.canonicalisation,
174
+ byteBudget: input.byteBudget,
175
+ fixtureIds: investigationFixtureIds(input.schema, input.version),
176
+ });
177
+ }
178
+ const INVESTIGATION_CONTRACTS = Object.freeze([
179
+ ...SUPPORTED_ACQUISITION_DECISION_PACKET_VERSIONS.map((version) => investigationContract({ compatibilityId: ACQUISITION_DECISION_PACKET_COMPATIBILITY.id, schema: ACQUISITION_DECISION_PACKET_SCHEMA, version, currentVersion: ACQUISITION_DECISION_PACKET_VERSION, canonicalisation: 'sorted-json-v2', byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES })),
180
+ investigationContract({ compatibilityId: LOOKUP_CLAIM_PASSPORT_COMPATIBILITY.id, schema: LOOKUP_CLAIM_PASSPORT_SCHEMA, version: LOOKUP_CLAIM_PASSPORT_VERSION, currentVersion: LOOKUP_CLAIM_PASSPORT_VERSION, canonicalisation: 'sorted-json-v2', byteBudget: MAX_LOOKUP_CLAIM_PASSPORT_BYTES }),
181
+ ...SUPPORTED_BULK_DOMAIN_COMPARISON_EXPORT_VERSIONS.map((version) => investigationContract({ compatibilityId: BULK_DOMAIN_COMPARISON_COMPATIBILITY.id, schema: BULK_DOMAIN_COMPARISON_SCHEMA, version, currentVersion: BULK_DOMAIN_COMPARISON_EXPORT_VERSION, canonicalisation: 'sorted-json-v2', byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES })),
182
+ ...SUPPORTED_BULK_MAIL_EXPOSURE_EXPORT_VERSIONS.map((version) => investigationContract({ compatibilityId: BULK_MAIL_EXPOSURE_COMPATIBILITY.id, schema: BULK_MAIL_EXPOSURE_SCHEMA, version, currentVersion: BULK_MAIL_EXPOSURE_EXPORT_VERSION, canonicalisation: 'sorted-json-v2', byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES })),
183
+ ...SUPPORTED_BULK_REVIEW_MANIFEST_VERSIONS.map((version) => investigationContract({ compatibilityId: BULK_REVIEW_MANIFEST_COMPATIBILITY.id, schema: BULK_REVIEW_MANIFEST_SCHEMA, version, currentVersion: BULK_REVIEW_MANIFEST_VERSION, canonicalisation: 'sorted-json-v2', byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES })),
184
+ ...SUPPORTED_INVESTIGATION_CAPSULE_VERSIONS.map((version) => investigationContract({ compatibilityId: INVESTIGATION_CAPSULE_COMPATIBILITY.id, schema: INVESTIGATION_CAPSULE_SCHEMA, version, currentVersion: INVESTIGATION_CAPSULE_VERSION, canonicalisation: 'sorted-json-v2', byteBudget: MAX_INVESTIGATION_PORTABLE_BYTES })),
185
+ investigationContract({ compatibilityId: LOOKUP_ASSET_GRAPH_COMPATIBILITY.id, schema: LOOKUP_ASSET_GRAPH_SCHEMA, version: LOOKUP_ASSET_GRAPH_VERSION, currentVersion: LOOKUP_ASSET_GRAPH_VERSION, canonicalisation: null, byteBudget: null }),
186
+ investigationContract({ compatibilityId: INVESTIGATION_CAPSULE_ANALYST_RECORDS_COMPATIBILITY.id, schema: INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA, version: INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION, currentVersion: INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION, canonicalisation: null, byteBudget: null }),
187
+ ...SUPPORTED_LOOKUP_INVESTIGATION_BRIEF_VERSIONS.map((version) => investigationContract({ compatibilityId: LOOKUP_INVESTIGATION_BRIEF_COMPATIBILITY.id, schema: LOOKUP_INVESTIGATION_BRIEF_SCHEMA, version, currentVersion: LOOKUP_INVESTIGATION_BRIEF_VERSION, canonicalisation: null, byteBudget: MAX_LOOKUP_INVESTIGATION_BRIEF_BYTES })),
188
+ ]);
189
+ function investigationShape(id, schema, versions, requiredKeys, normalisation) {
190
+ return Object.freeze({
191
+ id,
192
+ schema,
193
+ versions,
194
+ objects: [{ path: '$', requiredKeys, optionalKeys: [], unknownKeys: 'reject' }],
195
+ fixedArrays: [],
196
+ normalisation,
197
+ target: null,
198
+ });
199
+ }
200
+ const INVESTIGATION_SHAPES = Object.freeze([
201
+ investigationShape('investigation.acquisition.v2', ACQUISITION_DECISION_PACKET_SCHEMA, [...SUPPORTED_ACQUISITION_DECISION_PACKET_VERSIONS], ['schema', 'version', 'generatedAt', 'target', 'synthetic', 'evidenceObservedAt', 'analystReview', 'evidenceReview', 'limitations', 'integrity'], 'preserve_signed_document'),
202
+ investigationShape('investigation.claim-passport.v1', LOOKUP_CLAIM_PASSPORT_SCHEMA, [LOOKUP_CLAIM_PASSPORT_VERSION], ['schema', 'version', 'generatedAt', 'application', 'target', 'observation', 'claim', 'models', 'limitations', 'integrity'], 'preserve_signed_document'),
203
+ investigationShape('investigation.domain-comparison.v4', BULK_DOMAIN_COMPARISON_SCHEMA, [...SUPPORTED_BULK_DOMAIN_COMPARISON_EXPORT_VERSIONS], ['schema', 'version', 'generatedAt', 'comparison', 'integrity'], 'preserve_signed_document'),
204
+ investigationShape('investigation.mail-exposure.v2', BULK_MAIL_EXPOSURE_SCHEMA, [...SUPPORTED_BULK_MAIL_EXPOSURE_EXPORT_VERSIONS], ['schema', 'version', 'report', 'integrity'], 'preserve_signed_document'),
205
+ investigationShape('investigation.bulk-review.v2', BULK_REVIEW_MANIFEST_SCHEMA, [...SUPPORTED_BULK_REVIEW_MANIFEST_VERSIONS], ['schema', 'version', 'generatedAt', 'observedAt', 'lookupProfile', 'selection', 'view', 'rows', 'limitations', 'integrity'], 'preserve_signed_document'),
206
+ investigationShape('investigation.capsule.v2-v3', INVESTIGATION_CAPSULE_SCHEMA, [...SUPPORTED_INVESTIGATION_CAPSULE_VERSIONS], ['schema', 'schemaVersion', 'generatedAt', 'application', 'target', 'sourceContracts', 'investigationBrief', 'graphSnapshot', 'analystRecords', 'limitations', 'integrity'], 'preserve_signed_document'),
207
+ investigationShape('investigation.asset-graph.v2', LOOKUP_ASSET_GRAPH_SCHEMA, [LOOKUP_ASSET_GRAPH_VERSION], ['version', 'targetId', 'nodes', 'edges', 'sources', 'truncated', 'limitations'], 'preserve_document'),
208
+ investigationShape('investigation.analyst-records.v1', INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA, [INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION], ['caseId', 'status', 'disposition', 'decisions', 'assertions'], 'preserve_document'),
209
+ investigationShape('investigation.brief.v1', LOOKUP_INVESTIGATION_BRIEF_SCHEMA, [PUBLIC_LOOKUP_INVESTIGATION_BRIEF_VERSION], ['schema', 'schemaVersion', 'generatedAt', 'target', 'targetType', 'task', 'taskLabel', 'question', 'summary', 'observation', 'verifiedFacts', 'contradictions', 'unknowns', 'nextActions', 'relationships', 'limitations'], 'preserve_document'),
210
+ investigationShape('investigation.brief.v2', LOOKUP_INVESTIGATION_BRIEF_SCHEMA, [LOOKUP_INVESTIGATION_BRIEF_VERSION], ['schema', 'schemaVersion', 'generatedAt', 'target', 'targetType', 'task', 'taskLabel', 'question', 'summary', 'observation', 'decisionFacts', 'relationships', 'limitations'], 'preserve_document'),
211
+ ]);
212
+ const investigationConsumerCommon = Object.freeze({
213
+ expiryPolicyId: 'investigation.expiry.not-applicable',
214
+ requestMode: 'none',
215
+ bindingState: 'declared_unenforced',
216
+ policyState: 'current',
217
+ });
218
+ export const INVESTIGATION_PORTABILITY_LIFECYCLE_FAMILY = defineSchemaLifecycleFamily({
219
+ id: 'investigation-portability',
220
+ owner: INVESTIGATION_PORTABILITY_CONTRACT_OWNER,
221
+ privacy: 'analyst_authored_sensitive',
222
+ compatibility: INVESTIGATION_PORTABILITY_COMPATIBILITY,
223
+ contracts: INVESTIGATION_CONTRACTS,
224
+ fixtures: INVESTIGATION_FIXTURES,
225
+ metadata: {
226
+ metadataVersion: 3,
227
+ enforcement: 'declarative_only',
228
+ shapes: INVESTIGATION_SHAPES,
229
+ boundProfiles: [
230
+ { id: 'investigation.portable.bounds', bounds: [
231
+ { id: 'raw-bytes', path: '$', phase: 'raw_intake', unit: 'bytes', minimum: 1, maximum: MAX_INVESTIGATION_PORTABLE_BYTES, handling: 'reject' },
232
+ { id: 'serialised-bytes', path: '$', phase: 'serialised', unit: 'bytes', minimum: 1, maximum: MAX_INVESTIGATION_PORTABLE_BYTES, handling: 'reject' },
233
+ ] },
234
+ { id: 'investigation.passport.bounds', bounds: [
235
+ { id: 'raw-bytes', path: '$', phase: 'raw_intake', unit: 'bytes', minimum: 1, maximum: MAX_LOOKUP_CLAIM_PASSPORT_BYTES, handling: 'reject' },
236
+ { id: 'serialised-bytes', path: '$', phase: 'serialised', unit: 'bytes', minimum: 1, maximum: MAX_LOOKUP_CLAIM_PASSPORT_BYTES, handling: 'reject' },
237
+ ] },
238
+ { id: 'investigation.brief.bounds', bounds: [
239
+ { id: 'raw-bytes', path: '$', phase: 'raw_intake', unit: 'bytes', minimum: 1, maximum: MAX_LOOKUP_INVESTIGATION_BRIEF_BYTES, handling: 'reject' },
240
+ { id: 'serialised-bytes', path: '$', phase: 'serialised', unit: 'bytes', minimum: 1, maximum: MAX_LOOKUP_INVESTIGATION_BRIEF_BYTES, handling: 'reject' },
241
+ ] },
242
+ { id: 'investigation.derived.bounds', bounds: [
243
+ { id: 'projection-items', path: '$', phase: 'normalised', unit: 'items', minimum: 0, maximum: 2_000, handling: 'truncate' },
244
+ ] },
245
+ ],
246
+ hooks: [
247
+ { id: 'investigation.offline.structure', role: 'structure_validator', runtime: 'cli', module: 'cli/artifact-structure.mts', exportName: 'validateOfflineArtifactStructure' },
248
+ { id: 'investigation.offline.verify', role: 'integrity_verifier', runtime: 'cli', module: 'cli/artifact-verify.mts', exportName: 'verifyOfflineArtifact' },
249
+ { id: 'investigation.acquisition.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/acquisition-decision-packet.mts', exportName: 'buildAcquisitionDecisionPacket' },
250
+ { id: 'investigation.passport.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/lookup-claim-passport.mts', exportName: 'buildLookupClaimPassport' },
251
+ { id: 'investigation.domain-comparison.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/bulk-domain-comparison.mts', exportName: 'buildBulkDomainComparisonExport' },
252
+ { id: 'investigation.mail-exposure.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/bulk-mail-exposure.mts', exportName: 'buildBulkMailExposureExport' },
253
+ { id: 'investigation.bulk-review.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/bulk-review-export.mts', exportName: 'buildBulkReviewManifest' },
254
+ { id: 'investigation.capsule.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/investigation-capsule.mts', exportName: 'buildInvestigationCapsule' },
255
+ { id: 'investigation.capsule.verify', role: 'integrity_verifier', runtime: 'shared', module: 'packages/investigation/investigation-capsule.mts', exportName: 'verifyInvestigationCapsule' },
256
+ { id: 'investigation.capsule.serialise', role: 'serialiser', runtime: 'shared', module: 'packages/investigation/investigation-capsule.mts', exportName: 'serializeInvestigationCapsule' },
257
+ { id: 'investigation.graph.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/lookup-asset-graph.mts', exportName: 'buildLookupAssetGraph' },
258
+ { id: 'investigation.brief.build', role: 'builder', runtime: 'shared', module: 'packages/investigation/lookup-investigation-brief.mts', exportName: 'buildLookupInvestigationBrief' },
259
+ ],
260
+ serialisationProfiles: [{
261
+ id: 'investigation.capsule.json.v2-v3',
262
+ schema: INVESTIGATION_CAPSULE_SCHEMA,
263
+ versions: [...SUPPORTED_INVESTIGATION_CAPSULE_VERSIONS],
264
+ mediaType: 'application/json',
265
+ encoding: 'utf-8',
266
+ bom: false,
267
+ indentSpaces: 2,
268
+ terminalLf: true,
269
+ propertyOrder: 'normalised_fixed',
270
+ canonicalisation: null,
271
+ integrity: 'structural_only_requires_separate_verification',
272
+ serializerHookId: 'investigation.capsule.serialise',
273
+ verifierHookIds: ['investigation.capsule.verify'],
274
+ }],
275
+ privacyProfiles: [
276
+ { id: 'investigation.privacy.input', classification: 'analyst_authored_sensitive', projection: 'browser_import', includedCategories: ['bounded-investigation-projections', 'source-qualified-evidence-states', 'declared-integrity'], excludedCategories: ['raw-upstream-payloads', 'expanded-contacts', 'credentials', 'cookies', 'query-bearing-urls'], notePolicy: 'allowed_bounded', retention: 'deliberate_local_file', network: 'none', sharingReview: 'required' },
277
+ { id: 'investigation.privacy.output', classification: 'analyst_authored_sensitive', projection: 'browser_export', includedCategories: ['bounded-investigation-projections', 'source-qualified-evidence-states', 'declared-integrity'], excludedCategories: ['raw-upstream-payloads', 'expanded-contacts', 'credentials', 'cookies', 'query-bearing-urls'], notePolicy: 'allowed_bounded', retention: 'operator_controlled_output', network: 'none', sharingReview: 'required' },
278
+ ],
279
+ expiryProfiles: [{ id: 'investigation.expiry.not-applicable', field: null, anchor: null, handling: 'not_applicable', phase: 'not_applicable', maximumLifetimeDays: null }],
280
+ consumerEdges: [
281
+ {
282
+ id: 'investigation.consumer.offline-verify', plane: 'cli', operation: 'validate-structure-and-integrity',
283
+ acceptedContracts: [
284
+ { schema: ACQUISITION_DECISION_PACKET_SCHEMA, versions: [...SUPPORTED_ACQUISITION_DECISION_PACKET_VERSIONS], mode: 'direct' },
285
+ { schema: LOOKUP_CLAIM_PASSPORT_SCHEMA, versions: [LOOKUP_CLAIM_PASSPORT_VERSION], mode: 'direct' },
286
+ { schema: BULK_DOMAIN_COMPARISON_SCHEMA, versions: [...SUPPORTED_BULK_DOMAIN_COMPARISON_EXPORT_VERSIONS], mode: 'direct' },
287
+ { schema: BULK_MAIL_EXPOSURE_SCHEMA, versions: [...SUPPORTED_BULK_MAIL_EXPOSURE_EXPORT_VERSIONS], mode: 'direct' },
288
+ { schema: BULK_REVIEW_MANIFEST_SCHEMA, versions: [...SUPPORTED_BULK_REVIEW_MANIFEST_VERSIONS], mode: 'direct' },
289
+ { schema: INVESTIGATION_CAPSULE_SCHEMA, versions: [...SUPPORTED_INVESTIGATION_CAPSULE_VERSIONS], mode: 'direct' },
290
+ ],
291
+ emittedContract: null,
292
+ shapeIds: ['investigation.acquisition.v2', 'investigation.claim-passport.v1', 'investigation.domain-comparison.v4', 'investigation.mail-exposure.v2', 'investigation.bulk-review.v2', 'investigation.capsule.v2-v3'],
293
+ boundProfileIds: ['investigation.portable.bounds', 'investigation.passport.bounds'],
294
+ hookIds: ['investigation.offline.structure', 'investigation.offline.verify'],
295
+ serialisationProfileId: null,
296
+ privacyProfileId: 'investigation.privacy.input', retentionEffect: 'deliberate_local_file', ...investigationConsumerCommon,
297
+ },
298
+ {
299
+ id: 'investigation.consumer.capsule-compose', plane: 'shared', operation: 'compose-and-verify-capsule',
300
+ acceptedContracts: [
301
+ { schema: LOOKUP_ASSET_GRAPH_SCHEMA, versions: [LOOKUP_ASSET_GRAPH_VERSION], mode: 'embedded' },
302
+ { schema: INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA, versions: [INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION], mode: 'embedded' },
303
+ { schema: LOOKUP_INVESTIGATION_BRIEF_SCHEMA, versions: [...SUPPORTED_LOOKUP_INVESTIGATION_BRIEF_VERSIONS], mode: 'embedded' },
304
+ ],
305
+ emittedContract: { schema: INVESTIGATION_CAPSULE_SCHEMA, version: INVESTIGATION_CAPSULE_VERSION },
306
+ shapeIds: ['investigation.asset-graph.v2', 'investigation.analyst-records.v1', 'investigation.brief.v1', 'investigation.brief.v2', 'investigation.capsule.v2-v3'],
307
+ boundProfileIds: ['investigation.portable.bounds', 'investigation.brief.bounds', 'investigation.derived.bounds'],
308
+ hookIds: ['investigation.capsule.build', 'investigation.capsule.verify', 'investigation.capsule.serialise'],
309
+ serialisationProfileId: 'investigation.capsule.json.v2-v3',
310
+ privacyProfileId: 'investigation.privacy.output', retentionEffect: 'operator_controlled_output', ...investigationConsumerCommon,
311
+ },
312
+ ...[
313
+ ['investigation.consumer.acquisition-build', ACQUISITION_DECISION_PACKET_SCHEMA, ACQUISITION_DECISION_PACKET_VERSION, 'investigation.acquisition.v2', 'investigation.acquisition.build', 'investigation.portable.bounds'],
314
+ ['investigation.consumer.passport-build', LOOKUP_CLAIM_PASSPORT_SCHEMA, LOOKUP_CLAIM_PASSPORT_VERSION, 'investigation.claim-passport.v1', 'investigation.passport.build', 'investigation.passport.bounds'],
315
+ ['investigation.consumer.domain-comparison-build', BULK_DOMAIN_COMPARISON_SCHEMA, BULK_DOMAIN_COMPARISON_EXPORT_VERSION, 'investigation.domain-comparison.v4', 'investigation.domain-comparison.build', 'investigation.portable.bounds'],
316
+ ['investigation.consumer.mail-exposure-build', BULK_MAIL_EXPOSURE_SCHEMA, BULK_MAIL_EXPOSURE_EXPORT_VERSION, 'investigation.mail-exposure.v2', 'investigation.mail-exposure.build', 'investigation.portable.bounds'],
317
+ ['investigation.consumer.bulk-review-build', BULK_REVIEW_MANIFEST_SCHEMA, BULK_REVIEW_MANIFEST_VERSION, 'investigation.bulk-review.v2', 'investigation.bulk-review.build', 'investigation.portable.bounds'],
318
+ ['investigation.consumer.graph-build', LOOKUP_ASSET_GRAPH_SCHEMA, LOOKUP_ASSET_GRAPH_VERSION, 'investigation.asset-graph.v2', 'investigation.graph.build', 'investigation.derived.bounds'],
319
+ ['investigation.consumer.analyst-records-project', INVESTIGATION_CAPSULE_ANALYST_RECORDS_SCHEMA, INVESTIGATION_CAPSULE_ANALYST_RECORDS_VERSION, 'investigation.analyst-records.v1', 'investigation.capsule.build', 'investigation.derived.bounds'],
320
+ ['investigation.consumer.brief-build', LOOKUP_INVESTIGATION_BRIEF_SCHEMA, LOOKUP_INVESTIGATION_BRIEF_VERSION, 'investigation.brief.v2', 'investigation.brief.build', 'investigation.brief.bounds'],
321
+ ].map(([id, schema, version, shapeId, hookId, boundProfileId]) => ({
322
+ id, plane: 'shared', operation: 'build-current-projection', acceptedContracts: [],
323
+ emittedContract: { schema, version }, shapeIds: [shapeId], boundProfileIds: [boundProfileId],
324
+ hookIds: [hookId], serialisationProfileId: null,
325
+ privacyProfileId: 'investigation.privacy.output', retentionEffect: 'operator_controlled_output',
326
+ ...investigationConsumerCommon,
327
+ })),
328
+ ],
329
+ consumerRelationships: [],
330
+ },
331
+ });
@@ -0,0 +1,160 @@
1
+ import { defineSchemaCompatibility } from "./schema-compatibility.mjs";
2
+ import { defineSchemaLifecycleFamily } from "./schema-lifecycle.mjs";
3
+ export const OFFLINE_COMPARISON_CONTRACT_OWNER = 'packages/contracts/offline-comparison.mts';
4
+ export const MAX_OFFLINE_COMPARISON_INPUT_BYTES = 8 * 1024 * 1024;
5
+ export const PAGE_COMPARISON_VERSION = 3;
6
+ export const CLI_PAGE_COMPARE_SCHEMA = 'whoisleuth.cli.page-compare';
7
+ export const CLI_PAGE_COMPARE_VERSION = 4;
8
+ export const SUPPORTED_CLI_PAGE_COMPARE_VERSIONS = Object.freeze([CLI_PAGE_COMPARE_VERSION]);
9
+ export const CLI_COMPARISON_LEDGER_SCHEMA = 'whoisleuth.cli.comparison-ledger';
10
+ export const CLI_COMPARISON_LEDGER_VERSION = 1;
11
+ export const MAX_RETAINED_ARTIFACT_DIFF_BYTES = 8 * 1024 * 1024;
12
+ export const RELATIONSHIP_EVIDENCE_SCHEMA = 'whoisleuth.relationship-evidence';
13
+ export const RELATIONSHIP_EVIDENCE_VERSION = 2;
14
+ export const TLS_RELATIONSHIP_PROFILE_VERSION = 2;
15
+ export const SUPPORTED_TLS_RELATIONSHIP_PROFILE_VERSIONS = Object.freeze([TLS_RELATIONSHIP_PROFILE_VERSION]);
16
+ export const OFFLINE_COMPARISON_COMPATIBILITY_FACADES = Object.freeze([
17
+ ['frontend/src/lib/analysis/comparison-ledger-bulk.ts', 'packages/comparison/comparison-ledger-bulk.mts'],
18
+ ['frontend/src/lib/analysis/comparison-ledger-contract.ts', 'packages/comparison/comparison-ledger-contract.mts'],
19
+ ['frontend/src/lib/analysis/comparison-ledger-json.ts', 'packages/comparison/comparison-ledger-json.mts'],
20
+ ['frontend/src/lib/analysis/comparison-ledger-serialization.ts', 'packages/comparison/comparison-ledger-serialization.mts'],
21
+ ['frontend/src/lib/analysis/page-similarity.ts', 'packages/comparison/page-similarity.mts'],
22
+ ['frontend/src/lib/analysis/relationship-evidence.ts', 'packages/comparison/relationship-evidence.mts'],
23
+ ]);
24
+ export const CLI_PAGE_COMPARE_COMPATIBILITY = defineSchemaCompatibility({
25
+ id: 'cli.page-compare', kind: 'cli_document', schema: CLI_PAGE_COMPARE_SCHEMA,
26
+ currentVersion: CLI_PAGE_COMPARE_VERSION, supportedVersions: SUPPORTED_CLI_PAGE_COMPARE_VERSIONS,
27
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'not_applicable', migration: 'read_only', writeSemantics: 'read_only',
28
+ byteBudget: MAX_OFFLINE_COMPARISON_INPUT_BYTES, owner: OFFLINE_COMPARISON_CONTRACT_OWNER,
29
+ note: 'Offline comparison of two bounded deep-lookup page identity, technology, favicon, TLS, and response observations; version 3 withholds technology equality for partial sets and version 4 also withholds TLS issuer and public-key conclusions for partial TLS evidence.',
30
+ });
31
+ export const CLI_COMPARISON_LEDGER_COMPATIBILITY = defineSchemaCompatibility({
32
+ id: 'cli.comparison-ledger', kind: 'cli_document', schema: CLI_COMPARISON_LEDGER_SCHEMA,
33
+ currentVersion: CLI_COMPARISON_LEDGER_VERSION, supportedVersions: [CLI_COMPARISON_LEDGER_VERSION],
34
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'not_applicable', migration: 'read_only', writeSemantics: 'read_only',
35
+ byteBudget: MAX_RETAINED_ARTIFACT_DIFF_BYTES * 2, owner: OFFLINE_COMPARISON_CONTRACT_OWNER,
36
+ note: 'Value-free bounded index plus on-demand exact rows for explicitly paired retained Bulk sessions or domain-portfolio reviews.',
37
+ });
38
+ export const OFFLINE_COMPARISON_COMPATIBILITY = Object.freeze([
39
+ CLI_PAGE_COMPARE_COMPATIBILITY,
40
+ CLI_COMPARISON_LEDGER_COMPATIBILITY,
41
+ ]);
42
+ const OFFLINE_COMPARISON_FIXTURES = Object.freeze([
43
+ { id: 'cli-page-compare-v4', path: 'test/fixtures/offline-comparison/cli-page-compare-v4.json', bytes: 5_059, sha256: '12bff7f46b852778f0f38926159083f37c34038ccdbbf8c4fc904ce03482360c', schema: CLI_PAGE_COMPARE_SCHEMA, version: 4, role: 'current', expectation: 'accepted_exact', shapeId: 'offline-comparison.page-output.current' },
44
+ { id: 'cli-comparison-ledger-v1', path: 'test/fixtures/offline-comparison/cli-comparison-ledger-v1.json', bytes: 6_820, sha256: '861a733500dede0af9f2551d94db66dc51b0a2fbdb68e377a71fd4661a51530b', schema: CLI_COMPARISON_LEDGER_SCHEMA, version: 1, role: 'current', expectation: 'accepted_exact', shapeId: 'offline-comparison.ledger-output.current' },
45
+ ].map((fixture) => Object.freeze({
46
+ ...fixture,
47
+ contentDigestSha256: null,
48
+ expectedOutputFixtureId: null,
49
+ scope: 'repository',
50
+ })));
51
+ function offlineFixtureIds(schema, version) {
52
+ return Object.freeze(OFFLINE_COMPARISON_FIXTURES
53
+ .filter((fixture) => fixture.schema === schema && fixture.version === version)
54
+ .map((fixture) => fixture.id));
55
+ }
56
+ const OFFLINE_COMPARISON_CONTRACTS = Object.freeze([
57
+ ...SUPPORTED_CLI_PAGE_COMPARE_VERSIONS.map((version) => Object.freeze({
58
+ compatibilityId: CLI_PAGE_COMPARE_COMPATIBILITY.id,
59
+ schema: CLI_PAGE_COMPARE_SCHEMA,
60
+ version,
61
+ role: 'document',
62
+ lifecycle: version === CLI_PAGE_COMPARE_VERSION ? 'current' : 'retired',
63
+ readable: false,
64
+ emitted: version === CLI_PAGE_COMPARE_VERSION,
65
+ exactKeys: true,
66
+ extensionPolicy: 'reject',
67
+ futureVersionBehaviour: 'not_applicable',
68
+ migrationTarget: null,
69
+ canonicalisation: null,
70
+ byteBudget: MAX_OFFLINE_COMPARISON_INPUT_BYTES,
71
+ fixtureIds: offlineFixtureIds(CLI_PAGE_COMPARE_SCHEMA, version),
72
+ })),
73
+ Object.freeze({
74
+ compatibilityId: CLI_COMPARISON_LEDGER_COMPATIBILITY.id,
75
+ schema: CLI_COMPARISON_LEDGER_SCHEMA,
76
+ version: CLI_COMPARISON_LEDGER_VERSION,
77
+ role: 'document',
78
+ lifecycle: 'current',
79
+ readable: false,
80
+ emitted: true,
81
+ exactKeys: true,
82
+ extensionPolicy: 'reject',
83
+ futureVersionBehaviour: 'not_applicable',
84
+ migrationTarget: null,
85
+ canonicalisation: null,
86
+ byteBudget: MAX_RETAINED_ARTIFACT_DIFF_BYTES * 2,
87
+ fixtureIds: offlineFixtureIds(CLI_COMPARISON_LEDGER_SCHEMA, CLI_COMPARISON_LEDGER_VERSION),
88
+ }),
89
+ ]);
90
+ function offlineOutputShape(id, schema, versions, requiredKeys) {
91
+ return Object.freeze({
92
+ id,
93
+ schema,
94
+ versions,
95
+ objects: [{ path: '$', requiredKeys, optionalKeys: [], alternativeRequiredKeys: [], unknownKeys: 'reject' }],
96
+ fixedArrays: [],
97
+ normalisation: 'preserve_document',
98
+ target: null,
99
+ discriminator: null,
100
+ });
101
+ }
102
+ const offlineConsumerCommon = Object.freeze({
103
+ expiryPolicyId: 'offline-comparison.expiry.not-applicable',
104
+ requestMode: 'none',
105
+ retentionEffect: 'transient_report',
106
+ bindingState: 'declared_unenforced',
107
+ policyState: 'current',
108
+ });
109
+ export const OFFLINE_COMPARISON_LIFECYCLE_FAMILY = defineSchemaLifecycleFamily({
110
+ id: 'offline-comparison',
111
+ owner: OFFLINE_COMPARISON_CONTRACT_OWNER,
112
+ privacy: 'analyst_authored_sensitive',
113
+ compatibility: OFFLINE_COMPARISON_COMPATIBILITY,
114
+ contracts: OFFLINE_COMPARISON_CONTRACTS,
115
+ fixtures: OFFLINE_COMPARISON_FIXTURES,
116
+ metadata: {
117
+ metadataVersion: 4,
118
+ enforcement: 'declarative_only',
119
+ shapes: [
120
+ offlineOutputShape('offline-comparison.page-output.current', CLI_PAGE_COMPARE_SCHEMA, [4], ['schema', 'version', 'generatedAt', 'left', 'right', 'page', 'technology', 'tls', 'limitations']),
121
+ offlineOutputShape('offline-comparison.ledger-output.current', CLI_COMPARISON_LEDGER_SCHEMA, [1], ['schema', 'version', 'generatedAt', 'artifactFamily', 'left', 'right', 'index', 'details', 'limitations']),
122
+ ],
123
+ boundProfiles: [
124
+ { id: 'offline-comparison.page.bounds', bounds: [
125
+ { id: 'serialised-bytes', path: '$', phase: 'serialised', unit: 'bytes', minimum: 1, maximum: MAX_OFFLINE_COMPARISON_INPUT_BYTES, handling: 'reject' },
126
+ ] },
127
+ { id: 'offline-comparison.ledger.bounds', bounds: [
128
+ { id: 'serialised-bytes', path: '$', phase: 'serialised', unit: 'bytes', minimum: 1, maximum: MAX_RETAINED_ARTIFACT_DIFF_BYTES * 2, handling: 'reject' },
129
+ ] },
130
+ ],
131
+ hooks: [
132
+ { id: 'offline-comparison.page.build', role: 'builder', runtime: 'cli', module: 'cli/page-compare.mts', exportName: 'buildCliPageComparison' },
133
+ { id: 'offline-comparison.ledger.build', role: 'builder', runtime: 'cli', module: 'cli/retained-artifact-diff.mts', exportName: 'buildCliRetainedArtifactDiff' },
134
+ { id: 'offline-comparison.json.serialise', role: 'serialiser', runtime: 'cli', module: 'cli/formatters/json.mts', exportName: 'formatJsonDocument' },
135
+ ],
136
+ serialisationProfiles: [
137
+ { id: 'offline-comparison.page.json.v4', schema: CLI_PAGE_COMPARE_SCHEMA, versions: [CLI_PAGE_COMPARE_VERSION], mediaType: 'application/json', encoding: 'utf-8', bom: false, indentSpaces: 2, terminalLf: true, propertyOrder: 'normalised_fixed', canonicalisation: null, integrity: 'none', serializerHookId: 'offline-comparison.json.serialise', verifierHookIds: [] },
138
+ { id: 'offline-comparison.ledger.json.v1', schema: CLI_COMPARISON_LEDGER_SCHEMA, versions: [CLI_COMPARISON_LEDGER_VERSION], mediaType: 'application/json', encoding: 'utf-8', bom: false, indentSpaces: 2, terminalLf: true, propertyOrder: 'normalised_fixed', canonicalisation: null, integrity: 'none', serializerHookId: 'offline-comparison.json.serialise', verifierHookIds: [] },
139
+ ],
140
+ privacyProfiles: [{ id: 'offline-comparison.privacy.output', classification: 'analyst_authored_sensitive', projection: 'review_output', includedCategories: ['bounded-comparison-states', 'source-completeness', 'limitations'], excludedCategories: ['input-paths', 'raw-upstream-payloads', 'expanded-contacts', 'credentials', 'cookies', 'query-bearing-urls'], notePolicy: 'not_applicable', retention: 'transient_report', network: 'none', sharingReview: 'not_applicable' }],
141
+ expiryProfiles: [{ id: 'offline-comparison.expiry.not-applicable', field: null, anchor: null, handling: 'not_applicable', phase: 'not_applicable', maximumLifetimeDays: null }],
142
+ consumerEdges: [
143
+ {
144
+ id: 'offline-comparison.consumer.page-output', plane: 'cli', operation: 'build-current-page-comparison', acceptedContracts: [],
145
+ emittedContract: { schema: CLI_PAGE_COMPARE_SCHEMA, version: CLI_PAGE_COMPARE_VERSION, discriminator: null },
146
+ shapeIds: ['offline-comparison.page-output.current'], boundProfileIds: ['offline-comparison.page.bounds'],
147
+ hookIds: ['offline-comparison.page.build', 'offline-comparison.json.serialise'], serialisationProfileId: 'offline-comparison.page.json.v4',
148
+ privacyProfileId: 'offline-comparison.privacy.output', ...offlineConsumerCommon,
149
+ },
150
+ {
151
+ id: 'offline-comparison.consumer.ledger-output', plane: 'cli', operation: 'build-current-comparison-ledger', acceptedContracts: [],
152
+ emittedContract: { schema: CLI_COMPARISON_LEDGER_SCHEMA, version: CLI_COMPARISON_LEDGER_VERSION, discriminator: null },
153
+ shapeIds: ['offline-comparison.ledger-output.current'], boundProfileIds: ['offline-comparison.ledger.bounds'],
154
+ hookIds: ['offline-comparison.ledger.build', 'offline-comparison.json.serialise'], serialisationProfileId: 'offline-comparison.ledger.json.v1',
155
+ privacyProfileId: 'offline-comparison.privacy.output', ...offlineConsumerCommon,
156
+ },
157
+ ],
158
+ consumerRelationships: [],
159
+ },
160
+ });