@htilabs/platform-common-models 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/config/index.cjs +0 -81
  2. package/dist/config/index.cjs.map +1 -1
  3. package/dist/config/index.d.cts +4 -79
  4. package/dist/config/index.d.ts +4 -79
  5. package/dist/config/index.js +1 -79
  6. package/dist/config/index.js.map +1 -1
  7. package/dist/constants/index.cjs +18 -2
  8. package/dist/constants/index.cjs.map +1 -1
  9. package/dist/constants/index.d.cts +1 -1
  10. package/dist/constants/index.d.ts +1 -1
  11. package/dist/constants/index.js +18 -2
  12. package/dist/constants/index.js.map +1 -1
  13. package/dist/cvc-Cp4uWnAa.d.cts +298 -0
  14. package/dist/cvc-Cp4uWnAa.d.ts +298 -0
  15. package/dist/cvcs/index.cjs +6678 -221
  16. package/dist/cvcs/index.cjs.map +1 -1
  17. package/dist/cvcs/index.d.cts +15019 -8052
  18. package/dist/cvcs/index.d.ts +15019 -8052
  19. package/dist/cvcs/index.js +6666 -221
  20. package/dist/cvcs/index.js.map +1 -1
  21. package/dist/enums/index.cjs +4557 -0
  22. package/dist/enums/index.cjs.map +1 -0
  23. package/dist/enums/index.d.cts +5257 -0
  24. package/dist/enums/index.d.ts +5257 -0
  25. package/dist/enums/index.js +4354 -0
  26. package/dist/enums/index.js.map +1 -0
  27. package/dist/{index-I-DiX9eQ.d.ts → index-CDoqrfc1.d.ts} +1 -1
  28. package/dist/{index-CoVr1jIV.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  29. package/dist/index.cjs +7219 -232
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +7 -4700
  32. package/dist/index.d.ts +7 -4700
  33. package/dist/index.js +7195 -232
  34. package/dist/index.js.map +1 -1
  35. package/dist/models/index.d.cts +2 -2
  36. package/dist/models/index.d.ts +2 -2
  37. package/dist/mongo/index.cjs +0 -1
  38. package/dist/mongo/index.cjs.map +1 -1
  39. package/dist/mongo/index.js +1 -2
  40. package/dist/mongo/index.js.map +1 -1
  41. package/dist/{platform-auth-v53r3BhN.d.cts → platform-auth-Dv5fu0Fh.d.cts} +5 -4
  42. package/dist/{platform-auth-v53r3BhN.d.ts → platform-auth-Dv5fu0Fh.d.ts} +5 -4
  43. package/dist/schemas/index.cjs +5 -1
  44. package/dist/schemas/index.cjs.map +1 -1
  45. package/dist/schemas/index.d.cts +25 -25
  46. package/dist/schemas/index.d.ts +25 -25
  47. package/dist/schemas/index.js +5 -1
  48. package/dist/schemas/index.js.map +1 -1
  49. package/dist/types/index.d.cts +2 -2
  50. package/dist/types/index.d.ts +2 -2
  51. package/dist/validation/index.cjs +58 -0
  52. package/dist/validation/index.cjs.map +1 -1
  53. package/dist/validation/index.d.cts +82 -283
  54. package/dist/validation/index.d.ts +82 -283
  55. package/dist/validation/index.js +57 -0
  56. package/dist/validation/index.js.map +1 -1
  57. package/package.json +10 -1
  58. package/src/__sot__/README.md +36 -1
  59. package/src/__sot__/coreIndicatorFields.ts +331 -0
  60. package/src/__sot__/coreIndicators.pin.json +1936 -2
  61. package/src/__sot__/cvcIndex.pin.json +8 -4
  62. package/src/__tests__/__snapshots__/cvc-sot.snap +41 -13
  63. package/src/__tests__/core-information-scope-invariant.test.ts +134 -0
  64. package/src/__tests__/cvc-136-scoring-invariant.test.ts +8 -3
  65. package/src/__tests__/cvc-181-182-country-parity.test.ts +163 -0
  66. package/src/__tests__/cvc-drift-gate.test.ts +445 -12
  67. package/src/__tests__/cvc-sot-snapshot.test.ts +73 -11
  68. package/src/__tests__/cvc-status-parser.test.ts +150 -0
  69. package/src/__tests__/cvc-structural.test.ts +14 -0
  70. package/src/__tests__/runtime-contract-validator.test.ts +1 -325
  71. package/src/config/index.ts +4 -189
  72. package/src/constants/ic.ts +120 -3
  73. package/src/cvcs/assertionDomain.v1.1.0.json +19 -1
  74. package/src/cvcs/assertionStatus.v1.0.0.json +80 -0
  75. package/src/cvcs/carCorrectionReason.v1.0.0.json +89 -0
  76. package/src/cvcs/caseShareState.v1.0.0.json +62 -0
  77. package/src/cvcs/coreIndicators.v1.0.0.json +83 -5
  78. package/src/cvcs/coreInformationScope.v1.0.0.json +1165 -0
  79. package/src/cvcs/countries.v1.0.0.json +3077 -0
  80. package/src/cvcs/createdBySystem.v1.0.0.json +89 -0
  81. package/src/cvcs/criminalOrgCategory.v1.0.0.json +116 -0
  82. package/src/cvcs/determinationHelperCategories.v1.0.0.json +1166 -0
  83. package/src/cvcs/incidentParticipationRoles.v1.0.0.json +11 -1
  84. package/src/cvcs/index.ts +32 -0
  85. package/src/cvcs/minorAdultStatus.v1.0.0.json +80 -0
  86. package/src/cvcs/personRelationships.v1.0.0.json +67 -2
  87. package/src/cvcs/referralOrigin.v1.0.0.json +26 -0
  88. package/src/cvcs/relationshipConcern.v1.0.0.json +28 -19
  89. package/src/cvcs/riskIdentificationMilestone.v1.0.0.json +109 -0
  90. package/src/cvcs/sessionTemplate.v1.0.0.json +22 -0
  91. package/src/cvcs/sharePurpose.v1.0.0.json +80 -12
  92. package/src/cvcs/subjectType.v1.0.0.json +80 -0
  93. package/src/generated/cvc-enums.ts +606 -20
  94. package/src/validation/cvcStatus.ts +209 -0
  95. package/src/validation/index.ts +1 -0
  96. package/dist/{cvcEntry-BCj1OWqL.d.cts → cvcEntry-0BIB9sen.d.cts} +8 -8
  97. package/dist/{cvcEntry-BCj1OWqL.d.ts → cvcEntry-0BIB9sen.d.ts} +8 -8
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "domain": "share_purpose",
3
3
  "name": "Core Share Purpose",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
+ "_status": "Synced verbatim from canonical CVC-84 (renamed `core-sharing_purpose` 2026-08-19). 8 core rows from `core_share_purpose.yaml` + 4 LEADS-wing rows from `core_share_purpose_extensions_leads.yaml`, which the prototype's `build_sharing_purpose_catalog.py` joins into the 12-row catalog. The wing rows were RATIFIED 2026-07-03 and live-synced 2026-08-19 (no longer proposal-only). 0.8.16 shipped the core 8 only, and shipped them WITHOUT the decision attributes — which is how a consumer came to map `deconfliction` and `automatic_account_share` onto each other's legacy policy rows. `setBy`, `wing`, `appScope` and `needToKnowArm` are now carried as data so that mapping is derivable rather than inferred from titles. Codes 084-001..008 are FROZEN at their published key assignment; the wing rows take 084-009..012, so nothing already stored changes meaning.",
6
+ "_source": "htilabstech/prototype data/cvcs/core_share_purpose.yaml + core_share_purpose_extensions_leads.yaml",
5
7
  "levels": {
6
8
  "1": "Purpose"
7
9
  },
@@ -13,7 +15,9 @@
13
15
  "selectable": true,
14
16
  "parentCode": null,
15
17
  "childCodes": [],
16
- "definition": "Sharing client information to connect the client to a service, program, or provider outside the originating agency so that the receiving party can engage or enroll them."
18
+ "definition": "A one time point in time share used to refer limited, specific segments of information to another party for a narrow purpose.",
19
+ "setBy": "manual",
20
+ "wing": "core"
17
21
  },
