@wildo-ai/saas-specifications 1.1.12 → 1.1.14

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 (121) hide show
  1. package/dist/esm/_core/application-maturity/application-maturity-open-items.d.ts +48 -0
  2. package/dist/esm/_core/application-maturity/application-maturity-open-items.d.ts.map +1 -0
  3. package/dist/esm/_core/application-maturity/application-maturity-open-items.js +69 -0
  4. package/dist/esm/_core/application-maturity/application-maturity-open-items.js.map +1 -0
  5. package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts +5 -0
  6. package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts.map +1 -1
  7. package/dist/esm/_core/application-maturity/application-maturity-validation.js +12 -0
  8. package/dist/esm/_core/application-maturity/application-maturity-validation.js.map +1 -1
  9. package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts +41 -0
  10. package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts.map +1 -1
  11. package/dist/esm/_core/application-maturity/application-maturity.schemas.js +41 -0
  12. package/dist/esm/_core/application-maturity/application-maturity.schemas.js.map +1 -1
  13. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
  14. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +28 -5
  15. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
  16. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +28 -3
  17. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -1
  18. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +32 -2
  19. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -1
  20. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +4 -0
  21. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
  22. package/dist/esm/_core/compliance-documents/processor-register.schemas.js +10 -0
  23. package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
  24. package/dist/esm/_core/index.d.ts +2 -0
  25. package/dist/esm/_core/index.d.ts.map +1 -1
  26. package/dist/esm/_core/index.js +2 -0
  27. package/dist/esm/_core/index.js.map +1 -1
  28. package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +2 -0
  29. package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/requirements/functional-requirement.schemas.js +12 -0
  31. package/dist/esm/_core/requirements/functional-requirement.schemas.js.map +1 -1
  32. package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts +2 -0
  33. package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts.map +1 -1
  34. package/dist/esm/_core/requirements/non-functional-requirement.schemas.js +12 -0
  35. package/dist/esm/_core/requirements/non-functional-requirement.schemas.js.map +1 -1
  36. package/dist/esm/_core/requirements/requirement-engine-substance.schemas.d.ts +33 -0
  37. package/dist/esm/_core/requirements/requirement-engine-substance.schemas.d.ts.map +1 -0
  38. package/dist/esm/_core/requirements/requirement-engine-substance.schemas.js +34 -0
  39. package/dist/esm/_core/requirements/requirement-engine-substance.schemas.js.map +1 -0
  40. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts +8 -0
  41. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
  42. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -1
  43. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
  44. package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +4 -0
  45. package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts.map +1 -1
  46. package/dist/esm/application-creation.exports.d.ts +2 -0
  47. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  48. package/dist/esm/application-creation.exports.js +2 -0
  49. package/dist/esm/application-creation.exports.js.map +1 -1
  50. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.d.ts +7 -0
  51. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.d.ts.map +1 -1
  52. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.js +46 -25
  53. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.js.map +1 -1
  54. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.d.ts.map +1 -1
  55. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.js +30 -3
  56. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.js.map +1 -1
  57. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts +1 -0
  58. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  59. package/dist/esm/engine/applications/resources/applications.resource.specification.js +1 -1
  60. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  61. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -1
  62. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +2 -1
  63. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -1
  64. package/dist/esm/engine/compliance/resources/data-subject-requests.resource.specification.d.ts.map +1 -1
  65. package/dist/esm/engine/compliance/resources/data-subject-requests.resource.specification.js +6 -2
  66. package/dist/esm/engine/compliance/resources/data-subject-requests.resource.specification.js.map +1 -1
  67. package/dist/esm/engine/compliance/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  68. package/dist/esm/engine/compliance/resources/siem-delivery-dlq.resource.specification.js +6 -5
  69. package/dist/esm/engine/compliance/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  70. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  71. package/dist/esm/engine/engine-resource-specifications.registry.js +4 -0
  72. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  73. package/dist/esm/engine/frontend-components/data-display/approval-seal.frontend-component.specification.d.ts +4 -0
  74. package/dist/esm/engine/frontend-components/data-display/approval-seal.frontend-component.specification.d.ts.map +1 -0
  75. package/dist/esm/engine/frontend-components/data-display/approval-seal.frontend-component.specification.js +29 -0
  76. package/dist/esm/engine/frontend-components/data-display/approval-seal.frontend-component.specification.js.map +1 -0
  77. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file.frontend-component.specification.js +1 -1
  78. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file.frontend-component.specification.js.map +1 -1
  79. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
  80. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
  81. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-chart-dashboard-layout-editor.frontend-component.specification.d.ts +4 -0
  82. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-chart-dashboard-layout-editor.frontend-component.specification.d.ts.map +1 -0
  83. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-chart-dashboard-layout-editor.frontend-component.specification.js +22 -0
  84. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-chart-dashboard-layout-editor.frontend-component.specification.js.map +1 -0
  85. package/dist/esm/engine/frontend-components/index.d.ts +1 -0
  86. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  87. package/dist/esm/engine/frontend-components/index.js +5 -0
  88. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  89. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.d.ts +9 -0
  90. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.d.ts.map +1 -0
  91. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.js +136 -0
  92. package/dist/esm/engine/infrastructure/resources/queue-messages.resource.specification.js.map +1 -0
  93. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts +10 -0
  94. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts.map +1 -1
  95. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js +10 -1
  96. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js.map +1 -1
  97. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts.map +1 -1
  98. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js +4 -2
  99. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js.map +1 -1
  100. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  101. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +6 -5
  102. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  103. package/dist/esm/engine/organizations/resources/organization-custom-domains.resource.specification.d.ts.map +1 -1
  104. package/dist/esm/engine/organizations/resources/organization-custom-domains.resource.specification.js +2 -1
  105. package/dist/esm/engine/organizations/resources/organization-custom-domains.resource.specification.js.map +1 -1
  106. package/dist/esm/engine/organizations/resources/organization-dashboard-layouts.resource.specification.d.ts +30 -0
  107. package/dist/esm/engine/organizations/resources/organization-dashboard-layouts.resource.specification.d.ts.map +1 -0
  108. package/dist/esm/engine/organizations/resources/organization-dashboard-layouts.resource.specification.js +131 -0
  109. package/dist/esm/engine/organizations/resources/organization-dashboard-layouts.resource.specification.js.map +1 -0
  110. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  111. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +10 -7
  112. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  113. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts +1 -0
  114. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  115. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +7 -7
  116. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  117. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +2 -2
  118. package/dist/esm/engine/users/resources/users.resource.specification.js +1 -1
  119. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  120. package/dist/tsconfig.build.tsbuildinfo +1 -1
  121. package/package.json +9 -9
@@ -1,4 +1,4 @@
1
- import { complaintRouteUnderRegime, dataResidencyEntriesOf, dataProtectionRegimeOf, processingRegionHoldingOf, OperatorProcessingRole, rightsUnderRegime, subjectRequestResponderFor, DataRetentionClass, undeclaredRetentionClasses, groupResourceRowLifetimes, isKeptUntilErased, ResourceRowLifetime, RETENTION_CLASS_SWEEP_INTERVAL_MS, } from "@wildo-ai/saas-models";
1
+ import { complaintRouteUnderRegime, dataResidencyEntriesOf, dataProtectionRegimeOf, processingRegionHoldingOf, ProviderDataResidencyStatus, OperatorProcessingRole, rightsUnderRegime, subjectRequestResponderFor, DataRetentionClass, undeclaredRetentionClasses, groupResourceRowLifetimes, isKeptUntilErased, ResourceRowLifetime, RETENTION_CLASS_SWEEP_INTERVAL_MS, } from "@wildo-ai/saas-models";
2
2
  import { ApplicationAssuranceDocumentFactContributionResolutionKind, ApplicationDocumentFactSpecificationSchema, COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS, ComputedDocumentFact, computedDocumentFactOf, } from "../../application-creation/application-document-fact-specification.application-creation.schemas.js";
3
3
  import { AssuranceDocumentFactAuthorityKind } from "../../assurance.exports.js";
4
4
  import { processorProcessingRegions, ProcessorRegisterEntryKind, ProcessorTransferDeterminationKind, } from "./processor-register.schemas.js";
