@slicedearth/whoisleuth-cli 2.0.0 → 2.1.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 (97) hide show
  1. package/cli/arguments.mjs +21 -5
  2. package/cli/artifact-validation/case-response.mjs +771 -0
  3. package/cli/artifact-validation/investigation-capsule.mjs +426 -0
  4. package/cli/artifact-validation/lookup-evidence.mjs +718 -0
  5. package/cli/artifact-validation/signed-review.mjs +598 -0
  6. package/cli/artifact-validation/structure-primitives.mjs +105 -0
  7. package/cli/artifact-verify.mjs +1 -1
  8. package/cli/assurance-command-runner.mjs +324 -0
  9. package/cli/command-reference.mjs +1175 -843
  10. package/cli/completion.mjs +56 -9
  11. package/cli/discriminated-command-handlers.mjs +11 -0
  12. package/cli/doctor.mjs +2 -2
  13. package/cli/evidence-command-runner.mjs +41 -31
  14. package/cli/export-evidence.mjs +1 -1
  15. package/cli/fail-policy.mjs +33 -8
  16. package/cli/formatters/terminal-command-formats.mjs +437 -0
  17. package/cli/formatters/terminal-lookup.mjs +758 -0
  18. package/cli/formatters/terminal-metadata.mjs +58 -0
  19. package/cli/formatters/terminal-shared.mjs +83 -0
  20. package/cli/formatters/terminal.mjs +5 -1232
  21. package/cli/history-command-runner.mjs +132 -0
  22. package/cli/inline-command-families.mjs +45 -0
  23. package/cli/inline-command-runner.mjs +55 -0
  24. package/cli/investigation-plan.mjs +9 -2
  25. package/cli/investigation-run.mjs +114 -9
  26. package/cli/lookup-brief.mjs +141 -23
  27. package/cli/lookup-browser-view.mjs +289 -0
  28. package/cli/lookup-browser.mjs +3 -288
  29. package/cli/mail-review.mjs +2 -6
  30. package/cli/offline-artifact-validation.mjs +19 -0
  31. package/cli/review-command-runner.mjs +269 -0
  32. package/cli/runner.mjs +15 -972
  33. package/cli/saved-lookup.mjs +19 -2
  34. package/cli/support-command-runner.mjs +229 -0
  35. package/cli/workflow-command-runner.mjs +129 -0
  36. package/docs/cli-reference.md +17 -10
  37. package/docs/cli.md +5 -3
  38. package/lib/availability.mjs +12 -9
  39. package/lib/bounded-contract-normalizers.mjs +2 -9
  40. package/lib/browser-library-profile.mjs +1 -2
  41. package/lib/client-behavior-profile.mjs +1 -2
  42. package/lib/credential-surface-profile.mjs +1 -1
  43. package/lib/domain-posture-analysis.mjs +10 -1
  44. package/lib/domain-posture.mjs +51 -23
  45. package/lib/evidence-export.mjs +46 -5
  46. package/lib/evidence-report-markdown.mjs +4 -0
  47. package/lib/evidence-report.mjs +50 -0
  48. package/lib/generated/cisa-kev-catalog.mjs +34 -4
  49. package/lib/generated/registrar-standing-catalogue.mjs +367 -0
  50. package/lib/json-record.mjs +12 -0
  51. package/lib/lookup-child-profile-contract.mjs +858 -0
  52. package/lib/lookup-contract-primitives.mjs +98 -0
  53. package/lib/lookup-diagnostics.mjs +96 -0
  54. package/lib/lookup-network-evidence-bounds.mjs +1 -0
  55. package/lib/lookup-response.mjs +367 -0
  56. package/lib/lookup.mjs +28 -443
  57. package/lib/page-role-profile.mjs +1 -3
  58. package/lib/project-metadata.mjs +1 -1
  59. package/lib/registrar-standing-catalogue-contract.mjs +70 -0
  60. package/lib/registrar-standing-contract.mjs +300 -0
  61. package/lib/registrar-standing.mjs +269 -0
  62. package/lib/registry-insights.mjs +2 -8
  63. package/lib/risk-scoring.mjs +26 -10
  64. package/lib/sslbl-certificates.generated.mjs +138 -136
  65. package/lib/structured-data-identity.mjs +1 -3
  66. package/lib/technology-evidence-role.mjs +51 -0
  67. package/lib/threat-intelligence-runtime.mjs +3 -3
  68. package/lib/threat-intelligence-types.mjs +13 -0
  69. package/lib/threatfox-intelligence.mjs +1 -3
  70. package/lib/tls-intelligence.mjs +1 -2
  71. package/lib/urlhaus-intelligence.mjs +1 -3
  72. package/lib/urlscan-intelligence.mjs +1 -3
  73. package/lib/website-security-posture.mjs +1 -2
  74. package/lib/website-technology.mjs +72 -23
  75. package/lib/whois-common-formats.mjs +276 -0
  76. package/lib/whois-dialects.mjs +534 -0
  77. package/lib/whois-parser-support.mjs +305 -0
  78. package/lib/whois-parser.mjs +135 -0
  79. package/lib/whois.mjs +6 -1187
  80. package/package.json +3 -3
  81. package/packages/cases/case-evidence-model.mjs +9 -0
  82. package/packages/cases/case-migration-model.mjs +17 -11
  83. package/packages/cases/case-response-model.mjs +13 -9
  84. package/packages/cases/case-response-packet.mjs +297 -112
  85. package/packages/comparison/page-similarity.mjs +23 -0
  86. package/packages/contracts/case-portability.mjs +227 -63
  87. package/packages/contracts/cli-lookup.mjs +4 -3
  88. package/packages/contracts/domain-control-manifest.mjs +1 -1
  89. package/packages/contracts/investigation-portability.mjs +1 -1
  90. package/packages/contracts/risk-calibration.mjs +2 -2
  91. package/packages/contracts/workspace-portability.mjs +34 -6
  92. package/packages/investigation/evidence-coverage-ledger.mjs +21 -0
  93. package/packages/investigation/lookup-claim-readiness.mjs +2 -2
  94. package/packages/workspace/brand-profile-model.mjs +1 -1
  95. package/packages/workspace/website-snapshot-model.mjs +79 -6
  96. package/third-party-notices.txt +1 -1
  97. package/cli/artifact-structure.mjs +0 -2507
@@ -2,7 +2,9 @@ import { MAX_DOMAIN_NAME_LENGTH } from "./domain-name.mjs";
2
2
  import { defineSchemaCompatibility } from "./schema-compatibility.mjs";
3
3
  import { defineSchemaLifecycleFamily } from "./schema-lifecycle.mjs";
4
4
  export const CASE_CONTRACT_OWNER = 'packages/contracts/case-portability.mts';