18
22
  {
19
23
  "code": "084-002-000-000-000-000-000",
@@ -22,7 +26,9 @@
22
26
  "selectable": true,
23
27
  "parentCode": null,
24
28
  "childCodes": [],
25
- "definition": "Sharing information among agencies or providers actively co-working a client's case so each collaborator can coordinate services, avoid duplication, and advance shared case goals."
29
+ "definition": "An ongoing but time limited sharing purpose to support repeated communication needed to complete a specific service or action approved by the victim or mandated by law.",
30
+ "setBy": "manual",
31
+ "wing": "core"
26
32
  },
27
33
  {
28
34
  "code": "084-003-000-000-000-000-000",
@@ -31,25 +37,32 @@
31
37
  "selectable": true,
32
38
  "parentCode": null,
33
39
  "childCodes": [],
34
- "definition": "Sharing the minimum information required to determine whether multiple parties are engaged with the same client or incident, in order to prevent conflicting actions or duplicate outreach."
40
+ "definition": "A sharing purpose for detecting overlap between two parties' case records (deconfliction) so agencies, teams, or investigators can identify parallel work and coordinate safely when appropriate.",
41
+ "setBy": "automatic",
42
+ "wing": "core",
43
+ "appScope": "leads_only"
35
44
  },
36
45
  {
37
46
  "code": "084-004-000-000-000-000-000",
38
47
  "key": "mandatory_reporting",
39
- "title": "Mandatory reporting",
48
+ "title": "Mandatory report",
40
49
  "selectable": true,
41
50
  "parentCode": null,
42
51
  "childCodes": [],
43
- "definition": "Sharing information to satisfy a legal duty to report suspected abuse, neglect, or similar statutorily defined harms to an authorized receiving body (e.g., child or adult protective services)."
52
+ "definition": "A sharing purpose indicating information must be shared to meet a legal or regulatory mandated reporting duty.",
53
+ "setBy": "manual",
54
+ "wing": "core"
44
55
  },