@@ -323,6 +323,11 @@ function accountHolderErasureOf(execution) {
323
323
  * (`dataResidencyEntriesOf`, the same derivation `wildo config sync` refuses with). `null` when no residency is declared,
324
324
  * which a notice states as no residency commitment. `providers` is `null` when the providers' profiles could not be
325
325
  * read: the territories are then the operator's commitment alone, and nothing says whether the vendors keep it.
326
+ * `storedAtRestTerritories` is the opt-in weaker promise (`null` when not made); a provider whose status is
327
+ * `inside-at-rest` carries `storageTerritories`, the places it keeps the data in while processing elsewhere, and
328
+ * `storageCondition`, the account arrangement those places hold on (#3920), or `null`. `registerStatesNoStorageFor`
329
+ * names each `inside-at-rest` provider whose processor-register entry has no `storedAtRestIn` (#3921), and each
330
+ * processor carries its `storedAtRestIn` (or `null`).
326
331
  */
327
332
  function computeInternationalTransfers(inputs) {
328
333
  const register = inputs.processorRegister;
@@ -348,6 +353,7 @@ function computeInternationalTransfers(inputs) {
348
353
  processorRef: refOf(processor),
349
354
  legalEntityName: processor.legalEntityName,
350
355
  processingRegions: [...processor.processingRegions],
356
+ storedAtRestIn: processor.storedAtRestIn === undefined ? null : [...processor.storedAtRestIn],
351
357
  // A JSON round trip for the same reason as the recipients fact: a field added to the determination later
352
358
  // must reach the fact without an edit here.
353
359
  transferDetermination: JSON.parse(JSON.stringify(processor.transferDetermination)),
@@ -366,16 +372,33 @@ function dataResidencyStatementOf(inputs) {
366
372
  const residency = inputs.operatorComplianceIdentity?.dataResidency;
367
373
  if (residency === undefined)
368
374
  return null;
375
+ const entries = inputs.recipientPopulation.complianceProfilesRead
376
+ ? dataResidencyEntriesOf(inputs.recipientPopulation.complianceChoiceAssessments, residency)
377
+ : null;
378
+ // #3921: a provider relied on as inside-at-rest whose register entry does not say where it stores. The register is the
379
+ // record a regulator reads first, so the weaker promise must be stated there too, and an absence is named, never filled.
380
+ const storageStated = new Set((inputs.processorRegister?.processors ?? []).flatMap((processor) => (processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER && processor.storedAtRestIn !== undefined ? [processor.providerRef] : [])));
369
381
  return {
370
382
  territories: [...residency.territories],
371
- providers: inputs.recipientPopulation.complianceProfilesRead
372
- ? dataResidencyEntriesOf(inputs.recipientPopulation.complianceChoiceAssessments, residency).map((entry) => ({
383
+ // The weaker promise, when the operator opted into it (#2294): a vendor marked `inside-at-rest` keeps the data in
384
+ // these places and processes it elsewhere, and a notice must say exactly that for it, never that it processes inside.
385
+ storedAtRestTerritories: residency.storedAtRestTerritories === undefined ? null : [...residency.storedAtRestTerritories],
386
+ providers: entries === null
387
+ ? null
388
+ : entries.map((entry) => ({
373
389
  providerRef: entry.providerRef,
374
390
  processingRegion: entry.processingRegion,
375
391
  territories: entry.territories === null ? null : [...entry.territories],
392
+ storageTerritories: entry.storageTerritories === undefined || entry.storageTerritories === null ? null : [...entry.storageTerritories],
393
+ // What the storage holds on (#3920): the account arrangement the operator attested by choosing the region.
394
+ storageCondition: entry.storageCondition ?? null,
376
395
  status: String(entry.status),
377
- }))
378
- : null,
396
+ })),
397
+ registerStatesNoStorageFor: entries === null
398
+ ? null
399
+ : entries
400
+ .filter((entry) => entry.status === ProviderDataResidencyStatus.INSIDE_AT_REST && !storageStated.has(entry.providerRef))
401
+ .map((entry) => entry.providerRef),
379
402
  };
380
403
  }
381
404
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"computed-document-facts.schemas.js","sourceRoot":"","sources":["../../../../src/_core/compliance-documents/computed-document-facts.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,iCAAiC,GAYlC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,0DAA0D,EAC1D,0CAA0C,EAC1C,sCAAsC,EACtC,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,iGAAiG,CAAC;AACzG,OAAO,EAAE,kCAAkC,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,kCAAkC,GAEnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iCAAiC,EAAE,6BAA6B,EAA4B,MAAM,gCAAgC,CAAC;AAC5I,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAiE,MAAM,iCAAiC,CAAC;AACxK,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,GAGrB,MAAM,6BAA6B,CAAC;AAgHrC;;;;;;;GAOG;AAC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AK,CAAC;QACtD,aAAa,EAAE,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;QACjD,YAAY;KACb,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n complaintRouteUnderRegime,\n dataResidencyEntriesOf,\n dataProtectionRegimeOf,\n processingRegionHoldingOf,\n OperatorProcessingRole,\n rightsUnderRegime,\n subjectRequestResponderFor,\n DataRetentionClass,\n undeclaredRetentionClasses,\n groupResourceRowLifetimes,\n isKeptUntilErased,\n ResourceRowLifetime,\n RETENTION_CLASS_SWEEP_INTERVAL_MS,\n type ApplicationOperatorComplianceIdentity,\n type OperatorLawfulBasis,\n type ApplicationProviderComplianceChoices,\n type RetentionEnforcementEvidence,\n type ApplicationRetentionSchedule,\n type ErasureRetentionMode,\n type ResourceRetentionBinding,\n type ResourceStatutoryRetention,\n type SystemOfRecordPersonalDataOrigin,\n type SystemOfRecordSubjectRightsPosture,\n type SubjectErasureExecutedTreatment,\n} from \"@wildo-ai/saas-models\";\n\nimport {\n ApplicationAssuranceDocumentFactContributionResolutionKind,\n ApplicationDocumentFactSpecificationSchema,\n COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS,\n ComputedDocumentFact,\n computedDocumentFactOf,\n type ApplicationDerivedDocumentFactDeclaration,\n type ApplicationDocumentFactSpecification,\n} from \"../../application-creation/application-document-fact-specification.application-creation.schemas\";\nimport { AssuranceDocumentFactAuthorityKind } from \"../../assurance.exports\";\nimport {\n processorProcessingRegions,\n ProcessorRegisterEntryKind,\n ProcessorTransferDeterminationKind,\n type ApplicationProcessorRegister,\n} from \"./processor-register.schemas\";\nimport { joinRecipientPopulationToRegister, RecipientPopulationMemberKind, type RecipientPopulation } from \"./recipient-population.schemas\";\nimport { deriveRecipientDisclosures, SystemOfRecordDataFlowKind, type ConditionallyHeldCategories, type SystemOfRecordDataFlow } from \"./recipient-disclosures.schemas\";\nimport { deriveRetentionEnforcementFacts } from \"./retention-enforcement-facts.schemas\";\nimport {\n deriveAiContentGuardrailFacts,\n deriveAiUseInventory,\n type AiContentGuardrailEvidence,\n type ApplicationAiUseInventoryInput,\n} from \"./ai-document-facts.schemas\";\n\n/**\n * Computing the {@link ComputedDocumentFact} members, and laying them over the facts a file declares.\n *\n * See the vocabulary's own JSDoc for why these facts are computed at read and never stored. This module\n * is the one place their values are built: the companion calls it where the application's facts are\n * read, and nothing writes its output to disk.\n */\n\n/** The value type a KNOWN derived declaration carries. */\ntype DocumentFactValue = Extract<\n ApplicationDerivedDocumentFactDeclaration,\n { resolutionKind: ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN }\n>[\"value\"];\n\n/** The typed declarations the computed facts are read from. Each is `undefined` when the application declares none. */\nexport interface ApplicationDocumentFactComputationInputs {\n readonly operatorComplianceIdentity: ApplicationOperatorComplianceIdentity | undefined;\n readonly processorRegister: ApplicationProcessorRegister | undefined;\n /**\n * WHO receives personal data, from {@link computeRecipientPopulation} — the same population the evidence\n * collector and the drafting brief read, so the three cannot disagree about who a recipient is (#1707).\n */\n readonly recipientPopulation: RecipientPopulation;\n /**\n * The system-of-record flows every resource declares (#1709), read off the materialized resources. OPTIONAL:\n * `undefined` means they could not be read, and each system-of-record recipient then reports its categories as not\n * derivable rather than as none.\n */\n readonly systemOfRecordFlows?: readonly SystemOfRecordDataFlow[] | undefined;\n /**\n * The `systemsOfRecord.<name>.vendor` of each declared instance (#1745), from {@link systemOfRecordVendorsOf} — what\n * the `system-of-record-sources` fact names beside the instance. OPTIONAL: an instance absent here is stated with no\n * vendor rather than guessed.\n */\n readonly systemOfRecordVendors?: Readonly<Record<string, string>> | undefined;\n /**\n * The `systemsOfRecord.<name>.personalDataOrigin` of each instance that declares one (#1745), from\n * `systemOfRecordPersonalDataOriginsOf` — whether its personal data can have come from publicly accessible sources.\n * An instance absent here has not stated it, and its sources carry no origin, so the notice marks it owed.\n */\n readonly systemOfRecordPersonalDataOrigins?: Readonly<Record<string, SystemOfRecordPersonalDataOrigin>> | undefined;\n /** `providerComplianceChoices`, read for the purposes each recipient links to (#1709). */\n readonly providerComplianceChoices?: ApplicationProviderComplianceChoices | undefined;\n /** `dataRetention` — the period per data class. Partial by design; absent means no schedule was declared. */\n readonly retentionSchedule: ApplicationRetentionSchedule | undefined;\n /**\n * What erasure does to each resource's rows, as the resources declare it. `undefined` when the resources\n * could not be read, which is not the same as \"none declared\" and must answer nothing.\n */\n readonly resourceErasureTreatments: readonly ResourceErasureTreatment[] | undefined;\n /**\n * How long each resource's rows are kept, as the resources declare it (#1613): its retention-class\n * binding, and whether a fixed `.ttl()` deletes its rows instead. OPTIONAL and separate from the\n * erasure treatments on purpose — the two are different axes. `undefined` means the bindings could not\n * be read, and the fact then states no mechanism rather than claiming none exists.\n */\n readonly resourceRetentionBindings?: readonly ResourceRetentionBindingFact[] | undefined;\n /** The `operatingJurisdictions` slugs — where the data comes FROM. `undefined` when none are declared. */\n readonly operatingJurisdictionSlugs: readonly string[] | undefined;\n /**\n * The retention-enforcement records of a window, as the evidence door answered them and the assurance\n * collector recorded them (#1636). OPTIONAL: `undefined` means no evidence was readable, and the\n * `retention-enforcement` fact then answers nothing — its clause is marked owed rather than claiming either\n * enforcement or its absence.\n */\n readonly retentionEnforcementEvidence?: RetentionEnforcementEvidence | undefined;\n /**\n * The application's AI-use declarations (#2838), read through the agent-population door, with the contracted-service\n * partition of its capabilities (#2847). OPTIONAL: `undefined` means they were not read, and `ai-use-inventory` and\n * `ai-content-guardrails` then answer nothing rather than \"no AI\".\n */\n readonly aiUses?: ApplicationAiUseInventoryInput | undefined;\n /**\n * The agent-operation evidence and guardrail audit-event measurements the assurance collectors committed (#2847).\n * OPTIONAL: `undefined` means none was readable, and `ai-content-guardrails` then answers nothing — its clause is\n * marked owed rather than claiming a guardrail ran or did not.\n */\n readonly aiContentGuardrailEvidence?: AiContentGuardrailEvidence | undefined;\n}\n\n/** One resource's declared erasure treatment. `erasureRetentionMode` is absent when the resource declares none. */\nexport interface ResourceErasureTreatment {\n readonly resourceType: string;\n readonly erasureRetentionMode?: ErasureRetentionMode;\n /**\n * The statute that keeps the rows (#1635). Present only where the resource declares\n * `retentionPolicy.statutoryRetention`. An erasure restricts those rows until their period ends, unless it also\n * carries `staysInUseBecause`: such a record stays in use, and a notice must say that rather than that it is hidden.\n */\n readonly statutoryRetention?: ResourceStatutoryRetention;\n /**\n * What an ACCOUNT HOLDER's erasure (a `users` subject) executes on these rows (#2960): whether they are that erasure's\n * subject, the dispositions of the erasure-graph edges that reach the resource, and the treatments the engine's\n * subject-reference severers report for it. All empty means that erasure keeps the rows as they are, whatever\n * {@link erasureRetentionMode} declares. It says nothing about erasing the resource's OWN rows as a subject (a CRM\n * contact asking to be erased), which applies the declared mode. Absent when the producer could not derive it; the\n * fact then states the declared mode alone, and says nothing about what runs.\n */\n readonly erasureExecution?: SubjectErasureExecutedTreatment;\n}\n\n/** One resource's retention binding, as the retention-rules fact reads it. */\nexport interface ResourceRetentionBindingFact {\n readonly resourceType: string;\n readonly retentionBinding?: ResourceRetentionBinding;\n readonly declaresRowTtl: boolean;\n /** What ends the resource's rows, as `deriveResourceRowLifetimes` answers over the whole registry. Absent when it could not be read. */\n readonly rowLifetime?: ResourceRowLifetime;\n}\n\n/**\n * WHAT deletes data of a declared class when its period ends — the mechanism a retention clause may name.\n *\n * A statement about the application's CONFIGURATION (which mechanism the declarations wire up), not\n * runtime evidence that the mechanism ran: that is `ComputedDocumentFact.RETENTION_ENFORCEMENT`, computed\n * from the sweep's records (#1636). An empty list here means no mechanism is even wired for the class — a\n * notice must not describe a period nothing applies.\n */\nexport enum RetentionPeriodMechanism {\n /** At least one resource binds the class; the retention-class sweep deletes its rows past the period. */\n RETENTION_CLASS_SWEEP = \"RETENTION_CLASS_SWEEP\",\n /** The FILES class: file bytes released from their rows are destroyed by the files cleanup after the period. */\n FILES_CLEANUP = \"FILES_CLEANUP\",\n /**\n * The AUDIT_LOGS class: the audit trail is IMMUTABLE and never deleted; the period is its live-store\n * horizon, after which records are copied to the audit archive. A notice must not say audit records\n * are deleted.\n */\n AUDIT_ARCHIVAL = \"AUDIT_ARCHIVAL\",\n}\n\n/** The mechanisms that act on a declared class, given which resources bind it. Pure, so it is pinned directly. */\nexport function retentionPeriodMechanisms(dataClass: DataRetentionClass, boundResourceCount: number): RetentionPeriodMechanism[] {\n const mechanisms: RetentionPeriodMechanism[] = [];\n if (boundResourceCount > 0) mechanisms.push(RetentionPeriodMechanism.RETENTION_CLASS_SWEEP);\n if (dataClass === DataRetentionClass.FILES) mechanisms.push(RetentionPeriodMechanism.FILES_CLEANUP);\n if (dataClass === DataRetentionClass.AUDIT_LOGS) mechanisms.push(RetentionPeriodMechanism.AUDIT_ARCHIVAL);\n return mechanisms;\n}\n\n/**\n * One computed fact's answer: KNOWN with a value, or a recorded NOT_APPLICABLE with its reason. A fact whose inputs are\n * absent produces no answer at all.\n *\n * NOT_APPLICABLE is a computed FINDING, never silence (#2847): the family schema requires its reason, a clause may cite\n * it, and it states the matching negative. `ai-use-inventory` answers it when no AI capability reaches the contracted\n * service. Written as a union where each arm forbids the other's field, so a reader of `value` still compiles and gets\n * `undefined` for a NOT_APPLICABLE answer, and no answer can carry both.\n */\nexport type ComputedDocumentFactAnswer = ComputedDocumentFactKnownAnswer | ComputedDocumentFactNotApplicableAnswer;\n\ninterface ComputedDocumentFactAnswerCommon {\n readonly fact: ComputedDocumentFact;\n /**\n * For a fact computed from RECORDS (`RUNTIME_EVIDENCE` in {@link COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS}):\n * the instant the evidence describes up to. Required for such a fact, absent for every other.\n */\n readonly observedAt?: string;\n}\n\nexport interface ComputedDocumentFactKnownAnswer extends ComputedDocumentFactAnswerCommon {\n readonly value: DocumentFactValue;\n readonly notApplicableReason?: never;\n}\n\nexport interface ComputedDocumentFactNotApplicableAnswer extends ComputedDocumentFactAnswerCommon {\n readonly notApplicableReason: string;\n readonly value?: never;\n}\n\n/**\n * How public each computed fact is. Every one is published in a privacy notice, so every one is public;\n * the table exists so a member added later must state its own sensitivity rather than inherit one.\n */\nconst COMPUTED_DOCUMENT_FACT_SENSITIVITY_REFS: Readonly<Record<ComputedDocumentFact, string>> = {\n [ComputedDocumentFact.CONTROLLER_AND_CONTACT]: \"sensitivity:public\",\n [ComputedDocumentFact.RECIPIENTS_AND_PROCESSORS]: \"sensitivity:public\",\n [ComputedDocumentFact.LAWFUL_BASES]: \"sensitivity:public\",\n [ComputedDocumentFact.RETENTION_RULES]: \"sensitivity:public\",\n [ComputedDocumentFact.INTERNATIONAL_TRANSFERS]: \"sensitivity:public\",\n [ComputedDocumentFact.RIGHTS_AND_COMPLAINT_ROUTE]: \"sensitivity:public\",\n // Counts and resource types, published in the notice's retention section.\n [ComputedDocumentFact.RETENTION_ENFORCEMENT]: \"sensitivity:public\",\n // Instance names, vendors, resource types and categories, published in the notice's data-and-sources section.\n [ComputedDocumentFact.SYSTEM_OF_RECORD_SOURCES]: \"sensitivity:public\",\n // Uses, domains, providers and their register identity, published in the notice's automated-decisions section and the terms.\n [ComputedDocumentFact.AI_USE_INVENTORY]: \"sensitivity:public\",\n // Agent refs, declared guardrails and counts, published in the terms' AI clause.\n [ComputedDocumentFact.AI_CONTENT_GUARDRAILS]: \"sensitivity:public\",\n};\n\n/**\n * The operator as controller or processor, and how a person reaches it about privacy.\n *\n * Answers nothing unless the legal entity, the privacy contact and the role allocations are ALL declared:\n * the blueprint's question is \"every party acting as controller … and the public privacy contact route\",\n * and a partial answer to it would read as a complete one.\n *\n * A `JOINT_CONTROLLER` allocation also answers nothing. The question asks for EVERY such party, and the\n * identity records the operator's role without naming the other controller, so no function can state\n * the whole answer. The fact stays absent and the clause is marked owed.\n */\nfunction computeControllerAndContact(identity: ApplicationOperatorComplianceIdentity | undefined): DocumentFactValue | undefined {\n if (identity?.legalEntityName === undefined || identity.privacyContact === undefined || identity.roleAllocations === undefined) {\n return undefined;\n }\n if (identity.roleAllocations.some((allocation) => allocation.role === OperatorProcessingRole.JOINT_CONTROLLER)) return undefined;\n return {\n legalEntityName: identity.legalEntityName,\n ...(identity.registeredAddress === undefined ? {} : { registeredAddress: identity.registeredAddress }),\n privacyContact: identity.privacyContact,\n ...(identity.representative === undefined\n ? {}\n : { representative: { name: identity.representative.name, address: identity.representative.address } }),\n roleAllocations: identity.roleAllocations.map((allocation) => ({ dataScope: allocation.dataScope, role: allocation.role })),\n };\n}\n\n/**\n * Who else receives personal data: the declared processors, plus every gap the join finds.\n *\n * Answers nothing when there is NO processor register. An absent register means nobody has looked,\n * and an answer computed from it would state \"no recipients\" about an application whose recipients\n * are simply undeclared.\n *\n * With a register, the gaps are part of the answer rather than a reason to withhold it. An operator\n * sub-processor with no established identity is IN USE, and saying so is true. A register entry that no\n * data path reaches is named so a drafter does not publish it. A self-hosted provider is named as\n * operator-run, so it is never mistaken for a third party. A TENANT recipient — a vendor reached only\n * through a tenant's or a person's own connected account — is named separately: it is the tenant's vendor,\n * not the operator's sub-processor, and a register entry for one is named as a misstatement. A declared\n * member no data path reaches is named so it is neither published nor lost. The classification is\n * {@link joinRecipientPopulationToRegister} over {@link computeRecipientPopulation}, the same one the\n * drafter's brief renders and the evidence collector measures. Each chosen processing region carries how it holds\n * (enforced, attested or neither), see {@link chosenProcessingRegionsOf}.\n */\nfunction computeRecipientsAndProcessors(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const register = inputs.processorRegister;\n if (register === undefined) return undefined;\n const classification = joinRecipientPopulationToRegister(inputs.recipientPopulation, register);\n return {\n // A JSON round trip rather than a hand-listed projection: the register is already JSON-shaped, and a\n // field added to it later must reach the fact without an edit here. It also drops absent optional keys.\n processors: JSON.parse(JSON.stringify(register.processors)) as DocumentFactValue,\n processingRegions: [...processorProcessingRegions(register)],\n configuredProvidersWithoutEstablishedIdentity: [...classification.undeclaredProviderRefs],\n registeredProvidersNotConfigured: [...classification.staleProviderRefs],\n operatorRunProviderRefs: [...classification.operatorRunProviderRefs],\n tenantRecipientRefs: [...classification.tenantRecipientRefs],\n registeredTenantRecipientRefs: [...classification.registeredTenantRecipientRefs],\n declaredWithoutDataPathRefs: [...classification.declaredWithoutDataPathRefs],\n chosenProcessingRegions: chosenProcessingRegionsOf(inputs.recipientPopulation),\n /*\n * Per recipient: the categories its DECLARED flows carry, and the purposes its choice links to (#1709). A\n * recipient whose flow declares no field map carries `categoriesNotDerivable` — the notice must say what is\n * not established rather than list nothing. The law asks for categories of data and of recipients (GDPR Art.\n * 30(1)(c), (d); Art. 13(1)(e)); stating which reach which is the practice that keeps them consistent.\n */\n recipientDisclosures: JSON.parse(JSON.stringify(deriveRecipientDisclosures({\n population: inputs.recipientPopulation,\n systemOfRecordFlows: inputs.systemOfRecordFlows,\n providerComplianceChoices: inputs.providerComplianceChoices,\n lawfulBases: inputs.operatorComplianceIdentity?.lawfulBases,\n }))) as DocumentFactValue,\n };\n}\n\n/**\n * The `chosenProcessingRegions` part of the recipients-and-processors fact (#3513): per provider whose compliance choice\n * names a region, that region and how it HOLDS — `enforced` (every call goes to the region's endpoint, or names the\n * region), `attested` (the operator's statement about its account at the vendor; no call selects it) or `neither` (the\n * provider does not say how the region is reached). The reading is `processingRegionHoldingOf` over the choice\n * assessment's `regionReach`, the same one the drafting brief renders, so a notice and the brief cannot state one region\n * differently. A region the product enforces is a property of the product; an attested one must be published as the\n * operator's statement, never as a fact about where the calls go.\n *\n * `null` when the providers' profiles could not be read: how a region is reached is then unknown, which must not read\n * as \"no region is enforced\".\n */\nfunction chosenProcessingRegionsOf(population: RecipientPopulation): DocumentFactValue {\n if (!population.complianceProfilesRead) return null;\n return population.complianceChoiceAssessments\n .filter((entry) => entry.choice.processingRegion !== undefined)\n .map((entry) => ({\n providerRef: entry.providerRef,\n processingRegion: entry.choice.processingRegion!,\n reach: entry.regionReach === null ? null : String(entry.regionReach),\n holds: String(processingRegionHoldingOf(entry.regionReach)),\n }));\n}\n\n/**\n * Each processing purpose and the basis relied on for it, with the balancing assessment where there is one.\n *\n * Answers nothing when no basis is declared: absent means nobody has decided, and \"no lawful basis\" is a\n * statement no function may make on the operator's behalf. The assessment travels with its basis because\n * Art. 13(1)(d) requires a notice relying on legitimate interests to state WHICH interests.\n */\nfunction computeLawfulBases(identity: ApplicationOperatorComplianceIdentity | undefined): DocumentFactValue | undefined {\n if (identity?.lawfulBases === undefined) return undefined;\n return {\n bases: identity.lawfulBases.map((entry) => ({\n purpose: entry.purpose,\n // The stable id recipients link to (#1709), so a drafter can join a recipient's purposes to this list.\n ...(entry.purposeRef === undefined ? {} : { purposeRef: entry.purposeRef }),\n basis: entry.basis,\n ...(entry.assessmentNote === undefined ? {} : { assessmentNote: entry.assessmentNote }),\n })),\n };\n}\n\n/**\n * How long each class of data is kept and why, which classes have no period yet, and what erasure does to\n * each resource's rows.\n *\n * The blueprint asks for both halves — the period and \"the verified deletion or anonymization behavior\" —\n * and they come from two declarations on two axes: the period is the app-level `dataRetention` schedule\n * over `DataRetentionClass`, the treatment is each resource's `retentionPolicy.mode`. Neither stands in for\n * the other: a confident paragraph about impersonalization reads as an answer about how long, which is why\n * the schedule exists at all.\n *\n * Answers nothing without a schedule (nobody has decided a period, and \"kept forever\" is not what silence\n * means) or when the resources could not be read (the treatment half would be missing, and a fact reading\n * as complete without it is the failure above). With both, undeclared classes and resources declaring no\n * treatment are PART of the answer, named, exactly as the recipients fact names its gaps: the schedule is\n * partial on purpose and a notice marks the rest as owed.\n *\n * When the resources' retention bindings were readable (#1613), each period also names the resources bound\n * to it and the {@link RetentionPeriodMechanism}s that act on it — an EMPTY list is \"declared, not yet\n * enforced\", so a notice never describes a period nothing applies — and `rowLifetimes` says what ends every\n * resource's rows, so a notice can state the criteria where there is no period: \"while the account exists\" is an answer.\n * `resourcesWithUndecidedLifetime` names the ones nothing ends. Those are what a notice marks as owed.\n */\nfunction computeRetentionRules(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const schedule = inputs.retentionSchedule;\n const treatments = inputs.resourceErasureTreatments;\n if (schedule === undefined || treatments === undefined) return undefined;\n const byResource = [...treatments].sort((left, right) => (left.resourceType < right.resourceType ? -1 : 1));\n // #1613: which resources bind each class, and which bind nothing. Only when the bindings were readable —\n // otherwise the fact names no mechanism rather than implying none exists.\n const bindings = inputs.resourceRetentionBindings;\n const boundByClass = new Map<string, string[]>();\n for (const binding of bindings ?? []) {\n if (!binding.retentionBinding) continue;\n const list = boundByClass.get(binding.retentionBinding.retentionClass) ?? [];\n list.push(binding.resourceType);\n boundByClass.set(binding.retentionBinding.retentionClass, list);\n }\n return {\n periods: Object.entries(schedule)\n .filter((entry): entry is [string, NonNullable<(typeof entry)[1]>] => entry[1] !== undefined)\n .map(([dataClass, period]) => {\n const bound = [...(boundByClass.get(dataClass) ?? [])].sort();\n return {\n dataClass,\n retentionDays: period.retentionDays,\n rationale: period.rationale,\n ...(bindings === undefined ? {} : {\n boundResourceTypes: bound,\n mechanisms: retentionPeriodMechanisms(dataClass as DataRetentionClass, bound.length) as string[],\n }),\n };\n })\n .sort((left, right) => (left.dataClass < right.dataClass ? -1 : 1)),\n ...(bindings === undefined ? {} : {\n // Only what was derived: a binding with no lifetime says nothing, rather than reading as undecided.\n rowLifetimes: groupResourceRowLifetimes(bindings.flatMap((binding) => (binding.rowLifetime === undefined ? [] : [[binding.resourceType, binding.rowLifetime] as const])))\n .map((group) => ({ lifetime: group.lifetime as string, resourceTypes: [...group.resourceTypes] })),\n resourcesWithUndecidedLifetime: bindings\n .filter((binding) => binding.rowLifetime === ResourceRowLifetime.UNDECIDED)\n .map((binding) => binding.resourceType)\n .sort(),\n }),\n classesWithoutDeclaredPeriod: [...undeclaredRetentionClasses(schedule)],\n erasureTreatments: byResource\n .filter((treatment) => treatment.erasureRetentionMode !== undefined)\n .map((treatment) => ({\n resourceType: treatment.resourceType,\n erasureRetentionMode: treatment.erasureRetentionMode as string,\n // #2960: what an account holder's erasure RUNS on the rows, beside what the resource declares. A notice states this.\n ...(treatment.erasureExecution === undefined ? {} : { accountHolderErasure: accountHolderErasureOf(treatment.erasureExecution) }),\n // #1635: the rows are kept because a statute requires it, until the period ends: RESTRICTED through an erasure,\n // or still in use where the resource says why. The notice names the ground and the law; it never says the erasure\n // is refused because of them.\n ...(treatment.statutoryRetention === undefined\n ? {}\n : {\n statutoryRetention: {\n ground: treatment.statutoryRetention.ground as string,\n rationale: treatment.statutoryRetention.rationale,\n ...(treatment.statutoryRetention.staysInUseBecause === undefined ? {} : { staysInUseBecause: treatment.statutoryRetention.staysInUseBecause }),\n },\n }),\n })),\n resourcesWithoutDeclaredErasureTreatment: byResource\n .filter((treatment) => treatment.erasureRetentionMode === undefined)\n .map((treatment) => treatment.resourceType),\n // #2960, only when the execution was derived. A resource with a declared treatment that an account holder's erasure\n // keeps as it is (the billing records, #2946; a person-without-account record, changed only when its own rows are\n // erased), and a resource that erasure changes although it declares no treatment (a dependent it deletes, a record a\n // severer changes). Without these two a notice drafted from the declarations over-claims one and under-reports the other.\n ...(byResource.some((treatment) => treatment.erasureExecution !== undefined) ? {\n keptAsTheyAreByAnAccountHoldersErasure: byResource\n .filter((treatment) => treatment.erasureRetentionMode !== undefined && treatment.erasureExecution !== undefined && !erasureExecutesAnything(treatment.erasureExecution))\n .map((treatment) => treatment.resourceType),\n changedByAnAccountHoldersErasureWithoutDeclaredTreatment: byResource\n .filter((treatment) => treatment.erasureRetentionMode === undefined && treatment.erasureExecution !== undefined && erasureExecutesAnything(treatment.erasureExecution))\n .map((treatment) => ({ resourceType: treatment.resourceType, ...accountHolderErasureOf(treatment.erasureExecution!) })),\n } : {}),\n };\n}\n\n/** Whether an account holder's erasure executes anything on a resource: as its subject, a graph disposition, or a severer (#2960). */\nfunction erasureExecutesAnything(execution: SubjectErasureExecutedTreatment): boolean {\n return execution.erasedAsTheSubject || execution.dispositions.length > 0 || execution.severerTreatments.length > 0;\n}\n\n/** The fact's statement of what an account holder's erasure runs on a resource (#2960). */\nfunction accountHolderErasureOf(execution: SubjectErasureExecutedTreatment): { erasedAsTheSubject: boolean; dispositions: string[]; severerTreatments: string[]; rowsKeptAsTheyAre: boolean } {\n return {\n erasedAsTheSubject: execution.erasedAsTheSubject,\n dispositions: [...execution.dispositions].map(String).sort(),\n severerTreatments: [...execution.severerTreatments].map(String).sort(),\n rowsKeptAsTheyAre: !erasureExecutesAnything(execution),\n };\n}\n\n/**\n * Which processors are reached by a transfer out of the jurisdictions the data comes from, and under which\n * safeguard for each origin jurisdiction.\n *\n * Built from the operator's per-entry `transferDetermination` in the processor register, never from the\n * regions: those are free text, and the framework cannot tell whether `United States` or `eu-west-1` lies\n * outside a declared jurisdiction. It answers NOTHING without a register (nobody has looked) or without an\n * operating jurisdiction (the origin is unknown).\n *\n * Otherwise every gap is PART of the answer, as in the recipients fact, because each is a true statement a\n * notice must make rather than a reason to say nothing:\n * - `undeterminedRecipients` — a register entry with no determination, and a configured recipient candidate\n * the register does not establish at all (the same classification the recipients fact uses). Data may be\n * leaving through either, so neither may be left out of what reads as the transfer position;\n * - `safeguardGaps` — a declared origin jurisdiction a TRANSFER names no safeguard for.\n * An EMPTY register with no configured recipient states that nothing is transferred through a processor;\n * the operator's own establishment is stated by `controller-and-contact`.\n *\n * `operatorHostingRegions` is WHERE the operator's own infrastructure holds the data\n * (`operatorComplianceIdentity.hostingRegions`, #2285), beside the processors' regions, because a register says\n * nothing about the operator's own processing. `null` means the operator has not declared it, and is stated as\n * such: never \"hosted nowhere\", and never a reason to round the position up to \"no international transfer\".\n * Whether a hosting region makes a transfer stays the operator's recorded determination, never computed here.\n *\n * `dataResidency` is the operator's declared residency (`operatorComplianceIdentity.dataResidency`, #2294), from the\n * typed declaration and never from prose: the territories, and for each vendor-hosted provider the region chosen, the\n * places its profile says that region processes in, and whether they lie inside the residency\n * (`dataResidencyEntriesOf`, the same derivation `wildo config sync` refuses with). `null` when no residency is declared,\n * which a notice states as no residency commitment. `providers` is `null` when the providers' profiles could not be\n * read: the territories are then the operator's commitment alone, and nothing says whether the vendors keep it.\n */\nfunction computeInternationalTransfers(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const register = inputs.processorRegister;\n const origins = inputs.operatingJurisdictionSlugs;\n if (register === undefined || origins === undefined) return undefined;\n const refOf = (processor: ApplicationProcessorRegister[\"processors\"][number]): string =>\n processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER ? processor.providerRef : processor.subprocessorRef;\n const classification = joinRecipientPopulationToRegister(inputs.recipientPopulation, register);\n const safeguardGaps: { processorRef: string; originJurisdictionSlug: string }[] = [];\n for (const processor of register.processors) {\n const determination = processor.transferDetermination;\n if (determination?.kind !== ProcessorTransferDeterminationKind.TRANSFER) continue;\n const covered = new Set(determination.safeguards.map((safeguard) => safeguard.originJurisdictionSlug));\n for (const origin of origins) if (!covered.has(origin)) safeguardGaps.push({ processorRef: refOf(processor), originJurisdictionSlug: origin });\n }\n const determined = register.processors.filter((processor) => processor.transferDetermination !== undefined);\n return {\n originJurisdictions: [...origins].sort(),\n processors: determined.map((processor) => ({\n processorRef: refOf(processor),\n legalEntityName: processor.legalEntityName,\n processingRegions: [...processor.processingRegions],\n // A JSON round trip for the same reason as the recipients fact: a field added to the determination later\n // must reach the fact without an edit here.\n transferDetermination: JSON.parse(JSON.stringify(processor.transferDetermination)) as DocumentFactValue,\n })),\n undeterminedRecipients: [\n ...register.processors.filter((processor) => processor.transferDetermination === undefined).map(refOf),\n ...classification.undeclaredProviderRefs,\n ],\n safeguardGaps,\n operatorHostingRegions: inputs.operatorComplianceIdentity?.hostingRegions === undefined ? null : [...inputs.operatorComplianceIdentity.hostingRegions],\n dataResidency: dataResidencyStatementOf(inputs),\n };\n}\n\n/** The `dataResidency` part of the international-transfers fact. See {@link computeInternationalTransfers}. */\nfunction dataResidencyStatementOf(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue {\n const residency = inputs.operatorComplianceIdentity?.dataResidency;\n if (residency === undefined) return null;\n return {\n territories: [...residency.territories],\n providers: inputs.recipientPopulation.complianceProfilesRead\n ? dataResidencyEntriesOf(inputs.recipientPopulation.complianceChoiceAssessments, residency).map((entry) => ({\n providerRef: entry.providerRef,\n processingRegion: entry.processingRegion,\n territories: entry.territories === null ? null : [...entry.territories],\n status: String(entry.status),\n }))\n : null,\n };\n}\n\n/**\n * Which rights a person holds, how they ask, how they are verified, who answers, and where they may complain.\n *\n * Every part is a declaration or follows from one. The rights and the complaint route follow from the law of\n * the regime each operating jurisdiction falls under, conditioned on the declared lawful bases\n * (`rightsUnderRegime`); the channel is `privacyContact`; the verification step is\n * `subjectRequestIdentityVerification`; who answers follows from the role the operator holds over each\n * population (`subjectRequestResponderFor`).\n *\n * Answers nothing when any of those declarations is missing, or when a joint controllership leaves \"who\n * answers\" to an arrangement nothing records. A jurisdiction no known regime reaches is NAMED in the answer\n * rather than withheld: the rights the application owes there are unknown to the framework, and a notice\n * must say so instead of presenting the known regimes as the whole.\n */\nfunction computeRightsAndComplaintRoute(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const identity = inputs.operatorComplianceIdentity;\n const origins = inputs.operatingJurisdictionSlugs;\n if (\n identity?.lawfulBases === undefined\n || identity.privacyContact === undefined\n || identity.roleAllocations === undefined\n || identity.subjectRequestIdentityVerification === undefined\n || origins === undefined\n ) {\n return undefined;\n }\n const responsibility = identity.roleAllocations.map((allocation) => ({ dataScope: allocation.dataScope, respondedBy: subjectRequestResponderFor(allocation.role) }));\n if (responsibility.some((entry) => entry.respondedBy === undefined)) return undefined;\n const sortedOrigins = [...origins].sort();\n const regimes = [...new Set(sortedOrigins.map((slug) => dataProtectionRegimeOf(slug)).filter((regime) => regime !== undefined))];\n return {\n regimes: regimes.map((regime) => ({\n regime,\n jurisdictions: sortedOrigins.filter((slug) => dataProtectionRegimeOf(slug) === regime),\n rights: rightsUnderRegime(regime, identity.lawfulBases!).map((entry) => ({ right: entry.right, provision: entry.provision, purposes: [...entry.purposes] })),\n complaintRoute: complaintRouteUnderRegime(regime),\n })),\n jurisdictionsWithoutKnownRegime: sortedOrigins.filter((slug) => dataProtectionRegimeOf(slug) === undefined),\n requestChannel: identity.privacyContact,\n identityVerification: identity.subjectRequestIdentityVerification,\n responseOwnership: responsibility.map((entry) => ({ dataScope: entry.dataScope, respondedBy: entry.respondedBy as string })),\n };\n}\n\n/**\n * Per declared class, whether its period is ENFORCED, only DECLARED, or FAILING — read from the records the\n * retention-class sweep wrote (#1636). The first `RUNTIME_EVIDENCE` answer.\n *\n * Answers nothing unless the schedule, the bindings AND the evidence were all readable: without the schedule\n * there is no declared class to speak of, without the bindings \"no bound resource\" cannot be told from \"could\n * not read them\", and without the evidence nothing is known about what the product did. Each absence leaves the\n * fact absent, so the clause resting on it is marked owed rather than reading \"declared, not enforced\" about an\n * application whose records simply were not collected.\n */\nfunction computeRetentionEnforcement(inputs: ApplicationDocumentFactComputationInputs): ComputedDocumentFactAnswer | undefined {\n const evidence = inputs.retentionEnforcementEvidence;\n if (inputs.retentionSchedule === undefined || inputs.resourceRetentionBindings === undefined || evidence === undefined) return undefined;\n const observedAt = new Date(evidence.window.to);\n if (Number.isNaN(observedAt.getTime())) return undefined;\n const facts = deriveRetentionEnforcementFacts({\n evidence,\n schedule: inputs.retentionSchedule,\n bindings: inputs.resourceRetentionBindings,\n observedAt,\n sweepIntervalMs: RETENTION_CLASS_SWEEP_INTERVAL_MS,\n });\n // Per class, the mechanisms that act on it and that these records CANNOT evidence (#1636 review): the audit trail\n // is archived, never swept, and file bytes are destroyed by the files cleanup. So ENFORCED on AUDIT_LOGS or FILES\n // speaks only for the resources bound to the class — the side tables — and a notice must not read it as covering\n // the audit trail or the stored files. Derived from `retentionPeriodMechanisms`, the same table retention-rules uses.\n const classes = facts.classes.map((entry) => ({\n ...entry,\n mechanismsNotEvidencedByTheseRecords: retentionPeriodMechanisms(entry.dataClass as DataRetentionClass, entry.boundResourceTypes.length)\n .filter((mechanism) => mechanism !== RetentionPeriodMechanism.RETENTION_CLASS_SWEEP) as string[],\n }));\n // A JSON round trip: the derivation's answer is JSON-shaped by construction and drops absent optional keys.\n return {\n fact: ComputedDocumentFact.RETENTION_ENFORCEMENT,\n value: JSON.parse(JSON.stringify({ ...facts, classes })) as DocumentFactValue,\n observedAt: facts.observedAt,\n };\n}\n\n/** One source of personal data the application did not collect from the person: one resource bound to, or piped from, a system of record. */\nexport interface SystemOfRecordSource {\n readonly system: string;\n /** `systemsOfRecord.<name>.vendor`, or `null` when the instance declares none. */\n readonly vendor: string | null;\n readonly resourceType: string;\n readonly flowKind: SystemOfRecordDataFlowKind;\n /**\n * The instance's declared `personalDataOrigin` — the Art. 14(2)(f) \"publicly accessible sources\" half. ABSENT when the\n * instance states none: that half is then owed, and is never read as \"not from public sources\".\n */\n readonly personalDataOrigin?: SystemOfRecordPersonalDataOrigin;\n readonly categories: readonly string[];\n /** The categories that come from the source on EVERY row; equal to `categories` when no field is conditional (#2119). */\n readonly unconditionalCategories: readonly string[];\n /** Per condition, the categories that come from the source only under it (#2119) — the clause words them conditionally. */\n readonly conditionalCategories: readonly ConditionallyHeldCategories[];\n readonly uncategorizedPersonalFields: readonly string[];\n readonly purposes: readonly { readonly purposeRef: string; readonly purpose: string; readonly basis: string }[];\n readonly purposeRefsNamingNoPurpose: readonly string[];\n /** `true` for a pipeline (a local copy), `false` for a read-through binding (nothing kept locally). */\n readonly copiedLocally: boolean;\n /**\n * Who answers a person's requests about these records (#2561), the flow's {@link SystemOfRecordDataFlow.subjectRightsPosture}:\n * the source system, which decides and answers for its own records (HANDLED_AT_SOURCE); the source, with the application\n * also forwarding an erasure to it, best effort (FORWARDED_TO_SOURCE); the source for its own records and the application\n * for the copy it keeps and erases itself (OWNED_COPY). The notice states it beside the source — never a guess at what\n * the source does.\n */\n readonly subjectRightsPosture: SystemOfRecordSubjectRightsPosture;\n /** For a copy, when the bindings were read: no retention class and no `.ttl()` (#1613). Absent otherwise. */\n readonly keptUntilErased?: boolean;\n /** For a copy bound to a retention class, that class. */\n readonly retentionClass?: string;\n}\n\n/**\n * Where personal data the application did NOT collect from the person comes from: every resource bound to, or piped\n * from, a declared system of record (#1745) — the ONE derivation the `system-of-record-sources` fact and the evidence\n * collector both call, so what a notice states and what the evidence measures cannot disagree.\n *\n * A notice owes, for such data, \"from which source the personal data originate, and if applicable, whether it came\n * from publicly accessible sources\", beside the categories and the purposes and legal basis for the processing.\n * spec-cite: GDPR Art. 14(2)(f), 14(1)(c) and 14(1)(d), https://gdpr-info.eu/art-14-gdpr/.\n *\n * Every part of an entry is a declaration or follows from one:\n * - the SOURCE is the instance the binding names, with its declared vendor — the PROXIMATE source, a deployment the\n * operator runs and reads with its own service identity (#1049 Q2);\n * - the CATEGORIES are the `.dataCategories()` of the fields that come from it ({@link SystemOfRecordDataFlow}), and\n * personal fields that name none are named, so a list that is incomplete says so;\n * - the PURPOSES are the ones the binding links (`binding.purposeRefs`), resolved against the lawful bases; a flow that\n * links none states no purpose, and a ref naming no declared purpose is reported as a broken link;\n * - for a PIPELINE (a local copy), whether the copied rows are kept until erased — no retention class and no `.ttl()`\n * (#1613), which is exactly where a copy of a record the source keeps for years goes unnoticed. A read-through\n * binding keeps nothing locally, so it states `copiedLocally: false` instead.\n *\n * A flow that carries no personal data is not a source of personal data and is left out.\n *\n * Whether the data ORIGINATED from publicly accessible sources (the second half of Art. 14(2)(f)) is not a property of\n * the binding: an ERP contact may have been entered from a public register or website. The operator states it per\n * instance (`systemsOfRecord.<name>.personalDataOrigin`) and the entry carries that declaration; an instance stating\n * none gives an entry with no origin, and a notice marks that half owed. Rejected: a constant\n * `publiclyAccessibleSource: false`, which would state a legal fact about the data's origin that nothing derives.\n *\n * Answers `[]` when no system of record is declared — a true statement, not a gap, since no binding can name an\n * undeclared instance. Answers `undefined` when instances are declared and the flows could not be read: an empty list\n * then would say \"nothing is obtained from them\" about an application whose declarations were simply not read.\n */\nexport function deriveSystemOfRecordSources(inputs: {\n readonly recipientPopulation: RecipientPopulation;\n readonly systemOfRecordFlows: readonly SystemOfRecordDataFlow[] | undefined;\n readonly systemOfRecordVendors: Readonly<Record<string, string>> | undefined;\n readonly systemOfRecordPersonalDataOrigins?: Readonly<Record<string, SystemOfRecordPersonalDataOrigin>> | undefined;\n readonly lawfulBases: readonly OperatorLawfulBasis[] | undefined;\n readonly resourceRetentionBindings?: readonly ResourceRetentionBindingFact[] | undefined;\n}): readonly SystemOfRecordSource[] | undefined {\n const declaresInstance = inputs.recipientPopulation.members.some((member) => member.kind === RecipientPopulationMemberKind.SYSTEM_OF_RECORD);\n if (!declaresInstance) return [];\n const flows = inputs.systemOfRecordFlows;\n if (flows === undefined) return undefined;\n const basesByRef = new Map((inputs.lawfulBases ?? []).flatMap((entry) => (entry.purposeRef === undefined ? [] : [[entry.purposeRef, entry] as const])));\n const bindingByResource = inputs.resourceRetentionBindings === undefined ? undefined\n : new Map(inputs.resourceRetentionBindings.map((binding) => [binding.resourceType, binding]));\n return flows\n // A system an OUTBOUND pipeline only sends to is not a SOURCE of what it receives (#2560): stating it here would tell\n // a reader the data was obtained from it. What it receives is the recipient side's statement.\n .filter((flow) => flow.kind !== SystemOfRecordDataFlowKind.OUTBOUND_PIPELINE)\n .filter((flow) => flow.categories.length > 0 || flow.uncategorizedPersonalFields.length > 0)\n .map((flow): SystemOfRecordSource => {\n const copied = flow.kind === SystemOfRecordDataFlowKind.PIPELINE;\n const binding = bindingByResource?.get(flow.resourceType);\n const personalDataOrigin = inputs.systemOfRecordPersonalDataOrigins?.[flow.system];\n return {\n system: flow.system,\n vendor: inputs.systemOfRecordVendors?.[flow.system] ?? null,\n resourceType: flow.resourceType,\n flowKind: flow.kind,\n ...(personalDataOrigin === undefined ? {} : { personalDataOrigin }),\n categories: [...flow.categories],\n unconditionalCategories: [...flow.unconditionalCategories],\n conditionalCategories: flow.conditionalCategories.map((entry) => ({ condition: entry.condition, categories: [...entry.categories] })),\n uncategorizedPersonalFields: [...flow.uncategorizedPersonalFields],\n purposes: flow.purposeRefs.flatMap((purposeRef) => {\n const basis = basesByRef.get(purposeRef);\n return basis === undefined ? [] : [{ purposeRef, purpose: basis.purpose, basis: basis.basis }];\n }),\n purposeRefsNamingNoPurpose: flow.purposeRefs.filter((purposeRef) => !basesByRef.has(purposeRef)),\n copiedLocally: copied,\n subjectRightsPosture: flow.subjectRightsPosture,\n // Only for a copy, and only when the bindings were readable: otherwise \"kept until erased\" cannot be told from\n // \"not read\", and the key is absent rather than false.\n ...(copied && binding !== undefined\n ? { keptUntilErased: isKeptUntilErased(binding), ...(binding.retentionBinding === undefined ? {} : { retentionClass: binding.retentionBinding.retentionClass }) }\n : {}),\n };\n })\n .sort((left, right) => (`${left.system}/${left.resourceType}/${left.flowKind}` < `${right.system}/${right.resourceType}/${right.flowKind}` ? -1 : 1));\n}\n\n/** The `system-of-record-sources` fact: {@link deriveSystemOfRecordSources}, JSON-shaped. */\nfunction computeSystemOfRecordSources(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const sources = deriveSystemOfRecordSources({\n recipientPopulation: inputs.recipientPopulation,\n systemOfRecordFlows: inputs.systemOfRecordFlows,\n systemOfRecordVendors: inputs.systemOfRecordVendors,\n systemOfRecordPersonalDataOrigins: inputs.systemOfRecordPersonalDataOrigins,\n lawfulBases: inputs.operatorComplianceIdentity?.lawfulBases,\n resourceRetentionBindings: inputs.resourceRetentionBindings,\n });\n // A JSON round trip: the derivation's answer is JSON-shaped by construction and drops absent optional keys.\n return sources === undefined ? undefined : (JSON.parse(JSON.stringify({ sources })) as DocumentFactValue);\n}\n\n/** The `ai-use-inventory` fact: {@link deriveAiUseInventory}, KNOWN or NOT_APPLICABLE. */\nfunction computeAiUseInventory(inputs: ApplicationDocumentFactComputationInputs): ComputedDocumentFactAnswer | undefined {\n const answer = deriveAiUseInventory({\n aiUses: inputs.aiUses,\n recipientPopulation: inputs.recipientPopulation,\n processorRegister: inputs.processorRegister,\n operatingJurisdictionSlugs: inputs.operatingJurisdictionSlugs,\n });\n if (answer === undefined) return undefined;\n // `in`, not the `applies` flag: this package compiles without strictNullChecks, where a boolean discriminant does not narrow.\n return \"notApplicableReason\" in answer\n ? { fact: ComputedDocumentFact.AI_USE_INVENTORY, notApplicableReason: answer.notApplicableReason }\n : { fact: ComputedDocumentFact.AI_USE_INVENTORY, value: answer.value as DocumentFactValue };\n}\n\n/** The `ai-content-guardrails` fact: {@link deriveAiContentGuardrailFacts}, RUNTIME_EVIDENCE as of its window's end. */\nfunction computeAiContentGuardrails(inputs: ApplicationDocumentFactComputationInputs): ComputedDocumentFactAnswer | undefined {\n const answer = deriveAiContentGuardrailFacts({ aiUses: inputs.aiUses, evidence: inputs.aiContentGuardrailEvidence });\n return answer === undefined\n ? undefined\n : { fact: ComputedDocumentFact.AI_CONTENT_GUARDRAILS, value: answer.value as DocumentFactValue, observedAt: answer.observedAt };\n}\n\n/** Every computed fact the inputs can answer, in vocabulary order. */\nexport function computeApplicationDocumentFacts(inputs: ApplicationDocumentFactComputationInputs): readonly ComputedDocumentFactAnswer[] {\n const declared = (fact: ComputedDocumentFact, value: DocumentFactValue | undefined): ComputedDocumentFactAnswer | undefined =>\n value === undefined ? undefined : { fact, value };\n const computers: Readonly<Record<ComputedDocumentFact, () => ComputedDocumentFactAnswer | undefined>> = {\n [ComputedDocumentFact.CONTROLLER_AND_CONTACT]: () => declared(ComputedDocumentFact.CONTROLLER_AND_CONTACT, computeControllerAndContact(inputs.operatorComplianceIdentity)),\n [ComputedDocumentFact.RECIPIENTS_AND_PROCESSORS]: () => declared(ComputedDocumentFact.RECIPIENTS_AND_PROCESSORS, computeRecipientsAndProcessors(inputs)),\n [ComputedDocumentFact.LAWFUL_BASES]: () => declared(ComputedDocumentFact.LAWFUL_BASES, computeLawfulBases(inputs.operatorComplianceIdentity)),\n [ComputedDocumentFact.RETENTION_RULES]: () => declared(ComputedDocumentFact.RETENTION_RULES, computeRetentionRules(inputs)),\n [ComputedDocumentFact.INTERNATIONAL_TRANSFERS]: () => declared(ComputedDocumentFact.INTERNATIONAL_TRANSFERS, computeInternationalTransfers(inputs)),\n [ComputedDocumentFact.RIGHTS_AND_COMPLAINT_ROUTE]: () => declared(ComputedDocumentFact.RIGHTS_AND_COMPLAINT_ROUTE, computeRightsAndComplaintRoute(inputs)),\n [ComputedDocumentFact.RETENTION_ENFORCEMENT]: () => computeRetentionEnforcement(inputs),\n [ComputedDocumentFact.SYSTEM_OF_RECORD_SOURCES]: () => declared(ComputedDocumentFact.SYSTEM_OF_RECORD_SOURCES, computeSystemOfRecordSources(inputs)),\n [ComputedDocumentFact.AI_USE_INVENTORY]: () => computeAiUseInventory(inputs),\n [ComputedDocumentFact.AI_CONTENT_GUARDRAILS]: () => computeAiContentGuardrails(inputs),\n };\n return Object.values(ComputedDocumentFact).flatMap((fact) => {\n const answer = computers[fact]();\n return answer === undefined ? [] : [answer];\n });\n}\n\n/**\n * The derived facts with the computed ones laid over them — what a reader of the application's facts sees.\n *\n * A computed answer REPLACES any declaration of the same fact, whatever its scope. A stored copy is refused\n * by the family validator, so replacing it is not a precedence rule: the stored copy is never the answer.\n * Declared facts pass through untouched, and the computed declarations adopt the stored file's governance\n * scope and specification ref, so one document reads one scope.\n *\n * ## Only over a family that exists\n *\n * `stored` is required. An application that has not produced its facts yet has nothing to enrich, and a\n * facts set synthesized from the computed ones alone would change what every reader concludes: \"no facts\n * produced yet\" makes a citation check skip, while \"declares only these two\" makes it refuse every other\n * citation. The computed facts join the application's facts; they do not stand in for them.\n */\n/**\n * The authority a computed answer is stamped with: the fact's tier from {@link COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS},\n * never a default. A RUNTIME_EVIDENCE fact carries the instant its evidence describes; one produced without\n * that instant is a defect in its computation and is refused here rather than stamped as specification.\n */\nfunction computedFactAuthority(answer: ComputedDocumentFactAnswer) {\n const common = { authorityRef: `document-fact-authority:${answer.fact}`, authorityVersion: 1 };\n if (COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS[answer.fact] === AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE) {\n if (answer.observedAt === undefined) throw new Error(`Computed fact \"${answer.fact}\" is runtime evidence and was produced without its observedAt instant`);\n return { factAuthorityKind: AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE, ...common, observedAt: answer.observedAt };\n }\n return { factAuthorityKind: AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION, ...common };\n}\n\nexport function overlayComputedDocumentFacts(\n stored: ApplicationDocumentFactSpecification,\n answers: readonly ComputedDocumentFactAnswer[],\n): ApplicationDocumentFactSpecification {\n const declarationRefOf = (fact: ComputedDocumentFact): string => `document-fact-declaration:${fact}`;\n const everyComputedDeclarationRef = new Set(Object.values(ComputedDocumentFact).map(declarationRefOf));\n // A stored copy of ANY computed fact is dropped, answered or not (#1636 review). It used to be dropped only\n // when the runtime had an answer to replace it with, so an unanswered fact let the copy through — and for\n // `retention-enforcement` that is a typed \"ENFORCED\" under RUNTIME_EVIDENCE authority reaching a notice\n // whose records were never collected. A stored copy is never the answer; absent is.\n const isComputedCopy = (declaration: ApplicationDocumentFactSpecification[\"declarations\"][number]): boolean =>\n computedDocumentFactOf(declaration.factRef) !== undefined || everyComputedDeclarationRef.has(declaration.declarationRef);\n if (answers.length === 0 && !stored.declarations.some(isComputedCopy)) return stored;\n // The family schema requires at least one declaration, so a parsed specification always has a first.\n const governanceScope = stored.declarations[0]!.governanceScope;\n let kept = stored.declarations.filter((declaration) => !isComputedCopy(declaration));\n if (kept.length === 0 && answers.length === 0) {\n // Degenerate: the file holds nothing but copies of computed facts, and nothing was computed. The family\n // cannot be empty, so keep the copies that claim no runtime evidence (the validator reports them at every\n // landing) and never one that claims RUNTIME_EVIDENCE. A file of runtime-evidence copies alone is returned\n // as it is — the one residual, and one only a hand edit could produce (landing validation reports it as\n // DOCUMENT_FACT_IS_COMPUTED). It exists because the stored-file schema must admit RUNTIME_EVIDENCE for the\n // overlaid view to validate; the clean closure is a separate schema for the overlaid view, keeping that tier\n // out of the stored-file schema — not done yet, and recorded here rather than left implicit.\n kept = stored.declarations.filter((declaration) => declaration.authority?.factAuthorityKind !== AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE);\n if (kept.length === 0) return stored;\n }\n const computed = answers.map((answer) => ({\n declarationRef: declarationRefOf(answer.fact),\n declarationVersion: 1,\n factRef: `document-fact:${answer.fact}`,\n factVersion: 1,\n governanceScope,\n sensitivityRef: COMPUTED_DOCUMENT_FACT_SENSITIVITY_REFS[answer.fact],\n authority: computedFactAuthority(answer),\n // A computed NOT_APPLICABLE is a recorded finding with its reason (#2847), which the family schema carries as is.\n ...(answer.notApplicableReason !== undefined\n ? { resolutionKind: ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE, reason: answer.notApplicableReason }\n : { resolutionKind: ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN, value: answer.value }),\n }));\n const declarations = [...kept, ...computed].sort((left, right) =>\n `${left.declarationRef}@${left.declarationVersion}` < `${right.declarationRef}@${right.declarationVersion}` ? -1 : 1,\n );\n return ApplicationDocumentFactSpecificationSchema.parse({\n schemaVersion: 1,\n specificationRef: stored.specificationRef,\n specificationVersion: stored.specificationVersion,\n declarations,\n });\n}\n"]}
1
+ {"version":3,"file":"computed-document-facts.schemas.js","sourceRoot":"","sources":["../../../../src/_core/compliance-documents/computed-document-facts.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,iCAAiC,GAYlC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,0DAA0D,EAC1D,0CAA0C,EAC1C,sCAAsC,EACtC,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,iGAAiG,CAAC;AACzG,OAAO,EAAE,kCAAkC,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EA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KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;KAC/G,CAAC,CAAC,CAAC;IACJ,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAC/D,GAAG,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,kBAAkB,EAAE,GAAG,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACrH,CAAC;IACF,OAAO,0CAA0C,CAAC,KAAK,CAAC;QACtD,aAAa,EAAE,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;QACjD,YAAY;KACb,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n complaintRouteUnderRegime,\n dataResidencyEntriesOf,\n dataProtectionRegimeOf,\n processingRegionHoldingOf,\n ProviderDataResidencyStatus,\n OperatorProcessingRole,\n rightsUnderRegime,\n subjectRequestResponderFor,\n DataRetentionClass,\n undeclaredRetentionClasses,\n groupResourceRowLifetimes,\n isKeptUntilErased,\n ResourceRowLifetime,\n RETENTION_CLASS_SWEEP_INTERVAL_MS,\n type ApplicationOperatorComplianceIdentity,\n type OperatorLawfulBasis,\n type ApplicationProviderComplianceChoices,\n type RetentionEnforcementEvidence,\n type ApplicationRetentionSchedule,\n type ErasureRetentionMode,\n type ResourceRetentionBinding,\n type ResourceStatutoryRetention,\n type SystemOfRecordPersonalDataOrigin,\n type SystemOfRecordSubjectRightsPosture,\n type SubjectErasureExecutedTreatment,\n} from \"@wildo-ai/saas-models\";\n\nimport {\n ApplicationAssuranceDocumentFactContributionResolutionKind,\n ApplicationDocumentFactSpecificationSchema,\n COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS,\n ComputedDocumentFact,\n computedDocumentFactOf,\n type ApplicationDerivedDocumentFactDeclaration,\n type ApplicationDocumentFactSpecification,\n} from \"../../application-creation/application-document-fact-specification.application-creation.schemas\";\nimport { AssuranceDocumentFactAuthorityKind } from \"../../assurance.exports\";\nimport {\n processorProcessingRegions,\n ProcessorRegisterEntryKind,\n ProcessorTransferDeterminationKind,\n type ApplicationProcessorRegister,\n} from \"./processor-register.schemas\";\nimport { joinRecipientPopulationToRegister, RecipientPopulationMemberKind, type RecipientPopulation } from \"./recipient-population.schemas\";\nimport { deriveRecipientDisclosures, SystemOfRecordDataFlowKind, type ConditionallyHeldCategories, type SystemOfRecordDataFlow } from \"./recipient-disclosures.schemas\";\nimport { deriveRetentionEnforcementFacts } from \"./retention-enforcement-facts.schemas\";\nimport {\n deriveAiContentGuardrailFacts,\n deriveAiUseInventory,\n type AiContentGuardrailEvidence,\n type ApplicationAiUseInventoryInput,\n} from \"./ai-document-facts.schemas\";\n\n/**\n * Computing the {@link ComputedDocumentFact} members, and laying them over the facts a file declares.\n *\n * See the vocabulary's own JSDoc for why these facts are computed at read and never stored. This module\n * is the one place their values are built: the companion calls it where the application's facts are\n * read, and nothing writes its output to disk.\n */\n\n/** The value type a KNOWN derived declaration carries. */\ntype DocumentFactValue = Extract<\n ApplicationDerivedDocumentFactDeclaration,\n { resolutionKind: ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN }\n>[\"value\"];\n\n/** The typed declarations the computed facts are read from. Each is `undefined` when the application declares none. */\nexport interface ApplicationDocumentFactComputationInputs {\n readonly operatorComplianceIdentity: ApplicationOperatorComplianceIdentity | undefined;\n readonly processorRegister: ApplicationProcessorRegister | undefined;\n /**\n * WHO receives personal data, from {@link computeRecipientPopulation} — the same population the evidence\n * collector and the drafting brief read, so the three cannot disagree about who a recipient is (#1707).\n */\n readonly recipientPopulation: RecipientPopulation;\n /**\n * The system-of-record flows every resource declares (#1709), read off the materialized resources. OPTIONAL:\n * `undefined` means they could not be read, and each system-of-record recipient then reports its categories as not\n * derivable rather than as none.\n */\n readonly systemOfRecordFlows?: readonly SystemOfRecordDataFlow[] | undefined;\n /**\n * The `systemsOfRecord.<name>.vendor` of each declared instance (#1745), from {@link systemOfRecordVendorsOf} — what\n * the `system-of-record-sources` fact names beside the instance. OPTIONAL: an instance absent here is stated with no\n * vendor rather than guessed.\n */\n readonly systemOfRecordVendors?: Readonly<Record<string, string>> | undefined;\n /**\n * The `systemsOfRecord.<name>.personalDataOrigin` of each instance that declares one (#1745), from\n * `systemOfRecordPersonalDataOriginsOf` — whether its personal data can have come from publicly accessible sources.\n * An instance absent here has not stated it, and its sources carry no origin, so the notice marks it owed.\n */\n readonly systemOfRecordPersonalDataOrigins?: Readonly<Record<string, SystemOfRecordPersonalDataOrigin>> | undefined;\n /** `providerComplianceChoices`, read for the purposes each recipient links to (#1709). */\n readonly providerComplianceChoices?: ApplicationProviderComplianceChoices | undefined;\n /** `dataRetention` — the period per data class. Partial by design; absent means no schedule was declared. */\n readonly retentionSchedule: ApplicationRetentionSchedule | undefined;\n /**\n * What erasure does to each resource's rows, as the resources declare it. `undefined` when the resources\n * could not be read, which is not the same as \"none declared\" and must answer nothing.\n */\n readonly resourceErasureTreatments: readonly ResourceErasureTreatment[] | undefined;\n /**\n * How long each resource's rows are kept, as the resources declare it (#1613): its retention-class\n * binding, and whether a fixed `.ttl()` deletes its rows instead. OPTIONAL and separate from the\n * erasure treatments on purpose — the two are different axes. `undefined` means the bindings could not\n * be read, and the fact then states no mechanism rather than claiming none exists.\n */\n readonly resourceRetentionBindings?: readonly ResourceRetentionBindingFact[] | undefined;\n /** The `operatingJurisdictions` slugs — where the data comes FROM. `undefined` when none are declared. */\n readonly operatingJurisdictionSlugs: readonly string[] | undefined;\n /**\n * The retention-enforcement records of a window, as the evidence door answered them and the assurance\n * collector recorded them (#1636). OPTIONAL: `undefined` means no evidence was readable, and the\n * `retention-enforcement` fact then answers nothing — its clause is marked owed rather than claiming either\n * enforcement or its absence.\n */\n readonly retentionEnforcementEvidence?: RetentionEnforcementEvidence | undefined;\n /**\n * The application's AI-use declarations (#2838), read through the agent-population door, with the contracted-service\n * partition of its capabilities (#2847). OPTIONAL: `undefined` means they were not read, and `ai-use-inventory` and\n * `ai-content-guardrails` then answer nothing rather than \"no AI\".\n */\n readonly aiUses?: ApplicationAiUseInventoryInput | undefined;\n /**\n * The agent-operation evidence and guardrail audit-event measurements the assurance collectors committed (#2847).\n * OPTIONAL: `undefined` means none was readable, and `ai-content-guardrails` then answers nothing — its clause is\n * marked owed rather than claiming a guardrail ran or did not.\n */\n readonly aiContentGuardrailEvidence?: AiContentGuardrailEvidence | undefined;\n}\n\n/** One resource's declared erasure treatment. `erasureRetentionMode` is absent when the resource declares none. */\nexport interface ResourceErasureTreatment {\n readonly resourceType: string;\n readonly erasureRetentionMode?: ErasureRetentionMode;\n /**\n * The statute that keeps the rows (#1635). Present only where the resource declares\n * `retentionPolicy.statutoryRetention`. An erasure restricts those rows until their period ends, unless it also\n * carries `staysInUseBecause`: such a record stays in use, and a notice must say that rather than that it is hidden.\n */\n readonly statutoryRetention?: ResourceStatutoryRetention;\n /**\n * What an ACCOUNT HOLDER's erasure (a `users` subject) executes on these rows (#2960): whether they are that erasure's\n * subject, the dispositions of the erasure-graph edges that reach the resource, and the treatments the engine's\n * subject-reference severers report for it. All empty means that erasure keeps the rows as they are, whatever\n * {@link erasureRetentionMode} declares. It says nothing about erasing the resource's OWN rows as a subject (a CRM\n * contact asking to be erased), which applies the declared mode. Absent when the producer could not derive it; the\n * fact then states the declared mode alone, and says nothing about what runs.\n */\n readonly erasureExecution?: SubjectErasureExecutedTreatment;\n}\n\n/** One resource's retention binding, as the retention-rules fact reads it. */\nexport interface ResourceRetentionBindingFact {\n readonly resourceType: string;\n readonly retentionBinding?: ResourceRetentionBinding;\n readonly declaresRowTtl: boolean;\n /** What ends the resource's rows, as `deriveResourceRowLifetimes` answers over the whole registry. Absent when it could not be read. */\n readonly rowLifetime?: ResourceRowLifetime;\n}\n\n/**\n * WHAT deletes data of a declared class when its period ends — the mechanism a retention clause may name.\n *\n * A statement about the application's CONFIGURATION (which mechanism the declarations wire up), not\n * runtime evidence that the mechanism ran: that is `ComputedDocumentFact.RETENTION_ENFORCEMENT`, computed\n * from the sweep's records (#1636). An empty list here means no mechanism is even wired for the class — a\n * notice must not describe a period nothing applies.\n */\nexport enum RetentionPeriodMechanism {\n /** At least one resource binds the class; the retention-class sweep deletes its rows past the period. */\n RETENTION_CLASS_SWEEP = \"RETENTION_CLASS_SWEEP\",\n /** The FILES class: file bytes released from their rows are destroyed by the files cleanup after the period. */\n FILES_CLEANUP = \"FILES_CLEANUP\",\n /**\n * The AUDIT_LOGS class: the audit trail is IMMUTABLE and never deleted; the period is its live-store\n * horizon, after which records are copied to the audit archive. A notice must not say audit records\n * are deleted.\n */\n AUDIT_ARCHIVAL = \"AUDIT_ARCHIVAL\",\n}\n\n/** The mechanisms that act on a declared class, given which resources bind it. Pure, so it is pinned directly. */\nexport function retentionPeriodMechanisms(dataClass: DataRetentionClass, boundResourceCount: number): RetentionPeriodMechanism[] {\n const mechanisms: RetentionPeriodMechanism[] = [];\n if (boundResourceCount > 0) mechanisms.push(RetentionPeriodMechanism.RETENTION_CLASS_SWEEP);\n if (dataClass === DataRetentionClass.FILES) mechanisms.push(RetentionPeriodMechanism.FILES_CLEANUP);\n if (dataClass === DataRetentionClass.AUDIT_LOGS) mechanisms.push(RetentionPeriodMechanism.AUDIT_ARCHIVAL);\n return mechanisms;\n}\n\n/**\n * One computed fact's answer: KNOWN with a value, or a recorded NOT_APPLICABLE with its reason. A fact whose inputs are\n * absent produces no answer at all.\n *\n * NOT_APPLICABLE is a computed FINDING, never silence (#2847): the family schema requires its reason, a clause may cite\n * it, and it states the matching negative. `ai-use-inventory` answers it when no AI capability reaches the contracted\n * service. Written as a union where each arm forbids the other's field, so a reader of `value` still compiles and gets\n * `undefined` for a NOT_APPLICABLE answer, and no answer can carry both.\n */\nexport type ComputedDocumentFactAnswer = ComputedDocumentFactKnownAnswer | ComputedDocumentFactNotApplicableAnswer;\n\ninterface ComputedDocumentFactAnswerCommon {\n readonly fact: ComputedDocumentFact;\n /**\n * For a fact computed from RECORDS (`RUNTIME_EVIDENCE` in {@link COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS}):\n * the instant the evidence describes up to. Required for such a fact, absent for every other.\n */\n readonly observedAt?: string;\n}\n\nexport interface ComputedDocumentFactKnownAnswer extends ComputedDocumentFactAnswerCommon {\n readonly value: DocumentFactValue;\n readonly notApplicableReason?: never;\n}\n\nexport interface ComputedDocumentFactNotApplicableAnswer extends ComputedDocumentFactAnswerCommon {\n readonly notApplicableReason: string;\n readonly value?: never;\n}\n\n/**\n * How public each computed fact is. Every one is published in a privacy notice, so every one is public;\n * the table exists so a member added later must state its own sensitivity rather than inherit one.\n */\nconst COMPUTED_DOCUMENT_FACT_SENSITIVITY_REFS: Readonly<Record<ComputedDocumentFact, string>> = {\n [ComputedDocumentFact.CONTROLLER_AND_CONTACT]: \"sensitivity:public\",\n [ComputedDocumentFact.RECIPIENTS_AND_PROCESSORS]: \"sensitivity:public\",\n [ComputedDocumentFact.LAWFUL_BASES]: \"sensitivity:public\",\n [ComputedDocumentFact.RETENTION_RULES]: \"sensitivity:public\",\n [ComputedDocumentFact.INTERNATIONAL_TRANSFERS]: \"sensitivity:public\",\n [ComputedDocumentFact.RIGHTS_AND_COMPLAINT_ROUTE]: \"sensitivity:public\",\n // Counts and resource types, published in the notice's retention section.\n [ComputedDocumentFact.RETENTION_ENFORCEMENT]: \"sensitivity:public\",\n // Instance names, vendors, resource types and categories, published in the notice's data-and-sources section.\n [ComputedDocumentFact.SYSTEM_OF_RECORD_SOURCES]: \"sensitivity:public\",\n // Uses, domains, providers and their register identity, published in the notice's automated-decisions section and the terms.\n [ComputedDocumentFact.AI_USE_INVENTORY]: \"sensitivity:public\",\n // Agent refs, declared guardrails and counts, published in the terms' AI clause.\n [ComputedDocumentFact.AI_CONTENT_GUARDRAILS]: \"sensitivity:public\",\n};\n\n/**\n * The operator as controller or processor, and how a person reaches it about privacy.\n *\n * Answers nothing unless the legal entity, the privacy contact and the role allocations are ALL declared:\n * the blueprint's question is \"every party acting as controller … and the public privacy contact route\",\n * and a partial answer to it would read as a complete one.\n *\n * A `JOINT_CONTROLLER` allocation also answers nothing. The question asks for EVERY such party, and the\n * identity records the operator's role without naming the other controller, so no function can state\n * the whole answer. The fact stays absent and the clause is marked owed.\n */\nfunction computeControllerAndContact(identity: ApplicationOperatorComplianceIdentity | undefined): DocumentFactValue | undefined {\n if (identity?.legalEntityName === undefined || identity.privacyContact === undefined || identity.roleAllocations === undefined) {\n return undefined;\n }\n if (identity.roleAllocations.some((allocation) => allocation.role === OperatorProcessingRole.JOINT_CONTROLLER)) return undefined;\n return {\n legalEntityName: identity.legalEntityName,\n ...(identity.registeredAddress === undefined ? {} : { registeredAddress: identity.registeredAddress }),\n privacyContact: identity.privacyContact,\n ...(identity.representative === undefined\n ? {}\n : { representative: { name: identity.representative.name, address: identity.representative.address } }),\n roleAllocations: identity.roleAllocations.map((allocation) => ({ dataScope: allocation.dataScope, role: allocation.role })),\n };\n}\n\n/**\n * Who else receives personal data: the declared processors, plus every gap the join finds.\n *\n * Answers nothing when there is NO processor register. An absent register means nobody has looked,\n * and an answer computed from it would state \"no recipients\" about an application whose recipients\n * are simply undeclared.\n *\n * With a register, the gaps are part of the answer rather than a reason to withhold it. An operator\n * sub-processor with no established identity is IN USE, and saying so is true. A register entry that no\n * data path reaches is named so a drafter does not publish it. A self-hosted provider is named as\n * operator-run, so it is never mistaken for a third party. A TENANT recipient — a vendor reached only\n * through a tenant's or a person's own connected account — is named separately: it is the tenant's vendor,\n * not the operator's sub-processor, and a register entry for one is named as a misstatement. A declared\n * member no data path reaches is named so it is neither published nor lost. The classification is\n * {@link joinRecipientPopulationToRegister} over {@link computeRecipientPopulation}, the same one the\n * drafter's brief renders and the evidence collector measures. Each chosen processing region carries how it holds\n * (enforced, attested or neither), see {@link chosenProcessingRegionsOf}.\n */\nfunction computeRecipientsAndProcessors(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const register = inputs.processorRegister;\n if (register === undefined) return undefined;\n const classification = joinRecipientPopulationToRegister(inputs.recipientPopulation, register);\n return {\n // A JSON round trip rather than a hand-listed projection: the register is already JSON-shaped, and a\n // field added to it later must reach the fact without an edit here. It also drops absent optional keys.\n processors: JSON.parse(JSON.stringify(register.processors)) as DocumentFactValue,\n processingRegions: [...processorProcessingRegions(register)],\n configuredProvidersWithoutEstablishedIdentity: [...classification.undeclaredProviderRefs],\n registeredProvidersNotConfigured: [...classification.staleProviderRefs],\n operatorRunProviderRefs: [...classification.operatorRunProviderRefs],\n tenantRecipientRefs: [...classification.tenantRecipientRefs],\n registeredTenantRecipientRefs: [...classification.registeredTenantRecipientRefs],\n declaredWithoutDataPathRefs: [...classification.declaredWithoutDataPathRefs],\n chosenProcessingRegions: chosenProcessingRegionsOf(inputs.recipientPopulation),\n /*\n * Per recipient: the categories its DECLARED flows carry, and the purposes its choice links to (#1709). A\n * recipient whose flow declares no field map carries `categoriesNotDerivable` — the notice must say what is\n * not established rather than list nothing. The law asks for categories of data and of recipients (GDPR Art.\n * 30(1)(c), (d); Art. 13(1)(e)); stating which reach which is the practice that keeps them consistent.\n */\n recipientDisclosures: JSON.parse(JSON.stringify(deriveRecipientDisclosures({\n population: inputs.recipientPopulation,\n systemOfRecordFlows: inputs.systemOfRecordFlows,\n providerComplianceChoices: inputs.providerComplianceChoices,\n lawfulBases: inputs.operatorComplianceIdentity?.lawfulBases,\n }))) as DocumentFactValue,\n };\n}\n\n/**\n * The `chosenProcessingRegions` part of the recipients-and-processors fact (#3513): per provider whose compliance choice\n * names a region, that region and how it HOLDS — `enforced` (every call goes to the region's endpoint, or names the\n * region), `attested` (the operator's statement about its account at the vendor; no call selects it) or `neither` (the\n * provider does not say how the region is reached). The reading is `processingRegionHoldingOf` over the choice\n * assessment's `regionReach`, the same one the drafting brief renders, so a notice and the brief cannot state one region\n * differently. A region the product enforces is a property of the product; an attested one must be published as the\n * operator's statement, never as a fact about where the calls go.\n *\n * `null` when the providers' profiles could not be read: how a region is reached is then unknown, which must not read\n * as \"no region is enforced\".\n */\nfunction chosenProcessingRegionsOf(population: RecipientPopulation): DocumentFactValue {\n if (!population.complianceProfilesRead) return null;\n return population.complianceChoiceAssessments\n .filter((entry) => entry.choice.processingRegion !== undefined)\n .map((entry) => ({\n providerRef: entry.providerRef,\n processingRegion: entry.choice.processingRegion!,\n reach: entry.regionReach === null ? null : String(entry.regionReach),\n holds: String(processingRegionHoldingOf(entry.regionReach)),\n }));\n}\n\n/**\n * Each processing purpose and the basis relied on for it, with the balancing assessment where there is one.\n *\n * Answers nothing when no basis is declared: absent means nobody has decided, and \"no lawful basis\" is a\n * statement no function may make on the operator's behalf. The assessment travels with its basis because\n * Art. 13(1)(d) requires a notice relying on legitimate interests to state WHICH interests.\n */\nfunction computeLawfulBases(identity: ApplicationOperatorComplianceIdentity | undefined): DocumentFactValue | undefined {\n if (identity?.lawfulBases === undefined) return undefined;\n return {\n bases: identity.lawfulBases.map((entry) => ({\n purpose: entry.purpose,\n // The stable id recipients link to (#1709), so a drafter can join a recipient's purposes to this list.\n ...(entry.purposeRef === undefined ? {} : { purposeRef: entry.purposeRef }),\n basis: entry.basis,\n ...(entry.assessmentNote === undefined ? {} : { assessmentNote: entry.assessmentNote }),\n })),\n };\n}\n\n/**\n * How long each class of data is kept and why, which classes have no period yet, and what erasure does to\n * each resource's rows.\n *\n * The blueprint asks for both halves — the period and \"the verified deletion or anonymization behavior\" —\n * and they come from two declarations on two axes: the period is the app-level `dataRetention` schedule\n * over `DataRetentionClass`, the treatment is each resource's `retentionPolicy.mode`. Neither stands in for\n * the other: a confident paragraph about impersonalization reads as an answer about how long, which is why\n * the schedule exists at all.\n *\n * Answers nothing without a schedule (nobody has decided a period, and \"kept forever\" is not what silence\n * means) or when the resources could not be read (the treatment half would be missing, and a fact reading\n * as complete without it is the failure above). With both, undeclared classes and resources declaring no\n * treatment are PART of the answer, named, exactly as the recipients fact names its gaps: the schedule is\n * partial on purpose and a notice marks the rest as owed.\n *\n * When the resources' retention bindings were readable (#1613), each period also names the resources bound\n * to it and the {@link RetentionPeriodMechanism}s that act on it — an EMPTY list is \"declared, not yet\n * enforced\", so a notice never describes a period nothing applies — and `rowLifetimes` says what ends every\n * resource's rows, so a notice can state the criteria where there is no period: \"while the account exists\" is an answer.\n * `resourcesWithUndecidedLifetime` names the ones nothing ends. Those are what a notice marks as owed.\n */\nfunction computeRetentionRules(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const schedule = inputs.retentionSchedule;\n const treatments = inputs.resourceErasureTreatments;\n if (schedule === undefined || treatments === undefined) return undefined;\n const byResource = [...treatments].sort((left, right) => (left.resourceType < right.resourceType ? -1 : 1));\n // #1613: which resources bind each class, and which bind nothing. Only when the bindings were readable —\n // otherwise the fact names no mechanism rather than implying none exists.\n const bindings = inputs.resourceRetentionBindings;\n const boundByClass = new Map<string, string[]>();\n for (const binding of bindings ?? []) {\n if (!binding.retentionBinding) continue;\n const list = boundByClass.get(binding.retentionBinding.retentionClass) ?? [];\n list.push(binding.resourceType);\n boundByClass.set(binding.retentionBinding.retentionClass, list);\n }\n return {\n periods: Object.entries(schedule)\n .filter((entry): entry is [string, NonNullable<(typeof entry)[1]>] => entry[1] !== undefined)\n .map(([dataClass, period]) => {\n const bound = [...(boundByClass.get(dataClass) ?? [])].sort();\n return {\n dataClass,\n retentionDays: period.retentionDays,\n rationale: period.rationale,\n ...(bindings === undefined ? {} : {\n boundResourceTypes: bound,\n mechanisms: retentionPeriodMechanisms(dataClass as DataRetentionClass, bound.length) as string[],\n }),\n };\n })\n .sort((left, right) => (left.dataClass < right.dataClass ? -1 : 1)),\n ...(bindings === undefined ? {} : {\n // Only what was derived: a binding with no lifetime says nothing, rather than reading as undecided.\n rowLifetimes: groupResourceRowLifetimes(bindings.flatMap((binding) => (binding.rowLifetime === undefined ? [] : [[binding.resourceType, binding.rowLifetime] as const])))\n .map((group) => ({ lifetime: group.lifetime as string, resourceTypes: [...group.resourceTypes] })),\n resourcesWithUndecidedLifetime: bindings\n .filter((binding) => binding.rowLifetime === ResourceRowLifetime.UNDECIDED)\n .map((binding) => binding.resourceType)\n .sort(),\n }),\n classesWithoutDeclaredPeriod: [...undeclaredRetentionClasses(schedule)],\n erasureTreatments: byResource\n .filter((treatment) => treatment.erasureRetentionMode !== undefined)\n .map((treatment) => ({\n resourceType: treatment.resourceType,\n erasureRetentionMode: treatment.erasureRetentionMode as string,\n // #2960: what an account holder's erasure RUNS on the rows, beside what the resource declares. A notice states this.\n ...(treatment.erasureExecution === undefined ? {} : { accountHolderErasure: accountHolderErasureOf(treatment.erasureExecution) }),\n // #1635: the rows are kept because a statute requires it, until the period ends: RESTRICTED through an erasure,\n // or still in use where the resource says why. The notice names the ground and the law; it never says the erasure\n // is refused because of them.\n ...(treatment.statutoryRetention === undefined\n ? {}\n : {\n statutoryRetention: {\n ground: treatment.statutoryRetention.ground as string,\n rationale: treatment.statutoryRetention.rationale,\n ...(treatment.statutoryRetention.staysInUseBecause === undefined ? {} : { staysInUseBecause: treatment.statutoryRetention.staysInUseBecause }),\n },\n }),\n })),\n resourcesWithoutDeclaredErasureTreatment: byResource\n .filter((treatment) => treatment.erasureRetentionMode === undefined)\n .map((treatment) => treatment.resourceType),\n // #2960, only when the execution was derived. A resource with a declared treatment that an account holder's erasure\n // keeps as it is (the billing records, #2946; a person-without-account record, changed only when its own rows are\n // erased), and a resource that erasure changes although it declares no treatment (a dependent it deletes, a record a\n // severer changes). Without these two a notice drafted from the declarations over-claims one and under-reports the other.\n ...(byResource.some((treatment) => treatment.erasureExecution !== undefined) ? {\n keptAsTheyAreByAnAccountHoldersErasure: byResource\n .filter((treatment) => treatment.erasureRetentionMode !== undefined && treatment.erasureExecution !== undefined && !erasureExecutesAnything(treatment.erasureExecution))\n .map((treatment) => treatment.resourceType),\n changedByAnAccountHoldersErasureWithoutDeclaredTreatment: byResource\n .filter((treatment) => treatment.erasureRetentionMode === undefined && treatment.erasureExecution !== undefined && erasureExecutesAnything(treatment.erasureExecution))\n .map((treatment) => ({ resourceType: treatment.resourceType, ...accountHolderErasureOf(treatment.erasureExecution!) })),\n } : {}),\n };\n}\n\n/** Whether an account holder's erasure executes anything on a resource: as its subject, a graph disposition, or a severer (#2960). */\nfunction erasureExecutesAnything(execution: SubjectErasureExecutedTreatment): boolean {\n return execution.erasedAsTheSubject || execution.dispositions.length > 0 || execution.severerTreatments.length > 0;\n}\n\n/** The fact's statement of what an account holder's erasure runs on a resource (#2960). */\nfunction accountHolderErasureOf(execution: SubjectErasureExecutedTreatment): { erasedAsTheSubject: boolean; dispositions: string[]; severerTreatments: string[]; rowsKeptAsTheyAre: boolean } {\n return {\n erasedAsTheSubject: execution.erasedAsTheSubject,\n dispositions: [...execution.dispositions].map(String).sort(),\n severerTreatments: [...execution.severerTreatments].map(String).sort(),\n rowsKeptAsTheyAre: !erasureExecutesAnything(execution),\n };\n}\n\n/**\n * Which processors are reached by a transfer out of the jurisdictions the data comes from, and under which\n * safeguard for each origin jurisdiction.\n *\n * Built from the operator's per-entry `transferDetermination` in the processor register, never from the\n * regions: those are free text, and the framework cannot tell whether `United States` or `eu-west-1` lies\n * outside a declared jurisdiction. It answers NOTHING without a register (nobody has looked) or without an\n * operating jurisdiction (the origin is unknown).\n *\n * Otherwise every gap is PART of the answer, as in the recipients fact, because each is a true statement a\n * notice must make rather than a reason to say nothing:\n * - `undeterminedRecipients` — a register entry with no determination, and a configured recipient candidate\n * the register does not establish at all (the same classification the recipients fact uses). Data may be\n * leaving through either, so neither may be left out of what reads as the transfer position;\n * - `safeguardGaps` — a declared origin jurisdiction a TRANSFER names no safeguard for.\n * An EMPTY register with no configured recipient states that nothing is transferred through a processor;\n * the operator's own establishment is stated by `controller-and-contact`.\n *\n * `operatorHostingRegions` is WHERE the operator's own infrastructure holds the data\n * (`operatorComplianceIdentity.hostingRegions`, #2285), beside the processors' regions, because a register says\n * nothing about the operator's own processing. `null` means the operator has not declared it, and is stated as\n * such: never \"hosted nowhere\", and never a reason to round the position up to \"no international transfer\".\n * Whether a hosting region makes a transfer stays the operator's recorded determination, never computed here.\n *\n * `dataResidency` is the operator's declared residency (`operatorComplianceIdentity.dataResidency`, #2294), from the\n * typed declaration and never from prose: the territories, and for each vendor-hosted provider the region chosen, the\n * places its profile says that region processes in, and whether they lie inside the residency\n * (`dataResidencyEntriesOf`, the same derivation `wildo config sync` refuses with). `null` when no residency is declared,\n * which a notice states as no residency commitment. `providers` is `null` when the providers' profiles could not be\n * read: the territories are then the operator's commitment alone, and nothing says whether the vendors keep it.\n * `storedAtRestTerritories` is the opt-in weaker promise (`null` when not made); a provider whose status is\n * `inside-at-rest` carries `storageTerritories`, the places it keeps the data in while processing elsewhere, and\n * `storageCondition`, the account arrangement those places hold on (#3920), or `null`. `registerStatesNoStorageFor`\n * names each `inside-at-rest` provider whose processor-register entry has no `storedAtRestIn` (#3921), and each\n * processor carries its `storedAtRestIn` (or `null`).\n */\nfunction computeInternationalTransfers(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const register = inputs.processorRegister;\n const origins = inputs.operatingJurisdictionSlugs;\n if (register === undefined || origins === undefined) return undefined;\n const refOf = (processor: ApplicationProcessorRegister[\"processors\"][number]): string =>\n processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER ? processor.providerRef : processor.subprocessorRef;\n const classification = joinRecipientPopulationToRegister(inputs.recipientPopulation, register);\n const safeguardGaps: { processorRef: string; originJurisdictionSlug: string }[] = [];\n for (const processor of register.processors) {\n const determination = processor.transferDetermination;\n if (determination?.kind !== ProcessorTransferDeterminationKind.TRANSFER) continue;\n const covered = new Set(determination.safeguards.map((safeguard) => safeguard.originJurisdictionSlug));\n for (const origin of origins) if (!covered.has(origin)) safeguardGaps.push({ processorRef: refOf(processor), originJurisdictionSlug: origin });\n }\n const determined = register.processors.filter((processor) => processor.transferDetermination !== undefined);\n return {\n originJurisdictions: [...origins].sort(),\n processors: determined.map((processor) => ({\n processorRef: refOf(processor),\n legalEntityName: processor.legalEntityName,\n processingRegions: [...processor.processingRegions],\n storedAtRestIn: processor.storedAtRestIn === undefined ? null : [...processor.storedAtRestIn],\n // A JSON round trip for the same reason as the recipients fact: a field added to the determination later\n // must reach the fact without an edit here.\n transferDetermination: JSON.parse(JSON.stringify(processor.transferDetermination)) as DocumentFactValue,\n })),\n undeterminedRecipients: [\n ...register.processors.filter((processor) => processor.transferDetermination === undefined).map(refOf),\n ...classification.undeclaredProviderRefs,\n ],\n safeguardGaps,\n operatorHostingRegions: inputs.operatorComplianceIdentity?.hostingRegions === undefined ? null : [...inputs.operatorComplianceIdentity.hostingRegions],\n dataResidency: dataResidencyStatementOf(inputs),\n };\n}\n\n/** The `dataResidency` part of the international-transfers fact. See {@link computeInternationalTransfers}. */\nfunction dataResidencyStatementOf(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue {\n const residency = inputs.operatorComplianceIdentity?.dataResidency;\n if (residency === undefined) return null;\n const entries = inputs.recipientPopulation.complianceProfilesRead\n ? dataResidencyEntriesOf(inputs.recipientPopulation.complianceChoiceAssessments, residency)\n : null;\n // #3921: a provider relied on as inside-at-rest whose register entry does not say where it stores. The register is the\n // record a regulator reads first, so the weaker promise must be stated there too, and an absence is named, never filled.\n const storageStated = new Set((inputs.processorRegister?.processors ?? []).flatMap((processor) => (\n processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER && processor.storedAtRestIn !== undefined ? [processor.providerRef] : []\n )));\n return {\n territories: [...residency.territories],\n // The weaker promise, when the operator opted into it (#2294): a vendor marked `inside-at-rest` keeps the data in\n // these places and processes it elsewhere, and a notice must say exactly that for it, never that it processes inside.\n storedAtRestTerritories: residency.storedAtRestTerritories === undefined ? null : [...residency.storedAtRestTerritories],\n providers: entries === null\n ? null\n : entries.map((entry) => ({\n providerRef: entry.providerRef,\n processingRegion: entry.processingRegion,\n territories: entry.territories === null ? null : [...entry.territories],\n storageTerritories: entry.storageTerritories === undefined || entry.storageTerritories === null ? null : [...entry.storageTerritories],\n // What the storage holds on (#3920): the account arrangement the operator attested by choosing the region.\n storageCondition: entry.storageCondition ?? null,\n status: String(entry.status),\n })),\n registerStatesNoStorageFor: entries === null\n ? null\n : entries\n .filter((entry) => entry.status === ProviderDataResidencyStatus.INSIDE_AT_REST && !storageStated.has(entry.providerRef))\n .map((entry) => entry.providerRef),\n };\n}\n\n/**\n * Which rights a person holds, how they ask, how they are verified, who answers, and where they may complain.\n *\n * Every part is a declaration or follows from one. The rights and the complaint route follow from the law of\n * the regime each operating jurisdiction falls under, conditioned on the declared lawful bases\n * (`rightsUnderRegime`); the channel is `privacyContact`; the verification step is\n * `subjectRequestIdentityVerification`; who answers follows from the role the operator holds over each\n * population (`subjectRequestResponderFor`).\n *\n * Answers nothing when any of those declarations is missing, or when a joint controllership leaves \"who\n * answers\" to an arrangement nothing records. A jurisdiction no known regime reaches is NAMED in the answer\n * rather than withheld: the rights the application owes there are unknown to the framework, and a notice\n * must say so instead of presenting the known regimes as the whole.\n */\nfunction computeRightsAndComplaintRoute(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const identity = inputs.operatorComplianceIdentity;\n const origins = inputs.operatingJurisdictionSlugs;\n if (\n identity?.lawfulBases === undefined\n || identity.privacyContact === undefined\n || identity.roleAllocations === undefined\n || identity.subjectRequestIdentityVerification === undefined\n || origins === undefined\n ) {\n return undefined;\n }\n const responsibility = identity.roleAllocations.map((allocation) => ({ dataScope: allocation.dataScope, respondedBy: subjectRequestResponderFor(allocation.role) }));\n if (responsibility.some((entry) => entry.respondedBy === undefined)) return undefined;\n const sortedOrigins = [...origins].sort();\n const regimes = [...new Set(sortedOrigins.map((slug) => dataProtectionRegimeOf(slug)).filter((regime) => regime !== undefined))];\n return {\n regimes: regimes.map((regime) => ({\n regime,\n jurisdictions: sortedOrigins.filter((slug) => dataProtectionRegimeOf(slug) === regime),\n rights: rightsUnderRegime(regime, identity.lawfulBases!).map((entry) => ({ right: entry.right, provision: entry.provision, purposes: [...entry.purposes] })),\n complaintRoute: complaintRouteUnderRegime(regime),\n })),\n jurisdictionsWithoutKnownRegime: sortedOrigins.filter((slug) => dataProtectionRegimeOf(slug) === undefined),\n requestChannel: identity.privacyContact,\n identityVerification: identity.subjectRequestIdentityVerification,\n responseOwnership: responsibility.map((entry) => ({ dataScope: entry.dataScope, respondedBy: entry.respondedBy as string })),\n };\n}\n\n/**\n * Per declared class, whether its period is ENFORCED, only DECLARED, or FAILING — read from the records the\n * retention-class sweep wrote (#1636). The first `RUNTIME_EVIDENCE` answer.\n *\n * Answers nothing unless the schedule, the bindings AND the evidence were all readable: without the schedule\n * there is no declared class to speak of, without the bindings \"no bound resource\" cannot be told from \"could\n * not read them\", and without the evidence nothing is known about what the product did. Each absence leaves the\n * fact absent, so the clause resting on it is marked owed rather than reading \"declared, not enforced\" about an\n * application whose records simply were not collected.\n */\nfunction computeRetentionEnforcement(inputs: ApplicationDocumentFactComputationInputs): ComputedDocumentFactAnswer | undefined {\n const evidence = inputs.retentionEnforcementEvidence;\n if (inputs.retentionSchedule === undefined || inputs.resourceRetentionBindings === undefined || evidence === undefined) return undefined;\n const observedAt = new Date(evidence.window.to);\n if (Number.isNaN(observedAt.getTime())) return undefined;\n const facts = deriveRetentionEnforcementFacts({\n evidence,\n schedule: inputs.retentionSchedule,\n bindings: inputs.resourceRetentionBindings,\n observedAt,\n sweepIntervalMs: RETENTION_CLASS_SWEEP_INTERVAL_MS,\n });\n // Per class, the mechanisms that act on it and that these records CANNOT evidence (#1636 review): the audit trail\n // is archived, never swept, and file bytes are destroyed by the files cleanup. So ENFORCED on AUDIT_LOGS or FILES\n // speaks only for the resources bound to the class — the side tables — and a notice must not read it as covering\n // the audit trail or the stored files. Derived from `retentionPeriodMechanisms`, the same table retention-rules uses.\n const classes = facts.classes.map((entry) => ({\n ...entry,\n mechanismsNotEvidencedByTheseRecords: retentionPeriodMechanisms(entry.dataClass as DataRetentionClass, entry.boundResourceTypes.length)\n .filter((mechanism) => mechanism !== RetentionPeriodMechanism.RETENTION_CLASS_SWEEP) as string[],\n }));\n // A JSON round trip: the derivation's answer is JSON-shaped by construction and drops absent optional keys.\n return {\n fact: ComputedDocumentFact.RETENTION_ENFORCEMENT,\n value: JSON.parse(JSON.stringify({ ...facts, classes })) as DocumentFactValue,\n observedAt: facts.observedAt,\n };\n}\n\n/** One source of personal data the application did not collect from the person: one resource bound to, or piped from, a system of record. */\nexport interface SystemOfRecordSource {\n readonly system: string;\n /** `systemsOfRecord.<name>.vendor`, or `null` when the instance declares none. */\n readonly vendor: string | null;\n readonly resourceType: string;\n readonly flowKind: SystemOfRecordDataFlowKind;\n /**\n * The instance's declared `personalDataOrigin` — the Art. 14(2)(f) \"publicly accessible sources\" half. ABSENT when the\n * instance states none: that half is then owed, and is never read as \"not from public sources\".\n */\n readonly personalDataOrigin?: SystemOfRecordPersonalDataOrigin;\n readonly categories: readonly string[];\n /** The categories that come from the source on EVERY row; equal to `categories` when no field is conditional (#2119). */\n readonly unconditionalCategories: readonly string[];\n /** Per condition, the categories that come from the source only under it (#2119) — the clause words them conditionally. */\n readonly conditionalCategories: readonly ConditionallyHeldCategories[];\n readonly uncategorizedPersonalFields: readonly string[];\n readonly purposes: readonly { readonly purposeRef: string; readonly purpose: string; readonly basis: string }[];\n readonly purposeRefsNamingNoPurpose: readonly string[];\n /** `true` for a pipeline (a local copy), `false` for a read-through binding (nothing kept locally). */\n readonly copiedLocally: boolean;\n /**\n * Who answers a person's requests about these records (#2561), the flow's {@link SystemOfRecordDataFlow.subjectRightsPosture}:\n * the source system, which decides and answers for its own records (HANDLED_AT_SOURCE); the source, with the application\n * also forwarding an erasure to it, best effort (FORWARDED_TO_SOURCE); the source for its own records and the application\n * for the copy it keeps and erases itself (OWNED_COPY). The notice states it beside the source — never a guess at what\n * the source does.\n */\n readonly subjectRightsPosture: SystemOfRecordSubjectRightsPosture;\n /** For a copy, when the bindings were read: no retention class and no `.ttl()` (#1613). Absent otherwise. */\n readonly keptUntilErased?: boolean;\n /** For a copy bound to a retention class, that class. */\n readonly retentionClass?: string;\n}\n\n/**\n * Where personal data the application did NOT collect from the person comes from: every resource bound to, or piped\n * from, a declared system of record (#1745) — the ONE derivation the `system-of-record-sources` fact and the evidence\n * collector both call, so what a notice states and what the evidence measures cannot disagree.\n *\n * A notice owes, for such data, \"from which source the personal data originate, and if applicable, whether it came\n * from publicly accessible sources\", beside the categories and the purposes and legal basis for the processing.\n * spec-cite: GDPR Art. 14(2)(f), 14(1)(c) and 14(1)(d), https://gdpr-info.eu/art-14-gdpr/.\n *\n * Every part of an entry is a declaration or follows from one:\n * - the SOURCE is the instance the binding names, with its declared vendor — the PROXIMATE source, a deployment the\n * operator runs and reads with its own service identity (#1049 Q2);\n * - the CATEGORIES are the `.dataCategories()` of the fields that come from it ({@link SystemOfRecordDataFlow}), and\n * personal fields that name none are named, so a list that is incomplete says so;\n * - the PURPOSES are the ones the binding links (`binding.purposeRefs`), resolved against the lawful bases; a flow that\n * links none states no purpose, and a ref naming no declared purpose is reported as a broken link;\n * - for a PIPELINE (a local copy), whether the copied rows are kept until erased — no retention class and no `.ttl()`\n * (#1613), which is exactly where a copy of a record the source keeps for years goes unnoticed. A read-through\n * binding keeps nothing locally, so it states `copiedLocally: false` instead.\n *\n * A flow that carries no personal data is not a source of personal data and is left out.\n *\n * Whether the data ORIGINATED from publicly accessible sources (the second half of Art. 14(2)(f)) is not a property of\n * the binding: an ERP contact may have been entered from a public register or website. The operator states it per\n * instance (`systemsOfRecord.<name>.personalDataOrigin`) and the entry carries that declaration; an instance stating\n * none gives an entry with no origin, and a notice marks that half owed. Rejected: a constant\n * `publiclyAccessibleSource: false`, which would state a legal fact about the data's origin that nothing derives.\n *\n * Answers `[]` when no system of record is declared — a true statement, not a gap, since no binding can name an\n * undeclared instance. Answers `undefined` when instances are declared and the flows could not be read: an empty list\n * then would say \"nothing is obtained from them\" about an application whose declarations were simply not read.\n */\nexport function deriveSystemOfRecordSources(inputs: {\n readonly recipientPopulation: RecipientPopulation;\n readonly systemOfRecordFlows: readonly SystemOfRecordDataFlow[] | undefined;\n readonly systemOfRecordVendors: Readonly<Record<string, string>> | undefined;\n readonly systemOfRecordPersonalDataOrigins?: Readonly<Record<string, SystemOfRecordPersonalDataOrigin>> | undefined;\n readonly lawfulBases: readonly OperatorLawfulBasis[] | undefined;\n readonly resourceRetentionBindings?: readonly ResourceRetentionBindingFact[] | undefined;\n}): readonly SystemOfRecordSource[] | undefined {\n const declaresInstance = inputs.recipientPopulation.members.some((member) => member.kind === RecipientPopulationMemberKind.SYSTEM_OF_RECORD);\n if (!declaresInstance) return [];\n const flows = inputs.systemOfRecordFlows;\n if (flows === undefined) return undefined;\n const basesByRef = new Map((inputs.lawfulBases ?? []).flatMap((entry) => (entry.purposeRef === undefined ? [] : [[entry.purposeRef, entry] as const])));\n const bindingByResource = inputs.resourceRetentionBindings === undefined ? undefined\n : new Map(inputs.resourceRetentionBindings.map((binding) => [binding.resourceType, binding]));\n return flows\n // A system an OUTBOUND pipeline only sends to is not a SOURCE of what it receives (#2560): stating it here would tell\n // a reader the data was obtained from it. What it receives is the recipient side's statement.\n .filter((flow) => flow.kind !== SystemOfRecordDataFlowKind.OUTBOUND_PIPELINE)\n .filter((flow) => flow.categories.length > 0 || flow.uncategorizedPersonalFields.length > 0)\n .map((flow): SystemOfRecordSource => {\n const copied = flow.kind === SystemOfRecordDataFlowKind.PIPELINE;\n const binding = bindingByResource?.get(flow.resourceType);\n const personalDataOrigin = inputs.systemOfRecordPersonalDataOrigins?.[flow.system];\n return {\n system: flow.system,\n vendor: inputs.systemOfRecordVendors?.[flow.system] ?? null,\n resourceType: flow.resourceType,\n flowKind: flow.kind,\n ...(personalDataOrigin === undefined ? {} : { personalDataOrigin }),\n categories: [...flow.categories],\n unconditionalCategories: [...flow.unconditionalCategories],\n conditionalCategories: flow.conditionalCategories.map((entry) => ({ condition: entry.condition, categories: [...entry.categories] })),\n uncategorizedPersonalFields: [...flow.uncategorizedPersonalFields],\n purposes: flow.purposeRefs.flatMap((purposeRef) => {\n const basis = basesByRef.get(purposeRef);\n return basis === undefined ? [] : [{ purposeRef, purpose: basis.purpose, basis: basis.basis }];\n }),\n purposeRefsNamingNoPurpose: flow.purposeRefs.filter((purposeRef) => !basesByRef.has(purposeRef)),\n copiedLocally: copied,\n subjectRightsPosture: flow.subjectRightsPosture,\n // Only for a copy, and only when the bindings were readable: otherwise \"kept until erased\" cannot be told from\n // \"not read\", and the key is absent rather than false.\n ...(copied && binding !== undefined\n ? { keptUntilErased: isKeptUntilErased(binding), ...(binding.retentionBinding === undefined ? {} : { retentionClass: binding.retentionBinding.retentionClass }) }\n : {}),\n };\n })\n .sort((left, right) => (`${left.system}/${left.resourceType}/${left.flowKind}` < `${right.system}/${right.resourceType}/${right.flowKind}` ? -1 : 1));\n}\n\n/** The `system-of-record-sources` fact: {@link deriveSystemOfRecordSources}, JSON-shaped. */\nfunction computeSystemOfRecordSources(inputs: ApplicationDocumentFactComputationInputs): DocumentFactValue | undefined {\n const sources = deriveSystemOfRecordSources({\n recipientPopulation: inputs.recipientPopulation,\n systemOfRecordFlows: inputs.systemOfRecordFlows,\n systemOfRecordVendors: inputs.systemOfRecordVendors,\n systemOfRecordPersonalDataOrigins: inputs.systemOfRecordPersonalDataOrigins,\n lawfulBases: inputs.operatorComplianceIdentity?.lawfulBases,\n resourceRetentionBindings: inputs.resourceRetentionBindings,\n });\n // A JSON round trip: the derivation's answer is JSON-shaped by construction and drops absent optional keys.\n return sources === undefined ? undefined : (JSON.parse(JSON.stringify({ sources })) as DocumentFactValue);\n}\n\n/** The `ai-use-inventory` fact: {@link deriveAiUseInventory}, KNOWN or NOT_APPLICABLE. */\nfunction computeAiUseInventory(inputs: ApplicationDocumentFactComputationInputs): ComputedDocumentFactAnswer | undefined {\n const answer = deriveAiUseInventory({\n aiUses: inputs.aiUses,\n recipientPopulation: inputs.recipientPopulation,\n processorRegister: inputs.processorRegister,\n operatingJurisdictionSlugs: inputs.operatingJurisdictionSlugs,\n });\n if (answer === undefined) return undefined;\n // `in`, not the `applies` flag: this package compiles without strictNullChecks, where a boolean discriminant does not narrow.\n return \"notApplicableReason\" in answer\n ? { fact: ComputedDocumentFact.AI_USE_INVENTORY, notApplicableReason: answer.notApplicableReason }\n : { fact: ComputedDocumentFact.AI_USE_INVENTORY, value: answer.value as DocumentFactValue };\n}\n\n/** The `ai-content-guardrails` fact: {@link deriveAiContentGuardrailFacts}, RUNTIME_EVIDENCE as of its window's end. */\nfunction computeAiContentGuardrails(inputs: ApplicationDocumentFactComputationInputs): ComputedDocumentFactAnswer | undefined {\n const answer = deriveAiContentGuardrailFacts({ aiUses: inputs.aiUses, evidence: inputs.aiContentGuardrailEvidence });\n return answer === undefined\n ? undefined\n : { fact: ComputedDocumentFact.AI_CONTENT_GUARDRAILS, value: answer.value as DocumentFactValue, observedAt: answer.observedAt };\n}\n\n/** Every computed fact the inputs can answer, in vocabulary order. */\nexport function computeApplicationDocumentFacts(inputs: ApplicationDocumentFactComputationInputs): readonly ComputedDocumentFactAnswer[] {\n const declared = (fact: ComputedDocumentFact, value: DocumentFactValue | undefined): ComputedDocumentFactAnswer | undefined =>\n value === undefined ? undefined : { fact, value };\n const computers: Readonly<Record<ComputedDocumentFact, () => ComputedDocumentFactAnswer | undefined>> = {\n [ComputedDocumentFact.CONTROLLER_AND_CONTACT]: () => declared(ComputedDocumentFact.CONTROLLER_AND_CONTACT, computeControllerAndContact(inputs.operatorComplianceIdentity)),\n [ComputedDocumentFact.RECIPIENTS_AND_PROCESSORS]: () => declared(ComputedDocumentFact.RECIPIENTS_AND_PROCESSORS, computeRecipientsAndProcessors(inputs)),\n [ComputedDocumentFact.LAWFUL_BASES]: () => declared(ComputedDocumentFact.LAWFUL_BASES, computeLawfulBases(inputs.operatorComplianceIdentity)),\n [ComputedDocumentFact.RETENTION_RULES]: () => declared(ComputedDocumentFact.RETENTION_RULES, computeRetentionRules(inputs)),\n [ComputedDocumentFact.INTERNATIONAL_TRANSFERS]: () => declared(ComputedDocumentFact.INTERNATIONAL_TRANSFERS, computeInternationalTransfers(inputs)),\n [ComputedDocumentFact.RIGHTS_AND_COMPLAINT_ROUTE]: () => declared(ComputedDocumentFact.RIGHTS_AND_COMPLAINT_ROUTE, computeRightsAndComplaintRoute(inputs)),\n [ComputedDocumentFact.RETENTION_ENFORCEMENT]: () => computeRetentionEnforcement(inputs),\n [ComputedDocumentFact.SYSTEM_OF_RECORD_SOURCES]: () => declared(ComputedDocumentFact.SYSTEM_OF_RECORD_SOURCES, computeSystemOfRecordSources(inputs)),\n [ComputedDocumentFact.AI_USE_INVENTORY]: () => computeAiUseInventory(inputs),\n [ComputedDocumentFact.AI_CONTENT_GUARDRAILS]: () => computeAiContentGuardrails(inputs),\n };\n return Object.values(ComputedDocumentFact).flatMap((fact) => {\n const answer = computers[fact]();\n return answer === undefined ? [] : [answer];\n });\n}\n\n/**\n * The derived facts with the computed ones laid over them — what a reader of the application's facts sees.\n *\n * A computed answer REPLACES any declaration of the same fact, whatever its scope. A stored copy is refused\n * by the family validator, so replacing it is not a precedence rule: the stored copy is never the answer.\n * Declared facts pass through untouched, and the computed declarations adopt the stored file's governance\n * scope and specification ref, so one document reads one scope.\n *\n * ## Only over a family that exists\n *\n * `stored` is required. An application that has not produced its facts yet has nothing to enrich, and a\n * facts set synthesized from the computed ones alone would change what every reader concludes: \"no facts\n * produced yet\" makes a citation check skip, while \"declares only these two\" makes it refuse every other\n * citation. The computed facts join the application's facts; they do not stand in for them.\n */\n/**\n * The authority a computed answer is stamped with: the fact's tier from {@link COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS},\n * never a default. A RUNTIME_EVIDENCE fact carries the instant its evidence describes; one produced without\n * that instant is a defect in its computation and is refused here rather than stamped as specification.\n */\nfunction computedFactAuthority(answer: ComputedDocumentFactAnswer) {\n const common = { authorityRef: `document-fact-authority:${answer.fact}`, authorityVersion: 1 };\n if (COMPUTED_DOCUMENT_FACT_AUTHORITY_KINDS[answer.fact] === AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE) {\n if (answer.observedAt === undefined) throw new Error(`Computed fact \"${answer.fact}\" is runtime evidence and was produced without its observedAt instant`);\n return { factAuthorityKind: AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE, ...common, observedAt: answer.observedAt };\n }\n return { factAuthorityKind: AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION, ...common };\n}\n\nexport function overlayComputedDocumentFacts(\n stored: ApplicationDocumentFactSpecification,\n answers: readonly ComputedDocumentFactAnswer[],\n): ApplicationDocumentFactSpecification {\n const declarationRefOf = (fact: ComputedDocumentFact): string => `document-fact-declaration:${fact}`;\n const everyComputedDeclarationRef = new Set(Object.values(ComputedDocumentFact).map(declarationRefOf));\n // A stored copy of ANY computed fact is dropped, answered or not (#1636 review). It used to be dropped only\n // when the runtime had an answer to replace it with, so an unanswered fact let the copy through — and for\n // `retention-enforcement` that is a typed \"ENFORCED\" under RUNTIME_EVIDENCE authority reaching a notice\n // whose records were never collected. A stored copy is never the answer; absent is.\n const isComputedCopy = (declaration: ApplicationDocumentFactSpecification[\"declarations\"][number]): boolean =>\n computedDocumentFactOf(declaration.factRef) !== undefined || everyComputedDeclarationRef.has(declaration.declarationRef);\n if (answers.length === 0 && !stored.declarations.some(isComputedCopy)) return stored;\n // The family schema requires at least one declaration, so a parsed specification always has a first.\n const governanceScope = stored.declarations[0]!.governanceScope;\n let kept = stored.declarations.filter((declaration) => !isComputedCopy(declaration));\n if (kept.length === 0 && answers.length === 0) {\n // Degenerate: the file holds nothing but copies of computed facts, and nothing was computed. The family\n // cannot be empty, so keep the copies that claim no runtime evidence (the validator reports them at every\n // landing) and never one that claims RUNTIME_EVIDENCE. A file of runtime-evidence copies alone is returned\n // as it is — the one residual, and one only a hand edit could produce (landing validation reports it as\n // DOCUMENT_FACT_IS_COMPUTED). It exists because the stored-file schema must admit RUNTIME_EVIDENCE for the\n // overlaid view to validate; the clean closure is a separate schema for the overlaid view, keeping that tier\n // out of the stored-file schema — not done yet, and recorded here rather than left implicit.\n kept = stored.declarations.filter((declaration) => declaration.authority?.factAuthorityKind !== AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE);\n if (kept.length === 0) return stored;\n }\n const computed = answers.map((answer) => ({\n declarationRef: declarationRefOf(answer.fact),\n declarationVersion: 1,\n factRef: `document-fact:${answer.fact}`,\n factVersion: 1,\n governanceScope,\n sensitivityRef: COMPUTED_DOCUMENT_FACT_SENSITIVITY_REFS[answer.fact],\n authority: computedFactAuthority(answer),\n // A computed NOT_APPLICABLE is a recorded finding with its reason (#2847), which the family schema carries as is.\n ...(answer.notApplicableReason !== undefined\n ? { resolutionKind: ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE, reason: answer.notApplicableReason }\n : { resolutionKind: ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN, value: answer.value }),\n }));\n const declarations = [...kept, ...computed].sort((left, right) =>\n `${left.declarationRef}@${left.declarationVersion}` < `${right.declarationRef}@${right.declarationVersion}` ? -1 : 1,\n );\n return ApplicationDocumentFactSpecificationSchema.parse({\n schemaVersion: 1,\n specificationRef: stored.specificationRef,\n specificationVersion: stored.specificationVersion,\n declarations,\n });\n}\n"]}
@@ -33,6 +33,7 @@
33
33
  * | brand name not cleared | the chosen brand name against its trademark screening — `deriveBrandNameChoiceStanding`, the predicate the coherence report and the risk signal use (#2338) — unless `brandNameClearances` records the name cleared outside the screening (#2440) |
34
34
  * | assurance obligation unmet | the committed compliance programme's obligation register — {@link readAssuranceProgramObligationStanding}: a HARD obligation that applies (or may) and is not met (#55) |
35
35
  * | data residency | {@link placeProvidersInsideDataResidency}, the population and verdict `wildo config sync` refuses on: each data-serving provider the declared (or answered and not yet declared) residency does not place inside, and an answered residency the configuration does not carry yet (#2294) |
36
+ * | agents run unguarded | each environment other than a local one whose `agentContentGuardrails` declares `RUN_UNGUARDED`: its agents' classifier-backed guardrails that no classifier offers there are not enforced (#2292) |
36
37
  *
37
38
  * The governance population is the QUEUE's, deliberately: a fact still needed by a DRAFTED governed document. A document
38
39
  * not drafted yet asks nothing, so its facts are not listed here — the creation run drafting it is what surfaces them.
@@ -50,7 +51,7 @@
50
51
  * (`negative-results-require-a-positive-probe.md`).
51
52
  */
52
53
  import { z } from "zod";
53
- import { type ApplicationBrandNameClearances, type ApplicationOperatorComplianceIdentity, type ApplicationRetentionSchedule, type GovernedDocumentRelease, type ApplicationProviderComplianceChoices, type ProviderComplianceProfile } from "@wildo-ai/saas-models";
54
+ import { type ApplicationBrandNameClearances, type ApplicationOperatorComplianceIdentity, type ApplicationRetentionSchedule, type GovernedDocumentRelease, type ApplicationProviderComplianceChoices, type ProviderComplianceProfile, type EnvironmentAgentContentGuardrails } from "@wildo-ai/saas-models";
54
55
  /** WHAT is open — one member per kind of launch decision, each with its own settling path. */
55
56
  export declare enum LaunchBlockerKind {
56
57
  /** A part of `operatorComplianceIdentity` is undeclared: the legal entity, the hosting region, the privacy contact… */
@@ -112,7 +113,15 @@ export declare enum LaunchBlockerKind {
112
113
  * declared): several of its regions fit, none does, its deployment model is a choice, an authored region lies outside,
113
114
  * or it has no profile (#2294). Under a DECLARED residency `wildo config sync` refuses until it is settled.
114
115
  */
115
- DATA_RESIDENCY_PROVIDER_UNPLACED = "data-residency-provider-unplaced"
116
+ DATA_RESIDENCY_PROVIDER_UNPLACED = "data-residency-provider-unplaced",
117
+ /**
118
+ * An environment other than a local one declares that its agents run UNGUARDED where no classifier offers a guardrail
119
+ * (`agentContentGuardrails: { withoutClassifier: RUN_UNGUARDED }`, #2292): an agent that declares prompt-injection
120
+ * screening or output moderation runs without it there. A decision the operator may keep; this keeps it in view until a
121
+ * classifier is selected for that environment or the declaration is removed. A local environment is never listed: no
122
+ * real user reaches it.
123
+ */
124
+ AGENT_GUARDRAILS_RUN_UNGUARDED = "agent-guardrails-run-unguarded"
116
125
  }
117
126
  /** An input the list is derived from — named so an unreadable one can be reported as such. */
118
127
  export declare enum LaunchBlockerSource {
@@ -127,7 +136,9 @@ export declare enum LaunchBlockerSource {
127
136
  /** The committed compliance programme (`complianceSpecification`): its obligation register. */
128
137
  ASSURANCE_PROGRAM = "assurance-program",
129
138
  /** The data-serving providers' compliance profiles and the residency answer: where each provider processes (#2294). */
130
- PROVIDER_DATA_RESIDENCY = "provider-data-residency"
139
+ PROVIDER_DATA_RESIDENCY = "provider-data-residency",
140
+ /** Each environment's `wildo.infra.<env>.config.ts`: what it declares about its agents' guardrails (#2292). */
141
+ ENVIRONMENT_CONFIGS = "environment-configs"
131
142
  }
132
143
  /** One open decision. */
133
144
  export declare const LaunchBlockerSchema: z.ZodObject<{
@@ -219,6 +230,20 @@ export interface LaunchBlockerInputs {
219
230
  readonly assuranceProgram?: {
220
231
  readonly program: unknown;
221
232
  };
233
+ /**
234
+ * What each authored environment declares about its agents' classifier-backed guardrails (#2292), one entry per
235
+ * environment whose infra config loaded. `undefined` when the environments could not be read: the item is then UNKNOWN.
236
+ */
237
+ readonly environmentAgentGuardrails?: readonly {
238
+ /** The environment's name, its `infrastructure/<name>/` directory. */
239
+ readonly environment: string;
240
+ /** Whether it is a local environment, which no real user reaches. */
241
+ readonly local: boolean;
242
+ /** Its `agentContentGuardrails`, absent when it authors none. */
243
+ readonly declaration?: EnvironmentAgentContentGuardrails;
244
+ /** The file it is authored in. */
245
+ readonly declaredIn: string;
246
+ }[];
222
247
  /** Why each unreadable input could not be read, for the report. */
223
248
  readonly unreadableReasons?: Partial<Record<LaunchBlockerSource, string>>;
224
249
  }
@@ -1 +1 @@
1
- {"version":3,"file":"launch-blockers.schemas.d.ts","sourceRoot":"","sources":["../../../../src/_core/compliance-documents/launch-blockers.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,E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