5
+ export const LATEST_PUBLIC_APPLICATION_VERSION = '2.0.1';
5
6
  export const CASE_PORTABILITY_IDENTITY_CONSTANTS = Object.freeze([
7
+ 'LATEST_PUBLIC_APPLICATION_VERSION',
6
8
  'CASE_BROWSER_STORE_LIFECYCLE_SCHEMA',
7
9
  'CASE_EXPORT_LIFECYCLE_SCHEMA',
8
10
  'CASE_SCHEMA_VERSION',
@@ -17,6 +19,7 @@ export const CASE_PORTABILITY_IDENTITY_CONSTANTS = Object.freeze([
17
19
  'SUPPORTED_CASE_RESPONSE_PACKET_VERSIONS',
18
20
  'CASE_RESPONSE_REVIEW_INPUTS_SCHEMA',
19
21
  'CASE_RESPONSE_REVIEW_INPUTS_VERSION',
22
+ 'SUPPORTED_CASE_RESPONSE_REVIEW_INPUTS_VERSIONS',
20
23
  'CLI_CASE_PACK_SCHEMA',
21
24
  'CLI_CASE_PACK_VERSION',
22
25
  'SUPPORTED_CLI_CASE_PACK_VERSIONS',
@@ -122,20 +125,39 @@ export const CASE_DOMAIN_RUNTIME_ADAPTERS = Object.freeze([
122
125
  export const CASE_BROWSER_STORE_LIFECYCLE_SCHEMA = 'whoisleuth.browser.case-store';
123
126
  export const CASE_EXPORT_LIFECYCLE_SCHEMA = 'whoisleuth.case-export';
124
127
  export const PUBLIC_CASE_SCHEMA_VERSION = 12;
125
- export const CASE_SCHEMA_VERSION = 13;
126
- export const CASE_BROWSER_SUPPORTED_VERSIONS = Object.freeze([PUBLIC_CASE_SCHEMA_VERSION, CASE_SCHEMA_VERSION]);
128
+ export const PUBLISHED_V2_CASE_SCHEMA_VERSION = 13;
129
+ export const CASE_SCHEMA_VERSION = 14;
130
+ export const CASE_BROWSER_SUPPORTED_VERSIONS = Object.freeze([
131
+ PUBLIC_CASE_SCHEMA_VERSION,
132
+ PUBLISHED_V2_CASE_SCHEMA_VERSION,
133
+ CASE_SCHEMA_VERSION,
134
+ ]);
127
135
  export const CASE_IMPORT_VERSIONS = CASE_BROWSER_SUPPORTED_VERSIONS;
128
136
  export const CASE_REPORT_SCHEMA = 'whoisleuth.case-report';
129
137
  export const PUBLIC_CASE_REPORT_SCHEMA_VERSION = 8;
130
- export const CASE_REPORT_SCHEMA_VERSION = 9;
131
- export const CASE_REPORT_OUTPUT_VERSIONS = Object.freeze([CASE_REPORT_SCHEMA_VERSION]);
138
+ export const PUBLISHED_V2_CASE_REPORT_SCHEMA_VERSION = 9;
139
+ export const CASE_REPORT_SCHEMA_VERSION = 10;
140
+ export const CASE_REPORT_OUTPUT_VERSIONS = Object.freeze([
141
+ PUBLISHED_V2_CASE_REPORT_SCHEMA_VERSION,
142
+ CASE_REPORT_SCHEMA_VERSION,
143
+ ]);
132
144
  export const CASE_RESPONSE_PACKET_SCHEMA = 'whoisleuth.case-response-packet';
133
145
  export const PUBLIC_CASE_RESPONSE_PACKET_VERSION = 6;
134
- export const CASE_RESPONSE_PACKET_VERSION = 7;
135
- export const CASE_RESPONSE_PACKET_OUTPUT_VERSIONS = Object.freeze([PUBLIC_CASE_RESPONSE_PACKET_VERSION, CASE_RESPONSE_PACKET_VERSION]);
146
+ export const PUBLISHED_V2_CASE_RESPONSE_PACKET_VERSION = 7;
147
+ export const CASE_RESPONSE_PACKET_VERSION = 8;
148
+ export const CASE_RESPONSE_PACKET_OUTPUT_VERSIONS = Object.freeze([
149
+ PUBLIC_CASE_RESPONSE_PACKET_VERSION,
150
+ PUBLISHED_V2_CASE_RESPONSE_PACKET_VERSION,
151
+ CASE_RESPONSE_PACKET_VERSION,
152
+ ]);
136
153
  export const SUPPORTED_CASE_RESPONSE_PACKET_VERSIONS = CASE_RESPONSE_PACKET_OUTPUT_VERSIONS;
137
154
  export const CASE_RESPONSE_REVIEW_INPUTS_SCHEMA = 'whoisleuth.case-response-review-inputs';
138
- export const CASE_RESPONSE_REVIEW_INPUTS_VERSION = 1;
155
+ export const PUBLISHED_V2_CASE_RESPONSE_REVIEW_INPUTS_VERSION = 1;
156
+ export const CASE_RESPONSE_REVIEW_INPUTS_VERSION = 2;
157
+ export const SUPPORTED_CASE_RESPONSE_REVIEW_INPUTS_VERSIONS = Object.freeze([
158
+ PUBLISHED_V2_CASE_RESPONSE_REVIEW_INPUTS_VERSION,
159
+ CASE_RESPONSE_REVIEW_INPUTS_VERSION,
160
+ ]);
139
161
  export const CLI_CASE_PACK_SCHEMA = 'whoisleuth.cli.case-pack';
140
162
  export const CLI_CASE_PACK_VERSION = 2;
141
163
  export const SUPPORTED_CLI_CASE_PACK_VERSIONS = Object.freeze([CLI_CASE_PACK_VERSION]);
@@ -152,6 +174,7 @@ export const CLI_CASE_PACK_LIMITATIONS = Object.freeze([
152
174
  ]);
153
175
  export const CLI_CASE_PACK_CASE_REPORT_EPOCHS = Object.freeze([
154
176
  Object.freeze({ caseVersions: Object.freeze([PUBLIC_CASE_SCHEMA_VERSION]), reportVersions: Object.freeze([PUBLIC_CASE_REPORT_SCHEMA_VERSION]) }),
177
+ Object.freeze({ caseVersions: Object.freeze([PUBLISHED_V2_CASE_SCHEMA_VERSION]), reportVersions: Object.freeze([PUBLISHED_V2_CASE_REPORT_SCHEMA_VERSION]) }),
155
178
  Object.freeze({ caseVersions: Object.freeze([CASE_SCHEMA_VERSION]), reportVersions: Object.freeze([CASE_REPORT_SCHEMA_VERSION]) }),
156
179
  ]);
157
180
  export function caseReportVersionMatchesCase(caseVersion, reportVersion) {
@@ -162,8 +185,13 @@ export function caseReportVersionMatchesCase(caseVersion, reportVersion) {
162
185
  }
163
186
  export const WORKSPACE_ARCHIVE_SCHEMA = 'whoisleuth.workspace-archive';
164
187
  export const PUBLIC_WORKSPACE_ARCHIVE_VERSION = 5;
165
- export const WORKSPACE_ARCHIVE_VERSION = 6;
166
- export const SUPPORTED_WORKSPACE_ARCHIVE_VERSIONS = Object.freeze([PUBLIC_WORKSPACE_ARCHIVE_VERSION, WORKSPACE_ARCHIVE_VERSION]);
188
+ export const PUBLISHED_V2_WORKSPACE_ARCHIVE_VERSION = 6;
189
+ export const WORKSPACE_ARCHIVE_VERSION = 7;
190
+ export const SUPPORTED_WORKSPACE_ARCHIVE_VERSIONS = Object.freeze([
191
+ PUBLIC_WORKSPACE_ARCHIVE_VERSION,
192
+ PUBLISHED_V2_WORKSPACE_ARCHIVE_VERSION,
193
+ WORKSPACE_ARCHIVE_VERSION,
194
+ ]);
167
195
  export function isSupportedWorkspaceArchiveVersion(value) {
168
196
  return typeof value === 'number'
169
197
  && Number.isSafeInteger(value)
@@ -275,49 +303,49 @@ export const CASE_BROWSER_COMPATIBILITY = defineSchemaCompatibility({
275
303
  supportedVersions: CASE_BROWSER_SUPPORTED_VERSIONS, acceptsUnversionedLegacy: false,
276
304
  futureVersionBehavior: 'preserve_without_write', migration: 'normalize_to_current',
277
305
  writeSemantics: 'normalized_rewrite', byteBudget: MAX_CASE_STORE_BYTES, owner: CASE_CONTRACT_OWNER,
278
- note: 'The exact public version 12 writer migrates directly to version 13; other retired and all future stores remain untouched.',
306
+ note: 'Exact Case versions 12 and 13 migrate directly to current version 14; other retired stores are rejected and future stores remain untouched.',
279
307
  });
280
308
  export const CASE_EXPORT_COMPATIBILITY = defineSchemaCompatibility({
281
309
  id: 'export.cases', kind: 'export', schema: null, currentVersion: CASE_SCHEMA_VERSION,
282
310
  supportedVersions: CASE_IMPORT_VERSIONS, acceptsUnversionedLegacy: false,
283
311
  futureVersionBehavior: 'reject', migration: 'normalize_to_current',
284
312
  writeSemantics: 'non_destructive_merge', byteBudget: MAX_CASE_IMPORT_BYTES, owner: CASE_CONTRACT_OWNER,
285
- note: 'Exact public Case version 12 and current version 13 merge non-destructively through one bounded reader; other versions fail without mutation.',
313
+ note: 'Exact Case versions 12, 13 and 14 merge non-destructively through one bounded reader; other versions fail without mutation.',
286
314
  });
287
315
  export const CASE_REPORT_COMPATIBILITY = defineSchemaCompatibility({
288
316
  id: 'export.case-report', kind: 'export', schema: CASE_REPORT_SCHEMA, currentVersion: CASE_REPORT_SCHEMA_VERSION,
289
317
  supportedVersions: CASE_REPORT_OUTPUT_VERSIONS, acceptsUnversionedLegacy: false,
290
- futureVersionBehavior: 'not_applicable', migration: 'read_only', writeSemantics: 'read_only',
318
+ futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
291
319
  byteBudget: null, owner: CASE_CONTRACT_OWNER,
292
- note: 'Case report version 9 is the durable output contract; retired and future report versions are unsupported.',
320
+ note: 'Published Case report version 9 and current version 10 are exact readable output contracts; retired and future report versions are unsupported.',
293
321
  });
294
322
  export const CASE_RESPONSE_PACKET_COMPATIBILITY = defineSchemaCompatibility({
295
323
  id: 'export.case-response-packet', kind: 'export', schema: CASE_RESPONSE_PACKET_SCHEMA,
296
324
  currentVersion: CASE_RESPONSE_PACKET_VERSION, supportedVersions: CASE_RESPONSE_PACKET_OUTPUT_VERSIONS,
297
325
  acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only',
298
326
  writeSemantics: 'read_only', byteBudget: null, owner: CASE_CONTRACT_OWNER,
299
- note: 'Exact public packet version 6 and current version 7 are verified independently; other versions fail closed.',
327
+ note: 'Exact packet versions 6, 7 and 8 are verified independently; other versions fail closed.',
300
328
  });
301
329
  export const CASE_RESPONSE_REVIEW_INPUTS_COMPATIBILITY = defineSchemaCompatibility({
302
330
  id: 'derived.case-response-review-inputs', kind: 'derived', schema: CASE_RESPONSE_REVIEW_INPUTS_SCHEMA,
303
- currentVersion: CASE_RESPONSE_REVIEW_INPUTS_VERSION, supportedVersions: [CASE_RESPONSE_REVIEW_INPUTS_VERSION],
304
- acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'exact_current_only',
331
+ currentVersion: CASE_RESPONSE_REVIEW_INPUTS_VERSION, supportedVersions: SUPPORTED_CASE_RESPONSE_REVIEW_INPUTS_VERSIONS,
332
+ acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'read_only',
305
333
  writeSemantics: 'read_only', byteBudget: null, owner: CASE_CONTRACT_OWNER,
306
- note: 'Exact bounded review inputs are canonicalised with sorted-json-v2 for one response authorisation digest and reject extensions or future versions.',
334
+ note: 'Exact published review-input version 1 and current version 2 remain independently readable for response authorisation; extensions and future versions fail closed.',
307
335
  });
308
336
  export const CLI_CASE_PACK_COMPATIBILITY = defineSchemaCompatibility({
309
337
  id: 'export.cli-case-pack', kind: 'export', schema: CLI_CASE_PACK_SCHEMA, currentVersion: CLI_CASE_PACK_VERSION,
310
338
  supportedVersions: SUPPORTED_CLI_CASE_PACK_VERSIONS, acceptsUnversionedLegacy: false,
311
339
  futureVersionBehavior: 'reject', migration: 'read_only', writeSemantics: 'read_only',
312
340
  byteBudget: MAX_CASE_IMPORT_BYTES, owner: CASE_CONTRACT_OWNER,
313
- note: 'Case-pack version 2 verifies the exact public Case 12/report 8 epoch and the current Case 13/report 9 epoch with deterministic sorted-json-v2 integrity.',
341
+ note: 'Case-pack version 2 verifies exact Case/report epochs 12/8, 13/9 and 14/10 with deterministic sorted-json-v2 integrity.',
314
342
  });
315
343
  export const WORKSPACE_ARCHIVE_COMPATIBILITY = defineSchemaCompatibility({
316
344
  id: 'export.workspace-archive', kind: 'export', schema: WORKSPACE_ARCHIVE_SCHEMA,
317
345
  currentVersion: WORKSPACE_ARCHIVE_VERSION, supportedVersions: SUPPORTED_WORKSPACE_ARCHIVE_VERSIONS,
318
346
  acceptsUnversionedLegacy: false, futureVersionBehavior: 'reject', migration: 'normalize_to_current',
319
347
  writeSemantics: 'non_destructive_merge', byteBudget: MAX_WORKSPACE_ARCHIVE_BYTES, owner: CASE_CONTRACT_OWNER,
320
- note: 'Workspace envelope version 6 adds the bounded analyst Review Item lifecycle section. Exact version 5 remains readable and migrates to an empty review-state section without inventing decisions; future envelopes fail without mutation.',
348
+ note: 'Workspace version 7 carries the current Case contract. Exact versions 5 and 6 remain readable; version 5 gains an empty Review Item section without inventing decisions, and future envelopes fail without mutation.',
321
349
  });
322
350
  export const WORKSPACE_SETTINGS_COMPATIBILITY = defineSchemaCompatibility({
323
351
  id: 'export.workspace-settings-section', kind: 'export', schema: WORKSPACE_SETTINGS_SCHEMA,
@@ -363,7 +391,7 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
363
391
  version: PUBLIC_CASE_SCHEMA_VERSION,
364
392
  role: 'historical',
365
393
  expectation: 'normalises_to_current_output',
366
- expectedOutputFixtureId: 'browser-case-v13',
394
+ expectedOutputFixtureId: 'browser-case-v14',
367
395
  shapeId: 'case.browser-store.public',
368
396
  scope: 'repository',
369
397
  }),
@@ -374,6 +402,20 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
374
402
  sha256: 'd679030e52340ecc7795ac88de15316d88c8c07b94b34da60fd52589a0375712',
375
403
  contentDigestSha256: null,
376
404
  schema: CASE_BROWSER_STORE_LIFECYCLE_SCHEMA,
405
+ version: PUBLISHED_V2_CASE_SCHEMA_VERSION,
406
+ role: 'historical',
407
+ expectation: 'normalises_to_current_output',
408
+ expectedOutputFixtureId: 'browser-case-v14',
409
+ shapeId: 'case.browser-store.v13',
410
+ scope: 'repository',
411
+ }),
412
+ Object.freeze({
413
+ id: 'browser-case-v14',
414
+ path: 'test/fixtures/case-lifecycle/browser-case-v14.json',
415
+ bytes: 3131,
416
+ sha256: 'ece46f5d27a52a20196678af8236674836f3979c0d45f0ad5751c00677ec8bae',
417
+ contentDigestSha256: null,
418
+ schema: CASE_BROWSER_STORE_LIFECYCLE_SCHEMA,
377
419
  version: CASE_SCHEMA_VERSION,
378
420
  role: 'current',
379
421
  expectation: 'accepted_exact',
@@ -391,7 +433,7 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
391
433
  version: PUBLIC_CASE_SCHEMA_VERSION,
392
434
  role: 'historical',
393
435
  expectation: 'normalises_to_current_output',
394
- expectedOutputFixtureId: 'case-export-v13',
436
+ expectedOutputFixtureId: 'case-export-v14',
395
437
  shapeId: 'case.export.public',
396
438
  scope: 'repository',
397
439
  }),
@@ -402,6 +444,20 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
402
444
  sha256: 'fd2aa7623c2aaea385b952727ad74cf5af0f1ee21dc478c0e5c820a332376a0d',
403
445
  contentDigestSha256: null,
404
446
  schema: CASE_EXPORT_LIFECYCLE_SCHEMA,
447
+ version: PUBLISHED_V2_CASE_SCHEMA_VERSION,
448
+ role: 'historical',
449
+ expectation: 'normalises_to_current_output',
450
+ expectedOutputFixtureId: 'case-export-v14',
451
+ shapeId: 'case.export.v13',
452
+ scope: 'repository',
453
+ }),
454
+ Object.freeze({
455
+ id: 'case-export-v14',
456
+ path: 'test/fixtures/case-lifecycle/case-export-v14.json',
457
+ bytes: 3175,
458
+ sha256: '50cf1df53c3558852b712844d588d9eb955af858e160969d9a6af613c257feaf',
459
+ contentDigestSha256: null,
460
+ schema: CASE_EXPORT_LIFECYCLE_SCHEMA,
405
461
  version: CASE_SCHEMA_VERSION,
406
462
  role: 'current',
407
463
  expectation: 'accepted_exact',
@@ -430,11 +486,25 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
430
486
  sha256: 'd9903318123c63ae7a385f153286a5596585a401771c8def8149792b9b7b9326',
431
487
  contentDigestSha256: null,
432
488
  schema: CASE_REPORT_SCHEMA,
489
+ version: PUBLISHED_V2_CASE_REPORT_SCHEMA_VERSION,
490
+ role: 'historical',
491
+ expectation: 'accepted_exact',
492
+ expectedOutputFixtureId: null,
493
+ shapeId: 'case.report.v9',
494
+ scope: 'repository',
495
+ }),
496
+ Object.freeze({
497
+ id: 'case-report-v10',
498
+ path: 'test/fixtures/case-lifecycle/case-report-v10.json',
499
+ bytes: 4606,
500
+ sha256: '36c8b89bb1b335d923bd5035020ff47f89c88775e14d08af2d2eb2ee2f5cc03a',
501
+ contentDigestSha256: null,
502
+ schema: CASE_REPORT_SCHEMA,
433
503
  version: CASE_REPORT_SCHEMA_VERSION,
434
504
  role: 'current',
435
505
  expectation: 'accepted_exact',
436
506
  expectedOutputFixtureId: null,
437
- shapeId: 'case.report.v9',
507
+ shapeId: 'case.report.v10',
438
508
  scope: 'repository',
439
509
  }),
440
510
  Object.freeze({
@@ -444,11 +514,25 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
444
514
  sha256: '0ea150d920710b331839be0a0f995d4597a133ecb930ef850de1eecfca4d94e3',
445
515
  contentDigestSha256: 'sha256:fa5b7f079882dd72b15365d844937ae99e47f81465e79b3911c25e70c157e562',
446
516
  schema: CASE_RESPONSE_PACKET_SCHEMA,
517
+ version: PUBLISHED_V2_CASE_RESPONSE_PACKET_VERSION,
518
+ role: 'historical',
519
+ expectation: 'accepted_exact',
520
+ expectedOutputFixtureId: null,
521
+ shapeId: 'case.response-packet.v7',
522
+ scope: 'repository',
523
+ }),
524
+ Object.freeze({
525
+ id: 'case-response-packet-v8',
526
+ path: 'test/fixtures/case-lifecycle/case-response-packet-v8.json',
527
+ bytes: 12191,
528
+ sha256: '7bd2237f208714b92c3669c0581dbf0bc2dc22369e53b3ef9da088e8af0f4a83',
529
+ contentDigestSha256: 'sha256:86d4d88d1d9fc969e6efa432061c64bf0725767d81c50b8655abd2d231dcc5b6',
530
+ schema: CASE_RESPONSE_PACKET_SCHEMA,
447
531
  version: CASE_RESPONSE_PACKET_VERSION,
448
532
  role: 'current',
449
533
  expectation: 'accepted_exact',
450
534
  expectedOutputFixtureId: null,
451
- shapeId: 'case.response-packet.v7',
535
+ shapeId: 'case.response-packet.v8',
452
536
  scope: 'repository',
453
537
  }),
454
538
  Object.freeze({
@@ -458,11 +542,25 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
458
542
  sha256: '67d3d36f316cf17898e04c39f2ba0ba7599abdc4b4e387baef5f5866a73c7b9c',
459
543
  contentDigestSha256: null,
460
544
  schema: CASE_RESPONSE_REVIEW_INPUTS_SCHEMA,
545
+ version: PUBLISHED_V2_CASE_RESPONSE_REVIEW_INPUTS_VERSION,
546
+ role: 'historical',
547
+ expectation: 'accepted_exact',
548
+ expectedOutputFixtureId: null,
549
+ shapeId: 'case.response-review-inputs.v1',
550
+ scope: 'repository',
551
+ }),
552
+ Object.freeze({
553
+ id: 'case-response-review-inputs-v2',
554
+ path: 'test/fixtures/case-lifecycle/case-response-review-inputs-v2.json',
555
+ bytes: 7520,
556
+ sha256: 'dcc9aaa7cdbd79a33559095f4c212e4eea5ad635c8c36290456d8b1946845aa6',
557
+ contentDigestSha256: null,
558
+ schema: CASE_RESPONSE_REVIEW_INPUTS_SCHEMA,
461
559
  version: CASE_RESPONSE_REVIEW_INPUTS_VERSION,
462
560
  role: 'current',
463
561
  expectation: 'accepted_exact',
464
562
  expectedOutputFixtureId: null,
465
- shapeId: 'case.response-review-inputs.v1',
563
+ shapeId: 'case.response-review-inputs.v2',
466
564
  scope: 'repository',
467
565
  }),
468
566
  Object.freeze({
@@ -483,8 +581,22 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
483
581
  id: 'cli-case-pack-v2-case-v13',
484
582
  path: 'test/fixtures/case-lifecycle/cli-case-pack-v2-case-v13.json',
485
583
  bytes: 9288,
486
- sha256: '77b7bce093a967d04a2cf0ead3b715625c00903c4c194227c5b74886f2b847c6',
487
- contentDigestSha256: 'sha256:2cda7f529ec9b5ec5234180c80286274dc0545b9ba360015b073ae3eb3e97f3d',
584
+ sha256: '915ca7f3171ae48a2d3d06dc089f5840d4240b6a1fff1c050413b8bcca75fe26',
585
+ contentDigestSha256: 'sha256:5991d0f4c04db2e846e078cb147668b2b4a14c6097490d2ebf09e41dfdb0fc9b',
586
+ schema: CLI_CASE_PACK_SCHEMA,
587
+ version: CLI_CASE_PACK_VERSION,
588
+ role: 'current',
589
+ expectation: 'accepted_exact',
590
+ expectedOutputFixtureId: null,
591
+ shapeId: 'case.cli-pack.current',
592
+ scope: 'repository',
593
+ }),
594
+ Object.freeze({
595
+ id: 'cli-case-pack-v2-case-v14',
596
+ path: 'test/fixtures/case-lifecycle/cli-case-pack-v2-case-v14.json',
597
+ bytes: 9363,
598
+ sha256: 'b51f23bca2dc91715f2aeeb931b79e4f990d59c3564d7cd60a9abac7e0d687a6',
599
+ contentDigestSha256: 'sha256:82b88b1251c773a01823fccac9baf3e95f752570f091559c58dd0b1664444655',
488
600
  schema: CLI_CASE_PACK_SCHEMA,
489
601
  version: CLI_CASE_PACK_VERSION,
490
602
  role: 'current',
@@ -503,7 +615,7 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
503
615
  version: PUBLIC_WORKSPACE_ARCHIVE_VERSION,
504
616
  role: 'historical',
505
617
  expectation: 'normalises_to_current_output',
506
- expectedOutputFixtureId: 'workspace-archive-v6-empty-current',
618
+ expectedOutputFixtureId: 'workspace-archive-v7-empty-current',
507
619
  shapeId: 'case.workspace-archive.v5',
508
620
  scope: 'repository',
509
621
  }),
@@ -511,14 +623,28 @@ const CASE_LIFECYCLE_FIXTURES = Object.freeze([
511
623
  id: 'workspace-archive-v6-empty-current',
512
624
  path: 'test/fixtures/case-lifecycle/workspace-archive-v6-empty-current.json',
513
625
  bytes: 5557,
514
- sha256: '7a0701c7b0401de76df132fe7b2332fd1e2f1fade007a8af0103c8cec5a1b2f9',
626
+ sha256: 'bca86a66043c88838f252358962ff5cdbc306373a2ad2d209ae90abdeff09aaa',
627
+ contentDigestSha256: null,
628
+ schema: WORKSPACE_ARCHIVE_SCHEMA,
629
+ version: PUBLISHED_V2_WORKSPACE_ARCHIVE_VERSION,
630
+ role: 'historical',
631
+ expectation: 'normalises_to_current_output',
632
+ expectedOutputFixtureId: 'workspace-archive-v7-empty-current',
633
+ shapeId: 'case.workspace-archive.v6',
634
+ scope: 'repository',
635
+ }),
636
+ Object.freeze({
637
+ id: 'workspace-archive-v7-empty-current',
638
+ path: 'test/fixtures/case-lifecycle/workspace-archive-v7-empty-current.json',
639
+ bytes: 7258,
640
+ sha256: '892b0d321f42bfb34501019388da682071024af452a8263f138cc08221947f0a',
515
641
  contentDigestSha256: null,
516
642
  schema: WORKSPACE_ARCHIVE_SCHEMA,
517
643
  version: WORKSPACE_ARCHIVE_VERSION,
518
644
  role: 'current',
519
645
  expectation: 'accepted_exact',
520
646
  expectedOutputFixtureId: null,
521
- shapeId: 'case.workspace-archive.v6',
647
+ shapeId: 'case.workspace-archive.v7',
522
648
  scope: 'repository',
523
649
  }),
524
650
  Object.freeze({
@@ -577,8 +703,10 @@ const exportContracts = CASE_IMPORT_VERSIONS.map((version) => lifecycleContract(
577
703
  }));
578
704
  const reportContracts = CASE_REPORT_OUTPUT_VERSIONS.map((version) => lifecycleContract({
579
705
  compatibilityId: CASE_REPORT_COMPATIBILITY.id, schema: CASE_REPORT_SCHEMA, version,
580
- lifecycle: 'current', readable: false, emitted: true, exactKeys: true, extensionPolicy: 'reject',
581
- futureVersionBehaviour: 'not_applicable', migrationTarget: null, canonicalisation: null, byteBudget: null,
706
+ lifecycle: version === CASE_REPORT_SCHEMA_VERSION ? 'current' : 'legacy', readable: true,
707
+ emitted: version === CASE_REPORT_SCHEMA_VERSION, exactKeys: true, extensionPolicy: 'reject',
708
+ futureVersionBehaviour: 'reject',
709
+ migrationTarget: null, canonicalisation: null, byteBudget: null,
582
710
  }));
583
711
  const packetContracts = CASE_RESPONSE_PACKET_OUTPUT_VERSIONS.map((version) => lifecycleContract({
584
712
  compatibilityId: CASE_RESPONSE_PACKET_COMPATIBILITY.id, schema: CASE_RESPONSE_PACKET_SCHEMA, version,
@@ -617,7 +745,9 @@ function shape(id, schema, versions, requiredKeys, normalisation, target = null)
617
745
  }
618
746
  const CASE_LIFECYCLE_SHAPES = Object.freeze([
619
747
  shape('case.browser-store.public', CASE_BROWSER_STORE_LIFECYCLE_SCHEMA, [PUBLIC_CASE_SCHEMA_VERSION], ['version', 'cases'], 'project_known_fields'),
748
+ shape('case.browser-store.v13', CASE_BROWSER_STORE_LIFECYCLE_SCHEMA, [PUBLISHED_V2_CASE_SCHEMA_VERSION], ['version', 'cases'], 'project_known_fields'),
620
749
  shape('case.browser-store.current', CASE_BROWSER_STORE_LIFECYCLE_SCHEMA, [CASE_SCHEMA_VERSION], ['version', 'cases'], 'project_known_fields'),
750
+ shape('case.export.v13', CASE_EXPORT_LIFECYCLE_SCHEMA, [PUBLISHED_V2_CASE_SCHEMA_VERSION], ['version', 'cases'], 'preserve_document'),
621
751
  shape('case.export.public', CASE_EXPORT_LIFECYCLE_SCHEMA, [PUBLIC_CASE_SCHEMA_VERSION], ['version', 'cases'], 'preserve_document'),
622
752
  shape('case.response-packet.v6', CASE_RESPONSE_PACKET_SCHEMA, [PUBLIC_CASE_RESPONSE_PACKET_VERSION], [
623
753
  'schema', 'schemaVersion', 'generatedAt', 'reviewRequired', 'submissionPerformed',
@@ -625,22 +755,37 @@ const CASE_LIFECYCLE_SHAPES = Object.freeze([
625
755
  'provenance', 'integrity',
626
756
  ], 'preserve_signed_document'),
627
757
  shape('case.export.current', CASE_EXPORT_LIFECYCLE_SCHEMA, [CASE_SCHEMA_VERSION], ['version', 'cases'], 'preserve_document'),
628
- shape('case.report.v9', CASE_REPORT_SCHEMA, [CASE_REPORT_SCHEMA_VERSION], ['schema', 'schemaVersion', 'generatedAt', 'application', 'case', 'currentAssessment', 'evidenceTimeline', 'analystResponse', 'responseLifecycle', 'limitations'], 'preserve_document'),
629
- shape('case.response-packet.v7', CASE_RESPONSE_PACKET_SCHEMA, [CASE_RESPONSE_PACKET_VERSION], [
758
+ shape('case.report.v9', CASE_REPORT_SCHEMA, [PUBLISHED_V2_CASE_REPORT_SCHEMA_VERSION], ['schema', 'schemaVersion', 'generatedAt', 'application', 'case', 'currentAssessment', 'evidenceTimeline', 'analystResponse', 'responseLifecycle', 'limitations'], 'preserve_document'),
759
+ shape('case.report.v10', CASE_REPORT_SCHEMA, [CASE_REPORT_SCHEMA_VERSION], ['schema', 'schemaVersion', 'generatedAt', 'application', 'case', 'currentAssessment', 'evidenceTimeline', 'analystResponse', 'responseLifecycle', 'limitations'], 'preserve_document'),
760
+ shape('case.response-packet.v7', CASE_RESPONSE_PACKET_SCHEMA, [PUBLISHED_V2_CASE_RESPONSE_PACKET_VERSION], [
630
761
  'schema', 'schemaVersion', 'generatedAt', 'reviewRequired', 'submissionPerformed',
631
762
  'profile', 'case', 'incident', 'contacts', 'provenance', 'selectedEvidence',
632
763
  'contradictions', 'readiness', 'artefactReferences', 'preflight', 'escalationHistory',
633
764
  'escalationHistoryOmitted', 'escalationHistoryLimitations', 'responseLifecycle',
634
765
  'authorisation', 'integrity',
635
766
  ], 'preserve_signed_document'),
636
- shape('case.response-review-inputs.v1', CASE_RESPONSE_REVIEW_INPUTS_SCHEMA, [CASE_RESPONSE_REVIEW_INPUTS_VERSION], [
767
+ shape('case.response-packet.v8', CASE_RESPONSE_PACKET_SCHEMA, [CASE_RESPONSE_PACKET_VERSION], [
768
+ 'schema', 'schemaVersion', 'generatedAt', 'reviewRequired', 'submissionPerformed',
769
+ 'profile', 'case', 'incident', 'contacts', 'recipientRoute', 'actionBinding',
770
+ 'provenance', 'selectedEvidence', 'contradictions', 'readiness', 'artefactReferences',
771
+ 'preflight', 'escalationHistory', 'escalationHistoryOmitted',
772
+ 'escalationHistoryLimitations', 'responseLifecycle', 'authorisation', 'integrity',
773
+ ], 'preserve_signed_document'),
774
+ shape('case.response-review-inputs.v1', CASE_RESPONSE_REVIEW_INPUTS_SCHEMA, [PUBLISHED_V2_CASE_RESPONSE_REVIEW_INPUTS_VERSION], [
637
775
  'contract', 'version', 'profile', 'case', 'incident', 'contacts', 'selectedEvidence',
638
776
  'contradictions', 'readiness', 'artefactReferences', 'escalationHistory',
639
777
  'escalationHistoryOmitted', 'escalationHistoryLimitations', 'responseLifecycle',
640
778
  ], 'preserve_signed_document'),
779
+ shape('case.response-review-inputs.v2', CASE_RESPONSE_REVIEW_INPUTS_SCHEMA, [CASE_RESPONSE_REVIEW_INPUTS_VERSION], [
780
+ 'contract', 'version', 'profile', 'case', 'incident', 'contacts',
781
+ 'recipientRoute', 'actionBinding', 'selectedEvidence', 'contradictions',
782
+ 'readiness', 'artefactReferences', 'escalationHistory',
783
+ 'escalationHistoryOmitted', 'escalationHistoryLimitations', 'responseLifecycle',
784
+ ], 'preserve_signed_document'),
641
785
  shape('case.cli-pack.current', CLI_CASE_PACK_SCHEMA, [CLI_CASE_PACK_VERSION], CLI_CASE_PACK_ROOT_KEYS, 'preserve_signed_document'),
642
786
  shape('case.workspace-archive.v5', WORKSPACE_ARCHIVE_SCHEMA, [5], ['schema', 'version', 'generatedAt', 'manifest', 'sections', 'limitations'], 'preserve_signed_document'),
643
- shape('case.workspace-archive.v6', WORKSPACE_ARCHIVE_SCHEMA, [WORKSPACE_ARCHIVE_VERSION], ['schema', 'version', 'generatedAt', 'manifest', 'sections', 'limitations'], 'preserve_signed_document'),
787
+ shape('case.workspace-archive.v6', WORKSPACE_ARCHIVE_SCHEMA, [PUBLISHED_V2_WORKSPACE_ARCHIVE_VERSION], ['schema', 'version', 'generatedAt', 'manifest', 'sections', 'limitations'], 'preserve_signed_document'),
788
+ shape('case.workspace-archive.v7', WORKSPACE_ARCHIVE_SCHEMA, [WORKSPACE_ARCHIVE_VERSION], ['schema', 'version', 'generatedAt', 'manifest', 'sections', 'limitations'], 'preserve_signed_document'),
644
789
  shape('case.workspace-settings.v1', WORKSPACE_SETTINGS_SCHEMA, [WORKSPACE_SETTINGS_VERSION], ['schema', 'version', 'activeProfileId', 'theme'], 'preserve_document'),
645
790
  shape('case.encrypted-workspace-archive.v1', ENCRYPTED_WORKSPACE_ARCHIVE_SCHEMA, [ENCRYPTED_WORKSPACE_ARCHIVE_VERSION], ['schema', 'version', 'createdAt', 'content', 'kdf', 'cipher', 'ciphertext'], 'preserve_signed_document'),
646
791
  ]);
@@ -705,7 +850,7 @@ const CASE_LIFECYCLE_HOOKS = Object.freeze([
705
850
  id: 'case.packet.structure',
706
851
  role: 'structure_validator',
707
852
  runtime: 'cli',
708
- module: 'cli/artifact-structure.mts',
853
+ module: 'cli/offline-artifact-validation.mts',
709
854
  exportName: 'validateOfflineArtifactStructure',
710
855
  },
711
856
  {
@@ -880,7 +1025,7 @@ const CASE_LIFECYCLE_EXPIRY = Object.freeze([{
880
1025
  }]);
881
1026
  const CASE_LIFECYCLE_SERIALISATION = Object.freeze([
882
1027
  {
883
- id: 'case.browser-store.json.v13',
1028
+ id: 'case.browser-store.json.v14',
884
1029
  schema: CASE_BROWSER_STORE_LIFECYCLE_SCHEMA,
885
1030
  versions: [CASE_SCHEMA_VERSION],
886
1031
  mediaType: 'application/json',
@@ -895,10 +1040,10 @@ const CASE_LIFECYCLE_SERIALISATION = Object.freeze([
895
1040
  verifierHookIds: [],
896
1041
  },
897
1042
  ...[
898
- ['case.export.json.v13', CASE_EXPORT_LIFECYCLE_SCHEMA, [CASE_SCHEMA_VERSION], 'none', []],
899
- ['case.report.json.v9', CASE_REPORT_SCHEMA, [CASE_REPORT_SCHEMA_VERSION], 'none', []],
900
- ['case.packet.json.v7', CASE_RESPONSE_PACKET_SCHEMA, [...SUPPORTED_CASE_RESPONSE_PACKET_VERSIONS], 'structural_only_requires_separate_verification', ['case.packet.verify']],
901
- ['case.workspace.json.v6', WORKSPACE_ARCHIVE_SCHEMA, [WORKSPACE_ARCHIVE_VERSION], 'structural_only_requires_separate_verification', ['case.workspace.verify']],
1043
+ ['case.export.json.v14', CASE_EXPORT_LIFECYCLE_SCHEMA, [CASE_SCHEMA_VERSION], 'none', []],
1044
+ ['case.report.json.v10', CASE_REPORT_SCHEMA, [...CASE_REPORT_OUTPUT_VERSIONS], 'none', []],
1045
+ ['case.packet.json.v8', CASE_RESPONSE_PACKET_SCHEMA, [...SUPPORTED_CASE_RESPONSE_PACKET_VERSIONS], 'structural_only_requires_separate_verification', ['case.packet.verify']],
1046
+ ['case.workspace.json.v7', WORKSPACE_ARCHIVE_SCHEMA, [WORKSPACE_ARCHIVE_VERSION], 'structural_only_requires_separate_verification', ['case.workspace.verify']],
902
1047
  ['case.encrypted-workspace.json.v1', ENCRYPTED_WORKSPACE_ARCHIVE_SCHEMA, [ENCRYPTED_WORKSPACE_ARCHIVE_VERSION], 'structural_only_requires_separate_verification', ['case.encrypted-workspace.verify']],
903
1048
  ].map(([id, schema, versions, integrity, verifierHookIds]) => ({
904
1049
  id,
@@ -949,10 +1094,10 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
949
1094
  discriminator: null,
950
1095
  }],
951
1096
  emittedContract: { schema: CASE_BROWSER_STORE_LIFECYCLE_SCHEMA, version: CASE_SCHEMA_VERSION, discriminator: null },
952
- shapeIds: ['case.browser-store.public', 'case.browser-store.current'],
1097
+ shapeIds: ['case.browser-store.public', 'case.browser-store.v13', 'case.browser-store.current'],
953
1098
  boundProfileIds: ['case.browser-store.bounds', 'case.domain.bounds'],
954
1099
  hookIds: ['case.browser.normalise', 'case.browser.serialise'],
955
- serialisationProfileId: 'case.browser-store.json.v13',
1100
+ serialisationProfileId: 'case.browser-store.json.v14',
956
1101
  privacyProfileId: 'case.privacy.browser-state',
957
1102
  retentionEffect: 'browser_indexeddb',
958
1103
  ...sharedEdge,
@@ -968,7 +1113,7 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
968
1113
  discriminator: null,
969
1114
  }],
970
1115
  emittedContract: null,
971
- shapeIds: ['case.export.public', 'case.export.current'],
1116
+ shapeIds: ['case.export.public', 'case.export.v13', 'case.export.current'],
972
1117
  boundProfileIds: ['case.portable.bounds', 'case.domain.bounds'],
973
1118
  hookIds: ['case.export.merge'],
974
1119
  serialisationProfileId: null,
@@ -985,21 +1130,40 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
985
1130
  shapeIds: ['case.export.current'],
986
1131
  boundProfileIds: ['case.portable.bounds', 'case.domain.bounds'],
987
1132
  hookIds: ['case.export.build', 'case.portable.serialise'],
988
- serialisationProfileId: 'case.export.json.v13',
1133
+ serialisationProfileId: 'case.export.json.v14',
989
1134
  privacyProfileId: 'case.privacy.portable-output',
990
1135
  retentionEffect: 'operator_controlled_output',
991
1136
  ...sharedEdge,
992
1137
  },
1138
+ {
1139
+ id: 'case.consumer.report-pack-verify',
1140
+ plane: 'cli',
1141
+ operation: 'validate-embedded-report',
1142
+ acceptedContracts: [{
1143
+ schema: CASE_REPORT_SCHEMA,
1144
+ versions: [...CASE_REPORT_OUTPUT_VERSIONS],
1145
+ mode: 'embedded',
1146
+ discriminator: null,
1147
+ }],
1148
+ emittedContract: null,
1149
+ shapeIds: ['case.report.v9', 'case.report.v10'],
1150
+ boundProfileIds: ['case.domain.bounds'],
1151
+ hookIds: ['case.cli-pack.verify'],
1152
+ serialisationProfileId: null,
1153
+ privacyProfileId: 'case.privacy.portable-input',
1154
+ retentionEffect: 'deliberate_local_file',
1155
+ ...sharedEdge,
1156
+ },
993
1157
  {
994
1158
  id: 'case.consumer.report-build',
995
1159
  plane: 'shared',
996
1160
  operation: 'build-report',
997
1161
  acceptedContracts: [],
998
1162
  emittedContract: { schema: CASE_REPORT_SCHEMA, version: CASE_REPORT_SCHEMA_VERSION, discriminator: null },
999
- shapeIds: ['case.report.v9'],
1163
+ shapeIds: ['case.report.v10'],
1000
1164
  boundProfileIds: ['case.domain.bounds'],
1001
1165
  hookIds: ['case.report.build', 'case.portable.serialise'],
1002
- serialisationProfileId: 'case.report.json.v9',
1166
+ serialisationProfileId: 'case.report.json.v10',
1003
1167
  privacyProfileId: 'case.privacy.portable-output',
1004
1168
  retentionEffect: 'operator_controlled_output',
1005
1169
  ...sharedEdge,
@@ -1015,7 +1179,7 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1015
1179
  discriminator: null,
1016
1180
  }],
1017
1181
  emittedContract: null,
1018
- shapeIds: ['case.response-packet.v6', 'case.response-packet.v7'],
1182
+ shapeIds: ['case.response-packet.v6', 'case.response-packet.v7', 'case.response-packet.v8'],
1019
1183
  boundProfileIds: ['case.packet.bounds'],
1020
1184
  hookIds: ['case.packet.verify'],
1021
1185
  serialisationProfileId: null,
@@ -1034,7 +1198,7 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1034
1198
  discriminator: null,
1035
1199
  }],
1036
1200
  emittedContract: null,
1037
- shapeIds: ['case.response-packet.v6', 'case.response-packet.v7'],
1201
+ shapeIds: ['case.response-packet.v6', 'case.response-packet.v7', 'case.response-packet.v8'],
1038
1202
  boundProfileIds: ['case.packet.bounds'],
1039
1203
  hookIds: ['case.packet.structure', 'case.packet.verify'],
1040
1204
  serialisationProfileId: null,
@@ -1048,10 +1212,10 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1048
1212
  operation: 'build-packet',
1049
1213
  acceptedContracts: [],
1050
1214
  emittedContract: { schema: CASE_RESPONSE_PACKET_SCHEMA, version: CASE_RESPONSE_PACKET_VERSION, discriminator: null },
1051
- shapeIds: ['case.response-packet.v7'],
1215
+ shapeIds: ['case.response-packet.v8'],
1052
1216
  boundProfileIds: ['case.packet.bounds'],
1053
1217
  hookIds: ['case.packet.build', 'case.portable.serialise'],
1054
- serialisationProfileId: 'case.packet.json.v7',
1218
+ serialisationProfileId: 'case.packet.json.v8',
1055
1219
  privacyProfileId: 'case.privacy.portable-output',
1056
1220
  retentionEffect: 'operator_controlled_output',
1057
1221
  ...sharedEdge,
@@ -1062,12 +1226,12 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1062
1226
  operation: 'validate-review-inputs',
1063
1227
  acceptedContracts: [{
1064
1228
  schema: CASE_RESPONSE_REVIEW_INPUTS_SCHEMA,
1065
- versions: [CASE_RESPONSE_REVIEW_INPUTS_VERSION],
1229
+ versions: [...SUPPORTED_CASE_RESPONSE_REVIEW_INPUTS_VERSIONS],
1066
1230
  mode: 'direct',
1067
1231
  discriminator: null,
1068
1232
  }],
1069
1233
  emittedContract: null,
1070
- shapeIds: ['case.response-review-inputs.v1'],
1234
+ shapeIds: ['case.response-review-inputs.v1', 'case.response-review-inputs.v2'],
1071
1235
  boundProfileIds: ['case.packet.bounds'],
1072
1236
  hookIds: ['case.review-inputs.validate'],
1073
1237
  serialisationProfileId: null,
@@ -1085,7 +1249,7 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1085
1249
  version: CASE_RESPONSE_REVIEW_INPUTS_VERSION,
1086
1250
  discriminator: null,
1087
1251
  },
1088
- shapeIds: ['case.response-review-inputs.v1'],
1252
+ shapeIds: ['case.response-review-inputs.v2'],
1089
1253
  boundProfileIds: ['case.packet.bounds'],
1090
1254
  hookIds: ['case.review-inputs.build'],
1091
1255
  serialisationProfileId: null,
@@ -1147,7 +1311,7 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1147
1311
  discriminator: null,
1148
1312
  }],
1149
1313
  emittedContract: null,
1150
- shapeIds: ['case.workspace-archive.v5', 'case.workspace-archive.v6', 'case.workspace-settings.v1'],
1314
+ shapeIds: ['case.workspace-archive.v5', 'case.workspace-archive.v6', 'case.workspace-archive.v7', 'case.workspace-settings.v1'],
1151
1315
  boundProfileIds: ['case.workspace.bounds'],
1152
1316
  hookIds: ['case.workspace.verify'],
1153
1317
  serialisationProfileId: null,
@@ -1161,10 +1325,10 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1161
1325
  operation: 'build-workspace',
1162
1326
  acceptedContracts: [],
1163
1327
  emittedContract: { schema: WORKSPACE_ARCHIVE_SCHEMA, version: WORKSPACE_ARCHIVE_VERSION, discriminator: null },
1164
- shapeIds: ['case.workspace-archive.v6'],
1328
+ shapeIds: ['case.workspace-archive.v7'],
1165
1329
  boundProfileIds: ['case.workspace.bounds'],
1166
1330
  hookIds: ['case.workspace.build', 'case.portable.serialise'],
1167
- serialisationProfileId: 'case.workspace.json.v6',
1331
+ serialisationProfileId: 'case.workspace.json.v7',
1168
1332
  privacyProfileId: 'case.privacy.portable-output',
1169
1333
  retentionEffect: 'operator_controlled_output',
1170
1334
  ...sharedEdge,
@@ -1217,7 +1381,7 @@ const CASE_LIFECYCLE_CONSUMERS = Object.freeze([
1217
1381
  version: ENCRYPTED_WORKSPACE_ARCHIVE_VERSION,
1218
1382
  discriminator: null,
1219
1383
  },
1220
- shapeIds: ['case.workspace-archive.v5', 'case.workspace-archive.v6', 'case.encrypted-workspace-archive.v1'],
1384
+ shapeIds: ['case.workspace-archive.v5', 'case.workspace-archive.v6', 'case.workspace-archive.v7', 'case.encrypted-workspace-archive.v1'],
1221
1385
  boundProfileIds: ['case.workspace.bounds', 'case.encrypted-workspace.bounds'],
1222
1386
  hookIds: ['case.encrypted-workspace.build', 'case.portable.serialise'],
1223
1387
  serialisationProfileId: 'case.encrypted-workspace.json.v1',
@@ -1236,20 +1400,20 @@ export const CASE_PORTABILITY_LIFECYCLE_FAMILY = defineSchemaLifecycleFamily({
1236
1400
  ...exportContracts,
1237
1401
  ...reportContracts,
1238
1402
  ...packetContracts,
1239
- lifecycleContract({
1403
+ ...SUPPORTED_CASE_RESPONSE_REVIEW_INPUTS_VERSIONS.map((version) => lifecycleContract({
1240
1404
  compatibilityId: CASE_RESPONSE_REVIEW_INPUTS_COMPATIBILITY.id,
1241
1405
  schema: CASE_RESPONSE_REVIEW_INPUTS_SCHEMA,
1242
- version: CASE_RESPONSE_REVIEW_INPUTS_VERSION,
1243
- lifecycle: 'current',
1406
+ version,
1407
+ lifecycle: version === CASE_RESPONSE_REVIEW_INPUTS_VERSION ? 'current' : 'legacy',
1244
1408
  readable: true,
1245
- emitted: true,
1409
+ emitted: version === CASE_RESPONSE_REVIEW_INPUTS_VERSION,
1246
1410
  exactKeys: true,
1247
1411
  extensionPolicy: 'reject',
1248
1412
  futureVersionBehaviour: 'reject',
1249
1413
  migrationTarget: null,
1250
1414
  canonicalisation: 'sorted-json-v2',
1251
1415
  byteBudget: null,
1252
- }),
1416
+ })),
1253
1417
  lifecycleContract({
1254
1418
  compatibilityId: CLI_CASE_PACK_COMPATIBILITY.id,
1255
1419
  schema: CLI_CASE_PACK_SCHEMA,