45
56
  {
46
57
  "code": "084-005-000-000-000-000-000",
47
58
  "key": "authority_reporting",
48
- "title": "Authority reporting",
59
+ "title": "Authority report",
49
60
  "selectable": true,
50
61
  "parentCode": null,
51
62
  "childCodes": [],
52
- "definition": "Sharing information with a governing authority, regulator, or funder to satisfy a non-mandatory-reporter disclosure obligation such as grant reporting, oversight notifications, or jurisdictional alerts."
63
+ "definition": "A sharing purpose used to notify a designated authority for accountability, compliance, intelligence, or administrative purposes when the sender is not acting under a mandated reporter duty.",
64
+ "setBy": "manual",
65
+ "wing": "core"
53
66
  },
54
67
  {
55
68
  "code": "084-006-000-000-000-000-000",
@@ -58,16 +71,20 @@
58
71
  "selectable": true,
59
72
  "parentCode": null,
60
73
  "childCodes": [],
61
- "definition": "Sharing that occurs automatically because the receiving party is configured as a standing member of the client's account, team, or care circle and receives information without a case-by-case release decision."
74
+ "definition": "An agency-admin configured, default sharing mode that automatically makes a limited, standardized subset of case information viewable across the agency account without requiring case-by-case sharing decisions by end users.",
75
+ "setBy": "automatic",
76
+ "wing": "core"
62
77
  },
63
78
  {
64
79
  "code": "084-007-000-000-000-000-000",
65
80
  "key": "discretionary_share",
66
- "title": "Discretionary share",
81
+ "title": "Discretionary share (FYI)",
67
82
  "selectable": true,
68
83
  "parentCode": null,
69
84
  "childCodes": [],
70
- "definition": "Ad-hoc sharing initiated at the sharer's discretion for a specific purpose that does not fit another defined category; the sharer is responsible for recording the reason and scope on the share."
85
+ "definition": "A sharing purpose for situational awareness or FYI sharing when there is no explicit requested action, no legal duty, and no structured collaboration.",
86
+ "setBy": "manual",
87
+ "wing": "core"
71
88
  },
72
89
  {
73
90
  "code": "084-008-000-000-000-000-000",
@@ -76,7 +93,58 @@
76
93
  "selectable": true,
77
94
  "parentCode": null,
78
95
  "childCodes": [],
79
- "definition": "Sharing information in response to a formal request for records (for example a subpoena, court order, ROI-backed request, or FOIA-style inquiry) where the request itself establishes the sharing purpose."
96
+ "definition": null,
97
+ "setBy": "automatic",
98
+ "wing": "core",
99
+ "incompleteInSource": true
100
+ },
101
+ {
102
+ "code": "084-009-000-000-000-000-000",
103
+ "key": "investigation_support",
104
+ "title": "Investigation support",
105
+ "selectable": true,
106
+ "parentCode": null,
107
+ "childCodes": [],
108
+ "definition": "Case or investigative intelligence (identifies people or organizations) disseminated to a LEADS recipient working on some aspect of the inquiry.",
109
+ "setBy": "manual",
110
+ "wing": "leads",
111
+ "needToKnowArm": "assist_support_investigation"
112
+ },
113
+ {
114
+ "code": "084-010-000-000-000-000-000",
115
+ "key": "threat_prevention",
116
+ "title": "Threat prevention",
117
+ "selectable": true,
118
+ "parentCode": null,
119
+ "childCodes": [],
120
+ "definition": "A sharing purpose for dissemination that is pertinent and necessary to prevent or mitigate a threat.",
121
+ "setBy": "manual",
122
+ "wing": "leads",
123
+ "needToKnowArm": "prevent_mitigate_threat"
124
+ },
125
+ {
126
+ "code": "084-011-000-000-000-000-000",
127
+ "key": "awareness_product",
128
+ "title": "Situational awareness (intelligence product)",
129
+ "selectable": true,
130
+ "parentCode": null,
131
+ "childCodes": [],
132
+ "definition": "A sharing purpose for a de-identified intelligence product — indicators, methodologies, or pattern trends with no identified individuals or organizations.",
133
+ "setBy": "manual",
134
+ "wing": "leads",
135
+ "needToKnowArm": "assumed_for_le"
136
+ },
137
+ {
138
+ "code": "084-012-000-000-000-000-000",
139
+ "key": "prosecution_support",
140
+ "title": "Prosecution support",
141
+ "selectable": true,
142
+ "parentCode": null,
143
+ "childCodes": [],
144
+ "definition": "A sharing purpose for material headed toward charging, court filing, or discovery; routes the act to the evidence/discovery export register rather than the dissemination share path.",
145
+ "setBy": "manual",
146
+ "wing": "leads",
147
+ "needToKnowArm": "assist_support_investigation"
80
148
  }
81
149
  ]
82
150
  }
@@ -0,0 +1,80 @@
1
+ {
2
+ "domain": "subject_type",
3
+ "name": "Subject Type",
4
+ "version": "1.0.0",
5
+ "_status": "PROVISIONAL — GDR §10.1 confirmed-CVC name is `core - subject_type`, but Final CVCs/CVC_INDEX.md @ a596eb9 carries no number for it, so it parks in the provisional 900-block pending canonical Notion authoring + steward ratification. Substantive values sourced verbatim from the PAVE @pave/domain `SUBJECT_TYPES` enum (D10 GDR §10.1 bulk publish, bead pv-pgdr-cvc-source-gdr-10-1-bulk-publish). The PAVE enum enumerates only the substantive entity kinds, so the missingness quadruplet is added per SOT convention.",
6
+ "_source": "pave-2.0/packages/domain/src/enums.ts SUBJECT_TYPES",
7
+ "levels": {
8
+ "0": "Unknown or Missing",
9
+ "1": "Assertion subject type"
10
+ },
11
+ "entries": [
12
+ {
13
+ "code": "987-000-000-000-000-000-000",
14
+ "key": "missingness_root",
15
+ "title": "Unknown, Redacted, or Missing",
16
+ "selectable": false,
17
+ "parentCode": null,
18
+ "childCodes": [
19
+ "987-000-000-000-000-000-001",
20
+ "987-000-000-000-000-000-002",
21
+ "987-000-000-000-000-000-003"
22
+ ],
23
+ "definition": "Root group for values indicating absent, withheld, or uncollected data."
24
+ },
25
+ {
26
+ "code": "987-000-000-000-000-000-001",
27
+ "key": "unknown",
28
+ "title": "Unknown",
29
+ "selectable": true,
30
+ "parentCode": "987-000-000-000-000-000-000",
31
+ "childCodes": [],
32
+ "definition": "The subject type is unknown at time of entry (missingness sentinel)."
33
+ },
34
+ {
35
+ "code": "987-000-000-000-000-000-002",
36
+ "key": "anonymous",
37
+ "title": "Anonymous / declined to answer",
38
+ "selectable": true,
39
+ "parentCode": "987-000-000-000-000-000-000",
40
+ "childCodes": [],
41
+ "definition": "Value is intentionally withheld, declined, or redacted."
42
+ },
43
+ {
44
+ "code": "987-000-000-000-000-000-003",
45
+ "key": "data_not_collected",
46
+ "title": "Data not collected",
47
+ "selectable": true,
48
+ "parentCode": "987-000-000-000-000-000-000",
49
+ "childCodes": [],
50
+ "definition": "No attempt was made to collect the value."
51
+ },
52
+ {
53
+ "code": "987-001-000-000-000-000-000",
54
+ "key": "person",
55
+ "title": "Person",
56
+ "selectable": true,
57
+ "parentCode": null,
58
+ "childCodes": [],
59
+ "definition": "The assertion is about a person; `subject_id` resolves to a person record. Emitting systems typically default to this value (e.g. PAVE's assertion factory defaults `subjectType: \"person\"`)."
60
+ },
61
+ {
62
+ "code": "987-002-000-000-000-000-000",
63
+ "key": "relationship",
64
+ "title": "Relationship",
65
+ "selectable": true,
66
+ "parentCode": null,
67
+ "childCodes": [],
68
+ "definition": "The assertion is about a relationship between people; `subject_id` resolves to a relationship record."
69
+ },
70
+ {
71
+ "code": "987-003-000-000-000-000-000",
72
+ "key": "case",
73
+ "title": "Case",
74
+ "selectable": true,
75
+ "parentCode": null,
76
+ "childCodes": [],
77
+ "definition": "The assertion is about a case; `subject_id` resolves to a case record."
78
+ }
79
+ ]
80
+ }